authhero 9.43.0 → 9.44.1

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 (61) hide show
  1. package/dist/assets/u/widget/index.esm.js +1 -1
  2. package/dist/authhero.cjs +205 -164
  3. package/dist/authhero.d.ts +220 -216
  4. package/dist/authhero.mjs +10760 -10688
  5. package/dist/{mfa-C8qBEQeH.js → mfa-B0J_xOxl.js} +1 -1
  6. package/dist/{mfa-CVF4Wbdz.mjs → mfa-CX1JyNyV.mjs} +1 -1
  7. package/dist/{mfa-attempts-sV0Xs59R.mjs → mfa-attempts-BNf9KSrR.mjs} +3 -1
  8. package/dist/{mfa-attempts-CzGjIGzD.js → mfa-attempts-suDM5Cv-.js} +3 -3
  9. package/dist/{passkey-enrollment-CAb2zWEF.js → passkey-enrollment-D180Gog3.js} +1 -1
  10. package/dist/tsconfig.types.tsbuildinfo +1 -1
  11. package/dist/types/authentication-flows/passwordless.d.ts +2 -2
  12. package/dist/types/helpers/dcr/metadata-mapping.d.ts +1 -1
  13. package/dist/types/helpers/login-migration.d.ts +23 -2
  14. package/dist/types/helpers/reserved-claims.d.ts +2 -2
  15. package/dist/types/index.d.ts +220 -216
  16. package/dist/types/routes/auth-api/authorize.d.ts +13 -13
  17. package/dist/types/routes/auth-api/device.d.ts +21 -21
  18. package/dist/types/routes/auth-api/index.d.ts +81 -81
  19. package/dist/types/routes/auth-api/logout.d.ts +2 -2
  20. package/dist/types/routes/auth-api/oidc-logout.d.ts +3 -3
  21. package/dist/types/routes/auth-api/passwordless.d.ts +10 -10
  22. package/dist/types/routes/auth-api/register/index.d.ts +2 -2
  23. package/dist/types/routes/auth-api/revoke.d.ts +6 -6
  24. package/dist/types/routes/auth-api/token.d.ts +12 -12
  25. package/dist/types/routes/management-api/action-executions.d.ts +1 -1
  26. package/dist/types/routes/management-api/authentication-methods.d.ts +1 -1
  27. package/dist/types/routes/management-api/branding.d.ts +7 -3
  28. package/dist/types/routes/management-api/client-registration-tokens.d.ts +8 -8
  29. package/dist/types/routes/management-api/clients.d.ts +16 -16
  30. package/dist/types/routes/management-api/email-templates.d.ts +18 -18
  31. package/dist/types/routes/management-api/failed-events.d.ts +2 -2
  32. package/dist/types/routes/management-api/forms.d.ts +8 -8
  33. package/dist/types/routes/management-api/guardian.d.ts +5 -5
  34. package/dist/types/routes/management-api/helpers.d.ts +1 -1
  35. package/dist/types/routes/management-api/index.d.ts +112 -108
  36. package/dist/types/routes/management-api/keys.d.ts +12 -12
  37. package/dist/types/routes/management-api/log-streams.d.ts +6 -6
  38. package/dist/types/routes/management-api/logs.d.ts +4 -4
  39. package/dist/types/routes/management-api/organizations.d.ts +4 -4
  40. package/dist/types/routes/management-api/prompts.d.ts +6 -6
  41. package/dist/types/routes/management-api/rollouts.d.ts +6 -6
  42. package/dist/types/routes/management-api/self-service-profiles.d.ts +8 -8
  43. package/dist/types/routes/management-api/tenant-export-import.d.ts +5 -5
  44. package/dist/types/routes/management-api/tenant-operations.d.ts +5 -5
  45. package/dist/types/routes/management-api/tenants.d.ts +9 -9
  46. package/dist/types/routes/management-api/users.d.ts +20 -20
  47. package/dist/types/routes/saml/index.d.ts +10 -10
  48. package/dist/types/routes/saml/samlp.d.ts +10 -10
  49. package/dist/types/routes/universal-login/common.d.ts +2 -0
  50. package/dist/types/routes/universal-login/continue.d.ts +4 -4
  51. package/dist/types/routes/universal-login/dark-theme.d.ts +14 -2
  52. package/dist/types/routes/universal-login/identifier.d.ts +2 -2
  53. package/dist/types/routes/universal-login/impersonate.d.ts +4 -4
  54. package/dist/types/routes/universal-login/index.d.ts +8 -8
  55. package/dist/types/routes/universal-login/u2-index.d.ts +9 -9
  56. package/dist/types/routes/universal-login/u2-routes.d.ts +7 -7
  57. package/dist/types/routes/universal-login/u2-widget-page.d.ts +20 -2
  58. package/dist/types/routes/universal-login/universal-login-template.d.ts +8 -0
  59. package/dist/types/state-machines/login-session.d.ts +1 -1
  60. package/dist/types/strategies/apple.d.ts +1 -1
  61. package/package.json +7 -7
@@ -1,4 +1,4 @@
1
- var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(e&&(t=e(e=0)),t),s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),c=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},u=(n,r,a)=>(a=n==null?{}:e(i(n)),l(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),d=e=>a.call(e,`module.exports`)?e[`module.exports`]:l(t({},`__esModule`,{value:!0}),e);let f=require("@hono/zod-openapi"),p=require("hono/http-exception"),m=require("hono/adapter"),h=require("hono/jwt");var g=f.z.object({created_at:f.z.string(),updated_at:f.z.string()}),_=f.z.enum([`local`,`shared`,`platform`]),v=f.z.enum([`none`,`secrets`,`fields`]),y={scope:_.optional(),override:v.optional(),enforce:f.z.boolean().optional()},b=f.z.object({id:f.z.string(),version:f.z.string().optional()}),x=f.z.object({name:f.z.string(),version:f.z.string()}),S=f.z.object({name:f.z.string(),value:f.z.string().optional()}),ee=f.z.object({name:f.z.string().max(255),code:f.z.string().max(1e5),supported_triggers:f.z.array(b).optional(),runtime:f.z.string().max(50).optional(),dependencies:f.z.array(x).optional(),secrets:f.z.array(S).optional(),is_system:f.z.boolean().optional(),...y,inherit:f.z.boolean().optional()}),te=ee.partial().extend({status:f.z.enum([`draft`,`built`]).optional(),deployed_at:f.z.string().optional()}),ne=ee.extend({id:f.z.string(),tenant_id:f.z.string(),status:f.z.enum([`draft`,`built`]).default(`built`),deployed_at:f.z.string().optional(),secrets:f.z.array(f.z.object({name:f.z.string(),value:f.z.string().optional()})).optional()}).extend(g.shape),re=f.z.object({name:f.z.string()}),ie=ne.extend({secrets:f.z.array(re).optional()}),ae=f.z.string(),oe=f.z.enum([`unspecified`,`pending`,`final`,`partial`,`canceled`,`suspended`]),se=f.z.object({id:f.z.string(),msg:f.z.string(),url:f.z.string().optional()}),ce=f.z.object({action_name:f.z.string(),error:se.nullable(),started_at:f.z.string(),ended_at:f.z.string()}),le=f.z.object({level:f.z.enum([`log`,`info`,`warn`,`error`,`debug`]),message:f.z.string()}),ue=f.z.array(f.z.object({action_name:f.z.string(),lines:f.z.array(le)})),de=f.z.object({id:f.z.string(),tenant_id:f.z.string(),trigger_id:ae,status:oe,results:f.z.array(ce),logs:ue.optional(),created_at:f.z.string(),updated_at:f.z.string()}),fe=de.omit({tenant_id:!0,created_at:!0,updated_at:!0}),pe=f.z.object({action_id:f.z.string(),code:f.z.string().max(1e5),runtime:f.z.string().max(50).optional(),dependencies:f.z.array(x).optional(),secrets:f.z.array(S).optional(),supported_triggers:f.z.array(b).optional(),deployed:f.z.boolean().default(!0)}),C=pe.extend({id:f.z.string(),tenant_id:f.z.string(),number:f.z.number().int()}).extend(g.shape),me=f.z.enum([`user_action`,`admin_action`,`system`,`api`]),he=f.z.object({type:f.z.enum([`user`,`admin`,`system`,`api_key`,`client_credentials`]),id:f.z.string().optional(),email:f.z.string().optional(),org_id:f.z.string().optional(),org_name:f.z.string().optional(),scopes:f.z.array(f.z.string()).optional(),client_id:f.z.string().optional()}),w=f.z.object({type:f.z.string(),id:f.z.string(),before:f.z.record(f.z.string(),f.z.unknown()).optional(),after:f.z.record(f.z.string(),f.z.unknown()).optional(),diff:f.z.record(f.z.string(),f.z.object({old:f.z.unknown(),new:f.z.unknown()})).optional()}),ge=f.z.object({user:f.z.object({user_id:f.z.string(),name:f.z.string().optional(),email:f.z.string().optional()}).optional(),strategy:f.z.string(),credentials:f.z.object({jti:f.z.string().optional(),scopes:f.z.array(f.z.string()).optional()}).optional()}),_e=f.z.object({method:f.z.string(),path:f.z.string(),query:f.z.record(f.z.string(),f.z.string()).optional(),body:f.z.unknown().optional(),ip:f.z.string(),user_agent:f.z.string().optional(),correlation_id:f.z.string().optional(),redirect_uri:f.z.string().optional(),authorization_url:f.z.string().optional(),auth:ge.optional()}),ve=f.z.object({status_code:f.z.number(),body:f.z.unknown().optional()}),ye=f.z.object({country_code:f.z.string(),city_name:f.z.string(),latitude:f.z.string(),longitude:f.z.string(),time_zone:f.z.string(),continent_code:f.z.string()}),be=f.z.object({name:f.z.string(),version:f.z.string(),env:f.z.record(f.z.string(),f.z.string()).optional()}),xe=f.z.object({tenant_id:f.z.string(),event_type:f.z.string(),log_type:f.z.string(),description:f.z.string().optional(),category:me,actor:he,target:w,request:_e,response:ve.optional(),connection:f.z.string().optional(),connection_id:f.z.string().optional(),client_name:f.z.string().optional(),strategy:f.z.string().optional(),strategy_type:f.z.string().optional(),audience:f.z.string().optional(),scope:f.z.string().optional(),location:ye.optional(),auth0_client:be.optional(),hostname:f.z.string(),is_mobile:f.z.boolean().optional(),execution_id:f.z.string().optional(),details:f.z.record(f.z.string(),f.z.unknown()).optional(),login_session_id:f.z.string().optional(),timestamp:f.z.string()}),Se=xe.extend({id:f.z.string()}),Ce=f.z.enum([`AUTH0`,`EMAIL`,`REDIRECT`]),we=f.z.enum([`CREATE_USER`,`GET_USER`,`UPDATE_USER`,`SEND_REQUEST`,`SEND_EMAIL`]),Te=f.z.enum([`VERIFY_EMAIL`]),Ee=f.z.object({require_mx_record:f.z.boolean().optional(),block_aliases:f.z.boolean().optional(),block_free_emails:f.z.boolean().optional(),block_disposable_emails:f.z.boolean().optional(),blocklist:f.z.array(f.z.string()).optional(),allowlist:f.z.array(f.z.string()).optional()}),De=f.z.object({id:f.z.string(),alias:f.z.string().max(100).optional(),type:f.z.literal(`AUTH0`),action:f.z.literal(`UPDATE_USER`),allow_failure:f.z.boolean().optional(),mask_output:f.z.boolean().optional(),params:f.z.object({connection_id:f.z.string().optional(),user_id:f.z.string(),changes:f.z.record(f.z.string(),f.z.any())})}),Oe=f.z.object({id:f.z.string(),alias:f.z.string().max(100).optional(),type:f.z.literal(`EMAIL`),action:f.z.literal(`VERIFY_EMAIL`),allow_failure:f.z.boolean().optional(),mask_output:f.z.boolean().optional(),params:f.z.object({email:f.z.string(),rules:Ee.optional()})}),ke=f.z.enum([`change-email`,`account`,`custom`]),Ae=f.z.object({id:f.z.string(),alias:f.z.string().max(100).optional(),type:f.z.literal(`REDIRECT`),action:f.z.literal(`REDIRECT_USER`),allow_failure:f.z.boolean().optional(),mask_output:f.z.boolean().optional(),params:f.z.object({target:ke.openapi({description:`The predefined target to redirect to, or 'custom' for a custom URL`}),custom_url:f.z.string().optional().openapi({description:`Custom URL to redirect to when target is 'custom'`})})}),je=f.z.union([De,Oe,Ae]),Me=f.z.object({name:f.z.string().min(1).max(150).openapi({description:`The name of the flow`}),actions:f.z.array(je).optional().default([]).openapi({description:`The list of actions to execute in sequence`})}),Ne=Me.extend(g.shape).extend({id:f.z.string().openapi({description:`Unique identifier for the flow`,example:`af_12tMpdJ3iek7svMyZkSh5M`})}),Pe=f.z.object({page:f.z.string().min(0).optional().default(`0`).transform(e=>parseInt(e,10)).openapi({description:`The page number where 0 is the first page`}),per_page:f.z.string().min(1).optional().default(`50`).transform(e=>parseInt(e,10)).openapi({description:`The number of items per page. Defaults to 50.`}),include_totals:f.z.string().optional().default(`false`).transform(e=>e===`true`).openapi({description:`If the total number of items should be included in the response`}),sort:f.z.string().regex(/^.+:(-1|1)$/).optional().openapi({description:`A property that should have the format 'string:-1' or 'string:1'`}),q:f.z.string().optional().openapi({description:`A lucene query string used to filter the results`})}),Fe=f.z.object({start:f.z.number(),limit:f.z.number(),length:f.z.number(),total:f.z.number().optional(),next:f.z.string().optional()}),Ie=f.z.object({email:f.z.string().optional(),email_verified:f.z.boolean().optional(),name:f.z.string().optional(),username:f.z.string().optional(),given_name:f.z.string().optional(),phone_number:f.z.string().optional(),phone_verified:f.z.boolean().optional(),family_name:f.z.string().optional()}).catchall(f.z.any()),Le=f.z.object({connection:f.z.string(),user_id:f.z.string(),provider:f.z.string(),isSocial:f.z.boolean(),email:f.z.string().optional(),email_verified:f.z.boolean().optional(),phone_number:f.z.string().optional(),phone_verified:f.z.boolean().optional(),username:f.z.string().optional(),access_token:f.z.string().optional(),access_token_secret:f.z.string().optional(),refresh_token:f.z.string().optional(),profileData:Ie.optional()}),Re=f.z.object({formatted:f.z.string().optional(),street_address:f.z.string().optional(),locality:f.z.string().optional(),region:f.z.string().optional(),postal_code:f.z.string().optional(),country:f.z.string().optional()}).optional(),ze=f.z.object({email:f.z.string().transform(e=>e.toLowerCase()).optional(),username:f.z.string().refine(e=>!e.includes(`@`),{message:`Usernames must not contain "@". Use the email field for email addresses.`}).optional(),phone_number:f.z.string().optional(),phone_verified:f.z.boolean().optional(),given_name:f.z.string().optional(),family_name:f.z.string().optional(),nickname:f.z.string().optional(),name:f.z.string().optional(),picture:f.z.string().optional(),locale:f.z.string().optional(),linked_to:f.z.string().optional(),profileData:f.z.string().optional(),user_id:f.z.string().optional(),app_metadata:f.z.any().default({}).optional(),user_metadata:f.z.any().default({}).optional(),middle_name:f.z.string().optional(),preferred_username:f.z.string().optional(),profile:f.z.string().optional(),website:f.z.string().optional(),gender:f.z.string().optional(),birthdate:f.z.string().optional(),zoneinfo:f.z.string().optional(),address:Re}),Be=ze.extend({email_verified:f.z.boolean().default(!1),verify_email:f.z.boolean().optional(),last_ip:f.z.string().optional(),last_login:f.z.string().optional(),user_id:f.z.string().optional(),provider:f.z.string().optional(),connection:f.z.string(),is_social:f.z.boolean().optional(),blocked:f.z.boolean().optional(),registration_completed_at:f.z.string().optional(),password:f.z.object({hash:f.z.string(),algorithm:f.z.string()}).optional()}),Ve=Be.omit({password:!0}).extend(g.shape).extend({user_id:f.z.string(),provider:f.z.string(),is_social:f.z.boolean(),email:f.z.string().optional(),login_count:f.z.number().default(0),identities:f.z.array(Le).optional()}),He=Ve.omit({registration_completed_at:!0}),Ue=ze.extend({login_count:f.z.number(),multifactor:f.z.array(f.z.string()).optional(),last_ip:f.z.string().optional(),last_login:f.z.string().optional(),user_id:f.z.string()}).catchall(f.z.any());function We(){return f.z.string().trim()}function Ge(e,t){let n={...e};for(let r of t){let t=e[r];typeof t==`string`&&Object.assign(n,{[r]:t.trim()})}return n}var Ke=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`,qe=(e=21)=>{let t=``,n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=Ke[n[e]&63];return t},Je=f.z.enum([`cookie`,`query`]),Ye=f.z.enum([`ip`,`asn`,`none`]),Xe=f.z.object({can_create_session_transfer_token:f.z.boolean().optional().openapi({default:!1,description:`Whether this client may exchange a refresh token for a session_transfer_token.`}),enforce_cascade_revocation:f.z.boolean().optional().openapi({default:!0,description:`Whether revoking the refresh token a session_transfer_token was minted from also ends the sessions (and their refresh tokens) created with that token.`}),allowed_authentication_methods:f.z.array(Je).optional().openapi({default:[],description:"How this client accepts a session_transfer_token at /authorize: as the `session_transfer_token` query parameter (`query`) and/or the `auth0_session_transfer_token` cookie (`cookie`). Empty means the client does not accept session transfer."}),enforce_device_binding:Ye.optional().openapi({default:`ip`,description:"Whether the browser redeeming a session_transfer_token must come from the same IP address (`ip`) or autonomous system (`asn`) as the request that minted it. `none` disables the check."}),allow_refresh_token:f.z.boolean().optional().openapi({default:!1,description:`Whether a login established with a session_transfer_token may be issued a refresh token.`}),enforce_online_refresh_tokens:f.z.boolean().optional().openapi({default:!0,description:`Whether refresh tokens issued on a transferred session are bound to that session's lifetime.`}),allow_onward_transfer:f.z.boolean().optional().openapi({default:!1,description:`AuthHero extension. Whether this client may mint a session_transfer_token from a login that was itself established with one (A → B → C). The onward token stays tied to the original refresh token.`}),trust_forwarded_ip:f.z.boolean().optional().openapi({default:!1,description:"AuthHero extension. Whether an authenticated confidential client may pass the end user's IP address in the `auth0-forwarded-for` header when minting, so device binding compares against the browser rather than the client's backend. Ignored for requests without client authentication."})}).passthrough(),Ze={can_create_session_transfer_token:!1,enforce_cascade_revocation:!0,allowed_authentication_methods:[],enforce_device_binding:`ip`,allow_refresh_token:!1,enforce_online_refresh_tokens:!0,allow_onward_transfer:!1,trust_forwarded_ip:!1};function Qe(e){let t=Xe.safeParse(e??{}),n=t.success?t.data:{};return{can_create_session_transfer_token:n.can_create_session_transfer_token??Ze.can_create_session_transfer_token,enforce_cascade_revocation:n.enforce_cascade_revocation??Ze.enforce_cascade_revocation,allowed_authentication_methods:n.allowed_authentication_methods??[...Ze.allowed_authentication_methods],enforce_device_binding:n.enforce_device_binding??Ze.enforce_device_binding,allow_refresh_token:n.allow_refresh_token??Ze.allow_refresh_token,enforce_online_refresh_tokens:n.enforce_online_refresh_tokens??Ze.enforce_online_refresh_tokens,allow_onward_transfer:n.allow_onward_transfer??Ze.allow_onward_transfer,trust_forwarded_ip:n.trust_forwarded_ip??Ze.trust_forwarded_ip}}var $e=f.z.object({client_id:f.z.string().describe(`The client that minted the session_transfer_token`),family_id:f.z.string().describe(`Rotation family of the refresh token the session_transfer_token was minted from. The family id is stable across rotation, the row id is not.`),cascade_revocation:f.z.boolean().describe(`Whether this session ends when the parent refresh token family is no longer active`)}),et=f.z.object({client_id:f.z.string().optional().openapi({description:`ID of this client. Generated server-side if omitted (Auth0 behavior).`}),name:f.z.string().min(1).openapi({description:`Name of this client (min length: 1 character, does not allow < or >).`}),description:f.z.string().max(140).optional().openapi({description:`Free text description of this client (max length: 140 characters).`}),global:f.z.boolean().default(!1).openapi({description:`Whether this is your global 'All Applications' client representing legacy tenant settings (true) or a regular client (false).`}),client_secret:We().default(()=>qe()).optional().openapi({description:`Client secret (which you must not make public).`}),app_type:f.z.enum([`native`,`spa`,`regular_web`,`non_interactive`,`resource_server`,`express_configuration`,`rms`,`box`,`cloudbees`,`concur`,`dropbox`,`mscrm`,`echosign`,`egnyte`,`newrelic`,`office365`,`salesforce`,`sentry`,`sharepoint`,`slack`,`springcm`,`zendesk`,`zoom`,`sso_integration`,`oag`]).default(`regular_web`).optional().openapi({description:`The type of application this client represents`}),logo_uri:f.z.string().url().optional().openapi({description:`URL of the logo to display for this client. Recommended size is 150x150 pixels.`}),is_first_party:f.z.boolean().default(!0).openapi({description:`Whether this client is a first party client (true) or not (false). First-party clients skip the consent screen; third-party clients require explicit user consent for non-basic scopes.`}),oidc_conformant:f.z.boolean().default(!0).openapi({description:`Whether this client conforms to strict OIDC specifications (true) or uses legacy features (false).`}),auth0_conformant:f.z.boolean().default(!0).openapi({description:`Whether this client follows Auth0-compatible behavior (true) or strict OIDC behavior (false). When true, profile/email claims are included in the ID token when scopes are requested. When false, these claims are only available from the userinfo endpoint (strict OIDC 5.4 compliance).`}),callbacks:f.z.array(f.z.string()).default([]).optional().openapi({description:`Comma-separated list of URLs whitelisted for Auth0 to use as a callback to the client after authentication.`}),allowed_origins:f.z.array(f.z.string()).default([]).optional().openapi({description:`Comma-separated list of URLs allowed to make requests from JavaScript to Auth0 API (typically used with CORS). By default, all your callback URLs will be allowed. This field allows you to enter other origins if necessary. You can also use wildcards at the subdomain level (e.g., https://*.contoso.com). Query strings and hash information are not taken into account when validating these URLs.`}),web_origins:f.z.array(f.z.string()).default([]).optional().openapi({description:`Comma-separated list of allowed origins for use with Cross-Origin Authentication, Device Flow, and web message response mode.`}),client_aliases:f.z.array(f.z.string()).default([]).optional().openapi({description:`List of audiences/realms for SAML protocol. Used by the wsfed addon.`}),allowed_clients:f.z.array(f.z.string()).default([]).optional().openapi({description:`List of allow clients and API ids that are allowed to make delegation requests. Empty means all all your clients are allowed.`}),connections:f.z.array(f.z.string()).default([]).optional().openapi({description:`List of connection IDs enabled for this client. The order determines the display order on the login page.`}),allowed_logout_urls:f.z.array(f.z.string()).default([]).optional().openapi({description:`Comma-separated list of URLs that are valid to redirect to after logout from Auth0. Wildcards are allowed for subdomains.`}),session_transfer:Xe.optional().openapi({description:`Session transfer (Auth0 Native to Web SSO) configuration: lets this client mint a session_transfer_token from a refresh token and/or accept one at /authorize.`}),oidc_logout:f.z.object({backchannel_logout_urls:f.z.array(f.z.string()).optional().openapi({description:`URLs that receive a signed OIDC Back-Channel Logout 1.0 logout token when a session this client participated in ends.`}),backchannel_logout_initiators:f.z.object({mode:f.z.enum([`all`,`custom`]).optional().openapi({description:`Whether all session-end events initiate a backchannel logout (all) or only the selected_initiators (custom).`}),selected_initiators:f.z.array(f.z.string()).optional().openapi({description:`Logout initiators that trigger a backchannel logout when mode is custom (e.g. rp-logout, idp-logout, password-changed).`})}).passthrough().optional().openapi({description:`Controls which session-end events initiate backchannel logout notifications. Stored for Auth0 compatibility; not yet enforced — all initiators currently notify.`})}).passthrough().default({}).optional().openapi({description:`Configuration for OIDC backchannel logout`}),grant_types:f.z.array(f.z.string()).default([]).optional().openapi({description:`List of grant types supported for this application. Can include authorization_code, implicit, refresh_token, client_credentials, password, http://auth0.com/oauth/grant-type/password-realm, http://auth0.com/oauth/grant-type/mfa-oob, http://auth0.com/oauth/grant-type/mfa-otp, http://auth0.com/oauth/grant-type/mfa-recovery-code, urn:openid:params:grant-type:ciba, and urn:ietf:params:oauth:grant-type:device_code.`}),jwt_configuration:f.z.record(f.z.string(),f.z.any()).default({}).optional().openapi({description:`Configuration related to JWTs for the client.`}),signing_keys:f.z.array(f.z.record(f.z.string(),f.z.any())).default([]).optional().openapi({description:`Signing certificates associated with this client.`}),encryption_key:f.z.record(f.z.string(),f.z.any()).default({}).optional().openapi({description:`Encryption used for WsFed responses with this client.`}),sso:f.z.boolean().default(!1).openapi({description:`Applies only to SSO clients and determines whether Auth0 will handle Single Sign On (true) or whether the Identity Provider will (false).`}),sso_disabled:f.z.boolean().default(!1).openapi({description:`Whether Single Sign On is disabled for this client. When true, existing SSO sessions will not be reused and users must authenticate every time.`}),cross_origin_authentication:f.z.boolean().default(!1).openapi({description:`Whether this client can be used to make cross-origin authentication requests (true) or it is not allowed to make such requests (false).`}),cross_origin_loc:f.z.string().url().optional().openapi({description:`URL of the location in your site where the cross origin verification takes place for the cross-origin auth flow when performing Auth in your own domain instead of Auth0 hosted login page.`}),custom_login_page_on:f.z.boolean().default(!1).openapi({description:`Whether a custom login page is to be used (true) or the default provided login page (false).`}),custom_login_page:f.z.string().optional().openapi({description:`The content (HTML, CSS, JS) of the custom login page.`}),custom_login_page_preview:f.z.string().optional().openapi({description:`The content (HTML, CSS, JS) of the custom login page. (Used on Previews)`}),form_template:f.z.string().optional().openapi({description:`HTML form template to be used for WS-Federation.`}),addons:f.z.record(f.z.string(),f.z.any()).default({}).optional().openapi({description:`Addons enabled for this client and their associated configurations.`}),token_endpoint_auth_method:f.z.enum([`none`,`client_secret_post`,`client_secret_basic`,`client_secret_jwt`,`private_key_jwt`]).default(`client_secret_basic`).optional().openapi({description:"Defines the requested authentication method for the token endpoint. `none` (public client), `client_secret_post` / `client_secret_basic` (HTTP POST / Basic), `client_secret_jwt` (RFC 7523 HMAC assertion using client_secret), or `private_key_jwt` (RFC 7523 asymmetric assertion verified against the client's `jwks` / `jwks_uri`)."}),client_metadata:f.z.record(f.z.string(),f.z.string().max(255)).default({}).optional().openapi({description:`Metadata associated with the client, in the form of an object with string values (max 255 chars). Maximum of 10 metadata properties allowed. Field names (max 255 chars) are alphanumeric and may only include the following special characters: :,-+=_*?"/()<>@ [Tab][Space]`}),hide_sign_up_disabled_error:f.z.boolean().default(!1).optional().openapi({description:"Enumeration-safe variant of the connection-level `disable_signup` flag. When a signup is blocked by the password connection and this is true, the identifier screen does not reveal that an email is unknown — it advances to the OTP/password challenge as if the account existed and fails at credential check. Mitigates email enumeration at the cost of UX: users without an account see a generic credential failure instead of an explicit signup-disabled message."}),mobile:f.z.record(f.z.string(),f.z.any()).default({}).optional().openapi({description:`Additional configuration for native mobile apps.`}),initiate_login_uri:f.z.string().url().optional().openapi({description:`Initiate login uri, must be https`}),native_social_login:f.z.record(f.z.string(),f.z.any()).default({}).optional(),refresh_token:f.z.object({rotation_type:f.z.enum([`rotating`,`non-rotating`]).optional().openapi({description:`Whether refresh tokens for this client are rotated on every exchange (Auth0 'rotating' behavior) or kept stable (legacy non-rotating). Defaults to 'non-rotating' when unset.`}),leeway:f.z.number().int().min(0).max(600).optional().openapi({description:`Seconds after a parent token's first rotation during which presenting it again still mints a fresh sibling child instead of triggering reuse-detection. Defaults to 30s when unset.`}),expiration_type:f.z.enum([`expiring`,`non-expiring`]).optional().openapi({description:`Whether refresh tokens for this client expire at all. 'non-expiring' overrides both the absolute and the idle lifetime.`}),token_lifetime:f.z.number().int().min(0).optional().openapi({description:"Refresh-token absolute lifetime in seconds. Falls back to the tenant's `session_lifetime` when unset."}),infinite_token_lifetime:f.z.boolean().optional().openapi({description:"When true, refresh tokens have no absolute expiry (overrides `token_lifetime`)."}),idle_token_lifetime:f.z.number().int().min(0).optional().openapi({description:"Refresh-token idle (sliding) lifetime in seconds, refreshed on every exchange. Falls back to the tenant's `idle_session_lifetime` when unset."}),infinite_idle_token_lifetime:f.z.boolean().optional().openapi({description:"When true, refresh tokens have no idle expiry (overrides `idle_token_lifetime`)."})}).default({}).optional().openapi({description:`Refresh token configuration`}),default_organization:f.z.record(f.z.string(),f.z.any()).default({}).optional().openapi({description:`Defines the default Organization ID and flows`}),organization_usage:f.z.enum([`deny`,`allow`,`require`]).default(`deny`).optional().openapi({description:`Defines how to proceed during an authentication transaction with regards an organization. Can be deny (default), allow or require.`}),organization_require_behavior:f.z.enum([`no_prompt`,`pre_login_prompt`,`post_login_prompt`]).default(`no_prompt`).optional().openapi({description:`Defines how to proceed during an authentication transaction when client.organization_usage: 'require'. Can be no_prompt (default), pre_login_prompt or post_login_prompt. post_login_prompt requires oidc_conformant: true.`}),client_authentication_methods:f.z.record(f.z.string(),f.z.any()).default({}).optional().openapi({description:`Defines client authentication methods.`}),require_pushed_authorization_requests:f.z.boolean().default(!1).openapi({description:`Makes the use of Pushed Authorization Requests mandatory for this client`}),require_proof_of_possession:f.z.boolean().default(!1).openapi({description:`Makes the use of Proof-of-Possession mandatory for this client`}),signed_request_object:f.z.record(f.z.string(),f.z.any()).default({}).optional().openapi({description:`JWT-secured Authorization Requests (JAR) settings.`}),compliance_level:f.z.enum([`none`,`fapi1_adv_pkj_par`,`fapi1_adv_mtls_par`,`fapi2_sp_pkj_mtls`,`fapi2_sp_mtls_mtls`]).optional().openapi({description:`Defines the compliance level for this client, which may restrict it's capabilities`}),par_request_expiry:f.z.number().optional().openapi({description:`Specifies how long, in seconds, a Pushed Authorization Request URI remains valid`}),token_quota:f.z.record(f.z.string(),f.z.any()).default({}).optional(),owner_user_id:f.z.string().optional().openapi({description:`User ID of the consenting user when this client was created via IAT-gated Dynamic Client Registration. NULL for clients created via the Management API or open DCR.`}),registration_type:f.z.enum([`manual`,`open_dcr`,`iat_dcr`]).optional().openapi({description:"Provenance of this client. `manual` = Management API; `open_dcr` = RFC 7591 without IAT; `iat_dcr` = RFC 7591 with an Initial Access Token."}),registration_metadata:f.z.record(f.z.string(),f.z.any()).default({}).optional().openapi({description:"Arbitrary metadata captured at Dynamic Client Registration time that isn't a first-class client field (e.g. integration_type, domain). Also stores `iat_constraints` for clients created via IAT so RFC 7592 PUT can enforce field immutability."}),token_exchange:f.z.object({allow_any_profile_of_type:f.z.array(f.z.literal(`custom_authentication`)).optional()}).optional().openapi({description:'Custom Token Exchange settings. Set `allow_any_profile_of_type` to `["custom_authentication"]` to let this client exchange subject tokens through the tenant\'s token exchange profiles.'}),user_linking_mode:f.z.enum([`builtin`,`off`]).optional().openapi({description:"Per-client override for the built-in email-based user-linking path. `builtin` runs the legacy in-process linking at user creation/email update. `off` disables the legacy path; linking only happens if the tenant has enabled the `account-linking` template hook. When unset, the service-level `userLinkingMode` default applies."})}),tt=f.z.object({created_at:f.z.string(),updated_at:f.z.string()}).extend(et.shape).extend({client_id:f.z.string()}),nt=f.z.object({client_id:f.z.string().min(1).openapi({description:`ID of the client.`}),audience:f.z.string().min(1).openapi({description:`The audience (API identifier) of this client grant.`}),scope:f.z.array(f.z.string()).optional().openapi({description:`Scopes allowed for this client grant.`}),organization_usage:f.z.enum([`deny`,`allow`,`require`]).optional().openapi({description:`Defines whether organizations can be used with client credentials exchanges for this grant.`}),allow_any_organization:f.z.boolean().optional().openapi({description:`If enabled, any organization can be used with this grant. If disabled (default), the grant must be explicitly assigned to the desired organizations.`}),is_system:f.z.boolean().optional().openapi({description:`If enabled, this grant is a special grant created by Auth0. It cannot be modified or deleted directly.`}),subject_type:f.z.enum([`client`,`user`]).optional().openapi({description:`The type of application access the client grant allows. Use of this field is subject to the applicable Free Trial terms in Okta's Master Subscription Agreement.`}),authorization_details_types:f.z.array(f.z.string()).optional().openapi({description:`Types of authorization_details allowed for this client grant. Use of this field is subject to the applicable Free Trial terms in Okta's Master Subscription Agreement.`})}),rt=f.z.object({id:f.z.string().openapi({description:`ID of the client grant.`})}).extend(nt.shape).extend({created_at:f.z.string().optional(),updated_at:f.z.string().optional()}),it=f.z.array(rt),at=f.z.enum([`iat`,`rat`]),ot=f.z.enum([`invite`,`edit_link`,`registration`,`connect`]),st=f.z.object({id:f.z.string(),token_hash:f.z.string(),type:at,client_id:f.z.string().optional(),sub:f.z.string().optional(),constraints:f.z.record(f.z.string(),f.z.unknown()).optional(),single_use:f.z.boolean().default(!1),expires_at:f.z.string().optional(),name:f.z.string().optional(),created_by:f.z.string().optional(),source:ot.optional()}),ct=f.z.object({created_at:f.z.string(),used_at:f.z.string().optional(),revoked_at:f.z.string().optional()}).extend(st.shape),lt=f.z.object({x:f.z.number(),y:f.z.number()}),ut=function(e){return e.RICH_TEXT=`RICH_TEXT`,e.NEXT_BUTTON=`NEXT_BUTTON`,e.BACK_BUTTON=`BACK_BUTTON`,e.SUBMIT_BUTTON=`SUBMIT_BUTTON`,e.DIVIDER=`DIVIDER`,e.TEXT=`TEXT`,e.EMAIL=`EMAIL`,e.PASSWORD=`PASSWORD`,e.NUMBER=`NUMBER`,e.PHONE=`PHONE`,e.DATE=`DATE`,e.CHECKBOX=`CHECKBOX`,e.RADIO=`RADIO`,e.SELECT=`SELECT`,e.HIDDEN=`HIDDEN`,e.LEGAL=`LEGAL`,e}({}),dt=function(e){return e.BLOCK=`BLOCK`,e.FIELD=`FIELD`,e}({}),ft=f.z.object({id:f.z.string(),category:f.z.nativeEnum(dt),type:f.z.nativeEnum(ut)}),pt=ft.extend({category:f.z.literal(`BLOCK`),type:f.z.literal(`RICH_TEXT`),config:f.z.object({content:f.z.string()}).passthrough()}),mt=ft.extend({category:f.z.literal(`BLOCK`),type:f.z.union([f.z.literal(`NEXT_BUTTON`),f.z.literal(`BACK_BUTTON`),f.z.literal(`SUBMIT_BUTTON`)]),config:f.z.object({text:f.z.string()}).passthrough()}),ht=ft.extend({category:f.z.literal(`FIELD`),type:f.z.literal(`LEGAL`),required:f.z.boolean().optional(),sensitive:f.z.boolean().optional(),config:f.z.object({text:f.z.string()}).passthrough()}),gt=ft.extend({category:f.z.literal(`FIELD`),type:f.z.union([f.z.literal(`TEXT`),f.z.literal(`EMAIL`),f.z.literal(`PASSWORD`),f.z.literal(`NUMBER`),f.z.literal(`PHONE`),f.z.literal(`DATE`),f.z.literal(`CHECKBOX`),f.z.literal(`RADIO`),f.z.literal(`SELECT`),f.z.literal(`HIDDEN`)]),required:f.z.boolean().optional(),sensitive:f.z.boolean().optional(),config:f.z.object({label:f.z.string().optional(),placeholder:f.z.string().optional()}).passthrough()}),_t=f.z.object({id:f.z.string(),category:f.z.string(),type:f.z.string()}).passthrough(),vt=f.z.union([pt,mt,ht,gt,_t]),yt=function(e){return e.STEP=`STEP`,e.FLOW=`FLOW`,e.CONDITION=`CONDITION`,e.ACTION=`ACTION`,e}({}),bt=f.z.object({id:f.z.string(),type:f.z.literal(`STEP`),coordinates:lt,alias:f.z.string().optional(),config:f.z.object({components:f.z.array(vt),next_node:f.z.string()}).passthrough()}),xt=f.z.object({id:f.z.string(),type:f.z.literal(`FLOW`),coordinates:lt,alias:f.z.string().optional(),config:f.z.object({flow_id:f.z.string(),next_node:f.z.string()})}),St=f.z.object({id:f.z.string(),type:f.z.literal(`ACTION`),coordinates:lt,alias:f.z.string().optional(),config:f.z.object({action_type:f.z.enum([`REDIRECT`]).openapi({description:`The type of action to perform`}),target:f.z.enum([`change-email`,`account`,`custom`]).openapi({description:`The predefined target to redirect to`}),custom_url:f.z.string().optional().openapi({description:`Custom URL when target is 'custom'`}),next_node:f.z.string().openapi({description:`The next node to navigate to after action (for non-redirect actions)`})}).passthrough()}),Ct=f.z.object({id:f.z.string(),type:f.z.string(),coordinates:lt}).passthrough(),wt=f.z.union([bt,xt,St,Ct]),Tt=f.z.object({next_node:f.z.string(),coordinates:lt}).passthrough(),Et=f.z.object({resume_flow:f.z.boolean().optional(),coordinates:lt}).passthrough(),Dt=f.z.object({id:f.z.string(),name:f.z.string(),languages:f.z.object({primary:f.z.string()}).passthrough(),nodes:f.z.array(wt),start:Tt,ending:Et,created_at:f.z.string(),updated_at:f.z.string(),links:f.z.object({sdkSrc:f.z.string().optional(),sdk_src:f.z.string().optional()}).passthrough()}).passthrough(),Ot=Dt.omit({id:!0,created_at:!0,updated_at:!0}),kt=function(e){return e.TOKEN=`token`,e.ID_TOKEN=`id_token`,e.TOKEN_ID_TOKEN=`id_token token`,e.CODE=`code`,e.CODE_ID_TOKEN=`code id_token`,e.CODE_TOKEN=`code token`,e.CODE_ID_TOKEN_TOKEN=`code id_token token`,e}({}),At=function(e){return e.QUERY=`query`,e.FRAGMENT=`fragment`,e.FORM_POST=`form_post`,e.WEB_MESSAGE=`web_message`,e.SAML_POST=`saml_post`,e}({}),jt=function(e){return e.S256=`S256`,e.Plain=`plain`,e}({}),Mt=f.z.union([f.z.null(),f.z.object({essential:f.z.boolean().optional(),value:f.z.unknown().optional(),values:f.z.array(f.z.unknown()).optional()})]).nullable(),Nt=f.z.object({userinfo:f.z.record(f.z.string(),Mt).optional(),id_token:f.z.record(f.z.string(),Mt).optional()}),Pt=f.z.object({client_id:f.z.string(),act_as:f.z.string().optional(),response_type:f.z.nativeEnum(kt).optional(),response_mode:f.z.nativeEnum(At).optional(),redirect_uri:f.z.string().optional(),audience:f.z.string().optional(),organization:f.z.string().optional(),state:f.z.string().optional(),nonce:f.z.string().optional(),scope:f.z.string().optional(),prompt:f.z.string().optional(),code_challenge_method:f.z.nativeEnum(jt).optional(),code_challenge:f.z.string().optional(),username:f.z.string().optional(),ui_locales:f.z.string().optional(),max_age:f.z.number().optional(),acr_values:f.z.string().optional(),claims:Nt.optional(),connection:f.z.string().optional(),vendor_id:f.z.string().optional()}),Ft=f.z.object({...y,colors:f.z.object({primary:f.z.string(),page_background:f.z.union([f.z.string(),f.z.object({type:f.z.string().optional(),start:f.z.string().optional(),end:f.z.string().optional(),angle_deg:f.z.number().optional()})]).optional()}).optional(),logo_url:f.z.string().optional(),favicon_url:f.z.string().optional(),favicon_url_dark:f.z.string().optional(),powered_by_logo_url:f.z.string().optional(),font:f.z.object({url:f.z.string()}).optional(),dark_mode:f.z.enum([`dark`,`light`,`auto`]).optional(),terms_url:f.z.string().optional(),privacy_url:f.z.string().optional()}),It=f.z.enum([`password_reset`,`email_verification`,`otp`,`mfa_otp`,`authorization_code`,`oauth2_state`,`ticket`,`client_assertion_jti`,`subject_token_jti`,`session_transfer_token`,`mfa_remember_browser`]),Lt=f.z.object({code_id:f.z.string().openapi({description:`The code that will be used in for instance an email verification flow`}),login_id:f.z.string().optional().openapi({description:`The id of the login session that the code is connected to`}),connection_id:f.z.string().optional().openapi({description:`The connection that the code is connected to`}),code_type:It,code_verifier:f.z.string().optional().openapi({description:`The code verifier used in PKCE in outbound flows`}),code_challenge:f.z.string().optional().openapi({description:`The code challenge used in PKCE in outbound flows`}),code_challenge_method:f.z.enum([`plain`,`S256`]).optional().openapi({description:`The code challenge method used in PKCE in outbound flows`}),redirect_uri:f.z.string().optional().openapi({description:`The redirect URI associated with the code`}),otp:f.z.string().optional().openapi({description:`The one-time password value for OTP-based flows`}),nonce:f.z.string().optional().openapi({description:`The nonce value used for security in OIDC flows`}),state:f.z.string().optional().openapi({description:`The state parameter used for CSRF protection in OAuth flows`}),expires_at:f.z.string(),used_at:f.z.string().optional(),user_id:f.z.string().optional()}),Rt=Lt.extend({created_at:f.z.string()}),zt=f.z.object({device_code_hash:f.z.string(),user_code_hash:f.z.string(),client_id:f.z.string(),scope:f.z.string().optional(),audience:f.z.string().optional(),status:f.z.enum([`pending`,`approved`,`denied`,`consumed`]),login_id:f.z.string().optional(),expires_at:f.z.string(),created_at:f.z.string(),last_polled_at:f.z.string().optional(),interval:f.z.number().int().positive(),version:f.z.number().int().nonnegative()}),Bt=f.z.object({kid:f.z.string().optional(),team_id:f.z.string().optional(),realms:f.z.string().optional(),authentication_method:f.z.string().optional(),client_id:f.z.string().optional(),client_secret:We().optional(),app_secret:We().optional(),scope:f.z.string().optional(),client_secret_hint:f.z.string().optional(),app_secret_hint:f.z.string().optional(),twilio_token_hint:f.z.string().optional(),authorization_endpoint:f.z.string().optional(),token_endpoint:f.z.string().optional(),userinfo_endpoint:f.z.string().optional(),jwks_uri:f.z.string().optional(),discovery_url:f.z.string().optional(),issuer:f.z.string().optional(),token_endpoint_auth_method:f.z.enum([`client_secret_basic`,`client_secret_post`]).optional(),provider:f.z.string().optional(),from:f.z.string().optional(),twilio_sid:We().optional(),twilio_token:We().optional(),icon_url:f.z.string().optional(),domain_aliases:f.z.array(f.z.string()).optional(),callback_url:f.z.string().url().optional(),passwordPolicy:f.z.enum([`none`,`low`,`fair`,`good`,`excellent`]).optional(),password_complexity_options:f.z.object({min_length:f.z.number().optional()}).optional(),password_history:f.z.object({enable:f.z.boolean().optional(),size:f.z.number().optional()}).optional(),password_no_personal_info:f.z.object({enable:f.z.boolean().optional()}).optional(),password_dictionary:f.z.object({enable:f.z.boolean().optional(),dictionary:f.z.array(f.z.string()).optional()}).optional(),disable_signup:f.z.boolean().optional(),brute_force_protection:f.z.boolean().optional(),import_mode:f.z.boolean().optional(),configuration:f.z.object({token_endpoint:f.z.string().optional(),userinfo_endpoint:f.z.string().optional(),client_id:f.z.string().optional(),client_secret:We().optional(),client_secret_hint:f.z.string().optional(),realm:f.z.string().optional()}).optional(),attributes:f.z.object({email:f.z.object({identifier:f.z.object({active:f.z.boolean().optional()}).optional(),signup:f.z.object({status:f.z.enum([`required`,`optional`,`disabled`]).optional(),verification:f.z.object({active:f.z.boolean().optional()}).optional()}).optional(),validation:f.z.object({allowed:f.z.boolean().optional()}).optional(),unique:f.z.boolean().optional(),profile_required:f.z.boolean().optional(),verification_method:f.z.enum([`link`,`code`]).optional()}).optional(),username:f.z.object({identifier:f.z.object({active:f.z.boolean().optional()}).optional(),signup:f.z.object({status:f.z.enum([`required`,`optional`,`disabled`]).optional()}).optional(),validation:f.z.object({max_length:f.z.number().optional(),min_length:f.z.number().optional(),allowed_types:f.z.object({email:f.z.boolean().optional(),phone_number:f.z.boolean().optional()}).optional()}).optional(),profile_required:f.z.boolean().optional()}).optional(),phone_number:f.z.object({identifier:f.z.object({active:f.z.boolean().optional()}).optional(),signup:f.z.object({status:f.z.enum([`required`,`optional`,`disabled`]).optional()}).optional()}).optional()}).optional(),authentication_methods:f.z.object({password:f.z.object({enabled:f.z.boolean().optional()}).optional(),passkey:f.z.object({enabled:f.z.boolean().optional()}).optional()}).optional(),passkey_options:f.z.object({challenge_ui:f.z.enum([`both`,`autofill`,`button`]).optional(),local_enrollment_enabled:f.z.boolean().optional(),progressive_enrollment_enabled:f.z.boolean().optional()}).optional(),requires_username:f.z.boolean().optional(),validation:f.z.object({username:f.z.object({min:f.z.number().optional(),max:f.z.number().optional()}).optional()}).optional(),allow_action_users:f.z.boolean().optional(),set_user_root_attributes:f.z.enum([`on_each_login`,`on_first_login`,`never_on_login`]).optional(),signInEndpoint:f.z.string().optional(),signOutEndpoint:f.z.string().optional(),signingCert:f.z.string().optional(),signingCerts:f.z.array(f.z.string()).optional(),metadataUrl:f.z.string().optional(),metadataXml:f.z.string().optional(),signSAMLRequest:f.z.boolean().optional(),signatureAlgorithm:f.z.enum([`rsa-sha256`,`rsa-sha1`]).optional(),digestAlgorithm:f.z.enum([`sha256`,`sha1`]).optional(),protocolBinding:f.z.enum([`urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect`,`urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST`]).optional(),user_id_attribute:f.z.string().optional(),fieldsMap:f.z.record(f.z.string(),f.z.union([f.z.string(),f.z.array(f.z.string())])).optional(),entityId:f.z.string().optional()});function Vt(e){if(e!==null){if(Array.isArray(e))return e.filter(e=>e!==null).map(Vt);if(e&&typeof e==`object`){let t={};for(let[n,r]of Object.entries(e))r!==null&&(t[n]=Vt(r));return t}return e}}var Ht=f.z.object({id:f.z.string().optional(),name:f.z.string(),display_name:f.z.string().optional(),strategy:f.z.string(),options:f.z.preprocess(e=>e===null?{}:Vt(e),Bt).default({}),enabled_clients:f.z.array(f.z.string()).default([]).optional(),response_type:f.z.nativeEnum(kt).optional(),response_mode:f.z.nativeEnum(At).optional(),is_domain_connection:f.z.boolean().optional(),show_as_button:f.z.boolean().optional(),metadata:f.z.record(f.z.string(),f.z.any()).optional(),is_system:f.z.boolean().optional(),...y}),Ut=f.z.object({id:f.z.string(),created_at:f.z.string().transform(e=>e===null?``:e),updated_at:f.z.string().transform(e=>e===null?``:e)}).extend(Ht.shape),Wt=f.z.object({domain:f.z.string(),status:f.z.enum([`pending`,`verified`]),verified_at:f.z.string().optional()}),Gt=f.z.object({profile_id:f.z.string().optional(),domains:f.z.array(Wt).default([])}),Kt=f.z.object({domain:f.z.string(),custom_domain_id:f.z.string().optional(),type:f.z.enum([`auth0_managed_certs`,`self_managed_certs`]),verification_method:f.z.enum([`txt`]).optional(),tls_policy:f.z.enum([`recommended`]).optional(),custom_client_ip_header:f.z.enum([`true-client-ip`,`cf-connecting-ip`,`x-forwarded-for`,`x-azure-clientip`,`null`]).optional(),domain_metadata:f.z.record(f.z.string(),f.z.string().max(255)).optional()}),qt=f.z.discriminatedUnion(`name`,[f.z.object({name:f.z.literal(`txt`),record:f.z.string(),domain:f.z.string()}),f.z.object({name:f.z.literal(`http`),http_body:f.z.string(),http_url:f.z.string()})]),Jt=Kt.extend({custom_domain_id:f.z.string(),primary:f.z.boolean(),status:f.z.enum([`disabled`,`pending`,`pending_verification`,`ready`]),origin_domain_name:f.z.string().optional(),verification:f.z.object({methods:f.z.array(qt)}).optional(),tls_policy:f.z.string().optional()}),Yt=Kt.pick({tls_policy:!0,custom_client_ip_header:!0,domain_metadata:!0}).strict(),Xt=Jt.extend({tenant_id:f.z.string()}),Zt=f.z.object({certificate:f.z.string().regex(/^-----BEGIN CERTIFICATE-----[\s\S]+-----END CERTIFICATE-----\s*$/,`must be PEM-encoded; include the full certificate chain in leaf-first order`),private_key:f.z.string().regex(/-----BEGIN (RSA |EC |ENCRYPTED )?PRIVATE KEY-----[\s\S]+-----END \1PRIVATE KEY-----\s*$/,`must be a PEM-encoded private key`)}),Qt=f.z.object({id:f.z.string(),order:f.z.number().optional(),visible:f.z.boolean().optional().default(!0)}),$t=Qt.extend({category:f.z.literal(`BLOCK`).optional()}),en=$t.extend({type:f.z.literal(`DIVIDER`),config:f.z.object({text:f.z.string().optional()}).optional()}),tn=$t.extend({type:f.z.literal(`HTML`),config:f.z.object({content:f.z.string().optional()}).optional()}),nn=$t.extend({type:f.z.literal(`IMAGE`),config:f.z.object({src:f.z.string().optional(),alt:f.z.string().optional(),width:f.z.number().optional(),height:f.z.number().optional()}).optional()}),rn=$t.extend({type:f.z.literal(`JUMP_BUTTON`),config:f.z.object({text:f.z.string().optional(),target_step:f.z.string().optional()})}),an=$t.extend({type:f.z.literal(`RESEND_BUTTON`),config:f.z.object({text:f.z.string().optional(),resend_action:f.z.string().optional()})}),on=$t.extend({type:f.z.literal(`NEXT_BUTTON`),config:f.z.object({text:f.z.string().optional(),variant:f.z.enum([`primary`,`secondary`]).optional(),skip_validation:f.z.boolean().optional()})}),sn=$t.extend({type:f.z.literal(`PREVIOUS_BUTTON`),config:f.z.object({text:f.z.string().optional()})}),cn=$t.extend({type:f.z.literal(`RICH_TEXT`),config:f.z.object({content:f.z.string().optional()}).optional()}),ln=Qt.extend({category:f.z.literal(`WIDGET`).optional(),label:f.z.string().min(1).optional(),hint:f.z.string().min(1).max(500).optional(),required:f.z.boolean().optional(),sensitive:f.z.boolean().optional()}),un=ln.extend({type:f.z.literal(`AUTH0_VERIFIABLE_CREDENTIALS`),config:f.z.object({credential_type:f.z.string().optional()})}),dn=ln.extend({type:f.z.literal(`GMAPS_ADDRESS`),config:f.z.object({api_key:f.z.string().optional()})}),fn=ln.extend({type:f.z.literal(`RECAPTCHA`),config:f.z.object({site_key:f.z.string().optional()})}),pn=Qt.extend({category:f.z.literal(`FIELD`).optional(),label:f.z.string().min(1).optional(),hint:f.z.string().min(1).max(500).optional(),messages:f.z.array(f.z.object({id:f.z.number().optional(),text:f.z.string(),type:f.z.enum([`info`,`error`,`success`,`warning`])})).optional(),required:f.z.boolean().optional(),sensitive:f.z.boolean().optional()}),mn=pn.extend({type:f.z.literal(`BOOLEAN`),config:f.z.object({default_value:f.z.boolean().optional()}).optional()}),hn=pn.extend({type:f.z.literal(`CARDS`),config:f.z.object({options:f.z.array(f.z.object({value:f.z.string(),label:f.z.string(),description:f.z.string().optional(),image:f.z.string().optional()})).optional(),multi_select:f.z.boolean().optional()}).optional()}),gn=pn.extend({type:f.z.literal(`CHOICE`),config:f.z.object({options:f.z.array(f.z.object({value:f.z.string(),label:f.z.string()})).optional(),display:f.z.enum([`radio`,`checkbox`]).optional(),multiple:f.z.boolean().optional(),default_value:f.z.union([f.z.string(),f.z.array(f.z.string())]).optional()}).optional()}),_n=pn.extend({type:f.z.literal(`CODE`),config:f.z.object({length:f.z.number().int().positive().max(100).optional(),mode:f.z.enum([`numeric`,`alphanumeric`]).optional(),auto_submit:f.z.boolean().optional(),group_size:f.z.number().int().min(0).max(100).optional(),separator:f.z.string().optional(),placeholder:f.z.string().optional(),default_value:f.z.string().optional()}).refine(e=>e.group_size===void 0||e.length===void 0||e.group_size<=e.length,{message:`group_size cannot exceed length`,path:[`group_size`]}).refine(e=>e.default_value===void 0||e.length===void 0||e.default_value.length<=e.length,{message:`default_value is longer than the configured length`,path:[`default_value`]}).optional()}),vn=pn.extend({type:f.z.literal(`CUSTOM`),config:f.z.object({component:f.z.string().optional(),props:f.z.record(f.z.string(),f.z.any()).optional(),schema:f.z.record(f.z.string(),f.z.any()).optional(),code:f.z.string().optional()})}),yn=pn.extend({type:f.z.literal(`DATE`),config:f.z.object({format:f.z.string().optional(),min:f.z.string().optional(),max:f.z.string().optional(),default_value:f.z.string().optional()}).optional()}),bn=pn.extend({type:f.z.literal(`DROPDOWN`),config:f.z.object({options:f.z.array(f.z.object({value:f.z.string(),label:f.z.string()})).optional(),placeholder:f.z.string().optional(),searchable:f.z.boolean().optional(),multiple:f.z.boolean().optional(),default_value:f.z.union([f.z.string(),f.z.array(f.z.string())]).optional()}).optional()}),xn=pn.extend({type:f.z.literal(`EMAIL`),config:f.z.object({placeholder:f.z.string().optional(),default_value:f.z.string().optional(),last_used:f.z.boolean().optional(),last_used_label:f.z.string().optional()}).optional()}),Sn=pn.extend({type:f.z.literal(`FILE`),config:f.z.object({accept:f.z.string().optional(),max_size:f.z.number().optional(),multiple:f.z.boolean().optional()}).optional()}),Cn=pn.extend({type:f.z.literal(`LEGAL`),config:f.z.object({text:f.z.string(),html:f.z.boolean().optional()}).optional()}),wn=pn.extend({type:f.z.literal(`NUMBER`),config:f.z.object({placeholder:f.z.string().optional(),min:f.z.number().optional(),max:f.z.number().optional(),step:f.z.number().optional(),default_value:f.z.string().optional()}).optional()}),Tn=pn.extend({type:f.z.literal(`PASSWORD`),config:f.z.object({placeholder:f.z.string().optional(),min_length:f.z.number().optional(),show_toggle:f.z.boolean().optional(),forgot_password_link:f.z.string().optional(),default_value:f.z.string().optional(),autocomplete:f.z.enum([`current-password`,`new-password`]).optional()}).optional()}),En=pn.extend({type:f.z.literal(`PAYMENT`),config:f.z.object({provider:f.z.string().optional(),currency:f.z.string().optional()}).optional()}),Dn=pn.extend({type:f.z.literal(`SOCIAL`),config:f.z.object({providers:f.z.array(f.z.string()).optional(),provider_details:f.z.array(f.z.object({name:f.z.string(),strategy:f.z.string().optional(),display_name:f.z.string().optional(),short_name:f.z.string().optional(),icon_url:f.z.string().optional(),href:f.z.string().optional(),last_used:f.z.boolean().optional(),last_used_label:f.z.string().optional()})).optional()}).optional()}),On=pn.extend({type:f.z.literal(`TEL`),config:f.z.object({placeholder:f.z.string().optional(),default_country:f.z.string().optional(),default_value:f.z.string().optional(),allow_email:f.z.boolean().optional()}).optional()}),kn=pn.extend({type:f.z.literal(`TEXT`),config:f.z.object({placeholder:f.z.string().optional(),multiline:f.z.boolean().optional(),max_length:f.z.number().optional(),default_value:f.z.string().optional(),autocomplete:f.z.string().optional(),input_mode:f.z.enum([`text`,`numeric`,`decimal`,`tel`,`email`,`url`,`search`]).optional(),last_used:f.z.boolean().optional(),last_used_label:f.z.string().optional()}).optional()}),An=pn.extend({type:f.z.literal(`COUNTRY`),config:f.z.object({placeholder:f.z.string().optional(),default_value:f.z.string().optional()}).optional()}),jn=pn.extend({type:f.z.literal(`URL`),config:f.z.object({placeholder:f.z.string().optional(),default_value:f.z.string().optional()}).optional()}),Mn=f.z.discriminatedUnion(`type`,[en,tn,nn,rn,an,on,sn,cn]),Nn=f.z.discriminatedUnion(`type`,[un,dn,fn]),Pn=f.z.discriminatedUnion(`type`,[mn,hn,gn,_n,An,vn,yn,bn,xn,Sn,Cn,wn,Tn,En,Dn,On,kn,jn]),Fn=f.z.union([Mn,Nn,Pn]),In=new Set([`BOOLEAN`,`CARDS`,`CHOICE`,`CODE`,`COUNTRY`,`DATE`,`DROPDOWN`,`EMAIL`,`LEGAL`,`NUMBER`,`PASSWORD`,`TEL`,`TEXT`,`URL`]),Ln=f.z.object({id:f.z.string(),type:f.z.literal(`submit`),label:f.z.string(),className:f.z.string().optional(),disabled:f.z.boolean().optional().default(!1),order:f.z.number().optional(),visible:f.z.boolean().optional().default(!0),customizations:f.z.record(f.z.string(),f.z.any()).optional()}),Rn=f.z.object({x:f.z.number(),y:f.z.number()}),zn=f.z.object({id:f.z.string(),type:f.z.literal(`FLOW`),coordinates:Rn,alias:f.z.string().min(1).max(150).optional(),config:f.z.object({flow_id:f.z.string().max(30),next_node:f.z.string().optional()})}),Bn=f.z.object({id:f.z.string(),type:f.z.literal(`ROUTER`),coordinates:Rn,alias:f.z.string().min(1).max(150),config:f.z.object({rules:f.z.array(f.z.object({id:f.z.string(),alias:f.z.string().min(1).max(150).optional(),condition:f.z.any(),next_node:f.z.string()})),fallback:f.z.string()})}),Vn=f.z.object({id:f.z.string(),type:f.z.literal(`STEP`),coordinates:Rn,alias:f.z.string().min(1).max(150).optional(),config:f.z.object({components:f.z.array(Fn),next_node:f.z.string().optional()})}),Hn=f.z.discriminatedUnion(`type`,[zn,Bn,Vn]),Un=f.z.object({name:f.z.string().openapi({description:`The name of the form`}),messages:f.z.object({errors:f.z.record(f.z.string(),f.z.any()).optional(),custom:f.z.record(f.z.string(),f.z.any()).optional()}).optional(),languages:f.z.object({primary:f.z.string().optional(),default:f.z.string().optional()}).optional(),translations:f.z.record(f.z.string(),f.z.any()).optional(),nodes:f.z.array(Hn).optional(),start:f.z.object({hidden_fields:f.z.array(f.z.object({key:f.z.string(),value:f.z.string()})).optional(),next_node:f.z.string().optional(),coordinates:Rn.optional()}).optional(),ending:f.z.object({redirection:f.z.object({delay:f.z.number().optional(),target:f.z.string().optional()}).optional(),after_submit:f.z.object({flow_id:f.z.string().optional()}).optional(),coordinates:Rn.optional(),resume_flow:f.z.boolean().optional()}).optional(),style:f.z.object({css:f.z.string().optional()}).optional(),links:f.z.object({sdkSrc:f.z.string().optional(),sdk_src:f.z.string().optional()}).optional()}).openapi({description:`Schema for flow-based forms (matches Auth0 Forms structure)`}),Wn=g.extend(Un.shape).extend({id:f.z.string()}),Gn=f.z.object({id:f.z.number().optional(),text:f.z.string(),type:f.z.enum([`info`,`error`,`success`,`warning`])}),Kn=f.z.object({id:f.z.string().optional(),text:f.z.string(),href:f.z.string(),linkText:f.z.string().optional()}),qn=f.z.object({"form-content-start":f.z.string().optional(),"form-content-end":f.z.string().optional(),"form-footer-start":f.z.string().optional(),"form-footer-end":f.z.string().optional(),"secondary-actions-start":f.z.string().optional(),"secondary-actions-end":f.z.string().optional()}).strict(),Jn=f.z.object({name:f.z.string().optional(),action:f.z.string(),method:f.z.enum([`POST`,`GET`]),title:f.z.string().optional(),description:f.z.string().optional(),components:f.z.array(Fn),messages:f.z.array(Gn).optional(),links:f.z.array(Kn).optional(),partials:qn.optional(),footer:f.z.string().optional()});function Yn(e){return e.category===`BLOCK`}function Xn(e){return e.category===`WIDGET`}function Zn(e){return e.category===`FIELD`}var Qn=f.z.enum([`pre-user-registration`,`post-user-registration`,`post-user-login`,`post-user-update`,`validate-registration-username`,`pre-user-deletion`,`post-user-deletion`]),$n=f.z.enum([`post-user-login`]),er=f.z.enum([`post-user-login`,`post-user-registration`,`post-user-update`,`credentials-exchange`]),tr=f.z.enum([`validate-registration-username`,`post-user-login`,`credentials-exchange`,`pre-user-registration`,`post-user-registration`,`pre-user-update`,`post-user-update`,`pre-user-deletion`,`post-user-deletion`,`pre-screen`,`custom-email-provider`,`custom-phone-provider`]),nr=f.z.enum([`post-user-login`]),rr=[{field:`url`,triggers:Qn.options},{field:`form_id`,triggers:$n.options},{field:`template_id`,triggers:er.options},{field:`code_id`,triggers:tr.options},{field:`page_id`,triggers:nr.options}];function ir(e){if(!(!e||typeof e!=`object`)){for(let t of rr)if(typeof Reflect.get(e,t.field)==`string`)return t.triggers}}var ar=f.z.enum([`impersonate`]),or=f.z.enum([`ensure-username`,`set-preferred-username`,`account-linking`]),sr={"ensure-username":{name:`Ensure Username`,description:`Automatically assigns a username to users who sign in without one. Creates a linked username account for social/email users.`,trigger_ids:[`post-user-login`]},"set-preferred-username":{name:`Set Preferred Username`,description:`Sets the preferred_username claim on tokens based on the username from the primary or linked user.`,trigger_ids:[`credentials-exchange`]},"account-linking":{name:`Account Linking`,description:`Links a user to an existing primary account with the same verified email. Idempotent — safe to run on every login, registration, and email update.`,trigger_ids:[`post-user-login`,`post-user-registration`,`post-user-update`]}},cr={enabled:f.z.boolean().default(!1),synchronous:f.z.boolean().default(!1),priority:f.z.number().optional(),hook_id:f.z.string().optional(),metadata:f.z.record(f.z.string(),f.z.unknown()).optional(),...y},lr=f.z.object({...cr,trigger_id:Qn,url:f.z.string()}),ur=f.z.object({...cr,trigger_id:$n,form_id:f.z.string()}),dr=f.z.object({...cr,trigger_id:er,template_id:or}),fr=f.z.object({...cr,trigger_id:tr,code_id:f.z.string()}),pr=f.z.object({...cr,trigger_id:nr,page_id:ar,permission_required:f.z.string().optional()}),mr=f.z.union([lr,ur,dr,fr,pr]),hr=f.z.object({...cr,trigger_id:Qn}).extend(g.shape).extend({hook_id:f.z.string(),url:f.z.string()}),gr=f.z.object({...cr,trigger_id:$n}).extend(g.shape).extend({hook_id:f.z.string(),form_id:f.z.string()}),_r=f.z.object({...cr,trigger_id:er}).extend(g.shape).extend({hook_id:f.z.string(),template_id:or}),vr=f.z.object({...cr,trigger_id:tr}).extend(g.shape).extend({hook_id:f.z.string(),code_id:f.z.string()}),yr=f.z.object({...cr,trigger_id:nr}).extend(g.shape).extend({hook_id:f.z.string(),page_id:ar,permission_required:f.z.string().optional()}),br=f.z.union([hr,gr,_r,vr,yr]),xr=f.z.object({code:f.z.string().max(1e5),secrets:f.z.record(f.z.string(),f.z.string()).optional()}),Sr=xr.extend({id:f.z.string(),tenant_id:f.z.string()}).extend(g.shape),Cr=f.z.object({name:f.z.string().optional()}),wr=f.z.object({email:f.z.string().optional()}),Tr=f.z.object({id:f.z.string().optional(),organization_id:f.z.string().max(50),inviter:Cr,invitee:wr,invitation_url:f.z.string().url(),client_id:f.z.string(),connection_id:f.z.string().optional(),app_metadata:f.z.record(f.z.string(),f.z.any()).default({}).optional(),user_metadata:f.z.record(f.z.string(),f.z.any()).default({}).optional(),ttl_sec:f.z.number().int().max(2592e3).default(604800).optional(),roles:f.z.array(f.z.string()).default([]).optional(),send_invitation_email:f.z.boolean().default(!0).optional()}),Er=f.z.object({id:f.z.string(),organization_id:f.z.string().max(50),created_at:f.z.string().datetime(),expires_at:f.z.string().datetime(),ticket_id:f.z.string().optional()}).extend(Tr.omit({id:!0}).shape),Dr=f.z.object({alg:f.z.enum([`RS256`,`RS384`,`RS512`,`ES256`,`ES384`,`ES512`,`HS256`,`HS384`,`HS512`]).optional(),kid:f.z.string().optional(),kty:f.z.enum([`RSA`,`EC`,`oct`]),use:f.z.enum([`sig`,`enc`]).optional(),n:f.z.string().optional(),e:f.z.string().optional(),crv:f.z.string().optional(),x:f.z.string().optional(),y:f.z.string().optional(),x5t:f.z.string().optional(),"x5t#S256":f.z.string().optional(),x5c:f.z.array(f.z.string()).optional()}).superRefine((e,t)=>{if(e.kty===`RSA`)for(let n of[`n`,`e`])e[n]||t.addIssue({code:f.z.ZodIssueCode.custom,path:[n],message:`RSA JWK is missing required member '${n}'`});else if(e.kty===`EC`)for(let n of[`crv`,`x`,`y`])e[n]||t.addIssue({code:f.z.ZodIssueCode.custom,path:[n],message:`EC JWK is missing required member '${n}'`})}),Or=f.z.object({keys:f.z.array(Dr)}),kr=f.z.object({issuer:f.z.string(),authorization_endpoint:f.z.string(),token_endpoint:f.z.string(),device_authorization_endpoint:f.z.string().optional(),userinfo_endpoint:f.z.string(),jwks_uri:f.z.string(),registration_endpoint:f.z.string().optional(),revocation_endpoint:f.z.string(),end_session_endpoint:f.z.string().optional(),scopes_supported:f.z.array(f.z.string()),response_types_supported:f.z.array(f.z.string()),grant_types_supported:f.z.array(f.z.string()).optional(),code_challenge_methods_supported:f.z.array(f.z.string()),response_modes_supported:f.z.array(f.z.string()),subject_types_supported:f.z.array(f.z.string()),id_token_signing_alg_values_supported:f.z.array(f.z.string()),token_endpoint_auth_methods_supported:f.z.array(f.z.string()),claims_supported:f.z.array(f.z.string()),request_uri_parameter_supported:f.z.boolean(),request_parameter_supported:f.z.boolean(),claims_parameter_supported:f.z.boolean().optional(),request_object_signing_alg_values_supported:f.z.array(f.z.string()).optional(),token_endpoint_auth_signing_alg_values_supported:f.z.array(f.z.string()),client_id_metadata_document_supported:f.z.boolean().optional(),backchannel_logout_supported:f.z.boolean().optional(),backchannel_logout_session_supported:f.z.boolean().optional()}),T=function(e){return e.PENDING=`pending`,e.AUTHENTICATED=`authenticated`,e.AWAITING_EMAIL_VERIFICATION=`awaiting_email_verification`,e.AWAITING_MFA=`awaiting_mfa`,e.AWAITING_HOOK=`awaiting_hook`,e.AWAITING_CONTINUATION=`awaiting_continuation`,e.AWAITING_CONSENT=`awaiting_consent`,e.COMPLETED=`completed`,e.FAILED=`failed`,e.EXPIRED=`expired`,e}({}),Ar=f.z.nativeEnum(T),jr=f.z.object({strategy:f.z.string(),strategy_type:f.z.string()}),Mr=f.z.object({csrf_token:f.z.string(),auth0Client:f.z.string().optional(),authParams:Pt,expires_at:f.z.string(),deleted_at:f.z.string().optional(),ip:f.z.string().optional(),useragent:f.z.string().optional(),session_id:f.z.string().optional(),authorization_url:f.z.string().optional(),state:Ar.optional().default(`pending`),state_data:f.z.string().optional(),failure_reason:f.z.string().optional(),user_id:f.z.string().optional(),auth_connection:f.z.string().optional(),auth_strategy:jr.optional(),authenticated_at:f.z.string().optional()}).openapi({description:`This represents a login sesion`}),Nr=Mr.extend({id:f.z.string().openapi({description:`This is is used as the state in the universal login`}),created_at:f.z.string(),updated_at:f.z.string(),tenant_id:f.z.string().optional()}),E={ACLS_SUMMARY:`acls_summary`,ACTIONS_EXECUTION_FAILED:`actions_execution_failed`,API_LIMIT:`api_limit`,API_LIMIT_WARNING:`api_limit_warning`,APPI:`appi`,CIBA_EXCHANGE_FAILED:`ciba_exchange_failed`,CIBA_EXCHANGE_SUCCEEDED:`ciba_exchange_succeeded`,CIBA_START_FAILED:`ciba_start_failed`,CIBA_START_SUCCEEDED:`ciba_start_succeeded`,CODE_LINK_SENT:`cls`,CODE_SENT:`cs`,DEPRECATION_NOTICE:`depnote`,CONFIG_INHERITANCE_DIFF:`cfgdiff`,CONFIG_DRIFT:`cfgdrift`,FAILED_LOGIN:`f`,FAILED_BY_CONNECTOR:`fc`,FAILED_CHANGE_EMAIL:`fce`,FAILED_BY_CORS:`fco`,FAILED_CROSS_ORIGIN_AUTHENTICATION:`fcoa`,FAILED_CHANGE_PASSWORD:`fcp`,FAILED_POST_CHANGE_PASSWORD_HOOK:`fcph`,FAILED_CHANGE_PHONE_NUMBER:`fcpn`,FAILED_CHANGE_PASSWORD_REQUEST:`fcpr`,FAILED_CONNECTOR_PROVISIONING:`fcpro`,FAILED_CHANGE_USERNAME:`fcu`,FAILED_DELEGATION:`fd`,FAILED_DEVICE_ACTIVATION:`fdeac`,FAILED_DEVICE_AUTHORIZATION_REQUEST:`fdeaz`,USER_CANCELED_DEVICE_CONFIRMATION:`fdecc`,FAILED_USER_DELETION:`fdu`,FAILED_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN:`feacft`,FAILED_EXCHANGE_ACCESS_TOKEN_FOR_CLIENT_CREDENTIALS:`feccft`,FAILED_EXCHANGE_CUSTOM_TOKEN:`fecte`,FAILED_EXCHANGE_DEVICE_CODE_FOR_ACCESS_TOKEN:`fede`,FAILED_FEDERATED_LOGOUT:`federated_logout_failed`,FAILED_EXCHANGE_NATIVE_SOCIAL_LOGIN:`fens`,FAILED_EXCHANGE_PASSWORD_OOB_FOR_ACCESS_TOKEN:`feoobft`,FAILED_EXCHANGE_PASSWORD_OTP_FOR_ACCESS_TOKEN:`feotpft`,FAILED_EXCHANGE_PASSWORD_FOR_ACCESS_TOKEN:`fepft`,FAILED_EXCHANGE_PASSWORDLESS_OTP_FOR_ACCESS_TOKEN:`fepotpft`,FAILED_EXCHANGE_PASSWORD_MFA_RECOVERY_FOR_ACCESS_TOKEN:`fercft`,FAILED_EXCHANGE_ROTATING_REFRESH_TOKEN:`ferrt`,FAILED_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN:`fertft`,FAILED_EXCHANGE_SUBJECT_TOKEN_FOR_ACCESS_TOKEN:`festft`,FAILED_HOOK:`fh`,FAILED_IMPERSONATION:`fimp`,FAILED_INVITE_ACCEPT:`fi`,FAILED_LOGOUT:`flo`,FLOWS_EXECUTION_COMPLETED:`flows_execution_completed`,FLOWS_EXECUTION_FAILED:`flows_execution_failed`,FAILED_SENDING_NOTIFICATION:`fn`,FORMS_SUBMISSION_FAILED:`forms_submission_failed`,FORMS_SUBMISSION_SUCCEEDED:`forms_submission_succeeded`,FAILED_LOGIN_INCORRECT_PASSWORD:`fp`,FAILED_PUSHED_AUTHORIZATION_REQUEST:`fpar`,FAILED_POST_USER_REGISTRATION_HOOK:`fpurh`,FAILED_SIGNUP:`fs`,FAILED_SILENT_AUTH:`fsa`,FAILED_LOGIN_INVALID_EMAIL_USERNAME:`fu`,FAILED_USERS_IMPORT:`fui`,FAILED_VERIFICATION_EMAIL:`fv`,FAILED_VERIFICATION_EMAIL_REQUEST:`fvr`,EMAIL_VERIFICATION_CONFIRMED:`gd_auth_email_verification`,EMAIL_VERIFICATION_FAILED:`gd_auth_fail_email_verification`,MFA_AUTH_FAILED:`gd_auth_failed`,MFA_AUTH_REJECTED:`gd_auth_rejected`,MFA_AUTH_SUCCESS:`gd_auth_succeed`,MFA_ENROLLMENT_COMPLETE:`gd_enrollment_complete`,TOO_MANY_MFA_FAILURES:`gd_otp_rate_limit_exceed`,MFA_RECOVERY_FAILED:`gd_recovery_failed`,MFA_RECOVERY_RATE_LIMIT_EXCEED:`gd_recovery_rate_limit_exceed`,MFA_RECOVERY_SUCCESS:`gd_recovery_succeed`,MFA_EMAIL_SENT:`gd_send_email`,EMAIL_VERIFICATION_SENT:`gd_send_email_verification`,EMAIL_VERIFICATION_SEND_FAILURE:`gd_send_email_verification_failure`,PUSH_NOTIFICATION_SENT:`gd_send_pn`,ERROR_SENDING_MFA_PUSH_NOTIFICATION:`gd_send_pn_failure`,MFA_SMS_SENT:`gd_send_sms`,ERROR_SENDING_MFA_SMS:`gd_send_sms_failure`,MFA_VOICE_CALL_SUCCESS:`gd_send_voice`,MFA_VOICE_CALL_FAILED:`gd_send_voice_failure`,SECOND_FACTOR_STARTED:`gd_start_auth`,MFA_ENROLL_STARTED:`gd_start_enroll`,MFA_ENROLLMENT_FAILED:`gd_start_enroll_failed`,GUARDIAN_TENANT_UPDATE:`gd_tenant_update`,UNENROLL_DEVICE_ACCOUNT:`gd_unenroll`,UPDATE_DEVICE_ACCOUNT:`gd_update_device_account`,WEBAUTHN_CHALLENGE_FAILED:`gd_webauthn_challenge_failed`,WEBAUTHN_ENROLLMENT_FAILED:`gd_webauthn_enrollment_failed`,FAILED_KMS_API_OPERATION:`kms_key_management_failure`,SUCCESS_KMS_API_OPERATION:`kms_key_management_success`,KMS_KEY_STATE_CHANGED:`kms_key_state_changed`,TOO_MANY_CALLS_TO_DELEGATION:`limit_delegation`,BLOCKED_IP_ADDRESS:`limit_mu`,BLOCKED_ACCOUNT_IP:`limit_sul`,BLOCKED_ACCOUNT_EMAIL:`limit_wc`,INFORMATION:`i`,MFA_REQUIRED:`mfar`,MANAGEMENT_API_READ_OPERATION:`mgmt_api_read`,FAILED_AUTHENTICATION_METHOD_OPERATION_MY_ACCOUNT:`my_account_authentication_method_failed`,SUCCESSFUL_AUTHENTICATION_METHOD_OPERATION_MY_ACCOUNT:`my_account_authentication_method_succeeded`,FAILED_OIDC_BACKCHANNEL_LOGOUT:`oidc_backchannel_logout_failed`,SUCCESSFUL_OIDC_BACKCHANNEL_LOGOUT:`oidc_backchannel_logout_succeeded`,ORGANIZATION_MEMBER_ADDED:`organization_member_added`,PASSKEY_CHALLENGE_FAILED:`passkey_challenge_failed`,PASSKEY_CHALLENGE_STARTED:`passkey_challenge_started`,PRE_LOGIN_ASSESSMENT:`pla`,BREACHED_PASSWORD:`pwd_leak`,BREACHED_PASSWORD_ON_RESET:`reset_pwd_leak`,SUCCESS_RESOURCE_CLEANUP:`resource_cleanup`,RICH_CONSENTS_ACCESS_ERROR:`rich_consents_access_error`,SUCCESS_LOGIN:`s`,SUCCESS_API_OPERATION:`sapi`,FAILED_API_OPERATION:`fapi`,SUCCESS_CHANGE_EMAIL:`sce`,SUCCESS_CROSS_ORIGIN_AUTHENTICATION:`scoa`,SUCCESS_CHANGE_PASSWORD:`scp`,SUCCESS_CHANGE_PHONE_NUMBER:`scpn`,SUCCESS_CHANGE_PASSWORD_REQUEST:`scpr`,SUCCESS_CHANGE_USERNAME:`scu`,SUCCESS_CREDENTIAL_VALIDATION:`scv`,SUCCESS_DELEGATION:`sd`,SUCCESS_USER_DELETION:`sdu`,SUCCESS_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN:`seacft`,SUCCESS_EXCHANGE_ACCESS_TOKEN_FOR_CLIENT_CREDENTIALS:`seccft`,SUCCESS_EXCHANGE_CUSTOM_TOKEN:`secte`,SUCCESS_EXCHANGE_DEVICE_CODE_FOR_ACCESS_TOKEN:`sede`,SUCCESS_EXCHANGE_NATIVE_SOCIAL_LOGIN:`sens`,SUCCESS_EXCHANGE_PASSWORD_OOB_FOR_ACCESS_TOKEN:`seoobft`,SUCCESS_EXCHANGE_PASSWORD_OTP_FOR_ACCESS_TOKEN:`seotpft`,SUCCESS_EXCHANGE_PASSWORDLESS_OTP_FOR_ACCESS_TOKEN:`sepotpft`,SUCCESS_EXCHANGE_PASSWORD_FOR_ACCESS_TOKEN:`sepft`,SUCCESS_EXCHANGE_PASSKEY_OOB_FOR_ACCESS_TOKEN:`sepkoobft`,SUCCESS_EXCHANGE_PASSKEY_OTP_FOR_ACCESS_TOKEN:`sepkotpft`,SUCCESS_EXCHANGE_PASSKEY_MFA_RECOVERY_FOR_ACCESS_TOKEN:`sepkrcft`,SUCCESS_EXCHANGE_PASSWORD_MFA_RECOVERY_FOR_ACCESS_TOKEN:`sercft`,SUCCESS_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN:`sertft`,SUCCESS_EXCHANGE_SUBJECT_TOKEN_FOR_ACCESS_TOKEN:`sestft`,SUCCESS_IMPERSONATION:`simp`,SUCCESSFULLY_ACCEPTED_USER_INVITE:`si`,BREACHED_PASSWORD_ON_SIGNUP:`signup_pwd_leak`,SUCCESS_LOGOUT:`slo`,SUCCESS_HOOK:`sh`,SUCCESS_PASSWORD_MIGRATION:`spm`,SUCCESS_REVOCATION:`srrt`,SUCCESS_SIGNUP:`ss`,FAILED_SS_SSO_OPERATION:`ss_sso_failure`,INFORMATION_FROM_SS_SSO_OPERATION:`ss_sso_info`,SUCCESS_SS_SSO_OPERATION:`ss_sso_success`,SUCCESS_SILENT_AUTH:`ssa`,SUCCESSFUL_SCIM_OPERATION:`sscim`,SUCCESSFULLY_IMPORTED_USERS:`sui`,SUCCESS_VERIFICATION_EMAIL:`sv`,SUCCESS_VERIFICATION_EMAIL_REQUEST:`svr`,MAX_AMOUNT_OF_AUTHENTICATORS:`too_many_records`,USER_LOGIN_BLOCK_RELEASED:`ublkdu`,FAILED_UNIVERSAL_LOGOUT:`universal_logout_failed`,SUCCESSFUL_UNIVERSAL_LOGOUT:`universal_logout_succeeded`,WARNING_DURING_LOGIN:`w`,WARNING_SENDING_NOTIFICATION:`wn`,WARNING_USER_MANAGEMENT:`wum`},Pr=f.z.string().refine(e=>Object.values(E).includes(e),{message:`Invalid log type`}),Fr={[E.ACLS_SUMMARY]:`ACLs Summary`,[E.ACTIONS_EXECUTION_FAILED]:`Actions Execution Failed`,[E.API_LIMIT]:`API Rate Limit Reached`,[E.API_LIMIT_WARNING]:`API Rate Limit Warning`,[E.APPI]:`API Operation`,[E.CIBA_EXCHANGE_FAILED]:`CIBA Exchange Failed`,[E.CIBA_EXCHANGE_SUCCEEDED]:`CIBA Exchange Succeeded`,[E.CIBA_START_FAILED]:`CIBA Start Failed`,[E.CIBA_START_SUCCEEDED]:`CIBA Start Succeeded`,[E.CODE_LINK_SENT]:`Code/Link Sent`,[E.CODE_SENT]:`Code Sent`,[E.DEPRECATION_NOTICE]:`Deprecation Notice`,[E.CONFIG_INHERITANCE_DIFF]:`Config Inheritance Shadow Difference`,[E.CONFIG_DRIFT]:`Config Drift`,[E.FAILED_LOGIN]:`Failed Login`,[E.FAILED_BY_CONNECTOR]:`Failed by Connector`,[E.FAILED_CHANGE_EMAIL]:`Failed Change Email`,[E.FAILED_BY_CORS]:`Failed by CORS`,[E.FAILED_CROSS_ORIGIN_AUTHENTICATION]:`Failed Cross Origin Authentication`,[E.FAILED_CHANGE_PASSWORD]:`Failed Change Password`,[E.FAILED_POST_CHANGE_PASSWORD_HOOK]:`Failed Post-Change Password Hook`,[E.FAILED_CHANGE_PHONE_NUMBER]:`Failed Change Phone Number`,[E.FAILED_CHANGE_PASSWORD_REQUEST]:`Failed Change Password Request`,[E.FAILED_CONNECTOR_PROVISIONING]:`Failed Connector Provisioning`,[E.FAILED_CHANGE_USERNAME]:`Failed Change Username`,[E.FAILED_DELEGATION]:`Failed Delegation`,[E.FAILED_DEVICE_ACTIVATION]:`Failed Device Activation`,[E.FAILED_DEVICE_AUTHORIZATION_REQUEST]:`Failed Device Authorization Request`,[E.USER_CANCELED_DEVICE_CONFIRMATION]:`User Canceled Device Confirmation`,[E.FAILED_USER_DELETION]:`Failed User Deletion`,[E.FAILED_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN]:`Failed Exchange Authorization Code for Access Token`,[E.FAILED_EXCHANGE_ACCESS_TOKEN_FOR_CLIENT_CREDENTIALS]:`Failed Exchange Access Token for Client Credentials`,[E.FAILED_EXCHANGE_CUSTOM_TOKEN]:`Failed Exchange Custom Token`,[E.FAILED_EXCHANGE_DEVICE_CODE_FOR_ACCESS_TOKEN]:`Failed Exchange Device Code for Access Token`,[E.FAILED_FEDERATED_LOGOUT]:`Failed Federated Logout`,[E.FAILED_EXCHANGE_NATIVE_SOCIAL_LOGIN]:`Failed Exchange Native Social Login`,[E.FAILED_EXCHANGE_PASSWORD_OOB_FOR_ACCESS_TOKEN]:`Failed Exchange Password OOB for Access Token`,[E.FAILED_EXCHANGE_PASSWORD_OTP_FOR_ACCESS_TOKEN]:`Failed Exchange Password OTP for Access Token`,[E.FAILED_EXCHANGE_PASSWORD_FOR_ACCESS_TOKEN]:`Failed Exchange Password for Access Token`,[E.FAILED_EXCHANGE_PASSWORDLESS_OTP_FOR_ACCESS_TOKEN]:`Failed Exchange Passwordless OTP for Access Token`,[E.FAILED_EXCHANGE_PASSWORD_MFA_RECOVERY_FOR_ACCESS_TOKEN]:`Failed Exchange Password MFA Recovery for Access Token`,[E.FAILED_EXCHANGE_ROTATING_REFRESH_TOKEN]:`Failed Exchange Rotating Refresh Token`,[E.FAILED_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN]:`Failed Exchange Refresh Token for Access Token`,[E.FAILED_EXCHANGE_SUBJECT_TOKEN_FOR_ACCESS_TOKEN]:`Failed Exchange Subject Token for Access Token`,[E.FAILED_HOOK]:`Failed Hook`,[E.FAILED_IMPERSONATION]:`Failed Impersonation`,[E.FAILED_INVITE_ACCEPT]:`Failed Invite Accept`,[E.FAILED_LOGOUT]:`Failed Logout`,[E.FLOWS_EXECUTION_COMPLETED]:`Flows Execution Completed`,[E.FLOWS_EXECUTION_FAILED]:`Flows Execution Failed`,[E.FAILED_SENDING_NOTIFICATION]:`Failed Sending Notification`,[E.FORMS_SUBMISSION_FAILED]:`Forms Submission Failed`,[E.FORMS_SUBMISSION_SUCCEEDED]:`Forms Submission Succeeded`,[E.FAILED_LOGIN_INCORRECT_PASSWORD]:`Failed Login - Incorrect Password`,[E.FAILED_PUSHED_AUTHORIZATION_REQUEST]:`Failed Pushed Authorization Request`,[E.FAILED_POST_USER_REGISTRATION_HOOK]:`Failed Post-User Registration Hook`,[E.FAILED_SIGNUP]:`Failed Signup`,[E.FAILED_SILENT_AUTH]:`Failed Silent Auth`,[E.FAILED_LOGIN_INVALID_EMAIL_USERNAME]:`Failed Login - Invalid Email/Username`,[E.FAILED_USERS_IMPORT]:`Failed Users Import`,[E.FAILED_VERIFICATION_EMAIL]:`Failed Verification Email`,[E.FAILED_VERIFICATION_EMAIL_REQUEST]:`Failed Verification Email Request`,[E.EMAIL_VERIFICATION_CONFIRMED]:`Email Verification Confirmed`,[E.EMAIL_VERIFICATION_FAILED]:`Email Verification Failed`,[E.MFA_AUTH_FAILED]:`MFA Auth Failed`,[E.MFA_AUTH_REJECTED]:`MFA Auth Rejected`,[E.MFA_AUTH_SUCCESS]:`MFA Auth Success`,[E.MFA_ENROLLMENT_COMPLETE]:`MFA Enrollment Complete`,[E.TOO_MANY_MFA_FAILURES]:`Too Many MFA Failures`,[E.MFA_RECOVERY_FAILED]:`MFA Recovery Failed`,[E.MFA_RECOVERY_RATE_LIMIT_EXCEED]:`MFA Recovery Rate Limit Exceeded`,[E.MFA_RECOVERY_SUCCESS]:`MFA Recovery Success`,[E.MFA_EMAIL_SENT]:`MFA Email Sent`,[E.EMAIL_VERIFICATION_SENT]:`Email Verification Sent`,[E.EMAIL_VERIFICATION_SEND_FAILURE]:`Email Verification Send Failure`,[E.PUSH_NOTIFICATION_SENT]:`Push Notification Sent`,[E.ERROR_SENDING_MFA_PUSH_NOTIFICATION]:`Error Sending MFA Push Notification`,[E.MFA_SMS_SENT]:`MFA SMS Sent`,[E.ERROR_SENDING_MFA_SMS]:`Error Sending MFA SMS`,[E.MFA_VOICE_CALL_SUCCESS]:`MFA Voice Call Success`,[E.MFA_VOICE_CALL_FAILED]:`MFA Voice Call Failed`,[E.SECOND_FACTOR_STARTED]:`Second Factor Started`,[E.MFA_ENROLL_STARTED]:`MFA Enroll Started`,[E.MFA_ENROLLMENT_FAILED]:`MFA Enrollment Failed`,[E.GUARDIAN_TENANT_UPDATE]:`Guardian Tenant Update`,[E.UNENROLL_DEVICE_ACCOUNT]:`Unenroll Device Account`,[E.UPDATE_DEVICE_ACCOUNT]:`Update Device Account`,[E.WEBAUTHN_CHALLENGE_FAILED]:`WebAuthn Challenge Failed`,[E.WEBAUTHN_ENROLLMENT_FAILED]:`WebAuthn Enrollment Failed`,[E.FAILED_KMS_API_OPERATION]:`Failed KMS API Operation`,[E.SUCCESS_KMS_API_OPERATION]:`Success KMS API Operation`,[E.KMS_KEY_STATE_CHANGED]:`KMS Key State Changed`,[E.TOO_MANY_CALLS_TO_DELEGATION]:`Too Many Calls to Delegation`,[E.BLOCKED_IP_ADDRESS]:`Blocked IP Address`,[E.BLOCKED_ACCOUNT_IP]:`Blocked Account (IP)`,[E.BLOCKED_ACCOUNT_EMAIL]:`Blocked Account (Email)`,[E.INFORMATION]:`Information`,[E.MFA_REQUIRED]:`MFA Required`,[E.MANAGEMENT_API_READ_OPERATION]:`Management API Read Operation`,[E.FAILED_AUTHENTICATION_METHOD_OPERATION_MY_ACCOUNT]:`Failed Authentication Method Operation (My Account)`,[E.SUCCESSFUL_AUTHENTICATION_METHOD_OPERATION_MY_ACCOUNT]:`Successful Authentication Method Operation (My Account)`,[E.FAILED_OIDC_BACKCHANNEL_LOGOUT]:`Failed OIDC Backchannel Logout`,[E.SUCCESSFUL_OIDC_BACKCHANNEL_LOGOUT]:`Successful OIDC Backchannel Logout`,[E.ORGANIZATION_MEMBER_ADDED]:`Organization Member Added`,[E.PASSKEY_CHALLENGE_FAILED]:`Passkey Challenge Failed`,[E.PASSKEY_CHALLENGE_STARTED]:`Passkey Challenge Started`,[E.PRE_LOGIN_ASSESSMENT]:`Pre-Login Assessment`,[E.BREACHED_PASSWORD]:`Breached Password`,[E.BREACHED_PASSWORD_ON_RESET]:`Breached Password on Reset`,[E.SUCCESS_RESOURCE_CLEANUP]:`Success Resource Cleanup`,[E.RICH_CONSENTS_ACCESS_ERROR]:`Rich Consents Access Error`,[E.SUCCESS_LOGIN]:`Success Login`,[E.SUCCESS_API_OPERATION]:`Success API Operation`,[E.FAILED_API_OPERATION]:`Failed API Operation`,[E.SUCCESS_CHANGE_EMAIL]:`Success Change Email`,[E.SUCCESS_CROSS_ORIGIN_AUTHENTICATION]:`Success Cross Origin Authentication`,[E.SUCCESS_CHANGE_PASSWORD]:`Success Change Password`,[E.SUCCESS_CHANGE_PHONE_NUMBER]:`Success Change Phone Number`,[E.SUCCESS_CHANGE_PASSWORD_REQUEST]:`Success Change Password Request`,[E.SUCCESS_CHANGE_USERNAME]:`Success Change Username`,[E.SUCCESS_CREDENTIAL_VALIDATION]:`Success Credential Validation`,[E.SUCCESS_DELEGATION]:`Success Delegation`,[E.SUCCESS_USER_DELETION]:`Success User Deletion`,[E.SUCCESS_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN]:`Success Exchange Authorization Code for Access Token`,[E.SUCCESS_EXCHANGE_ACCESS_TOKEN_FOR_CLIENT_CREDENTIALS]:`Success Exchange Access Token for Client Credentials`,[E.SUCCESS_EXCHANGE_CUSTOM_TOKEN]:`Success Exchange Custom Token`,[E.SUCCESS_EXCHANGE_DEVICE_CODE_FOR_ACCESS_TOKEN]:`Success Exchange Device Code for Access Token`,[E.SUCCESS_EXCHANGE_NATIVE_SOCIAL_LOGIN]:`Success Exchange Native Social Login`,[E.SUCCESS_EXCHANGE_PASSWORD_OOB_FOR_ACCESS_TOKEN]:`Success Exchange Password OOB for Access Token`,[E.SUCCESS_EXCHANGE_PASSWORD_OTP_FOR_ACCESS_TOKEN]:`Success Exchange Password OTP for Access Token`,[E.SUCCESS_EXCHANGE_PASSWORDLESS_OTP_FOR_ACCESS_TOKEN]:`Success Exchange Passwordless OTP for Access Token`,[E.SUCCESS_EXCHANGE_PASSWORD_FOR_ACCESS_TOKEN]:`Success Exchange Password for Access Token`,[E.SUCCESS_EXCHANGE_PASSKEY_OOB_FOR_ACCESS_TOKEN]:`Success Exchange Passkey OOB for Access Token`,[E.SUCCESS_EXCHANGE_PASSKEY_OTP_FOR_ACCESS_TOKEN]:`Success Exchange Passkey OTP for Access Token`,[E.SUCCESS_EXCHANGE_PASSKEY_MFA_RECOVERY_FOR_ACCESS_TOKEN]:`Success Exchange Passkey MFA Recovery for Access Token`,[E.SUCCESS_EXCHANGE_PASSWORD_MFA_RECOVERY_FOR_ACCESS_TOKEN]:`Success Exchange Password MFA Recovery for Access Token`,[E.SUCCESS_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN]:`Success Exchange Refresh Token for Access Token`,[E.SUCCESS_EXCHANGE_SUBJECT_TOKEN_FOR_ACCESS_TOKEN]:`Success Exchange Subject Token for Access Token`,[E.SUCCESS_IMPERSONATION]:`Success Impersonation`,[E.SUCCESSFULLY_ACCEPTED_USER_INVITE]:`Successfully Accepted User Invite`,[E.BREACHED_PASSWORD_ON_SIGNUP]:`Breached Password on Signup`,[E.SUCCESS_LOGOUT]:`Success Logout`,[E.SUCCESS_HOOK]:`Success Hook`,[E.SUCCESS_PASSWORD_MIGRATION]:`Success Password Migration`,[E.SUCCESS_REVOCATION]:`Success Revocation`,[E.SUCCESS_SIGNUP]:`Success Signup`,[E.FAILED_SS_SSO_OPERATION]:`Failed SS SSO Operation`,[E.INFORMATION_FROM_SS_SSO_OPERATION]:`Information from SS SSO Operation`,[E.SUCCESS_SS_SSO_OPERATION]:`Success SS SSO Operation`,[E.SUCCESS_SILENT_AUTH]:`Success Silent Auth`,[E.SUCCESSFUL_SCIM_OPERATION]:`Successful SCIM Operation`,[E.SUCCESSFULLY_IMPORTED_USERS]:`Successfully Imported Users`,[E.SUCCESS_VERIFICATION_EMAIL]:`Success Verification Email`,[E.SUCCESS_VERIFICATION_EMAIL_REQUEST]:`Success Verification Email Request`,[E.MAX_AMOUNT_OF_AUTHENTICATORS]:`Max Amount of Authenticators`,[E.USER_LOGIN_BLOCK_RELEASED]:`User Login Block Released`,[E.FAILED_UNIVERSAL_LOGOUT]:`Failed Universal Logout`,[E.SUCCESSFUL_UNIVERSAL_LOGOUT]:`Successful Universal Logout`,[E.WARNING_DURING_LOGIN]:`Warning During Login`,[E.WARNING_SENDING_NOTIFICATION]:`Warning Sending Notification`,[E.WARNING_USER_MANAGEMENT]:`Warning User Management`},Ir=(()=>{let e={};for(let[t,n]of Object.entries(E))t.startsWith(`SUCCESS_`)||t.startsWith(`SUCCESSFUL_`)||t.startsWith(`SUCCESSFULLY_`)||t.endsWith(`_SUCCEEDED`)||t.endsWith(`_COMPLETED`)?e[n]=`success`:t.startsWith(`FAILED_`)||t.startsWith(`ERROR_`)||t.startsWith(`BREACHED_`)||t.startsWith(`BLOCKED_`)||t===`MFA_AUTH_FAILED`||t===`MFA_AUTH_REJECTED`||t===`MFA_RECOVERY_FAILED`||t===`MFA_ENROLLMENT_FAILED`||t===`EMAIL_VERIFICATION_FAILED`||t===`WEBAUTHN_CHALLENGE_FAILED`||t===`WEBAUTHN_ENROLLMENT_FAILED`||t===`PASSKEY_CHALLENGE_FAILED`||t===`FLOWS_EXECUTION_FAILED`||t===`FORMS_SUBMISSION_FAILED`||t===`CIBA_EXCHANGE_FAILED`||t===`CIBA_START_FAILED`||t===`ACTIONS_EXECUTION_FAILED`||t===`RICH_CONSENTS_ACCESS_ERROR`||t===`USER_CANCELED_DEVICE_CONFIRMATION`||t===`TOO_MANY_MFA_FAILURES`||t===`MFA_RECOVERY_RATE_LIMIT_EXCEED`||t===`API_LIMIT`||t===`MAX_AMOUNT_OF_AUTHENTICATORS`?e[n]=`failure`:t.startsWith(`WARNING_`)||t===`API_LIMIT_WARNING`||t===`DEPRECATION_NOTICE`||t===`PRE_LOGIN_ASSESSMENT`?e[n]=`warning`:t===`CODE_SENT`||t===`CODE_LINK_SENT`||t===`MFA_EMAIL_SENT`||t===`MFA_SMS_SENT`||t===`EMAIL_VERIFICATION_SENT`||t===`PUSH_NOTIFICATION_SENT`?e[n]=`code_sent`:t===`INFORMATION`||t===`INFORMATION_FROM_SS_SSO_OPERATION`||t===`MANAGEMENT_API_READ_OPERATION`||t===`APPI`||t===`CONFIG_INHERITANCE_DIFF`||t===`CONFIG_DRIFT`||t===`ACLS_SUMMARY`||t===`ORGANIZATION_MEMBER_ADDED`?e[n]=`info`:e[n]=`other`;return e})();function Lr(e){return Fr[e]??e}function Rr(e){return Ir[e]??`other`}var zr=f.z.object({name:f.z.string(),version:f.z.string(),env:f.z.object({node:f.z.string().optional()}).optional()}),Br=f.z.object({country_code:f.z.string().length(2),city_name:f.z.string(),latitude:f.z.string(),longitude:f.z.string(),time_zone:f.z.string(),continent_code:f.z.string()}),Vr=f.z.object({type:Pr,date:f.z.string(),description:f.z.string().optional(),ip:f.z.string().optional(),user_agent:f.z.string().optional(),details:f.z.any().optional(),isMobile:f.z.boolean(),user_id:f.z.string().optional(),user_name:f.z.string().optional(),connection:f.z.string().optional(),connection_id:f.z.string().optional(),client_id:f.z.string().optional(),client_name:f.z.string().optional(),audience:f.z.string().optional(),scope:f.z.string().optional(),strategy:f.z.string().optional(),strategy_type:f.z.string().optional(),hostname:f.z.string().optional(),auth0_client:zr.optional(),log_id:f.z.string().optional(),location_info:Br.optional()}),Hr=Vr.extend({log_id:f.z.string()}),Ur=f.z.enum([`http`,`eventbridge`,`eventgrid`,`splunk`,`datadog`,`sumo`,`firehose`]),Wr=f.z.enum([`active`,`paused`,`suspended`]),Gr=f.z.object({type:f.z.string(),name:f.z.string()}),Kr=f.z.object({name:f.z.string(),type:Ur,status:Wr.optional(),sink:f.z.record(f.z.string(),f.z.unknown()),filters:f.z.array(Gr).optional(),isPriority:f.z.boolean().optional()}),qr=Kr.extend({id:f.z.string(),status:Wr,created_at:f.z.string().optional(),updated_at:f.z.string().optional()}),Jr=f.z.enum([`auth0`,`cognito`,`okta`,`oidc`]),Yr=f.z.object({domain:f.z.string(),client_id:f.z.string(),client_secret:We(),audience:f.z.string().optional(),scope:f.z.string().optional()}),Xr=f.z.object({id:f.z.string().optional(),name:f.z.string(),provider:Jr,connection:f.z.string(),enabled:f.z.boolean().default(!0),credentials:Yr}),Zr=f.z.object({id:f.z.string(),created_at:f.z.string(),updated_at:f.z.string()}).extend(Xr.shape),Qr=f.z.object({enabled:f.z.boolean().optional(),shields:f.z.array(f.z.string()).optional(),admin_notification_frequency:f.z.array(f.z.string()).optional(),method:f.z.string().optional(),stage:f.z.object({"pre-user-registration":f.z.object({shields:f.z.array(f.z.string()).optional()}).optional(),"pre-change-password":f.z.object({shields:f.z.array(f.z.string()).optional()}).optional()}).optional()}),$r=f.z.object({enabled:f.z.boolean().optional(),shields:f.z.array(f.z.string()).optional(),allowlist:f.z.array(f.z.string()).optional(),mode:f.z.string().optional(),max_attempts:f.z.number().optional()}),ei=f.z.object({enabled:f.z.boolean().optional(),shields:f.z.array(f.z.string()).optional(),allowlist:f.z.array(f.z.string()).optional(),stage:f.z.object({"pre-login":f.z.object({max_attempts:f.z.number().optional(),rate:f.z.number().optional()}).optional(),"pre-user-registration":f.z.object({max_attempts:f.z.number().optional(),rate:f.z.number().optional()}).optional()}).optional()}),ti=f.z.object({breached_password_detection:Qr.optional(),brute_force_protection:$r.optional(),suspicious_ip_throttling:ei.optional()}),ni=f.z.object({id:f.z.string().optional(),user_id:f.z.string(),password:f.z.string(),algorithm:f.z.enum([`bcrypt`,`argon2id`]).default(`argon2id`),is_current:f.z.boolean().default(!0)}),ri=ni.extend({id:f.z.string(),created_at:f.z.string(),updated_at:f.z.string()}),ii=f.z.object({initial_user_agent:f.z.string().describe(`First user agent of the device from which this user logged in`),initial_ip:f.z.string().describe(`First IP address associated with this session`),initial_asn:f.z.string().describe(`First autonomous system number associated with this session`),last_user_agent:f.z.string().describe(`Last user agent of the device from which this user logged in`),last_ip:f.z.string().describe(`Last IP address from which this user logged in`),last_asn:f.z.string().describe(`Last autonomous system number from which this user logged in`)}),ai=f.z.object({name:f.z.string().describe(`Authentication method name, e.g. "mfa" for a completed second factor`),timestamp:f.z.string().describe(`When the method was completed (ISO 8601)`),type:f.z.string().optional().describe(`For "mfa": the authentication method type used, e.g. "totp", "phone", "passkey"`)}),oi=f.z.object({methods:f.z.array(ai)}),si=f.z.object({id:f.z.string(),revoked_at:f.z.string().optional(),used_at:f.z.string().optional(),user_id:f.z.string().describe(`The user ID associated with the session`),expires_at:f.z.string().optional(),login_session_id:f.z.string(),idle_expires_at:f.z.string().optional(),device:ii.describe(`Metadata related to the device used in the session`),clients:f.z.array(f.z.string()).describe(`List of client details for the session`),authentication:oi.optional().describe(`Authentication methods completed in this session (currently MFA only)`),session_transfer:$e.optional().describe(`Set when the session was created by redeeming a session_transfer_token`)}),ci=f.z.object({created_at:f.z.string(),updated_at:f.z.string(),authenticated_at:f.z.string(),last_interaction_at:f.z.string()}).extend(si.shape),li=f.z.object({kid:f.z.string().openapi({description:`The key id of the signing key`}),tenant_id:f.z.string().optional().openapi({description:`The tenant the key belongs to. Omitted means the key is shared / control-plane scoped.`}),cert:f.z.string().openapi({description:`The public certificate of the signing key`}),fingerprint:f.z.string().openapi({description:`The cert fingerprint`}),thumbprint:f.z.string().openapi({description:`The cert thumbprint`}),pkcs7:f.z.string().optional().openapi({description:`The private key in pkcs7 format`}),current:f.z.boolean().optional().openapi({description:`True if the key is the current key`}),next:f.z.boolean().optional().openapi({description:`True if the key is the next key`}),previous:f.z.boolean().optional().openapi({description:`True if the key is the previous key`}),current_since:f.z.string().optional().openapi({description:`The date and time when the key became the current key`}),current_until:f.z.string().optional().openapi({description:`The date and time when the current key was rotated`}),revoked:f.z.boolean().optional().openapi({description:`True if the key is revoked`}),revoked_at:f.z.string().optional().openapi({description:`The date and time when the key was revoked`}),connection:f.z.string().optional().openapi({description:`The connection identifier associated with the key`}),type:f.z.enum([`jwt_signing`,`saml_encryption`]).openapi({description:`The type of the signing key`})}),ui=f.z.enum([`never`,`always`,`all-applications`,`confidence-score`]),di=365,fi={allow_remember_browser:f.z.boolean().optional(),remember_browser_lifetime_in_days:f.z.number().int().min(1).max(365).optional()},pi=f.z.object({idle_session_lifetime:f.z.number().default(72),session_lifetime:f.z.number().default(168),session_cookie:f.z.object({mode:f.z.enum([`persistent`,`non-persistent`]).optional()}).optional(),enable_client_connections:f.z.boolean().optional(),default_redirection_uri:f.z.string().optional(),enabled_locales:f.z.array(f.z.string()).optional(),default_directory:f.z.string().optional(),error_page:f.z.object({html:f.z.string().optional(),show_log_link:f.z.boolean().optional(),url:f.z.string().optional()}).optional(),flags:f.z.object({allow_legacy_delegation_grant_types:f.z.boolean().optional(),allow_legacy_ro_grant_types:f.z.boolean().optional(),allow_legacy_tokeninfo_endpoint:f.z.boolean().optional(),disable_clickjack_protection_headers:f.z.boolean().optional(),enable_apis_section:f.z.boolean().optional(),enable_client_connections:f.z.boolean().optional(),enable_custom_domain_in_emails:f.z.boolean().optional(),enable_dynamic_client_registration:f.z.boolean().optional(),enable_idtoken_api2:f.z.boolean().optional(),enable_legacy_logs_search_v2:f.z.boolean().optional(),enable_legacy_profile:f.z.boolean().optional(),enable_pipeline2:f.z.boolean().optional(),enable_public_signup_user_exists_error:f.z.boolean().optional(),use_scope_descriptions_for_consent:f.z.boolean().optional(),disable_management_api_sms_obfuscation:f.z.boolean().optional(),enable_adfs_waad_email_verification:f.z.boolean().optional(),revoke_refresh_token_grant:f.z.boolean().optional(),dashboard_log_streams_next:f.z.boolean().optional(),dashboard_insights_view:f.z.boolean().optional(),disable_fields_map_fix:f.z.boolean().optional(),mfa_show_factor_list_on_enrollment:f.z.boolean().optional()}).optional(),friendly_name:f.z.string().optional(),picture_url:f.z.string().optional(),support_email:f.z.string().optional(),support_url:f.z.string().optional(),sandbox_version:f.z.string().optional(),sandbox_versions_available:f.z.array(f.z.string()).optional(),change_password:f.z.object({enabled:f.z.boolean(),html:f.z.string()}).optional(),guardian_mfa_page:f.z.object({enabled:f.z.boolean(),html:f.z.string()}).optional(),default_audience:f.z.string().optional(),default_organization:f.z.string().optional(),sessions:f.z.object({oidc_logout_prompt_enabled:f.z.boolean().optional()}).optional(),mfa:f.z.object({policy:ui.default(`never`).optional(),...fi,factors:f.z.object({sms:f.z.boolean().default(!1),otp:f.z.boolean().default(!1),email:f.z.boolean().default(!1),push_notification:f.z.boolean().default(!1),webauthn_roaming:f.z.boolean().default(!1),webauthn_platform:f.z.boolean().default(!1),recovery_code:f.z.boolean().default(!1),duo:f.z.boolean().default(!1)}).optional(),sms_provider:f.z.object({provider:f.z.enum([`twilio`,`vonage`,`aws_sns`,`phone_message_hook`]).optional()}).optional(),twilio:f.z.object({sid:We().optional(),auth_token:We().optional(),from:f.z.string().optional(),messaging_service_sid:f.z.string().optional()}).optional(),phone_message:f.z.object({message:f.z.string().optional()}).optional()}).optional()}),mi=f.z.object({id:f.z.string().optional(),parent_tenant_id:f.z.string().nullish(),config_sync:f.z.enum([`inherit-on-read`,`synced`,`detached`]).nullish(),config_sync_hash:f.z.string().nullish(),config_synced_at:f.z.string().nullish(),audience:f.z.string().optional(),friendly_name:f.z.string(),picture_url:f.z.string().optional(),support_email:f.z.string().optional(),support_url:f.z.string().optional(),sender_email:f.z.string().email().nullish(),sender_name:f.z.string().optional(),session_lifetime:f.z.number().optional(),idle_session_lifetime:f.z.number().optional(),ephemeral_session_lifetime:f.z.number().optional(),idle_ephemeral_session_lifetime:f.z.number().optional(),session_cookie:f.z.object({mode:f.z.enum([`persistent`,`non-persistent`]).optional()}).optional(),allowed_logout_urls:f.z.array(f.z.string()).optional(),default_redirection_uri:f.z.string().optional(),default_client_id:f.z.string().optional(),enabled_locales:f.z.array(f.z.string()).optional(),default_directory:f.z.string().optional(),error_page:f.z.object({html:f.z.string().optional(),show_log_link:f.z.boolean().optional(),url:f.z.string().optional()}).nullish(),flags:f.z.object({allow_changing_enable_sso:f.z.boolean().optional(),allow_legacy_delegation_grant_types:f.z.boolean().optional(),allow_legacy_ro_grant_types:f.z.boolean().optional(),allow_legacy_tokeninfo_endpoint:f.z.boolean().optional(),change_pwd_flow_v1:f.z.boolean().optional(),client_id_metadata_document_registration:f.z.boolean().optional(),custom_domains_provisioning:f.z.boolean().optional(),dashboard_insights_view:f.z.boolean().optional(),dashboard_log_streams_next:f.z.boolean().optional(),disable_clickjack_protection_headers:f.z.boolean().optional(),disable_fields_map_fix:f.z.boolean().optional(),disable_impersonation:f.z.boolean().optional(),disable_management_api_sms_obfuscation:f.z.boolean().optional(),enable_adfs_waad_email_verification:f.z.boolean().optional(),enable_apis_section:f.z.boolean().optional(),enable_client_connections:f.z.boolean().optional(),enable_custom_domain_in_emails:f.z.boolean().optional(),enable_dynamic_client_registration:f.z.boolean().optional(),dcr_require_initial_access_token:f.z.boolean().optional(),dcr_allowed_grant_types:f.z.array(f.z.string()).optional(),allow_http_return_to:f.z.array(f.z.string().refine(e=>{try{let t=new URL(e);return t.protocol===`http:`&&(t.pathname===``||t.pathname===`/`)&&!t.search&&!t.hash&&e===t.origin}catch{return!1}},{message:`must be a fully-qualified http origin (scheme + host + port, no path)`})).optional(),enable_idtoken_api2:f.z.boolean().optional(),enable_legacy_logs_search_v2:f.z.boolean().optional(),enable_legacy_profile:f.z.boolean().optional(),enable_pipeline2:f.z.boolean().optional(),enable_public_signup_user_exists_error:f.z.boolean().optional(),enable_sso:f.z.boolean().optional(),enforce_client_authentication_on_passwordless_start:f.z.boolean().optional(),genai_trial:f.z.boolean().optional(),improved_signup_bot_detection_in_classic:f.z.boolean().optional(),mfa_show_factor_list_on_enrollment:f.z.boolean().optional(),no_disclose_enterprise_connections:f.z.boolean().optional(),remove_alg_from_jwks:f.z.boolean().optional(),revoke_refresh_token_grant:f.z.boolean().optional(),trust_azure_adfs_email_verified_connection_property:f.z.boolean().optional(),use_scope_descriptions_for_consent:f.z.boolean().optional(),inherit_global_permissions_in_organizations:f.z.boolean().optional(),restrict_undefined_scopes:f.z.boolean().optional(),universal_login_version:f.z.enum([`1`,`2`]).optional()}).optional(),sandbox_version:f.z.string().optional(),legacy_sandbox_version:f.z.string().optional(),sandbox_versions_available:f.z.array(f.z.string()).optional(),change_password:f.z.object({enabled:f.z.boolean().optional(),html:f.z.string().optional()}).optional(),guardian_mfa_page:f.z.object({enabled:f.z.boolean().optional(),html:f.z.string().optional()}).optional(),device_flow:f.z.object({charset:f.z.enum([`base20`,`digits`]).optional(),mask:f.z.string().max(20).optional()}).optional(),default_token_quota:f.z.object({clients:f.z.object({client_credentials:f.z.record(f.z.string(),f.z.any()).optional()}).optional(),organizations:f.z.object({client_credentials:f.z.record(f.z.string(),f.z.any()).optional()}).optional()}).nullish(),default_audience:f.z.string().optional(),default_organization:f.z.string().optional(),sessions:f.z.object({oidc_logout_prompt_enabled:f.z.boolean().optional()}).optional(),oidc_logout:f.z.object({rp_logout_end_session_endpoint_discovery:f.z.boolean().optional()}).optional(),allow_organization_name_in_authentication_api:f.z.boolean().optional(),customize_mfa_in_postlogin_action:f.z.boolean().optional(),acr_values_supported:f.z.array(f.z.string()).optional(),mtls:f.z.object({enable_endpoint_aliases:f.z.boolean().optional()}).nullish(),pushed_authorization_requests_supported:f.z.boolean().optional(),authorization_response_iss_parameter_supported:f.z.boolean().optional(),deployment_type:f.z.enum([`shared`,`wfp`]).default(`shared`).optional(),provisioning_state:f.z.enum([`pending`,`ready`,`failed`]).default(`ready`).optional(),provisioning_error:f.z.string().max(2048).optional(),provisioning_state_changed_at:f.z.string().optional(),bundle_configuration:f.z.string().max(64).optional(),worker_version:f.z.string().max(64).optional(),database_version:f.z.string().max(64).optional(),worker_script_name:f.z.string().max(255).optional(),storage_kind:f.z.enum([`own_d1`,`existing_d1`,`shared_planetscale`]).optional(),d1_database_id:f.z.string().max(64).optional(),attack_protection:ti.optional(),mfa:f.z.object({policy:ui.default(`never`).optional(),...fi,factors:f.z.object({sms:f.z.boolean().default(!1),otp:f.z.boolean().default(!1),email:f.z.boolean().default(!1),push_notification:f.z.boolean().default(!1),webauthn_roaming:f.z.boolean().default(!1),webauthn_platform:f.z.boolean().default(!1),recovery_code:f.z.boolean().default(!1),duo:f.z.boolean().default(!1)}).optional(),sms_provider:f.z.object({provider:f.z.enum([`twilio`,`vonage`,`aws_sns`,`phone_message_hook`]).optional()}).optional(),twilio:f.z.object({sid:We().optional(),auth_token:We().optional(),from:f.z.string().optional(),messaging_service_sid:f.z.string().optional()}).optional(),phone_message:f.z.object({message:f.z.string().optional()}).optional()}).optional()}),hi=f.z.object({created_at:f.z.string().nullable().transform(e=>e??``),updated_at:f.z.string().nullable().transform(e=>e??``)}).extend(mi.shape).extend({id:f.z.string(),is_control_plane:f.z.boolean().optional(),has_children:f.z.boolean().optional()}),gi=mi.shape.mfa.unwrap().shape,_i=f.z.object({...gi,policy:ui.optional(),factors:f.z.object({sms:f.z.boolean().optional(),otp:f.z.boolean().optional(),email:f.z.boolean().optional(),push_notification:f.z.boolean().optional(),webauthn_roaming:f.z.boolean().optional(),webauthn_platform:f.z.boolean().optional(),recovery_code:f.z.boolean().optional(),duo:f.z.boolean().optional()}).optional()}),vi=f.z.object(mi.shape).extend({deployment_type:f.z.enum([`shared`,`wfp`]),provisioning_state:f.z.enum([`pending`,`ready`,`failed`]),mfa:_i}).partial(),yi=f.z.enum([`provision`,`seed`,`upgrade`,`backup`,`deprovision`,`users_import`,`sync-defaults`,`detach`,`tenant-members-request`]),bi=f.z.enum([`pending`,`running`,`succeeded`,`failed`,`cancelled`]),xi=f.z.string().max(64),Si=[`inline`,`cloudflare-workflows`],Ci=f.z.object({tenant_id:f.z.string().max(255).nullable().default(null),rollout_id:f.z.string().max(255).nullable().optional(),kind:yi,engine:xi,engine_instance_id:f.z.string().max(100).nullable().optional(),target_worker_version:f.z.string().max(255).nullable().optional(),target_database_version:f.z.string().max(255).nullable().optional(),initiated_by:f.z.string().max(255).nullable().optional(),input:f.z.record(f.z.string(),f.z.unknown()).nullable().optional()}),wi=Ci.extend({id:f.z.string(),status:bi,current_step:f.z.string().max(255).nullable().optional(),error:f.z.string().nullable().optional(),result:f.z.record(f.z.string(),f.z.unknown()).nullable().optional(),claimed_by:f.z.string().max(255).nullable().optional(),claim_expires_at:f.z.string().nullable().optional(),created_at:f.z.string(),updated_at:f.z.string(),finished_at:f.z.string().nullable().optional()}),Ti=wi.pick({status:!0,current_step:!0,engine_instance_id:!0,target_worker_version:!0,target_database_version:!0,error:!0,result:!0,claimed_by:!0,claim_expires_at:!0,finished_at:!0}).partial(),Ei=f.z.enum([`started`,`succeeded`,`failed`,`retried`,`skipped`,`reconciled`]),Di=f.z.object({operation_id:f.z.string().max(255),step:f.z.string().max(255),outcome:Ei,detail:f.z.record(f.z.string(),f.z.unknown()).nullable().optional(),attempt:f.z.number().int().min(1).default(1)}),Oi=Di.extend({id:f.z.string(),created_at:f.z.string()}),ki=f.z.enum([`pending`,`inserted`,`updated`,`failed`,`skipped`]),Ai=[`inserted`,`updated`,`failed`,`skipped`],ji=f.z.object({operation_id:f.z.string().max(255),seq:f.z.number().int().min(0),payload:f.z.record(f.z.string(),f.z.unknown()),status:ki.default(`pending`),error_code:f.z.string().max(64).nullable().optional(),error_message:f.z.string().nullable().optional(),error_path:f.z.string().max(255).nullable().optional(),entity_id:f.z.string().max(255).nullable().optional()}),Mi=ji.extend({status:ki,created_at:f.z.string(),updated_at:f.z.string()}),Ni=f.z.object({seq:f.z.number().int().min(0),status:ki,error_code:f.z.string().max(64).nullable().optional(),error_message:f.z.string().nullable().optional(),error_path:f.z.string().max(255).nullable().optional(),entity_id:f.z.string().max(255).nullable().optional()}),Pi=f.z.enum([`upgrade`,`reseed`,`backup`,`config-sync`]),Fi=f.z.enum([`pending`,`canary`,`rolling`,`paused`,`done`,`failed`]),Ii=f.z.object({kind:Pi,target_worker_version:f.z.string().max(255).nullable().optional(),target_database_version:f.z.string().max(255).nullable().optional(),wave_size:f.z.number().int().min(1).default(10),canary_tenant_ids:f.z.array(f.z.string()).nullable().optional(),filter:f.z.record(f.z.string(),f.z.unknown()).nullable().optional(),initiated_by:f.z.string().max(255).nullable().optional(),config:f.z.record(f.z.string(),f.z.unknown()).nullable().optional()}),Li=Ii.extend({id:f.z.string(),status:Fi,created_at:f.z.string(),updated_at:f.z.string(),finished_at:f.z.string().nullable().optional(),paused_reason:f.z.string().nullable().optional()}),Ri=Li.pick({status:!0,wave_size:!0,canary_tenant_ids:!0,filter:!0,config:!0,paused_reason:!0,finished_at:!0}).partial(),zi=f.z.enum([`invite`,`add_members`,`remove_members`,`assign_roles`,`remove_roles`,`revoke_invitation`]),Bi=f.z.enum([`pending`,`succeeded`,`failed`]),Vi=f.z.object({kind:zi,requested_by:f.z.string().min(1).max(255),payload:f.z.record(f.z.string(),f.z.unknown())}),Hi=Vi.extend({id:f.z.string(),tenant_id:f.z.string(),status:Bi,result:f.z.record(f.z.string(),f.z.unknown()).nullable().optional(),error:f.z.string().nullable().optional(),notified_at:f.z.string().nullable().optional(),created_at:f.z.string(),updated_at:f.z.string(),finished_at:f.z.string().nullable().optional()}),Ui=f.z.object({status:Bi.optional(),result:f.z.record(f.z.string(),f.z.unknown()).nullable().optional(),error:f.z.string().nullable().optional(),notified_at:f.z.string().nullable().optional(),finished_at:f.z.string().nullable().optional()}),Wi=function(e){return e.DeviceCode=`urn:ietf:params:oauth:grant-type:device_code`,e.RefreshToken=`refresh_token`,e.AuthorizationCode=`authorization_code`,e.ClientCredential=`client_credentials`,e.Passwordless=`passwordless`,e.Password=`password`,e.OTP=`http://auth0.com/oauth/grant-type/passwordless/otp`,e.TokenExchange=`urn:ietf:params:oauth:grant-type:token-exchange`,e}({}),Gi=f.z.object({access_token:f.z.string(),id_token:f.z.string().optional(),scope:f.z.string().optional(),state:f.z.string().optional(),refresh_token:f.z.string().optional(),token_type:f.z.string(),expires_in:f.z.number(),issued_token_type:f.z.string().optional()});f.z.object({code:f.z.string(),state:f.z.string().optional()});var Ki=f.z.object({button_border_radius:f.z.number(),button_border_weight:f.z.number(),buttons_style:f.z.enum([`pill`,`rounded`,`sharp`]),input_border_radius:f.z.number(),input_border_weight:f.z.number(),inputs_style:f.z.enum([`pill`,`rounded`,`sharp`]),show_widget_shadow:f.z.boolean(),widget_border_weight:f.z.number(),widget_corner_radius:f.z.number()}),qi=f.z.object({base_focus_color:f.z.string(),base_hover_color:f.z.string(),body_text:f.z.string(),captcha_widget_theme:f.z.enum([`auto`,`dark`,`light`]),error:f.z.string(),header:f.z.string(),icons:f.z.string(),input_background:f.z.string(),input_border:f.z.string(),input_filled_text:f.z.string(),input_labels_placeholders:f.z.string(),links_focused_components:f.z.string(),primary_button:f.z.string(),primary_button_label:f.z.string(),secondary_button_border:f.z.string(),secondary_button_label:f.z.string(),success:f.z.string(),widget_background:f.z.string(),widget_border:f.z.string()}),Ji=qi.omit({captcha_widget_theme:!0}).partial(),Yi=f.z.object({bold:f.z.boolean(),size:f.z.number()}),Xi=f.z.object({body_text:Yi,buttons_text:Yi,font_url:f.z.string(),input_labels:Yi,links:Yi,links_style:f.z.enum([`normal`,`underlined`]),reference_text_size:f.z.number(),subtitle:Yi,title:Yi}),Zi=f.z.object({background_color:f.z.string(),background_image_url:f.z.string(),background_color_dark:f.z.string().optional(),background_image_url_dark:f.z.string().optional(),page_layout:f.z.enum([`center`,`left`,`right`]),logo_placement:f.z.enum([`widget`,`chip`,`none`]).optional()}),Qi=f.z.object({header_text_alignment:f.z.enum([`center`,`left`,`right`]),logo_height:f.z.number(),logo_position:f.z.enum([`center`,`left`,`none`,`right`]),logo_url:f.z.string(),logo_url_dark:f.z.string().optional(),social_buttons_layout:f.z.enum([`bottom`,`top`])}),$i=f.z.object({borders:Ki,colors:qi,colors_dark:Ji.optional(),displayName:f.z.string(),fonts:Xi,page_background:Zi,widget:Qi}),ea=$i.extend({themeId:f.z.string()}),ta=f.z.object({...y,universal_login_experience:f.z.enum([`new`,`classic`]).default(`new`),identifier_first:f.z.boolean().default(!0),password_first:f.z.boolean().default(!1),show_last_used_connection:f.z.boolean().default(!1),webauthn_platform_first_factor:f.z.boolean()}),na=f.z.object({hosts:f.z.array(f.z.string()).optional(),methods:f.z.array(f.z.string()).optional(),path:f.z.string().default(`/*`),headers:f.z.record(f.z.string(),f.z.string()).optional(),query:f.z.record(f.z.string(),f.z.string()).optional()}),ra=f.z.object({type:f.z.string(),options:f.z.record(f.z.string(),f.z.unknown()).default({})}),ia=f.z.object({id:f.z.string().optional(),custom_domain_id:f.z.string(),priority:f.z.number().int().default(100),match:na,handlers:f.z.array(ra).min(1)}),aa=ia.extend({id:f.z.string(),tenant_id:f.z.string(),created_at:f.z.string(),updated_at:f.z.string()}),oa=ia.partial().omit({id:!0,custom_domain_id:!0}),sa=`custom_authentication`,ca=[`urn:ietf:params:oauth:`,`urn:auth0`,`urn:okta`,`http://auth0.com`,`https://auth0.com`,`http://okta.com`,`https://okta.com`],la=f.z.string().min(1).max(200).refine(e=>e.startsWith(`https://`)||e.startsWith(`urn:`),{message:`subject_token_type must be a URI starting with https:// or urn:`}).refine(e=>!ca.some(t=>e.toLowerCase().startsWith(t)),{message:`subject_token_type uses a reserved namespace`}),ua=f.z.enum([`RS256`,`RS384`,`RS512`,`ES256`,`ES384`,`ES512`]),da=f.z.discriminatedUnion(`type`,[f.z.object({type:f.z.literal(`connection`),connection:f.z.string().min(1),create_if_not_exists:f.z.boolean().default(!0),trust_email_verified:f.z.boolean().default(!1)}),f.z.object({type:f.z.literal(`user_id`)})]),fa=f.z.object({issuer:f.z.string().min(1).max(2048),jwks:Or.optional(),jwks_uri:f.z.string().url().optional(),audience:f.z.array(f.z.string().min(1)).min(1).optional(),algorithms:f.z.array(ua).min(1).optional(),max_lifetime_seconds:f.z.number().int().min(1).max(3600).default(300),require_jti:f.z.boolean().default(!0),user_mapping:da}),pa=f.z.object({name:f.z.string().min(1).max(255),subject_token_type:la,action_id:f.z.string().min(1).optional(),type:f.z.literal(sa),jwt_verification:fa.optional()}),ma=pa.extend({id:f.z.string(),created_at:f.z.string(),updated_at:f.z.string()}),ha=f.z.object({name:f.z.string().min(1).max(255).optional(),subject_token_type:la.optional(),jwt_verification:fa.optional()}),ga=[`oidc`,`samlp`,`waad`,`google-apps`,`adfs`,`okta`,`auth0-samlp`,`okta-samlp`,`keycloak-samlp`,`pingfederate`],_a=[`oidc`,`samlp`,`waad`],va=f.z.enum(ga),ya=f.z.object({name:f.z.string(),description:f.z.string(),is_optional:f.z.boolean()}),ba=f.z.object({logo_url:f.z.string().optional(),colors:f.z.object({primary:f.z.string()}).optional()}),xa=f.z.object({name:f.z.string(),description:f.z.string().optional(),allowed_strategies:f.z.array(va).optional(),user_attributes:f.z.array(ya).optional(),branding:ba.optional()}),Sa=xa.extend({id:f.z.string(),created_at:f.z.string(),updated_at:f.z.string()}),Ca=[`en`],wa=[`get-started`],Ta=f.z.record(f.z.string(),f.z.string()),Ea=[`none`,`optional`,`required`],Da=f.z.enum(Ea),Oa=f.z.object({icon_url:f.z.string().optional(),domain_aliases:f.z.array(f.z.string()).optional()}),ka=f.z.object({name:f.z.string(),display_name:f.z.string().optional(),is_domain_connection:f.z.boolean().optional(),show_as_button:f.z.boolean().optional(),metadata:f.z.record(f.z.string(),f.z.string()).optional(),options:Oa.optional()}),Aa=f.z.object({organization_id:f.z.string(),assign_membership_on_login:f.z.boolean().optional(),show_as_button:f.z.boolean().optional()}),ja=f.z.object({id:f.z.string(),profile_id:f.z.string(),connection_id:f.z.string().optional(),connection_config:ka.optional(),enabled_clients:f.z.array(f.z.string()),enabled_organizations:f.z.array(Aa),domain_verification:Da,expires_at:f.z.string(),revoked_at:f.z.string().optional(),completed_at:f.z.string().optional(),created_at:f.z.string(),updated_at:f.z.string()}),Ma=f.z.object({scim:f.z.string(),auth0:f.z.string()}),Na=f.z.object({connection_id:f.z.string(),user_id_attribute:f.z.string().default(`externalId`),mapping:f.z.array(Ma).default([])}),Pa=f.z.object({created_at:f.z.string(),updated_at:f.z.string()}).extend(Na.shape),Fa=f.z.object({token_id:f.z.string(),connection_id:f.z.string(),token_hash:f.z.string(),scopes:f.z.array(f.z.string()).default([]),valid_until:f.z.string().optional()}),Ia=f.z.object({created_at:f.z.string(),last_used_at:f.z.string().optional()}).extend(Fa.shape),La=f.z.object({connection_id:f.z.string(),external_id:f.z.string(),user_id:f.z.string()}),Ra=f.z.object({created_at:f.z.string()}).extend(La.shape),za=f.z.object({...y,name:f.z.string(),enabled:f.z.boolean().optional().default(!0),default_from_address:f.z.string().optional(),credentials:f.z.record(f.z.string(),f.z.unknown()),settings:f.z.object({}).optional()}),Ba=f.z.enum([`verify_email`,`verify_email_by_code`,`reset_email`,`reset_email_by_code`,`welcome_email`,`blocked_account`,`stolen_credentials`,`enrollment_email`,`mfa_oob_code`,`change_password`,`password_reset`,`user_invitation`]),Va=f.z.object({template:Ba,body:f.z.string(),from:f.z.string(),subject:f.z.string(),syntax:f.z.literal(`liquid`).default(`liquid`),resultUrl:f.z.string().optional(),urlLifetimeInSeconds:f.z.number().int().nonnegative().optional(),includeEmailInRedirect:f.z.boolean().default(!1),enabled:f.z.boolean().default(!0)}),Ha=f.z.object({id:f.z.string(),login_id:f.z.string(),session_id:f.z.string().optional(),organization:f.z.string().optional(),auth_connection:f.z.string().optional(),auth_strategy:jr.optional(),session_transfer:$e.optional(),user_id:f.z.string(),client_id:f.z.string(),expires_at:f.z.string().optional(),idle_expires_at:f.z.string().optional(),last_exchanged_at:f.z.string().optional(),device:ii,resource_servers:f.z.array(f.z.object({audience:f.z.string(),scopes:f.z.string()})),rotating:f.z.boolean(),token_lookup:f.z.string().optional(),token_hash:f.z.string().optional(),family_id:f.z.string().optional(),rotated_to:f.z.string().optional(),rotated_at:f.z.string().optional()}),Ua=Ha.extend({created_at:f.z.string(),revoked_at:f.z.string().optional()}),Wa=f.z.object({to:f.z.string(),message:f.z.string()}),Ga=f.z.object({name:f.z.string(),options:f.z.object({})}),Ka=f.z.object({value:f.z.string(),description:f.z.string().optional()}),qa=f.z.object({token_dialect:f.z.enum([`access_token`,`access_token_authz`]).optional(),enforce_policies:f.z.boolean().optional(),allow_skipping_userinfo:f.z.boolean().optional(),skip_userinfo:f.z.boolean().optional(),persist_client_authorization:f.z.boolean().optional(),enable_introspection_endpoint:f.z.boolean().optional(),mtls:f.z.object({bound_access_tokens:f.z.boolean().optional()}).optional()}),Ja=f.z.object({id:f.z.string().optional(),name:f.z.string(),identifier:f.z.string(),scopes:f.z.array(Ka).optional(),signing_alg:f.z.string().optional(),signing_secret:We().optional(),token_lifetime:f.z.number().default(86400),token_lifetime_for_web:f.z.number().default(7200),skip_consent_for_verifiable_first_party_clients:f.z.boolean().optional(),allow_offline_access:f.z.boolean().optional(),verificationKey:f.z.string().optional(),options:qa.optional(),is_system:f.z.boolean().optional(),...y,metadata:f.z.record(f.z.string(),f.z.any()).optional()}),Ya=Ja.extend({created_at:f.z.string().optional(),updated_at:f.z.string().optional()}),Xa=f.z.array(Ya),Za=f.z.object({role_id:f.z.string(),resource_server_identifier:f.z.string(),permission_name:f.z.string()}),Qa=Za.extend({created_at:f.z.string()}),$a=f.z.array(Qa),eo=f.z.object({user_id:f.z.string().openapi({description:`The id of the user that granted the consent`}),clientID:f.z.string().openapi({description:`The id of the client the grant was issued to`}),audience:f.z.string().optional().openapi({description:`The audience the grant applies to`}),scope:f.z.array(f.z.string()).default([]).openapi({description:`The list of OAuth scopes the user has consented to`})}),to=eo.extend({id:f.z.string()}),no=f.z.object({user_id:f.z.string(),last_login:f.z.string().optional(),last_ip:f.z.string().optional(),login_count:f.z.number().default(0),failed_logins:f.z.array(f.z.string()).optional(),last_password_reset:f.z.string().optional()}),ro=f.z.object({user_id:f.z.string(),resource_server_identifier:f.z.string(),permission_name:f.z.string(),organization_id:f.z.string().optional()}),io=ro.extend({tenant_id:f.z.string(),created_at:f.z.string().optional()}),ao=f.z.array(io),oo=f.z.object({user_id:f.z.string(),resource_server_identifier:f.z.string(),resource_server_name:f.z.string(),permission_name:f.z.string(),description:f.z.string().nullable().optional(),created_at:f.z.string().optional(),organization_id:f.z.string().optional()}),so=f.z.array(oo),co=f.z.object({user_id:f.z.string(),role_id:f.z.string(),organization_id:f.z.string().optional()}),lo=co.extend({tenant_id:f.z.string(),created_at:f.z.string().optional()}),uo=f.z.array(lo),fo=f.z.object({id:f.z.string().optional().openapi({description:`The unique identifier of the role. If not provided, one will be generated.`}),name:f.z.string().min(1).max(50).openapi({description:`The name of the role. Cannot include '<' or '>'`}),description:f.z.string().max(255).optional().openapi({description:`The description of the role`}),is_system:f.z.boolean().optional(),metadata:f.z.record(f.z.string(),f.z.any()).optional().openapi({description:`Metadata associated with the role. Can be used to control sync behavior in multi-tenancy scenarios.`})}),po=fo.extend({id:f.z.string().openapi({description:`The unique identifier of the role`}),created_at:f.z.string().optional(),updated_at:f.z.string().optional()}),mo=f.z.array(po),ho=f.z.object({logo_url:f.z.string().optional().openapi({description:`URL of the organization's logo`}),colors:f.z.object({primary:f.z.string().optional().openapi({description:`Primary color in hex format (e.g., #FF0000)`}),page_background:f.z.string().optional().openapi({description:`Page background color in hex format (e.g., #FFFFFF)`})}).optional()}).optional(),go=f.z.object({connection_id:f.z.string().openapi({description:`ID of the connection`}),assign_membership_on_login:f.z.boolean().default(!1).openapi({description:`Whether to assign membership to the organization on login`}),show_as_button:f.z.boolean().default(!0).openapi({description:`Whether to show this connection as a button in the login screen`}),is_signup_enabled:f.z.boolean().default(!0).openapi({description:`Whether signup is enabled for this connection`})}),_o=f.z.object({client_credentials:f.z.object({enforce:f.z.boolean().default(!1).openapi({description:`Whether to enforce token quota limits`}),per_day:f.z.number().min(0).default(0).openapi({description:`Maximum tokens per day (0 = unlimited)`}),per_hour:f.z.number().min(0).default(0).openapi({description:`Maximum tokens per hour (0 = unlimited)`})}).optional()}).optional(),vo=f.z.object({id:f.z.string().optional(),name:f.z.string().min(1).regex(/^[a-z0-9_-]+$/,{message:`Organization name must be lowercase and can only contain letters, numbers, hyphens, and underscores`}).openapi({description:`The name of the organization. Must be lowercase and can only contain letters, numbers, hyphens, and underscores.`}),display_name:f.z.string().optional().openapi({description:`The display name of the organization`}),branding:ho,metadata:f.z.record(f.z.string(),f.z.any()).default({}).optional().openapi({description:`Custom metadata for the organization`}),enabled_connections:f.z.array(go).default([]).optional().openapi({description:`List of enabled connections for the organization`}),token_quota:_o}),yo=vo.extend(g.shape).extend({id:f.z.string(),name:f.z.string().min(1).openapi({description:`The name of the organization`})}),bo=f.z.object({connection_id:f.z.string().openapi({description:`ID of the tenant-level connection to enable for the org.`}),assign_membership_on_login:f.z.boolean().optional().default(!1),show_as_button:f.z.boolean().optional().default(!0),is_signup_enabled:f.z.boolean().optional().default(!0)}),xo=bo.extend({connection:f.z.object({name:f.z.string().optional(),strategy:f.z.string().optional()}).optional(),created_at:f.z.string().optional(),updated_at:f.z.string().optional()}),So=f.z.array(xo),Co=f.z.object({user_id:f.z.string().openapi({description:`ID of the user`}),organization_id:f.z.string().openapi({description:`ID of the organization`})}),wo=Co.extend(g.shape).extend({id:f.z.string()}),To=f.z.object({date:f.z.string().openapi({description:`Date these events occurred in ISO 8601 format`,example:`2025-12-19`}),logins:f.z.number().openapi({description:`Number of logins on this date`,example:150}),signups:f.z.number().openapi({description:`Number of signups on this date`,example:25}),leaked_passwords:f.z.number().openapi({description:`Number of breached-password detections on this date (subscription required)`,example:0}),updated_at:f.z.string().openapi({description:`Date and time this stats entry was last updated in ISO 8601 format`,example:`2025-12-19T10:30:00.000Z`}),created_at:f.z.string().openapi({description:`Approximate date and time the first event occurred in ISO 8601 format`,example:`2025-12-19T00:00:00.000Z`})}),Eo=f.z.number().openapi({description:`Number of active users in the last 30 days`,example:1234}),Do=f.z.enum([`active-users`,`logins`,`signups`,`refresh-tokens`,`sessions`,`logouts`,`password-changes`,`password-migrations`,`mfa`,`email-verifications`,`codes-sent`]),Oo=f.z.enum([`hour`,`day`,`week`,`month`]),ko=f.z.enum([`time`,`connection`,`client_id`,`user_type`,`event`]),Ao=f.z.enum([`password`,`social`,`passwordless`,`enterprise`]),jo=f.z.object({cohort:f.z.string(),sessions:f.z.number(),active:f.z.array(f.z.number())}),Mo=f.z.object({interval:f.z.literal(`week`),from:f.z.string(),to:f.z.string(),cohorts:f.z.array(jo)}),No=f.z.object({cohort:f.z.string(),tokens:f.z.number(),active:f.z.array(f.z.number())}),Po=f.z.object({interval:f.z.literal(`week`),from:f.z.string(),to:f.z.string(),cohorts:f.z.array(No)}),Fo=f.z.object({name:f.z.string(),type:f.z.string()}),Io=f.z.object({elapsed:f.z.number(),rows_read:f.z.number().optional(),bytes_read:f.z.number().optional()}),Lo=f.z.object({meta:f.z.array(Fo),data:f.z.array(f.z.record(f.z.string(),f.z.any())),rows:f.z.number(),rows_before_limit_at_least:f.z.number().optional(),statistics:Io.optional()}),Ro=f.z.enum(`login.login-id.login-password.signup.signup-id.signup-password.reset-password.consent.mfa.mfa-push.mfa-otp.mfa-voice.mfa-phone.mfa-webauthn.mfa-email.mfa-recovery-code.status.device-flow.email-verification.email-otp-challenge.organizations.invitation.common.passkeys.captcha.custom-form.login-passwordless.mfa-login-options`.split(`.`)),zo=f.z.record(f.z.string(),f.z.record(f.z.string(),f.z.string())).openapi({type:`object`,additionalProperties:{type:`object`,additionalProperties:{type:`string`}}}),Bo=f.z.object({prompt:Ro,language:f.z.string(),custom_text:zo}),Vo=[`form-content-start`,`form-content-end`,`form-footer-start`,`form-footer-end`,`secondary-actions-start`,`secondary-actions-end`],Ho=f.z.object({"form-content-start":f.z.string().optional(),"form-content-end":f.z.string().optional(),"form-footer-start":f.z.string().optional(),"form-footer-end":f.z.string().optional(),"secondary-actions-start":f.z.string().optional(),"secondary-actions-end":f.z.string().optional()}).strict(),Uo=f.z.record(f.z.string(),Ho),Wo=f.z.object({prompt:f.z.string(),partials:Uo}),Go={EMAIL:`email`,SMS:`sms`,USERNAME_PASSWORD:`Username-Password-Authentication`,GOOGLE_OAUTH2:`google-oauth2`,APPLE:`apple`,FACEBOOK:`facebook`,GITHUB:`github`,WINDOWSLIVE:`windowslive`,VIPPS:`vipps`,OIDC:`oidc`,OAUTH2:`oauth2`,SAMLP:`samlp`,WAAD:`waad`,ADFS:`adfs`,OKTA:`okta`,EXTERNAL:`external`},Ko={DATABASE:`database`,SOCIAL:`social`,PASSWORDLESS:`passwordless`},qo=`auth0`;function Jo(e){return e===`auth0`||e===Go.USERNAME_PASSWORD||e===`auth2`}var Yo=f.z.enum([`phone`,`totp`,`email`,`push`,`webauthn-roaming`,`webauthn-platform`,`passkey`]),Xo=f.z.object({user_id:f.z.string(),type:Yo,phone_number:f.z.string().optional(),totp_secret:f.z.string().optional(),totp_last_step:f.z.number().int().nonnegative().optional(),credential_id:f.z.string().optional(),public_key:f.z.string().optional(),sign_count:f.z.number().int().nonnegative().optional(),credential_backed_up:f.z.boolean().optional(),transports:f.z.array(f.z.string()).optional(),friendly_name:f.z.string().optional(),confirmed:f.z.boolean().default(!1)});function Zo(e,t){e.type===`phone`&&!e.phone_number&&t.addIssue({code:f.z.ZodIssueCode.custom,message:`phone_number is required when type is 'phone'`,path:[`phone_number`]}),e.type===`totp`&&!e.totp_secret&&t.addIssue({code:f.z.ZodIssueCode.custom,message:`totp_secret is required when type is 'totp'`,path:[`totp_secret`]}),[`webauthn-roaming`,`webauthn-platform`,`passkey`].includes(e.type)&&(e.credential_id||t.addIssue({code:f.z.ZodIssueCode.custom,message:`credential_id is required when type is '${e.type}'`,path:[`credential_id`]}),e.public_key||t.addIssue({code:f.z.ZodIssueCode.custom,message:`public_key is required when type is '${e.type}'`,path:[`public_key`]}))}var Qo=Xo.superRefine(Zo),$o=Xo.extend({id:f.z.string(),created_at:f.z.string(),updated_at:f.z.string()}).superRefine(Zo),es=f.z.object({id:f.z.string().optional(),created_at:f.z.string().datetime({offset:!0}).optional(),updated_at:f.z.string().datetime({offset:!0}).optional()}),ts={"validate-registration-username":{access:[`deny`]},"post-user-login":{accessToken:[`setCustomClaim`],idToken:[`setCustomClaim`],access:[`deny`],prompt:[`render`],redirect:[`sendUserTo`],user:[`setLinkedTo`],users:[`ensure`],multifactor:[`enable`]},"credentials-exchange":{accessToken:[`setCustomClaim`],idToken:[`setCustomClaim`],access:[`deny`]},"pre-user-registration":{user:[`setUserMetadata`,`setAppMetadata`,`setLinkedTo`],users:[`ensure`],access:[`deny`],validation:[`error`]},"post-user-registration":{},"pre-user-update":{access:[`deny`]},"post-user-update":{},"pre-user-deletion":{access:[`deny`]},"post-user-deletion":{},"pre-screen":{redirect:[`sendUserTo`],access:[`deny`]},"custom-email-provider":{notification:[`drop`,`retry`,`useDefaultProvider`]},"custom-phone-provider":{notification:[`drop`,`retry`,`useDefaultProvider`]},"custom-token-exchange":{authentication:[`setUserById`,`setUserByConnection`],access:[`deny`,`rejectInvalidSubjectToken`]}},ns={"validate-registration-username":`onExecuteValidateRegistrationUsername`,"post-user-login":`onExecutePostLogin`,"credentials-exchange":`onExecuteCredentialsExchange`,"pre-user-registration":`onExecutePreUserRegistration`,"post-user-registration":`onExecutePostUserRegistration`,"pre-user-update":`onExecutePreUserUpdate`,"post-user-update":`onExecutePostUserUpdate`,"pre-user-deletion":`onExecutePreUserDeletion`,"post-user-deletion":`onExecutePostUserDeletion`,"pre-screen":`onExecutePreScreen`,"custom-token-exchange":`onExecuteCustomTokenExchange`,"custom-email-provider":`onExecuteCustomEmailProvider`,"custom-phone-provider":`onExecuteCustomPhoneProvider`},rs={"validate-registration-username":`// Code Action sandbox API. Calls are recorded and applied after the handler completes; methods return no result.
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(e&&(t=e(e=0)),t),s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),c=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},u=(n,r,a)=>(a=n==null?{}:e(i(n)),l(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),d=e=>a.call(e,`module.exports`)?e[`module.exports`]:l(t({},`__esModule`,{value:!0}),e);let f=require("@hono/zod-openapi"),p=require("hono/http-exception"),m=require("hono/adapter"),h=require("hono/jwt");var g=f.z.object({created_at:f.z.string(),updated_at:f.z.string()}),_=f.z.enum([`local`,`shared`,`platform`]),v=f.z.enum([`none`,`secrets`,`fields`]),y={scope:_.optional(),override:v.optional(),enforce:f.z.boolean().optional()},b=f.z.object({id:f.z.string(),version:f.z.string().optional()}),x=f.z.object({name:f.z.string(),version:f.z.string()}),S=f.z.object({name:f.z.string(),value:f.z.string().optional()}),ee=f.z.object({name:f.z.string().max(255),code:f.z.string().max(1e5),supported_triggers:f.z.array(b).optional(),runtime:f.z.string().max(50).optional(),dependencies:f.z.array(x).optional(),secrets:f.z.array(S).optional(),is_system:f.z.boolean().optional(),...y,inherit:f.z.boolean().optional()}),te=ee.partial().extend({status:f.z.enum([`draft`,`built`]).optional(),deployed_at:f.z.string().optional()}),ne=ee.extend({id:f.z.string(),tenant_id:f.z.string(),status:f.z.enum([`draft`,`built`]).default(`built`),deployed_at:f.z.string().optional(),secrets:f.z.array(f.z.object({name:f.z.string(),value:f.z.string().optional()})).optional()}).extend(g.shape),re=f.z.object({name:f.z.string()}),ie=ne.extend({secrets:f.z.array(re).optional()}),ae=f.z.string(),oe=f.z.enum([`unspecified`,`pending`,`final`,`partial`,`canceled`,`suspended`]),se=f.z.object({id:f.z.string(),msg:f.z.string(),url:f.z.string().optional()}),ce=f.z.object({action_name:f.z.string(),error:se.nullable(),started_at:f.z.string(),ended_at:f.z.string()}),le=f.z.object({level:f.z.enum([`log`,`info`,`warn`,`error`,`debug`]),message:f.z.string()}),ue=f.z.array(f.z.object({action_name:f.z.string(),lines:f.z.array(le)})),de=f.z.object({id:f.z.string(),tenant_id:f.z.string(),trigger_id:ae,status:oe,results:f.z.array(ce),logs:ue.optional(),created_at:f.z.string(),updated_at:f.z.string()}),fe=de.omit({tenant_id:!0,created_at:!0,updated_at:!0}),pe=f.z.object({action_id:f.z.string(),code:f.z.string().max(1e5),runtime:f.z.string().max(50).optional(),dependencies:f.z.array(x).optional(),secrets:f.z.array(S).optional(),supported_triggers:f.z.array(b).optional(),deployed:f.z.boolean().default(!0)}),C=pe.extend({id:f.z.string(),tenant_id:f.z.string(),number:f.z.number().int()}).extend(g.shape),me=f.z.enum([`user_action`,`admin_action`,`system`,`api`]),he=f.z.object({type:f.z.enum([`user`,`admin`,`system`,`api_key`,`client_credentials`]),id:f.z.string().optional(),email:f.z.string().optional(),org_id:f.z.string().optional(),org_name:f.z.string().optional(),scopes:f.z.array(f.z.string()).optional(),client_id:f.z.string().optional()}),w=f.z.object({type:f.z.string(),id:f.z.string(),before:f.z.record(f.z.string(),f.z.unknown()).optional(),after:f.z.record(f.z.string(),f.z.unknown()).optional(),diff:f.z.record(f.z.string(),f.z.object({old:f.z.unknown(),new:f.z.unknown()})).optional()}),ge=f.z.object({user:f.z.object({user_id:f.z.string(),name:f.z.string().optional(),email:f.z.string().optional()}).optional(),strategy:f.z.string(),credentials:f.z.object({jti:f.z.string().optional(),scopes:f.z.array(f.z.string()).optional()}).optional()}),_e=f.z.object({method:f.z.string(),path:f.z.string(),query:f.z.record(f.z.string(),f.z.string()).optional(),body:f.z.unknown().optional(),ip:f.z.string(),user_agent:f.z.string().optional(),correlation_id:f.z.string().optional(),redirect_uri:f.z.string().optional(),authorization_url:f.z.string().optional(),auth:ge.optional()}),ve=f.z.object({status_code:f.z.number(),body:f.z.unknown().optional()}),ye=f.z.object({country_code:f.z.string(),city_name:f.z.string(),latitude:f.z.string(),longitude:f.z.string(),time_zone:f.z.string(),continent_code:f.z.string()}),be=f.z.object({name:f.z.string(),version:f.z.string(),env:f.z.record(f.z.string(),f.z.string()).optional()}),xe=f.z.object({tenant_id:f.z.string(),event_type:f.z.string(),log_type:f.z.string(),description:f.z.string().optional(),category:me,actor:he,target:w,request:_e,response:ve.optional(),connection:f.z.string().optional(),connection_id:f.z.string().optional(),client_name:f.z.string().optional(),strategy:f.z.string().optional(),strategy_type:f.z.string().optional(),audience:f.z.string().optional(),scope:f.z.string().optional(),location:ye.optional(),auth0_client:be.optional(),hostname:f.z.string(),is_mobile:f.z.boolean().optional(),execution_id:f.z.string().optional(),details:f.z.record(f.z.string(),f.z.unknown()).optional(),login_session_id:f.z.string().optional(),timestamp:f.z.string()}),Se=xe.extend({id:f.z.string()}),Ce=f.z.enum([`AUTH0`,`EMAIL`,`REDIRECT`]),we=f.z.enum([`CREATE_USER`,`GET_USER`,`UPDATE_USER`,`SEND_REQUEST`,`SEND_EMAIL`]),Te=f.z.enum([`VERIFY_EMAIL`]),Ee=f.z.object({require_mx_record:f.z.boolean().optional(),block_aliases:f.z.boolean().optional(),block_free_emails:f.z.boolean().optional(),block_disposable_emails:f.z.boolean().optional(),blocklist:f.z.array(f.z.string()).optional(),allowlist:f.z.array(f.z.string()).optional()}),De=f.z.object({id:f.z.string(),alias:f.z.string().max(100).optional(),type:f.z.literal(`AUTH0`),action:f.z.literal(`UPDATE_USER`),allow_failure:f.z.boolean().optional(),mask_output:f.z.boolean().optional(),params:f.z.object({connection_id:f.z.string().optional(),user_id:f.z.string(),changes:f.z.record(f.z.string(),f.z.any())})}),Oe=f.z.object({id:f.z.string(),alias:f.z.string().max(100).optional(),type:f.z.literal(`EMAIL`),action:f.z.literal(`VERIFY_EMAIL`),allow_failure:f.z.boolean().optional(),mask_output:f.z.boolean().optional(),params:f.z.object({email:f.z.string(),rules:Ee.optional()})}),ke=f.z.enum([`change-email`,`account`,`custom`]),Ae=f.z.object({id:f.z.string(),alias:f.z.string().max(100).optional(),type:f.z.literal(`REDIRECT`),action:f.z.literal(`REDIRECT_USER`),allow_failure:f.z.boolean().optional(),mask_output:f.z.boolean().optional(),params:f.z.object({target:ke.openapi({description:`The predefined target to redirect to, or 'custom' for a custom URL`}),custom_url:f.z.string().optional().openapi({description:`Custom URL to redirect to when target is 'custom'`})})}),je=f.z.union([De,Oe,Ae]),Me=f.z.object({name:f.z.string().min(1).max(150).openapi({description:`The name of the flow`}),actions:f.z.array(je).optional().default([]).openapi({description:`The list of actions to execute in sequence`})}),Ne=Me.extend(g.shape).extend({id:f.z.string().openapi({description:`Unique identifier for the flow`,example:`af_12tMpdJ3iek7svMyZkSh5M`})}),Pe=f.z.object({page:f.z.string().min(0).optional().default(`0`).transform(e=>parseInt(e,10)).openapi({description:`The page number where 0 is the first page`}),per_page:f.z.string().min(1).optional().default(`50`).transform(e=>parseInt(e,10)).openapi({description:`The number of items per page. Defaults to 50.`}),include_totals:f.z.string().optional().default(`false`).transform(e=>e===`true`).openapi({description:`If the total number of items should be included in the response`}),sort:f.z.string().regex(/^.+:(-1|1)$/).optional().openapi({description:`A property that should have the format 'string:-1' or 'string:1'`}),q:f.z.string().optional().openapi({description:`A lucene query string used to filter the results`})}),Fe=f.z.object({start:f.z.number(),limit:f.z.number(),length:f.z.number(),total:f.z.number().optional(),next:f.z.string().optional()}),Ie=f.z.object({email:f.z.string().optional(),email_verified:f.z.boolean().optional(),name:f.z.string().optional(),username:f.z.string().optional(),given_name:f.z.string().optional(),phone_number:f.z.string().optional(),phone_verified:f.z.boolean().optional(),family_name:f.z.string().optional()}).catchall(f.z.any()),Le=f.z.object({connection:f.z.string(),user_id:f.z.string(),provider:f.z.string(),isSocial:f.z.boolean(),email:f.z.string().optional(),email_verified:f.z.boolean().optional(),phone_number:f.z.string().optional(),phone_verified:f.z.boolean().optional(),username:f.z.string().optional(),access_token:f.z.string().optional(),access_token_secret:f.z.string().optional(),refresh_token:f.z.string().optional(),profileData:Ie.optional()}),Re=f.z.object({formatted:f.z.string().optional(),street_address:f.z.string().optional(),locality:f.z.string().optional(),region:f.z.string().optional(),postal_code:f.z.string().optional(),country:f.z.string().optional()}).optional(),ze=f.z.object({email:f.z.string().transform(e=>e.toLowerCase()).optional(),username:f.z.string().refine(e=>!e.includes(`@`),{message:`Usernames must not contain "@". Use the email field for email addresses.`}).optional(),phone_number:f.z.string().optional(),phone_verified:f.z.boolean().optional(),given_name:f.z.string().optional(),family_name:f.z.string().optional(),nickname:f.z.string().optional(),name:f.z.string().optional(),picture:f.z.string().optional(),locale:f.z.string().optional(),linked_to:f.z.string().optional(),profileData:f.z.string().optional(),user_id:f.z.string().optional(),app_metadata:f.z.any().default({}).optional(),user_metadata:f.z.any().default({}).optional(),middle_name:f.z.string().optional(),preferred_username:f.z.string().optional(),profile:f.z.string().optional(),website:f.z.string().optional(),gender:f.z.string().optional(),birthdate:f.z.string().optional(),zoneinfo:f.z.string().optional(),address:Re}),Be=ze.extend({email_verified:f.z.boolean().default(!1),verify_email:f.z.boolean().optional(),last_ip:f.z.string().optional(),last_login:f.z.string().optional(),user_id:f.z.string().optional(),provider:f.z.string().optional(),connection:f.z.string(),is_social:f.z.boolean().optional(),blocked:f.z.boolean().optional(),registration_completed_at:f.z.string().optional(),password:f.z.object({hash:f.z.string(),algorithm:f.z.string()}).optional()}),Ve=Be.omit({password:!0}).extend(g.shape).extend({user_id:f.z.string(),provider:f.z.string(),is_social:f.z.boolean(),email:f.z.string().optional(),login_count:f.z.number().default(0),identities:f.z.array(Le).optional()}),He=Ve.omit({registration_completed_at:!0}),Ue=ze.extend({login_count:f.z.number(),multifactor:f.z.array(f.z.string()).optional(),last_ip:f.z.string().optional(),last_login:f.z.string().optional(),user_id:f.z.string()}).catchall(f.z.any());function We(){return f.z.string().trim()}function Ge(e,t){let n={...e};for(let r of t){let t=e[r];typeof t==`string`&&Object.assign(n,{[r]:t.trim()})}return n}var Ke=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`,qe=(e=21)=>{let t=``,n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=Ke[n[e]&63];return t},Je=f.z.enum([`cookie`,`query`]),Ye=f.z.enum([`ip`,`asn`,`none`]),Xe=f.z.object({can_create_session_transfer_token:f.z.boolean().optional().openapi({default:!1,description:`Whether this client may exchange a refresh token for a session_transfer_token.`}),enforce_cascade_revocation:f.z.boolean().optional().openapi({default:!0,description:`Whether revoking the refresh token a session_transfer_token was minted from also ends the sessions (and their refresh tokens) created with that token.`}),allowed_authentication_methods:f.z.array(Je).optional().openapi({default:[],description:"How this client accepts a session_transfer_token at /authorize: as the `session_transfer_token` query parameter (`query`) and/or the `auth0_session_transfer_token` cookie (`cookie`). Empty means the client does not accept session transfer."}),enforce_device_binding:Ye.optional().openapi({default:`ip`,description:"Whether the browser redeeming a session_transfer_token must come from the same IP address (`ip`) or autonomous system (`asn`) as the request that minted it. `none` disables the check."}),allow_refresh_token:f.z.boolean().optional().openapi({default:!1,description:`Whether a login established with a session_transfer_token may be issued a refresh token.`}),enforce_online_refresh_tokens:f.z.boolean().optional().openapi({default:!0,description:`Whether refresh tokens issued on a transferred session are bound to that session's lifetime.`}),allow_onward_transfer:f.z.boolean().optional().openapi({default:!1,description:`AuthHero extension. Whether this client may mint a session_transfer_token from a login that was itself established with one (A → B → C). The onward token stays tied to the original refresh token.`}),trust_forwarded_ip:f.z.boolean().optional().openapi({default:!1,description:"AuthHero extension. Whether an authenticated confidential client may pass the end user's IP address in the `auth0-forwarded-for` header when minting, so device binding compares against the browser rather than the client's backend. Ignored for requests without client authentication."})}).passthrough(),Ze={can_create_session_transfer_token:!1,enforce_cascade_revocation:!0,allowed_authentication_methods:[],enforce_device_binding:`ip`,allow_refresh_token:!1,enforce_online_refresh_tokens:!0,allow_onward_transfer:!1,trust_forwarded_ip:!1};function Qe(e){let t=Xe.safeParse(e??{}),n=t.success?t.data:{};return{can_create_session_transfer_token:n.can_create_session_transfer_token??Ze.can_create_session_transfer_token,enforce_cascade_revocation:n.enforce_cascade_revocation??Ze.enforce_cascade_revocation,allowed_authentication_methods:n.allowed_authentication_methods??[...Ze.allowed_authentication_methods],enforce_device_binding:n.enforce_device_binding??Ze.enforce_device_binding,allow_refresh_token:n.allow_refresh_token??Ze.allow_refresh_token,enforce_online_refresh_tokens:n.enforce_online_refresh_tokens??Ze.enforce_online_refresh_tokens,allow_onward_transfer:n.allow_onward_transfer??Ze.allow_onward_transfer,trust_forwarded_ip:n.trust_forwarded_ip??Ze.trust_forwarded_ip}}var $e=f.z.object({client_id:f.z.string().describe(`The client that minted the session_transfer_token`),family_id:f.z.string().describe(`Rotation family of the refresh token the session_transfer_token was minted from. The family id is stable across rotation, the row id is not.`),cascade_revocation:f.z.boolean().describe(`Whether this session ends when the parent refresh token family is no longer active`)}),et=f.z.object({client_id:f.z.string().optional().openapi({description:`ID of this client. Generated server-side if omitted (Auth0 behavior).`}),name:f.z.string().min(1).openapi({description:`Name of this client (min length: 1 character, does not allow < or >).`}),description:f.z.string().max(140).optional().openapi({description:`Free text description of this client (max length: 140 characters).`}),global:f.z.boolean().default(!1).openapi({description:`Whether this is your global 'All Applications' client representing legacy tenant settings (true) or a regular client (false).`}),client_secret:We().default(()=>qe()).optional().openapi({description:`Client secret (which you must not make public).`}),app_type:f.z.enum([`native`,`spa`,`regular_web`,`non_interactive`,`resource_server`,`express_configuration`,`rms`,`box`,`cloudbees`,`concur`,`dropbox`,`mscrm`,`echosign`,`egnyte`,`newrelic`,`office365`,`salesforce`,`sentry`,`sharepoint`,`slack`,`springcm`,`zendesk`,`zoom`,`sso_integration`,`oag`]).default(`regular_web`).optional().openapi({description:`The type of application this client represents`}),logo_uri:f.z.string().url().optional().openapi({description:`URL of the logo to display for this client. Recommended size is 150x150 pixels.`}),is_first_party:f.z.boolean().default(!0).openapi({description:`Whether this client is a first party client (true) or not (false). First-party clients skip the consent screen; third-party clients require explicit user consent for non-basic scopes.`}),oidc_conformant:f.z.boolean().default(!0).openapi({description:`Whether this client conforms to strict OIDC specifications (true) or uses legacy features (false).`}),auth0_conformant:f.z.boolean().default(!0).openapi({description:`Whether this client follows Auth0-compatible behavior (true) or strict OIDC behavior (false). When true, profile/email claims are included in the ID token when scopes are requested. When false, these claims are only available from the userinfo endpoint (strict OIDC 5.4 compliance).`}),callbacks:f.z.array(f.z.string()).default([]).optional().openapi({description:`Comma-separated list of URLs whitelisted for Auth0 to use as a callback to the client after authentication.`}),allowed_origins:f.z.array(f.z.string()).default([]).optional().openapi({description:`Comma-separated list of URLs allowed to make requests from JavaScript to Auth0 API (typically used with CORS). By default, all your callback URLs will be allowed. This field allows you to enter other origins if necessary. You can also use wildcards at the subdomain level (e.g., https://*.contoso.com). Query strings and hash information are not taken into account when validating these URLs.`}),web_origins:f.z.array(f.z.string()).default([]).optional().openapi({description:`Comma-separated list of allowed origins for use with Cross-Origin Authentication, Device Flow, and web message response mode.`}),client_aliases:f.z.array(f.z.string()).default([]).optional().openapi({description:`List of audiences/realms for SAML protocol. Used by the wsfed addon.`}),allowed_clients:f.z.array(f.z.string()).default([]).optional().openapi({description:`List of allow clients and API ids that are allowed to make delegation requests. Empty means all all your clients are allowed.`}),connections:f.z.array(f.z.string()).default([]).optional().openapi({description:`List of connection IDs enabled for this client. The order determines the display order on the login page.`}),allowed_logout_urls:f.z.array(f.z.string()).default([]).optional().openapi({description:`Comma-separated list of URLs that are valid to redirect to after logout from Auth0. Wildcards are allowed for subdomains.`}),session_transfer:Xe.optional().openapi({description:`Session transfer (Auth0 Native to Web SSO) configuration: lets this client mint a session_transfer_token from a refresh token and/or accept one at /authorize.`}),oidc_logout:f.z.object({backchannel_logout_urls:f.z.array(f.z.string()).optional().openapi({description:`URLs that receive a signed OIDC Back-Channel Logout 1.0 logout token when a session this client participated in ends.`}),backchannel_logout_initiators:f.z.object({mode:f.z.enum([`all`,`custom`]).optional().openapi({description:`Whether all session-end events initiate a backchannel logout (all) or only the selected_initiators (custom).`}),selected_initiators:f.z.array(f.z.string()).optional().openapi({description:`Logout initiators that trigger a backchannel logout when mode is custom (e.g. rp-logout, idp-logout, password-changed).`})}).passthrough().optional().openapi({description:`Controls which session-end events initiate backchannel logout notifications. Stored for Auth0 compatibility; not yet enforced — all initiators currently notify.`})}).passthrough().default({}).optional().openapi({description:`Configuration for OIDC backchannel logout`}),grant_types:f.z.array(f.z.string()).default([]).optional().openapi({description:`List of grant types supported for this application. Can include authorization_code, implicit, refresh_token, client_credentials, password, http://auth0.com/oauth/grant-type/password-realm, http://auth0.com/oauth/grant-type/mfa-oob, http://auth0.com/oauth/grant-type/mfa-otp, http://auth0.com/oauth/grant-type/mfa-recovery-code, urn:openid:params:grant-type:ciba, and urn:ietf:params:oauth:grant-type:device_code.`}),jwt_configuration:f.z.record(f.z.string(),f.z.any()).default({}).optional().openapi({description:`Configuration related to JWTs for the client.`}),signing_keys:f.z.array(f.z.record(f.z.string(),f.z.any())).default([]).optional().openapi({description:`Signing certificates associated with this client.`}),encryption_key:f.z.record(f.z.string(),f.z.any()).default({}).optional().openapi({description:`Encryption used for WsFed responses with this client.`}),sso:f.z.boolean().default(!1).openapi({description:`Applies only to SSO clients and determines whether Auth0 will handle Single Sign On (true) or whether the Identity Provider will (false).`}),sso_disabled:f.z.boolean().default(!1).openapi({description:`Whether Single Sign On is disabled for this client. When true, existing SSO sessions will not be reused and users must authenticate every time.`}),cross_origin_authentication:f.z.boolean().default(!1).openapi({description:`Whether this client can be used to make cross-origin authentication requests (true) or it is not allowed to make such requests (false).`}),cross_origin_loc:f.z.string().url().optional().openapi({description:`URL of the location in your site where the cross origin verification takes place for the cross-origin auth flow when performing Auth in your own domain instead of Auth0 hosted login page.`}),custom_login_page_on:f.z.boolean().default(!1).openapi({description:`Whether a custom login page is to be used (true) or the default provided login page (false).`}),custom_login_page:f.z.string().optional().openapi({description:`The content (HTML, CSS, JS) of the custom login page.`}),custom_login_page_preview:f.z.string().optional().openapi({description:`The content (HTML, CSS, JS) of the custom login page. (Used on Previews)`}),form_template:f.z.string().optional().openapi({description:`HTML form template to be used for WS-Federation.`}),addons:f.z.record(f.z.string(),f.z.any()).default({}).optional().openapi({description:`Addons enabled for this client and their associated configurations.`}),token_endpoint_auth_method:f.z.enum([`none`,`client_secret_post`,`client_secret_basic`,`client_secret_jwt`,`private_key_jwt`]).default(`client_secret_basic`).optional().openapi({description:"Defines the requested authentication method for the token endpoint. `none` (public client), `client_secret_post` / `client_secret_basic` (HTTP POST / Basic), `client_secret_jwt` (RFC 7523 HMAC assertion using client_secret), or `private_key_jwt` (RFC 7523 asymmetric assertion verified against the client's `jwks` / `jwks_uri`)."}),client_metadata:f.z.record(f.z.string(),f.z.string().max(255)).default({}).optional().openapi({description:`Metadata associated with the client, in the form of an object with string values (max 255 chars). Maximum of 10 metadata properties allowed. Field names (max 255 chars) are alphanumeric and may only include the following special characters: :,-+=_*?"/()<>@ [Tab][Space]`}),hide_sign_up_disabled_error:f.z.boolean().default(!1).optional().openapi({description:"Enumeration-safe variant of the connection-level `disable_signup` flag. When a signup is blocked by the password connection and this is true, the identifier screen does not reveal that an email is unknown — it advances to the OTP/password challenge as if the account existed and fails at credential check. Mitigates email enumeration at the cost of UX: users without an account see a generic credential failure instead of an explicit signup-disabled message."}),mobile:f.z.record(f.z.string(),f.z.any()).default({}).optional().openapi({description:`Additional configuration for native mobile apps.`}),initiate_login_uri:f.z.string().url().optional().openapi({description:`Initiate login uri, must be https`}),native_social_login:f.z.record(f.z.string(),f.z.any()).default({}).optional(),refresh_token:f.z.object({rotation_type:f.z.enum([`rotating`,`non-rotating`]).optional().openapi({description:`Whether refresh tokens for this client are rotated on every exchange (Auth0 'rotating' behavior) or kept stable (legacy non-rotating). Defaults to 'non-rotating' when unset.`}),leeway:f.z.number().int().min(0).max(600).optional().openapi({description:`Seconds after a parent token's first rotation during which presenting it again still mints a fresh sibling child instead of triggering reuse-detection. Defaults to 30s when unset.`}),expiration_type:f.z.enum([`expiring`,`non-expiring`]).optional().openapi({description:`Whether refresh tokens for this client expire at all. 'non-expiring' overrides both the absolute and the idle lifetime.`}),token_lifetime:f.z.number().int().min(0).optional().openapi({description:"Refresh-token absolute lifetime in seconds. Falls back to the tenant's `session_lifetime` when unset."}),infinite_token_lifetime:f.z.boolean().optional().openapi({description:"When true, refresh tokens have no absolute expiry (overrides `token_lifetime`)."}),idle_token_lifetime:f.z.number().int().min(0).optional().openapi({description:"Refresh-token idle (sliding) lifetime in seconds, refreshed on every exchange. Falls back to the tenant's `idle_session_lifetime` when unset."}),infinite_idle_token_lifetime:f.z.boolean().optional().openapi({description:"When true, refresh tokens have no idle expiry (overrides `idle_token_lifetime`)."})}).default({}).optional().openapi({description:`Refresh token configuration`}),default_organization:f.z.record(f.z.string(),f.z.any()).default({}).optional().openapi({description:`Defines the default Organization ID and flows`}),organization_usage:f.z.enum([`deny`,`allow`,`require`]).default(`deny`).optional().openapi({description:`Defines how to proceed during an authentication transaction with regards an organization. Can be deny (default), allow or require.`}),organization_require_behavior:f.z.enum([`no_prompt`,`pre_login_prompt`,`post_login_prompt`]).default(`no_prompt`).optional().openapi({description:`Defines how to proceed during an authentication transaction when client.organization_usage: 'require'. Can be no_prompt (default), pre_login_prompt or post_login_prompt. post_login_prompt requires oidc_conformant: true.`}),client_authentication_methods:f.z.record(f.z.string(),f.z.any()).default({}).optional().openapi({description:`Defines client authentication methods.`}),require_pushed_authorization_requests:f.z.boolean().default(!1).openapi({description:`Makes the use of Pushed Authorization Requests mandatory for this client`}),require_proof_of_possession:f.z.boolean().default(!1).openapi({description:`Makes the use of Proof-of-Possession mandatory for this client`}),signed_request_object:f.z.record(f.z.string(),f.z.any()).default({}).optional().openapi({description:`JWT-secured Authorization Requests (JAR) settings.`}),compliance_level:f.z.enum([`none`,`fapi1_adv_pkj_par`,`fapi1_adv_mtls_par`,`fapi2_sp_pkj_mtls`,`fapi2_sp_mtls_mtls`]).optional().openapi({description:`Defines the compliance level for this client, which may restrict it's capabilities`}),par_request_expiry:f.z.number().optional().openapi({description:`Specifies how long, in seconds, a Pushed Authorization Request URI remains valid`}),token_quota:f.z.record(f.z.string(),f.z.any()).default({}).optional(),owner_user_id:f.z.string().optional().openapi({description:`User ID of the consenting user when this client was created via IAT-gated Dynamic Client Registration. NULL for clients created via the Management API or open DCR.`}),registration_type:f.z.enum([`manual`,`open_dcr`,`iat_dcr`]).optional().openapi({description:"Provenance of this client. `manual` = Management API; `open_dcr` = RFC 7591 without IAT; `iat_dcr` = RFC 7591 with an Initial Access Token."}),registration_metadata:f.z.record(f.z.string(),f.z.any()).default({}).optional().openapi({description:"Arbitrary metadata captured at Dynamic Client Registration time that isn't a first-class client field (e.g. integration_type, domain). Also stores `iat_constraints` for clients created via IAT so RFC 7592 PUT can enforce field immutability."}),token_exchange:f.z.object({allow_any_profile_of_type:f.z.array(f.z.literal(`custom_authentication`)).optional()}).optional().openapi({description:'Custom Token Exchange settings. Set `allow_any_profile_of_type` to `["custom_authentication"]` to let this client exchange subject tokens through the tenant\'s token exchange profiles.'}),user_linking_mode:f.z.enum([`builtin`,`off`]).optional().openapi({description:"Per-client override for the built-in email-based user-linking path. `builtin` runs the legacy in-process linking at user creation/email update. `off` disables the legacy path; linking only happens if the tenant has enabled the `account-linking` template hook. When unset, the service-level `userLinkingMode` default applies."})}),tt=f.z.object({created_at:f.z.string(),updated_at:f.z.string()}).extend(et.shape).extend({client_id:f.z.string()}),nt=f.z.object({client_id:f.z.string().min(1).openapi({description:`ID of the client.`}),audience:f.z.string().min(1).openapi({description:`The audience (API identifier) of this client grant.`}),scope:f.z.array(f.z.string()).optional().openapi({description:`Scopes allowed for this client grant.`}),organization_usage:f.z.enum([`deny`,`allow`,`require`]).optional().openapi({description:`Defines whether organizations can be used with client credentials exchanges for this grant.`}),allow_any_organization:f.z.boolean().optional().openapi({description:`If enabled, any organization can be used with this grant. If disabled (default), the grant must be explicitly assigned to the desired organizations.`}),is_system:f.z.boolean().optional().openapi({description:`If enabled, this grant is a special grant created by Auth0. It cannot be modified or deleted directly.`}),subject_type:f.z.enum([`client`,`user`]).optional().openapi({description:`The type of application access the client grant allows. Use of this field is subject to the applicable Free Trial terms in Okta's Master Subscription Agreement.`}),authorization_details_types:f.z.array(f.z.string()).optional().openapi({description:`Types of authorization_details allowed for this client grant. Use of this field is subject to the applicable Free Trial terms in Okta's Master Subscription Agreement.`})}),rt=f.z.object({id:f.z.string().openapi({description:`ID of the client grant.`})}).extend(nt.shape).extend({created_at:f.z.string().optional(),updated_at:f.z.string().optional()}),it=f.z.array(rt),at=f.z.enum([`iat`,`rat`]),ot=f.z.enum([`invite`,`edit_link`,`registration`,`connect`]),st=f.z.object({id:f.z.string(),token_hash:f.z.string(),type:at,client_id:f.z.string().optional(),sub:f.z.string().optional(),constraints:f.z.record(f.z.string(),f.z.unknown()).optional(),single_use:f.z.boolean().default(!1),expires_at:f.z.string().optional(),name:f.z.string().optional(),created_by:f.z.string().optional(),source:ot.optional()}),ct=f.z.object({created_at:f.z.string(),used_at:f.z.string().optional(),revoked_at:f.z.string().optional()}).extend(st.shape),lt=f.z.object({x:f.z.number(),y:f.z.number()}),ut=function(e){return e.RICH_TEXT=`RICH_TEXT`,e.NEXT_BUTTON=`NEXT_BUTTON`,e.BACK_BUTTON=`BACK_BUTTON`,e.SUBMIT_BUTTON=`SUBMIT_BUTTON`,e.DIVIDER=`DIVIDER`,e.TEXT=`TEXT`,e.EMAIL=`EMAIL`,e.PASSWORD=`PASSWORD`,e.NUMBER=`NUMBER`,e.PHONE=`PHONE`,e.DATE=`DATE`,e.CHECKBOX=`CHECKBOX`,e.RADIO=`RADIO`,e.SELECT=`SELECT`,e.HIDDEN=`HIDDEN`,e.LEGAL=`LEGAL`,e}({}),dt=function(e){return e.BLOCK=`BLOCK`,e.FIELD=`FIELD`,e}({}),ft=f.z.object({id:f.z.string(),category:f.z.nativeEnum(dt),type:f.z.nativeEnum(ut)}),pt=ft.extend({category:f.z.literal(`BLOCK`),type:f.z.literal(`RICH_TEXT`),config:f.z.object({content:f.z.string()}).passthrough()}),mt=ft.extend({category:f.z.literal(`BLOCK`),type:f.z.union([f.z.literal(`NEXT_BUTTON`),f.z.literal(`BACK_BUTTON`),f.z.literal(`SUBMIT_BUTTON`)]),config:f.z.object({text:f.z.string()}).passthrough()}),ht=ft.extend({category:f.z.literal(`FIELD`),type:f.z.literal(`LEGAL`),required:f.z.boolean().optional(),sensitive:f.z.boolean().optional(),config:f.z.object({text:f.z.string()}).passthrough()}),gt=ft.extend({category:f.z.literal(`FIELD`),type:f.z.union([f.z.literal(`TEXT`),f.z.literal(`EMAIL`),f.z.literal(`PASSWORD`),f.z.literal(`NUMBER`),f.z.literal(`PHONE`),f.z.literal(`DATE`),f.z.literal(`CHECKBOX`),f.z.literal(`RADIO`),f.z.literal(`SELECT`),f.z.literal(`HIDDEN`)]),required:f.z.boolean().optional(),sensitive:f.z.boolean().optional(),config:f.z.object({label:f.z.string().optional(),placeholder:f.z.string().optional()}).passthrough()}),_t=f.z.object({id:f.z.string(),category:f.z.string(),type:f.z.string()}).passthrough(),vt=f.z.union([pt,mt,ht,gt,_t]),yt=function(e){return e.STEP=`STEP`,e.FLOW=`FLOW`,e.CONDITION=`CONDITION`,e.ACTION=`ACTION`,e}({}),bt=f.z.object({id:f.z.string(),type:f.z.literal(`STEP`),coordinates:lt,alias:f.z.string().optional(),config:f.z.object({components:f.z.array(vt),next_node:f.z.string()}).passthrough()}),xt=f.z.object({id:f.z.string(),type:f.z.literal(`FLOW`),coordinates:lt,alias:f.z.string().optional(),config:f.z.object({flow_id:f.z.string(),next_node:f.z.string()})}),St=f.z.object({id:f.z.string(),type:f.z.literal(`ACTION`),coordinates:lt,alias:f.z.string().optional(),config:f.z.object({action_type:f.z.enum([`REDIRECT`]).openapi({description:`The type of action to perform`}),target:f.z.enum([`change-email`,`account`,`custom`]).openapi({description:`The predefined target to redirect to`}),custom_url:f.z.string().optional().openapi({description:`Custom URL when target is 'custom'`}),next_node:f.z.string().openapi({description:`The next node to navigate to after action (for non-redirect actions)`})}).passthrough()}),Ct=f.z.object({id:f.z.string(),type:f.z.string(),coordinates:lt}).passthrough(),wt=f.z.union([bt,xt,St,Ct]),Tt=f.z.object({next_node:f.z.string(),coordinates:lt}).passthrough(),Et=f.z.object({resume_flow:f.z.boolean().optional(),coordinates:lt}).passthrough(),Dt=f.z.object({id:f.z.string(),name:f.z.string(),languages:f.z.object({primary:f.z.string()}).passthrough(),nodes:f.z.array(wt),start:Tt,ending:Et,created_at:f.z.string(),updated_at:f.z.string(),links:f.z.object({sdkSrc:f.z.string().optional(),sdk_src:f.z.string().optional()}).passthrough()}).passthrough(),Ot=Dt.omit({id:!0,created_at:!0,updated_at:!0}),kt=function(e){return e.TOKEN=`token`,e.ID_TOKEN=`id_token`,e.TOKEN_ID_TOKEN=`id_token token`,e.CODE=`code`,e.CODE_ID_TOKEN=`code id_token`,e.CODE_TOKEN=`code token`,e.CODE_ID_TOKEN_TOKEN=`code id_token token`,e}({}),At=function(e){return e.QUERY=`query`,e.FRAGMENT=`fragment`,e.FORM_POST=`form_post`,e.WEB_MESSAGE=`web_message`,e.SAML_POST=`saml_post`,e}({}),jt=function(e){return e.S256=`S256`,e.Plain=`plain`,e}({}),Mt=f.z.union([f.z.null(),f.z.object({essential:f.z.boolean().optional(),value:f.z.unknown().optional(),values:f.z.array(f.z.unknown()).optional()})]).nullable(),Nt=f.z.object({userinfo:f.z.record(f.z.string(),Mt).optional(),id_token:f.z.record(f.z.string(),Mt).optional()}),Pt=f.z.object({client_id:f.z.string(),act_as:f.z.string().optional(),response_type:f.z.nativeEnum(kt).optional(),response_mode:f.z.nativeEnum(At).optional(),redirect_uri:f.z.string().optional(),audience:f.z.string().optional(),organization:f.z.string().optional(),state:f.z.string().optional(),nonce:f.z.string().optional(),scope:f.z.string().optional(),prompt:f.z.string().optional(),code_challenge_method:f.z.nativeEnum(jt).optional(),code_challenge:f.z.string().optional(),username:f.z.string().optional(),ui_locales:f.z.string().optional(),max_age:f.z.number().optional(),acr_values:f.z.string().optional(),claims:Nt.optional(),connection:f.z.string().optional(),vendor_id:f.z.string().optional()}),Ft=f.z.object({...y,colors:f.z.object({primary:f.z.string(),page_background:f.z.union([f.z.string(),f.z.object({type:f.z.string().optional(),start:f.z.string().optional(),end:f.z.string().optional(),angle_deg:f.z.number().optional()})]).optional()}).optional(),logo_url:f.z.string().optional(),favicon_url:f.z.string().optional(),favicon_url_dark:f.z.string().optional(),powered_by_logo_url:f.z.string().optional(),font:f.z.object({url:f.z.string()}).optional(),dark_mode:f.z.enum([`dark`,`light`,`auto`]).optional(),dark_mode_toggle:f.z.boolean().optional(),terms_url:f.z.string().optional(),privacy_url:f.z.string().optional()}),It=f.z.enum([`password_reset`,`email_verification`,`otp`,`mfa_otp`,`authorization_code`,`oauth2_state`,`ticket`,`client_assertion_jti`,`subject_token_jti`,`session_transfer_token`,`mfa_remember_browser`]),Lt=f.z.object({code_id:f.z.string().openapi({description:`The code that will be used in for instance an email verification flow`}),login_id:f.z.string().optional().openapi({description:`The id of the login session that the code is connected to`}),connection_id:f.z.string().optional().openapi({description:`The connection that the code is connected to`}),code_type:It,code_verifier:f.z.string().optional().openapi({description:`The code verifier used in PKCE in outbound flows`}),code_challenge:f.z.string().optional().openapi({description:`The code challenge used in PKCE in outbound flows`}),code_challenge_method:f.z.enum([`plain`,`S256`]).optional().openapi({description:`The code challenge method used in PKCE in outbound flows`}),redirect_uri:f.z.string().optional().openapi({description:`The redirect URI associated with the code`}),otp:f.z.string().optional().openapi({description:`The one-time password value for OTP-based flows`}),nonce:f.z.string().optional().openapi({description:`The nonce value used for security in OIDC flows`}),state:f.z.string().optional().openapi({description:`The state parameter used for CSRF protection in OAuth flows`}),expires_at:f.z.string(),used_at:f.z.string().optional(),user_id:f.z.string().optional()}),Rt=Lt.extend({created_at:f.z.string()}),zt=f.z.object({device_code_hash:f.z.string(),user_code_hash:f.z.string(),client_id:f.z.string(),scope:f.z.string().optional(),audience:f.z.string().optional(),status:f.z.enum([`pending`,`approved`,`denied`,`consumed`]),login_id:f.z.string().optional(),expires_at:f.z.string(),created_at:f.z.string(),last_polled_at:f.z.string().optional(),interval:f.z.number().int().positive(),version:f.z.number().int().nonnegative()}),Bt=f.z.object({kid:f.z.string().optional(),team_id:f.z.string().optional(),realms:f.z.string().optional(),authentication_method:f.z.string().optional(),client_id:f.z.string().optional(),client_secret:We().optional(),app_secret:We().optional(),scope:f.z.string().optional(),client_secret_hint:f.z.string().optional(),app_secret_hint:f.z.string().optional(),twilio_token_hint:f.z.string().optional(),authorization_endpoint:f.z.string().optional(),token_endpoint:f.z.string().optional(),userinfo_endpoint:f.z.string().optional(),jwks_uri:f.z.string().optional(),discovery_url:f.z.string().optional(),issuer:f.z.string().optional(),token_endpoint_auth_method:f.z.enum([`client_secret_basic`,`client_secret_post`]).optional(),provider:f.z.string().optional(),from:f.z.string().optional(),twilio_sid:We().optional(),twilio_token:We().optional(),icon_url:f.z.string().optional(),domain_aliases:f.z.array(f.z.string()).optional(),callback_url:f.z.string().url().optional(),passwordPolicy:f.z.enum([`none`,`low`,`fair`,`good`,`excellent`]).optional(),password_complexity_options:f.z.object({min_length:f.z.number().optional()}).optional(),password_history:f.z.object({enable:f.z.boolean().optional(),size:f.z.number().optional()}).optional(),password_no_personal_info:f.z.object({enable:f.z.boolean().optional()}).optional(),password_dictionary:f.z.object({enable:f.z.boolean().optional(),dictionary:f.z.array(f.z.string()).optional()}).optional(),disable_signup:f.z.boolean().optional(),brute_force_protection:f.z.boolean().optional(),import_mode:f.z.boolean().optional(),configuration:f.z.object({token_endpoint:f.z.string().optional(),userinfo_endpoint:f.z.string().optional(),client_id:f.z.string().optional(),client_secret:We().optional(),client_secret_hint:f.z.string().optional(),realm:f.z.string().optional()}).optional(),attributes:f.z.object({email:f.z.object({identifier:f.z.object({active:f.z.boolean().optional()}).optional(),signup:f.z.object({status:f.z.enum([`required`,`optional`,`disabled`]).optional(),verification:f.z.object({active:f.z.boolean().optional()}).optional()}).optional(),validation:f.z.object({allowed:f.z.boolean().optional()}).optional(),unique:f.z.boolean().optional(),profile_required:f.z.boolean().optional(),verification_method:f.z.enum([`link`,`code`]).optional()}).optional(),username:f.z.object({identifier:f.z.object({active:f.z.boolean().optional()}).optional(),signup:f.z.object({status:f.z.enum([`required`,`optional`,`disabled`]).optional()}).optional(),validation:f.z.object({max_length:f.z.number().optional(),min_length:f.z.number().optional(),allowed_types:f.z.object({email:f.z.boolean().optional(),phone_number:f.z.boolean().optional()}).optional()}).optional(),profile_required:f.z.boolean().optional()}).optional(),phone_number:f.z.object({identifier:f.z.object({active:f.z.boolean().optional()}).optional(),signup:f.z.object({status:f.z.enum([`required`,`optional`,`disabled`]).optional()}).optional()}).optional()}).optional(),authentication_methods:f.z.object({password:f.z.object({enabled:f.z.boolean().optional()}).optional(),passkey:f.z.object({enabled:f.z.boolean().optional()}).optional()}).optional(),passkey_options:f.z.object({challenge_ui:f.z.enum([`both`,`autofill`,`button`]).optional(),local_enrollment_enabled:f.z.boolean().optional(),progressive_enrollment_enabled:f.z.boolean().optional()}).optional(),requires_username:f.z.boolean().optional(),validation:f.z.object({username:f.z.object({min:f.z.number().optional(),max:f.z.number().optional()}).optional()}).optional(),allow_action_users:f.z.boolean().optional(),set_user_root_attributes:f.z.enum([`on_each_login`,`on_first_login`,`never_on_login`]).optional(),signInEndpoint:f.z.string().optional(),signOutEndpoint:f.z.string().optional(),signingCert:f.z.string().optional(),signingCerts:f.z.array(f.z.string()).optional(),metadataUrl:f.z.string().optional(),metadataXml:f.z.string().optional(),signSAMLRequest:f.z.boolean().optional(),signatureAlgorithm:f.z.enum([`rsa-sha256`,`rsa-sha1`]).optional(),digestAlgorithm:f.z.enum([`sha256`,`sha1`]).optional(),protocolBinding:f.z.enum([`urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect`,`urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST`]).optional(),user_id_attribute:f.z.string().optional(),fieldsMap:f.z.record(f.z.string(),f.z.union([f.z.string(),f.z.array(f.z.string())])).optional(),entityId:f.z.string().optional()});function Vt(e){if(e!==null){if(Array.isArray(e))return e.filter(e=>e!==null).map(Vt);if(e&&typeof e==`object`){let t={};for(let[n,r]of Object.entries(e))r!==null&&(t[n]=Vt(r));return t}return e}}var Ht=f.z.object({id:f.z.string().optional(),name:f.z.string(),display_name:f.z.string().optional(),strategy:f.z.string(),options:f.z.preprocess(e=>e===null?{}:Vt(e),Bt).default({}),enabled_clients:f.z.array(f.z.string()).default([]).optional(),response_type:f.z.nativeEnum(kt).optional(),response_mode:f.z.nativeEnum(At).optional(),is_domain_connection:f.z.boolean().optional(),show_as_button:f.z.boolean().optional(),metadata:f.z.record(f.z.string(),f.z.any()).optional(),is_system:f.z.boolean().optional(),...y}),Ut=f.z.object({id:f.z.string(),created_at:f.z.string().transform(e=>e===null?``:e),updated_at:f.z.string().transform(e=>e===null?``:e)}).extend(Ht.shape),Wt=f.z.object({domain:f.z.string(),status:f.z.enum([`pending`,`verified`]),verified_at:f.z.string().optional()}),Gt=f.z.object({profile_id:f.z.string().optional(),domains:f.z.array(Wt).default([])}),Kt=f.z.object({domain:f.z.string(),custom_domain_id:f.z.string().optional(),type:f.z.enum([`auth0_managed_certs`,`self_managed_certs`]),verification_method:f.z.enum([`txt`]).optional(),tls_policy:f.z.enum([`recommended`]).optional(),custom_client_ip_header:f.z.enum([`true-client-ip`,`cf-connecting-ip`,`x-forwarded-for`,`x-azure-clientip`,`null`]).optional(),domain_metadata:f.z.record(f.z.string(),f.z.string().max(255)).optional()}),qt=f.z.discriminatedUnion(`name`,[f.z.object({name:f.z.literal(`txt`),record:f.z.string(),domain:f.z.string()}),f.z.object({name:f.z.literal(`http`),http_body:f.z.string(),http_url:f.z.string()})]),Jt=Kt.extend({custom_domain_id:f.z.string(),primary:f.z.boolean(),status:f.z.enum([`disabled`,`pending`,`pending_verification`,`ready`]),origin_domain_name:f.z.string().optional(),verification:f.z.object({methods:f.z.array(qt)}).optional(),tls_policy:f.z.string().optional()}),Yt=Kt.pick({tls_policy:!0,custom_client_ip_header:!0,domain_metadata:!0}).strict(),Xt=Jt.extend({tenant_id:f.z.string()}),Zt=f.z.object({certificate:f.z.string().regex(/^-----BEGIN CERTIFICATE-----[\s\S]+-----END CERTIFICATE-----\s*$/,`must be PEM-encoded; include the full certificate chain in leaf-first order`),private_key:f.z.string().regex(/-----BEGIN (RSA |EC |ENCRYPTED )?PRIVATE KEY-----[\s\S]+-----END \1PRIVATE KEY-----\s*$/,`must be a PEM-encoded private key`)}),Qt=f.z.object({id:f.z.string(),order:f.z.number().optional(),visible:f.z.boolean().optional().default(!0)}),$t=Qt.extend({category:f.z.literal(`BLOCK`).optional()}),en=$t.extend({type:f.z.literal(`DIVIDER`),config:f.z.object({text:f.z.string().optional()}).optional()}),tn=$t.extend({type:f.z.literal(`HTML`),config:f.z.object({content:f.z.string().optional()}).optional()}),nn=$t.extend({type:f.z.literal(`IMAGE`),config:f.z.object({src:f.z.string().optional(),alt:f.z.string().optional(),width:f.z.number().optional(),height:f.z.number().optional()}).optional()}),rn=$t.extend({type:f.z.literal(`JUMP_BUTTON`),config:f.z.object({text:f.z.string().optional(),target_step:f.z.string().optional()})}),an=$t.extend({type:f.z.literal(`RESEND_BUTTON`),config:f.z.object({text:f.z.string().optional(),resend_action:f.z.string().optional()})}),on=$t.extend({type:f.z.literal(`NEXT_BUTTON`),config:f.z.object({text:f.z.string().optional(),variant:f.z.enum([`primary`,`secondary`]).optional(),skip_validation:f.z.boolean().optional()})}),sn=$t.extend({type:f.z.literal(`PREVIOUS_BUTTON`),config:f.z.object({text:f.z.string().optional()})}),cn=$t.extend({type:f.z.literal(`RICH_TEXT`),config:f.z.object({content:f.z.string().optional()}).optional()}),ln=Qt.extend({category:f.z.literal(`WIDGET`).optional(),label:f.z.string().min(1).optional(),hint:f.z.string().min(1).max(500).optional(),required:f.z.boolean().optional(),sensitive:f.z.boolean().optional()}),un=ln.extend({type:f.z.literal(`AUTH0_VERIFIABLE_CREDENTIALS`),config:f.z.object({credential_type:f.z.string().optional()})}),dn=ln.extend({type:f.z.literal(`GMAPS_ADDRESS`),config:f.z.object({api_key:f.z.string().optional()})}),fn=ln.extend({type:f.z.literal(`RECAPTCHA`),config:f.z.object({site_key:f.z.string().optional()})}),pn=Qt.extend({category:f.z.literal(`FIELD`).optional(),label:f.z.string().min(1).optional(),hint:f.z.string().min(1).max(500).optional(),messages:f.z.array(f.z.object({id:f.z.number().optional(),text:f.z.string(),type:f.z.enum([`info`,`error`,`success`,`warning`])})).optional(),required:f.z.boolean().optional(),sensitive:f.z.boolean().optional()}),mn=pn.extend({type:f.z.literal(`BOOLEAN`),config:f.z.object({default_value:f.z.boolean().optional()}).optional()}),hn=pn.extend({type:f.z.literal(`CARDS`),config:f.z.object({options:f.z.array(f.z.object({value:f.z.string(),label:f.z.string(),description:f.z.string().optional(),image:f.z.string().optional()})).optional(),multi_select:f.z.boolean().optional()}).optional()}),gn=pn.extend({type:f.z.literal(`CHOICE`),config:f.z.object({options:f.z.array(f.z.object({value:f.z.string(),label:f.z.string()})).optional(),display:f.z.enum([`radio`,`checkbox`]).optional(),multiple:f.z.boolean().optional(),default_value:f.z.union([f.z.string(),f.z.array(f.z.string())]).optional()}).optional()}),_n=pn.extend({type:f.z.literal(`CODE`),config:f.z.object({length:f.z.number().int().positive().max(100).optional(),mode:f.z.enum([`numeric`,`alphanumeric`]).optional(),auto_submit:f.z.boolean().optional(),group_size:f.z.number().int().min(0).max(100).optional(),separator:f.z.string().optional(),placeholder:f.z.string().optional(),default_value:f.z.string().optional()}).refine(e=>e.group_size===void 0||e.length===void 0||e.group_size<=e.length,{message:`group_size cannot exceed length`,path:[`group_size`]}).refine(e=>e.default_value===void 0||e.length===void 0||e.default_value.length<=e.length,{message:`default_value is longer than the configured length`,path:[`default_value`]}).optional()}),vn=pn.extend({type:f.z.literal(`CUSTOM`),config:f.z.object({component:f.z.string().optional(),props:f.z.record(f.z.string(),f.z.any()).optional(),schema:f.z.record(f.z.string(),f.z.any()).optional(),code:f.z.string().optional()})}),yn=pn.extend({type:f.z.literal(`DATE`),config:f.z.object({format:f.z.string().optional(),min:f.z.string().optional(),max:f.z.string().optional(),default_value:f.z.string().optional()}).optional()}),bn=pn.extend({type:f.z.literal(`DROPDOWN`),config:f.z.object({options:f.z.array(f.z.object({value:f.z.string(),label:f.z.string()})).optional(),placeholder:f.z.string().optional(),searchable:f.z.boolean().optional(),multiple:f.z.boolean().optional(),default_value:f.z.union([f.z.string(),f.z.array(f.z.string())]).optional()}).optional()}),xn=pn.extend({type:f.z.literal(`EMAIL`),config:f.z.object({placeholder:f.z.string().optional(),default_value:f.z.string().optional(),last_used:f.z.boolean().optional(),last_used_label:f.z.string().optional()}).optional()}),Sn=pn.extend({type:f.z.literal(`FILE`),config:f.z.object({accept:f.z.string().optional(),max_size:f.z.number().optional(),multiple:f.z.boolean().optional()}).optional()}),Cn=pn.extend({type:f.z.literal(`LEGAL`),config:f.z.object({text:f.z.string(),html:f.z.boolean().optional()}).optional()}),wn=pn.extend({type:f.z.literal(`NUMBER`),config:f.z.object({placeholder:f.z.string().optional(),min:f.z.number().optional(),max:f.z.number().optional(),step:f.z.number().optional(),default_value:f.z.string().optional()}).optional()}),Tn=pn.extend({type:f.z.literal(`PASSWORD`),config:f.z.object({placeholder:f.z.string().optional(),min_length:f.z.number().optional(),show_toggle:f.z.boolean().optional(),forgot_password_link:f.z.string().optional(),default_value:f.z.string().optional(),autocomplete:f.z.enum([`current-password`,`new-password`]).optional()}).optional()}),En=pn.extend({type:f.z.literal(`PAYMENT`),config:f.z.object({provider:f.z.string().optional(),currency:f.z.string().optional()}).optional()}),Dn=pn.extend({type:f.z.literal(`SOCIAL`),config:f.z.object({providers:f.z.array(f.z.string()).optional(),provider_details:f.z.array(f.z.object({name:f.z.string(),strategy:f.z.string().optional(),display_name:f.z.string().optional(),short_name:f.z.string().optional(),icon_url:f.z.string().optional(),href:f.z.string().optional(),last_used:f.z.boolean().optional(),last_used_label:f.z.string().optional()})).optional()}).optional()}),On=pn.extend({type:f.z.literal(`TEL`),config:f.z.object({placeholder:f.z.string().optional(),default_country:f.z.string().optional(),default_value:f.z.string().optional(),allow_email:f.z.boolean().optional()}).optional()}),kn=pn.extend({type:f.z.literal(`TEXT`),config:f.z.object({placeholder:f.z.string().optional(),multiline:f.z.boolean().optional(),max_length:f.z.number().optional(),default_value:f.z.string().optional(),autocomplete:f.z.string().optional(),input_mode:f.z.enum([`text`,`numeric`,`decimal`,`tel`,`email`,`url`,`search`]).optional(),last_used:f.z.boolean().optional(),last_used_label:f.z.string().optional()}).optional()}),An=pn.extend({type:f.z.literal(`COUNTRY`),config:f.z.object({placeholder:f.z.string().optional(),default_value:f.z.string().optional()}).optional()}),jn=pn.extend({type:f.z.literal(`URL`),config:f.z.object({placeholder:f.z.string().optional(),default_value:f.z.string().optional()}).optional()}),Mn=f.z.discriminatedUnion(`type`,[en,tn,nn,rn,an,on,sn,cn]),Nn=f.z.discriminatedUnion(`type`,[un,dn,fn]),Pn=f.z.discriminatedUnion(`type`,[mn,hn,gn,_n,An,vn,yn,bn,xn,Sn,Cn,wn,Tn,En,Dn,On,kn,jn]),Fn=f.z.union([Mn,Nn,Pn]),In=new Set([`BOOLEAN`,`CARDS`,`CHOICE`,`CODE`,`COUNTRY`,`DATE`,`DROPDOWN`,`EMAIL`,`LEGAL`,`NUMBER`,`PASSWORD`,`TEL`,`TEXT`,`URL`]),Ln=f.z.object({id:f.z.string(),type:f.z.literal(`submit`),label:f.z.string(),className:f.z.string().optional(),disabled:f.z.boolean().optional().default(!1),order:f.z.number().optional(),visible:f.z.boolean().optional().default(!0),customizations:f.z.record(f.z.string(),f.z.any()).optional()}),Rn=f.z.object({x:f.z.number(),y:f.z.number()}),zn=f.z.object({id:f.z.string(),type:f.z.literal(`FLOW`),coordinates:Rn,alias:f.z.string().min(1).max(150).optional(),config:f.z.object({flow_id:f.z.string().max(30),next_node:f.z.string().optional()})}),Bn=f.z.object({id:f.z.string(),type:f.z.literal(`ROUTER`),coordinates:Rn,alias:f.z.string().min(1).max(150),config:f.z.object({rules:f.z.array(f.z.object({id:f.z.string(),alias:f.z.string().min(1).max(150).optional(),condition:f.z.any(),next_node:f.z.string()})),fallback:f.z.string()})}),Vn=f.z.object({id:f.z.string(),type:f.z.literal(`STEP`),coordinates:Rn,alias:f.z.string().min(1).max(150).optional(),config:f.z.object({components:f.z.array(Fn),next_node:f.z.string().optional()})}),Hn=f.z.discriminatedUnion(`type`,[zn,Bn,Vn]),Un=f.z.object({name:f.z.string().openapi({description:`The name of the form`}),messages:f.z.object({errors:f.z.record(f.z.string(),f.z.any()).optional(),custom:f.z.record(f.z.string(),f.z.any()).optional()}).optional(),languages:f.z.object({primary:f.z.string().optional(),default:f.z.string().optional()}).optional(),translations:f.z.record(f.z.string(),f.z.any()).optional(),nodes:f.z.array(Hn).optional(),start:f.z.object({hidden_fields:f.z.array(f.z.object({key:f.z.string(),value:f.z.string()})).optional(),next_node:f.z.string().optional(),coordinates:Rn.optional()}).optional(),ending:f.z.object({redirection:f.z.object({delay:f.z.number().optional(),target:f.z.string().optional()}).optional(),after_submit:f.z.object({flow_id:f.z.string().optional()}).optional(),coordinates:Rn.optional(),resume_flow:f.z.boolean().optional()}).optional(),style:f.z.object({css:f.z.string().optional()}).optional(),links:f.z.object({sdkSrc:f.z.string().optional(),sdk_src:f.z.string().optional()}).optional()}).openapi({description:`Schema for flow-based forms (matches Auth0 Forms structure)`}),Wn=g.extend(Un.shape).extend({id:f.z.string()}),Gn=f.z.object({id:f.z.number().optional(),text:f.z.string(),type:f.z.enum([`info`,`error`,`success`,`warning`])}),Kn=f.z.object({id:f.z.string().optional(),text:f.z.string(),href:f.z.string(),linkText:f.z.string().optional()}),qn=f.z.object({"form-content-start":f.z.string().optional(),"form-content-end":f.z.string().optional(),"form-footer-start":f.z.string().optional(),"form-footer-end":f.z.string().optional(),"secondary-actions-start":f.z.string().optional(),"secondary-actions-end":f.z.string().optional()}).strict(),Jn=f.z.object({name:f.z.string().optional(),action:f.z.string(),method:f.z.enum([`POST`,`GET`]),title:f.z.string().optional(),description:f.z.string().optional(),components:f.z.array(Fn),messages:f.z.array(Gn).optional(),links:f.z.array(Kn).optional(),partials:qn.optional(),footer:f.z.string().optional()});function Yn(e){return e.category===`BLOCK`}function Xn(e){return e.category===`WIDGET`}function Zn(e){return e.category===`FIELD`}var Qn=f.z.enum([`pre-user-registration`,`post-user-registration`,`post-user-login`,`post-user-update`,`validate-registration-username`,`pre-user-deletion`,`post-user-deletion`]),$n=f.z.enum([`post-user-login`]),er=f.z.enum([`post-user-login`,`post-user-registration`,`post-user-update`,`credentials-exchange`]),tr=f.z.enum([`validate-registration-username`,`post-user-login`,`credentials-exchange`,`pre-user-registration`,`post-user-registration`,`pre-user-update`,`post-user-update`,`pre-user-deletion`,`post-user-deletion`,`pre-screen`,`custom-email-provider`,`custom-phone-provider`]),nr=f.z.enum([`post-user-login`]),rr=[{field:`url`,triggers:Qn.options},{field:`form_id`,triggers:$n.options},{field:`template_id`,triggers:er.options},{field:`code_id`,triggers:tr.options},{field:`page_id`,triggers:nr.options}];function ir(e){if(!(!e||typeof e!=`object`)){for(let t of rr)if(typeof Reflect.get(e,t.field)==`string`)return t.triggers}}var ar=f.z.enum([`impersonate`]),or=f.z.enum([`ensure-username`,`set-preferred-username`,`account-linking`]),sr={"ensure-username":{name:`Ensure Username`,description:`Automatically assigns a username to users who sign in without one. Creates a linked username account for social/email users.`,trigger_ids:[`post-user-login`]},"set-preferred-username":{name:`Set Preferred Username`,description:`Sets the preferred_username claim on tokens based on the username from the primary or linked user.`,trigger_ids:[`credentials-exchange`]},"account-linking":{name:`Account Linking`,description:`Links a user to an existing primary account with the same verified email. Idempotent — safe to run on every login, registration, and email update.`,trigger_ids:[`post-user-login`,`post-user-registration`,`post-user-update`]}},cr={enabled:f.z.boolean().default(!1),synchronous:f.z.boolean().default(!1),priority:f.z.number().optional(),hook_id:f.z.string().optional(),metadata:f.z.record(f.z.string(),f.z.unknown()).optional(),...y},lr=f.z.object({...cr,trigger_id:Qn,url:f.z.string()}),ur=f.z.object({...cr,trigger_id:$n,form_id:f.z.string()}),dr=f.z.object({...cr,trigger_id:er,template_id:or}),fr=f.z.object({...cr,trigger_id:tr,code_id:f.z.string()}),pr=f.z.object({...cr,trigger_id:nr,page_id:ar,permission_required:f.z.string().optional()}),mr=f.z.union([lr,ur,dr,fr,pr]),hr=f.z.object({...cr,trigger_id:Qn}).extend(g.shape).extend({hook_id:f.z.string(),url:f.z.string()}),gr=f.z.object({...cr,trigger_id:$n}).extend(g.shape).extend({hook_id:f.z.string(),form_id:f.z.string()}),_r=f.z.object({...cr,trigger_id:er}).extend(g.shape).extend({hook_id:f.z.string(),template_id:or}),vr=f.z.object({...cr,trigger_id:tr}).extend(g.shape).extend({hook_id:f.z.string(),code_id:f.z.string()}),yr=f.z.object({...cr,trigger_id:nr}).extend(g.shape).extend({hook_id:f.z.string(),page_id:ar,permission_required:f.z.string().optional()}),br=f.z.union([hr,gr,_r,vr,yr]),xr=f.z.object({code:f.z.string().max(1e5),secrets:f.z.record(f.z.string(),f.z.string()).optional()}),Sr=xr.extend({id:f.z.string(),tenant_id:f.z.string()}).extend(g.shape),Cr=f.z.object({name:f.z.string().optional()}),wr=f.z.object({email:f.z.string().optional()}),Tr=f.z.object({id:f.z.string().optional(),organization_id:f.z.string().max(50),inviter:Cr,invitee:wr,invitation_url:f.z.string().url(),client_id:f.z.string(),connection_id:f.z.string().optional(),app_metadata:f.z.record(f.z.string(),f.z.any()).default({}).optional(),user_metadata:f.z.record(f.z.string(),f.z.any()).default({}).optional(),ttl_sec:f.z.number().int().max(2592e3).default(604800).optional(),roles:f.z.array(f.z.string()).default([]).optional(),send_invitation_email:f.z.boolean().default(!0).optional()}),Er=f.z.object({id:f.z.string(),organization_id:f.z.string().max(50),created_at:f.z.string().datetime(),expires_at:f.z.string().datetime(),ticket_id:f.z.string().optional()}).extend(Tr.omit({id:!0}).shape),Dr=f.z.object({alg:f.z.enum([`RS256`,`RS384`,`RS512`,`ES256`,`ES384`,`ES512`,`HS256`,`HS384`,`HS512`]).optional(),kid:f.z.string().optional(),kty:f.z.enum([`RSA`,`EC`,`oct`]),use:f.z.enum([`sig`,`enc`]).optional(),n:f.z.string().optional(),e:f.z.string().optional(),crv:f.z.string().optional(),x:f.z.string().optional(),y:f.z.string().optional(),x5t:f.z.string().optional(),"x5t#S256":f.z.string().optional(),x5c:f.z.array(f.z.string()).optional()}).superRefine((e,t)=>{if(e.kty===`RSA`)for(let n of[`n`,`e`])e[n]||t.addIssue({code:f.z.ZodIssueCode.custom,path:[n],message:`RSA JWK is missing required member '${n}'`});else if(e.kty===`EC`)for(let n of[`crv`,`x`,`y`])e[n]||t.addIssue({code:f.z.ZodIssueCode.custom,path:[n],message:`EC JWK is missing required member '${n}'`})}),Or=f.z.object({keys:f.z.array(Dr)}),kr=f.z.object({issuer:f.z.string(),authorization_endpoint:f.z.string(),token_endpoint:f.z.string(),device_authorization_endpoint:f.z.string().optional(),userinfo_endpoint:f.z.string(),jwks_uri:f.z.string(),registration_endpoint:f.z.string().optional(),revocation_endpoint:f.z.string(),end_session_endpoint:f.z.string().optional(),scopes_supported:f.z.array(f.z.string()),response_types_supported:f.z.array(f.z.string()),grant_types_supported:f.z.array(f.z.string()).optional(),code_challenge_methods_supported:f.z.array(f.z.string()),response_modes_supported:f.z.array(f.z.string()),subject_types_supported:f.z.array(f.z.string()),id_token_signing_alg_values_supported:f.z.array(f.z.string()),token_endpoint_auth_methods_supported:f.z.array(f.z.string()),claims_supported:f.z.array(f.z.string()),request_uri_parameter_supported:f.z.boolean(),request_parameter_supported:f.z.boolean(),claims_parameter_supported:f.z.boolean().optional(),request_object_signing_alg_values_supported:f.z.array(f.z.string()).optional(),token_endpoint_auth_signing_alg_values_supported:f.z.array(f.z.string()),client_id_metadata_document_supported:f.z.boolean().optional(),backchannel_logout_supported:f.z.boolean().optional(),backchannel_logout_session_supported:f.z.boolean().optional()}),T=function(e){return e.PENDING=`pending`,e.AUTHENTICATED=`authenticated`,e.AWAITING_EMAIL_VERIFICATION=`awaiting_email_verification`,e.AWAITING_MFA=`awaiting_mfa`,e.AWAITING_HOOK=`awaiting_hook`,e.AWAITING_CONTINUATION=`awaiting_continuation`,e.AWAITING_CONSENT=`awaiting_consent`,e.COMPLETED=`completed`,e.FAILED=`failed`,e.EXPIRED=`expired`,e}({}),Ar=f.z.nativeEnum(T),jr=f.z.object({strategy:f.z.string(),strategy_type:f.z.string()}),Mr=f.z.object({csrf_token:f.z.string(),auth0Client:f.z.string().optional(),authParams:Pt,expires_at:f.z.string(),deleted_at:f.z.string().optional(),ip:f.z.string().optional(),useragent:f.z.string().optional(),session_id:f.z.string().optional(),authorization_url:f.z.string().optional(),state:Ar.optional().default(`pending`),state_data:f.z.string().optional(),failure_reason:f.z.string().optional(),user_id:f.z.string().optional(),auth_connection:f.z.string().optional(),auth_strategy:jr.optional(),authenticated_at:f.z.string().optional()}).openapi({description:`This represents a login sesion`}),Nr=Mr.extend({id:f.z.string().openapi({description:`This is is used as the state in the universal login`}),created_at:f.z.string(),updated_at:f.z.string(),tenant_id:f.z.string().optional()}),E={ACLS_SUMMARY:`acls_summary`,ACTIONS_EXECUTION_FAILED:`actions_execution_failed`,API_LIMIT:`api_limit`,API_LIMIT_WARNING:`api_limit_warning`,APPI:`appi`,CIBA_EXCHANGE_FAILED:`ciba_exchange_failed`,CIBA_EXCHANGE_SUCCEEDED:`ciba_exchange_succeeded`,CIBA_START_FAILED:`ciba_start_failed`,CIBA_START_SUCCEEDED:`ciba_start_succeeded`,CODE_LINK_SENT:`cls`,CODE_SENT:`cs`,DEPRECATION_NOTICE:`depnote`,CONFIG_INHERITANCE_DIFF:`cfgdiff`,CONFIG_DRIFT:`cfgdrift`,FAILED_LOGIN:`f`,FAILED_BY_CONNECTOR:`fc`,FAILED_CHANGE_EMAIL:`fce`,FAILED_BY_CORS:`fco`,FAILED_CROSS_ORIGIN_AUTHENTICATION:`fcoa`,FAILED_CHANGE_PASSWORD:`fcp`,FAILED_POST_CHANGE_PASSWORD_HOOK:`fcph`,FAILED_CHANGE_PHONE_NUMBER:`fcpn`,FAILED_CHANGE_PASSWORD_REQUEST:`fcpr`,FAILED_CONNECTOR_PROVISIONING:`fcpro`,FAILED_CHANGE_USERNAME:`fcu`,FAILED_DELEGATION:`fd`,FAILED_DEVICE_ACTIVATION:`fdeac`,FAILED_DEVICE_AUTHORIZATION_REQUEST:`fdeaz`,USER_CANCELED_DEVICE_CONFIRMATION:`fdecc`,FAILED_USER_DELETION:`fdu`,FAILED_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN:`feacft`,FAILED_EXCHANGE_ACCESS_TOKEN_FOR_CLIENT_CREDENTIALS:`feccft`,FAILED_EXCHANGE_CUSTOM_TOKEN:`fecte`,FAILED_EXCHANGE_DEVICE_CODE_FOR_ACCESS_TOKEN:`fede`,FAILED_FEDERATED_LOGOUT:`federated_logout_failed`,FAILED_EXCHANGE_NATIVE_SOCIAL_LOGIN:`fens`,FAILED_EXCHANGE_PASSWORD_OOB_FOR_ACCESS_TOKEN:`feoobft`,FAILED_EXCHANGE_PASSWORD_OTP_FOR_ACCESS_TOKEN:`feotpft`,FAILED_EXCHANGE_PASSWORD_FOR_ACCESS_TOKEN:`fepft`,FAILED_EXCHANGE_PASSWORDLESS_OTP_FOR_ACCESS_TOKEN:`fepotpft`,FAILED_EXCHANGE_PASSWORD_MFA_RECOVERY_FOR_ACCESS_TOKEN:`fercft`,FAILED_EXCHANGE_ROTATING_REFRESH_TOKEN:`ferrt`,FAILED_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN:`fertft`,FAILED_EXCHANGE_SUBJECT_TOKEN_FOR_ACCESS_TOKEN:`festft`,FAILED_HOOK:`fh`,FAILED_IMPERSONATION:`fimp`,FAILED_INVITE_ACCEPT:`fi`,FAILED_LOGOUT:`flo`,FLOWS_EXECUTION_COMPLETED:`flows_execution_completed`,FLOWS_EXECUTION_FAILED:`flows_execution_failed`,FAILED_SENDING_NOTIFICATION:`fn`,FORMS_SUBMISSION_FAILED:`forms_submission_failed`,FORMS_SUBMISSION_SUCCEEDED:`forms_submission_succeeded`,FAILED_LOGIN_INCORRECT_PASSWORD:`fp`,FAILED_PUSHED_AUTHORIZATION_REQUEST:`fpar`,FAILED_POST_USER_REGISTRATION_HOOK:`fpurh`,FAILED_SIGNUP:`fs`,FAILED_SILENT_AUTH:`fsa`,FAILED_LOGIN_INVALID_EMAIL_USERNAME:`fu`,FAILED_USERS_IMPORT:`fui`,FAILED_VERIFICATION_EMAIL:`fv`,FAILED_VERIFICATION_EMAIL_REQUEST:`fvr`,EMAIL_VERIFICATION_CONFIRMED:`gd_auth_email_verification`,EMAIL_VERIFICATION_FAILED:`gd_auth_fail_email_verification`,MFA_AUTH_FAILED:`gd_auth_failed`,MFA_AUTH_REJECTED:`gd_auth_rejected`,MFA_AUTH_SUCCESS:`gd_auth_succeed`,MFA_ENROLLMENT_COMPLETE:`gd_enrollment_complete`,TOO_MANY_MFA_FAILURES:`gd_otp_rate_limit_exceed`,MFA_RECOVERY_FAILED:`gd_recovery_failed`,MFA_RECOVERY_RATE_LIMIT_EXCEED:`gd_recovery_rate_limit_exceed`,MFA_RECOVERY_SUCCESS:`gd_recovery_succeed`,MFA_EMAIL_SENT:`gd_send_email`,EMAIL_VERIFICATION_SENT:`gd_send_email_verification`,EMAIL_VERIFICATION_SEND_FAILURE:`gd_send_email_verification_failure`,PUSH_NOTIFICATION_SENT:`gd_send_pn`,ERROR_SENDING_MFA_PUSH_NOTIFICATION:`gd_send_pn_failure`,MFA_SMS_SENT:`gd_send_sms`,ERROR_SENDING_MFA_SMS:`gd_send_sms_failure`,MFA_VOICE_CALL_SUCCESS:`gd_send_voice`,MFA_VOICE_CALL_FAILED:`gd_send_voice_failure`,SECOND_FACTOR_STARTED:`gd_start_auth`,MFA_ENROLL_STARTED:`gd_start_enroll`,MFA_ENROLLMENT_FAILED:`gd_start_enroll_failed`,GUARDIAN_TENANT_UPDATE:`gd_tenant_update`,UNENROLL_DEVICE_ACCOUNT:`gd_unenroll`,UPDATE_DEVICE_ACCOUNT:`gd_update_device_account`,WEBAUTHN_CHALLENGE_FAILED:`gd_webauthn_challenge_failed`,WEBAUTHN_ENROLLMENT_FAILED:`gd_webauthn_enrollment_failed`,FAILED_KMS_API_OPERATION:`kms_key_management_failure`,SUCCESS_KMS_API_OPERATION:`kms_key_management_success`,KMS_KEY_STATE_CHANGED:`kms_key_state_changed`,TOO_MANY_CALLS_TO_DELEGATION:`limit_delegation`,BLOCKED_IP_ADDRESS:`limit_mu`,BLOCKED_ACCOUNT_IP:`limit_sul`,BLOCKED_ACCOUNT_EMAIL:`limit_wc`,INFORMATION:`i`,MFA_REQUIRED:`mfar`,MANAGEMENT_API_READ_OPERATION:`mgmt_api_read`,FAILED_AUTHENTICATION_METHOD_OPERATION_MY_ACCOUNT:`my_account_authentication_method_failed`,SUCCESSFUL_AUTHENTICATION_METHOD_OPERATION_MY_ACCOUNT:`my_account_authentication_method_succeeded`,FAILED_OIDC_BACKCHANNEL_LOGOUT:`oidc_backchannel_logout_failed`,SUCCESSFUL_OIDC_BACKCHANNEL_LOGOUT:`oidc_backchannel_logout_succeeded`,ORGANIZATION_MEMBER_ADDED:`organization_member_added`,PASSKEY_CHALLENGE_FAILED:`passkey_challenge_failed`,PASSKEY_CHALLENGE_STARTED:`passkey_challenge_started`,PRE_LOGIN_ASSESSMENT:`pla`,BREACHED_PASSWORD:`pwd_leak`,BREACHED_PASSWORD_ON_RESET:`reset_pwd_leak`,SUCCESS_RESOURCE_CLEANUP:`resource_cleanup`,RICH_CONSENTS_ACCESS_ERROR:`rich_consents_access_error`,SUCCESS_LOGIN:`s`,SUCCESS_API_OPERATION:`sapi`,FAILED_API_OPERATION:`fapi`,SUCCESS_CHANGE_EMAIL:`sce`,SUCCESS_CROSS_ORIGIN_AUTHENTICATION:`scoa`,SUCCESS_CHANGE_PASSWORD:`scp`,SUCCESS_CHANGE_PHONE_NUMBER:`scpn`,SUCCESS_CHANGE_PASSWORD_REQUEST:`scpr`,SUCCESS_CHANGE_USERNAME:`scu`,SUCCESS_CREDENTIAL_VALIDATION:`scv`,SUCCESS_DELEGATION:`sd`,SUCCESS_USER_DELETION:`sdu`,SUCCESS_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN:`seacft`,SUCCESS_EXCHANGE_ACCESS_TOKEN_FOR_CLIENT_CREDENTIALS:`seccft`,SUCCESS_EXCHANGE_CUSTOM_TOKEN:`secte`,SUCCESS_EXCHANGE_DEVICE_CODE_FOR_ACCESS_TOKEN:`sede`,SUCCESS_EXCHANGE_NATIVE_SOCIAL_LOGIN:`sens`,SUCCESS_EXCHANGE_PASSWORD_OOB_FOR_ACCESS_TOKEN:`seoobft`,SUCCESS_EXCHANGE_PASSWORD_OTP_FOR_ACCESS_TOKEN:`seotpft`,SUCCESS_EXCHANGE_PASSWORDLESS_OTP_FOR_ACCESS_TOKEN:`sepotpft`,SUCCESS_EXCHANGE_PASSWORD_FOR_ACCESS_TOKEN:`sepft`,SUCCESS_EXCHANGE_PASSKEY_OOB_FOR_ACCESS_TOKEN:`sepkoobft`,SUCCESS_EXCHANGE_PASSKEY_OTP_FOR_ACCESS_TOKEN:`sepkotpft`,SUCCESS_EXCHANGE_PASSKEY_MFA_RECOVERY_FOR_ACCESS_TOKEN:`sepkrcft`,SUCCESS_EXCHANGE_PASSWORD_MFA_RECOVERY_FOR_ACCESS_TOKEN:`sercft`,SUCCESS_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN:`sertft`,SUCCESS_EXCHANGE_SUBJECT_TOKEN_FOR_ACCESS_TOKEN:`sestft`,SUCCESS_IMPERSONATION:`simp`,SUCCESSFULLY_ACCEPTED_USER_INVITE:`si`,BREACHED_PASSWORD_ON_SIGNUP:`signup_pwd_leak`,SUCCESS_LOGOUT:`slo`,SUCCESS_HOOK:`sh`,SUCCESS_PASSWORD_MIGRATION:`spm`,SUCCESS_REVOCATION:`srrt`,SUCCESS_SIGNUP:`ss`,FAILED_SS_SSO_OPERATION:`ss_sso_failure`,INFORMATION_FROM_SS_SSO_OPERATION:`ss_sso_info`,SUCCESS_SS_SSO_OPERATION:`ss_sso_success`,SUCCESS_SILENT_AUTH:`ssa`,SUCCESSFUL_SCIM_OPERATION:`sscim`,SUCCESSFULLY_IMPORTED_USERS:`sui`,SUCCESS_VERIFICATION_EMAIL:`sv`,SUCCESS_VERIFICATION_EMAIL_REQUEST:`svr`,MAX_AMOUNT_OF_AUTHENTICATORS:`too_many_records`,USER_LOGIN_BLOCK_RELEASED:`ublkdu`,FAILED_UNIVERSAL_LOGOUT:`universal_logout_failed`,SUCCESSFUL_UNIVERSAL_LOGOUT:`universal_logout_succeeded`,WARNING_DURING_LOGIN:`w`,WARNING_SENDING_NOTIFICATION:`wn`,WARNING_USER_MANAGEMENT:`wum`},Pr=f.z.string().refine(e=>Object.values(E).includes(e),{message:`Invalid log type`}),Fr={[E.ACLS_SUMMARY]:`ACLs Summary`,[E.ACTIONS_EXECUTION_FAILED]:`Actions Execution Failed`,[E.API_LIMIT]:`API Rate Limit Reached`,[E.API_LIMIT_WARNING]:`API Rate Limit Warning`,[E.APPI]:`API Operation`,[E.CIBA_EXCHANGE_FAILED]:`CIBA Exchange Failed`,[E.CIBA_EXCHANGE_SUCCEEDED]:`CIBA Exchange Succeeded`,[E.CIBA_START_FAILED]:`CIBA Start Failed`,[E.CIBA_START_SUCCEEDED]:`CIBA Start Succeeded`,[E.CODE_LINK_SENT]:`Code/Link Sent`,[E.CODE_SENT]:`Code Sent`,[E.DEPRECATION_NOTICE]:`Deprecation Notice`,[E.CONFIG_INHERITANCE_DIFF]:`Config Inheritance Shadow Difference`,[E.CONFIG_DRIFT]:`Config Drift`,[E.FAILED_LOGIN]:`Failed Login`,[E.FAILED_BY_CONNECTOR]:`Failed by Connector`,[E.FAILED_CHANGE_EMAIL]:`Failed Change Email`,[E.FAILED_BY_CORS]:`Failed by CORS`,[E.FAILED_CROSS_ORIGIN_AUTHENTICATION]:`Failed Cross Origin Authentication`,[E.FAILED_CHANGE_PASSWORD]:`Failed Change Password`,[E.FAILED_POST_CHANGE_PASSWORD_HOOK]:`Failed Post-Change Password Hook`,[E.FAILED_CHANGE_PHONE_NUMBER]:`Failed Change Phone Number`,[E.FAILED_CHANGE_PASSWORD_REQUEST]:`Failed Change Password Request`,[E.FAILED_CONNECTOR_PROVISIONING]:`Failed Connector Provisioning`,[E.FAILED_CHANGE_USERNAME]:`Failed Change Username`,[E.FAILED_DELEGATION]:`Failed Delegation`,[E.FAILED_DEVICE_ACTIVATION]:`Failed Device Activation`,[E.FAILED_DEVICE_AUTHORIZATION_REQUEST]:`Failed Device Authorization Request`,[E.USER_CANCELED_DEVICE_CONFIRMATION]:`User Canceled Device Confirmation`,[E.FAILED_USER_DELETION]:`Failed User Deletion`,[E.FAILED_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN]:`Failed Exchange Authorization Code for Access Token`,[E.FAILED_EXCHANGE_ACCESS_TOKEN_FOR_CLIENT_CREDENTIALS]:`Failed Exchange Access Token for Client Credentials`,[E.FAILED_EXCHANGE_CUSTOM_TOKEN]:`Failed Exchange Custom Token`,[E.FAILED_EXCHANGE_DEVICE_CODE_FOR_ACCESS_TOKEN]:`Failed Exchange Device Code for Access Token`,[E.FAILED_FEDERATED_LOGOUT]:`Failed Federated Logout`,[E.FAILED_EXCHANGE_NATIVE_SOCIAL_LOGIN]:`Failed Exchange Native Social Login`,[E.FAILED_EXCHANGE_PASSWORD_OOB_FOR_ACCESS_TOKEN]:`Failed Exchange Password OOB for Access Token`,[E.FAILED_EXCHANGE_PASSWORD_OTP_FOR_ACCESS_TOKEN]:`Failed Exchange Password OTP for Access Token`,[E.FAILED_EXCHANGE_PASSWORD_FOR_ACCESS_TOKEN]:`Failed Exchange Password for Access Token`,[E.FAILED_EXCHANGE_PASSWORDLESS_OTP_FOR_ACCESS_TOKEN]:`Failed Exchange Passwordless OTP for Access Token`,[E.FAILED_EXCHANGE_PASSWORD_MFA_RECOVERY_FOR_ACCESS_TOKEN]:`Failed Exchange Password MFA Recovery for Access Token`,[E.FAILED_EXCHANGE_ROTATING_REFRESH_TOKEN]:`Failed Exchange Rotating Refresh Token`,[E.FAILED_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN]:`Failed Exchange Refresh Token for Access Token`,[E.FAILED_EXCHANGE_SUBJECT_TOKEN_FOR_ACCESS_TOKEN]:`Failed Exchange Subject Token for Access Token`,[E.FAILED_HOOK]:`Failed Hook`,[E.FAILED_IMPERSONATION]:`Failed Impersonation`,[E.FAILED_INVITE_ACCEPT]:`Failed Invite Accept`,[E.FAILED_LOGOUT]:`Failed Logout`,[E.FLOWS_EXECUTION_COMPLETED]:`Flows Execution Completed`,[E.FLOWS_EXECUTION_FAILED]:`Flows Execution Failed`,[E.FAILED_SENDING_NOTIFICATION]:`Failed Sending Notification`,[E.FORMS_SUBMISSION_FAILED]:`Forms Submission Failed`,[E.FORMS_SUBMISSION_SUCCEEDED]:`Forms Submission Succeeded`,[E.FAILED_LOGIN_INCORRECT_PASSWORD]:`Failed Login - Incorrect Password`,[E.FAILED_PUSHED_AUTHORIZATION_REQUEST]:`Failed Pushed Authorization Request`,[E.FAILED_POST_USER_REGISTRATION_HOOK]:`Failed Post-User Registration Hook`,[E.FAILED_SIGNUP]:`Failed Signup`,[E.FAILED_SILENT_AUTH]:`Failed Silent Auth`,[E.FAILED_LOGIN_INVALID_EMAIL_USERNAME]:`Failed Login - Invalid Email/Username`,[E.FAILED_USERS_IMPORT]:`Failed Users Import`,[E.FAILED_VERIFICATION_EMAIL]:`Failed Verification Email`,[E.FAILED_VERIFICATION_EMAIL_REQUEST]:`Failed Verification Email Request`,[E.EMAIL_VERIFICATION_CONFIRMED]:`Email Verification Confirmed`,[E.EMAIL_VERIFICATION_FAILED]:`Email Verification Failed`,[E.MFA_AUTH_FAILED]:`MFA Auth Failed`,[E.MFA_AUTH_REJECTED]:`MFA Auth Rejected`,[E.MFA_AUTH_SUCCESS]:`MFA Auth Success`,[E.MFA_ENROLLMENT_COMPLETE]:`MFA Enrollment Complete`,[E.TOO_MANY_MFA_FAILURES]:`Too Many MFA Failures`,[E.MFA_RECOVERY_FAILED]:`MFA Recovery Failed`,[E.MFA_RECOVERY_RATE_LIMIT_EXCEED]:`MFA Recovery Rate Limit Exceeded`,[E.MFA_RECOVERY_SUCCESS]:`MFA Recovery Success`,[E.MFA_EMAIL_SENT]:`MFA Email Sent`,[E.EMAIL_VERIFICATION_SENT]:`Email Verification Sent`,[E.EMAIL_VERIFICATION_SEND_FAILURE]:`Email Verification Send Failure`,[E.PUSH_NOTIFICATION_SENT]:`Push Notification Sent`,[E.ERROR_SENDING_MFA_PUSH_NOTIFICATION]:`Error Sending MFA Push Notification`,[E.MFA_SMS_SENT]:`MFA SMS Sent`,[E.ERROR_SENDING_MFA_SMS]:`Error Sending MFA SMS`,[E.MFA_VOICE_CALL_SUCCESS]:`MFA Voice Call Success`,[E.MFA_VOICE_CALL_FAILED]:`MFA Voice Call Failed`,[E.SECOND_FACTOR_STARTED]:`Second Factor Started`,[E.MFA_ENROLL_STARTED]:`MFA Enroll Started`,[E.MFA_ENROLLMENT_FAILED]:`MFA Enrollment Failed`,[E.GUARDIAN_TENANT_UPDATE]:`Guardian Tenant Update`,[E.UNENROLL_DEVICE_ACCOUNT]:`Unenroll Device Account`,[E.UPDATE_DEVICE_ACCOUNT]:`Update Device Account`,[E.WEBAUTHN_CHALLENGE_FAILED]:`WebAuthn Challenge Failed`,[E.WEBAUTHN_ENROLLMENT_FAILED]:`WebAuthn Enrollment Failed`,[E.FAILED_KMS_API_OPERATION]:`Failed KMS API Operation`,[E.SUCCESS_KMS_API_OPERATION]:`Success KMS API Operation`,[E.KMS_KEY_STATE_CHANGED]:`KMS Key State Changed`,[E.TOO_MANY_CALLS_TO_DELEGATION]:`Too Many Calls to Delegation`,[E.BLOCKED_IP_ADDRESS]:`Blocked IP Address`,[E.BLOCKED_ACCOUNT_IP]:`Blocked Account (IP)`,[E.BLOCKED_ACCOUNT_EMAIL]:`Blocked Account (Email)`,[E.INFORMATION]:`Information`,[E.MFA_REQUIRED]:`MFA Required`,[E.MANAGEMENT_API_READ_OPERATION]:`Management API Read Operation`,[E.FAILED_AUTHENTICATION_METHOD_OPERATION_MY_ACCOUNT]:`Failed Authentication Method Operation (My Account)`,[E.SUCCESSFUL_AUTHENTICATION_METHOD_OPERATION_MY_ACCOUNT]:`Successful Authentication Method Operation (My Account)`,[E.FAILED_OIDC_BACKCHANNEL_LOGOUT]:`Failed OIDC Backchannel Logout`,[E.SUCCESSFUL_OIDC_BACKCHANNEL_LOGOUT]:`Successful OIDC Backchannel Logout`,[E.ORGANIZATION_MEMBER_ADDED]:`Organization Member Added`,[E.PASSKEY_CHALLENGE_FAILED]:`Passkey Challenge Failed`,[E.PASSKEY_CHALLENGE_STARTED]:`Passkey Challenge Started`,[E.PRE_LOGIN_ASSESSMENT]:`Pre-Login Assessment`,[E.BREACHED_PASSWORD]:`Breached Password`,[E.BREACHED_PASSWORD_ON_RESET]:`Breached Password on Reset`,[E.SUCCESS_RESOURCE_CLEANUP]:`Success Resource Cleanup`,[E.RICH_CONSENTS_ACCESS_ERROR]:`Rich Consents Access Error`,[E.SUCCESS_LOGIN]:`Success Login`,[E.SUCCESS_API_OPERATION]:`Success API Operation`,[E.FAILED_API_OPERATION]:`Failed API Operation`,[E.SUCCESS_CHANGE_EMAIL]:`Success Change Email`,[E.SUCCESS_CROSS_ORIGIN_AUTHENTICATION]:`Success Cross Origin Authentication`,[E.SUCCESS_CHANGE_PASSWORD]:`Success Change Password`,[E.SUCCESS_CHANGE_PHONE_NUMBER]:`Success Change Phone Number`,[E.SUCCESS_CHANGE_PASSWORD_REQUEST]:`Success Change Password Request`,[E.SUCCESS_CHANGE_USERNAME]:`Success Change Username`,[E.SUCCESS_CREDENTIAL_VALIDATION]:`Success Credential Validation`,[E.SUCCESS_DELEGATION]:`Success Delegation`,[E.SUCCESS_USER_DELETION]:`Success User Deletion`,[E.SUCCESS_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN]:`Success Exchange Authorization Code for Access Token`,[E.SUCCESS_EXCHANGE_ACCESS_TOKEN_FOR_CLIENT_CREDENTIALS]:`Success Exchange Access Token for Client Credentials`,[E.SUCCESS_EXCHANGE_CUSTOM_TOKEN]:`Success Exchange Custom Token`,[E.SUCCESS_EXCHANGE_DEVICE_CODE_FOR_ACCESS_TOKEN]:`Success Exchange Device Code for Access Token`,[E.SUCCESS_EXCHANGE_NATIVE_SOCIAL_LOGIN]:`Success Exchange Native Social Login`,[E.SUCCESS_EXCHANGE_PASSWORD_OOB_FOR_ACCESS_TOKEN]:`Success Exchange Password OOB for Access Token`,[E.SUCCESS_EXCHANGE_PASSWORD_OTP_FOR_ACCESS_TOKEN]:`Success Exchange Password OTP for Access Token`,[E.SUCCESS_EXCHANGE_PASSWORDLESS_OTP_FOR_ACCESS_TOKEN]:`Success Exchange Passwordless OTP for Access Token`,[E.SUCCESS_EXCHANGE_PASSWORD_FOR_ACCESS_TOKEN]:`Success Exchange Password for Access Token`,[E.SUCCESS_EXCHANGE_PASSKEY_OOB_FOR_ACCESS_TOKEN]:`Success Exchange Passkey OOB for Access Token`,[E.SUCCESS_EXCHANGE_PASSKEY_OTP_FOR_ACCESS_TOKEN]:`Success Exchange Passkey OTP for Access Token`,[E.SUCCESS_EXCHANGE_PASSKEY_MFA_RECOVERY_FOR_ACCESS_TOKEN]:`Success Exchange Passkey MFA Recovery for Access Token`,[E.SUCCESS_EXCHANGE_PASSWORD_MFA_RECOVERY_FOR_ACCESS_TOKEN]:`Success Exchange Password MFA Recovery for Access Token`,[E.SUCCESS_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN]:`Success Exchange Refresh Token for Access Token`,[E.SUCCESS_EXCHANGE_SUBJECT_TOKEN_FOR_ACCESS_TOKEN]:`Success Exchange Subject Token for Access Token`,[E.SUCCESS_IMPERSONATION]:`Success Impersonation`,[E.SUCCESSFULLY_ACCEPTED_USER_INVITE]:`Successfully Accepted User Invite`,[E.BREACHED_PASSWORD_ON_SIGNUP]:`Breached Password on Signup`,[E.SUCCESS_LOGOUT]:`Success Logout`,[E.SUCCESS_HOOK]:`Success Hook`,[E.SUCCESS_PASSWORD_MIGRATION]:`Success Password Migration`,[E.SUCCESS_REVOCATION]:`Success Revocation`,[E.SUCCESS_SIGNUP]:`Success Signup`,[E.FAILED_SS_SSO_OPERATION]:`Failed SS SSO Operation`,[E.INFORMATION_FROM_SS_SSO_OPERATION]:`Information from SS SSO Operation`,[E.SUCCESS_SS_SSO_OPERATION]:`Success SS SSO Operation`,[E.SUCCESS_SILENT_AUTH]:`Success Silent Auth`,[E.SUCCESSFUL_SCIM_OPERATION]:`Successful SCIM Operation`,[E.SUCCESSFULLY_IMPORTED_USERS]:`Successfully Imported Users`,[E.SUCCESS_VERIFICATION_EMAIL]:`Success Verification Email`,[E.SUCCESS_VERIFICATION_EMAIL_REQUEST]:`Success Verification Email Request`,[E.MAX_AMOUNT_OF_AUTHENTICATORS]:`Max Amount of Authenticators`,[E.USER_LOGIN_BLOCK_RELEASED]:`User Login Block Released`,[E.FAILED_UNIVERSAL_LOGOUT]:`Failed Universal Logout`,[E.SUCCESSFUL_UNIVERSAL_LOGOUT]:`Successful Universal Logout`,[E.WARNING_DURING_LOGIN]:`Warning During Login`,[E.WARNING_SENDING_NOTIFICATION]:`Warning Sending Notification`,[E.WARNING_USER_MANAGEMENT]:`Warning User Management`},Ir=(()=>{let e={};for(let[t,n]of Object.entries(E))t.startsWith(`SUCCESS_`)||t.startsWith(`SUCCESSFUL_`)||t.startsWith(`SUCCESSFULLY_`)||t.endsWith(`_SUCCEEDED`)||t.endsWith(`_COMPLETED`)?e[n]=`success`:t.startsWith(`FAILED_`)||t.startsWith(`ERROR_`)||t.startsWith(`BREACHED_`)||t.startsWith(`BLOCKED_`)||t===`MFA_AUTH_FAILED`||t===`MFA_AUTH_REJECTED`||t===`MFA_RECOVERY_FAILED`||t===`MFA_ENROLLMENT_FAILED`||t===`EMAIL_VERIFICATION_FAILED`||t===`WEBAUTHN_CHALLENGE_FAILED`||t===`WEBAUTHN_ENROLLMENT_FAILED`||t===`PASSKEY_CHALLENGE_FAILED`||t===`FLOWS_EXECUTION_FAILED`||t===`FORMS_SUBMISSION_FAILED`||t===`CIBA_EXCHANGE_FAILED`||t===`CIBA_START_FAILED`||t===`ACTIONS_EXECUTION_FAILED`||t===`RICH_CONSENTS_ACCESS_ERROR`||t===`USER_CANCELED_DEVICE_CONFIRMATION`||t===`TOO_MANY_MFA_FAILURES`||t===`MFA_RECOVERY_RATE_LIMIT_EXCEED`||t===`API_LIMIT`||t===`MAX_AMOUNT_OF_AUTHENTICATORS`?e[n]=`failure`:t.startsWith(`WARNING_`)||t===`API_LIMIT_WARNING`||t===`DEPRECATION_NOTICE`||t===`PRE_LOGIN_ASSESSMENT`?e[n]=`warning`:t===`CODE_SENT`||t===`CODE_LINK_SENT`||t===`MFA_EMAIL_SENT`||t===`MFA_SMS_SENT`||t===`EMAIL_VERIFICATION_SENT`||t===`PUSH_NOTIFICATION_SENT`?e[n]=`code_sent`:t===`INFORMATION`||t===`INFORMATION_FROM_SS_SSO_OPERATION`||t===`MANAGEMENT_API_READ_OPERATION`||t===`APPI`||t===`CONFIG_INHERITANCE_DIFF`||t===`CONFIG_DRIFT`||t===`ACLS_SUMMARY`||t===`ORGANIZATION_MEMBER_ADDED`?e[n]=`info`:e[n]=`other`;return e})();function Lr(e){return Fr[e]??e}function Rr(e){return Ir[e]??`other`}var zr=f.z.object({name:f.z.string(),version:f.z.string(),env:f.z.object({node:f.z.string().optional()}).optional()}),Br=f.z.object({country_code:f.z.string().length(2),city_name:f.z.string(),latitude:f.z.string(),longitude:f.z.string(),time_zone:f.z.string(),continent_code:f.z.string()}),Vr=f.z.object({type:Pr,date:f.z.string(),description:f.z.string().optional(),ip:f.z.string().optional(),user_agent:f.z.string().optional(),details:f.z.any().optional(),isMobile:f.z.boolean(),user_id:f.z.string().optional(),user_name:f.z.string().optional(),connection:f.z.string().optional(),connection_id:f.z.string().optional(),client_id:f.z.string().optional(),client_name:f.z.string().optional(),audience:f.z.string().optional(),scope:f.z.string().optional(),strategy:f.z.string().optional(),strategy_type:f.z.string().optional(),hostname:f.z.string().optional(),auth0_client:zr.optional(),log_id:f.z.string().optional(),location_info:Br.optional()}),Hr=Vr.extend({log_id:f.z.string()}),Ur=f.z.enum([`http`,`eventbridge`,`eventgrid`,`splunk`,`datadog`,`sumo`,`firehose`]),Wr=f.z.enum([`active`,`paused`,`suspended`]),Gr=f.z.object({type:f.z.string(),name:f.z.string()}),Kr=f.z.object({name:f.z.string(),type:Ur,status:Wr.optional(),sink:f.z.record(f.z.string(),f.z.unknown()),filters:f.z.array(Gr).optional(),isPriority:f.z.boolean().optional()}),qr=Kr.extend({id:f.z.string(),status:Wr,created_at:f.z.string().optional(),updated_at:f.z.string().optional()}),Jr=f.z.enum([`auth0`,`cognito`,`okta`,`oidc`]),Yr=f.z.object({domain:f.z.string(),client_id:f.z.string(),client_secret:We(),audience:f.z.string().optional(),scope:f.z.string().optional()}),Xr=f.z.object({id:f.z.string().optional(),name:f.z.string(),provider:Jr,connection:f.z.string(),enabled:f.z.boolean().default(!0),credentials:Yr}),Zr=f.z.object({id:f.z.string(),created_at:f.z.string(),updated_at:f.z.string()}).extend(Xr.shape),Qr=f.z.object({enabled:f.z.boolean().optional(),shields:f.z.array(f.z.string()).optional(),admin_notification_frequency:f.z.array(f.z.string()).optional(),method:f.z.string().optional(),stage:f.z.object({"pre-user-registration":f.z.object({shields:f.z.array(f.z.string()).optional()}).optional(),"pre-change-password":f.z.object({shields:f.z.array(f.z.string()).optional()}).optional()}).optional()}),$r=f.z.object({enabled:f.z.boolean().optional(),shields:f.z.array(f.z.string()).optional(),allowlist:f.z.array(f.z.string()).optional(),mode:f.z.string().optional(),max_attempts:f.z.number().optional()}),ei=f.z.object({enabled:f.z.boolean().optional(),shields:f.z.array(f.z.string()).optional(),allowlist:f.z.array(f.z.string()).optional(),stage:f.z.object({"pre-login":f.z.object({max_attempts:f.z.number().optional(),rate:f.z.number().optional()}).optional(),"pre-user-registration":f.z.object({max_attempts:f.z.number().optional(),rate:f.z.number().optional()}).optional()}).optional()}),ti=f.z.object({breached_password_detection:Qr.optional(),brute_force_protection:$r.optional(),suspicious_ip_throttling:ei.optional()}),ni=f.z.object({id:f.z.string().optional(),user_id:f.z.string(),password:f.z.string(),algorithm:f.z.enum([`bcrypt`,`argon2id`]).default(`argon2id`),is_current:f.z.boolean().default(!0)}),ri=ni.extend({id:f.z.string(),created_at:f.z.string(),updated_at:f.z.string()}),ii=f.z.object({initial_user_agent:f.z.string().describe(`First user agent of the device from which this user logged in`),initial_ip:f.z.string().describe(`First IP address associated with this session`),initial_asn:f.z.string().describe(`First autonomous system number associated with this session`),last_user_agent:f.z.string().describe(`Last user agent of the device from which this user logged in`),last_ip:f.z.string().describe(`Last IP address from which this user logged in`),last_asn:f.z.string().describe(`Last autonomous system number from which this user logged in`)}),ai=f.z.object({name:f.z.string().describe(`Authentication method name, e.g. "mfa" for a completed second factor`),timestamp:f.z.string().describe(`When the method was completed (ISO 8601)`),type:f.z.string().optional().describe(`For "mfa": the authentication method type used, e.g. "totp", "phone", "passkey"`)}),oi=f.z.object({methods:f.z.array(ai)}),si=f.z.object({id:f.z.string(),revoked_at:f.z.string().optional(),used_at:f.z.string().optional(),user_id:f.z.string().describe(`The user ID associated with the session`),expires_at:f.z.string().optional(),login_session_id:f.z.string(),idle_expires_at:f.z.string().optional(),device:ii.describe(`Metadata related to the device used in the session`),clients:f.z.array(f.z.string()).describe(`List of client details for the session`),authentication:oi.optional().describe(`Authentication methods completed in this session (currently MFA only)`),session_transfer:$e.optional().describe(`Set when the session was created by redeeming a session_transfer_token`)}),ci=f.z.object({created_at:f.z.string(),updated_at:f.z.string(),authenticated_at:f.z.string(),last_interaction_at:f.z.string()}).extend(si.shape),li=f.z.object({kid:f.z.string().openapi({description:`The key id of the signing key`}),tenant_id:f.z.string().optional().openapi({description:`The tenant the key belongs to. Omitted means the key is shared / control-plane scoped.`}),cert:f.z.string().openapi({description:`The public certificate of the signing key`}),fingerprint:f.z.string().openapi({description:`The cert fingerprint`}),thumbprint:f.z.string().openapi({description:`The cert thumbprint`}),pkcs7:f.z.string().optional().openapi({description:`The private key in pkcs7 format`}),current:f.z.boolean().optional().openapi({description:`True if the key is the current key`}),next:f.z.boolean().optional().openapi({description:`True if the key is the next key`}),previous:f.z.boolean().optional().openapi({description:`True if the key is the previous key`}),current_since:f.z.string().optional().openapi({description:`The date and time when the key became the current key`}),current_until:f.z.string().optional().openapi({description:`The date and time when the current key was rotated`}),revoked:f.z.boolean().optional().openapi({description:`True if the key is revoked`}),revoked_at:f.z.string().optional().openapi({description:`The date and time when the key was revoked`}),connection:f.z.string().optional().openapi({description:`The connection identifier associated with the key`}),type:f.z.enum([`jwt_signing`,`saml_encryption`]).openapi({description:`The type of the signing key`})}),ui=f.z.enum([`never`,`always`,`all-applications`,`confidence-score`]),di=365,fi={allow_remember_browser:f.z.boolean().optional(),remember_browser_lifetime_in_days:f.z.number().int().min(1).max(365).optional()},pi=f.z.object({idle_session_lifetime:f.z.number().default(72),session_lifetime:f.z.number().default(168),session_cookie:f.z.object({mode:f.z.enum([`persistent`,`non-persistent`]).optional()}).optional(),enable_client_connections:f.z.boolean().optional(),default_redirection_uri:f.z.string().optional(),enabled_locales:f.z.array(f.z.string()).optional(),default_directory:f.z.string().optional(),error_page:f.z.object({html:f.z.string().optional(),show_log_link:f.z.boolean().optional(),url:f.z.string().optional()}).optional(),flags:f.z.object({allow_legacy_delegation_grant_types:f.z.boolean().optional(),allow_legacy_ro_grant_types:f.z.boolean().optional(),allow_legacy_tokeninfo_endpoint:f.z.boolean().optional(),disable_clickjack_protection_headers:f.z.boolean().optional(),enable_apis_section:f.z.boolean().optional(),enable_client_connections:f.z.boolean().optional(),enable_custom_domain_in_emails:f.z.boolean().optional(),enable_dynamic_client_registration:f.z.boolean().optional(),enable_idtoken_api2:f.z.boolean().optional(),enable_legacy_logs_search_v2:f.z.boolean().optional(),enable_legacy_profile:f.z.boolean().optional(),enable_pipeline2:f.z.boolean().optional(),enable_public_signup_user_exists_error:f.z.boolean().optional(),use_scope_descriptions_for_consent:f.z.boolean().optional(),disable_management_api_sms_obfuscation:f.z.boolean().optional(),enable_adfs_waad_email_verification:f.z.boolean().optional(),revoke_refresh_token_grant:f.z.boolean().optional(),dashboard_log_streams_next:f.z.boolean().optional(),dashboard_insights_view:f.z.boolean().optional(),disable_fields_map_fix:f.z.boolean().optional(),mfa_show_factor_list_on_enrollment:f.z.boolean().optional()}).optional(),friendly_name:f.z.string().optional(),picture_url:f.z.string().optional(),support_email:f.z.string().optional(),support_url:f.z.string().optional(),sandbox_version:f.z.string().optional(),sandbox_versions_available:f.z.array(f.z.string()).optional(),change_password:f.z.object({enabled:f.z.boolean(),html:f.z.string()}).optional(),guardian_mfa_page:f.z.object({enabled:f.z.boolean(),html:f.z.string()}).optional(),default_audience:f.z.string().optional(),default_organization:f.z.string().optional(),sessions:f.z.object({oidc_logout_prompt_enabled:f.z.boolean().optional()}).optional(),mfa:f.z.object({policy:ui.default(`never`).optional(),...fi,factors:f.z.object({sms:f.z.boolean().default(!1),otp:f.z.boolean().default(!1),email:f.z.boolean().default(!1),push_notification:f.z.boolean().default(!1),webauthn_roaming:f.z.boolean().default(!1),webauthn_platform:f.z.boolean().default(!1),recovery_code:f.z.boolean().default(!1),duo:f.z.boolean().default(!1)}).optional(),sms_provider:f.z.object({provider:f.z.enum([`twilio`,`vonage`,`aws_sns`,`phone_message_hook`]).optional()}).optional(),twilio:f.z.object({sid:We().optional(),auth_token:We().optional(),from:f.z.string().optional(),messaging_service_sid:f.z.string().optional()}).optional(),phone_message:f.z.object({message:f.z.string().optional()}).optional()}).optional()}),mi=f.z.object({id:f.z.string().optional(),parent_tenant_id:f.z.string().nullish(),config_sync:f.z.enum([`inherit-on-read`,`synced`,`detached`]).nullish(),config_sync_hash:f.z.string().nullish(),config_synced_at:f.z.string().nullish(),audience:f.z.string().optional(),friendly_name:f.z.string(),picture_url:f.z.string().optional(),support_email:f.z.string().optional(),support_url:f.z.string().optional(),sender_email:f.z.string().email().nullish(),sender_name:f.z.string().optional(),session_lifetime:f.z.number().optional(),idle_session_lifetime:f.z.number().optional(),ephemeral_session_lifetime:f.z.number().optional(),idle_ephemeral_session_lifetime:f.z.number().optional(),session_cookie:f.z.object({mode:f.z.enum([`persistent`,`non-persistent`]).optional()}).optional(),allowed_logout_urls:f.z.array(f.z.string()).optional(),default_redirection_uri:f.z.string().optional(),default_client_id:f.z.string().optional(),enabled_locales:f.z.array(f.z.string()).optional(),default_directory:f.z.string().optional(),error_page:f.z.object({html:f.z.string().optional(),show_log_link:f.z.boolean().optional(),url:f.z.string().optional()}).nullish(),flags:f.z.object({allow_changing_enable_sso:f.z.boolean().optional(),allow_legacy_delegation_grant_types:f.z.boolean().optional(),allow_legacy_ro_grant_types:f.z.boolean().optional(),allow_legacy_tokeninfo_endpoint:f.z.boolean().optional(),change_pwd_flow_v1:f.z.boolean().optional(),client_id_metadata_document_registration:f.z.boolean().optional(),custom_domains_provisioning:f.z.boolean().optional(),dashboard_insights_view:f.z.boolean().optional(),dashboard_log_streams_next:f.z.boolean().optional(),disable_clickjack_protection_headers:f.z.boolean().optional(),disable_fields_map_fix:f.z.boolean().optional(),disable_impersonation:f.z.boolean().optional(),disable_management_api_sms_obfuscation:f.z.boolean().optional(),enable_adfs_waad_email_verification:f.z.boolean().optional(),enable_apis_section:f.z.boolean().optional(),enable_client_connections:f.z.boolean().optional(),enable_custom_domain_in_emails:f.z.boolean().optional(),enable_dynamic_client_registration:f.z.boolean().optional(),dcr_require_initial_access_token:f.z.boolean().optional(),dcr_allowed_grant_types:f.z.array(f.z.string()).optional(),allow_http_return_to:f.z.array(f.z.string().refine(e=>{try{let t=new URL(e);return t.protocol===`http:`&&(t.pathname===``||t.pathname===`/`)&&!t.search&&!t.hash&&e===t.origin}catch{return!1}},{message:`must be a fully-qualified http origin (scheme + host + port, no path)`})).optional(),enable_idtoken_api2:f.z.boolean().optional(),enable_legacy_logs_search_v2:f.z.boolean().optional(),enable_legacy_profile:f.z.boolean().optional(),enable_pipeline2:f.z.boolean().optional(),enable_public_signup_user_exists_error:f.z.boolean().optional(),enable_sso:f.z.boolean().optional(),enforce_client_authentication_on_passwordless_start:f.z.boolean().optional(),genai_trial:f.z.boolean().optional(),improved_signup_bot_detection_in_classic:f.z.boolean().optional(),mfa_show_factor_list_on_enrollment:f.z.boolean().optional(),no_disclose_enterprise_connections:f.z.boolean().optional(),remove_alg_from_jwks:f.z.boolean().optional(),revoke_refresh_token_grant:f.z.boolean().optional(),trust_azure_adfs_email_verified_connection_property:f.z.boolean().optional(),use_scope_descriptions_for_consent:f.z.boolean().optional(),inherit_global_permissions_in_organizations:f.z.boolean().optional(),restrict_undefined_scopes:f.z.boolean().optional(),universal_login_version:f.z.enum([`1`,`2`]).optional()}).optional(),sandbox_version:f.z.string().optional(),legacy_sandbox_version:f.z.string().optional(),sandbox_versions_available:f.z.array(f.z.string()).optional(),change_password:f.z.object({enabled:f.z.boolean().optional(),html:f.z.string().optional()}).optional(),guardian_mfa_page:f.z.object({enabled:f.z.boolean().optional(),html:f.z.string().optional()}).optional(),device_flow:f.z.object({charset:f.z.enum([`base20`,`digits`]).optional(),mask:f.z.string().max(20).optional()}).optional(),default_token_quota:f.z.object({clients:f.z.object({client_credentials:f.z.record(f.z.string(),f.z.any()).optional()}).optional(),organizations:f.z.object({client_credentials:f.z.record(f.z.string(),f.z.any()).optional()}).optional()}).nullish(),default_audience:f.z.string().optional(),default_organization:f.z.string().optional(),sessions:f.z.object({oidc_logout_prompt_enabled:f.z.boolean().optional()}).optional(),oidc_logout:f.z.object({rp_logout_end_session_endpoint_discovery:f.z.boolean().optional()}).optional(),allow_organization_name_in_authentication_api:f.z.boolean().optional(),customize_mfa_in_postlogin_action:f.z.boolean().optional(),acr_values_supported:f.z.array(f.z.string()).optional(),mtls:f.z.object({enable_endpoint_aliases:f.z.boolean().optional()}).nullish(),pushed_authorization_requests_supported:f.z.boolean().optional(),authorization_response_iss_parameter_supported:f.z.boolean().optional(),deployment_type:f.z.enum([`shared`,`wfp`]).default(`shared`).optional(),provisioning_state:f.z.enum([`pending`,`ready`,`failed`]).default(`ready`).optional(),provisioning_error:f.z.string().max(2048).optional(),provisioning_state_changed_at:f.z.string().optional(),bundle_configuration:f.z.string().max(64).optional(),worker_version:f.z.string().max(64).optional(),database_version:f.z.string().max(64).optional(),worker_script_name:f.z.string().max(255).optional(),storage_kind:f.z.enum([`own_d1`,`existing_d1`,`shared_planetscale`]).optional(),d1_database_id:f.z.string().max(64).optional(),attack_protection:ti.optional(),mfa:f.z.object({policy:ui.default(`never`).optional(),...fi,factors:f.z.object({sms:f.z.boolean().default(!1),otp:f.z.boolean().default(!1),email:f.z.boolean().default(!1),push_notification:f.z.boolean().default(!1),webauthn_roaming:f.z.boolean().default(!1),webauthn_platform:f.z.boolean().default(!1),recovery_code:f.z.boolean().default(!1),duo:f.z.boolean().default(!1)}).optional(),sms_provider:f.z.object({provider:f.z.enum([`twilio`,`vonage`,`aws_sns`,`phone_message_hook`]).optional()}).optional(),twilio:f.z.object({sid:We().optional(),auth_token:We().optional(),from:f.z.string().optional(),messaging_service_sid:f.z.string().optional()}).optional(),phone_message:f.z.object({message:f.z.string().optional()}).optional()}).optional()}),hi=f.z.object({created_at:f.z.string().nullable().transform(e=>e??``),updated_at:f.z.string().nullable().transform(e=>e??``)}).extend(mi.shape).extend({id:f.z.string(),is_control_plane:f.z.boolean().optional(),has_children:f.z.boolean().optional()}),gi=mi.shape.mfa.unwrap().shape,_i=f.z.object({...gi,policy:ui.optional(),factors:f.z.object({sms:f.z.boolean().optional(),otp:f.z.boolean().optional(),email:f.z.boolean().optional(),push_notification:f.z.boolean().optional(),webauthn_roaming:f.z.boolean().optional(),webauthn_platform:f.z.boolean().optional(),recovery_code:f.z.boolean().optional(),duo:f.z.boolean().optional()}).optional()}),vi=f.z.object(mi.shape).extend({deployment_type:f.z.enum([`shared`,`wfp`]),provisioning_state:f.z.enum([`pending`,`ready`,`failed`]),mfa:_i}).partial(),yi=f.z.enum([`provision`,`seed`,`upgrade`,`backup`,`deprovision`,`users_import`,`sync-defaults`,`detach`,`tenant-members-request`]),bi=f.z.enum([`pending`,`running`,`succeeded`,`failed`,`cancelled`]),xi=f.z.string().max(64),Si=[`inline`,`cloudflare-workflows`],Ci=f.z.object({tenant_id:f.z.string().max(255).nullable().default(null),rollout_id:f.z.string().max(255).nullable().optional(),kind:yi,engine:xi,engine_instance_id:f.z.string().max(100).nullable().optional(),target_worker_version:f.z.string().max(255).nullable().optional(),target_database_version:f.z.string().max(255).nullable().optional(),initiated_by:f.z.string().max(255).nullable().optional(),input:f.z.record(f.z.string(),f.z.unknown()).nullable().optional()}),wi=Ci.extend({id:f.z.string(),status:bi,current_step:f.z.string().max(255).nullable().optional(),error:f.z.string().nullable().optional(),result:f.z.record(f.z.string(),f.z.unknown()).nullable().optional(),claimed_by:f.z.string().max(255).nullable().optional(),claim_expires_at:f.z.string().nullable().optional(),created_at:f.z.string(),updated_at:f.z.string(),finished_at:f.z.string().nullable().optional()}),Ti=wi.pick({status:!0,current_step:!0,engine_instance_id:!0,target_worker_version:!0,target_database_version:!0,error:!0,result:!0,claimed_by:!0,claim_expires_at:!0,finished_at:!0}).partial(),Ei=f.z.enum([`started`,`succeeded`,`failed`,`retried`,`skipped`,`reconciled`]),Di=f.z.object({operation_id:f.z.string().max(255),step:f.z.string().max(255),outcome:Ei,detail:f.z.record(f.z.string(),f.z.unknown()).nullable().optional(),attempt:f.z.number().int().min(1).default(1)}),Oi=Di.extend({id:f.z.string(),created_at:f.z.string()}),ki=f.z.enum([`pending`,`inserted`,`updated`,`failed`,`skipped`]),Ai=[`inserted`,`updated`,`failed`,`skipped`],ji=f.z.object({operation_id:f.z.string().max(255),seq:f.z.number().int().min(0),payload:f.z.record(f.z.string(),f.z.unknown()),status:ki.default(`pending`),error_code:f.z.string().max(64).nullable().optional(),error_message:f.z.string().nullable().optional(),error_path:f.z.string().max(255).nullable().optional(),entity_id:f.z.string().max(255).nullable().optional()}),Mi=ji.extend({status:ki,created_at:f.z.string(),updated_at:f.z.string()}),Ni=f.z.object({seq:f.z.number().int().min(0),status:ki,error_code:f.z.string().max(64).nullable().optional(),error_message:f.z.string().nullable().optional(),error_path:f.z.string().max(255).nullable().optional(),entity_id:f.z.string().max(255).nullable().optional()}),Pi=f.z.enum([`upgrade`,`reseed`,`backup`,`config-sync`]),Fi=f.z.enum([`pending`,`canary`,`rolling`,`paused`,`done`,`failed`]),Ii=f.z.object({kind:Pi,target_worker_version:f.z.string().max(255).nullable().optional(),target_database_version:f.z.string().max(255).nullable().optional(),wave_size:f.z.number().int().min(1).default(10),canary_tenant_ids:f.z.array(f.z.string()).nullable().optional(),filter:f.z.record(f.z.string(),f.z.unknown()).nullable().optional(),initiated_by:f.z.string().max(255).nullable().optional(),config:f.z.record(f.z.string(),f.z.unknown()).nullable().optional()}),Li=Ii.extend({id:f.z.string(),status:Fi,created_at:f.z.string(),updated_at:f.z.string(),finished_at:f.z.string().nullable().optional(),paused_reason:f.z.string().nullable().optional()}),Ri=Li.pick({status:!0,wave_size:!0,canary_tenant_ids:!0,filter:!0,config:!0,paused_reason:!0,finished_at:!0}).partial(),zi=f.z.enum([`invite`,`add_members`,`remove_members`,`assign_roles`,`remove_roles`,`revoke_invitation`]),Bi=f.z.enum([`pending`,`succeeded`,`failed`]),Vi=f.z.object({kind:zi,requested_by:f.z.string().min(1).max(255),payload:f.z.record(f.z.string(),f.z.unknown())}),Hi=Vi.extend({id:f.z.string(),tenant_id:f.z.string(),status:Bi,result:f.z.record(f.z.string(),f.z.unknown()).nullable().optional(),error:f.z.string().nullable().optional(),notified_at:f.z.string().nullable().optional(),created_at:f.z.string(),updated_at:f.z.string(),finished_at:f.z.string().nullable().optional()}),Ui=f.z.object({status:Bi.optional(),result:f.z.record(f.z.string(),f.z.unknown()).nullable().optional(),error:f.z.string().nullable().optional(),notified_at:f.z.string().nullable().optional(),finished_at:f.z.string().nullable().optional()}),Wi=function(e){return e.DeviceCode=`urn:ietf:params:oauth:grant-type:device_code`,e.RefreshToken=`refresh_token`,e.AuthorizationCode=`authorization_code`,e.ClientCredential=`client_credentials`,e.Passwordless=`passwordless`,e.Password=`password`,e.OTP=`http://auth0.com/oauth/grant-type/passwordless/otp`,e.TokenExchange=`urn:ietf:params:oauth:grant-type:token-exchange`,e}({}),Gi=f.z.object({access_token:f.z.string(),id_token:f.z.string().optional(),scope:f.z.string().optional(),state:f.z.string().optional(),refresh_token:f.z.string().optional(),token_type:f.z.string(),expires_in:f.z.number(),issued_token_type:f.z.string().optional()});f.z.object({code:f.z.string(),state:f.z.string().optional()});var Ki=f.z.object({button_border_radius:f.z.number(),button_border_weight:f.z.number(),buttons_style:f.z.enum([`pill`,`rounded`,`sharp`]),input_border_radius:f.z.number(),input_border_weight:f.z.number(),inputs_style:f.z.enum([`pill`,`rounded`,`sharp`]),show_widget_shadow:f.z.boolean(),widget_border_weight:f.z.number(),widget_corner_radius:f.z.number()}),qi=f.z.object({base_focus_color:f.z.string(),base_hover_color:f.z.string(),body_text:f.z.string(),captcha_widget_theme:f.z.enum([`auto`,`dark`,`light`]),error:f.z.string(),header:f.z.string(),icons:f.z.string(),input_background:f.z.string(),input_border:f.z.string(),input_filled_text:f.z.string(),input_labels_placeholders:f.z.string(),links_focused_components:f.z.string(),primary_button:f.z.string(),primary_button_label:f.z.string(),secondary_button_border:f.z.string(),secondary_button_label:f.z.string(),success:f.z.string(),widget_background:f.z.string(),widget_border:f.z.string()}),Ji=qi.omit({captcha_widget_theme:!0}).partial(),Yi=f.z.object({bold:f.z.boolean(),size:f.z.number()}),Xi=f.z.object({body_text:Yi,buttons_text:Yi,font_url:f.z.string(),input_labels:Yi,links:Yi,links_style:f.z.enum([`normal`,`underlined`]),reference_text_size:f.z.number(),subtitle:Yi,title:Yi}),Zi=f.z.object({background_color:f.z.string(),background_image_url:f.z.string(),background_color_dark:f.z.string().optional(),background_image_url_dark:f.z.string().optional(),page_layout:f.z.enum([`center`,`left`,`right`]),logo_placement:f.z.enum([`widget`,`chip`,`none`]).optional()}),Qi=f.z.object({header_text_alignment:f.z.enum([`center`,`left`,`right`]),logo_height:f.z.number(),logo_position:f.z.enum([`center`,`left`,`none`,`right`]),logo_url:f.z.string(),logo_url_dark:f.z.string().optional(),social_buttons_layout:f.z.enum([`bottom`,`top`])}),$i=f.z.object({borders:Ki,colors:qi,colors_dark:Ji.optional(),displayName:f.z.string(),fonts:Xi,page_background:Zi,widget:Qi}),ea=$i.extend({themeId:f.z.string()}),ta=f.z.object({...y,universal_login_experience:f.z.enum([`new`,`classic`]).default(`new`),identifier_first:f.z.boolean().default(!0),password_first:f.z.boolean().default(!1),show_last_used_connection:f.z.boolean().default(!1),webauthn_platform_first_factor:f.z.boolean()}),na=f.z.object({hosts:f.z.array(f.z.string()).optional(),methods:f.z.array(f.z.string()).optional(),path:f.z.string().default(`/*`),headers:f.z.record(f.z.string(),f.z.string()).optional(),query:f.z.record(f.z.string(),f.z.string()).optional()}),ra=f.z.object({type:f.z.string(),options:f.z.record(f.z.string(),f.z.unknown()).default({})}),ia=f.z.object({id:f.z.string().optional(),custom_domain_id:f.z.string(),priority:f.z.number().int().default(100),match:na,handlers:f.z.array(ra).min(1)}),aa=ia.extend({id:f.z.string(),tenant_id:f.z.string(),created_at:f.z.string(),updated_at:f.z.string()}),oa=ia.partial().omit({id:!0,custom_domain_id:!0}),sa=`custom_authentication`,ca=[`urn:ietf:params:oauth:`,`urn:auth0`,`urn:okta`,`http://auth0.com`,`https://auth0.com`,`http://okta.com`,`https://okta.com`],la=f.z.string().min(1).max(200).refine(e=>e.startsWith(`https://`)||e.startsWith(`urn:`),{message:`subject_token_type must be a URI starting with https:// or urn:`}).refine(e=>!ca.some(t=>e.toLowerCase().startsWith(t)),{message:`subject_token_type uses a reserved namespace`}),ua=f.z.enum([`RS256`,`RS384`,`RS512`,`ES256`,`ES384`,`ES512`]),da=f.z.discriminatedUnion(`type`,[f.z.object({type:f.z.literal(`connection`),connection:f.z.string().min(1),create_if_not_exists:f.z.boolean().default(!0),trust_email_verified:f.z.boolean().default(!1)}),f.z.object({type:f.z.literal(`user_id`)})]),fa=f.z.object({issuer:f.z.string().min(1).max(2048),jwks:Or.optional(),jwks_uri:f.z.string().url().optional(),audience:f.z.array(f.z.string().min(1)).min(1).optional(),algorithms:f.z.array(ua).min(1).optional(),max_lifetime_seconds:f.z.number().int().min(1).max(3600).default(300),require_jti:f.z.boolean().default(!0),user_mapping:da}),pa=f.z.object({name:f.z.string().min(1).max(255),subject_token_type:la,action_id:f.z.string().min(1).optional(),type:f.z.literal(sa),jwt_verification:fa.optional()}),ma=pa.extend({id:f.z.string(),created_at:f.z.string(),updated_at:f.z.string()}),ha=f.z.object({name:f.z.string().min(1).max(255).optional(),subject_token_type:la.optional(),jwt_verification:fa.optional()}),ga=[`oidc`,`samlp`,`waad`,`google-apps`,`adfs`,`okta`,`auth0-samlp`,`okta-samlp`,`keycloak-samlp`,`pingfederate`],_a=[`oidc`,`samlp`,`waad`],va=f.z.enum(ga),ya=f.z.object({name:f.z.string(),description:f.z.string(),is_optional:f.z.boolean()}),ba=f.z.object({logo_url:f.z.string().optional(),colors:f.z.object({primary:f.z.string()}).optional()}),xa=f.z.object({name:f.z.string(),description:f.z.string().optional(),allowed_strategies:f.z.array(va).optional(),user_attributes:f.z.array(ya).optional(),branding:ba.optional()}),Sa=xa.extend({id:f.z.string(),created_at:f.z.string(),updated_at:f.z.string()}),Ca=[`en`],wa=[`get-started`],Ta=f.z.record(f.z.string(),f.z.string()),Ea=[`none`,`optional`,`required`],Da=f.z.enum(Ea),Oa=f.z.object({icon_url:f.z.string().optional(),domain_aliases:f.z.array(f.z.string()).optional()}),ka=f.z.object({name:f.z.string(),display_name:f.z.string().optional(),is_domain_connection:f.z.boolean().optional(),show_as_button:f.z.boolean().optional(),metadata:f.z.record(f.z.string(),f.z.string()).optional(),options:Oa.optional()}),Aa=f.z.object({organization_id:f.z.string(),assign_membership_on_login:f.z.boolean().optional(),show_as_button:f.z.boolean().optional()}),ja=f.z.object({id:f.z.string(),profile_id:f.z.string(),connection_id:f.z.string().optional(),connection_config:ka.optional(),enabled_clients:f.z.array(f.z.string()),enabled_organizations:f.z.array(Aa),domain_verification:Da,expires_at:f.z.string(),revoked_at:f.z.string().optional(),completed_at:f.z.string().optional(),created_at:f.z.string(),updated_at:f.z.string()}),Ma=f.z.object({scim:f.z.string(),auth0:f.z.string()}),Na=f.z.object({connection_id:f.z.string(),user_id_attribute:f.z.string().default(`externalId`),mapping:f.z.array(Ma).default([])}),Pa=f.z.object({created_at:f.z.string(),updated_at:f.z.string()}).extend(Na.shape),Fa=f.z.object({token_id:f.z.string(),connection_id:f.z.string(),token_hash:f.z.string(),scopes:f.z.array(f.z.string()).default([]),valid_until:f.z.string().optional()}),Ia=f.z.object({created_at:f.z.string(),last_used_at:f.z.string().optional()}).extend(Fa.shape),La=f.z.object({connection_id:f.z.string(),external_id:f.z.string(),user_id:f.z.string()}),Ra=f.z.object({created_at:f.z.string()}).extend(La.shape),za=f.z.object({...y,name:f.z.string(),enabled:f.z.boolean().optional().default(!0),default_from_address:f.z.string().optional(),credentials:f.z.record(f.z.string(),f.z.unknown()),settings:f.z.object({}).optional()}),Ba=f.z.enum([`verify_email`,`verify_email_by_code`,`reset_email`,`reset_email_by_code`,`welcome_email`,`blocked_account`,`stolen_credentials`,`enrollment_email`,`mfa_oob_code`,`change_password`,`password_reset`,`user_invitation`]),Va=f.z.object({template:Ba,body:f.z.string(),from:f.z.string(),subject:f.z.string(),syntax:f.z.literal(`liquid`).default(`liquid`),resultUrl:f.z.string().optional(),urlLifetimeInSeconds:f.z.number().int().nonnegative().optional(),includeEmailInRedirect:f.z.boolean().default(!1),enabled:f.z.boolean().default(!0)}),Ha=f.z.object({id:f.z.string(),login_id:f.z.string(),session_id:f.z.string().optional(),organization:f.z.string().optional(),auth_connection:f.z.string().optional(),auth_strategy:jr.optional(),session_transfer:$e.optional(),user_id:f.z.string(),client_id:f.z.string(),expires_at:f.z.string().optional(),idle_expires_at:f.z.string().optional(),last_exchanged_at:f.z.string().optional(),device:ii,resource_servers:f.z.array(f.z.object({audience:f.z.string(),scopes:f.z.string()})),rotating:f.z.boolean(),token_lookup:f.z.string().optional(),token_hash:f.z.string().optional(),family_id:f.z.string().optional(),rotated_to:f.z.string().optional(),rotated_at:f.z.string().optional()}),Ua=Ha.extend({created_at:f.z.string(),revoked_at:f.z.string().optional()}),Wa=f.z.object({to:f.z.string(),message:f.z.string()}),Ga=f.z.object({name:f.z.string(),options:f.z.object({})}),Ka=f.z.object({value:f.z.string(),description:f.z.string().optional()}),qa=f.z.object({token_dialect:f.z.enum([`access_token`,`access_token_authz`]).optional(),enforce_policies:f.z.boolean().optional(),allow_skipping_userinfo:f.z.boolean().optional(),skip_userinfo:f.z.boolean().optional(),persist_client_authorization:f.z.boolean().optional(),enable_introspection_endpoint:f.z.boolean().optional(),mtls:f.z.object({bound_access_tokens:f.z.boolean().optional()}).optional()}),Ja=f.z.object({id:f.z.string().optional(),name:f.z.string(),identifier:f.z.string(),scopes:f.z.array(Ka).optional(),signing_alg:f.z.string().optional(),signing_secret:We().optional(),token_lifetime:f.z.number().default(86400),token_lifetime_for_web:f.z.number().default(7200),skip_consent_for_verifiable_first_party_clients:f.z.boolean().optional(),allow_offline_access:f.z.boolean().optional(),verificationKey:f.z.string().optional(),options:qa.optional(),is_system:f.z.boolean().optional(),...y,metadata:f.z.record(f.z.string(),f.z.any()).optional()}),Ya=Ja.extend({created_at:f.z.string().optional(),updated_at:f.z.string().optional()}),Xa=f.z.array(Ya),Za=f.z.object({role_id:f.z.string(),resource_server_identifier:f.z.string(),permission_name:f.z.string()}),Qa=Za.extend({created_at:f.z.string()}),$a=f.z.array(Qa),eo=f.z.object({user_id:f.z.string().openapi({description:`The id of the user that granted the consent`}),clientID:f.z.string().openapi({description:`The id of the client the grant was issued to`}),audience:f.z.string().optional().openapi({description:`The audience the grant applies to`}),scope:f.z.array(f.z.string()).default([]).openapi({description:`The list of OAuth scopes the user has consented to`})}),to=eo.extend({id:f.z.string()}),no=f.z.object({user_id:f.z.string(),last_login:f.z.string().optional(),last_ip:f.z.string().optional(),login_count:f.z.number().default(0),failed_logins:f.z.array(f.z.string()).optional(),last_password_reset:f.z.string().optional()}),ro=f.z.object({user_id:f.z.string(),resource_server_identifier:f.z.string(),permission_name:f.z.string(),organization_id:f.z.string().optional()}),io=ro.extend({tenant_id:f.z.string(),created_at:f.z.string().optional()}),ao=f.z.array(io),oo=f.z.object({user_id:f.z.string(),resource_server_identifier:f.z.string(),resource_server_name:f.z.string(),permission_name:f.z.string(),description:f.z.string().nullable().optional(),created_at:f.z.string().optional(),organization_id:f.z.string().optional()}),so=f.z.array(oo),co=f.z.object({user_id:f.z.string(),role_id:f.z.string(),organization_id:f.z.string().optional()}),lo=co.extend({tenant_id:f.z.string(),created_at:f.z.string().optional()}),uo=f.z.array(lo),fo=f.z.object({id:f.z.string().optional().openapi({description:`The unique identifier of the role. If not provided, one will be generated.`}),name:f.z.string().min(1).max(50).openapi({description:`The name of the role. Cannot include '<' or '>'`}),description:f.z.string().max(255).optional().openapi({description:`The description of the role`}),is_system:f.z.boolean().optional(),metadata:f.z.record(f.z.string(),f.z.any()).optional().openapi({description:`Metadata associated with the role. Can be used to control sync behavior in multi-tenancy scenarios.`})}),po=fo.extend({id:f.z.string().openapi({description:`The unique identifier of the role`}),created_at:f.z.string().optional(),updated_at:f.z.string().optional()}),mo=f.z.array(po),ho=f.z.object({logo_url:f.z.string().optional().openapi({description:`URL of the organization's logo`}),colors:f.z.object({primary:f.z.string().optional().openapi({description:`Primary color in hex format (e.g., #FF0000)`}),page_background:f.z.string().optional().openapi({description:`Page background color in hex format (e.g., #FFFFFF)`})}).optional()}).optional(),go=f.z.object({connection_id:f.z.string().openapi({description:`ID of the connection`}),assign_membership_on_login:f.z.boolean().default(!1).openapi({description:`Whether to assign membership to the organization on login`}),show_as_button:f.z.boolean().default(!0).openapi({description:`Whether to show this connection as a button in the login screen`}),is_signup_enabled:f.z.boolean().default(!0).openapi({description:`Whether signup is enabled for this connection`})}),_o=f.z.object({client_credentials:f.z.object({enforce:f.z.boolean().default(!1).openapi({description:`Whether to enforce token quota limits`}),per_day:f.z.number().min(0).default(0).openapi({description:`Maximum tokens per day (0 = unlimited)`}),per_hour:f.z.number().min(0).default(0).openapi({description:`Maximum tokens per hour (0 = unlimited)`})}).optional()}).optional(),vo=f.z.object({id:f.z.string().optional(),name:f.z.string().min(1).regex(/^[a-z0-9_-]+$/,{message:`Organization name must be lowercase and can only contain letters, numbers, hyphens, and underscores`}).openapi({description:`The name of the organization. Must be lowercase and can only contain letters, numbers, hyphens, and underscores.`}),display_name:f.z.string().optional().openapi({description:`The display name of the organization`}),branding:ho,metadata:f.z.record(f.z.string(),f.z.any()).default({}).optional().openapi({description:`Custom metadata for the organization`}),enabled_connections:f.z.array(go).default([]).optional().openapi({description:`List of enabled connections for the organization`}),token_quota:_o}),yo=vo.extend(g.shape).extend({id:f.z.string(),name:f.z.string().min(1).openapi({description:`The name of the organization`})}),bo=f.z.object({connection_id:f.z.string().openapi({description:`ID of the tenant-level connection to enable for the org.`}),assign_membership_on_login:f.z.boolean().optional().default(!1),show_as_button:f.z.boolean().optional().default(!0),is_signup_enabled:f.z.boolean().optional().default(!0)}),xo=bo.extend({connection:f.z.object({name:f.z.string().optional(),strategy:f.z.string().optional()}).optional(),created_at:f.z.string().optional(),updated_at:f.z.string().optional()}),So=f.z.array(xo),Co=f.z.object({user_id:f.z.string().openapi({description:`ID of the user`}),organization_id:f.z.string().openapi({description:`ID of the organization`})}),wo=Co.extend(g.shape).extend({id:f.z.string()}),To=f.z.object({date:f.z.string().openapi({description:`Date these events occurred in ISO 8601 format`,example:`2025-12-19`}),logins:f.z.number().openapi({description:`Number of logins on this date`,example:150}),signups:f.z.number().openapi({description:`Number of signups on this date`,example:25}),leaked_passwords:f.z.number().openapi({description:`Number of breached-password detections on this date (subscription required)`,example:0}),updated_at:f.z.string().openapi({description:`Date and time this stats entry was last updated in ISO 8601 format`,example:`2025-12-19T10:30:00.000Z`}),created_at:f.z.string().openapi({description:`Approximate date and time the first event occurred in ISO 8601 format`,example:`2025-12-19T00:00:00.000Z`})}),Eo=f.z.number().openapi({description:`Number of active users in the last 30 days`,example:1234}),Do=f.z.enum([`active-users`,`logins`,`signups`,`refresh-tokens`,`sessions`,`logouts`,`password-changes`,`password-migrations`,`mfa`,`email-verifications`,`codes-sent`]),Oo=f.z.enum([`hour`,`day`,`week`,`month`]),ko=f.z.enum([`time`,`connection`,`client_id`,`user_type`,`event`]),Ao=f.z.enum([`password`,`social`,`passwordless`,`enterprise`]),jo=f.z.object({cohort:f.z.string(),sessions:f.z.number(),active:f.z.array(f.z.number())}),Mo=f.z.object({interval:f.z.literal(`week`),from:f.z.string(),to:f.z.string(),cohorts:f.z.array(jo)}),No=f.z.object({cohort:f.z.string(),tokens:f.z.number(),active:f.z.array(f.z.number())}),Po=f.z.object({interval:f.z.literal(`week`),from:f.z.string(),to:f.z.string(),cohorts:f.z.array(No)}),Fo=f.z.object({name:f.z.string(),type:f.z.string()}),Io=f.z.object({elapsed:f.z.number(),rows_read:f.z.number().optional(),bytes_read:f.z.number().optional()}),Lo=f.z.object({meta:f.z.array(Fo),data:f.z.array(f.z.record(f.z.string(),f.z.any())),rows:f.z.number(),rows_before_limit_at_least:f.z.number().optional(),statistics:Io.optional()}),Ro=f.z.enum(`login.login-id.login-password.signup.signup-id.signup-password.reset-password.consent.mfa.mfa-push.mfa-otp.mfa-voice.mfa-phone.mfa-webauthn.mfa-email.mfa-recovery-code.status.device-flow.email-verification.email-otp-challenge.organizations.invitation.common.passkeys.captcha.custom-form.login-passwordless.mfa-login-options`.split(`.`)),zo=f.z.record(f.z.string(),f.z.record(f.z.string(),f.z.string())).openapi({type:`object`,additionalProperties:{type:`object`,additionalProperties:{type:`string`}}}),Bo=f.z.object({prompt:Ro,language:f.z.string(),custom_text:zo}),Vo=[`form-content-start`,`form-content-end`,`form-footer-start`,`form-footer-end`,`secondary-actions-start`,`secondary-actions-end`],Ho=f.z.object({"form-content-start":f.z.string().optional(),"form-content-end":f.z.string().optional(),"form-footer-start":f.z.string().optional(),"form-footer-end":f.z.string().optional(),"secondary-actions-start":f.z.string().optional(),"secondary-actions-end":f.z.string().optional()}).strict(),Uo=f.z.record(f.z.string(),Ho),Wo=f.z.object({prompt:f.z.string(),partials:Uo}),Go={EMAIL:`email`,SMS:`sms`,USERNAME_PASSWORD:`Username-Password-Authentication`,GOOGLE_OAUTH2:`google-oauth2`,APPLE:`apple`,FACEBOOK:`facebook`,GITHUB:`github`,WINDOWSLIVE:`windowslive`,VIPPS:`vipps`,OIDC:`oidc`,OAUTH2:`oauth2`,SAMLP:`samlp`,WAAD:`waad`,ADFS:`adfs`,OKTA:`okta`,EXTERNAL:`external`},Ko={DATABASE:`database`,SOCIAL:`social`,PASSWORDLESS:`passwordless`},qo=`auth0`;function Jo(e){return e===`auth0`||e===Go.USERNAME_PASSWORD||e===`auth2`}var Yo=f.z.enum([`phone`,`totp`,`email`,`push`,`webauthn-roaming`,`webauthn-platform`,`passkey`]),Xo=f.z.object({user_id:f.z.string(),type:Yo,phone_number:f.z.string().optional(),totp_secret:f.z.string().optional(),totp_last_step:f.z.number().int().nonnegative().optional(),credential_id:f.z.string().optional(),public_key:f.z.string().optional(),sign_count:f.z.number().int().nonnegative().optional(),credential_backed_up:f.z.boolean().optional(),transports:f.z.array(f.z.string()).optional(),friendly_name:f.z.string().optional(),confirmed:f.z.boolean().default(!1)});function Zo(e,t){e.type===`phone`&&!e.phone_number&&t.addIssue({code:f.z.ZodIssueCode.custom,message:`phone_number is required when type is 'phone'`,path:[`phone_number`]}),e.type===`totp`&&!e.totp_secret&&t.addIssue({code:f.z.ZodIssueCode.custom,message:`totp_secret is required when type is 'totp'`,path:[`totp_secret`]}),[`webauthn-roaming`,`webauthn-platform`,`passkey`].includes(e.type)&&(e.credential_id||t.addIssue({code:f.z.ZodIssueCode.custom,message:`credential_id is required when type is '${e.type}'`,path:[`credential_id`]}),e.public_key||t.addIssue({code:f.z.ZodIssueCode.custom,message:`public_key is required when type is '${e.type}'`,path:[`public_key`]}))}var Qo=Xo.superRefine(Zo),$o=Xo.extend({id:f.z.string(),created_at:f.z.string(),updated_at:f.z.string()}).superRefine(Zo),es=f.z.object({id:f.z.string().optional(),created_at:f.z.string().datetime({offset:!0}).optional(),updated_at:f.z.string().datetime({offset:!0}).optional()}),ts={"validate-registration-username":{access:[`deny`]},"post-user-login":{accessToken:[`setCustomClaim`],idToken:[`setCustomClaim`],access:[`deny`],prompt:[`render`],redirect:[`sendUserTo`],user:[`setLinkedTo`],users:[`ensure`],multifactor:[`enable`]},"credentials-exchange":{accessToken:[`setCustomClaim`],idToken:[`setCustomClaim`],access:[`deny`]},"pre-user-registration":{user:[`setUserMetadata`,`setAppMetadata`,`setLinkedTo`],users:[`ensure`],access:[`deny`],validation:[`error`]},"post-user-registration":{},"pre-user-update":{access:[`deny`]},"post-user-update":{},"pre-user-deletion":{access:[`deny`]},"post-user-deletion":{},"pre-screen":{redirect:[`sendUserTo`],access:[`deny`]},"custom-email-provider":{notification:[`drop`,`retry`,`useDefaultProvider`]},"custom-phone-provider":{notification:[`drop`,`retry`,`useDefaultProvider`]},"custom-token-exchange":{authentication:[`setUserById`,`setUserByConnection`],access:[`deny`,`rejectInvalidSubjectToken`]}},ns={"validate-registration-username":`onExecuteValidateRegistrationUsername`,"post-user-login":`onExecutePostLogin`,"credentials-exchange":`onExecuteCredentialsExchange`,"pre-user-registration":`onExecutePreUserRegistration`,"post-user-registration":`onExecutePostUserRegistration`,"pre-user-update":`onExecutePreUserUpdate`,"post-user-update":`onExecutePostUserUpdate`,"pre-user-deletion":`onExecutePreUserDeletion`,"post-user-deletion":`onExecutePostUserDeletion`,"pre-screen":`onExecutePreScreen`,"custom-token-exchange":`onExecuteCustomTokenExchange`,"custom-email-provider":`onExecuteCustomEmailProvider`,"custom-phone-provider":`onExecuteCustomPhoneProvider`},rs={"validate-registration-username":`// Code Action sandbox API. Calls are recorded and applied after the handler completes; methods return no result.
2
2
 
3
3
  interface ActionBlockingAccessAPI {
4
4
  /** Cancel the login, registration, update, or deletion with an optional reason. */
@@ -307,7 +307,7 @@ type ActionAPI = {
307
307
  `);let t=new dA(`!xml`),n=t,r=``;this.matcher.reset(),this.entityDecoder.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let i=this.options,a=new wA(i.processEntities),o=e.length;for(let s=0;s<o;s++)if(e[s]===`<`){let c=e.charCodeAt(s+1);if(c===47){let t=kj(e,`>`,s,`Closing Tag is not closed.`),a=e.substring(s+2,t).trim();if(i.removeNSPrefix){let e=a.indexOf(`:`);e!==-1&&(a=a.substr(e+1))}a=Pj(i.transformTagName,a,``,i).tagName,n&&(r=this.saveTextToParentTag(r,n,this.readonlyMatcher));let o=this.matcher.getCurrentTag();if(a&&i.unpairedTagsSet.has(a))throw Error(`Unpaired tag can not be used as closing tag: </${a}>`);o&&i.unpairedTagsSet.has(o)&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,n=this.tagsNodeStack.pop(),r=``,s=t}else if(c===63){let t=jj(e,s,!1,`?>`);if(!t)throw Error(`Pi Tag is not closed.`);r=this.saveTextToParentTag(r,n,this.readonlyMatcher);let o=this.buildAttributesMap(t.tagExp,this.matcher,t.tagName,!0);if(o){let e=o[this.options.attributeNamePrefix+`version`];this.entityDecoder.setXmlVersion(Number(e)||1),a.setXmlVersion(Number(e)||1)}if(!(i.ignoreDeclaration&&t.tagName===`?xml`||i.ignorePiTags)){let e=new dA(t.tagName);e.add(i.textNodeName,``),t.tagName!==t.tagExp&&t.attrExpPresent&&i.ignoreAttributes!==!0&&(e[`:@`]=o),this.addChild(n,e,this.readonlyMatcher,s)}s=t.closeIndex+1}else if(c===33&&e.charCodeAt(s+2)===45&&e.charCodeAt(s+3)===45){let t=kj(e,`-->`,s+4,`Comment is not closed.`);if(i.commentPropName){let a=e.substring(s+4,t-2);r=this.saveTextToParentTag(r,n,this.readonlyMatcher),n.add(i.commentPropName,[{[i.textNodeName]:a}])}s=t}else if(c===33&&e.charCodeAt(s+2)===68){let t=a.readDocType(e,s);this.entityDecoder.addInputEntities(t.entities),s=t.i}else if(c===33&&e.charCodeAt(s+2)===91){let t=kj(e,`]]>`,s,`CDATA is not closed.`)-2,a=e.substring(s+9,t);r=this.saveTextToParentTag(r,n,this.readonlyMatcher);let o=this.parseTextData(a,n.tagname,this.readonlyMatcher,!0,!1,!0,!0);o??=``,i.cdataPropName?n.add(i.cdataPropName,[{[i.textNodeName]:a}]):n.add(i.textNodeName,o),s=t+2}else{let a=jj(e,s,i.removeNSPrefix);if(!a){let t=e.substring(Math.max(0,s-50),Math.min(o,s+50));throw Error(`readTagExp returned undefined at position ${s}. Context: "${t}"`)}let c=a.tagName,l=a.rawTagName,u=a.tagExp,d=a.attrExpPresent,f=a.closeIndex;if({tagName:c,tagExp:u}=Pj(i.transformTagName,c,u,i),i.strictReservedNames&&(c===i.commentPropName||c===i.cdataPropName||c===i.textNodeName||c===i.attributesGroupName))throw Error(`Invalid tag name: ${c}`);n&&r&&n.tagname!==`!xml`&&(r=this.saveTextToParentTag(r,n,this.readonlyMatcher,!1));let p=n;p&&i.unpairedTagsSet.has(p.tagname)&&(n=this.tagsNodeStack.pop(),this.matcher.pop());let m=!1;u.length>0&&u.lastIndexOf(`/`)===u.length-1&&(m=!0,c[c.length-1]===`/`?(c=c.substr(0,c.length-1),u=c):u=u.substr(0,u.length-1),d=c!==u);let h=null,g;g=_j(l),c!==t.tagname&&this.matcher.push(c,{},g),c!==u&&d&&(h=this.buildAttributesMap(u,this.matcher,c),h&&gj(h,i)),c!==t.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode());let _=s;if(this.isCurrentNodeStopNode){let t=``;if(m)s=a.closeIndex;else if(i.unpairedTagsSet.has(c))s=a.closeIndex;else{let n=this.readStopNodeData(e,l,f+1);if(!n)throw Error(`Unexpected end of ${l}`);s=n.i,t=n.tagContent}let r=new dA(c);h&&(r[`:@`]=h),r.add(i.textNodeName,t),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(n,r,this.readonlyMatcher,_)}else{if(m){({tagName:c,tagExp:u}=Pj(i.transformTagName,c,u,i));let e=new dA(c);h&&(e[`:@`]=h),this.addChild(n,e,this.readonlyMatcher,_),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else if(i.unpairedTagsSet.has(c)){let e=new dA(c);h&&(e[`:@`]=h),this.addChild(n,e,this.readonlyMatcher,_),this.matcher.pop(),this.isCurrentNodeStopNode=!1,s=a.closeIndex;continue}else{let e=new dA(c);if(this.tagsNodeStack.length>i.maxNestedTags)throw Error(`Maximum nested tags exceeded`);this.tagsNodeStack.push(n),h&&(e[`:@`]=h),this.addChild(n,e,this.readonlyMatcher,_),n=e}r=``,s=f}}}else r+=e[s];return t.child};function wj(e,t,n,r){this.options.captureMetaData||(r=void 0);let i=this.options.jPath?n.toString():n,a=this.options.updateTag(t.tagname,i,t[`:@`]);a===!1||(typeof a==`string`&&(t.tagname=a),e.addChild(t,r))}function Tj(e,t,n){let r=this.options.processEntities;if(!r||!r.enabled)return e;if(r.allowedTags){let i=this.options.jPath?n.toString():n;if(!(Array.isArray(r.allowedTags)?r.allowedTags.includes(t):r.allowedTags(t,i)))return e}if(r.tagFilter){let i=this.options.jPath?n.toString():n;if(!r.tagFilter(t,i))return e}return this.entityDecoder.decode(e)}function Ej(e,t,n,r){return e&&=(r===void 0&&(r=t.child.length===0),e=this.parseTextData(e,t.tagname,n,!1,t[`:@`]?Object.keys(t[`:@`]).length!==0:!1,r),e!==void 0&&e!==``&&t.add(this.options.textNodeName,e),``),e}function Dj(){return this.stopNodeExpressionsSet.size===0?!1:this.matcher.matchesAny(this.stopNodeExpressionsSet)}function Oj(e,t,n=`>`){let r=0,i=e.length,a=n.charCodeAt(0),o=n.length>1?n.charCodeAt(1):-1,s=``,c=t;for(let n=t;n<i;n++){let t=e.charCodeAt(n);if(r)t===r&&(r=0);else if(t===34||t===39)r=t;else if(t===a)if(o!==-1){if(e.charCodeAt(n+1)===o)return s+=e.substring(c,n),{data:s,index:n}}else return s+=e.substring(c,n),{data:s,index:n};else t===9&&!r&&(s+=e.substring(c,n)+` `,c=n+1)}}function kj(e,t,n,r){let i=e.indexOf(t,n);if(i===-1)throw Error(r);return i+t.length-1}function Aj(e,t,n,r){let i=e.indexOf(t,n);if(i===-1)throw Error(r);return i}function jj(e,t,n,r=`>`){let i=Oj(e,t+1,r);if(!i)return;let a=i.data,o=i.index,s=a.search(/\s/),c=a,l=!0;s!==-1&&(c=a.substring(0,s),a=a.substring(s+1).trimStart());let u=c;if(n){let e=c.indexOf(`:`);e!==-1&&(c=c.substr(e+1),l=c!==i.data.substr(e+1))}return{tagName:c,tagExp:a,closeIndex:o,attrExpPresent:l,rawTagName:u}}function Mj(e,t,n){let r=n,i=1,a=e.length;for(;n<a;n++)if(e[n]===`<`){let a=e.charCodeAt(n+1);if(a===47){let a=Aj(e,`>`,n,`${t} is not closed`);if(e.substring(n+2,a).trim()===t&&(i--,i===0))return{tagContent:e.substring(r,n),i:a};n=a}else if(a===63)n=kj(e,`?>`,n+1,`StopNode is not closed.`);else if(a===33&&e.charCodeAt(n+2)===45&&e.charCodeAt(n+3)===45)n=kj(e,`-->`,n+3,`StopNode is not closed.`);else if(a===33&&e.charCodeAt(n+2)===91)n=kj(e,`]]>`,n,`StopNode is not closed.`)-2;else{let r=jj(e,n,!1);r&&((r&&r.tagName)===t&&r.tagExp[r.tagExp.length-1]!==`/`&&i++,n=r.closeIndex)}}}function Nj(e,t,n){if(t&&typeof e==`string`){let t=e.trim();return t===`true`?!0:t===`false`?!1:UA(e,n)}else if(fk(e))return e;else return``}function Pj(e,t,n,r){if(e){let r=e(t);n===t&&(n=r),t=r}return t=Fj(t,r),{tagName:t,tagExp:n}}function Fj(e,t){if(mk.includes(e))throw Error(`[SECURITY] Invalid name: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`);return pk.includes(e)?t.onDangerousProperty(e):e}var Ij=dA.getMetaDataSymbol();function Lj(e,t){if(!e||typeof e!=`object`)return{};if(!t)return e;let n={};for(let r in e)if(r.startsWith(t)){let i=r.substring(t.length);n[i]=e[r]}else n[r]=e[r];return n}function Rj(e,t,n,r){return zj(e,t,n,r)}function zj(e,t,n,r){let i,a={};for(let o=0;o<e.length;o++){let s=e[o],c=Bj(s);if(c!==void 0&&c!==t.textNodeName){let e=Lj(s[`:@`]||{},t.attributeNamePrefix);n.push(c,e)}if(c===t.textNodeName)i===void 0?i=s[c]:i+=``+s[c];else if(c===void 0)continue;else if(s[c]){let e=zj(s[c],t,n,r),i=Hj(e,t);if(Object.keys(e).length===0&&t.alwaysCreateTextNode&&(e[t.textNodeName]=``),s[`:@`]?Vj(e,s[`:@`],r,t):Object.keys(e).length===1&&e[t.textNodeName]!==void 0&&!t.alwaysCreateTextNode?e=e[t.textNodeName]:Object.keys(e).length===0&&(t.alwaysCreateTextNode?e[t.textNodeName]=``:e=``),s[Ij]!==void 0&&typeof e==`object`&&e&&(e[Ij]=s[Ij]),a[c]!==void 0&&Object.prototype.hasOwnProperty.call(a,c))Array.isArray(a[c])||(a[c]=[a[c]]),a[c].push(e);else{let n=t.jPath?r.toString():r;t.isArray(c,n,i)?a[c]=[e]:a[c]=e}c!==void 0&&c!==t.textNodeName&&n.pop()}}return typeof i==`string`?i.length>0&&(a[t.textNodeName]=i):i!==void 0&&(a[t.textNodeName]=i),a}function Bj(e){let t=Object.keys(e);for(let e=0;e<t.length;e++){let n=t[e];if(n!==`:@`)return n}}function Vj(e,t,n,r){if(t){let i=Object.keys(t),a=i.length;for(let o=0;o<a;o++){let a=i[o],s=a.startsWith(r.attributeNamePrefix)?a.substring(r.attributeNamePrefix.length):a,c=r.jPath?n.toString()+`.`+s:n;r.isArray(a,c,!0,!0)?e[a]=[t[a]]:e[a]=t[a]}}}function Hj(e,t){let{textNodeName:n}=t,r=Object.keys(e).length;return!!(r===0||r===1&&(e[n]||typeof e[n]==`boolean`||e[n]===0))}var Uj=class{constructor(e){this.externalEntities={},this.options=lA(e)}parse(e,t){if(typeof e!=`string`&&e.toString)e=e.toString();else if(typeof e!=`string`)throw Error(`XML data is accepted in String or Bytes[] form.`);if(t){t===!0&&(t={});let n=gk(e,t);if(n!==!0)throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`)}let n=new vj(this.options,this.externalEntities),r=n.parseXml(e);return this.options.preserveOrder||r===void 0?r:Rj(r,this.options,n.matcher,n.readonlyMatcher)}addEntity(e,t){if(t.indexOf(`&`)!==-1)throw Error(`Entity value can't have '&'`);if(e.indexOf(`&`)!==-1||e.indexOf(`;`)!==-1)throw Error(`An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'`);if(t===`&`)throw Error(`An entity with value '&' is not permitted`);this.externalEntities[e]=t}static getMetaDataSymbol(){return dA.getMetaDataSymbol()}};function Wj(e){return String(e).replace(/--/g,`- -`).replace(/--/g,`- -`).replace(/-$/,`- `)}function Gj(e){return String(e).replace(/\]\]>/g,`]]]]><![CDATA[>`)}function Kj(e){return String(e).replace(/"/g,`&quot;`).replace(/'/g,`&apos;`)}var qj=`
308
308
  `;function Jj(e,t){if(!Array.isArray(e)||e.length===0)return`1.0`;let n=e[0];if(tM(n)===`?xml`){let e=n[`:@`];if(e){let n=t.attributeNamePrefix+`version`;if(e[n])return e[n]}}return`1.0`}function Yj(e,t,n,r,i){return!n.sanitizeName||i(e)?e:n.sanitizeName(e,{isAttribute:t,matcher:r.readOnly()})}function Xj(e,t){let n=``;t.format&&(n=qj);let r=[];if(t.stopNodes&&Array.isArray(t.stopNodes))for(let e=0;e<t.stopNodes.length;e++){let n=t.stopNodes[e];typeof n==`string`?r.push(new XA(n)):n instanceof XA&&r.push(n)}let i=CA(`qName`,{xmlVersion:Jj(e,t)}),a=new $A;return Zj(e,t,n,a,r,i)}function Zj(e,t,n,r,i,a){let o=``,s=!1;if(t.maxNestedTags&&r.getDepth()>t.maxNestedTags)throw Error(`Maximum nested tags exceeded`);if(!Array.isArray(e)){if(e!=null){let n=e.toString();return n=iM(n,t),n}return``}for(let c=0;c<e.length;c++){let l=e[c],u=tM(l);if(u===void 0)continue;let d=u===t.textNodeName||u===t.cdataPropName||u===t.commentPropName||u[0]===`?`?u:Yj(u,!1,t,r,a),f=Qj(l[`:@`],t);r.push(d,f);let p=rM(r,i);if(d===t.textNodeName){let e=l[u];p||(e=t.tagValueProcessor(d,e),e=iM(e,t)),s&&(o+=n),o+=e,s=!1,r.pop();continue}else if(d===t.cdataPropName){s&&(o+=n);let e=l[u][0][t.textNodeName],i=Gj(e);o+=`<![CDATA[${i}]]>`,s=!1,r.pop();continue}else if(d===t.commentPropName){let e=l[u][0][t.textNodeName],i=Wj(e);o+=n+`<!--${i}-->`,s=!0,r.pop();continue}else if(d[0]===`?`){let e=nM(l[`:@`],t,p,r,a);o+=(d===`?xml`?``:n)+`<${d}${e}?>`,s=!0,r.pop();continue}let m=n;m!==``&&(m+=t.indentBy);let h=n+`<${d}${nM(l[`:@`],t,p,r,a)}`,g;g=p?$j(l[u],t):Zj(l[u],t,m,r,i,a),t.unpairedTags.indexOf(d)===-1?(!g||g.length===0)&&t.suppressEmptyNode?o+=h+`/>`:g&&g.endsWith(`>`)?o+=h+`>${g}${n}</${d}>`:(o+=h+`>`,g&&n!==``&&(g.includes(`/>`)||g.includes(`</`))?o+=n+t.indentBy+g+n:o+=g,o+=`</${d}>`):t.suppressUnpairedNode?o+=h+`>`:o+=h+`/>`,s=!0,r.pop()}return o}function Qj(e,t){if(!e||t.ignoreAttributes)return null;let n={},r=!1;for(let i in e){if(!Object.prototype.hasOwnProperty.call(e,i))continue;let a=i.startsWith(t.attributeNamePrefix)?i.substr(t.attributeNamePrefix.length):i;n[a]=Kj(e[i]),r=!0}return r?n:null}function $j(e,t){if(!Array.isArray(e))return e==null?``:e.toString();let n=``;for(let r=0;r<e.length;r++){let i=e[r],a=tM(i);if(a===t.textNodeName)n+=i[a];else if(a===t.cdataPropName)n+=i[a][0][t.textNodeName];else if(a===t.commentPropName)n+=i[a][0][t.textNodeName];else if(a&&a[0]===`?`)continue;else if(a){let e=eM(i[`:@`],t),r=$j(i[a],t);!r||r.length===0?n+=`<${a}${e}/>`:n+=`<${a}${e}>${r}</${a}>`}}return n}function eM(e,t){let n=``;if(e&&!t.ignoreAttributes)for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;let i=e[r];i===!0&&t.suppressBooleanAttributes?n+=` ${r.substr(t.attributeNamePrefix.length)}`:n+=` ${r.substr(t.attributeNamePrefix.length)}="${Kj(i)}"`}return n}function tM(e){let t=Object.keys(e);for(let n=0;n<t.length;n++){let r=t[n];if(Object.prototype.hasOwnProperty.call(e,r)&&r!==`:@`)return r}}function nM(e,t,n,r,i){let a=``;if(e&&!t.ignoreAttributes)for(let o in e){if(!Object.prototype.hasOwnProperty.call(e,o))continue;let s=o.substr(t.attributeNamePrefix.length),c=n?s:Yj(s,!0,t,r,i),l;n?l=e[o]:(l=t.attributeValueProcessor(o,e[o]),l=iM(l,t)),l===!0&&t.suppressBooleanAttributes?a+=` ${c}`:a+=` ${c}="${Kj(l)}"`}return a}function rM(e,t){if(!t||t.length===0)return!1;for(let n=0;n<t.length;n++)if(e.matches(t[n]))return!0;return!1}function iM(e,t){if(e&&e.length>0&&t.processEntities)for(let n=0;n<t.entities.length;n++){let r=t.entities[n];e=e.replace(r.regex,r.val)}return e}function aM(e){return typeof e==`function`?e:Array.isArray(e)?t=>{for(let n of e)if(typeof n==`string`&&t===n||n instanceof RegExp&&n.test(t))return!0}:()=>!1}var oM={attributeNamePrefix:`@_`,attributesGroupName:!1,textNodeName:`#text`,ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:` `,suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:RegExp(`&`,`g`),val:`&amp;`},{regex:RegExp(`>`,`g`),val:`&gt;`},{regex:RegExp(`<`,`g`),val:`&lt;`},{regex:RegExp(`'`,`g`),val:`&apos;`},{regex:RegExp(`"`,`g`),val:`&quot;`}],processEntities:!0,stopNodes:[],oneListGroup:!1,maxNestedTags:100,jPath:!0,sanitizeName:!1};function sM(e){if(this.options=Object.assign({},oM,e),this.options.stopNodes&&Array.isArray(this.options.stopNodes)&&(this.options.stopNodes=this.options.stopNodes.map(e=>typeof e==`string`&&e.startsWith(`*.`)?`..`+e.substring(2):e)),this.stopNodeExpressions=[],this.options.stopNodes&&Array.isArray(this.options.stopNodes))for(let e=0;e<this.options.stopNodes.length;e++){let t=this.options.stopNodes[e];typeof t==`string`?this.stopNodeExpressions.push(new XA(t)):t instanceof XA&&this.stopNodeExpressions.push(t)}this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=aM(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=fM),this.processTextOrObjNode=uM,this.options.format?(this.indentate=dM,this.tagEndChar=`>
309
309
  `,this.newLine=`
310
- `):(this.indentate=function(){return``},this.tagEndChar=`>`,this.newLine=``)}function cM(e,t){let n=e[`?xml`];if(n&&typeof n==`object`){if(t.attributesGroupName&&n[t.attributesGroupName]){let e=n[t.attributesGroupName][t.attributeNamePrefix+`version`];if(e)return e}let e=n[t.attributeNamePrefix+`version`];if(e)return e}return`1.0`}function lM(e,t,n,r,i){return!n.sanitizeName||i(e)?e:n.sanitizeName(e,{isAttribute:t,matcher:r.readOnly()})}sM.prototype.build=function(e){if(this.options.preserveOrder)return Xj(e,this.options);{Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e});let t=new $A,n=CA(`qName`,{xmlVersion:cM(e,this.options)});return this.j2x(e,0,t,n).val}},sM.prototype.j2x=function(e,t,n,r){let i=``,a=``;if(this.options.maxNestedTags&&n.getDepth()>=this.options.maxNestedTags)throw Error(`Maximum nested tags exceeded`);let o=this.options.jPath?n.toString():n,s=this.checkStopNode(n);for(let c in e){if(!Object.prototype.hasOwnProperty.call(e,c))continue;let l=c===this.options.textNodeName||c===this.options.cdataPropName||c===this.options.commentPropName||this.options.attributesGroupName&&c===this.options.attributesGroupName||this.isAttribute(c)||c[0]===`?`?c:lM(c,!1,this.options,n,r);if(e[c]===void 0)this.isAttribute(c)&&(a+=``);else if(e[c]===null)this.isAttribute(c)||l===this.options.cdataPropName||l===this.options.commentPropName?a+=``:l[0]===`?`?a+=this.indentate(t)+`<`+l+`?`+this.tagEndChar:a+=this.indentate(t)+`<`+l+`/`+this.tagEndChar;else if(e[c]instanceof Date)a+=this.buildTextValNode(e[c],l,``,t,n);else if(typeof e[c]!=`object`){let u=this.isAttribute(c);if(u&&!this.ignoreAttributesFn(u,o)){let t=lM(u,!0,this.options,n,r);i+=this.buildAttrPairStr(t,``+e[c],s)}else if(!u)if(c===this.options.textNodeName){let t=this.options.tagValueProcessor(c,``+e[c]);a+=this.replaceEntitiesValue(t)}else{n.push(l);let r=this.checkStopNode(n);if(n.pop(),r){let n=``+e[c];n===``?a+=this.indentate(t)+`<`+l+this.closeTag(l)+this.tagEndChar:a+=this.indentate(t)+`<`+l+`>`+n+`</`+l+this.tagEndChar}else a+=this.buildTextValNode(e[c],l,``,t,n)}}else if(Array.isArray(e[c])){let i=e[c].length,o=``,s=``;for(let u=0;u<i;u++){let i=e[c][u];if(i!==void 0)if(i===null)l[0]===`?`?a+=this.indentate(t)+`<`+l+`?`+this.tagEndChar:a+=this.indentate(t)+`<`+l+`/`+this.tagEndChar;else if(typeof i==`object`)if(this.options.oneListGroup){n.push(l);let e=this.j2x(i,t+1,n,r);n.pop(),o+=e.val,this.options.attributesGroupName&&i.hasOwnProperty(this.options.attributesGroupName)&&(s+=e.attrStr)}else o+=this.processTextOrObjNode(i,l,t,n,r);else if(this.options.oneListGroup){let e=this.options.tagValueProcessor(l,i);e=this.replaceEntitiesValue(e),o+=e}else{n.push(l);let e=this.checkStopNode(n);if(n.pop(),e){let e=``+i;e===``?o+=this.indentate(t)+`<`+l+this.closeTag(l)+this.tagEndChar:o+=this.indentate(t)+`<`+l+`>`+e+`</`+l+this.tagEndChar}else o+=this.buildTextValNode(i,l,``,t,n)}}this.options.oneListGroup&&(o=this.buildObjectNode(o,l,s,t)),a+=o}else if(this.options.attributesGroupName&&c===this.options.attributesGroupName){let t=Object.keys(e[c]),a=t.length;for(let o=0;o<a;o++){let a=lM(t[o],!0,this.options,n,r);i+=this.buildAttrPairStr(a,``+e[c][t[o]],s)}}else a+=this.processTextOrObjNode(e[c],l,t,n,r)}return{attrStr:i,val:a}},sM.prototype.buildAttrPairStr=function(e,t,n){return n||(t=this.options.attributeValueProcessor(e,``+t),t=this.replaceEntitiesValue(t)),this.options.suppressBooleanAttributes&&t===`true`?` `+e:` `+e+`="`+Kj(t)+`"`};function uM(e,t,n,r,i){let a=this.extractAttributes(e);if(r.push(t,a),this.checkStopNode(r)){let i=this.buildRawContent(e),a=this.buildAttributesForStopNode(e);return r.pop(),this.buildObjectNode(i,t,a,n)}let o=this.j2x(e,n+1,r,i);return r.pop(),t[0]===`?`?this.buildTextValNode(``,t,o.attrStr,n,r):e[this.options.textNodeName]!==void 0&&Object.keys(e).length===1?this.buildTextValNode(e[this.options.textNodeName],t,o.attrStr,n,r):this.buildObjectNode(o.val,t,o.attrStr,n)}sM.prototype.extractAttributes=function(e){if(!e||typeof e!=`object`)return null;let t={},n=!1;if(this.options.attributesGroupName&&e[this.options.attributesGroupName]){let r=e[this.options.attributesGroupName];for(let e in r){if(!Object.prototype.hasOwnProperty.call(r,e))continue;let i=e.startsWith(this.options.attributeNamePrefix)?e.substring(this.options.attributeNamePrefix.length):e;t[i]=Kj(r[e]),n=!0}}else for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;let i=this.isAttribute(r);i&&(t[i]=Kj(e[r]),n=!0)}return n?t:null},sM.prototype.buildRawContent=function(e){if(typeof e==`string`)return e;if(typeof e!=`object`||!e)return String(e);if(e[this.options.textNodeName]!==void 0)return e[this.options.textNodeName];let t=``;for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n)||this.isAttribute(n)||this.options.attributesGroupName&&n===this.options.attributesGroupName)continue;let r=e[n];if(n===this.options.textNodeName)t+=r;else if(Array.isArray(r)){for(let e of r)if(typeof e==`string`||typeof e==`number`)t+=`<${n}>${e}</${n}>`;else if(typeof e==`object`&&e){let r=this.buildRawContent(e),i=this.buildAttributesForStopNode(e);r===``?t+=`<${n}${i}/>`:t+=`<${n}${i}>${r}</${n}>`}}else if(typeof r==`object`&&r){let e=this.buildRawContent(r),i=this.buildAttributesForStopNode(r);e===``?t+=`<${n}${i}/>`:t+=`<${n}${i}>${e}</${n}>`}else t+=`<${n}>${r}</${n}>`}return t},sM.prototype.buildAttributesForStopNode=function(e){if(!e||typeof e!=`object`)return``;let t=``;if(this.options.attributesGroupName&&e[this.options.attributesGroupName]){let n=e[this.options.attributesGroupName];for(let e in n){if(!Object.prototype.hasOwnProperty.call(n,e))continue;let r=e.startsWith(this.options.attributeNamePrefix)?e.substring(this.options.attributeNamePrefix.length):e,i=n[e];i===!0&&this.options.suppressBooleanAttributes?t+=` `+r:t+=` `+r+`="`+Kj(i)+`"`}}else for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let r=this.isAttribute(n);if(r){let i=e[n];i===!0&&this.options.suppressBooleanAttributes?t+=` `+r:t+=` `+r+`="`+Kj(i)+`"`}}return t},sM.prototype.buildObjectNode=function(e,t,n,r){if(e===``)return t[0]===`?`?this.indentate(r)+`<`+t+n+`?`+this.tagEndChar:this.indentate(r)+`<`+t+n+this.closeTag(t)+this.tagEndChar;if(t[0]===`?`)return this.indentate(r)+`<`+t+n+`?`+this.tagEndChar;{let i=`</`+t+this.tagEndChar,a=``;return t[0]===`?`&&(a=`?`,i=``),(n||n===``)&&e.indexOf(`<`)===-1?this.indentate(r)+`<`+t+n+a+`>`+e+i:this.options.commentPropName!==!1&&t===this.options.commentPropName&&a.length===0?this.indentate(r)+`<!--${Wj(e)}-->`+this.newLine:this.indentate(r)+`<`+t+n+a+this.tagEndChar+e+this.indentate(r)+i}},sM.prototype.closeTag=function(e){let t=``;return this.options.unpairedTags.indexOf(e)===-1?t=this.options.suppressEmptyNode?`/`:`></${e}`:this.options.suppressUnpairedNode||(t=`/`),t},sM.prototype.checkStopNode=function(e){if(!this.stopNodeExpressions||this.stopNodeExpressions.length===0)return!1;for(let t=0;t<this.stopNodeExpressions.length;t++)if(e.matches(this.stopNodeExpressions[t]))return!0;return!1},sM.prototype.buildTextValNode=function(e,t,n,r,i){if(this.options.cdataPropName!==!1&&t===this.options.cdataPropName){let t=Gj(e);return this.indentate(r)+`<![CDATA[${t}]]>`+this.newLine}else if(this.options.commentPropName!==!1&&t===this.options.commentPropName){let t=Wj(e);return this.indentate(r)+`<!--${t}-->`+this.newLine}else if(t[0]===`?`)return this.indentate(r)+`<`+t+n+`?`+this.tagEndChar;else{let i=this.options.tagValueProcessor(t,e);return i=this.replaceEntitiesValue(i),i===``?this.indentate(r)+`<`+t+n+this.closeTag(t)+this.tagEndChar:this.indentate(r)+`<`+t+n+`>`+i+`</`+t+this.tagEndChar}},sM.prototype.replaceEntitiesValue=function(e){if(e&&e.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){let n=this.options.entities[t];e=e.replace(n.regex,n.val)}return e};function dM(e){return this.options.indentBy.repeat(e)}function fM(e){return e.startsWith(this.options.attributeNamePrefix)&&e!==this.options.textNodeName?e.substr(this.attrPrefixLen):!1}var pM=sM,mM=f.z.object({created_at:f.z.string(),updated_at:f.z.string()}),hM=f.z.enum([`local`,`shared`,`platform`]),gM=f.z.enum([`none`,`secrets`,`fields`]),_M={scope:hM.optional(),override:gM.optional(),enforce:f.z.boolean().optional()},vM=f.z.object({id:f.z.string(),version:f.z.string().optional()}),yM=f.z.object({name:f.z.string(),version:f.z.string()}),bM=f.z.object({name:f.z.string(),value:f.z.string().optional()}),xM=f.z.object({name:f.z.string().max(255),code:f.z.string().max(1e5),supported_triggers:f.z.array(vM).optional(),runtime:f.z.string().max(50).optional(),dependencies:f.z.array(yM).optional(),secrets:f.z.array(bM).optional(),is_system:f.z.boolean().optional(),..._M,inherit:f.z.boolean().optional()});xM.partial().extend({status:f.z.enum([`draft`,`built`]).optional(),deployed_at:f.z.string().optional()});var SM=xM.extend({id:f.z.string(),tenant_id:f.z.string(),status:f.z.enum([`draft`,`built`]).default(`built`),deployed_at:f.z.string().optional(),secrets:f.z.array(f.z.object({name:f.z.string(),value:f.z.string().optional()})).optional()}).extend(mM.shape),CM=f.z.object({name:f.z.string()});SM.extend({secrets:f.z.array(CM).optional()});var wM=f.z.string(),TM=f.z.enum([`unspecified`,`pending`,`final`,`partial`,`canceled`,`suspended`]),EM=f.z.object({id:f.z.string(),msg:f.z.string(),url:f.z.string().optional()}),DM=f.z.object({action_name:f.z.string(),error:EM.nullable(),started_at:f.z.string(),ended_at:f.z.string()}),OM=f.z.object({level:f.z.enum([`log`,`info`,`warn`,`error`,`debug`]),message:f.z.string()}),kM=f.z.array(f.z.object({action_name:f.z.string(),lines:f.z.array(OM)}));f.z.object({id:f.z.string(),tenant_id:f.z.string(),trigger_id:wM,status:TM,results:f.z.array(DM),logs:kM.optional(),created_at:f.z.string(),updated_at:f.z.string()}).omit({tenant_id:!0,created_at:!0,updated_at:!0}),f.z.object({action_id:f.z.string(),code:f.z.string().max(1e5),runtime:f.z.string().max(50).optional(),dependencies:f.z.array(yM).optional(),secrets:f.z.array(bM).optional(),supported_triggers:f.z.array(vM).optional(),deployed:f.z.boolean().default(!0)}).extend({id:f.z.string(),tenant_id:f.z.string(),number:f.z.number().int()}).extend(mM.shape);var AM=f.z.enum([`user_action`,`admin_action`,`system`,`api`]),jM=f.z.object({type:f.z.enum([`user`,`admin`,`system`,`api_key`,`client_credentials`]),id:f.z.string().optional(),email:f.z.string().optional(),org_id:f.z.string().optional(),org_name:f.z.string().optional(),scopes:f.z.array(f.z.string()).optional(),client_id:f.z.string().optional()}),MM=f.z.object({type:f.z.string(),id:f.z.string(),before:f.z.record(f.z.string(),f.z.unknown()).optional(),after:f.z.record(f.z.string(),f.z.unknown()).optional(),diff:f.z.record(f.z.string(),f.z.object({old:f.z.unknown(),new:f.z.unknown()})).optional()}),NM=f.z.object({user:f.z.object({user_id:f.z.string(),name:f.z.string().optional(),email:f.z.string().optional()}).optional(),strategy:f.z.string(),credentials:f.z.object({jti:f.z.string().optional(),scopes:f.z.array(f.z.string()).optional()}).optional()}),PM=f.z.object({method:f.z.string(),path:f.z.string(),query:f.z.record(f.z.string(),f.z.string()).optional(),body:f.z.unknown().optional(),ip:f.z.string(),user_agent:f.z.string().optional(),correlation_id:f.z.string().optional(),redirect_uri:f.z.string().optional(),authorization_url:f.z.string().optional(),auth:NM.optional()}),FM=f.z.object({status_code:f.z.number(),body:f.z.unknown().optional()}),IM=f.z.object({country_code:f.z.string(),city_name:f.z.string(),latitude:f.z.string(),longitude:f.z.string(),time_zone:f.z.string(),continent_code:f.z.string()}),LM=f.z.object({name:f.z.string(),version:f.z.string(),env:f.z.record(f.z.string(),f.z.string()).optional()});f.z.object({tenant_id:f.z.string(),event_type:f.z.string(),log_type:f.z.string(),description:f.z.string().optional(),category:AM,actor:jM,target:MM,request:PM,response:FM.optional(),connection:f.z.string().optional(),connection_id:f.z.string().optional(),client_name:f.z.string().optional(),strategy:f.z.string().optional(),strategy_type:f.z.string().optional(),audience:f.z.string().optional(),scope:f.z.string().optional(),location:IM.optional(),auth0_client:LM.optional(),hostname:f.z.string(),is_mobile:f.z.boolean().optional(),execution_id:f.z.string().optional(),details:f.z.record(f.z.string(),f.z.unknown()).optional(),login_session_id:f.z.string().optional(),timestamp:f.z.string()}).extend({id:f.z.string()}),f.z.enum([`AUTH0`,`EMAIL`,`REDIRECT`]),f.z.enum([`CREATE_USER`,`GET_USER`,`UPDATE_USER`,`SEND_REQUEST`,`SEND_EMAIL`]),f.z.enum([`VERIFY_EMAIL`]);var RM=f.z.object({require_mx_record:f.z.boolean().optional(),block_aliases:f.z.boolean().optional(),block_free_emails:f.z.boolean().optional(),block_disposable_emails:f.z.boolean().optional(),blocklist:f.z.array(f.z.string()).optional(),allowlist:f.z.array(f.z.string()).optional()}),zM=f.z.object({id:f.z.string(),alias:f.z.string().max(100).optional(),type:f.z.literal(`AUTH0`),action:f.z.literal(`UPDATE_USER`),allow_failure:f.z.boolean().optional(),mask_output:f.z.boolean().optional(),params:f.z.object({connection_id:f.z.string().optional(),user_id:f.z.string(),changes:f.z.record(f.z.string(),f.z.any())})}),BM=f.z.object({id:f.z.string(),alias:f.z.string().max(100).optional(),type:f.z.literal(`EMAIL`),action:f.z.literal(`VERIFY_EMAIL`),allow_failure:f.z.boolean().optional(),mask_output:f.z.boolean().optional(),params:f.z.object({email:f.z.string(),rules:RM.optional()})}),VM=f.z.enum([`change-email`,`account`,`custom`]),HM=f.z.object({id:f.z.string(),alias:f.z.string().max(100).optional(),type:f.z.literal(`REDIRECT`),action:f.z.literal(`REDIRECT_USER`),allow_failure:f.z.boolean().optional(),mask_output:f.z.boolean().optional(),params:f.z.object({target:VM.openapi({description:`The predefined target to redirect to, or 'custom' for a custom URL`}),custom_url:f.z.string().optional().openapi({description:`Custom URL to redirect to when target is 'custom'`})})}),UM=f.z.union([zM,BM,HM]);f.z.object({name:f.z.string().min(1).max(150).openapi({description:`The name of the flow`}),actions:f.z.array(UM).optional().default([]).openapi({description:`The list of actions to execute in sequence`})}).extend(mM.shape).extend({id:f.z.string().openapi({description:`Unique identifier for the flow`,example:`af_12tMpdJ3iek7svMyZkSh5M`})}),f.z.object({page:f.z.string().min(0).optional().default(`0`).transform(e=>parseInt(e,10)).openapi({description:`The page number where 0 is the first page`}),per_page:f.z.string().min(1).optional().default(`50`).transform(e=>parseInt(e,10)).openapi({description:`The number of items per page. Defaults to 50.`}),include_totals:f.z.string().optional().default(`false`).transform(e=>e===`true`).openapi({description:`If the total number of items should be included in the response`}),sort:f.z.string().regex(/^.+:(-1|1)$/).optional().openapi({description:`A property that should have the format 'string:-1' or 'string:1'`}),q:f.z.string().optional().openapi({description:`A lucene query string used to filter the results`})}),f.z.object({start:f.z.number(),limit:f.z.number(),length:f.z.number(),total:f.z.number().optional(),next:f.z.string().optional()});var WM=f.z.object({email:f.z.string().optional(),email_verified:f.z.boolean().optional(),name:f.z.string().optional(),username:f.z.string().optional(),given_name:f.z.string().optional(),phone_number:f.z.string().optional(),phone_verified:f.z.boolean().optional(),family_name:f.z.string().optional()}).catchall(f.z.any()),GM=f.z.object({connection:f.z.string(),user_id:f.z.string(),provider:f.z.string(),isSocial:f.z.boolean(),email:f.z.string().optional(),email_verified:f.z.boolean().optional(),phone_number:f.z.string().optional(),phone_verified:f.z.boolean().optional(),username:f.z.string().optional(),access_token:f.z.string().optional(),access_token_secret:f.z.string().optional(),refresh_token:f.z.string().optional(),profileData:WM.optional()}),KM=f.z.object({formatted:f.z.string().optional(),street_address:f.z.string().optional(),locality:f.z.string().optional(),region:f.z.string().optional(),postal_code:f.z.string().optional(),country:f.z.string().optional()}).optional(),qM=f.z.object({email:f.z.string().transform(e=>e.toLowerCase()).optional(),username:f.z.string().refine(e=>!e.includes(`@`),{message:`Usernames must not contain "@". Use the email field for email addresses.`}).optional(),phone_number:f.z.string().optional(),phone_verified:f.z.boolean().optional(),given_name:f.z.string().optional(),family_name:f.z.string().optional(),nickname:f.z.string().optional(),name:f.z.string().optional(),picture:f.z.string().optional(),locale:f.z.string().optional(),linked_to:f.z.string().optional(),profileData:f.z.string().optional(),user_id:f.z.string().optional(),app_metadata:f.z.any().default({}).optional(),user_metadata:f.z.any().default({}).optional(),middle_name:f.z.string().optional(),preferred_username:f.z.string().optional(),profile:f.z.string().optional(),website:f.z.string().optional(),gender:f.z.string().optional(),birthdate:f.z.string().optional(),zoneinfo:f.z.string().optional(),address:KM});qM.extend({email_verified:f.z.boolean().default(!1),verify_email:f.z.boolean().optional(),last_ip:f.z.string().optional(),last_login:f.z.string().optional(),user_id:f.z.string().optional(),provider:f.z.string().optional(),connection:f.z.string(),is_social:f.z.boolean().optional(),blocked:f.z.boolean().optional(),registration_completed_at:f.z.string().optional(),password:f.z.object({hash:f.z.string(),algorithm:f.z.string()}).optional()}).omit({password:!0}).extend(mM.shape).extend({user_id:f.z.string(),provider:f.z.string(),is_social:f.z.boolean(),email:f.z.string().optional(),login_count:f.z.number().default(0),identities:f.z.array(GM).optional()}).omit({registration_completed_at:!0}),qM.extend({login_count:f.z.number(),multifactor:f.z.array(f.z.string()).optional(),last_ip:f.z.string().optional(),last_login:f.z.string().optional(),user_id:f.z.string()}).catchall(f.z.any());function JM(){return f.z.string().trim()}var YM=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`,XM=(e=21)=>{let t=``,n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=YM[n[e]&63];return t},ZM=f.z.enum([`cookie`,`query`]),QM=f.z.enum([`ip`,`asn`,`none`]),$M=f.z.object({can_create_session_transfer_token:f.z.boolean().optional().openapi({default:!1,description:`Whether this client may exchange a refresh token for a session_transfer_token.`}),enforce_cascade_revocation:f.z.boolean().optional().openapi({default:!0,description:`Whether revoking the refresh token a session_transfer_token was minted from also ends the sessions (and their refresh tokens) created with that token.`}),allowed_authentication_methods:f.z.array(ZM).optional().openapi({default:[],description:"How this client accepts a session_transfer_token at /authorize: as the `session_transfer_token` query parameter (`query`) and/or the `auth0_session_transfer_token` cookie (`cookie`). Empty means the client does not accept session transfer."}),enforce_device_binding:QM.optional().openapi({default:`ip`,description:"Whether the browser redeeming a session_transfer_token must come from the same IP address (`ip`) or autonomous system (`asn`) as the request that minted it. `none` disables the check."}),allow_refresh_token:f.z.boolean().optional().openapi({default:!1,description:`Whether a login established with a session_transfer_token may be issued a refresh token.`}),enforce_online_refresh_tokens:f.z.boolean().optional().openapi({default:!0,description:`Whether refresh tokens issued on a transferred session are bound to that session's lifetime.`}),allow_onward_transfer:f.z.boolean().optional().openapi({default:!1,description:`AuthHero extension. Whether this client may mint a session_transfer_token from a login that was itself established with one (A → B → C). The onward token stays tied to the original refresh token.`}),trust_forwarded_ip:f.z.boolean().optional().openapi({default:!1,description:"AuthHero extension. Whether an authenticated confidential client may pass the end user's IP address in the `auth0-forwarded-for` header when minting, so device binding compares against the browser rather than the client's backend. Ignored for requests without client authentication."})}).passthrough(),eN=f.z.object({client_id:f.z.string().describe(`The client that minted the session_transfer_token`),family_id:f.z.string().describe(`Rotation family of the refresh token the session_transfer_token was minted from. The family id is stable across rotation, the row id is not.`),cascade_revocation:f.z.boolean().describe(`Whether this session ends when the parent refresh token family is no longer active`)}),tN=f.z.object({client_id:f.z.string().optional().openapi({description:`ID of this client. Generated server-side if omitted (Auth0 behavior).`}),name:f.z.string().min(1).openapi({description:`Name of this client (min length: 1 character, does not allow < or >).`}),description:f.z.string().max(140).optional().openapi({description:`Free text description of this client (max length: 140 characters).`}),global:f.z.boolean().default(!1).openapi({description:`Whether this is your global 'All Applications' client representing legacy tenant settings (true) or a regular client (false).`}),client_secret:JM().default(()=>XM()).optional().openapi({description:`Client secret (which you must not make public).`}),app_type:f.z.enum([`native`,`spa`,`regular_web`,`non_interactive`,`resource_server`,`express_configuration`,`rms`,`box`,`cloudbees`,`concur`,`dropbox`,`mscrm`,`echosign`,`egnyte`,`newrelic`,`office365`,`salesforce`,`sentry`,`sharepoint`,`slack`,`springcm`,`zendesk`,`zoom`,`sso_integration`,`oag`]).default(`regular_web`).optional().openapi({description:`The type of application this client represents`}),logo_uri:f.z.string().url().optional().openapi({description:`URL of the logo to display for this client. Recommended size is 150x150 pixels.`}),is_first_party:f.z.boolean().default(!0).openapi({description:`Whether this client is a first party client (true) or not (false). First-party clients skip the consent screen; third-party clients require explicit user consent for non-basic scopes.`}),oidc_conformant:f.z.boolean().default(!0).openapi({description:`Whether this client conforms to strict OIDC specifications (true) or uses legacy features (false).`}),auth0_conformant:f.z.boolean().default(!0).openapi({description:`Whether this client follows Auth0-compatible behavior (true) or strict OIDC behavior (false). When true, profile/email claims are included in the ID token when scopes are requested. When false, these claims are only available from the userinfo endpoint (strict OIDC 5.4 compliance).`}),callbacks:f.z.array(f.z.string()).default([]).optional().openapi({description:`Comma-separated list of URLs whitelisted for Auth0 to use as a callback to the client after authentication.`}),allowed_origins:f.z.array(f.z.string()).default([]).optional().openapi({description:`Comma-separated list of URLs allowed to make requests from JavaScript to Auth0 API (typically used with CORS). By default, all your callback URLs will be allowed. This field allows you to enter other origins if necessary. You can also use wildcards at the subdomain level (e.g., https://*.contoso.com). Query strings and hash information are not taken into account when validating these URLs.`}),web_origins:f.z.array(f.z.string()).default([]).optional().openapi({description:`Comma-separated list of allowed origins for use with Cross-Origin Authentication, Device Flow, and web message response mode.`}),client_aliases:f.z.array(f.z.string()).default([]).optional().openapi({description:`List of audiences/realms for SAML protocol. Used by the wsfed addon.`}),allowed_clients:f.z.array(f.z.string()).default([]).optional().openapi({description:`List of allow clients and API ids that are allowed to make delegation requests. Empty means all all your clients are allowed.`}),connections:f.z.array(f.z.string()).default([]).optional().openapi({description:`List of connection IDs enabled for this client. The order determines the display order on the login page.`}),allowed_logout_urls:f.z.array(f.z.string()).default([]).optional().openapi({description:`Comma-separated list of URLs that are valid to redirect to after logout from Auth0. Wildcards are allowed for subdomains.`}),session_transfer:$M.optional().openapi({description:`Session transfer (Auth0 Native to Web SSO) configuration: lets this client mint a session_transfer_token from a refresh token and/or accept one at /authorize.`}),oidc_logout:f.z.object({backchannel_logout_urls:f.z.array(f.z.string()).optional().openapi({description:`URLs that receive a signed OIDC Back-Channel Logout 1.0 logout token when a session this client participated in ends.`}),backchannel_logout_initiators:f.z.object({mode:f.z.enum([`all`,`custom`]).optional().openapi({description:`Whether all session-end events initiate a backchannel logout (all) or only the selected_initiators (custom).`}),selected_initiators:f.z.array(f.z.string()).optional().openapi({description:`Logout initiators that trigger a backchannel logout when mode is custom (e.g. rp-logout, idp-logout, password-changed).`})}).passthrough().optional().openapi({description:`Controls which session-end events initiate backchannel logout notifications. Stored for Auth0 compatibility; not yet enforced — all initiators currently notify.`})}).passthrough().default({}).optional().openapi({description:`Configuration for OIDC backchannel logout`}),grant_types:f.z.array(f.z.string()).default([]).optional().openapi({description:`List of grant types supported for this application. Can include authorization_code, implicit, refresh_token, client_credentials, password, http://auth0.com/oauth/grant-type/password-realm, http://auth0.com/oauth/grant-type/mfa-oob, http://auth0.com/oauth/grant-type/mfa-otp, http://auth0.com/oauth/grant-type/mfa-recovery-code, urn:openid:params:grant-type:ciba, and urn:ietf:params:oauth:grant-type:device_code.`}),jwt_configuration:f.z.record(f.z.string(),f.z.any()).default({}).optional().openapi({description:`Configuration related to JWTs for the client.`}),signing_keys:f.z.array(f.z.record(f.z.string(),f.z.any())).default([]).optional().openapi({description:`Signing certificates associated with this client.`}),encryption_key:f.z.record(f.z.string(),f.z.any()).default({}).optional().openapi({description:`Encryption used for WsFed responses with this client.`}),sso:f.z.boolean().default(!1).openapi({description:`Applies only to SSO clients and determines whether Auth0 will handle Single Sign On (true) or whether the Identity Provider will (false).`}),sso_disabled:f.z.boolean().default(!1).openapi({description:`Whether Single Sign On is disabled for this client. When true, existing SSO sessions will not be reused and users must authenticate every time.`}),cross_origin_authentication:f.z.boolean().default(!1).openapi({description:`Whether this client can be used to make cross-origin authentication requests (true) or it is not allowed to make such requests (false).`}),cross_origin_loc:f.z.string().url().optional().openapi({description:`URL of the location in your site where the cross origin verification takes place for the cross-origin auth flow when performing Auth in your own domain instead of Auth0 hosted login page.`}),custom_login_page_on:f.z.boolean().default(!1).openapi({description:`Whether a custom login page is to be used (true) or the default provided login page (false).`}),custom_login_page:f.z.string().optional().openapi({description:`The content (HTML, CSS, JS) of the custom login page.`}),custom_login_page_preview:f.z.string().optional().openapi({description:`The content (HTML, CSS, JS) of the custom login page. (Used on Previews)`}),form_template:f.z.string().optional().openapi({description:`HTML form template to be used for WS-Federation.`}),addons:f.z.record(f.z.string(),f.z.any()).default({}).optional().openapi({description:`Addons enabled for this client and their associated configurations.`}),token_endpoint_auth_method:f.z.enum([`none`,`client_secret_post`,`client_secret_basic`,`client_secret_jwt`,`private_key_jwt`]).default(`client_secret_basic`).optional().openapi({description:"Defines the requested authentication method for the token endpoint. `none` (public client), `client_secret_post` / `client_secret_basic` (HTTP POST / Basic), `client_secret_jwt` (RFC 7523 HMAC assertion using client_secret), or `private_key_jwt` (RFC 7523 asymmetric assertion verified against the client's `jwks` / `jwks_uri`)."}),client_metadata:f.z.record(f.z.string(),f.z.string().max(255)).default({}).optional().openapi({description:`Metadata associated with the client, in the form of an object with string values (max 255 chars). Maximum of 10 metadata properties allowed. Field names (max 255 chars) are alphanumeric and may only include the following special characters: :,-+=_*?"/()<>@ [Tab][Space]`}),hide_sign_up_disabled_error:f.z.boolean().default(!1).optional().openapi({description:"Enumeration-safe variant of the connection-level `disable_signup` flag. When a signup is blocked by the password connection and this is true, the identifier screen does not reveal that an email is unknown — it advances to the OTP/password challenge as if the account existed and fails at credential check. Mitigates email enumeration at the cost of UX: users without an account see a generic credential failure instead of an explicit signup-disabled message."}),mobile:f.z.record(f.z.string(),f.z.any()).default({}).optional().openapi({description:`Additional configuration for native mobile apps.`}),initiate_login_uri:f.z.string().url().optional().openapi({description:`Initiate login uri, must be https`}),native_social_login:f.z.record(f.z.string(),f.z.any()).default({}).optional(),refresh_token:f.z.object({rotation_type:f.z.enum([`rotating`,`non-rotating`]).optional().openapi({description:`Whether refresh tokens for this client are rotated on every exchange (Auth0 'rotating' behavior) or kept stable (legacy non-rotating). Defaults to 'non-rotating' when unset.`}),leeway:f.z.number().int().min(0).max(600).optional().openapi({description:`Seconds after a parent token's first rotation during which presenting it again still mints a fresh sibling child instead of triggering reuse-detection. Defaults to 30s when unset.`}),expiration_type:f.z.enum([`expiring`,`non-expiring`]).optional().openapi({description:`Whether refresh tokens for this client expire at all. 'non-expiring' overrides both the absolute and the idle lifetime.`}),token_lifetime:f.z.number().int().min(0).optional().openapi({description:"Refresh-token absolute lifetime in seconds. Falls back to the tenant's `session_lifetime` when unset."}),infinite_token_lifetime:f.z.boolean().optional().openapi({description:"When true, refresh tokens have no absolute expiry (overrides `token_lifetime`)."}),idle_token_lifetime:f.z.number().int().min(0).optional().openapi({description:"Refresh-token idle (sliding) lifetime in seconds, refreshed on every exchange. Falls back to the tenant's `idle_session_lifetime` when unset."}),infinite_idle_token_lifetime:f.z.boolean().optional().openapi({description:"When true, refresh tokens have no idle expiry (overrides `idle_token_lifetime`)."})}).default({}).optional().openapi({description:`Refresh token configuration`}),default_organization:f.z.record(f.z.string(),f.z.any()).default({}).optional().openapi({description:`Defines the default Organization ID and flows`}),organization_usage:f.z.enum([`deny`,`allow`,`require`]).default(`deny`).optional().openapi({description:`Defines how to proceed during an authentication transaction with regards an organization. Can be deny (default), allow or require.`}),organization_require_behavior:f.z.enum([`no_prompt`,`pre_login_prompt`,`post_login_prompt`]).default(`no_prompt`).optional().openapi({description:`Defines how to proceed during an authentication transaction when client.organization_usage: 'require'. Can be no_prompt (default), pre_login_prompt or post_login_prompt. post_login_prompt requires oidc_conformant: true.`}),client_authentication_methods:f.z.record(f.z.string(),f.z.any()).default({}).optional().openapi({description:`Defines client authentication methods.`}),require_pushed_authorization_requests:f.z.boolean().default(!1).openapi({description:`Makes the use of Pushed Authorization Requests mandatory for this client`}),require_proof_of_possession:f.z.boolean().default(!1).openapi({description:`Makes the use of Proof-of-Possession mandatory for this client`}),signed_request_object:f.z.record(f.z.string(),f.z.any()).default({}).optional().openapi({description:`JWT-secured Authorization Requests (JAR) settings.`}),compliance_level:f.z.enum([`none`,`fapi1_adv_pkj_par`,`fapi1_adv_mtls_par`,`fapi2_sp_pkj_mtls`,`fapi2_sp_mtls_mtls`]).optional().openapi({description:`Defines the compliance level for this client, which may restrict it's capabilities`}),par_request_expiry:f.z.number().optional().openapi({description:`Specifies how long, in seconds, a Pushed Authorization Request URI remains valid`}),token_quota:f.z.record(f.z.string(),f.z.any()).default({}).optional(),owner_user_id:f.z.string().optional().openapi({description:`User ID of the consenting user when this client was created via IAT-gated Dynamic Client Registration. NULL for clients created via the Management API or open DCR.`}),registration_type:f.z.enum([`manual`,`open_dcr`,`iat_dcr`]).optional().openapi({description:"Provenance of this client. `manual` = Management API; `open_dcr` = RFC 7591 without IAT; `iat_dcr` = RFC 7591 with an Initial Access Token."}),registration_metadata:f.z.record(f.z.string(),f.z.any()).default({}).optional().openapi({description:"Arbitrary metadata captured at Dynamic Client Registration time that isn't a first-class client field (e.g. integration_type, domain). Also stores `iat_constraints` for clients created via IAT so RFC 7592 PUT can enforce field immutability."}),token_exchange:f.z.object({allow_any_profile_of_type:f.z.array(f.z.literal(`custom_authentication`)).optional()}).optional().openapi({description:'Custom Token Exchange settings. Set `allow_any_profile_of_type` to `["custom_authentication"]` to let this client exchange subject tokens through the tenant\'s token exchange profiles.'}),user_linking_mode:f.z.enum([`builtin`,`off`]).optional().openapi({description:"Per-client override for the built-in email-based user-linking path. `builtin` runs the legacy in-process linking at user creation/email update. `off` disables the legacy path; linking only happens if the tenant has enabled the `account-linking` template hook. When unset, the service-level `userLinkingMode` default applies."})});f.z.object({created_at:f.z.string(),updated_at:f.z.string()}).extend(tN.shape).extend({client_id:f.z.string()});var nN=f.z.object({client_id:f.z.string().min(1).openapi({description:`ID of the client.`}),audience:f.z.string().min(1).openapi({description:`The audience (API identifier) of this client grant.`}),scope:f.z.array(f.z.string()).optional().openapi({description:`Scopes allowed for this client grant.`}),organization_usage:f.z.enum([`deny`,`allow`,`require`]).optional().openapi({description:`Defines whether organizations can be used with client credentials exchanges for this grant.`}),allow_any_organization:f.z.boolean().optional().openapi({description:`If enabled, any organization can be used with this grant. If disabled (default), the grant must be explicitly assigned to the desired organizations.`}),is_system:f.z.boolean().optional().openapi({description:`If enabled, this grant is a special grant created by Auth0. It cannot be modified or deleted directly.`}),subject_type:f.z.enum([`client`,`user`]).optional().openapi({description:`The type of application access the client grant allows. Use of this field is subject to the applicable Free Trial terms in Okta's Master Subscription Agreement.`}),authorization_details_types:f.z.array(f.z.string()).optional().openapi({description:`Types of authorization_details allowed for this client grant. Use of this field is subject to the applicable Free Trial terms in Okta's Master Subscription Agreement.`})}),rN=f.z.object({id:f.z.string().openapi({description:`ID of the client grant.`})}).extend(nN.shape).extend({created_at:f.z.string().optional(),updated_at:f.z.string().optional()});f.z.array(rN);var iN=f.z.enum([`iat`,`rat`]),aN=f.z.enum([`invite`,`edit_link`,`registration`,`connect`]),oN=f.z.object({id:f.z.string(),token_hash:f.z.string(),type:iN,client_id:f.z.string().optional(),sub:f.z.string().optional(),constraints:f.z.record(f.z.string(),f.z.unknown()).optional(),single_use:f.z.boolean().default(!1),expires_at:f.z.string().optional(),name:f.z.string().optional(),created_by:f.z.string().optional(),source:aN.optional()});f.z.object({created_at:f.z.string(),used_at:f.z.string().optional(),revoked_at:f.z.string().optional()}).extend(oN.shape);var sN=f.z.object({x:f.z.number(),y:f.z.number()}),cN=function(e){return e.RICH_TEXT=`RICH_TEXT`,e.NEXT_BUTTON=`NEXT_BUTTON`,e.BACK_BUTTON=`BACK_BUTTON`,e.SUBMIT_BUTTON=`SUBMIT_BUTTON`,e.DIVIDER=`DIVIDER`,e.TEXT=`TEXT`,e.EMAIL=`EMAIL`,e.PASSWORD=`PASSWORD`,e.NUMBER=`NUMBER`,e.PHONE=`PHONE`,e.DATE=`DATE`,e.CHECKBOX=`CHECKBOX`,e.RADIO=`RADIO`,e.SELECT=`SELECT`,e.HIDDEN=`HIDDEN`,e.LEGAL=`LEGAL`,e}({}),lN=function(e){return e.BLOCK=`BLOCK`,e.FIELD=`FIELD`,e}({}),uN=f.z.object({id:f.z.string(),category:f.z.nativeEnum(lN),type:f.z.nativeEnum(cN)}),dN=uN.extend({category:f.z.literal(`BLOCK`),type:f.z.literal(`RICH_TEXT`),config:f.z.object({content:f.z.string()}).passthrough()}),fN=uN.extend({category:f.z.literal(`BLOCK`),type:f.z.union([f.z.literal(`NEXT_BUTTON`),f.z.literal(`BACK_BUTTON`),f.z.literal(`SUBMIT_BUTTON`)]),config:f.z.object({text:f.z.string()}).passthrough()}),pN=uN.extend({category:f.z.literal(`FIELD`),type:f.z.literal(`LEGAL`),required:f.z.boolean().optional(),sensitive:f.z.boolean().optional(),config:f.z.object({text:f.z.string()}).passthrough()}),mN=uN.extend({category:f.z.literal(`FIELD`),type:f.z.union([f.z.literal(`TEXT`),f.z.literal(`EMAIL`),f.z.literal(`PASSWORD`),f.z.literal(`NUMBER`),f.z.literal(`PHONE`),f.z.literal(`DATE`),f.z.literal(`CHECKBOX`),f.z.literal(`RADIO`),f.z.literal(`SELECT`),f.z.literal(`HIDDEN`)]),required:f.z.boolean().optional(),sensitive:f.z.boolean().optional(),config:f.z.object({label:f.z.string().optional(),placeholder:f.z.string().optional()}).passthrough()}),hN=f.z.object({id:f.z.string(),category:f.z.string(),type:f.z.string()}).passthrough(),gN=f.z.union([dN,fN,pN,mN,hN]),_N=f.z.object({id:f.z.string(),type:f.z.literal(`STEP`),coordinates:sN,alias:f.z.string().optional(),config:f.z.object({components:f.z.array(gN),next_node:f.z.string()}).passthrough()}),vN=f.z.object({id:f.z.string(),type:f.z.literal(`FLOW`),coordinates:sN,alias:f.z.string().optional(),config:f.z.object({flow_id:f.z.string(),next_node:f.z.string()})}),yN=f.z.object({id:f.z.string(),type:f.z.literal(`ACTION`),coordinates:sN,alias:f.z.string().optional(),config:f.z.object({action_type:f.z.enum([`REDIRECT`]).openapi({description:`The type of action to perform`}),target:f.z.enum([`change-email`,`account`,`custom`]).openapi({description:`The predefined target to redirect to`}),custom_url:f.z.string().optional().openapi({description:`Custom URL when target is 'custom'`}),next_node:f.z.string().openapi({description:`The next node to navigate to after action (for non-redirect actions)`})}).passthrough()}),bN=f.z.object({id:f.z.string(),type:f.z.string(),coordinates:sN}).passthrough(),xN=f.z.union([_N,vN,yN,bN]),SN=f.z.object({next_node:f.z.string(),coordinates:sN}).passthrough(),CN=f.z.object({resume_flow:f.z.boolean().optional(),coordinates:sN}).passthrough();f.z.object({id:f.z.string(),name:f.z.string(),languages:f.z.object({primary:f.z.string()}).passthrough(),nodes:f.z.array(xN),start:SN,ending:CN,created_at:f.z.string(),updated_at:f.z.string(),links:f.z.object({sdkSrc:f.z.string().optional(),sdk_src:f.z.string().optional()}).passthrough()}).passthrough().omit({id:!0,created_at:!0,updated_at:!0});var wN=function(e){return e.TOKEN=`token`,e.ID_TOKEN=`id_token`,e.TOKEN_ID_TOKEN=`id_token token`,e.CODE=`code`,e.CODE_ID_TOKEN=`code id_token`,e.CODE_TOKEN=`code token`,e.CODE_ID_TOKEN_TOKEN=`code id_token token`,e}({}),TN=function(e){return e.QUERY=`query`,e.FRAGMENT=`fragment`,e.FORM_POST=`form_post`,e.WEB_MESSAGE=`web_message`,e.SAML_POST=`saml_post`,e}({}),EN=function(e){return e.S256=`S256`,e.Plain=`plain`,e}({}),DN=f.z.union([f.z.null(),f.z.object({essential:f.z.boolean().optional(),value:f.z.unknown().optional(),values:f.z.array(f.z.unknown()).optional()})]).nullable(),ON=f.z.object({userinfo:f.z.record(f.z.string(),DN).optional(),id_token:f.z.record(f.z.string(),DN).optional()}),kN=f.z.object({client_id:f.z.string(),act_as:f.z.string().optional(),response_type:f.z.nativeEnum(wN).optional(),response_mode:f.z.nativeEnum(TN).optional(),redirect_uri:f.z.string().optional(),audience:f.z.string().optional(),organization:f.z.string().optional(),state:f.z.string().optional(),nonce:f.z.string().optional(),scope:f.z.string().optional(),prompt:f.z.string().optional(),code_challenge_method:f.z.nativeEnum(EN).optional(),code_challenge:f.z.string().optional(),username:f.z.string().optional(),ui_locales:f.z.string().optional(),max_age:f.z.number().optional(),acr_values:f.z.string().optional(),claims:ON.optional(),connection:f.z.string().optional(),vendor_id:f.z.string().optional()});f.z.object({..._M,colors:f.z.object({primary:f.z.string(),page_background:f.z.union([f.z.string(),f.z.object({type:f.z.string().optional(),start:f.z.string().optional(),end:f.z.string().optional(),angle_deg:f.z.number().optional()})]).optional()}).optional(),logo_url:f.z.string().optional(),favicon_url:f.z.string().optional(),favicon_url_dark:f.z.string().optional(),powered_by_logo_url:f.z.string().optional(),font:f.z.object({url:f.z.string()}).optional(),dark_mode:f.z.enum([`dark`,`light`,`auto`]).optional(),terms_url:f.z.string().optional(),privacy_url:f.z.string().optional()});var AN=f.z.enum([`password_reset`,`email_verification`,`otp`,`mfa_otp`,`authorization_code`,`oauth2_state`,`ticket`,`client_assertion_jti`,`subject_token_jti`,`session_transfer_token`,`mfa_remember_browser`]);f.z.object({code_id:f.z.string().openapi({description:`The code that will be used in for instance an email verification flow`}),login_id:f.z.string().optional().openapi({description:`The id of the login session that the code is connected to`}),connection_id:f.z.string().optional().openapi({description:`The connection that the code is connected to`}),code_type:AN,code_verifier:f.z.string().optional().openapi({description:`The code verifier used in PKCE in outbound flows`}),code_challenge:f.z.string().optional().openapi({description:`The code challenge used in PKCE in outbound flows`}),code_challenge_method:f.z.enum([`plain`,`S256`]).optional().openapi({description:`The code challenge method used in PKCE in outbound flows`}),redirect_uri:f.z.string().optional().openapi({description:`The redirect URI associated with the code`}),otp:f.z.string().optional().openapi({description:`The one-time password value for OTP-based flows`}),nonce:f.z.string().optional().openapi({description:`The nonce value used for security in OIDC flows`}),state:f.z.string().optional().openapi({description:`The state parameter used for CSRF protection in OAuth flows`}),expires_at:f.z.string(),used_at:f.z.string().optional(),user_id:f.z.string().optional()}).extend({created_at:f.z.string()}),f.z.object({device_code_hash:f.z.string(),user_code_hash:f.z.string(),client_id:f.z.string(),scope:f.z.string().optional(),audience:f.z.string().optional(),status:f.z.enum([`pending`,`approved`,`denied`,`consumed`]),login_id:f.z.string().optional(),expires_at:f.z.string(),created_at:f.z.string(),last_polled_at:f.z.string().optional(),interval:f.z.number().int().positive(),version:f.z.number().int().nonnegative()});var jN=f.z.object({kid:f.z.string().optional(),team_id:f.z.string().optional(),realms:f.z.string().optional(),authentication_method:f.z.string().optional(),client_id:f.z.string().optional(),client_secret:JM().optional(),app_secret:JM().optional(),scope:f.z.string().optional(),client_secret_hint:f.z.string().optional(),app_secret_hint:f.z.string().optional(),twilio_token_hint:f.z.string().optional(),authorization_endpoint:f.z.string().optional(),token_endpoint:f.z.string().optional(),userinfo_endpoint:f.z.string().optional(),jwks_uri:f.z.string().optional(),discovery_url:f.z.string().optional(),issuer:f.z.string().optional(),token_endpoint_auth_method:f.z.enum([`client_secret_basic`,`client_secret_post`]).optional(),provider:f.z.string().optional(),from:f.z.string().optional(),twilio_sid:JM().optional(),twilio_token:JM().optional(),icon_url:f.z.string().optional(),domain_aliases:f.z.array(f.z.string()).optional(),callback_url:f.z.string().url().optional(),passwordPolicy:f.z.enum([`none`,`low`,`fair`,`good`,`excellent`]).optional(),password_complexity_options:f.z.object({min_length:f.z.number().optional()}).optional(),password_history:f.z.object({enable:f.z.boolean().optional(),size:f.z.number().optional()}).optional(),password_no_personal_info:f.z.object({enable:f.z.boolean().optional()}).optional(),password_dictionary:f.z.object({enable:f.z.boolean().optional(),dictionary:f.z.array(f.z.string()).optional()}).optional(),disable_signup:f.z.boolean().optional(),brute_force_protection:f.z.boolean().optional(),import_mode:f.z.boolean().optional(),configuration:f.z.object({token_endpoint:f.z.string().optional(),userinfo_endpoint:f.z.string().optional(),client_id:f.z.string().optional(),client_secret:JM().optional(),client_secret_hint:f.z.string().optional(),realm:f.z.string().optional()}).optional(),attributes:f.z.object({email:f.z.object({identifier:f.z.object({active:f.z.boolean().optional()}).optional(),signup:f.z.object({status:f.z.enum([`required`,`optional`,`disabled`]).optional(),verification:f.z.object({active:f.z.boolean().optional()}).optional()}).optional(),validation:f.z.object({allowed:f.z.boolean().optional()}).optional(),unique:f.z.boolean().optional(),profile_required:f.z.boolean().optional(),verification_method:f.z.enum([`link`,`code`]).optional()}).optional(),username:f.z.object({identifier:f.z.object({active:f.z.boolean().optional()}).optional(),signup:f.z.object({status:f.z.enum([`required`,`optional`,`disabled`]).optional()}).optional(),validation:f.z.object({max_length:f.z.number().optional(),min_length:f.z.number().optional(),allowed_types:f.z.object({email:f.z.boolean().optional(),phone_number:f.z.boolean().optional()}).optional()}).optional(),profile_required:f.z.boolean().optional()}).optional(),phone_number:f.z.object({identifier:f.z.object({active:f.z.boolean().optional()}).optional(),signup:f.z.object({status:f.z.enum([`required`,`optional`,`disabled`]).optional()}).optional()}).optional()}).optional(),authentication_methods:f.z.object({password:f.z.object({enabled:f.z.boolean().optional()}).optional(),passkey:f.z.object({enabled:f.z.boolean().optional()}).optional()}).optional(),passkey_options:f.z.object({challenge_ui:f.z.enum([`both`,`autofill`,`button`]).optional(),local_enrollment_enabled:f.z.boolean().optional(),progressive_enrollment_enabled:f.z.boolean().optional()}).optional(),requires_username:f.z.boolean().optional(),validation:f.z.object({username:f.z.object({min:f.z.number().optional(),max:f.z.number().optional()}).optional()}).optional(),allow_action_users:f.z.boolean().optional(),set_user_root_attributes:f.z.enum([`on_each_login`,`on_first_login`,`never_on_login`]).optional(),signInEndpoint:f.z.string().optional(),signOutEndpoint:f.z.string().optional(),signingCert:f.z.string().optional(),signingCerts:f.z.array(f.z.string()).optional(),metadataUrl:f.z.string().optional(),metadataXml:f.z.string().optional(),signSAMLRequest:f.z.boolean().optional(),signatureAlgorithm:f.z.enum([`rsa-sha256`,`rsa-sha1`]).optional(),digestAlgorithm:f.z.enum([`sha256`,`sha1`]).optional(),protocolBinding:f.z.enum([`urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect`,`urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST`]).optional(),user_id_attribute:f.z.string().optional(),fieldsMap:f.z.record(f.z.string(),f.z.union([f.z.string(),f.z.array(f.z.string())])).optional(),entityId:f.z.string().optional()});function MN(e){if(e!==null){if(Array.isArray(e))return e.filter(e=>e!==null).map(MN);if(e&&typeof e==`object`){let t={};for(let[n,r]of Object.entries(e))r!==null&&(t[n]=MN(r));return t}return e}}var NN=f.z.object({id:f.z.string().optional(),name:f.z.string(),display_name:f.z.string().optional(),strategy:f.z.string(),options:f.z.preprocess(e=>e===null?{}:MN(e),jN).default({}),enabled_clients:f.z.array(f.z.string()).default([]).optional(),response_type:f.z.nativeEnum(wN).optional(),response_mode:f.z.nativeEnum(TN).optional(),is_domain_connection:f.z.boolean().optional(),show_as_button:f.z.boolean().optional(),metadata:f.z.record(f.z.string(),f.z.any()).optional(),is_system:f.z.boolean().optional(),..._M});f.z.object({id:f.z.string(),created_at:f.z.string().transform(e=>e===null?``:e),updated_at:f.z.string().transform(e=>e===null?``:e)}).extend(NN.shape);var PN=f.z.object({domain:f.z.string(),status:f.z.enum([`pending`,`verified`]),verified_at:f.z.string().optional()});f.z.object({profile_id:f.z.string().optional(),domains:f.z.array(PN).default([])});var FN=f.z.object({domain:f.z.string(),custom_domain_id:f.z.string().optional(),type:f.z.enum([`auth0_managed_certs`,`self_managed_certs`]),verification_method:f.z.enum([`txt`]).optional(),tls_policy:f.z.enum([`recommended`]).optional(),custom_client_ip_header:f.z.enum([`true-client-ip`,`cf-connecting-ip`,`x-forwarded-for`,`x-azure-clientip`,`null`]).optional(),domain_metadata:f.z.record(f.z.string(),f.z.string().max(255)).optional()}),IN=f.z.discriminatedUnion(`name`,[f.z.object({name:f.z.literal(`txt`),record:f.z.string(),domain:f.z.string()}),f.z.object({name:f.z.literal(`http`),http_body:f.z.string(),http_url:f.z.string()})]),LN=FN.extend({custom_domain_id:f.z.string(),primary:f.z.boolean(),status:f.z.enum([`disabled`,`pending`,`pending_verification`,`ready`]),origin_domain_name:f.z.string().optional(),verification:f.z.object({methods:f.z.array(IN)}).optional(),tls_policy:f.z.string().optional()});FN.pick({tls_policy:!0,custom_client_ip_header:!0,domain_metadata:!0}).strict(),LN.extend({tenant_id:f.z.string()}),f.z.object({certificate:f.z.string().regex(/^-----BEGIN CERTIFICATE-----[\s\S]+-----END CERTIFICATE-----\s*$/,`must be PEM-encoded; include the full certificate chain in leaf-first order`),private_key:f.z.string().regex(/-----BEGIN (RSA |EC |ENCRYPTED )?PRIVATE KEY-----[\s\S]+-----END \1PRIVATE KEY-----\s*$/,`must be a PEM-encoded private key`)});var RN=f.z.object({id:f.z.string(),order:f.z.number().optional(),visible:f.z.boolean().optional().default(!0)}),zN=RN.extend({category:f.z.literal(`BLOCK`).optional()}),BN=zN.extend({type:f.z.literal(`DIVIDER`),config:f.z.object({text:f.z.string().optional()}).optional()}),VN=zN.extend({type:f.z.literal(`HTML`),config:f.z.object({content:f.z.string().optional()}).optional()}),HN=zN.extend({type:f.z.literal(`IMAGE`),config:f.z.object({src:f.z.string().optional(),alt:f.z.string().optional(),width:f.z.number().optional(),height:f.z.number().optional()}).optional()}),UN=zN.extend({type:f.z.literal(`JUMP_BUTTON`),config:f.z.object({text:f.z.string().optional(),target_step:f.z.string().optional()})}),WN=zN.extend({type:f.z.literal(`RESEND_BUTTON`),config:f.z.object({text:f.z.string().optional(),resend_action:f.z.string().optional()})}),GN=zN.extend({type:f.z.literal(`NEXT_BUTTON`),config:f.z.object({text:f.z.string().optional(),variant:f.z.enum([`primary`,`secondary`]).optional(),skip_validation:f.z.boolean().optional()})}),KN=zN.extend({type:f.z.literal(`PREVIOUS_BUTTON`),config:f.z.object({text:f.z.string().optional()})}),qN=zN.extend({type:f.z.literal(`RICH_TEXT`),config:f.z.object({content:f.z.string().optional()}).optional()}),JN=RN.extend({category:f.z.literal(`WIDGET`).optional(),label:f.z.string().min(1).optional(),hint:f.z.string().min(1).max(500).optional(),required:f.z.boolean().optional(),sensitive:f.z.boolean().optional()}),YN=JN.extend({type:f.z.literal(`AUTH0_VERIFIABLE_CREDENTIALS`),config:f.z.object({credential_type:f.z.string().optional()})}),XN=JN.extend({type:f.z.literal(`GMAPS_ADDRESS`),config:f.z.object({api_key:f.z.string().optional()})}),ZN=JN.extend({type:f.z.literal(`RECAPTCHA`),config:f.z.object({site_key:f.z.string().optional()})}),QN=RN.extend({category:f.z.literal(`FIELD`).optional(),label:f.z.string().min(1).optional(),hint:f.z.string().min(1).max(500).optional(),messages:f.z.array(f.z.object({id:f.z.number().optional(),text:f.z.string(),type:f.z.enum([`info`,`error`,`success`,`warning`])})).optional(),required:f.z.boolean().optional(),sensitive:f.z.boolean().optional()}),$N=QN.extend({type:f.z.literal(`BOOLEAN`),config:f.z.object({default_value:f.z.boolean().optional()}).optional()}),eP=QN.extend({type:f.z.literal(`CARDS`),config:f.z.object({options:f.z.array(f.z.object({value:f.z.string(),label:f.z.string(),description:f.z.string().optional(),image:f.z.string().optional()})).optional(),multi_select:f.z.boolean().optional()}).optional()}),tP=QN.extend({type:f.z.literal(`CHOICE`),config:f.z.object({options:f.z.array(f.z.object({value:f.z.string(),label:f.z.string()})).optional(),display:f.z.enum([`radio`,`checkbox`]).optional(),multiple:f.z.boolean().optional(),default_value:f.z.union([f.z.string(),f.z.array(f.z.string())]).optional()}).optional()}),nP=QN.extend({type:f.z.literal(`CODE`),config:f.z.object({length:f.z.number().int().positive().max(100).optional(),mode:f.z.enum([`numeric`,`alphanumeric`]).optional(),auto_submit:f.z.boolean().optional(),group_size:f.z.number().int().min(0).max(100).optional(),separator:f.z.string().optional(),placeholder:f.z.string().optional(),default_value:f.z.string().optional()}).refine(e=>e.group_size===void 0||e.length===void 0||e.group_size<=e.length,{message:`group_size cannot exceed length`,path:[`group_size`]}).refine(e=>e.default_value===void 0||e.length===void 0||e.default_value.length<=e.length,{message:`default_value is longer than the configured length`,path:[`default_value`]}).optional()}),rP=QN.extend({type:f.z.literal(`CUSTOM`),config:f.z.object({component:f.z.string().optional(),props:f.z.record(f.z.string(),f.z.any()).optional(),schema:f.z.record(f.z.string(),f.z.any()).optional(),code:f.z.string().optional()})}),iP=QN.extend({type:f.z.literal(`DATE`),config:f.z.object({format:f.z.string().optional(),min:f.z.string().optional(),max:f.z.string().optional(),default_value:f.z.string().optional()}).optional()}),aP=QN.extend({type:f.z.literal(`DROPDOWN`),config:f.z.object({options:f.z.array(f.z.object({value:f.z.string(),label:f.z.string()})).optional(),placeholder:f.z.string().optional(),searchable:f.z.boolean().optional(),multiple:f.z.boolean().optional(),default_value:f.z.union([f.z.string(),f.z.array(f.z.string())]).optional()}).optional()}),oP=QN.extend({type:f.z.literal(`EMAIL`),config:f.z.object({placeholder:f.z.string().optional(),default_value:f.z.string().optional(),last_used:f.z.boolean().optional(),last_used_label:f.z.string().optional()}).optional()}),sP=QN.extend({type:f.z.literal(`FILE`),config:f.z.object({accept:f.z.string().optional(),max_size:f.z.number().optional(),multiple:f.z.boolean().optional()}).optional()}),cP=QN.extend({type:f.z.literal(`LEGAL`),config:f.z.object({text:f.z.string(),html:f.z.boolean().optional()}).optional()}),lP=QN.extend({type:f.z.literal(`NUMBER`),config:f.z.object({placeholder:f.z.string().optional(),min:f.z.number().optional(),max:f.z.number().optional(),step:f.z.number().optional(),default_value:f.z.string().optional()}).optional()}),uP=QN.extend({type:f.z.literal(`PASSWORD`),config:f.z.object({placeholder:f.z.string().optional(),min_length:f.z.number().optional(),show_toggle:f.z.boolean().optional(),forgot_password_link:f.z.string().optional(),default_value:f.z.string().optional(),autocomplete:f.z.enum([`current-password`,`new-password`]).optional()}).optional()}),dP=QN.extend({type:f.z.literal(`PAYMENT`),config:f.z.object({provider:f.z.string().optional(),currency:f.z.string().optional()}).optional()}),fP=QN.extend({type:f.z.literal(`SOCIAL`),config:f.z.object({providers:f.z.array(f.z.string()).optional(),provider_details:f.z.array(f.z.object({name:f.z.string(),strategy:f.z.string().optional(),display_name:f.z.string().optional(),short_name:f.z.string().optional(),icon_url:f.z.string().optional(),href:f.z.string().optional(),last_used:f.z.boolean().optional(),last_used_label:f.z.string().optional()})).optional()}).optional()}),pP=QN.extend({type:f.z.literal(`TEL`),config:f.z.object({placeholder:f.z.string().optional(),default_country:f.z.string().optional(),default_value:f.z.string().optional(),allow_email:f.z.boolean().optional()}).optional()}),mP=QN.extend({type:f.z.literal(`TEXT`),config:f.z.object({placeholder:f.z.string().optional(),multiline:f.z.boolean().optional(),max_length:f.z.number().optional(),default_value:f.z.string().optional(),autocomplete:f.z.string().optional(),input_mode:f.z.enum([`text`,`numeric`,`decimal`,`tel`,`email`,`url`,`search`]).optional(),last_used:f.z.boolean().optional(),last_used_label:f.z.string().optional()}).optional()}),hP=QN.extend({type:f.z.literal(`COUNTRY`),config:f.z.object({placeholder:f.z.string().optional(),default_value:f.z.string().optional()}).optional()}),gP=QN.extend({type:f.z.literal(`URL`),config:f.z.object({placeholder:f.z.string().optional(),default_value:f.z.string().optional()}).optional()}),_P=f.z.discriminatedUnion(`type`,[BN,VN,HN,UN,WN,GN,KN,qN]),vP=f.z.discriminatedUnion(`type`,[YN,XN,ZN]),yP=f.z.discriminatedUnion(`type`,[$N,eP,tP,nP,hP,rP,iP,aP,oP,sP,cP,lP,uP,dP,fP,pP,mP,gP]),bP=f.z.union([_P,vP,yP]);new Set([`BOOLEAN`,`CARDS`,`CHOICE`,`CODE`,`COUNTRY`,`DATE`,`DROPDOWN`,`EMAIL`,`LEGAL`,`NUMBER`,`PASSWORD`,`TEL`,`TEXT`,`URL`]),f.z.object({id:f.z.string(),type:f.z.literal(`submit`),label:f.z.string(),className:f.z.string().optional(),disabled:f.z.boolean().optional().default(!1),order:f.z.number().optional(),visible:f.z.boolean().optional().default(!0),customizations:f.z.record(f.z.string(),f.z.any()).optional()});var xP=f.z.object({x:f.z.number(),y:f.z.number()}),SP=f.z.object({id:f.z.string(),type:f.z.literal(`FLOW`),coordinates:xP,alias:f.z.string().min(1).max(150).optional(),config:f.z.object({flow_id:f.z.string().max(30),next_node:f.z.string().optional()})}),CP=f.z.object({id:f.z.string(),type:f.z.literal(`ROUTER`),coordinates:xP,alias:f.z.string().min(1).max(150),config:f.z.object({rules:f.z.array(f.z.object({id:f.z.string(),alias:f.z.string().min(1).max(150).optional(),condition:f.z.any(),next_node:f.z.string()})),fallback:f.z.string()})}),wP=f.z.object({id:f.z.string(),type:f.z.literal(`STEP`),coordinates:xP,alias:f.z.string().min(1).max(150).optional(),config:f.z.object({components:f.z.array(bP),next_node:f.z.string().optional()})}),TP=f.z.discriminatedUnion(`type`,[SP,CP,wP]),EP=f.z.object({name:f.z.string().openapi({description:`The name of the form`}),messages:f.z.object({errors:f.z.record(f.z.string(),f.z.any()).optional(),custom:f.z.record(f.z.string(),f.z.any()).optional()}).optional(),languages:f.z.object({primary:f.z.string().optional(),default:f.z.string().optional()}).optional(),translations:f.z.record(f.z.string(),f.z.any()).optional(),nodes:f.z.array(TP).optional(),start:f.z.object({hidden_fields:f.z.array(f.z.object({key:f.z.string(),value:f.z.string()})).optional(),next_node:f.z.string().optional(),coordinates:xP.optional()}).optional(),ending:f.z.object({redirection:f.z.object({delay:f.z.number().optional(),target:f.z.string().optional()}).optional(),after_submit:f.z.object({flow_id:f.z.string().optional()}).optional(),coordinates:xP.optional(),resume_flow:f.z.boolean().optional()}).optional(),style:f.z.object({css:f.z.string().optional()}).optional(),links:f.z.object({sdkSrc:f.z.string().optional(),sdk_src:f.z.string().optional()}).optional()}).openapi({description:`Schema for flow-based forms (matches Auth0 Forms structure)`});mM.extend(EP.shape).extend({id:f.z.string()});var DP=f.z.object({id:f.z.number().optional(),text:f.z.string(),type:f.z.enum([`info`,`error`,`success`,`warning`])}),OP=f.z.object({id:f.z.string().optional(),text:f.z.string(),href:f.z.string(),linkText:f.z.string().optional()}),kP=f.z.object({"form-content-start":f.z.string().optional(),"form-content-end":f.z.string().optional(),"form-footer-start":f.z.string().optional(),"form-footer-end":f.z.string().optional(),"secondary-actions-start":f.z.string().optional(),"secondary-actions-end":f.z.string().optional()}).strict();f.z.object({name:f.z.string().optional(),action:f.z.string(),method:f.z.enum([`POST`,`GET`]),title:f.z.string().optional(),description:f.z.string().optional(),components:f.z.array(bP),messages:f.z.array(DP).optional(),links:f.z.array(OP).optional(),partials:kP.optional(),footer:f.z.string().optional()});var AP=f.z.enum([`pre-user-registration`,`post-user-registration`,`post-user-login`,`post-user-update`,`validate-registration-username`,`pre-user-deletion`,`post-user-deletion`]),jP=f.z.enum([`post-user-login`]),MP=f.z.enum([`post-user-login`,`post-user-registration`,`post-user-update`,`credentials-exchange`]),NP=f.z.enum([`validate-registration-username`,`post-user-login`,`credentials-exchange`,`pre-user-registration`,`post-user-registration`,`pre-user-update`,`post-user-update`,`pre-user-deletion`,`post-user-deletion`,`pre-screen`,`custom-email-provider`,`custom-phone-provider`]),PP=f.z.enum([`post-user-login`]);AP.options,jP.options,MP.options,NP.options,PP.options;var FP=f.z.enum([`impersonate`]),IP=f.z.enum([`ensure-username`,`set-preferred-username`,`account-linking`]),LP={enabled:f.z.boolean().default(!1),synchronous:f.z.boolean().default(!1),priority:f.z.number().optional(),hook_id:f.z.string().optional(),metadata:f.z.record(f.z.string(),f.z.unknown()).optional(),..._M},RP=f.z.object({...LP,trigger_id:AP,url:f.z.string()}),zP=f.z.object({...LP,trigger_id:jP,form_id:f.z.string()}),BP=f.z.object({...LP,trigger_id:MP,template_id:IP}),VP=f.z.object({...LP,trigger_id:NP,code_id:f.z.string()}),HP=f.z.object({...LP,trigger_id:PP,page_id:FP,permission_required:f.z.string().optional()});f.z.union([RP,zP,BP,VP,HP]);var UP=f.z.object({...LP,trigger_id:AP}).extend(mM.shape).extend({hook_id:f.z.string(),url:f.z.string()}),WP=f.z.object({...LP,trigger_id:jP}).extend(mM.shape).extend({hook_id:f.z.string(),form_id:f.z.string()}),GP=f.z.object({...LP,trigger_id:MP}).extend(mM.shape).extend({hook_id:f.z.string(),template_id:IP}),KP=f.z.object({...LP,trigger_id:NP}).extend(mM.shape).extend({hook_id:f.z.string(),code_id:f.z.string()}),qP=f.z.object({...LP,trigger_id:PP}).extend(mM.shape).extend({hook_id:f.z.string(),page_id:FP,permission_required:f.z.string().optional()});f.z.union([UP,WP,GP,KP,qP]),f.z.object({code:f.z.string().max(1e5),secrets:f.z.record(f.z.string(),f.z.string()).optional()}).extend({id:f.z.string(),tenant_id:f.z.string()}).extend(mM.shape);var JP=f.z.object({name:f.z.string().optional()}),YP=f.z.object({email:f.z.string().optional()}),XP=f.z.object({id:f.z.string().optional(),organization_id:f.z.string().max(50),inviter:JP,invitee:YP,invitation_url:f.z.string().url(),client_id:f.z.string(),connection_id:f.z.string().optional(),app_metadata:f.z.record(f.z.string(),f.z.any()).default({}).optional(),user_metadata:f.z.record(f.z.string(),f.z.any()).default({}).optional(),ttl_sec:f.z.number().int().max(2592e3).default(604800).optional(),roles:f.z.array(f.z.string()).default([]).optional(),send_invitation_email:f.z.boolean().default(!0).optional()});f.z.object({id:f.z.string(),organization_id:f.z.string().max(50),created_at:f.z.string().datetime(),expires_at:f.z.string().datetime(),ticket_id:f.z.string().optional()}).extend(XP.omit({id:!0}).shape);var ZP=f.z.object({alg:f.z.enum([`RS256`,`RS384`,`RS512`,`ES256`,`ES384`,`ES512`,`HS256`,`HS384`,`HS512`]).optional(),kid:f.z.string().optional(),kty:f.z.enum([`RSA`,`EC`,`oct`]),use:f.z.enum([`sig`,`enc`]).optional(),n:f.z.string().optional(),e:f.z.string().optional(),crv:f.z.string().optional(),x:f.z.string().optional(),y:f.z.string().optional(),x5t:f.z.string().optional(),"x5t#S256":f.z.string().optional(),x5c:f.z.array(f.z.string()).optional()}).superRefine((e,t)=>{if(e.kty===`RSA`)for(let n of[`n`,`e`])e[n]||t.addIssue({code:f.z.ZodIssueCode.custom,path:[n],message:`RSA JWK is missing required member '${n}'`});else if(e.kty===`EC`)for(let n of[`crv`,`x`,`y`])e[n]||t.addIssue({code:f.z.ZodIssueCode.custom,path:[n],message:`EC JWK is missing required member '${n}'`})}),QP=f.z.object({keys:f.z.array(ZP)});f.z.object({issuer:f.z.string(),authorization_endpoint:f.z.string(),token_endpoint:f.z.string(),device_authorization_endpoint:f.z.string().optional(),userinfo_endpoint:f.z.string(),jwks_uri:f.z.string(),registration_endpoint:f.z.string().optional(),revocation_endpoint:f.z.string(),end_session_endpoint:f.z.string().optional(),scopes_supported:f.z.array(f.z.string()),response_types_supported:f.z.array(f.z.string()),grant_types_supported:f.z.array(f.z.string()).optional(),code_challenge_methods_supported:f.z.array(f.z.string()),response_modes_supported:f.z.array(f.z.string()),subject_types_supported:f.z.array(f.z.string()),id_token_signing_alg_values_supported:f.z.array(f.z.string()),token_endpoint_auth_methods_supported:f.z.array(f.z.string()),claims_supported:f.z.array(f.z.string()),request_uri_parameter_supported:f.z.boolean(),request_parameter_supported:f.z.boolean(),claims_parameter_supported:f.z.boolean().optional(),request_object_signing_alg_values_supported:f.z.array(f.z.string()).optional(),token_endpoint_auth_signing_alg_values_supported:f.z.array(f.z.string()),client_id_metadata_document_supported:f.z.boolean().optional(),backchannel_logout_supported:f.z.boolean().optional(),backchannel_logout_session_supported:f.z.boolean().optional()});var $P=function(e){return e.PENDING=`pending`,e.AUTHENTICATED=`authenticated`,e.AWAITING_EMAIL_VERIFICATION=`awaiting_email_verification`,e.AWAITING_MFA=`awaiting_mfa`,e.AWAITING_HOOK=`awaiting_hook`,e.AWAITING_CONTINUATION=`awaiting_continuation`,e.AWAITING_CONSENT=`awaiting_consent`,e.COMPLETED=`completed`,e.FAILED=`failed`,e.EXPIRED=`expired`,e}({}),eF=f.z.nativeEnum($P),tF=f.z.object({strategy:f.z.string(),strategy_type:f.z.string()});f.z.object({csrf_token:f.z.string(),auth0Client:f.z.string().optional(),authParams:kN,expires_at:f.z.string(),deleted_at:f.z.string().optional(),ip:f.z.string().optional(),useragent:f.z.string().optional(),session_id:f.z.string().optional(),authorization_url:f.z.string().optional(),state:eF.optional().default(`pending`),state_data:f.z.string().optional(),failure_reason:f.z.string().optional(),user_id:f.z.string().optional(),auth_connection:f.z.string().optional(),auth_strategy:tF.optional(),authenticated_at:f.z.string().optional()}).openapi({description:`This represents a login sesion`}).extend({id:f.z.string().openapi({description:`This is is used as the state in the universal login`}),created_at:f.z.string(),updated_at:f.z.string(),tenant_id:f.z.string().optional()});var Q={ACLS_SUMMARY:`acls_summary`,ACTIONS_EXECUTION_FAILED:`actions_execution_failed`,API_LIMIT:`api_limit`,API_LIMIT_WARNING:`api_limit_warning`,APPI:`appi`,CIBA_EXCHANGE_FAILED:`ciba_exchange_failed`,CIBA_EXCHANGE_SUCCEEDED:`ciba_exchange_succeeded`,CIBA_START_FAILED:`ciba_start_failed`,CIBA_START_SUCCEEDED:`ciba_start_succeeded`,CODE_LINK_SENT:`cls`,CODE_SENT:`cs`,DEPRECATION_NOTICE:`depnote`,CONFIG_INHERITANCE_DIFF:`cfgdiff`,CONFIG_DRIFT:`cfgdrift`,FAILED_LOGIN:`f`,FAILED_BY_CONNECTOR:`fc`,FAILED_CHANGE_EMAIL:`fce`,FAILED_BY_CORS:`fco`,FAILED_CROSS_ORIGIN_AUTHENTICATION:`fcoa`,FAILED_CHANGE_PASSWORD:`fcp`,FAILED_POST_CHANGE_PASSWORD_HOOK:`fcph`,FAILED_CHANGE_PHONE_NUMBER:`fcpn`,FAILED_CHANGE_PASSWORD_REQUEST:`fcpr`,FAILED_CONNECTOR_PROVISIONING:`fcpro`,FAILED_CHANGE_USERNAME:`fcu`,FAILED_DELEGATION:`fd`,FAILED_DEVICE_ACTIVATION:`fdeac`,FAILED_DEVICE_AUTHORIZATION_REQUEST:`fdeaz`,USER_CANCELED_DEVICE_CONFIRMATION:`fdecc`,FAILED_USER_DELETION:`fdu`,FAILED_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN:`feacft`,FAILED_EXCHANGE_ACCESS_TOKEN_FOR_CLIENT_CREDENTIALS:`feccft`,FAILED_EXCHANGE_CUSTOM_TOKEN:`fecte`,FAILED_EXCHANGE_DEVICE_CODE_FOR_ACCESS_TOKEN:`fede`,FAILED_FEDERATED_LOGOUT:`federated_logout_failed`,FAILED_EXCHANGE_NATIVE_SOCIAL_LOGIN:`fens`,FAILED_EXCHANGE_PASSWORD_OOB_FOR_ACCESS_TOKEN:`feoobft`,FAILED_EXCHANGE_PASSWORD_OTP_FOR_ACCESS_TOKEN:`feotpft`,FAILED_EXCHANGE_PASSWORD_FOR_ACCESS_TOKEN:`fepft`,FAILED_EXCHANGE_PASSWORDLESS_OTP_FOR_ACCESS_TOKEN:`fepotpft`,FAILED_EXCHANGE_PASSWORD_MFA_RECOVERY_FOR_ACCESS_TOKEN:`fercft`,FAILED_EXCHANGE_ROTATING_REFRESH_TOKEN:`ferrt`,FAILED_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN:`fertft`,FAILED_EXCHANGE_SUBJECT_TOKEN_FOR_ACCESS_TOKEN:`festft`,FAILED_HOOK:`fh`,FAILED_IMPERSONATION:`fimp`,FAILED_INVITE_ACCEPT:`fi`,FAILED_LOGOUT:`flo`,FLOWS_EXECUTION_COMPLETED:`flows_execution_completed`,FLOWS_EXECUTION_FAILED:`flows_execution_failed`,FAILED_SENDING_NOTIFICATION:`fn`,FORMS_SUBMISSION_FAILED:`forms_submission_failed`,FORMS_SUBMISSION_SUCCEEDED:`forms_submission_succeeded`,FAILED_LOGIN_INCORRECT_PASSWORD:`fp`,FAILED_PUSHED_AUTHORIZATION_REQUEST:`fpar`,FAILED_POST_USER_REGISTRATION_HOOK:`fpurh`,FAILED_SIGNUP:`fs`,FAILED_SILENT_AUTH:`fsa`,FAILED_LOGIN_INVALID_EMAIL_USERNAME:`fu`,FAILED_USERS_IMPORT:`fui`,FAILED_VERIFICATION_EMAIL:`fv`,FAILED_VERIFICATION_EMAIL_REQUEST:`fvr`,EMAIL_VERIFICATION_CONFIRMED:`gd_auth_email_verification`,EMAIL_VERIFICATION_FAILED:`gd_auth_fail_email_verification`,MFA_AUTH_FAILED:`gd_auth_failed`,MFA_AUTH_REJECTED:`gd_auth_rejected`,MFA_AUTH_SUCCESS:`gd_auth_succeed`,MFA_ENROLLMENT_COMPLETE:`gd_enrollment_complete`,TOO_MANY_MFA_FAILURES:`gd_otp_rate_limit_exceed`,MFA_RECOVERY_FAILED:`gd_recovery_failed`,MFA_RECOVERY_RATE_LIMIT_EXCEED:`gd_recovery_rate_limit_exceed`,MFA_RECOVERY_SUCCESS:`gd_recovery_succeed`,MFA_EMAIL_SENT:`gd_send_email`,EMAIL_VERIFICATION_SENT:`gd_send_email_verification`,EMAIL_VERIFICATION_SEND_FAILURE:`gd_send_email_verification_failure`,PUSH_NOTIFICATION_SENT:`gd_send_pn`,ERROR_SENDING_MFA_PUSH_NOTIFICATION:`gd_send_pn_failure`,MFA_SMS_SENT:`gd_send_sms`,ERROR_SENDING_MFA_SMS:`gd_send_sms_failure`,MFA_VOICE_CALL_SUCCESS:`gd_send_voice`,MFA_VOICE_CALL_FAILED:`gd_send_voice_failure`,SECOND_FACTOR_STARTED:`gd_start_auth`,MFA_ENROLL_STARTED:`gd_start_enroll`,MFA_ENROLLMENT_FAILED:`gd_start_enroll_failed`,GUARDIAN_TENANT_UPDATE:`gd_tenant_update`,UNENROLL_DEVICE_ACCOUNT:`gd_unenroll`,UPDATE_DEVICE_ACCOUNT:`gd_update_device_account`,WEBAUTHN_CHALLENGE_FAILED:`gd_webauthn_challenge_failed`,WEBAUTHN_ENROLLMENT_FAILED:`gd_webauthn_enrollment_failed`,FAILED_KMS_API_OPERATION:`kms_key_management_failure`,SUCCESS_KMS_API_OPERATION:`kms_key_management_success`,KMS_KEY_STATE_CHANGED:`kms_key_state_changed`,TOO_MANY_CALLS_TO_DELEGATION:`limit_delegation`,BLOCKED_IP_ADDRESS:`limit_mu`,BLOCKED_ACCOUNT_IP:`limit_sul`,BLOCKED_ACCOUNT_EMAIL:`limit_wc`,INFORMATION:`i`,MFA_REQUIRED:`mfar`,MANAGEMENT_API_READ_OPERATION:`mgmt_api_read`,FAILED_AUTHENTICATION_METHOD_OPERATION_MY_ACCOUNT:`my_account_authentication_method_failed`,SUCCESSFUL_AUTHENTICATION_METHOD_OPERATION_MY_ACCOUNT:`my_account_authentication_method_succeeded`,FAILED_OIDC_BACKCHANNEL_LOGOUT:`oidc_backchannel_logout_failed`,SUCCESSFUL_OIDC_BACKCHANNEL_LOGOUT:`oidc_backchannel_logout_succeeded`,ORGANIZATION_MEMBER_ADDED:`organization_member_added`,PASSKEY_CHALLENGE_FAILED:`passkey_challenge_failed`,PASSKEY_CHALLENGE_STARTED:`passkey_challenge_started`,PRE_LOGIN_ASSESSMENT:`pla`,BREACHED_PASSWORD:`pwd_leak`,BREACHED_PASSWORD_ON_RESET:`reset_pwd_leak`,SUCCESS_RESOURCE_CLEANUP:`resource_cleanup`,RICH_CONSENTS_ACCESS_ERROR:`rich_consents_access_error`,SUCCESS_LOGIN:`s`,SUCCESS_API_OPERATION:`sapi`,FAILED_API_OPERATION:`fapi`,SUCCESS_CHANGE_EMAIL:`sce`,SUCCESS_CROSS_ORIGIN_AUTHENTICATION:`scoa`,SUCCESS_CHANGE_PASSWORD:`scp`,SUCCESS_CHANGE_PHONE_NUMBER:`scpn`,SUCCESS_CHANGE_PASSWORD_REQUEST:`scpr`,SUCCESS_CHANGE_USERNAME:`scu`,SUCCESS_CREDENTIAL_VALIDATION:`scv`,SUCCESS_DELEGATION:`sd`,SUCCESS_USER_DELETION:`sdu`,SUCCESS_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN:`seacft`,SUCCESS_EXCHANGE_ACCESS_TOKEN_FOR_CLIENT_CREDENTIALS:`seccft`,SUCCESS_EXCHANGE_CUSTOM_TOKEN:`secte`,SUCCESS_EXCHANGE_DEVICE_CODE_FOR_ACCESS_TOKEN:`sede`,SUCCESS_EXCHANGE_NATIVE_SOCIAL_LOGIN:`sens`,SUCCESS_EXCHANGE_PASSWORD_OOB_FOR_ACCESS_TOKEN:`seoobft`,SUCCESS_EXCHANGE_PASSWORD_OTP_FOR_ACCESS_TOKEN:`seotpft`,SUCCESS_EXCHANGE_PASSWORDLESS_OTP_FOR_ACCESS_TOKEN:`sepotpft`,SUCCESS_EXCHANGE_PASSWORD_FOR_ACCESS_TOKEN:`sepft`,SUCCESS_EXCHANGE_PASSKEY_OOB_FOR_ACCESS_TOKEN:`sepkoobft`,SUCCESS_EXCHANGE_PASSKEY_OTP_FOR_ACCESS_TOKEN:`sepkotpft`,SUCCESS_EXCHANGE_PASSKEY_MFA_RECOVERY_FOR_ACCESS_TOKEN:`sepkrcft`,SUCCESS_EXCHANGE_PASSWORD_MFA_RECOVERY_FOR_ACCESS_TOKEN:`sercft`,SUCCESS_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN:`sertft`,SUCCESS_EXCHANGE_SUBJECT_TOKEN_FOR_ACCESS_TOKEN:`sestft`,SUCCESS_IMPERSONATION:`simp`,SUCCESSFULLY_ACCEPTED_USER_INVITE:`si`,BREACHED_PASSWORD_ON_SIGNUP:`signup_pwd_leak`,SUCCESS_LOGOUT:`slo`,SUCCESS_HOOK:`sh`,SUCCESS_PASSWORD_MIGRATION:`spm`,SUCCESS_REVOCATION:`srrt`,SUCCESS_SIGNUP:`ss`,FAILED_SS_SSO_OPERATION:`ss_sso_failure`,INFORMATION_FROM_SS_SSO_OPERATION:`ss_sso_info`,SUCCESS_SS_SSO_OPERATION:`ss_sso_success`,SUCCESS_SILENT_AUTH:`ssa`,SUCCESSFUL_SCIM_OPERATION:`sscim`,SUCCESSFULLY_IMPORTED_USERS:`sui`,SUCCESS_VERIFICATION_EMAIL:`sv`,SUCCESS_VERIFICATION_EMAIL_REQUEST:`svr`,MAX_AMOUNT_OF_AUTHENTICATORS:`too_many_records`,USER_LOGIN_BLOCK_RELEASED:`ublkdu`,FAILED_UNIVERSAL_LOGOUT:`universal_logout_failed`,SUCCESSFUL_UNIVERSAL_LOGOUT:`universal_logout_succeeded`,WARNING_DURING_LOGIN:`w`,WARNING_SENDING_NOTIFICATION:`wn`,WARNING_USER_MANAGEMENT:`wum`},nF=f.z.string().refine(e=>Object.values(Q).includes(e),{message:`Invalid log type`});Q.ACLS_SUMMARY,Q.ACTIONS_EXECUTION_FAILED,Q.API_LIMIT,Q.API_LIMIT_WARNING,Q.APPI,Q.CIBA_EXCHANGE_FAILED,Q.CIBA_EXCHANGE_SUCCEEDED,Q.CIBA_START_FAILED,Q.CIBA_START_SUCCEEDED,Q.CODE_LINK_SENT,Q.CODE_SENT,Q.DEPRECATION_NOTICE,Q.CONFIG_INHERITANCE_DIFF,Q.CONFIG_DRIFT,Q.FAILED_LOGIN,Q.FAILED_BY_CONNECTOR,Q.FAILED_CHANGE_EMAIL,Q.FAILED_BY_CORS,Q.FAILED_CROSS_ORIGIN_AUTHENTICATION,Q.FAILED_CHANGE_PASSWORD,Q.FAILED_POST_CHANGE_PASSWORD_HOOK,Q.FAILED_CHANGE_PHONE_NUMBER,Q.FAILED_CHANGE_PASSWORD_REQUEST,Q.FAILED_CONNECTOR_PROVISIONING,Q.FAILED_CHANGE_USERNAME,Q.FAILED_DELEGATION,Q.FAILED_DEVICE_ACTIVATION,Q.FAILED_DEVICE_AUTHORIZATION_REQUEST,Q.USER_CANCELED_DEVICE_CONFIRMATION,Q.FAILED_USER_DELETION,Q.FAILED_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN,Q.FAILED_EXCHANGE_ACCESS_TOKEN_FOR_CLIENT_CREDENTIALS,Q.FAILED_EXCHANGE_CUSTOM_TOKEN,Q.FAILED_EXCHANGE_DEVICE_CODE_FOR_ACCESS_TOKEN,Q.FAILED_FEDERATED_LOGOUT,Q.FAILED_EXCHANGE_NATIVE_SOCIAL_LOGIN,Q.FAILED_EXCHANGE_PASSWORD_OOB_FOR_ACCESS_TOKEN,Q.FAILED_EXCHANGE_PASSWORD_OTP_FOR_ACCESS_TOKEN,Q.FAILED_EXCHANGE_PASSWORD_FOR_ACCESS_TOKEN,Q.FAILED_EXCHANGE_PASSWORDLESS_OTP_FOR_ACCESS_TOKEN,Q.FAILED_EXCHANGE_PASSWORD_MFA_RECOVERY_FOR_ACCESS_TOKEN,Q.FAILED_EXCHANGE_ROTATING_REFRESH_TOKEN,Q.FAILED_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN,Q.FAILED_EXCHANGE_SUBJECT_TOKEN_FOR_ACCESS_TOKEN,Q.FAILED_HOOK,Q.FAILED_IMPERSONATION,Q.FAILED_INVITE_ACCEPT,Q.FAILED_LOGOUT,Q.FLOWS_EXECUTION_COMPLETED,Q.FLOWS_EXECUTION_FAILED,Q.FAILED_SENDING_NOTIFICATION,Q.FORMS_SUBMISSION_FAILED,Q.FORMS_SUBMISSION_SUCCEEDED,Q.FAILED_LOGIN_INCORRECT_PASSWORD,Q.FAILED_PUSHED_AUTHORIZATION_REQUEST,Q.FAILED_POST_USER_REGISTRATION_HOOK,Q.FAILED_SIGNUP,Q.FAILED_SILENT_AUTH,Q.FAILED_LOGIN_INVALID_EMAIL_USERNAME,Q.FAILED_USERS_IMPORT,Q.FAILED_VERIFICATION_EMAIL,Q.FAILED_VERIFICATION_EMAIL_REQUEST,Q.EMAIL_VERIFICATION_CONFIRMED,Q.EMAIL_VERIFICATION_FAILED,Q.MFA_AUTH_FAILED,Q.MFA_AUTH_REJECTED,Q.MFA_AUTH_SUCCESS,Q.MFA_ENROLLMENT_COMPLETE,Q.TOO_MANY_MFA_FAILURES,Q.MFA_RECOVERY_FAILED,Q.MFA_RECOVERY_RATE_LIMIT_EXCEED,Q.MFA_RECOVERY_SUCCESS,Q.MFA_EMAIL_SENT,Q.EMAIL_VERIFICATION_SENT,Q.EMAIL_VERIFICATION_SEND_FAILURE,Q.PUSH_NOTIFICATION_SENT,Q.ERROR_SENDING_MFA_PUSH_NOTIFICATION,Q.MFA_SMS_SENT,Q.ERROR_SENDING_MFA_SMS,Q.MFA_VOICE_CALL_SUCCESS,Q.MFA_VOICE_CALL_FAILED,Q.SECOND_FACTOR_STARTED,Q.MFA_ENROLL_STARTED,Q.MFA_ENROLLMENT_FAILED,Q.GUARDIAN_TENANT_UPDATE,Q.UNENROLL_DEVICE_ACCOUNT,Q.UPDATE_DEVICE_ACCOUNT,Q.WEBAUTHN_CHALLENGE_FAILED,Q.WEBAUTHN_ENROLLMENT_FAILED,Q.FAILED_KMS_API_OPERATION,Q.SUCCESS_KMS_API_OPERATION,Q.KMS_KEY_STATE_CHANGED,Q.TOO_MANY_CALLS_TO_DELEGATION,Q.BLOCKED_IP_ADDRESS,Q.BLOCKED_ACCOUNT_IP,Q.BLOCKED_ACCOUNT_EMAIL,Q.INFORMATION,Q.MFA_REQUIRED,Q.MANAGEMENT_API_READ_OPERATION,Q.FAILED_AUTHENTICATION_METHOD_OPERATION_MY_ACCOUNT,Q.SUCCESSFUL_AUTHENTICATION_METHOD_OPERATION_MY_ACCOUNT,Q.FAILED_OIDC_BACKCHANNEL_LOGOUT,Q.SUCCESSFUL_OIDC_BACKCHANNEL_LOGOUT,Q.ORGANIZATION_MEMBER_ADDED,Q.PASSKEY_CHALLENGE_FAILED,Q.PASSKEY_CHALLENGE_STARTED,Q.PRE_LOGIN_ASSESSMENT,Q.BREACHED_PASSWORD,Q.BREACHED_PASSWORD_ON_RESET,Q.SUCCESS_RESOURCE_CLEANUP,Q.RICH_CONSENTS_ACCESS_ERROR,Q.SUCCESS_LOGIN,Q.SUCCESS_API_OPERATION,Q.FAILED_API_OPERATION,Q.SUCCESS_CHANGE_EMAIL,Q.SUCCESS_CROSS_ORIGIN_AUTHENTICATION,Q.SUCCESS_CHANGE_PASSWORD,Q.SUCCESS_CHANGE_PHONE_NUMBER,Q.SUCCESS_CHANGE_PASSWORD_REQUEST,Q.SUCCESS_CHANGE_USERNAME,Q.SUCCESS_CREDENTIAL_VALIDATION,Q.SUCCESS_DELEGATION,Q.SUCCESS_USER_DELETION,Q.SUCCESS_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN,Q.SUCCESS_EXCHANGE_ACCESS_TOKEN_FOR_CLIENT_CREDENTIALS,Q.SUCCESS_EXCHANGE_CUSTOM_TOKEN,Q.SUCCESS_EXCHANGE_DEVICE_CODE_FOR_ACCESS_TOKEN,Q.SUCCESS_EXCHANGE_NATIVE_SOCIAL_LOGIN,Q.SUCCESS_EXCHANGE_PASSWORD_OOB_FOR_ACCESS_TOKEN,Q.SUCCESS_EXCHANGE_PASSWORD_OTP_FOR_ACCESS_TOKEN,Q.SUCCESS_EXCHANGE_PASSWORDLESS_OTP_FOR_ACCESS_TOKEN,Q.SUCCESS_EXCHANGE_PASSWORD_FOR_ACCESS_TOKEN,Q.SUCCESS_EXCHANGE_PASSKEY_OOB_FOR_ACCESS_TOKEN,Q.SUCCESS_EXCHANGE_PASSKEY_OTP_FOR_ACCESS_TOKEN,Q.SUCCESS_EXCHANGE_PASSKEY_MFA_RECOVERY_FOR_ACCESS_TOKEN,Q.SUCCESS_EXCHANGE_PASSWORD_MFA_RECOVERY_FOR_ACCESS_TOKEN,Q.SUCCESS_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN,Q.SUCCESS_EXCHANGE_SUBJECT_TOKEN_FOR_ACCESS_TOKEN,Q.SUCCESS_IMPERSONATION,Q.SUCCESSFULLY_ACCEPTED_USER_INVITE,Q.BREACHED_PASSWORD_ON_SIGNUP,Q.SUCCESS_LOGOUT,Q.SUCCESS_HOOK,Q.SUCCESS_PASSWORD_MIGRATION,Q.SUCCESS_REVOCATION,Q.SUCCESS_SIGNUP,Q.FAILED_SS_SSO_OPERATION,Q.INFORMATION_FROM_SS_SSO_OPERATION,Q.SUCCESS_SS_SSO_OPERATION,Q.SUCCESS_SILENT_AUTH,Q.SUCCESSFUL_SCIM_OPERATION,Q.SUCCESSFULLY_IMPORTED_USERS,Q.SUCCESS_VERIFICATION_EMAIL,Q.SUCCESS_VERIFICATION_EMAIL_REQUEST,Q.MAX_AMOUNT_OF_AUTHENTICATORS,Q.USER_LOGIN_BLOCK_RELEASED,Q.FAILED_UNIVERSAL_LOGOUT,Q.SUCCESSFUL_UNIVERSAL_LOGOUT,Q.WARNING_DURING_LOGIN,Q.WARNING_SENDING_NOTIFICATION,Q.WARNING_USER_MANAGEMENT,(()=>{let e={};for(let[t,n]of Object.entries(Q))t.startsWith(`SUCCESS_`)||t.startsWith(`SUCCESSFUL_`)||t.startsWith(`SUCCESSFULLY_`)||t.endsWith(`_SUCCEEDED`)||t.endsWith(`_COMPLETED`)?e[n]=`success`:t.startsWith(`FAILED_`)||t.startsWith(`ERROR_`)||t.startsWith(`BREACHED_`)||t.startsWith(`BLOCKED_`)||t===`MFA_AUTH_FAILED`||t===`MFA_AUTH_REJECTED`||t===`MFA_RECOVERY_FAILED`||t===`MFA_ENROLLMENT_FAILED`||t===`EMAIL_VERIFICATION_FAILED`||t===`WEBAUTHN_CHALLENGE_FAILED`||t===`WEBAUTHN_ENROLLMENT_FAILED`||t===`PASSKEY_CHALLENGE_FAILED`||t===`FLOWS_EXECUTION_FAILED`||t===`FORMS_SUBMISSION_FAILED`||t===`CIBA_EXCHANGE_FAILED`||t===`CIBA_START_FAILED`||t===`ACTIONS_EXECUTION_FAILED`||t===`RICH_CONSENTS_ACCESS_ERROR`||t===`USER_CANCELED_DEVICE_CONFIRMATION`||t===`TOO_MANY_MFA_FAILURES`||t===`MFA_RECOVERY_RATE_LIMIT_EXCEED`||t===`API_LIMIT`||t===`MAX_AMOUNT_OF_AUTHENTICATORS`?e[n]=`failure`:t.startsWith(`WARNING_`)||t===`API_LIMIT_WARNING`||t===`DEPRECATION_NOTICE`||t===`PRE_LOGIN_ASSESSMENT`?e[n]=`warning`:t===`CODE_SENT`||t===`CODE_LINK_SENT`||t===`MFA_EMAIL_SENT`||t===`MFA_SMS_SENT`||t===`EMAIL_VERIFICATION_SENT`||t===`PUSH_NOTIFICATION_SENT`?e[n]=`code_sent`:t===`INFORMATION`||t===`INFORMATION_FROM_SS_SSO_OPERATION`||t===`MANAGEMENT_API_READ_OPERATION`||t===`APPI`||t===`CONFIG_INHERITANCE_DIFF`||t===`CONFIG_DRIFT`||t===`ACLS_SUMMARY`||t===`ORGANIZATION_MEMBER_ADDED`?e[n]=`info`:e[n]=`other`;return e})();var rF=f.z.object({name:f.z.string(),version:f.z.string(),env:f.z.object({node:f.z.string().optional()}).optional()}),iF=f.z.object({country_code:f.z.string().length(2),city_name:f.z.string(),latitude:f.z.string(),longitude:f.z.string(),time_zone:f.z.string(),continent_code:f.z.string()});f.z.object({type:nF,date:f.z.string(),description:f.z.string().optional(),ip:f.z.string().optional(),user_agent:f.z.string().optional(),details:f.z.any().optional(),isMobile:f.z.boolean(),user_id:f.z.string().optional(),user_name:f.z.string().optional(),connection:f.z.string().optional(),connection_id:f.z.string().optional(),client_id:f.z.string().optional(),client_name:f.z.string().optional(),audience:f.z.string().optional(),scope:f.z.string().optional(),strategy:f.z.string().optional(),strategy_type:f.z.string().optional(),hostname:f.z.string().optional(),auth0_client:rF.optional(),log_id:f.z.string().optional(),location_info:iF.optional()}).extend({log_id:f.z.string()});var aF=f.z.enum([`http`,`eventbridge`,`eventgrid`,`splunk`,`datadog`,`sumo`,`firehose`]),oF=f.z.enum([`active`,`paused`,`suspended`]),sF=f.z.object({type:f.z.string(),name:f.z.string()});f.z.object({name:f.z.string(),type:aF,status:oF.optional(),sink:f.z.record(f.z.string(),f.z.unknown()),filters:f.z.array(sF).optional(),isPriority:f.z.boolean().optional()}).extend({id:f.z.string(),status:oF,created_at:f.z.string().optional(),updated_at:f.z.string().optional()});var cF=f.z.enum([`auth0`,`cognito`,`okta`,`oidc`]),lF=f.z.object({domain:f.z.string(),client_id:f.z.string(),client_secret:JM(),audience:f.z.string().optional(),scope:f.z.string().optional()}),uF=f.z.object({id:f.z.string().optional(),name:f.z.string(),provider:cF,connection:f.z.string(),enabled:f.z.boolean().default(!0),credentials:lF});f.z.object({id:f.z.string(),created_at:f.z.string(),updated_at:f.z.string()}).extend(uF.shape);var dF=f.z.object({enabled:f.z.boolean().optional(),shields:f.z.array(f.z.string()).optional(),admin_notification_frequency:f.z.array(f.z.string()).optional(),method:f.z.string().optional(),stage:f.z.object({"pre-user-registration":f.z.object({shields:f.z.array(f.z.string()).optional()}).optional(),"pre-change-password":f.z.object({shields:f.z.array(f.z.string()).optional()}).optional()}).optional()}),fF=f.z.object({enabled:f.z.boolean().optional(),shields:f.z.array(f.z.string()).optional(),allowlist:f.z.array(f.z.string()).optional(),mode:f.z.string().optional(),max_attempts:f.z.number().optional()}),pF=f.z.object({enabled:f.z.boolean().optional(),shields:f.z.array(f.z.string()).optional(),allowlist:f.z.array(f.z.string()).optional(),stage:f.z.object({"pre-login":f.z.object({max_attempts:f.z.number().optional(),rate:f.z.number().optional()}).optional(),"pre-user-registration":f.z.object({max_attempts:f.z.number().optional(),rate:f.z.number().optional()}).optional()}).optional()}),mF=f.z.object({breached_password_detection:dF.optional(),brute_force_protection:fF.optional(),suspicious_ip_throttling:pF.optional()});f.z.object({id:f.z.string().optional(),user_id:f.z.string(),password:f.z.string(),algorithm:f.z.enum([`bcrypt`,`argon2id`]).default(`argon2id`),is_current:f.z.boolean().default(!0)}).extend({id:f.z.string(),created_at:f.z.string(),updated_at:f.z.string()});var hF=f.z.object({initial_user_agent:f.z.string().describe(`First user agent of the device from which this user logged in`),initial_ip:f.z.string().describe(`First IP address associated with this session`),initial_asn:f.z.string().describe(`First autonomous system number associated with this session`),last_user_agent:f.z.string().describe(`Last user agent of the device from which this user logged in`),last_ip:f.z.string().describe(`Last IP address from which this user logged in`),last_asn:f.z.string().describe(`Last autonomous system number from which this user logged in`)}),gF=f.z.object({name:f.z.string().describe(`Authentication method name, e.g. "mfa" for a completed second factor`),timestamp:f.z.string().describe(`When the method was completed (ISO 8601)`),type:f.z.string().optional().describe(`For "mfa": the authentication method type used, e.g. "totp", "phone", "passkey"`)}),_F=f.z.object({methods:f.z.array(gF)}),vF=f.z.object({id:f.z.string(),revoked_at:f.z.string().optional(),used_at:f.z.string().optional(),user_id:f.z.string().describe(`The user ID associated with the session`),expires_at:f.z.string().optional(),login_session_id:f.z.string(),idle_expires_at:f.z.string().optional(),device:hF.describe(`Metadata related to the device used in the session`),clients:f.z.array(f.z.string()).describe(`List of client details for the session`),authentication:_F.optional().describe(`Authentication methods completed in this session (currently MFA only)`),session_transfer:eN.optional().describe(`Set when the session was created by redeeming a session_transfer_token`)});f.z.object({created_at:f.z.string(),updated_at:f.z.string(),authenticated_at:f.z.string(),last_interaction_at:f.z.string()}).extend(vF.shape),f.z.object({kid:f.z.string().openapi({description:`The key id of the signing key`}),tenant_id:f.z.string().optional().openapi({description:`The tenant the key belongs to. Omitted means the key is shared / control-plane scoped.`}),cert:f.z.string().openapi({description:`The public certificate of the signing key`}),fingerprint:f.z.string().openapi({description:`The cert fingerprint`}),thumbprint:f.z.string().openapi({description:`The cert thumbprint`}),pkcs7:f.z.string().optional().openapi({description:`The private key in pkcs7 format`}),current:f.z.boolean().optional().openapi({description:`True if the key is the current key`}),next:f.z.boolean().optional().openapi({description:`True if the key is the next key`}),previous:f.z.boolean().optional().openapi({description:`True if the key is the previous key`}),current_since:f.z.string().optional().openapi({description:`The date and time when the key became the current key`}),current_until:f.z.string().optional().openapi({description:`The date and time when the current key was rotated`}),revoked:f.z.boolean().optional().openapi({description:`True if the key is revoked`}),revoked_at:f.z.string().optional().openapi({description:`The date and time when the key was revoked`}),connection:f.z.string().optional().openapi({description:`The connection identifier associated with the key`}),type:f.z.enum([`jwt_signing`,`saml_encryption`]).openapi({description:`The type of the signing key`})});var yF=f.z.enum([`never`,`always`,`all-applications`,`confidence-score`]),bF={allow_remember_browser:f.z.boolean().optional(),remember_browser_lifetime_in_days:f.z.number().int().min(1).max(365).optional()};f.z.object({idle_session_lifetime:f.z.number().default(72),session_lifetime:f.z.number().default(168),session_cookie:f.z.object({mode:f.z.enum([`persistent`,`non-persistent`]).optional()}).optional(),enable_client_connections:f.z.boolean().optional(),default_redirection_uri:f.z.string().optional(),enabled_locales:f.z.array(f.z.string()).optional(),default_directory:f.z.string().optional(),error_page:f.z.object({html:f.z.string().optional(),show_log_link:f.z.boolean().optional(),url:f.z.string().optional()}).optional(),flags:f.z.object({allow_legacy_delegation_grant_types:f.z.boolean().optional(),allow_legacy_ro_grant_types:f.z.boolean().optional(),allow_legacy_tokeninfo_endpoint:f.z.boolean().optional(),disable_clickjack_protection_headers:f.z.boolean().optional(),enable_apis_section:f.z.boolean().optional(),enable_client_connections:f.z.boolean().optional(),enable_custom_domain_in_emails:f.z.boolean().optional(),enable_dynamic_client_registration:f.z.boolean().optional(),enable_idtoken_api2:f.z.boolean().optional(),enable_legacy_logs_search_v2:f.z.boolean().optional(),enable_legacy_profile:f.z.boolean().optional(),enable_pipeline2:f.z.boolean().optional(),enable_public_signup_user_exists_error:f.z.boolean().optional(),use_scope_descriptions_for_consent:f.z.boolean().optional(),disable_management_api_sms_obfuscation:f.z.boolean().optional(),enable_adfs_waad_email_verification:f.z.boolean().optional(),revoke_refresh_token_grant:f.z.boolean().optional(),dashboard_log_streams_next:f.z.boolean().optional(),dashboard_insights_view:f.z.boolean().optional(),disable_fields_map_fix:f.z.boolean().optional(),mfa_show_factor_list_on_enrollment:f.z.boolean().optional()}).optional(),friendly_name:f.z.string().optional(),picture_url:f.z.string().optional(),support_email:f.z.string().optional(),support_url:f.z.string().optional(),sandbox_version:f.z.string().optional(),sandbox_versions_available:f.z.array(f.z.string()).optional(),change_password:f.z.object({enabled:f.z.boolean(),html:f.z.string()}).optional(),guardian_mfa_page:f.z.object({enabled:f.z.boolean(),html:f.z.string()}).optional(),default_audience:f.z.string().optional(),default_organization:f.z.string().optional(),sessions:f.z.object({oidc_logout_prompt_enabled:f.z.boolean().optional()}).optional(),mfa:f.z.object({policy:yF.default(`never`).optional(),...bF,factors:f.z.object({sms:f.z.boolean().default(!1),otp:f.z.boolean().default(!1),email:f.z.boolean().default(!1),push_notification:f.z.boolean().default(!1),webauthn_roaming:f.z.boolean().default(!1),webauthn_platform:f.z.boolean().default(!1),recovery_code:f.z.boolean().default(!1),duo:f.z.boolean().default(!1)}).optional(),sms_provider:f.z.object({provider:f.z.enum([`twilio`,`vonage`,`aws_sns`,`phone_message_hook`]).optional()}).optional(),twilio:f.z.object({sid:JM().optional(),auth_token:JM().optional(),from:f.z.string().optional(),messaging_service_sid:f.z.string().optional()}).optional(),phone_message:f.z.object({message:f.z.string().optional()}).optional()}).optional()});var xF=f.z.object({id:f.z.string().optional(),parent_tenant_id:f.z.string().nullish(),config_sync:f.z.enum([`inherit-on-read`,`synced`,`detached`]).nullish(),config_sync_hash:f.z.string().nullish(),config_synced_at:f.z.string().nullish(),audience:f.z.string().optional(),friendly_name:f.z.string(),picture_url:f.z.string().optional(),support_email:f.z.string().optional(),support_url:f.z.string().optional(),sender_email:f.z.string().email().nullish(),sender_name:f.z.string().optional(),session_lifetime:f.z.number().optional(),idle_session_lifetime:f.z.number().optional(),ephemeral_session_lifetime:f.z.number().optional(),idle_ephemeral_session_lifetime:f.z.number().optional(),session_cookie:f.z.object({mode:f.z.enum([`persistent`,`non-persistent`]).optional()}).optional(),allowed_logout_urls:f.z.array(f.z.string()).optional(),default_redirection_uri:f.z.string().optional(),default_client_id:f.z.string().optional(),enabled_locales:f.z.array(f.z.string()).optional(),default_directory:f.z.string().optional(),error_page:f.z.object({html:f.z.string().optional(),show_log_link:f.z.boolean().optional(),url:f.z.string().optional()}).nullish(),flags:f.z.object({allow_changing_enable_sso:f.z.boolean().optional(),allow_legacy_delegation_grant_types:f.z.boolean().optional(),allow_legacy_ro_grant_types:f.z.boolean().optional(),allow_legacy_tokeninfo_endpoint:f.z.boolean().optional(),change_pwd_flow_v1:f.z.boolean().optional(),client_id_metadata_document_registration:f.z.boolean().optional(),custom_domains_provisioning:f.z.boolean().optional(),dashboard_insights_view:f.z.boolean().optional(),dashboard_log_streams_next:f.z.boolean().optional(),disable_clickjack_protection_headers:f.z.boolean().optional(),disable_fields_map_fix:f.z.boolean().optional(),disable_impersonation:f.z.boolean().optional(),disable_management_api_sms_obfuscation:f.z.boolean().optional(),enable_adfs_waad_email_verification:f.z.boolean().optional(),enable_apis_section:f.z.boolean().optional(),enable_client_connections:f.z.boolean().optional(),enable_custom_domain_in_emails:f.z.boolean().optional(),enable_dynamic_client_registration:f.z.boolean().optional(),dcr_require_initial_access_token:f.z.boolean().optional(),dcr_allowed_grant_types:f.z.array(f.z.string()).optional(),allow_http_return_to:f.z.array(f.z.string().refine(e=>{try{let t=new URL(e);return t.protocol===`http:`&&(t.pathname===``||t.pathname===`/`)&&!t.search&&!t.hash&&e===t.origin}catch{return!1}},{message:`must be a fully-qualified http origin (scheme + host + port, no path)`})).optional(),enable_idtoken_api2:f.z.boolean().optional(),enable_legacy_logs_search_v2:f.z.boolean().optional(),enable_legacy_profile:f.z.boolean().optional(),enable_pipeline2:f.z.boolean().optional(),enable_public_signup_user_exists_error:f.z.boolean().optional(),enable_sso:f.z.boolean().optional(),enforce_client_authentication_on_passwordless_start:f.z.boolean().optional(),genai_trial:f.z.boolean().optional(),improved_signup_bot_detection_in_classic:f.z.boolean().optional(),mfa_show_factor_list_on_enrollment:f.z.boolean().optional(),no_disclose_enterprise_connections:f.z.boolean().optional(),remove_alg_from_jwks:f.z.boolean().optional(),revoke_refresh_token_grant:f.z.boolean().optional(),trust_azure_adfs_email_verified_connection_property:f.z.boolean().optional(),use_scope_descriptions_for_consent:f.z.boolean().optional(),inherit_global_permissions_in_organizations:f.z.boolean().optional(),restrict_undefined_scopes:f.z.boolean().optional(),universal_login_version:f.z.enum([`1`,`2`]).optional()}).optional(),sandbox_version:f.z.string().optional(),legacy_sandbox_version:f.z.string().optional(),sandbox_versions_available:f.z.array(f.z.string()).optional(),change_password:f.z.object({enabled:f.z.boolean().optional(),html:f.z.string().optional()}).optional(),guardian_mfa_page:f.z.object({enabled:f.z.boolean().optional(),html:f.z.string().optional()}).optional(),device_flow:f.z.object({charset:f.z.enum([`base20`,`digits`]).optional(),mask:f.z.string().max(20).optional()}).optional(),default_token_quota:f.z.object({clients:f.z.object({client_credentials:f.z.record(f.z.string(),f.z.any()).optional()}).optional(),organizations:f.z.object({client_credentials:f.z.record(f.z.string(),f.z.any()).optional()}).optional()}).nullish(),default_audience:f.z.string().optional(),default_organization:f.z.string().optional(),sessions:f.z.object({oidc_logout_prompt_enabled:f.z.boolean().optional()}).optional(),oidc_logout:f.z.object({rp_logout_end_session_endpoint_discovery:f.z.boolean().optional()}).optional(),allow_organization_name_in_authentication_api:f.z.boolean().optional(),customize_mfa_in_postlogin_action:f.z.boolean().optional(),acr_values_supported:f.z.array(f.z.string()).optional(),mtls:f.z.object({enable_endpoint_aliases:f.z.boolean().optional()}).nullish(),pushed_authorization_requests_supported:f.z.boolean().optional(),authorization_response_iss_parameter_supported:f.z.boolean().optional(),deployment_type:f.z.enum([`shared`,`wfp`]).default(`shared`).optional(),provisioning_state:f.z.enum([`pending`,`ready`,`failed`]).default(`ready`).optional(),provisioning_error:f.z.string().max(2048).optional(),provisioning_state_changed_at:f.z.string().optional(),bundle_configuration:f.z.string().max(64).optional(),worker_version:f.z.string().max(64).optional(),database_version:f.z.string().max(64).optional(),worker_script_name:f.z.string().max(255).optional(),storage_kind:f.z.enum([`own_d1`,`existing_d1`,`shared_planetscale`]).optional(),d1_database_id:f.z.string().max(64).optional(),attack_protection:mF.optional(),mfa:f.z.object({policy:yF.default(`never`).optional(),...bF,factors:f.z.object({sms:f.z.boolean().default(!1),otp:f.z.boolean().default(!1),email:f.z.boolean().default(!1),push_notification:f.z.boolean().default(!1),webauthn_roaming:f.z.boolean().default(!1),webauthn_platform:f.z.boolean().default(!1),recovery_code:f.z.boolean().default(!1),duo:f.z.boolean().default(!1)}).optional(),sms_provider:f.z.object({provider:f.z.enum([`twilio`,`vonage`,`aws_sns`,`phone_message_hook`]).optional()}).optional(),twilio:f.z.object({sid:JM().optional(),auth_token:JM().optional(),from:f.z.string().optional(),messaging_service_sid:f.z.string().optional()}).optional(),phone_message:f.z.object({message:f.z.string().optional()}).optional()}).optional()});f.z.object({created_at:f.z.string().nullable().transform(e=>e??``),updated_at:f.z.string().nullable().transform(e=>e??``)}).extend(xF.shape).extend({id:f.z.string(),is_control_plane:f.z.boolean().optional(),has_children:f.z.boolean().optional()});var SF=xF.shape.mfa.unwrap().shape,CF=f.z.object({...SF,policy:yF.optional(),factors:f.z.object({sms:f.z.boolean().optional(),otp:f.z.boolean().optional(),email:f.z.boolean().optional(),push_notification:f.z.boolean().optional(),webauthn_roaming:f.z.boolean().optional(),webauthn_platform:f.z.boolean().optional(),recovery_code:f.z.boolean().optional(),duo:f.z.boolean().optional()}).optional()});f.z.object(xF.shape).extend({deployment_type:f.z.enum([`shared`,`wfp`]),provisioning_state:f.z.enum([`pending`,`ready`,`failed`]),mfa:CF}).partial();var wF=f.z.enum([`provision`,`seed`,`upgrade`,`backup`,`deprovision`,`users_import`,`sync-defaults`,`detach`,`tenant-members-request`]),TF=f.z.enum([`pending`,`running`,`succeeded`,`failed`,`cancelled`]),EF=f.z.string().max(64);f.z.object({tenant_id:f.z.string().max(255).nullable().default(null),rollout_id:f.z.string().max(255).nullable().optional(),kind:wF,engine:EF,engine_instance_id:f.z.string().max(100).nullable().optional(),target_worker_version:f.z.string().max(255).nullable().optional(),target_database_version:f.z.string().max(255).nullable().optional(),initiated_by:f.z.string().max(255).nullable().optional(),input:f.z.record(f.z.string(),f.z.unknown()).nullable().optional()}).extend({id:f.z.string(),status:TF,current_step:f.z.string().max(255).nullable().optional(),error:f.z.string().nullable().optional(),result:f.z.record(f.z.string(),f.z.unknown()).nullable().optional(),claimed_by:f.z.string().max(255).nullable().optional(),claim_expires_at:f.z.string().nullable().optional(),created_at:f.z.string(),updated_at:f.z.string(),finished_at:f.z.string().nullable().optional()}).pick({status:!0,current_step:!0,engine_instance_id:!0,target_worker_version:!0,target_database_version:!0,error:!0,result:!0,claimed_by:!0,claim_expires_at:!0,finished_at:!0}).partial();var DF=f.z.enum([`started`,`succeeded`,`failed`,`retried`,`skipped`,`reconciled`]);f.z.object({operation_id:f.z.string().max(255),step:f.z.string().max(255),outcome:DF,detail:f.z.record(f.z.string(),f.z.unknown()).nullable().optional(),attempt:f.z.number().int().min(1).default(1)}).extend({id:f.z.string(),created_at:f.z.string()});var OF=f.z.enum([`pending`,`inserted`,`updated`,`failed`,`skipped`]);f.z.object({operation_id:f.z.string().max(255),seq:f.z.number().int().min(0),payload:f.z.record(f.z.string(),f.z.unknown()),status:OF.default(`pending`),error_code:f.z.string().max(64).nullable().optional(),error_message:f.z.string().nullable().optional(),error_path:f.z.string().max(255).nullable().optional(),entity_id:f.z.string().max(255).nullable().optional()}).extend({status:OF,created_at:f.z.string(),updated_at:f.z.string()}),f.z.object({seq:f.z.number().int().min(0),status:OF,error_code:f.z.string().max(64).nullable().optional(),error_message:f.z.string().nullable().optional(),error_path:f.z.string().max(255).nullable().optional(),entity_id:f.z.string().max(255).nullable().optional()});var kF=f.z.enum([`upgrade`,`reseed`,`backup`,`config-sync`]),AF=f.z.enum([`pending`,`canary`,`rolling`,`paused`,`done`,`failed`]);f.z.object({kind:kF,target_worker_version:f.z.string().max(255).nullable().optional(),target_database_version:f.z.string().max(255).nullable().optional(),wave_size:f.z.number().int().min(1).default(10),canary_tenant_ids:f.z.array(f.z.string()).nullable().optional(),filter:f.z.record(f.z.string(),f.z.unknown()).nullable().optional(),initiated_by:f.z.string().max(255).nullable().optional(),config:f.z.record(f.z.string(),f.z.unknown()).nullable().optional()}).extend({id:f.z.string(),status:AF,created_at:f.z.string(),updated_at:f.z.string(),finished_at:f.z.string().nullable().optional(),paused_reason:f.z.string().nullable().optional()}).pick({status:!0,wave_size:!0,canary_tenant_ids:!0,filter:!0,config:!0,paused_reason:!0,finished_at:!0}).partial();var jF=f.z.enum([`invite`,`add_members`,`remove_members`,`assign_roles`,`remove_roles`,`revoke_invitation`]),MF=f.z.enum([`pending`,`succeeded`,`failed`]);f.z.object({kind:jF,requested_by:f.z.string().min(1).max(255),payload:f.z.record(f.z.string(),f.z.unknown())}).extend({id:f.z.string(),tenant_id:f.z.string(),status:MF,result:f.z.record(f.z.string(),f.z.unknown()).nullable().optional(),error:f.z.string().nullable().optional(),notified_at:f.z.string().nullable().optional(),created_at:f.z.string(),updated_at:f.z.string(),finished_at:f.z.string().nullable().optional()}),f.z.object({status:MF.optional(),result:f.z.record(f.z.string(),f.z.unknown()).nullable().optional(),error:f.z.string().nullable().optional(),notified_at:f.z.string().nullable().optional(),finished_at:f.z.string().nullable().optional()}),f.z.object({access_token:f.z.string(),id_token:f.z.string().optional(),scope:f.z.string().optional(),state:f.z.string().optional(),refresh_token:f.z.string().optional(),token_type:f.z.string(),expires_in:f.z.number(),issued_token_type:f.z.string().optional()}),f.z.object({code:f.z.string(),state:f.z.string().optional()});var NF=f.z.object({button_border_radius:f.z.number(),button_border_weight:f.z.number(),buttons_style:f.z.enum([`pill`,`rounded`,`sharp`]),input_border_radius:f.z.number(),input_border_weight:f.z.number(),inputs_style:f.z.enum([`pill`,`rounded`,`sharp`]),show_widget_shadow:f.z.boolean(),widget_border_weight:f.z.number(),widget_corner_radius:f.z.number()}),PF=f.z.object({base_focus_color:f.z.string(),base_hover_color:f.z.string(),body_text:f.z.string(),captcha_widget_theme:f.z.enum([`auto`,`dark`,`light`]),error:f.z.string(),header:f.z.string(),icons:f.z.string(),input_background:f.z.string(),input_border:f.z.string(),input_filled_text:f.z.string(),input_labels_placeholders:f.z.string(),links_focused_components:f.z.string(),primary_button:f.z.string(),primary_button_label:f.z.string(),secondary_button_border:f.z.string(),secondary_button_label:f.z.string(),success:f.z.string(),widget_background:f.z.string(),widget_border:f.z.string()}),FF=PF.omit({captcha_widget_theme:!0}).partial(),IF=f.z.object({bold:f.z.boolean(),size:f.z.number()}),LF=f.z.object({body_text:IF,buttons_text:IF,font_url:f.z.string(),input_labels:IF,links:IF,links_style:f.z.enum([`normal`,`underlined`]),reference_text_size:f.z.number(),subtitle:IF,title:IF}),RF=f.z.object({background_color:f.z.string(),background_image_url:f.z.string(),background_color_dark:f.z.string().optional(),background_image_url_dark:f.z.string().optional(),page_layout:f.z.enum([`center`,`left`,`right`]),logo_placement:f.z.enum([`widget`,`chip`,`none`]).optional()}),zF=f.z.object({header_text_alignment:f.z.enum([`center`,`left`,`right`]),logo_height:f.z.number(),logo_position:f.z.enum([`center`,`left`,`none`,`right`]),logo_url:f.z.string(),logo_url_dark:f.z.string().optional(),social_buttons_layout:f.z.enum([`bottom`,`top`])});f.z.object({borders:NF,colors:PF,colors_dark:FF.optional(),displayName:f.z.string(),fonts:LF,page_background:RF,widget:zF}).extend({themeId:f.z.string()}),f.z.object({..._M,universal_login_experience:f.z.enum([`new`,`classic`]).default(`new`),identifier_first:f.z.boolean().default(!0),password_first:f.z.boolean().default(!1),show_last_used_connection:f.z.boolean().default(!1),webauthn_platform_first_factor:f.z.boolean()});var BF=f.z.object({hosts:f.z.array(f.z.string()).optional(),methods:f.z.array(f.z.string()).optional(),path:f.z.string().default(`/*`),headers:f.z.record(f.z.string(),f.z.string()).optional(),query:f.z.record(f.z.string(),f.z.string()).optional()}),VF=f.z.object({type:f.z.string(),options:f.z.record(f.z.string(),f.z.unknown()).default({})}),HF=f.z.object({id:f.z.string().optional(),custom_domain_id:f.z.string(),priority:f.z.number().int().default(100),match:BF,handlers:f.z.array(VF).min(1)});HF.extend({id:f.z.string(),tenant_id:f.z.string(),created_at:f.z.string(),updated_at:f.z.string()}),HF.partial().omit({id:!0,custom_domain_id:!0});var UF=`custom_authentication`,WF=[`urn:ietf:params:oauth:`,`urn:auth0`,`urn:okta`,`http://auth0.com`,`https://auth0.com`,`http://okta.com`,`https://okta.com`],GF=f.z.string().min(1).max(200).refine(e=>e.startsWith(`https://`)||e.startsWith(`urn:`),{message:`subject_token_type must be a URI starting with https:// or urn:`}).refine(e=>!WF.some(t=>e.toLowerCase().startsWith(t)),{message:`subject_token_type uses a reserved namespace`}),KF=f.z.enum([`RS256`,`RS384`,`RS512`,`ES256`,`ES384`,`ES512`]),qF=f.z.discriminatedUnion(`type`,[f.z.object({type:f.z.literal(`connection`),connection:f.z.string().min(1),create_if_not_exists:f.z.boolean().default(!0),trust_email_verified:f.z.boolean().default(!1)}),f.z.object({type:f.z.literal(`user_id`)})]),JF=f.z.object({issuer:f.z.string().min(1).max(2048),jwks:QP.optional(),jwks_uri:f.z.string().url().optional(),audience:f.z.array(f.z.string().min(1)).min(1).optional(),algorithms:f.z.array(KF).min(1).optional(),max_lifetime_seconds:f.z.number().int().min(1).max(3600).default(300),require_jti:f.z.boolean().default(!0),user_mapping:qF});f.z.object({name:f.z.string().min(1).max(255),subject_token_type:GF,action_id:f.z.string().min(1).optional(),type:f.z.literal(UF),jwt_verification:JF.optional()}).extend({id:f.z.string(),created_at:f.z.string(),updated_at:f.z.string()}),f.z.object({name:f.z.string().min(1).max(255).optional(),subject_token_type:GF.optional(),jwt_verification:JF.optional()});var YF=f.z.enum([`oidc`,`samlp`,`waad`,`google-apps`,`adfs`,`okta`,`auth0-samlp`,`okta-samlp`,`keycloak-samlp`,`pingfederate`]),XF=f.z.object({name:f.z.string(),description:f.z.string(),is_optional:f.z.boolean()}),ZF=f.z.object({logo_url:f.z.string().optional(),colors:f.z.object({primary:f.z.string()}).optional()});f.z.object({name:f.z.string(),description:f.z.string().optional(),allowed_strategies:f.z.array(YF).optional(),user_attributes:f.z.array(XF).optional(),branding:ZF.optional()}).extend({id:f.z.string(),created_at:f.z.string(),updated_at:f.z.string()});var QF=f.z.record(f.z.string(),f.z.string()),$F=f.z.enum([`none`,`optional`,`required`]),eI=f.z.object({icon_url:f.z.string().optional(),domain_aliases:f.z.array(f.z.string()).optional()}),tI=f.z.object({name:f.z.string(),display_name:f.z.string().optional(),is_domain_connection:f.z.boolean().optional(),show_as_button:f.z.boolean().optional(),metadata:f.z.record(f.z.string(),f.z.string()).optional(),options:eI.optional()}),nI=f.z.object({organization_id:f.z.string(),assign_membership_on_login:f.z.boolean().optional(),show_as_button:f.z.boolean().optional()});f.z.object({id:f.z.string(),profile_id:f.z.string(),connection_id:f.z.string().optional(),connection_config:tI.optional(),enabled_clients:f.z.array(f.z.string()),enabled_organizations:f.z.array(nI),domain_verification:$F,expires_at:f.z.string(),revoked_at:f.z.string().optional(),completed_at:f.z.string().optional(),created_at:f.z.string(),updated_at:f.z.string()});var rI=f.z.object({scim:f.z.string(),auth0:f.z.string()}),iI=f.z.object({connection_id:f.z.string(),user_id_attribute:f.z.string().default(`externalId`),mapping:f.z.array(rI).default([])});f.z.object({created_at:f.z.string(),updated_at:f.z.string()}).extend(iI.shape);var aI=f.z.object({token_id:f.z.string(),connection_id:f.z.string(),token_hash:f.z.string(),scopes:f.z.array(f.z.string()).default([]),valid_until:f.z.string().optional()});f.z.object({created_at:f.z.string(),last_used_at:f.z.string().optional()}).extend(aI.shape);var oI=f.z.object({connection_id:f.z.string(),external_id:f.z.string(),user_id:f.z.string()});f.z.object({created_at:f.z.string()}).extend(oI.shape),f.z.object({..._M,name:f.z.string(),enabled:f.z.boolean().optional().default(!0),default_from_address:f.z.string().optional(),credentials:f.z.record(f.z.string(),f.z.unknown()),settings:f.z.object({}).optional()});var sI=f.z.enum([`verify_email`,`verify_email_by_code`,`reset_email`,`reset_email_by_code`,`welcome_email`,`blocked_account`,`stolen_credentials`,`enrollment_email`,`mfa_oob_code`,`change_password`,`password_reset`,`user_invitation`]);f.z.object({template:sI,body:f.z.string(),from:f.z.string(),subject:f.z.string(),syntax:f.z.literal(`liquid`).default(`liquid`),resultUrl:f.z.string().optional(),urlLifetimeInSeconds:f.z.number().int().nonnegative().optional(),includeEmailInRedirect:f.z.boolean().default(!1),enabled:f.z.boolean().default(!0)}),f.z.object({id:f.z.string(),login_id:f.z.string(),session_id:f.z.string().optional(),organization:f.z.string().optional(),auth_connection:f.z.string().optional(),auth_strategy:tF.optional(),session_transfer:eN.optional(),user_id:f.z.string(),client_id:f.z.string(),expires_at:f.z.string().optional(),idle_expires_at:f.z.string().optional(),last_exchanged_at:f.z.string().optional(),device:hF,resource_servers:f.z.array(f.z.object({audience:f.z.string(),scopes:f.z.string()})),rotating:f.z.boolean(),token_lookup:f.z.string().optional(),token_hash:f.z.string().optional(),family_id:f.z.string().optional(),rotated_to:f.z.string().optional(),rotated_at:f.z.string().optional()}).extend({created_at:f.z.string(),revoked_at:f.z.string().optional()}),f.z.object({to:f.z.string(),message:f.z.string()}),f.z.object({name:f.z.string(),options:f.z.object({})});var cI=f.z.object({value:f.z.string(),description:f.z.string().optional()}),lI=f.z.object({token_dialect:f.z.enum([`access_token`,`access_token_authz`]).optional(),enforce_policies:f.z.boolean().optional(),allow_skipping_userinfo:f.z.boolean().optional(),skip_userinfo:f.z.boolean().optional(),persist_client_authorization:f.z.boolean().optional(),enable_introspection_endpoint:f.z.boolean().optional(),mtls:f.z.object({bound_access_tokens:f.z.boolean().optional()}).optional()}),uI=f.z.object({id:f.z.string().optional(),name:f.z.string(),identifier:f.z.string(),scopes:f.z.array(cI).optional(),signing_alg:f.z.string().optional(),signing_secret:JM().optional(),token_lifetime:f.z.number().default(86400),token_lifetime_for_web:f.z.number().default(7200),skip_consent_for_verifiable_first_party_clients:f.z.boolean().optional(),allow_offline_access:f.z.boolean().optional(),verificationKey:f.z.string().optional(),options:lI.optional(),is_system:f.z.boolean().optional(),..._M,metadata:f.z.record(f.z.string(),f.z.any()).optional()}).extend({created_at:f.z.string().optional(),updated_at:f.z.string().optional()});f.z.array(uI);var dI=f.z.object({role_id:f.z.string(),resource_server_identifier:f.z.string(),permission_name:f.z.string()}).extend({created_at:f.z.string()});f.z.array(dI),f.z.object({user_id:f.z.string().openapi({description:`The id of the user that granted the consent`}),clientID:f.z.string().openapi({description:`The id of the client the grant was issued to`}),audience:f.z.string().optional().openapi({description:`The audience the grant applies to`}),scope:f.z.array(f.z.string()).default([]).openapi({description:`The list of OAuth scopes the user has consented to`})}).extend({id:f.z.string()}),f.z.object({user_id:f.z.string(),last_login:f.z.string().optional(),last_ip:f.z.string().optional(),login_count:f.z.number().default(0),failed_logins:f.z.array(f.z.string()).optional(),last_password_reset:f.z.string().optional()});var fI=f.z.object({user_id:f.z.string(),resource_server_identifier:f.z.string(),permission_name:f.z.string(),organization_id:f.z.string().optional()}).extend({tenant_id:f.z.string(),created_at:f.z.string().optional()});f.z.array(fI);var pI=f.z.object({user_id:f.z.string(),resource_server_identifier:f.z.string(),resource_server_name:f.z.string(),permission_name:f.z.string(),description:f.z.string().nullable().optional(),created_at:f.z.string().optional(),organization_id:f.z.string().optional()});f.z.array(pI);var mI=f.z.object({user_id:f.z.string(),role_id:f.z.string(),organization_id:f.z.string().optional()}).extend({tenant_id:f.z.string(),created_at:f.z.string().optional()});f.z.array(mI);var hI=f.z.object({id:f.z.string().optional().openapi({description:`The unique identifier of the role. If not provided, one will be generated.`}),name:f.z.string().min(1).max(50).openapi({description:`The name of the role. Cannot include '<' or '>'`}),description:f.z.string().max(255).optional().openapi({description:`The description of the role`}),is_system:f.z.boolean().optional(),metadata:f.z.record(f.z.string(),f.z.any()).optional().openapi({description:`Metadata associated with the role. Can be used to control sync behavior in multi-tenancy scenarios.`})}).extend({id:f.z.string().openapi({description:`The unique identifier of the role`}),created_at:f.z.string().optional(),updated_at:f.z.string().optional()});f.z.array(hI);var gI=f.z.object({logo_url:f.z.string().optional().openapi({description:`URL of the organization's logo`}),colors:f.z.object({primary:f.z.string().optional().openapi({description:`Primary color in hex format (e.g., #FF0000)`}),page_background:f.z.string().optional().openapi({description:`Page background color in hex format (e.g., #FFFFFF)`})}).optional()}).optional(),_I=f.z.object({connection_id:f.z.string().openapi({description:`ID of the connection`}),assign_membership_on_login:f.z.boolean().default(!1).openapi({description:`Whether to assign membership to the organization on login`}),show_as_button:f.z.boolean().default(!0).openapi({description:`Whether to show this connection as a button in the login screen`}),is_signup_enabled:f.z.boolean().default(!0).openapi({description:`Whether signup is enabled for this connection`})}),vI=f.z.object({client_credentials:f.z.object({enforce:f.z.boolean().default(!1).openapi({description:`Whether to enforce token quota limits`}),per_day:f.z.number().min(0).default(0).openapi({description:`Maximum tokens per day (0 = unlimited)`}),per_hour:f.z.number().min(0).default(0).openapi({description:`Maximum tokens per hour (0 = unlimited)`})}).optional()}).optional();f.z.object({id:f.z.string().optional(),name:f.z.string().min(1).regex(/^[a-z0-9_-]+$/,{message:`Organization name must be lowercase and can only contain letters, numbers, hyphens, and underscores`}).openapi({description:`The name of the organization. Must be lowercase and can only contain letters, numbers, hyphens, and underscores.`}),display_name:f.z.string().optional().openapi({description:`The display name of the organization`}),branding:gI,metadata:f.z.record(f.z.string(),f.z.any()).default({}).optional().openapi({description:`Custom metadata for the organization`}),enabled_connections:f.z.array(_I).default([]).optional().openapi({description:`List of enabled connections for the organization`}),token_quota:vI}).extend(mM.shape).extend({id:f.z.string(),name:f.z.string().min(1).openapi({description:`The name of the organization`})});var yI=f.z.object({connection_id:f.z.string().openapi({description:`ID of the tenant-level connection to enable for the org.`}),assign_membership_on_login:f.z.boolean().optional().default(!1),show_as_button:f.z.boolean().optional().default(!0),is_signup_enabled:f.z.boolean().optional().default(!0)}).extend({connection:f.z.object({name:f.z.string().optional(),strategy:f.z.string().optional()}).optional(),created_at:f.z.string().optional(),updated_at:f.z.string().optional()});f.z.array(yI),f.z.object({user_id:f.z.string().openapi({description:`ID of the user`}),organization_id:f.z.string().openapi({description:`ID of the organization`})}).extend(mM.shape).extend({id:f.z.string()}),f.z.object({date:f.z.string().openapi({description:`Date these events occurred in ISO 8601 format`,example:`2025-12-19`}),logins:f.z.number().openapi({description:`Number of logins on this date`,example:150}),signups:f.z.number().openapi({description:`Number of signups on this date`,example:25}),leaked_passwords:f.z.number().openapi({description:`Number of breached-password detections on this date (subscription required)`,example:0}),updated_at:f.z.string().openapi({description:`Date and time this stats entry was last updated in ISO 8601 format`,example:`2025-12-19T10:30:00.000Z`}),created_at:f.z.string().openapi({description:`Approximate date and time the first event occurred in ISO 8601 format`,example:`2025-12-19T00:00:00.000Z`})}),f.z.number().openapi({description:`Number of active users in the last 30 days`,example:1234}),f.z.enum([`active-users`,`logins`,`signups`,`refresh-tokens`,`sessions`,`logouts`,`password-changes`,`password-migrations`,`mfa`,`email-verifications`,`codes-sent`]),f.z.enum([`hour`,`day`,`week`,`month`]),f.z.enum([`time`,`connection`,`client_id`,`user_type`,`event`]),f.z.enum([`password`,`social`,`passwordless`,`enterprise`]);var bI=f.z.object({cohort:f.z.string(),sessions:f.z.number(),active:f.z.array(f.z.number())});f.z.object({interval:f.z.literal(`week`),from:f.z.string(),to:f.z.string(),cohorts:f.z.array(bI)});var xI=f.z.object({cohort:f.z.string(),tokens:f.z.number(),active:f.z.array(f.z.number())});f.z.object({interval:f.z.literal(`week`),from:f.z.string(),to:f.z.string(),cohorts:f.z.array(xI)});var SI=f.z.object({name:f.z.string(),type:f.z.string()}),CI=f.z.object({elapsed:f.z.number(),rows_read:f.z.number().optional(),bytes_read:f.z.number().optional()});f.z.object({meta:f.z.array(SI),data:f.z.array(f.z.record(f.z.string(),f.z.any())),rows:f.z.number(),rows_before_limit_at_least:f.z.number().optional(),statistics:CI.optional()});var wI=f.z.enum(`login.login-id.login-password.signup.signup-id.signup-password.reset-password.consent.mfa.mfa-push.mfa-otp.mfa-voice.mfa-phone.mfa-webauthn.mfa-email.mfa-recovery-code.status.device-flow.email-verification.email-otp-challenge.organizations.invitation.common.passkeys.captcha.custom-form.login-passwordless.mfa-login-options`.split(`.`)),TI=f.z.record(f.z.string(),f.z.record(f.z.string(),f.z.string())).openapi({type:`object`,additionalProperties:{type:`object`,additionalProperties:{type:`string`}}});f.z.object({prompt:wI,language:f.z.string(),custom_text:TI});var EI=f.z.object({"form-content-start":f.z.string().optional(),"form-content-end":f.z.string().optional(),"form-footer-start":f.z.string().optional(),"form-footer-end":f.z.string().optional(),"secondary-actions-start":f.z.string().optional(),"secondary-actions-end":f.z.string().optional()}).strict(),DI=f.z.record(f.z.string(),EI);f.z.object({prompt:f.z.string(),partials:DI});var OI=f.z.enum([`phone`,`totp`,`email`,`push`,`webauthn-roaming`,`webauthn-platform`,`passkey`]),kI=f.z.object({user_id:f.z.string(),type:OI,phone_number:f.z.string().optional(),totp_secret:f.z.string().optional(),totp_last_step:f.z.number().int().nonnegative().optional(),credential_id:f.z.string().optional(),public_key:f.z.string().optional(),sign_count:f.z.number().int().nonnegative().optional(),credential_backed_up:f.z.boolean().optional(),transports:f.z.array(f.z.string()).optional(),friendly_name:f.z.string().optional(),confirmed:f.z.boolean().default(!1)});function AI(e,t){e.type===`phone`&&!e.phone_number&&t.addIssue({code:f.z.ZodIssueCode.custom,message:`phone_number is required when type is 'phone'`,path:[`phone_number`]}),e.type===`totp`&&!e.totp_secret&&t.addIssue({code:f.z.ZodIssueCode.custom,message:`totp_secret is required when type is 'totp'`,path:[`totp_secret`]}),[`webauthn-roaming`,`webauthn-platform`,`passkey`].includes(e.type)&&(e.credential_id||t.addIssue({code:f.z.ZodIssueCode.custom,message:`credential_id is required when type is '${e.type}'`,path:[`credential_id`]}),e.public_key||t.addIssue({code:f.z.ZodIssueCode.custom,message:`public_key is required when type is '${e.type}'`,path:[`public_key`]}))}kI.superRefine(AI),kI.extend({id:f.z.string(),created_at:f.z.string(),updated_at:f.z.string()}).superRefine(AI),f.z.object({id:f.z.string().optional(),created_at:f.z.string().datetime({offset:!0}).optional(),updated_at:f.z.string().datetime({offset:!0}).optional()}),f.z.enum([`verify_email`,`verify_email_by_code`,`reset_email`,`reset_email_by_code`,`welcome_email`,`verification_code`,`mfa_oob_code`,`enrollment_email`,`blocked_account`,`stolen_credentials`,`try_provider_configuration_email`,`organization_invitation`]),f.z.enum([`otp_verify`,`otp_enroll`,`blocked_account`,`change_password`,`password_breach`]);function jI(e){let t=``;for(let n of e)t+=String.fromCharCode(n);return btoa(t)}function MI(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}f.z.record(f.z.string(),f.z.record(f.z.string(),QF));var NI=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`,PI=(e=21)=>{let t=``,n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=NI[n[e]&63];return t};async function FI(e){let t=new DecompressionStream(`deflate-raw`),n=new Uint8Array(e),r=new Blob([n]).stream().pipeThrough(t);return new Uint8Array(await new Response(r).arrayBuffer())}async function II(e){let t=MI(e.replace(/ /g,`+`));try{let e=await FI(t);return new TextDecoder().decode(e)}catch(e){return console.warn(`Decompression failed, assuming data is not compressed:`,e),new TextDecoder().decode(t)}}async function LI(e){let t=await II(e),n=new Uj({attributeNamePrefix:`@_`,alwaysCreateTextNode:!0,ignoreAttributes:!1});return ak.parse(n.parse(t))}async function RI(e){let t=e=>e.replace(/&/g,`&amp;`).replace(/"/g,`&quot;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`),n=e.success?`urn:oasis:names:tc:SAML:2.0:status:Success`:`urn:oasis:names:tc:SAML:2.0:status:Responder`,r=e.inResponseTo?` InResponseTo="${t(e.inResponseTo)}"`:``,i=!e.success&&e.statusMessage?`<samlp:StatusMessage>${t(e.statusMessage)}</samlp:StatusMessage>`:``,a=`<samlp:LogoutResponse xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" ID="_${PI()}" Version="2.0" IssueInstant="${new Date().toISOString()}" Destination="${t(e.destination)}"${r}><saml:Issuer>${t(e.issuer)}</saml:Issuer><samlp:Status><samlp:StatusCode Value="${n}"/>${i}</samlp:Status></samlp:LogoutResponse>`,o=new Blob([new TextEncoder().encode(a)]).stream().pipeThrough(new CompressionStream(`deflate-raw`)),s=new Uint8Array(await new Response(o).arrayBuffer()),c=``;for(let e of s)c+=String.fromCharCode(e);return btoa(c)}function zI(e){let t=e.certificates.map(e=>({"@_use":`signing`,KeyInfo:{"@_xmlns":`http://www.w3.org/2000/09/xmldsig#`,X509Data:{X509Certificate:e}}})),n={EntityDescriptor:{"@_entityID":e.entityId,"@_xmlns":`urn:oasis:names:tc:SAML:2.0:metadata`,IDPSSODescriptor:{"@_protocolSupportEnumeration":`urn:oasis:names:tc:SAML:2.0:protocol`,KeyDescriptor:t,SingleLogoutService:[{"@_Binding":`urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect`,"@_Location":e.singleLogoutServiceUrl},{"@_Binding":`urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST`,"@_Location":e.singleLogoutServiceUrl}],NameIDFormat:[`urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress`,`urn:oasis:names:tc:SAML:2.0:nameid-format:persistent`,`urn:oasis:names:tc:SAML:2.0:nameid-format:transient`],SingleSignOnService:[{"@_Binding":`urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect`,"@_Location":e.assertionConsumerServiceUrl},{"@_Binding":`urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST`,"@_Location":e.assertionConsumerServiceUrl}],Attribute:[{"@_Name":`http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress`,"@_NameFormat":`urn:oasis:names:tc:SAML:2.0:attrname-format:uri`,"@_FriendlyName":`E-Mail Address`,"@_xmlns":`urn:oasis:names:tc:SAML:2.0:assertion`},{"@_Name":`http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname`,"@_NameFormat":`urn:oasis:names:tc:SAML:2.0:attrname-format:uri`,"@_FriendlyName":`Given Name`,"@_xmlns":`urn:oasis:names:tc:SAML:2.0:assertion`},{"@_Name":`http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name`,"@_NameFormat":`urn:oasis:names:tc:SAML:2.0:attrname-format:uri`,"@_FriendlyName":`Name`,"@_xmlns":`urn:oasis:names:tc:SAML:2.0:assertion`},{"@_Name":`http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname`,"@_NameFormat":`urn:oasis:names:tc:SAML:2.0:attrname-format:uri`,"@_FriendlyName":`Surname`,"@_xmlns":`urn:oasis:names:tc:SAML:2.0:assertion`},{"@_Name":`http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier`,"@_NameFormat":`urn:oasis:names:tc:SAML:2.0:attrname-format:uri`,"@_FriendlyName":`Name ID`,"@_xmlns":`urn:oasis:names:tc:SAML:2.0:assertion`}]}}};return new pM({ignoreAttributes:!1,suppressEmptyNode:!0,preserveOrder:!1,format:!0,attributeNamePrefix:`@_`}).build(n)}async function BI(e,t){let n=e.notBefore||new Date().toISOString(),r=e.notAfter||new Date(new Date(n).getTime()+600*1e3).toISOString(),i=e.issueInstant||n,a=e.sessionNotOnOrAfter||r,o=e.responseId||`_${PI()}`,s=e.assertionId||`_${PI()}`,c=[{"samlp:Response":[{"saml:Issuer":[{"#text":e.issuer}]},{"samlp:Status":[{"samlp:StatusCode":[],":@":{"@_Value":`urn:oasis:names:tc:SAML:2.0:status:Success`}}]},{"saml:Assertion":[{"saml:Issuer":[{"#text":e.issuer}]},{"saml:Subject":[{"saml:NameID":[{"#text":e.email}],":@":{"@_Format":`urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress`}},{"saml:SubjectConfirmation":[{"saml:SubjectConfirmationData":[],":@":{"@_InResponseTo":e.inResponseTo,"@_NotOnOrAfter":r,"@_Recipient":e.destination}}],":@":{"@_Method":`urn:oasis:names:tc:SAML:2.0:cm:bearer`}}]},{"saml:Conditions":[{"saml:AudienceRestriction":[{"saml:Audience":[{"#text":e.audience}]}]}],":@":{"@_NotBefore":n,"@_NotOnOrAfter":r}},{"saml:AuthnStatement":[{"saml:AuthnContext":[{"saml:AuthnContextClassRef":[{"#text":`urn:oasis:names:tc:SAML:2.0:ac:classes:unspecified`}]}]}],":@":{"@_AuthnInstant":i,"@_SessionIndex":e.sessionIndex,"@_SessionNotOnOrAfter":a}},{"saml:AttributeStatement":[{"saml:Attribute":[{"saml:AttributeValue":[{"#text":e.userId}],":@":{"@_xmlns:xs":`http://www.w3.org/2001/XMLSchema`,"@_xmlns:xsi":`http://www.w3.org/2001/XMLSchema-instance`,"@_xsi:type":`xs:string`}}],":@":{"@_FriendlyName":`persistent`,"@_Name":`id`,"@_NameFormat":`urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified`}},{"saml:Attribute":[{"saml:AttributeValue":[{"#text":e.email}],":@":{"@_xmlns:xs":`http://www.w3.org/2001/XMLSchema`,"@_xmlns:xsi":`http://www.w3.org/2001/XMLSchema-instance`,"@_xsi:type":`xs:string`}}],":@":{"@_Name":`email`,"@_NameFormat":`urn:oasis:names:tc:SAML:2.0:attrname-format:basic`}},{"saml:Attribute":[{"saml:AttributeValue":[{"#text":`manage-account`}],":@":{"@_xmlns:xs":`http://www.w3.org/2001/XMLSchema`,"@_xmlns:xsi":`http://www.w3.org/2001/XMLSchema-instance`,"@_xsi:type":`xs:string`}}],":@":{"@_Name":`Role`,"@_NameFormat":`urn:oasis:names:tc:SAML:2.0:attrname-format:basic`}},{"saml:Attribute":[{"saml:AttributeValue":[{"#text":`default-roles-master`}],":@":{"@_xmlns:xs":`http://www.w3.org/2001/XMLSchema`,"@_xmlns:xsi":`http://www.w3.org/2001/XMLSchema-instance`,"@_xsi:type":`xs:string`}}],":@":{"@_Name":`Role`,"@_NameFormat":`urn:oasis:names:tc:SAML:2.0:attrname-format:basic`}},{"saml:Attribute":[{"saml:AttributeValue":[{"#text":`offline_access`}],":@":{"@_xmlns:xs":`http://www.w3.org/2001/XMLSchema`,"@_xmlns:xsi":`http://www.w3.org/2001/XMLSchema-instance`,"@_xsi:type":`xs:string`}}],":@":{"@_Name":`Role`,"@_NameFormat":`urn:oasis:names:tc:SAML:2.0:attrname-format:basic`}},{"saml:Attribute":[{"saml:AttributeValue":[{"#text":`view-profile`}],":@":{"@_xmlns:xs":`http://www.w3.org/2001/XMLSchema`,"@_xmlns:xsi":`http://www.w3.org/2001/XMLSchema-instance`,"@_xsi:type":`xs:string`}}],":@":{"@_Name":`Role`,"@_NameFormat":`urn:oasis:names:tc:SAML:2.0:attrname-format:basic`}},{"saml:Attribute":[{"saml:AttributeValue":[{"#text":`uma_authorization`}],":@":{"@_xmlns:xs":`http://www.w3.org/2001/XMLSchema`,"@_xmlns:xsi":`http://www.w3.org/2001/XMLSchema-instance`,"@_xsi:type":`xs:string`}}],":@":{"@_Name":`Role`,"@_NameFormat":`urn:oasis:names:tc:SAML:2.0:attrname-format:basic`}},{"saml:Attribute":[{"saml:AttributeValue":[{"#text":`manage-account-links`}],":@":{"@_xmlns:xs":`http://www.w3.org/2001/XMLSchema`,"@_xmlns:xsi":`http://www.w3.org/2001/XMLSchema-instance`,"@_xsi:type":`xs:string`}}],":@":{"@_Name":`Role`,"@_NameFormat":`urn:oasis:names:tc:SAML:2.0:attrname-format:basic`}}]}],":@":{"@_xmlns":`urn:oasis:names:tc:SAML:2.0:assertion`,"@_ID":s,"@_IssueInstant":i,"@_Version":`2.0`}}],":@":{"@_xmlns:samlp":`urn:oasis:names:tc:SAML:2.0:protocol`,"@_xmlns:saml":`urn:oasis:names:tc:SAML:2.0:assertion`,"@_Destination":e.destination,"@_ID":o,"@_InResponseTo":e.inResponseTo,"@_IssueInstant":i,"@_Version":`2.0`}}],l=new pM({ignoreAttributes:!1,suppressEmptyNode:!0,preserveOrder:!0}).build(c);return e.signature&&t&&(l=await t.signSAML(l,e.signature.privateKeyPem,e.signature.cert)),e.encode===!1?l:btoa(l)}var VI=`urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect`,HI=`urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST`,UI={"rsa-sha256":`http://www.w3.org/2001/04/xmldsig-more#rsa-sha256`,"rsa-sha1":`http://www.w3.org/2000/09/xmldsig#rsa-sha1`},WI={"rsa-sha256":`SHA-256`,"rsa-sha1":`SHA-1`};function GI(e){return e.replace(/&/g,`&amp;`).replace(/"/g,`&quot;`).replace(/'/g,`&apos;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}async function KI(e){let t=new Blob([new TextEncoder().encode(e)]).stream().pipeThrough(new CompressionStream(`deflate-raw`));return jI(new Uint8Array(await new Response(t).arrayBuffer()))}function qI(e){let t=e.id||`_${PI()}`,n=e.issueInstant||new Date().toISOString(),r=e.nameIdFormat||`urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified`,i=e.forceAuthn?` ForceAuthn="true"`:``;return{id:t,xml:`<samlp:AuthnRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" ID="${GI(t)}" Version="2.0" IssueInstant="${GI(n)}" Destination="${GI(e.destination)}" AssertionConsumerServiceURL="${GI(e.assertionConsumerServiceUrl)}" ProtocolBinding="${HI}"${i}><saml:Issuer>${GI(e.issuer)}</saml:Issuer><samlp:NameIDPolicy Format="${GI(r)}" AllowCreate="true"/></samlp:AuthnRequest>`}}function JI(e,t){let n=e.replace(RegExp(`-----(BEGIN|END) ${t}-----`,`g`),``).replace(/\s/g,``);return Uint8Array.from(MI(n))}async function YI(e){let t=e.parameter||`SAMLRequest`,n=await KI(e.xml),r=`${t}=${encodeURIComponent(n)}`;if(e.relayState&&(r+=`&RelayState=${encodeURIComponent(e.relayState)}`),e.signingKey){let t=e.signingKey.algorithm||`rsa-sha256`;r+=`&SigAlg=${encodeURIComponent(UI[t])}`;let n=await crypto.subtle.importKey(`pkcs8`,JI(e.signingKey.privateKeyPem,`PRIVATE KEY`),{name:`RSASSA-PKCS1-v1_5`,hash:WI[t]},!1,[`sign`]),i=await crypto.subtle.sign(`RSASSA-PKCS1-v1_5`,n,new TextEncoder().encode(r));r+=`&Signature=${encodeURIComponent(jI(new Uint8Array(i)))}`}let i=e.endpoint.indexOf(`#`),a=i===-1?e.endpoint:e.endpoint.slice(0,i),o=i===-1?``:e.endpoint.slice(i);return`${a}${a.includes(`?`)?`&`:`?`}${r}${o}`}function XI(e){let t=e.replace(/\\[rn]/g,`
310
+ `):(this.indentate=function(){return``},this.tagEndChar=`>`,this.newLine=``)}function cM(e,t){let n=e[`?xml`];if(n&&typeof n==`object`){if(t.attributesGroupName&&n[t.attributesGroupName]){let e=n[t.attributesGroupName][t.attributeNamePrefix+`version`];if(e)return e}let e=n[t.attributeNamePrefix+`version`];if(e)return e}return`1.0`}function lM(e,t,n,r,i){return!n.sanitizeName||i(e)?e:n.sanitizeName(e,{isAttribute:t,matcher:r.readOnly()})}sM.prototype.build=function(e){if(this.options.preserveOrder)return Xj(e,this.options);{Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e});let t=new $A,n=CA(`qName`,{xmlVersion:cM(e,this.options)});return this.j2x(e,0,t,n).val}},sM.prototype.j2x=function(e,t,n,r){let i=``,a=``;if(this.options.maxNestedTags&&n.getDepth()>=this.options.maxNestedTags)throw Error(`Maximum nested tags exceeded`);let o=this.options.jPath?n.toString():n,s=this.checkStopNode(n);for(let c in e){if(!Object.prototype.hasOwnProperty.call(e,c))continue;let l=c===this.options.textNodeName||c===this.options.cdataPropName||c===this.options.commentPropName||this.options.attributesGroupName&&c===this.options.attributesGroupName||this.isAttribute(c)||c[0]===`?`?c:lM(c,!1,this.options,n,r);if(e[c]===void 0)this.isAttribute(c)&&(a+=``);else if(e[c]===null)this.isAttribute(c)||l===this.options.cdataPropName||l===this.options.commentPropName?a+=``:l[0]===`?`?a+=this.indentate(t)+`<`+l+`?`+this.tagEndChar:a+=this.indentate(t)+`<`+l+`/`+this.tagEndChar;else if(e[c]instanceof Date)a+=this.buildTextValNode(e[c],l,``,t,n);else if(typeof e[c]!=`object`){let u=this.isAttribute(c);if(u&&!this.ignoreAttributesFn(u,o)){let t=lM(u,!0,this.options,n,r);i+=this.buildAttrPairStr(t,``+e[c],s)}else if(!u)if(c===this.options.textNodeName){let t=this.options.tagValueProcessor(c,``+e[c]);a+=this.replaceEntitiesValue(t)}else{n.push(l);let r=this.checkStopNode(n);if(n.pop(),r){let n=``+e[c];n===``?a+=this.indentate(t)+`<`+l+this.closeTag(l)+this.tagEndChar:a+=this.indentate(t)+`<`+l+`>`+n+`</`+l+this.tagEndChar}else a+=this.buildTextValNode(e[c],l,``,t,n)}}else if(Array.isArray(e[c])){let i=e[c].length,o=``,s=``;for(let u=0;u<i;u++){let i=e[c][u];if(i!==void 0)if(i===null)l[0]===`?`?a+=this.indentate(t)+`<`+l+`?`+this.tagEndChar:a+=this.indentate(t)+`<`+l+`/`+this.tagEndChar;else if(typeof i==`object`)if(this.options.oneListGroup){n.push(l);let e=this.j2x(i,t+1,n,r);n.pop(),o+=e.val,this.options.attributesGroupName&&i.hasOwnProperty(this.options.attributesGroupName)&&(s+=e.attrStr)}else o+=this.processTextOrObjNode(i,l,t,n,r);else if(this.options.oneListGroup){let e=this.options.tagValueProcessor(l,i);e=this.replaceEntitiesValue(e),o+=e}else{n.push(l);let e=this.checkStopNode(n);if(n.pop(),e){let e=``+i;e===``?o+=this.indentate(t)+`<`+l+this.closeTag(l)+this.tagEndChar:o+=this.indentate(t)+`<`+l+`>`+e+`</`+l+this.tagEndChar}else o+=this.buildTextValNode(i,l,``,t,n)}}this.options.oneListGroup&&(o=this.buildObjectNode(o,l,s,t)),a+=o}else if(this.options.attributesGroupName&&c===this.options.attributesGroupName){let t=Object.keys(e[c]),a=t.length;for(let o=0;o<a;o++){let a=lM(t[o],!0,this.options,n,r);i+=this.buildAttrPairStr(a,``+e[c][t[o]],s)}}else a+=this.processTextOrObjNode(e[c],l,t,n,r)}return{attrStr:i,val:a}},sM.prototype.buildAttrPairStr=function(e,t,n){return n||(t=this.options.attributeValueProcessor(e,``+t),t=this.replaceEntitiesValue(t)),this.options.suppressBooleanAttributes&&t===`true`?` `+e:` `+e+`="`+Kj(t)+`"`};function uM(e,t,n,r,i){let a=this.extractAttributes(e);if(r.push(t,a),this.checkStopNode(r)){let i=this.buildRawContent(e),a=this.buildAttributesForStopNode(e);return r.pop(),this.buildObjectNode(i,t,a,n)}let o=this.j2x(e,n+1,r,i);return r.pop(),t[0]===`?`?this.buildTextValNode(``,t,o.attrStr,n,r):e[this.options.textNodeName]!==void 0&&Object.keys(e).length===1?this.buildTextValNode(e[this.options.textNodeName],t,o.attrStr,n,r):this.buildObjectNode(o.val,t,o.attrStr,n)}sM.prototype.extractAttributes=function(e){if(!e||typeof e!=`object`)return null;let t={},n=!1;if(this.options.attributesGroupName&&e[this.options.attributesGroupName]){let r=e[this.options.attributesGroupName];for(let e in r){if(!Object.prototype.hasOwnProperty.call(r,e))continue;let i=e.startsWith(this.options.attributeNamePrefix)?e.substring(this.options.attributeNamePrefix.length):e;t[i]=Kj(r[e]),n=!0}}else for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;let i=this.isAttribute(r);i&&(t[i]=Kj(e[r]),n=!0)}return n?t:null},sM.prototype.buildRawContent=function(e){if(typeof e==`string`)return e;if(typeof e!=`object`||!e)return String(e);if(e[this.options.textNodeName]!==void 0)return e[this.options.textNodeName];let t=``;for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n)||this.isAttribute(n)||this.options.attributesGroupName&&n===this.options.attributesGroupName)continue;let r=e[n];if(n===this.options.textNodeName)t+=r;else if(Array.isArray(r)){for(let e of r)if(typeof e==`string`||typeof e==`number`)t+=`<${n}>${e}</${n}>`;else if(typeof e==`object`&&e){let r=this.buildRawContent(e),i=this.buildAttributesForStopNode(e);r===``?t+=`<${n}${i}/>`:t+=`<${n}${i}>${r}</${n}>`}}else if(typeof r==`object`&&r){let e=this.buildRawContent(r),i=this.buildAttributesForStopNode(r);e===``?t+=`<${n}${i}/>`:t+=`<${n}${i}>${e}</${n}>`}else t+=`<${n}>${r}</${n}>`}return t},sM.prototype.buildAttributesForStopNode=function(e){if(!e||typeof e!=`object`)return``;let t=``;if(this.options.attributesGroupName&&e[this.options.attributesGroupName]){let n=e[this.options.attributesGroupName];for(let e in n){if(!Object.prototype.hasOwnProperty.call(n,e))continue;let r=e.startsWith(this.options.attributeNamePrefix)?e.substring(this.options.attributeNamePrefix.length):e,i=n[e];i===!0&&this.options.suppressBooleanAttributes?t+=` `+r:t+=` `+r+`="`+Kj(i)+`"`}}else for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let r=this.isAttribute(n);if(r){let i=e[n];i===!0&&this.options.suppressBooleanAttributes?t+=` `+r:t+=` `+r+`="`+Kj(i)+`"`}}return t},sM.prototype.buildObjectNode=function(e,t,n,r){if(e===``)return t[0]===`?`?this.indentate(r)+`<`+t+n+`?`+this.tagEndChar:this.indentate(r)+`<`+t+n+this.closeTag(t)+this.tagEndChar;if(t[0]===`?`)return this.indentate(r)+`<`+t+n+`?`+this.tagEndChar;{let i=`</`+t+this.tagEndChar,a=``;return t[0]===`?`&&(a=`?`,i=``),(n||n===``)&&e.indexOf(`<`)===-1?this.indentate(r)+`<`+t+n+a+`>`+e+i:this.options.commentPropName!==!1&&t===this.options.commentPropName&&a.length===0?this.indentate(r)+`<!--${Wj(e)}-->`+this.newLine:this.indentate(r)+`<`+t+n+a+this.tagEndChar+e+this.indentate(r)+i}},sM.prototype.closeTag=function(e){let t=``;return this.options.unpairedTags.indexOf(e)===-1?t=this.options.suppressEmptyNode?`/`:`></${e}`:this.options.suppressUnpairedNode||(t=`/`),t},sM.prototype.checkStopNode=function(e){if(!this.stopNodeExpressions||this.stopNodeExpressions.length===0)return!1;for(let t=0;t<this.stopNodeExpressions.length;t++)if(e.matches(this.stopNodeExpressions[t]))return!0;return!1},sM.prototype.buildTextValNode=function(e,t,n,r,i){if(this.options.cdataPropName!==!1&&t===this.options.cdataPropName){let t=Gj(e);return this.indentate(r)+`<![CDATA[${t}]]>`+this.newLine}else if(this.options.commentPropName!==!1&&t===this.options.commentPropName){let t=Wj(e);return this.indentate(r)+`<!--${t}-->`+this.newLine}else if(t[0]===`?`)return this.indentate(r)+`<`+t+n+`?`+this.tagEndChar;else{let i=this.options.tagValueProcessor(t,e);return i=this.replaceEntitiesValue(i),i===``?this.indentate(r)+`<`+t+n+this.closeTag(t)+this.tagEndChar:this.indentate(r)+`<`+t+n+`>`+i+`</`+t+this.tagEndChar}},sM.prototype.replaceEntitiesValue=function(e){if(e&&e.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){let n=this.options.entities[t];e=e.replace(n.regex,n.val)}return e};function dM(e){return this.options.indentBy.repeat(e)}function fM(e){return e.startsWith(this.options.attributeNamePrefix)&&e!==this.options.textNodeName?e.substr(this.attrPrefixLen):!1}var pM=sM,mM=f.z.object({created_at:f.z.string(),updated_at:f.z.string()}),hM=f.z.enum([`local`,`shared`,`platform`]),gM=f.z.enum([`none`,`secrets`,`fields`]),_M={scope:hM.optional(),override:gM.optional(),enforce:f.z.boolean().optional()},vM=f.z.object({id:f.z.string(),version:f.z.string().optional()}),yM=f.z.object({name:f.z.string(),version:f.z.string()}),bM=f.z.object({name:f.z.string(),value:f.z.string().optional()}),xM=f.z.object({name:f.z.string().max(255),code:f.z.string().max(1e5),supported_triggers:f.z.array(vM).optional(),runtime:f.z.string().max(50).optional(),dependencies:f.z.array(yM).optional(),secrets:f.z.array(bM).optional(),is_system:f.z.boolean().optional(),..._M,inherit:f.z.boolean().optional()});xM.partial().extend({status:f.z.enum([`draft`,`built`]).optional(),deployed_at:f.z.string().optional()});var SM=xM.extend({id:f.z.string(),tenant_id:f.z.string(),status:f.z.enum([`draft`,`built`]).default(`built`),deployed_at:f.z.string().optional(),secrets:f.z.array(f.z.object({name:f.z.string(),value:f.z.string().optional()})).optional()}).extend(mM.shape),CM=f.z.object({name:f.z.string()});SM.extend({secrets:f.z.array(CM).optional()});var wM=f.z.string(),TM=f.z.enum([`unspecified`,`pending`,`final`,`partial`,`canceled`,`suspended`]),EM=f.z.object({id:f.z.string(),msg:f.z.string(),url:f.z.string().optional()}),DM=f.z.object({action_name:f.z.string(),error:EM.nullable(),started_at:f.z.string(),ended_at:f.z.string()}),OM=f.z.object({level:f.z.enum([`log`,`info`,`warn`,`error`,`debug`]),message:f.z.string()}),kM=f.z.array(f.z.object({action_name:f.z.string(),lines:f.z.array(OM)}));f.z.object({id:f.z.string(),tenant_id:f.z.string(),trigger_id:wM,status:TM,results:f.z.array(DM),logs:kM.optional(),created_at:f.z.string(),updated_at:f.z.string()}).omit({tenant_id:!0,created_at:!0,updated_at:!0}),f.z.object({action_id:f.z.string(),code:f.z.string().max(1e5),runtime:f.z.string().max(50).optional(),dependencies:f.z.array(yM).optional(),secrets:f.z.array(bM).optional(),supported_triggers:f.z.array(vM).optional(),deployed:f.z.boolean().default(!0)}).extend({id:f.z.string(),tenant_id:f.z.string(),number:f.z.number().int()}).extend(mM.shape);var AM=f.z.enum([`user_action`,`admin_action`,`system`,`api`]),jM=f.z.object({type:f.z.enum([`user`,`admin`,`system`,`api_key`,`client_credentials`]),id:f.z.string().optional(),email:f.z.string().optional(),org_id:f.z.string().optional(),org_name:f.z.string().optional(),scopes:f.z.array(f.z.string()).optional(),client_id:f.z.string().optional()}),MM=f.z.object({type:f.z.string(),id:f.z.string(),before:f.z.record(f.z.string(),f.z.unknown()).optional(),after:f.z.record(f.z.string(),f.z.unknown()).optional(),diff:f.z.record(f.z.string(),f.z.object({old:f.z.unknown(),new:f.z.unknown()})).optional()}),NM=f.z.object({user:f.z.object({user_id:f.z.string(),name:f.z.string().optional(),email:f.z.string().optional()}).optional(),strategy:f.z.string(),credentials:f.z.object({jti:f.z.string().optional(),scopes:f.z.array(f.z.string()).optional()}).optional()}),PM=f.z.object({method:f.z.string(),path:f.z.string(),query:f.z.record(f.z.string(),f.z.string()).optional(),body:f.z.unknown().optional(),ip:f.z.string(),user_agent:f.z.string().optional(),correlation_id:f.z.string().optional(),redirect_uri:f.z.string().optional(),authorization_url:f.z.string().optional(),auth:NM.optional()}),FM=f.z.object({status_code:f.z.number(),body:f.z.unknown().optional()}),IM=f.z.object({country_code:f.z.string(),city_name:f.z.string(),latitude:f.z.string(),longitude:f.z.string(),time_zone:f.z.string(),continent_code:f.z.string()}),LM=f.z.object({name:f.z.string(),version:f.z.string(),env:f.z.record(f.z.string(),f.z.string()).optional()});f.z.object({tenant_id:f.z.string(),event_type:f.z.string(),log_type:f.z.string(),description:f.z.string().optional(),category:AM,actor:jM,target:MM,request:PM,response:FM.optional(),connection:f.z.string().optional(),connection_id:f.z.string().optional(),client_name:f.z.string().optional(),strategy:f.z.string().optional(),strategy_type:f.z.string().optional(),audience:f.z.string().optional(),scope:f.z.string().optional(),location:IM.optional(),auth0_client:LM.optional(),hostname:f.z.string(),is_mobile:f.z.boolean().optional(),execution_id:f.z.string().optional(),details:f.z.record(f.z.string(),f.z.unknown()).optional(),login_session_id:f.z.string().optional(),timestamp:f.z.string()}).extend({id:f.z.string()}),f.z.enum([`AUTH0`,`EMAIL`,`REDIRECT`]),f.z.enum([`CREATE_USER`,`GET_USER`,`UPDATE_USER`,`SEND_REQUEST`,`SEND_EMAIL`]),f.z.enum([`VERIFY_EMAIL`]);var RM=f.z.object({require_mx_record:f.z.boolean().optional(),block_aliases:f.z.boolean().optional(),block_free_emails:f.z.boolean().optional(),block_disposable_emails:f.z.boolean().optional(),blocklist:f.z.array(f.z.string()).optional(),allowlist:f.z.array(f.z.string()).optional()}),zM=f.z.object({id:f.z.string(),alias:f.z.string().max(100).optional(),type:f.z.literal(`AUTH0`),action:f.z.literal(`UPDATE_USER`),allow_failure:f.z.boolean().optional(),mask_output:f.z.boolean().optional(),params:f.z.object({connection_id:f.z.string().optional(),user_id:f.z.string(),changes:f.z.record(f.z.string(),f.z.any())})}),BM=f.z.object({id:f.z.string(),alias:f.z.string().max(100).optional(),type:f.z.literal(`EMAIL`),action:f.z.literal(`VERIFY_EMAIL`),allow_failure:f.z.boolean().optional(),mask_output:f.z.boolean().optional(),params:f.z.object({email:f.z.string(),rules:RM.optional()})}),VM=f.z.enum([`change-email`,`account`,`custom`]),HM=f.z.object({id:f.z.string(),alias:f.z.string().max(100).optional(),type:f.z.literal(`REDIRECT`),action:f.z.literal(`REDIRECT_USER`),allow_failure:f.z.boolean().optional(),mask_output:f.z.boolean().optional(),params:f.z.object({target:VM.openapi({description:`The predefined target to redirect to, or 'custom' for a custom URL`}),custom_url:f.z.string().optional().openapi({description:`Custom URL to redirect to when target is 'custom'`})})}),UM=f.z.union([zM,BM,HM]);f.z.object({name:f.z.string().min(1).max(150).openapi({description:`The name of the flow`}),actions:f.z.array(UM).optional().default([]).openapi({description:`The list of actions to execute in sequence`})}).extend(mM.shape).extend({id:f.z.string().openapi({description:`Unique identifier for the flow`,example:`af_12tMpdJ3iek7svMyZkSh5M`})}),f.z.object({page:f.z.string().min(0).optional().default(`0`).transform(e=>parseInt(e,10)).openapi({description:`The page number where 0 is the first page`}),per_page:f.z.string().min(1).optional().default(`50`).transform(e=>parseInt(e,10)).openapi({description:`The number of items per page. Defaults to 50.`}),include_totals:f.z.string().optional().default(`false`).transform(e=>e===`true`).openapi({description:`If the total number of items should be included in the response`}),sort:f.z.string().regex(/^.+:(-1|1)$/).optional().openapi({description:`A property that should have the format 'string:-1' or 'string:1'`}),q:f.z.string().optional().openapi({description:`A lucene query string used to filter the results`})}),f.z.object({start:f.z.number(),limit:f.z.number(),length:f.z.number(),total:f.z.number().optional(),next:f.z.string().optional()});var WM=f.z.object({email:f.z.string().optional(),email_verified:f.z.boolean().optional(),name:f.z.string().optional(),username:f.z.string().optional(),given_name:f.z.string().optional(),phone_number:f.z.string().optional(),phone_verified:f.z.boolean().optional(),family_name:f.z.string().optional()}).catchall(f.z.any()),GM=f.z.object({connection:f.z.string(),user_id:f.z.string(),provider:f.z.string(),isSocial:f.z.boolean(),email:f.z.string().optional(),email_verified:f.z.boolean().optional(),phone_number:f.z.string().optional(),phone_verified:f.z.boolean().optional(),username:f.z.string().optional(),access_token:f.z.string().optional(),access_token_secret:f.z.string().optional(),refresh_token:f.z.string().optional(),profileData:WM.optional()}),KM=f.z.object({formatted:f.z.string().optional(),street_address:f.z.string().optional(),locality:f.z.string().optional(),region:f.z.string().optional(),postal_code:f.z.string().optional(),country:f.z.string().optional()}).optional(),qM=f.z.object({email:f.z.string().transform(e=>e.toLowerCase()).optional(),username:f.z.string().refine(e=>!e.includes(`@`),{message:`Usernames must not contain "@". Use the email field for email addresses.`}).optional(),phone_number:f.z.string().optional(),phone_verified:f.z.boolean().optional(),given_name:f.z.string().optional(),family_name:f.z.string().optional(),nickname:f.z.string().optional(),name:f.z.string().optional(),picture:f.z.string().optional(),locale:f.z.string().optional(),linked_to:f.z.string().optional(),profileData:f.z.string().optional(),user_id:f.z.string().optional(),app_metadata:f.z.any().default({}).optional(),user_metadata:f.z.any().default({}).optional(),middle_name:f.z.string().optional(),preferred_username:f.z.string().optional(),profile:f.z.string().optional(),website:f.z.string().optional(),gender:f.z.string().optional(),birthdate:f.z.string().optional(),zoneinfo:f.z.string().optional(),address:KM});qM.extend({email_verified:f.z.boolean().default(!1),verify_email:f.z.boolean().optional(),last_ip:f.z.string().optional(),last_login:f.z.string().optional(),user_id:f.z.string().optional(),provider:f.z.string().optional(),connection:f.z.string(),is_social:f.z.boolean().optional(),blocked:f.z.boolean().optional(),registration_completed_at:f.z.string().optional(),password:f.z.object({hash:f.z.string(),algorithm:f.z.string()}).optional()}).omit({password:!0}).extend(mM.shape).extend({user_id:f.z.string(),provider:f.z.string(),is_social:f.z.boolean(),email:f.z.string().optional(),login_count:f.z.number().default(0),identities:f.z.array(GM).optional()}).omit({registration_completed_at:!0}),qM.extend({login_count:f.z.number(),multifactor:f.z.array(f.z.string()).optional(),last_ip:f.z.string().optional(),last_login:f.z.string().optional(),user_id:f.z.string()}).catchall(f.z.any());function JM(){return f.z.string().trim()}var YM=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`,XM=(e=21)=>{let t=``,n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=YM[n[e]&63];return t},ZM=f.z.enum([`cookie`,`query`]),QM=f.z.enum([`ip`,`asn`,`none`]),$M=f.z.object({can_create_session_transfer_token:f.z.boolean().optional().openapi({default:!1,description:`Whether this client may exchange a refresh token for a session_transfer_token.`}),enforce_cascade_revocation:f.z.boolean().optional().openapi({default:!0,description:`Whether revoking the refresh token a session_transfer_token was minted from also ends the sessions (and their refresh tokens) created with that token.`}),allowed_authentication_methods:f.z.array(ZM).optional().openapi({default:[],description:"How this client accepts a session_transfer_token at /authorize: as the `session_transfer_token` query parameter (`query`) and/or the `auth0_session_transfer_token` cookie (`cookie`). Empty means the client does not accept session transfer."}),enforce_device_binding:QM.optional().openapi({default:`ip`,description:"Whether the browser redeeming a session_transfer_token must come from the same IP address (`ip`) or autonomous system (`asn`) as the request that minted it. `none` disables the check."}),allow_refresh_token:f.z.boolean().optional().openapi({default:!1,description:`Whether a login established with a session_transfer_token may be issued a refresh token.`}),enforce_online_refresh_tokens:f.z.boolean().optional().openapi({default:!0,description:`Whether refresh tokens issued on a transferred session are bound to that session's lifetime.`}),allow_onward_transfer:f.z.boolean().optional().openapi({default:!1,description:`AuthHero extension. Whether this client may mint a session_transfer_token from a login that was itself established with one (A → B → C). The onward token stays tied to the original refresh token.`}),trust_forwarded_ip:f.z.boolean().optional().openapi({default:!1,description:"AuthHero extension. Whether an authenticated confidential client may pass the end user's IP address in the `auth0-forwarded-for` header when minting, so device binding compares against the browser rather than the client's backend. Ignored for requests without client authentication."})}).passthrough(),eN=f.z.object({client_id:f.z.string().describe(`The client that minted the session_transfer_token`),family_id:f.z.string().describe(`Rotation family of the refresh token the session_transfer_token was minted from. The family id is stable across rotation, the row id is not.`),cascade_revocation:f.z.boolean().describe(`Whether this session ends when the parent refresh token family is no longer active`)}),tN=f.z.object({client_id:f.z.string().optional().openapi({description:`ID of this client. Generated server-side if omitted (Auth0 behavior).`}),name:f.z.string().min(1).openapi({description:`Name of this client (min length: 1 character, does not allow < or >).`}),description:f.z.string().max(140).optional().openapi({description:`Free text description of this client (max length: 140 characters).`}),global:f.z.boolean().default(!1).openapi({description:`Whether this is your global 'All Applications' client representing legacy tenant settings (true) or a regular client (false).`}),client_secret:JM().default(()=>XM()).optional().openapi({description:`Client secret (which you must not make public).`}),app_type:f.z.enum([`native`,`spa`,`regular_web`,`non_interactive`,`resource_server`,`express_configuration`,`rms`,`box`,`cloudbees`,`concur`,`dropbox`,`mscrm`,`echosign`,`egnyte`,`newrelic`,`office365`,`salesforce`,`sentry`,`sharepoint`,`slack`,`springcm`,`zendesk`,`zoom`,`sso_integration`,`oag`]).default(`regular_web`).optional().openapi({description:`The type of application this client represents`}),logo_uri:f.z.string().url().optional().openapi({description:`URL of the logo to display for this client. Recommended size is 150x150 pixels.`}),is_first_party:f.z.boolean().default(!0).openapi({description:`Whether this client is a first party client (true) or not (false). First-party clients skip the consent screen; third-party clients require explicit user consent for non-basic scopes.`}),oidc_conformant:f.z.boolean().default(!0).openapi({description:`Whether this client conforms to strict OIDC specifications (true) or uses legacy features (false).`}),auth0_conformant:f.z.boolean().default(!0).openapi({description:`Whether this client follows Auth0-compatible behavior (true) or strict OIDC behavior (false). When true, profile/email claims are included in the ID token when scopes are requested. When false, these claims are only available from the userinfo endpoint (strict OIDC 5.4 compliance).`}),callbacks:f.z.array(f.z.string()).default([]).optional().openapi({description:`Comma-separated list of URLs whitelisted for Auth0 to use as a callback to the client after authentication.`}),allowed_origins:f.z.array(f.z.string()).default([]).optional().openapi({description:`Comma-separated list of URLs allowed to make requests from JavaScript to Auth0 API (typically used with CORS). By default, all your callback URLs will be allowed. This field allows you to enter other origins if necessary. You can also use wildcards at the subdomain level (e.g., https://*.contoso.com). Query strings and hash information are not taken into account when validating these URLs.`}),web_origins:f.z.array(f.z.string()).default([]).optional().openapi({description:`Comma-separated list of allowed origins for use with Cross-Origin Authentication, Device Flow, and web message response mode.`}),client_aliases:f.z.array(f.z.string()).default([]).optional().openapi({description:`List of audiences/realms for SAML protocol. Used by the wsfed addon.`}),allowed_clients:f.z.array(f.z.string()).default([]).optional().openapi({description:`List of allow clients and API ids that are allowed to make delegation requests. Empty means all all your clients are allowed.`}),connections:f.z.array(f.z.string()).default([]).optional().openapi({description:`List of connection IDs enabled for this client. The order determines the display order on the login page.`}),allowed_logout_urls:f.z.array(f.z.string()).default([]).optional().openapi({description:`Comma-separated list of URLs that are valid to redirect to after logout from Auth0. Wildcards are allowed for subdomains.`}),session_transfer:$M.optional().openapi({description:`Session transfer (Auth0 Native to Web SSO) configuration: lets this client mint a session_transfer_token from a refresh token and/or accept one at /authorize.`}),oidc_logout:f.z.object({backchannel_logout_urls:f.z.array(f.z.string()).optional().openapi({description:`URLs that receive a signed OIDC Back-Channel Logout 1.0 logout token when a session this client participated in ends.`}),backchannel_logout_initiators:f.z.object({mode:f.z.enum([`all`,`custom`]).optional().openapi({description:`Whether all session-end events initiate a backchannel logout (all) or only the selected_initiators (custom).`}),selected_initiators:f.z.array(f.z.string()).optional().openapi({description:`Logout initiators that trigger a backchannel logout when mode is custom (e.g. rp-logout, idp-logout, password-changed).`})}).passthrough().optional().openapi({description:`Controls which session-end events initiate backchannel logout notifications. Stored for Auth0 compatibility; not yet enforced — all initiators currently notify.`})}).passthrough().default({}).optional().openapi({description:`Configuration for OIDC backchannel logout`}),grant_types:f.z.array(f.z.string()).default([]).optional().openapi({description:`List of grant types supported for this application. Can include authorization_code, implicit, refresh_token, client_credentials, password, http://auth0.com/oauth/grant-type/password-realm, http://auth0.com/oauth/grant-type/mfa-oob, http://auth0.com/oauth/grant-type/mfa-otp, http://auth0.com/oauth/grant-type/mfa-recovery-code, urn:openid:params:grant-type:ciba, and urn:ietf:params:oauth:grant-type:device_code.`}),jwt_configuration:f.z.record(f.z.string(),f.z.any()).default({}).optional().openapi({description:`Configuration related to JWTs for the client.`}),signing_keys:f.z.array(f.z.record(f.z.string(),f.z.any())).default([]).optional().openapi({description:`Signing certificates associated with this client.`}),encryption_key:f.z.record(f.z.string(),f.z.any()).default({}).optional().openapi({description:`Encryption used for WsFed responses with this client.`}),sso:f.z.boolean().default(!1).openapi({description:`Applies only to SSO clients and determines whether Auth0 will handle Single Sign On (true) or whether the Identity Provider will (false).`}),sso_disabled:f.z.boolean().default(!1).openapi({description:`Whether Single Sign On is disabled for this client. When true, existing SSO sessions will not be reused and users must authenticate every time.`}),cross_origin_authentication:f.z.boolean().default(!1).openapi({description:`Whether this client can be used to make cross-origin authentication requests (true) or it is not allowed to make such requests (false).`}),cross_origin_loc:f.z.string().url().optional().openapi({description:`URL of the location in your site where the cross origin verification takes place for the cross-origin auth flow when performing Auth in your own domain instead of Auth0 hosted login page.`}),custom_login_page_on:f.z.boolean().default(!1).openapi({description:`Whether a custom login page is to be used (true) or the default provided login page (false).`}),custom_login_page:f.z.string().optional().openapi({description:`The content (HTML, CSS, JS) of the custom login page.`}),custom_login_page_preview:f.z.string().optional().openapi({description:`The content (HTML, CSS, JS) of the custom login page. (Used on Previews)`}),form_template:f.z.string().optional().openapi({description:`HTML form template to be used for WS-Federation.`}),addons:f.z.record(f.z.string(),f.z.any()).default({}).optional().openapi({description:`Addons enabled for this client and their associated configurations.`}),token_endpoint_auth_method:f.z.enum([`none`,`client_secret_post`,`client_secret_basic`,`client_secret_jwt`,`private_key_jwt`]).default(`client_secret_basic`).optional().openapi({description:"Defines the requested authentication method for the token endpoint. `none` (public client), `client_secret_post` / `client_secret_basic` (HTTP POST / Basic), `client_secret_jwt` (RFC 7523 HMAC assertion using client_secret), or `private_key_jwt` (RFC 7523 asymmetric assertion verified against the client's `jwks` / `jwks_uri`)."}),client_metadata:f.z.record(f.z.string(),f.z.string().max(255)).default({}).optional().openapi({description:`Metadata associated with the client, in the form of an object with string values (max 255 chars). Maximum of 10 metadata properties allowed. Field names (max 255 chars) are alphanumeric and may only include the following special characters: :,-+=_*?"/()<>@ [Tab][Space]`}),hide_sign_up_disabled_error:f.z.boolean().default(!1).optional().openapi({description:"Enumeration-safe variant of the connection-level `disable_signup` flag. When a signup is blocked by the password connection and this is true, the identifier screen does not reveal that an email is unknown — it advances to the OTP/password challenge as if the account existed and fails at credential check. Mitigates email enumeration at the cost of UX: users without an account see a generic credential failure instead of an explicit signup-disabled message."}),mobile:f.z.record(f.z.string(),f.z.any()).default({}).optional().openapi({description:`Additional configuration for native mobile apps.`}),initiate_login_uri:f.z.string().url().optional().openapi({description:`Initiate login uri, must be https`}),native_social_login:f.z.record(f.z.string(),f.z.any()).default({}).optional(),refresh_token:f.z.object({rotation_type:f.z.enum([`rotating`,`non-rotating`]).optional().openapi({description:`Whether refresh tokens for this client are rotated on every exchange (Auth0 'rotating' behavior) or kept stable (legacy non-rotating). Defaults to 'non-rotating' when unset.`}),leeway:f.z.number().int().min(0).max(600).optional().openapi({description:`Seconds after a parent token's first rotation during which presenting it again still mints a fresh sibling child instead of triggering reuse-detection. Defaults to 30s when unset.`}),expiration_type:f.z.enum([`expiring`,`non-expiring`]).optional().openapi({description:`Whether refresh tokens for this client expire at all. 'non-expiring' overrides both the absolute and the idle lifetime.`}),token_lifetime:f.z.number().int().min(0).optional().openapi({description:"Refresh-token absolute lifetime in seconds. Falls back to the tenant's `session_lifetime` when unset."}),infinite_token_lifetime:f.z.boolean().optional().openapi({description:"When true, refresh tokens have no absolute expiry (overrides `token_lifetime`)."}),idle_token_lifetime:f.z.number().int().min(0).optional().openapi({description:"Refresh-token idle (sliding) lifetime in seconds, refreshed on every exchange. Falls back to the tenant's `idle_session_lifetime` when unset."}),infinite_idle_token_lifetime:f.z.boolean().optional().openapi({description:"When true, refresh tokens have no idle expiry (overrides `idle_token_lifetime`)."})}).default({}).optional().openapi({description:`Refresh token configuration`}),default_organization:f.z.record(f.z.string(),f.z.any()).default({}).optional().openapi({description:`Defines the default Organization ID and flows`}),organization_usage:f.z.enum([`deny`,`allow`,`require`]).default(`deny`).optional().openapi({description:`Defines how to proceed during an authentication transaction with regards an organization. Can be deny (default), allow or require.`}),organization_require_behavior:f.z.enum([`no_prompt`,`pre_login_prompt`,`post_login_prompt`]).default(`no_prompt`).optional().openapi({description:`Defines how to proceed during an authentication transaction when client.organization_usage: 'require'. Can be no_prompt (default), pre_login_prompt or post_login_prompt. post_login_prompt requires oidc_conformant: true.`}),client_authentication_methods:f.z.record(f.z.string(),f.z.any()).default({}).optional().openapi({description:`Defines client authentication methods.`}),require_pushed_authorization_requests:f.z.boolean().default(!1).openapi({description:`Makes the use of Pushed Authorization Requests mandatory for this client`}),require_proof_of_possession:f.z.boolean().default(!1).openapi({description:`Makes the use of Proof-of-Possession mandatory for this client`}),signed_request_object:f.z.record(f.z.string(),f.z.any()).default({}).optional().openapi({description:`JWT-secured Authorization Requests (JAR) settings.`}),compliance_level:f.z.enum([`none`,`fapi1_adv_pkj_par`,`fapi1_adv_mtls_par`,`fapi2_sp_pkj_mtls`,`fapi2_sp_mtls_mtls`]).optional().openapi({description:`Defines the compliance level for this client, which may restrict it's capabilities`}),par_request_expiry:f.z.number().optional().openapi({description:`Specifies how long, in seconds, a Pushed Authorization Request URI remains valid`}),token_quota:f.z.record(f.z.string(),f.z.any()).default({}).optional(),owner_user_id:f.z.string().optional().openapi({description:`User ID of the consenting user when this client was created via IAT-gated Dynamic Client Registration. NULL for clients created via the Management API or open DCR.`}),registration_type:f.z.enum([`manual`,`open_dcr`,`iat_dcr`]).optional().openapi({description:"Provenance of this client. `manual` = Management API; `open_dcr` = RFC 7591 without IAT; `iat_dcr` = RFC 7591 with an Initial Access Token."}),registration_metadata:f.z.record(f.z.string(),f.z.any()).default({}).optional().openapi({description:"Arbitrary metadata captured at Dynamic Client Registration time that isn't a first-class client field (e.g. integration_type, domain). Also stores `iat_constraints` for clients created via IAT so RFC 7592 PUT can enforce field immutability."}),token_exchange:f.z.object({allow_any_profile_of_type:f.z.array(f.z.literal(`custom_authentication`)).optional()}).optional().openapi({description:'Custom Token Exchange settings. Set `allow_any_profile_of_type` to `["custom_authentication"]` to let this client exchange subject tokens through the tenant\'s token exchange profiles.'}),user_linking_mode:f.z.enum([`builtin`,`off`]).optional().openapi({description:"Per-client override for the built-in email-based user-linking path. `builtin` runs the legacy in-process linking at user creation/email update. `off` disables the legacy path; linking only happens if the tenant has enabled the `account-linking` template hook. When unset, the service-level `userLinkingMode` default applies."})});f.z.object({created_at:f.z.string(),updated_at:f.z.string()}).extend(tN.shape).extend({client_id:f.z.string()});var nN=f.z.object({client_id:f.z.string().min(1).openapi({description:`ID of the client.`}),audience:f.z.string().min(1).openapi({description:`The audience (API identifier) of this client grant.`}),scope:f.z.array(f.z.string()).optional().openapi({description:`Scopes allowed for this client grant.`}),organization_usage:f.z.enum([`deny`,`allow`,`require`]).optional().openapi({description:`Defines whether organizations can be used with client credentials exchanges for this grant.`}),allow_any_organization:f.z.boolean().optional().openapi({description:`If enabled, any organization can be used with this grant. If disabled (default), the grant must be explicitly assigned to the desired organizations.`}),is_system:f.z.boolean().optional().openapi({description:`If enabled, this grant is a special grant created by Auth0. It cannot be modified or deleted directly.`}),subject_type:f.z.enum([`client`,`user`]).optional().openapi({description:`The type of application access the client grant allows. Use of this field is subject to the applicable Free Trial terms in Okta's Master Subscription Agreement.`}),authorization_details_types:f.z.array(f.z.string()).optional().openapi({description:`Types of authorization_details allowed for this client grant. Use of this field is subject to the applicable Free Trial terms in Okta's Master Subscription Agreement.`})}),rN=f.z.object({id:f.z.string().openapi({description:`ID of the client grant.`})}).extend(nN.shape).extend({created_at:f.z.string().optional(),updated_at:f.z.string().optional()});f.z.array(rN);var iN=f.z.enum([`iat`,`rat`]),aN=f.z.enum([`invite`,`edit_link`,`registration`,`connect`]),oN=f.z.object({id:f.z.string(),token_hash:f.z.string(),type:iN,client_id:f.z.string().optional(),sub:f.z.string().optional(),constraints:f.z.record(f.z.string(),f.z.unknown()).optional(),single_use:f.z.boolean().default(!1),expires_at:f.z.string().optional(),name:f.z.string().optional(),created_by:f.z.string().optional(),source:aN.optional()});f.z.object({created_at:f.z.string(),used_at:f.z.string().optional(),revoked_at:f.z.string().optional()}).extend(oN.shape);var sN=f.z.object({x:f.z.number(),y:f.z.number()}),cN=function(e){return e.RICH_TEXT=`RICH_TEXT`,e.NEXT_BUTTON=`NEXT_BUTTON`,e.BACK_BUTTON=`BACK_BUTTON`,e.SUBMIT_BUTTON=`SUBMIT_BUTTON`,e.DIVIDER=`DIVIDER`,e.TEXT=`TEXT`,e.EMAIL=`EMAIL`,e.PASSWORD=`PASSWORD`,e.NUMBER=`NUMBER`,e.PHONE=`PHONE`,e.DATE=`DATE`,e.CHECKBOX=`CHECKBOX`,e.RADIO=`RADIO`,e.SELECT=`SELECT`,e.HIDDEN=`HIDDEN`,e.LEGAL=`LEGAL`,e}({}),lN=function(e){return e.BLOCK=`BLOCK`,e.FIELD=`FIELD`,e}({}),uN=f.z.object({id:f.z.string(),category:f.z.nativeEnum(lN),type:f.z.nativeEnum(cN)}),dN=uN.extend({category:f.z.literal(`BLOCK`),type:f.z.literal(`RICH_TEXT`),config:f.z.object({content:f.z.string()}).passthrough()}),fN=uN.extend({category:f.z.literal(`BLOCK`),type:f.z.union([f.z.literal(`NEXT_BUTTON`),f.z.literal(`BACK_BUTTON`),f.z.literal(`SUBMIT_BUTTON`)]),config:f.z.object({text:f.z.string()}).passthrough()}),pN=uN.extend({category:f.z.literal(`FIELD`),type:f.z.literal(`LEGAL`),required:f.z.boolean().optional(),sensitive:f.z.boolean().optional(),config:f.z.object({text:f.z.string()}).passthrough()}),mN=uN.extend({category:f.z.literal(`FIELD`),type:f.z.union([f.z.literal(`TEXT`),f.z.literal(`EMAIL`),f.z.literal(`PASSWORD`),f.z.literal(`NUMBER`),f.z.literal(`PHONE`),f.z.literal(`DATE`),f.z.literal(`CHECKBOX`),f.z.literal(`RADIO`),f.z.literal(`SELECT`),f.z.literal(`HIDDEN`)]),required:f.z.boolean().optional(),sensitive:f.z.boolean().optional(),config:f.z.object({label:f.z.string().optional(),placeholder:f.z.string().optional()}).passthrough()}),hN=f.z.object({id:f.z.string(),category:f.z.string(),type:f.z.string()}).passthrough(),gN=f.z.union([dN,fN,pN,mN,hN]),_N=f.z.object({id:f.z.string(),type:f.z.literal(`STEP`),coordinates:sN,alias:f.z.string().optional(),config:f.z.object({components:f.z.array(gN),next_node:f.z.string()}).passthrough()}),vN=f.z.object({id:f.z.string(),type:f.z.literal(`FLOW`),coordinates:sN,alias:f.z.string().optional(),config:f.z.object({flow_id:f.z.string(),next_node:f.z.string()})}),yN=f.z.object({id:f.z.string(),type:f.z.literal(`ACTION`),coordinates:sN,alias:f.z.string().optional(),config:f.z.object({action_type:f.z.enum([`REDIRECT`]).openapi({description:`The type of action to perform`}),target:f.z.enum([`change-email`,`account`,`custom`]).openapi({description:`The predefined target to redirect to`}),custom_url:f.z.string().optional().openapi({description:`Custom URL when target is 'custom'`}),next_node:f.z.string().openapi({description:`The next node to navigate to after action (for non-redirect actions)`})}).passthrough()}),bN=f.z.object({id:f.z.string(),type:f.z.string(),coordinates:sN}).passthrough(),xN=f.z.union([_N,vN,yN,bN]),SN=f.z.object({next_node:f.z.string(),coordinates:sN}).passthrough(),CN=f.z.object({resume_flow:f.z.boolean().optional(),coordinates:sN}).passthrough();f.z.object({id:f.z.string(),name:f.z.string(),languages:f.z.object({primary:f.z.string()}).passthrough(),nodes:f.z.array(xN),start:SN,ending:CN,created_at:f.z.string(),updated_at:f.z.string(),links:f.z.object({sdkSrc:f.z.string().optional(),sdk_src:f.z.string().optional()}).passthrough()}).passthrough().omit({id:!0,created_at:!0,updated_at:!0});var wN=function(e){return e.TOKEN=`token`,e.ID_TOKEN=`id_token`,e.TOKEN_ID_TOKEN=`id_token token`,e.CODE=`code`,e.CODE_ID_TOKEN=`code id_token`,e.CODE_TOKEN=`code token`,e.CODE_ID_TOKEN_TOKEN=`code id_token token`,e}({}),TN=function(e){return e.QUERY=`query`,e.FRAGMENT=`fragment`,e.FORM_POST=`form_post`,e.WEB_MESSAGE=`web_message`,e.SAML_POST=`saml_post`,e}({}),EN=function(e){return e.S256=`S256`,e.Plain=`plain`,e}({}),DN=f.z.union([f.z.null(),f.z.object({essential:f.z.boolean().optional(),value:f.z.unknown().optional(),values:f.z.array(f.z.unknown()).optional()})]).nullable(),ON=f.z.object({userinfo:f.z.record(f.z.string(),DN).optional(),id_token:f.z.record(f.z.string(),DN).optional()}),kN=f.z.object({client_id:f.z.string(),act_as:f.z.string().optional(),response_type:f.z.nativeEnum(wN).optional(),response_mode:f.z.nativeEnum(TN).optional(),redirect_uri:f.z.string().optional(),audience:f.z.string().optional(),organization:f.z.string().optional(),state:f.z.string().optional(),nonce:f.z.string().optional(),scope:f.z.string().optional(),prompt:f.z.string().optional(),code_challenge_method:f.z.nativeEnum(EN).optional(),code_challenge:f.z.string().optional(),username:f.z.string().optional(),ui_locales:f.z.string().optional(),max_age:f.z.number().optional(),acr_values:f.z.string().optional(),claims:ON.optional(),connection:f.z.string().optional(),vendor_id:f.z.string().optional()});f.z.object({..._M,colors:f.z.object({primary:f.z.string(),page_background:f.z.union([f.z.string(),f.z.object({type:f.z.string().optional(),start:f.z.string().optional(),end:f.z.string().optional(),angle_deg:f.z.number().optional()})]).optional()}).optional(),logo_url:f.z.string().optional(),favicon_url:f.z.string().optional(),favicon_url_dark:f.z.string().optional(),powered_by_logo_url:f.z.string().optional(),font:f.z.object({url:f.z.string()}).optional(),dark_mode:f.z.enum([`dark`,`light`,`auto`]).optional(),dark_mode_toggle:f.z.boolean().optional(),terms_url:f.z.string().optional(),privacy_url:f.z.string().optional()});var AN=f.z.enum([`password_reset`,`email_verification`,`otp`,`mfa_otp`,`authorization_code`,`oauth2_state`,`ticket`,`client_assertion_jti`,`subject_token_jti`,`session_transfer_token`,`mfa_remember_browser`]);f.z.object({code_id:f.z.string().openapi({description:`The code that will be used in for instance an email verification flow`}),login_id:f.z.string().optional().openapi({description:`The id of the login session that the code is connected to`}),connection_id:f.z.string().optional().openapi({description:`The connection that the code is connected to`}),code_type:AN,code_verifier:f.z.string().optional().openapi({description:`The code verifier used in PKCE in outbound flows`}),code_challenge:f.z.string().optional().openapi({description:`The code challenge used in PKCE in outbound flows`}),code_challenge_method:f.z.enum([`plain`,`S256`]).optional().openapi({description:`The code challenge method used in PKCE in outbound flows`}),redirect_uri:f.z.string().optional().openapi({description:`The redirect URI associated with the code`}),otp:f.z.string().optional().openapi({description:`The one-time password value for OTP-based flows`}),nonce:f.z.string().optional().openapi({description:`The nonce value used for security in OIDC flows`}),state:f.z.string().optional().openapi({description:`The state parameter used for CSRF protection in OAuth flows`}),expires_at:f.z.string(),used_at:f.z.string().optional(),user_id:f.z.string().optional()}).extend({created_at:f.z.string()}),f.z.object({device_code_hash:f.z.string(),user_code_hash:f.z.string(),client_id:f.z.string(),scope:f.z.string().optional(),audience:f.z.string().optional(),status:f.z.enum([`pending`,`approved`,`denied`,`consumed`]),login_id:f.z.string().optional(),expires_at:f.z.string(),created_at:f.z.string(),last_polled_at:f.z.string().optional(),interval:f.z.number().int().positive(),version:f.z.number().int().nonnegative()});var jN=f.z.object({kid:f.z.string().optional(),team_id:f.z.string().optional(),realms:f.z.string().optional(),authentication_method:f.z.string().optional(),client_id:f.z.string().optional(),client_secret:JM().optional(),app_secret:JM().optional(),scope:f.z.string().optional(),client_secret_hint:f.z.string().optional(),app_secret_hint:f.z.string().optional(),twilio_token_hint:f.z.string().optional(),authorization_endpoint:f.z.string().optional(),token_endpoint:f.z.string().optional(),userinfo_endpoint:f.z.string().optional(),jwks_uri:f.z.string().optional(),discovery_url:f.z.string().optional(),issuer:f.z.string().optional(),token_endpoint_auth_method:f.z.enum([`client_secret_basic`,`client_secret_post`]).optional(),provider:f.z.string().optional(),from:f.z.string().optional(),twilio_sid:JM().optional(),twilio_token:JM().optional(),icon_url:f.z.string().optional(),domain_aliases:f.z.array(f.z.string()).optional(),callback_url:f.z.string().url().optional(),passwordPolicy:f.z.enum([`none`,`low`,`fair`,`good`,`excellent`]).optional(),password_complexity_options:f.z.object({min_length:f.z.number().optional()}).optional(),password_history:f.z.object({enable:f.z.boolean().optional(),size:f.z.number().optional()}).optional(),password_no_personal_info:f.z.object({enable:f.z.boolean().optional()}).optional(),password_dictionary:f.z.object({enable:f.z.boolean().optional(),dictionary:f.z.array(f.z.string()).optional()}).optional(),disable_signup:f.z.boolean().optional(),brute_force_protection:f.z.boolean().optional(),import_mode:f.z.boolean().optional(),configuration:f.z.object({token_endpoint:f.z.string().optional(),userinfo_endpoint:f.z.string().optional(),client_id:f.z.string().optional(),client_secret:JM().optional(),client_secret_hint:f.z.string().optional(),realm:f.z.string().optional()}).optional(),attributes:f.z.object({email:f.z.object({identifier:f.z.object({active:f.z.boolean().optional()}).optional(),signup:f.z.object({status:f.z.enum([`required`,`optional`,`disabled`]).optional(),verification:f.z.object({active:f.z.boolean().optional()}).optional()}).optional(),validation:f.z.object({allowed:f.z.boolean().optional()}).optional(),unique:f.z.boolean().optional(),profile_required:f.z.boolean().optional(),verification_method:f.z.enum([`link`,`code`]).optional()}).optional(),username:f.z.object({identifier:f.z.object({active:f.z.boolean().optional()}).optional(),signup:f.z.object({status:f.z.enum([`required`,`optional`,`disabled`]).optional()}).optional(),validation:f.z.object({max_length:f.z.number().optional(),min_length:f.z.number().optional(),allowed_types:f.z.object({email:f.z.boolean().optional(),phone_number:f.z.boolean().optional()}).optional()}).optional(),profile_required:f.z.boolean().optional()}).optional(),phone_number:f.z.object({identifier:f.z.object({active:f.z.boolean().optional()}).optional(),signup:f.z.object({status:f.z.enum([`required`,`optional`,`disabled`]).optional()}).optional()}).optional()}).optional(),authentication_methods:f.z.object({password:f.z.object({enabled:f.z.boolean().optional()}).optional(),passkey:f.z.object({enabled:f.z.boolean().optional()}).optional()}).optional(),passkey_options:f.z.object({challenge_ui:f.z.enum([`both`,`autofill`,`button`]).optional(),local_enrollment_enabled:f.z.boolean().optional(),progressive_enrollment_enabled:f.z.boolean().optional()}).optional(),requires_username:f.z.boolean().optional(),validation:f.z.object({username:f.z.object({min:f.z.number().optional(),max:f.z.number().optional()}).optional()}).optional(),allow_action_users:f.z.boolean().optional(),set_user_root_attributes:f.z.enum([`on_each_login`,`on_first_login`,`never_on_login`]).optional(),signInEndpoint:f.z.string().optional(),signOutEndpoint:f.z.string().optional(),signingCert:f.z.string().optional(),signingCerts:f.z.array(f.z.string()).optional(),metadataUrl:f.z.string().optional(),metadataXml:f.z.string().optional(),signSAMLRequest:f.z.boolean().optional(),signatureAlgorithm:f.z.enum([`rsa-sha256`,`rsa-sha1`]).optional(),digestAlgorithm:f.z.enum([`sha256`,`sha1`]).optional(),protocolBinding:f.z.enum([`urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect`,`urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST`]).optional(),user_id_attribute:f.z.string().optional(),fieldsMap:f.z.record(f.z.string(),f.z.union([f.z.string(),f.z.array(f.z.string())])).optional(),entityId:f.z.string().optional()});function MN(e){if(e!==null){if(Array.isArray(e))return e.filter(e=>e!==null).map(MN);if(e&&typeof e==`object`){let t={};for(let[n,r]of Object.entries(e))r!==null&&(t[n]=MN(r));return t}return e}}var NN=f.z.object({id:f.z.string().optional(),name:f.z.string(),display_name:f.z.string().optional(),strategy:f.z.string(),options:f.z.preprocess(e=>e===null?{}:MN(e),jN).default({}),enabled_clients:f.z.array(f.z.string()).default([]).optional(),response_type:f.z.nativeEnum(wN).optional(),response_mode:f.z.nativeEnum(TN).optional(),is_domain_connection:f.z.boolean().optional(),show_as_button:f.z.boolean().optional(),metadata:f.z.record(f.z.string(),f.z.any()).optional(),is_system:f.z.boolean().optional(),..._M});f.z.object({id:f.z.string(),created_at:f.z.string().transform(e=>e===null?``:e),updated_at:f.z.string().transform(e=>e===null?``:e)}).extend(NN.shape);var PN=f.z.object({domain:f.z.string(),status:f.z.enum([`pending`,`verified`]),verified_at:f.z.string().optional()});f.z.object({profile_id:f.z.string().optional(),domains:f.z.array(PN).default([])});var FN=f.z.object({domain:f.z.string(),custom_domain_id:f.z.string().optional(),type:f.z.enum([`auth0_managed_certs`,`self_managed_certs`]),verification_method:f.z.enum([`txt`]).optional(),tls_policy:f.z.enum([`recommended`]).optional(),custom_client_ip_header:f.z.enum([`true-client-ip`,`cf-connecting-ip`,`x-forwarded-for`,`x-azure-clientip`,`null`]).optional(),domain_metadata:f.z.record(f.z.string(),f.z.string().max(255)).optional()}),IN=f.z.discriminatedUnion(`name`,[f.z.object({name:f.z.literal(`txt`),record:f.z.string(),domain:f.z.string()}),f.z.object({name:f.z.literal(`http`),http_body:f.z.string(),http_url:f.z.string()})]),LN=FN.extend({custom_domain_id:f.z.string(),primary:f.z.boolean(),status:f.z.enum([`disabled`,`pending`,`pending_verification`,`ready`]),origin_domain_name:f.z.string().optional(),verification:f.z.object({methods:f.z.array(IN)}).optional(),tls_policy:f.z.string().optional()});FN.pick({tls_policy:!0,custom_client_ip_header:!0,domain_metadata:!0}).strict(),LN.extend({tenant_id:f.z.string()}),f.z.object({certificate:f.z.string().regex(/^-----BEGIN CERTIFICATE-----[\s\S]+-----END CERTIFICATE-----\s*$/,`must be PEM-encoded; include the full certificate chain in leaf-first order`),private_key:f.z.string().regex(/-----BEGIN (RSA |EC |ENCRYPTED )?PRIVATE KEY-----[\s\S]+-----END \1PRIVATE KEY-----\s*$/,`must be a PEM-encoded private key`)});var RN=f.z.object({id:f.z.string(),order:f.z.number().optional(),visible:f.z.boolean().optional().default(!0)}),zN=RN.extend({category:f.z.literal(`BLOCK`).optional()}),BN=zN.extend({type:f.z.literal(`DIVIDER`),config:f.z.object({text:f.z.string().optional()}).optional()}),VN=zN.extend({type:f.z.literal(`HTML`),config:f.z.object({content:f.z.string().optional()}).optional()}),HN=zN.extend({type:f.z.literal(`IMAGE`),config:f.z.object({src:f.z.string().optional(),alt:f.z.string().optional(),width:f.z.number().optional(),height:f.z.number().optional()}).optional()}),UN=zN.extend({type:f.z.literal(`JUMP_BUTTON`),config:f.z.object({text:f.z.string().optional(),target_step:f.z.string().optional()})}),WN=zN.extend({type:f.z.literal(`RESEND_BUTTON`),config:f.z.object({text:f.z.string().optional(),resend_action:f.z.string().optional()})}),GN=zN.extend({type:f.z.literal(`NEXT_BUTTON`),config:f.z.object({text:f.z.string().optional(),variant:f.z.enum([`primary`,`secondary`]).optional(),skip_validation:f.z.boolean().optional()})}),KN=zN.extend({type:f.z.literal(`PREVIOUS_BUTTON`),config:f.z.object({text:f.z.string().optional()})}),qN=zN.extend({type:f.z.literal(`RICH_TEXT`),config:f.z.object({content:f.z.string().optional()}).optional()}),JN=RN.extend({category:f.z.literal(`WIDGET`).optional(),label:f.z.string().min(1).optional(),hint:f.z.string().min(1).max(500).optional(),required:f.z.boolean().optional(),sensitive:f.z.boolean().optional()}),YN=JN.extend({type:f.z.literal(`AUTH0_VERIFIABLE_CREDENTIALS`),config:f.z.object({credential_type:f.z.string().optional()})}),XN=JN.extend({type:f.z.literal(`GMAPS_ADDRESS`),config:f.z.object({api_key:f.z.string().optional()})}),ZN=JN.extend({type:f.z.literal(`RECAPTCHA`),config:f.z.object({site_key:f.z.string().optional()})}),QN=RN.extend({category:f.z.literal(`FIELD`).optional(),label:f.z.string().min(1).optional(),hint:f.z.string().min(1).max(500).optional(),messages:f.z.array(f.z.object({id:f.z.number().optional(),text:f.z.string(),type:f.z.enum([`info`,`error`,`success`,`warning`])})).optional(),required:f.z.boolean().optional(),sensitive:f.z.boolean().optional()}),$N=QN.extend({type:f.z.literal(`BOOLEAN`),config:f.z.object({default_value:f.z.boolean().optional()}).optional()}),eP=QN.extend({type:f.z.literal(`CARDS`),config:f.z.object({options:f.z.array(f.z.object({value:f.z.string(),label:f.z.string(),description:f.z.string().optional(),image:f.z.string().optional()})).optional(),multi_select:f.z.boolean().optional()}).optional()}),tP=QN.extend({type:f.z.literal(`CHOICE`),config:f.z.object({options:f.z.array(f.z.object({value:f.z.string(),label:f.z.string()})).optional(),display:f.z.enum([`radio`,`checkbox`]).optional(),multiple:f.z.boolean().optional(),default_value:f.z.union([f.z.string(),f.z.array(f.z.string())]).optional()}).optional()}),nP=QN.extend({type:f.z.literal(`CODE`),config:f.z.object({length:f.z.number().int().positive().max(100).optional(),mode:f.z.enum([`numeric`,`alphanumeric`]).optional(),auto_submit:f.z.boolean().optional(),group_size:f.z.number().int().min(0).max(100).optional(),separator:f.z.string().optional(),placeholder:f.z.string().optional(),default_value:f.z.string().optional()}).refine(e=>e.group_size===void 0||e.length===void 0||e.group_size<=e.length,{message:`group_size cannot exceed length`,path:[`group_size`]}).refine(e=>e.default_value===void 0||e.length===void 0||e.default_value.length<=e.length,{message:`default_value is longer than the configured length`,path:[`default_value`]}).optional()}),rP=QN.extend({type:f.z.literal(`CUSTOM`),config:f.z.object({component:f.z.string().optional(),props:f.z.record(f.z.string(),f.z.any()).optional(),schema:f.z.record(f.z.string(),f.z.any()).optional(),code:f.z.string().optional()})}),iP=QN.extend({type:f.z.literal(`DATE`),config:f.z.object({format:f.z.string().optional(),min:f.z.string().optional(),max:f.z.string().optional(),default_value:f.z.string().optional()}).optional()}),aP=QN.extend({type:f.z.literal(`DROPDOWN`),config:f.z.object({options:f.z.array(f.z.object({value:f.z.string(),label:f.z.string()})).optional(),placeholder:f.z.string().optional(),searchable:f.z.boolean().optional(),multiple:f.z.boolean().optional(),default_value:f.z.union([f.z.string(),f.z.array(f.z.string())]).optional()}).optional()}),oP=QN.extend({type:f.z.literal(`EMAIL`),config:f.z.object({placeholder:f.z.string().optional(),default_value:f.z.string().optional(),last_used:f.z.boolean().optional(),last_used_label:f.z.string().optional()}).optional()}),sP=QN.extend({type:f.z.literal(`FILE`),config:f.z.object({accept:f.z.string().optional(),max_size:f.z.number().optional(),multiple:f.z.boolean().optional()}).optional()}),cP=QN.extend({type:f.z.literal(`LEGAL`),config:f.z.object({text:f.z.string(),html:f.z.boolean().optional()}).optional()}),lP=QN.extend({type:f.z.literal(`NUMBER`),config:f.z.object({placeholder:f.z.string().optional(),min:f.z.number().optional(),max:f.z.number().optional(),step:f.z.number().optional(),default_value:f.z.string().optional()}).optional()}),uP=QN.extend({type:f.z.literal(`PASSWORD`),config:f.z.object({placeholder:f.z.string().optional(),min_length:f.z.number().optional(),show_toggle:f.z.boolean().optional(),forgot_password_link:f.z.string().optional(),default_value:f.z.string().optional(),autocomplete:f.z.enum([`current-password`,`new-password`]).optional()}).optional()}),dP=QN.extend({type:f.z.literal(`PAYMENT`),config:f.z.object({provider:f.z.string().optional(),currency:f.z.string().optional()}).optional()}),fP=QN.extend({type:f.z.literal(`SOCIAL`),config:f.z.object({providers:f.z.array(f.z.string()).optional(),provider_details:f.z.array(f.z.object({name:f.z.string(),strategy:f.z.string().optional(),display_name:f.z.string().optional(),short_name:f.z.string().optional(),icon_url:f.z.string().optional(),href:f.z.string().optional(),last_used:f.z.boolean().optional(),last_used_label:f.z.string().optional()})).optional()}).optional()}),pP=QN.extend({type:f.z.literal(`TEL`),config:f.z.object({placeholder:f.z.string().optional(),default_country:f.z.string().optional(),default_value:f.z.string().optional(),allow_email:f.z.boolean().optional()}).optional()}),mP=QN.extend({type:f.z.literal(`TEXT`),config:f.z.object({placeholder:f.z.string().optional(),multiline:f.z.boolean().optional(),max_length:f.z.number().optional(),default_value:f.z.string().optional(),autocomplete:f.z.string().optional(),input_mode:f.z.enum([`text`,`numeric`,`decimal`,`tel`,`email`,`url`,`search`]).optional(),last_used:f.z.boolean().optional(),last_used_label:f.z.string().optional()}).optional()}),hP=QN.extend({type:f.z.literal(`COUNTRY`),config:f.z.object({placeholder:f.z.string().optional(),default_value:f.z.string().optional()}).optional()}),gP=QN.extend({type:f.z.literal(`URL`),config:f.z.object({placeholder:f.z.string().optional(),default_value:f.z.string().optional()}).optional()}),_P=f.z.discriminatedUnion(`type`,[BN,VN,HN,UN,WN,GN,KN,qN]),vP=f.z.discriminatedUnion(`type`,[YN,XN,ZN]),yP=f.z.discriminatedUnion(`type`,[$N,eP,tP,nP,hP,rP,iP,aP,oP,sP,cP,lP,uP,dP,fP,pP,mP,gP]),bP=f.z.union([_P,vP,yP]);new Set([`BOOLEAN`,`CARDS`,`CHOICE`,`CODE`,`COUNTRY`,`DATE`,`DROPDOWN`,`EMAIL`,`LEGAL`,`NUMBER`,`PASSWORD`,`TEL`,`TEXT`,`URL`]),f.z.object({id:f.z.string(),type:f.z.literal(`submit`),label:f.z.string(),className:f.z.string().optional(),disabled:f.z.boolean().optional().default(!1),order:f.z.number().optional(),visible:f.z.boolean().optional().default(!0),customizations:f.z.record(f.z.string(),f.z.any()).optional()});var xP=f.z.object({x:f.z.number(),y:f.z.number()}),SP=f.z.object({id:f.z.string(),type:f.z.literal(`FLOW`),coordinates:xP,alias:f.z.string().min(1).max(150).optional(),config:f.z.object({flow_id:f.z.string().max(30),next_node:f.z.string().optional()})}),CP=f.z.object({id:f.z.string(),type:f.z.literal(`ROUTER`),coordinates:xP,alias:f.z.string().min(1).max(150),config:f.z.object({rules:f.z.array(f.z.object({id:f.z.string(),alias:f.z.string().min(1).max(150).optional(),condition:f.z.any(),next_node:f.z.string()})),fallback:f.z.string()})}),wP=f.z.object({id:f.z.string(),type:f.z.literal(`STEP`),coordinates:xP,alias:f.z.string().min(1).max(150).optional(),config:f.z.object({components:f.z.array(bP),next_node:f.z.string().optional()})}),TP=f.z.discriminatedUnion(`type`,[SP,CP,wP]),EP=f.z.object({name:f.z.string().openapi({description:`The name of the form`}),messages:f.z.object({errors:f.z.record(f.z.string(),f.z.any()).optional(),custom:f.z.record(f.z.string(),f.z.any()).optional()}).optional(),languages:f.z.object({primary:f.z.string().optional(),default:f.z.string().optional()}).optional(),translations:f.z.record(f.z.string(),f.z.any()).optional(),nodes:f.z.array(TP).optional(),start:f.z.object({hidden_fields:f.z.array(f.z.object({key:f.z.string(),value:f.z.string()})).optional(),next_node:f.z.string().optional(),coordinates:xP.optional()}).optional(),ending:f.z.object({redirection:f.z.object({delay:f.z.number().optional(),target:f.z.string().optional()}).optional(),after_submit:f.z.object({flow_id:f.z.string().optional()}).optional(),coordinates:xP.optional(),resume_flow:f.z.boolean().optional()}).optional(),style:f.z.object({css:f.z.string().optional()}).optional(),links:f.z.object({sdkSrc:f.z.string().optional(),sdk_src:f.z.string().optional()}).optional()}).openapi({description:`Schema for flow-based forms (matches Auth0 Forms structure)`});mM.extend(EP.shape).extend({id:f.z.string()});var DP=f.z.object({id:f.z.number().optional(),text:f.z.string(),type:f.z.enum([`info`,`error`,`success`,`warning`])}),OP=f.z.object({id:f.z.string().optional(),text:f.z.string(),href:f.z.string(),linkText:f.z.string().optional()}),kP=f.z.object({"form-content-start":f.z.string().optional(),"form-content-end":f.z.string().optional(),"form-footer-start":f.z.string().optional(),"form-footer-end":f.z.string().optional(),"secondary-actions-start":f.z.string().optional(),"secondary-actions-end":f.z.string().optional()}).strict();f.z.object({name:f.z.string().optional(),action:f.z.string(),method:f.z.enum([`POST`,`GET`]),title:f.z.string().optional(),description:f.z.string().optional(),components:f.z.array(bP),messages:f.z.array(DP).optional(),links:f.z.array(OP).optional(),partials:kP.optional(),footer:f.z.string().optional()});var AP=f.z.enum([`pre-user-registration`,`post-user-registration`,`post-user-login`,`post-user-update`,`validate-registration-username`,`pre-user-deletion`,`post-user-deletion`]),jP=f.z.enum([`post-user-login`]),MP=f.z.enum([`post-user-login`,`post-user-registration`,`post-user-update`,`credentials-exchange`]),NP=f.z.enum([`validate-registration-username`,`post-user-login`,`credentials-exchange`,`pre-user-registration`,`post-user-registration`,`pre-user-update`,`post-user-update`,`pre-user-deletion`,`post-user-deletion`,`pre-screen`,`custom-email-provider`,`custom-phone-provider`]),PP=f.z.enum([`post-user-login`]);AP.options,jP.options,MP.options,NP.options,PP.options;var FP=f.z.enum([`impersonate`]),IP=f.z.enum([`ensure-username`,`set-preferred-username`,`account-linking`]),LP={enabled:f.z.boolean().default(!1),synchronous:f.z.boolean().default(!1),priority:f.z.number().optional(),hook_id:f.z.string().optional(),metadata:f.z.record(f.z.string(),f.z.unknown()).optional(),..._M},RP=f.z.object({...LP,trigger_id:AP,url:f.z.string()}),zP=f.z.object({...LP,trigger_id:jP,form_id:f.z.string()}),BP=f.z.object({...LP,trigger_id:MP,template_id:IP}),VP=f.z.object({...LP,trigger_id:NP,code_id:f.z.string()}),HP=f.z.object({...LP,trigger_id:PP,page_id:FP,permission_required:f.z.string().optional()});f.z.union([RP,zP,BP,VP,HP]);var UP=f.z.object({...LP,trigger_id:AP}).extend(mM.shape).extend({hook_id:f.z.string(),url:f.z.string()}),WP=f.z.object({...LP,trigger_id:jP}).extend(mM.shape).extend({hook_id:f.z.string(),form_id:f.z.string()}),GP=f.z.object({...LP,trigger_id:MP}).extend(mM.shape).extend({hook_id:f.z.string(),template_id:IP}),KP=f.z.object({...LP,trigger_id:NP}).extend(mM.shape).extend({hook_id:f.z.string(),code_id:f.z.string()}),qP=f.z.object({...LP,trigger_id:PP}).extend(mM.shape).extend({hook_id:f.z.string(),page_id:FP,permission_required:f.z.string().optional()});f.z.union([UP,WP,GP,KP,qP]),f.z.object({code:f.z.string().max(1e5),secrets:f.z.record(f.z.string(),f.z.string()).optional()}).extend({id:f.z.string(),tenant_id:f.z.string()}).extend(mM.shape);var JP=f.z.object({name:f.z.string().optional()}),YP=f.z.object({email:f.z.string().optional()}),XP=f.z.object({id:f.z.string().optional(),organization_id:f.z.string().max(50),inviter:JP,invitee:YP,invitation_url:f.z.string().url(),client_id:f.z.string(),connection_id:f.z.string().optional(),app_metadata:f.z.record(f.z.string(),f.z.any()).default({}).optional(),user_metadata:f.z.record(f.z.string(),f.z.any()).default({}).optional(),ttl_sec:f.z.number().int().max(2592e3).default(604800).optional(),roles:f.z.array(f.z.string()).default([]).optional(),send_invitation_email:f.z.boolean().default(!0).optional()});f.z.object({id:f.z.string(),organization_id:f.z.string().max(50),created_at:f.z.string().datetime(),expires_at:f.z.string().datetime(),ticket_id:f.z.string().optional()}).extend(XP.omit({id:!0}).shape);var ZP=f.z.object({alg:f.z.enum([`RS256`,`RS384`,`RS512`,`ES256`,`ES384`,`ES512`,`HS256`,`HS384`,`HS512`]).optional(),kid:f.z.string().optional(),kty:f.z.enum([`RSA`,`EC`,`oct`]),use:f.z.enum([`sig`,`enc`]).optional(),n:f.z.string().optional(),e:f.z.string().optional(),crv:f.z.string().optional(),x:f.z.string().optional(),y:f.z.string().optional(),x5t:f.z.string().optional(),"x5t#S256":f.z.string().optional(),x5c:f.z.array(f.z.string()).optional()}).superRefine((e,t)=>{if(e.kty===`RSA`)for(let n of[`n`,`e`])e[n]||t.addIssue({code:f.z.ZodIssueCode.custom,path:[n],message:`RSA JWK is missing required member '${n}'`});else if(e.kty===`EC`)for(let n of[`crv`,`x`,`y`])e[n]||t.addIssue({code:f.z.ZodIssueCode.custom,path:[n],message:`EC JWK is missing required member '${n}'`})}),QP=f.z.object({keys:f.z.array(ZP)});f.z.object({issuer:f.z.string(),authorization_endpoint:f.z.string(),token_endpoint:f.z.string(),device_authorization_endpoint:f.z.string().optional(),userinfo_endpoint:f.z.string(),jwks_uri:f.z.string(),registration_endpoint:f.z.string().optional(),revocation_endpoint:f.z.string(),end_session_endpoint:f.z.string().optional(),scopes_supported:f.z.array(f.z.string()),response_types_supported:f.z.array(f.z.string()),grant_types_supported:f.z.array(f.z.string()).optional(),code_challenge_methods_supported:f.z.array(f.z.string()),response_modes_supported:f.z.array(f.z.string()),subject_types_supported:f.z.array(f.z.string()),id_token_signing_alg_values_supported:f.z.array(f.z.string()),token_endpoint_auth_methods_supported:f.z.array(f.z.string()),claims_supported:f.z.array(f.z.string()),request_uri_parameter_supported:f.z.boolean(),request_parameter_supported:f.z.boolean(),claims_parameter_supported:f.z.boolean().optional(),request_object_signing_alg_values_supported:f.z.array(f.z.string()).optional(),token_endpoint_auth_signing_alg_values_supported:f.z.array(f.z.string()),client_id_metadata_document_supported:f.z.boolean().optional(),backchannel_logout_supported:f.z.boolean().optional(),backchannel_logout_session_supported:f.z.boolean().optional()});var $P=function(e){return e.PENDING=`pending`,e.AUTHENTICATED=`authenticated`,e.AWAITING_EMAIL_VERIFICATION=`awaiting_email_verification`,e.AWAITING_MFA=`awaiting_mfa`,e.AWAITING_HOOK=`awaiting_hook`,e.AWAITING_CONTINUATION=`awaiting_continuation`,e.AWAITING_CONSENT=`awaiting_consent`,e.COMPLETED=`completed`,e.FAILED=`failed`,e.EXPIRED=`expired`,e}({}),eF=f.z.nativeEnum($P),tF=f.z.object({strategy:f.z.string(),strategy_type:f.z.string()});f.z.object({csrf_token:f.z.string(),auth0Client:f.z.string().optional(),authParams:kN,expires_at:f.z.string(),deleted_at:f.z.string().optional(),ip:f.z.string().optional(),useragent:f.z.string().optional(),session_id:f.z.string().optional(),authorization_url:f.z.string().optional(),state:eF.optional().default(`pending`),state_data:f.z.string().optional(),failure_reason:f.z.string().optional(),user_id:f.z.string().optional(),auth_connection:f.z.string().optional(),auth_strategy:tF.optional(),authenticated_at:f.z.string().optional()}).openapi({description:`This represents a login sesion`}).extend({id:f.z.string().openapi({description:`This is is used as the state in the universal login`}),created_at:f.z.string(),updated_at:f.z.string(),tenant_id:f.z.string().optional()});var Q={ACLS_SUMMARY:`acls_summary`,ACTIONS_EXECUTION_FAILED:`actions_execution_failed`,API_LIMIT:`api_limit`,API_LIMIT_WARNING:`api_limit_warning`,APPI:`appi`,CIBA_EXCHANGE_FAILED:`ciba_exchange_failed`,CIBA_EXCHANGE_SUCCEEDED:`ciba_exchange_succeeded`,CIBA_START_FAILED:`ciba_start_failed`,CIBA_START_SUCCEEDED:`ciba_start_succeeded`,CODE_LINK_SENT:`cls`,CODE_SENT:`cs`,DEPRECATION_NOTICE:`depnote`,CONFIG_INHERITANCE_DIFF:`cfgdiff`,CONFIG_DRIFT:`cfgdrift`,FAILED_LOGIN:`f`,FAILED_BY_CONNECTOR:`fc`,FAILED_CHANGE_EMAIL:`fce`,FAILED_BY_CORS:`fco`,FAILED_CROSS_ORIGIN_AUTHENTICATION:`fcoa`,FAILED_CHANGE_PASSWORD:`fcp`,FAILED_POST_CHANGE_PASSWORD_HOOK:`fcph`,FAILED_CHANGE_PHONE_NUMBER:`fcpn`,FAILED_CHANGE_PASSWORD_REQUEST:`fcpr`,FAILED_CONNECTOR_PROVISIONING:`fcpro`,FAILED_CHANGE_USERNAME:`fcu`,FAILED_DELEGATION:`fd`,FAILED_DEVICE_ACTIVATION:`fdeac`,FAILED_DEVICE_AUTHORIZATION_REQUEST:`fdeaz`,USER_CANCELED_DEVICE_CONFIRMATION:`fdecc`,FAILED_USER_DELETION:`fdu`,FAILED_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN:`feacft`,FAILED_EXCHANGE_ACCESS_TOKEN_FOR_CLIENT_CREDENTIALS:`feccft`,FAILED_EXCHANGE_CUSTOM_TOKEN:`fecte`,FAILED_EXCHANGE_DEVICE_CODE_FOR_ACCESS_TOKEN:`fede`,FAILED_FEDERATED_LOGOUT:`federated_logout_failed`,FAILED_EXCHANGE_NATIVE_SOCIAL_LOGIN:`fens`,FAILED_EXCHANGE_PASSWORD_OOB_FOR_ACCESS_TOKEN:`feoobft`,FAILED_EXCHANGE_PASSWORD_OTP_FOR_ACCESS_TOKEN:`feotpft`,FAILED_EXCHANGE_PASSWORD_FOR_ACCESS_TOKEN:`fepft`,FAILED_EXCHANGE_PASSWORDLESS_OTP_FOR_ACCESS_TOKEN:`fepotpft`,FAILED_EXCHANGE_PASSWORD_MFA_RECOVERY_FOR_ACCESS_TOKEN:`fercft`,FAILED_EXCHANGE_ROTATING_REFRESH_TOKEN:`ferrt`,FAILED_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN:`fertft`,FAILED_EXCHANGE_SUBJECT_TOKEN_FOR_ACCESS_TOKEN:`festft`,FAILED_HOOK:`fh`,FAILED_IMPERSONATION:`fimp`,FAILED_INVITE_ACCEPT:`fi`,FAILED_LOGOUT:`flo`,FLOWS_EXECUTION_COMPLETED:`flows_execution_completed`,FLOWS_EXECUTION_FAILED:`flows_execution_failed`,FAILED_SENDING_NOTIFICATION:`fn`,FORMS_SUBMISSION_FAILED:`forms_submission_failed`,FORMS_SUBMISSION_SUCCEEDED:`forms_submission_succeeded`,FAILED_LOGIN_INCORRECT_PASSWORD:`fp`,FAILED_PUSHED_AUTHORIZATION_REQUEST:`fpar`,FAILED_POST_USER_REGISTRATION_HOOK:`fpurh`,FAILED_SIGNUP:`fs`,FAILED_SILENT_AUTH:`fsa`,FAILED_LOGIN_INVALID_EMAIL_USERNAME:`fu`,FAILED_USERS_IMPORT:`fui`,FAILED_VERIFICATION_EMAIL:`fv`,FAILED_VERIFICATION_EMAIL_REQUEST:`fvr`,EMAIL_VERIFICATION_CONFIRMED:`gd_auth_email_verification`,EMAIL_VERIFICATION_FAILED:`gd_auth_fail_email_verification`,MFA_AUTH_FAILED:`gd_auth_failed`,MFA_AUTH_REJECTED:`gd_auth_rejected`,MFA_AUTH_SUCCESS:`gd_auth_succeed`,MFA_ENROLLMENT_COMPLETE:`gd_enrollment_complete`,TOO_MANY_MFA_FAILURES:`gd_otp_rate_limit_exceed`,MFA_RECOVERY_FAILED:`gd_recovery_failed`,MFA_RECOVERY_RATE_LIMIT_EXCEED:`gd_recovery_rate_limit_exceed`,MFA_RECOVERY_SUCCESS:`gd_recovery_succeed`,MFA_EMAIL_SENT:`gd_send_email`,EMAIL_VERIFICATION_SENT:`gd_send_email_verification`,EMAIL_VERIFICATION_SEND_FAILURE:`gd_send_email_verification_failure`,PUSH_NOTIFICATION_SENT:`gd_send_pn`,ERROR_SENDING_MFA_PUSH_NOTIFICATION:`gd_send_pn_failure`,MFA_SMS_SENT:`gd_send_sms`,ERROR_SENDING_MFA_SMS:`gd_send_sms_failure`,MFA_VOICE_CALL_SUCCESS:`gd_send_voice`,MFA_VOICE_CALL_FAILED:`gd_send_voice_failure`,SECOND_FACTOR_STARTED:`gd_start_auth`,MFA_ENROLL_STARTED:`gd_start_enroll`,MFA_ENROLLMENT_FAILED:`gd_start_enroll_failed`,GUARDIAN_TENANT_UPDATE:`gd_tenant_update`,UNENROLL_DEVICE_ACCOUNT:`gd_unenroll`,UPDATE_DEVICE_ACCOUNT:`gd_update_device_account`,WEBAUTHN_CHALLENGE_FAILED:`gd_webauthn_challenge_failed`,WEBAUTHN_ENROLLMENT_FAILED:`gd_webauthn_enrollment_failed`,FAILED_KMS_API_OPERATION:`kms_key_management_failure`,SUCCESS_KMS_API_OPERATION:`kms_key_management_success`,KMS_KEY_STATE_CHANGED:`kms_key_state_changed`,TOO_MANY_CALLS_TO_DELEGATION:`limit_delegation`,BLOCKED_IP_ADDRESS:`limit_mu`,BLOCKED_ACCOUNT_IP:`limit_sul`,BLOCKED_ACCOUNT_EMAIL:`limit_wc`,INFORMATION:`i`,MFA_REQUIRED:`mfar`,MANAGEMENT_API_READ_OPERATION:`mgmt_api_read`,FAILED_AUTHENTICATION_METHOD_OPERATION_MY_ACCOUNT:`my_account_authentication_method_failed`,SUCCESSFUL_AUTHENTICATION_METHOD_OPERATION_MY_ACCOUNT:`my_account_authentication_method_succeeded`,FAILED_OIDC_BACKCHANNEL_LOGOUT:`oidc_backchannel_logout_failed`,SUCCESSFUL_OIDC_BACKCHANNEL_LOGOUT:`oidc_backchannel_logout_succeeded`,ORGANIZATION_MEMBER_ADDED:`organization_member_added`,PASSKEY_CHALLENGE_FAILED:`passkey_challenge_failed`,PASSKEY_CHALLENGE_STARTED:`passkey_challenge_started`,PRE_LOGIN_ASSESSMENT:`pla`,BREACHED_PASSWORD:`pwd_leak`,BREACHED_PASSWORD_ON_RESET:`reset_pwd_leak`,SUCCESS_RESOURCE_CLEANUP:`resource_cleanup`,RICH_CONSENTS_ACCESS_ERROR:`rich_consents_access_error`,SUCCESS_LOGIN:`s`,SUCCESS_API_OPERATION:`sapi`,FAILED_API_OPERATION:`fapi`,SUCCESS_CHANGE_EMAIL:`sce`,SUCCESS_CROSS_ORIGIN_AUTHENTICATION:`scoa`,SUCCESS_CHANGE_PASSWORD:`scp`,SUCCESS_CHANGE_PHONE_NUMBER:`scpn`,SUCCESS_CHANGE_PASSWORD_REQUEST:`scpr`,SUCCESS_CHANGE_USERNAME:`scu`,SUCCESS_CREDENTIAL_VALIDATION:`scv`,SUCCESS_DELEGATION:`sd`,SUCCESS_USER_DELETION:`sdu`,SUCCESS_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN:`seacft`,SUCCESS_EXCHANGE_ACCESS_TOKEN_FOR_CLIENT_CREDENTIALS:`seccft`,SUCCESS_EXCHANGE_CUSTOM_TOKEN:`secte`,SUCCESS_EXCHANGE_DEVICE_CODE_FOR_ACCESS_TOKEN:`sede`,SUCCESS_EXCHANGE_NATIVE_SOCIAL_LOGIN:`sens`,SUCCESS_EXCHANGE_PASSWORD_OOB_FOR_ACCESS_TOKEN:`seoobft`,SUCCESS_EXCHANGE_PASSWORD_OTP_FOR_ACCESS_TOKEN:`seotpft`,SUCCESS_EXCHANGE_PASSWORDLESS_OTP_FOR_ACCESS_TOKEN:`sepotpft`,SUCCESS_EXCHANGE_PASSWORD_FOR_ACCESS_TOKEN:`sepft`,SUCCESS_EXCHANGE_PASSKEY_OOB_FOR_ACCESS_TOKEN:`sepkoobft`,SUCCESS_EXCHANGE_PASSKEY_OTP_FOR_ACCESS_TOKEN:`sepkotpft`,SUCCESS_EXCHANGE_PASSKEY_MFA_RECOVERY_FOR_ACCESS_TOKEN:`sepkrcft`,SUCCESS_EXCHANGE_PASSWORD_MFA_RECOVERY_FOR_ACCESS_TOKEN:`sercft`,SUCCESS_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN:`sertft`,SUCCESS_EXCHANGE_SUBJECT_TOKEN_FOR_ACCESS_TOKEN:`sestft`,SUCCESS_IMPERSONATION:`simp`,SUCCESSFULLY_ACCEPTED_USER_INVITE:`si`,BREACHED_PASSWORD_ON_SIGNUP:`signup_pwd_leak`,SUCCESS_LOGOUT:`slo`,SUCCESS_HOOK:`sh`,SUCCESS_PASSWORD_MIGRATION:`spm`,SUCCESS_REVOCATION:`srrt`,SUCCESS_SIGNUP:`ss`,FAILED_SS_SSO_OPERATION:`ss_sso_failure`,INFORMATION_FROM_SS_SSO_OPERATION:`ss_sso_info`,SUCCESS_SS_SSO_OPERATION:`ss_sso_success`,SUCCESS_SILENT_AUTH:`ssa`,SUCCESSFUL_SCIM_OPERATION:`sscim`,SUCCESSFULLY_IMPORTED_USERS:`sui`,SUCCESS_VERIFICATION_EMAIL:`sv`,SUCCESS_VERIFICATION_EMAIL_REQUEST:`svr`,MAX_AMOUNT_OF_AUTHENTICATORS:`too_many_records`,USER_LOGIN_BLOCK_RELEASED:`ublkdu`,FAILED_UNIVERSAL_LOGOUT:`universal_logout_failed`,SUCCESSFUL_UNIVERSAL_LOGOUT:`universal_logout_succeeded`,WARNING_DURING_LOGIN:`w`,WARNING_SENDING_NOTIFICATION:`wn`,WARNING_USER_MANAGEMENT:`wum`},nF=f.z.string().refine(e=>Object.values(Q).includes(e),{message:`Invalid log type`});Q.ACLS_SUMMARY,Q.ACTIONS_EXECUTION_FAILED,Q.API_LIMIT,Q.API_LIMIT_WARNING,Q.APPI,Q.CIBA_EXCHANGE_FAILED,Q.CIBA_EXCHANGE_SUCCEEDED,Q.CIBA_START_FAILED,Q.CIBA_START_SUCCEEDED,Q.CODE_LINK_SENT,Q.CODE_SENT,Q.DEPRECATION_NOTICE,Q.CONFIG_INHERITANCE_DIFF,Q.CONFIG_DRIFT,Q.FAILED_LOGIN,Q.FAILED_BY_CONNECTOR,Q.FAILED_CHANGE_EMAIL,Q.FAILED_BY_CORS,Q.FAILED_CROSS_ORIGIN_AUTHENTICATION,Q.FAILED_CHANGE_PASSWORD,Q.FAILED_POST_CHANGE_PASSWORD_HOOK,Q.FAILED_CHANGE_PHONE_NUMBER,Q.FAILED_CHANGE_PASSWORD_REQUEST,Q.FAILED_CONNECTOR_PROVISIONING,Q.FAILED_CHANGE_USERNAME,Q.FAILED_DELEGATION,Q.FAILED_DEVICE_ACTIVATION,Q.FAILED_DEVICE_AUTHORIZATION_REQUEST,Q.USER_CANCELED_DEVICE_CONFIRMATION,Q.FAILED_USER_DELETION,Q.FAILED_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN,Q.FAILED_EXCHANGE_ACCESS_TOKEN_FOR_CLIENT_CREDENTIALS,Q.FAILED_EXCHANGE_CUSTOM_TOKEN,Q.FAILED_EXCHANGE_DEVICE_CODE_FOR_ACCESS_TOKEN,Q.FAILED_FEDERATED_LOGOUT,Q.FAILED_EXCHANGE_NATIVE_SOCIAL_LOGIN,Q.FAILED_EXCHANGE_PASSWORD_OOB_FOR_ACCESS_TOKEN,Q.FAILED_EXCHANGE_PASSWORD_OTP_FOR_ACCESS_TOKEN,Q.FAILED_EXCHANGE_PASSWORD_FOR_ACCESS_TOKEN,Q.FAILED_EXCHANGE_PASSWORDLESS_OTP_FOR_ACCESS_TOKEN,Q.FAILED_EXCHANGE_PASSWORD_MFA_RECOVERY_FOR_ACCESS_TOKEN,Q.FAILED_EXCHANGE_ROTATING_REFRESH_TOKEN,Q.FAILED_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN,Q.FAILED_EXCHANGE_SUBJECT_TOKEN_FOR_ACCESS_TOKEN,Q.FAILED_HOOK,Q.FAILED_IMPERSONATION,Q.FAILED_INVITE_ACCEPT,Q.FAILED_LOGOUT,Q.FLOWS_EXECUTION_COMPLETED,Q.FLOWS_EXECUTION_FAILED,Q.FAILED_SENDING_NOTIFICATION,Q.FORMS_SUBMISSION_FAILED,Q.FORMS_SUBMISSION_SUCCEEDED,Q.FAILED_LOGIN_INCORRECT_PASSWORD,Q.FAILED_PUSHED_AUTHORIZATION_REQUEST,Q.FAILED_POST_USER_REGISTRATION_HOOK,Q.FAILED_SIGNUP,Q.FAILED_SILENT_AUTH,Q.FAILED_LOGIN_INVALID_EMAIL_USERNAME,Q.FAILED_USERS_IMPORT,Q.FAILED_VERIFICATION_EMAIL,Q.FAILED_VERIFICATION_EMAIL_REQUEST,Q.EMAIL_VERIFICATION_CONFIRMED,Q.EMAIL_VERIFICATION_FAILED,Q.MFA_AUTH_FAILED,Q.MFA_AUTH_REJECTED,Q.MFA_AUTH_SUCCESS,Q.MFA_ENROLLMENT_COMPLETE,Q.TOO_MANY_MFA_FAILURES,Q.MFA_RECOVERY_FAILED,Q.MFA_RECOVERY_RATE_LIMIT_EXCEED,Q.MFA_RECOVERY_SUCCESS,Q.MFA_EMAIL_SENT,Q.EMAIL_VERIFICATION_SENT,Q.EMAIL_VERIFICATION_SEND_FAILURE,Q.PUSH_NOTIFICATION_SENT,Q.ERROR_SENDING_MFA_PUSH_NOTIFICATION,Q.MFA_SMS_SENT,Q.ERROR_SENDING_MFA_SMS,Q.MFA_VOICE_CALL_SUCCESS,Q.MFA_VOICE_CALL_FAILED,Q.SECOND_FACTOR_STARTED,Q.MFA_ENROLL_STARTED,Q.MFA_ENROLLMENT_FAILED,Q.GUARDIAN_TENANT_UPDATE,Q.UNENROLL_DEVICE_ACCOUNT,Q.UPDATE_DEVICE_ACCOUNT,Q.WEBAUTHN_CHALLENGE_FAILED,Q.WEBAUTHN_ENROLLMENT_FAILED,Q.FAILED_KMS_API_OPERATION,Q.SUCCESS_KMS_API_OPERATION,Q.KMS_KEY_STATE_CHANGED,Q.TOO_MANY_CALLS_TO_DELEGATION,Q.BLOCKED_IP_ADDRESS,Q.BLOCKED_ACCOUNT_IP,Q.BLOCKED_ACCOUNT_EMAIL,Q.INFORMATION,Q.MFA_REQUIRED,Q.MANAGEMENT_API_READ_OPERATION,Q.FAILED_AUTHENTICATION_METHOD_OPERATION_MY_ACCOUNT,Q.SUCCESSFUL_AUTHENTICATION_METHOD_OPERATION_MY_ACCOUNT,Q.FAILED_OIDC_BACKCHANNEL_LOGOUT,Q.SUCCESSFUL_OIDC_BACKCHANNEL_LOGOUT,Q.ORGANIZATION_MEMBER_ADDED,Q.PASSKEY_CHALLENGE_FAILED,Q.PASSKEY_CHALLENGE_STARTED,Q.PRE_LOGIN_ASSESSMENT,Q.BREACHED_PASSWORD,Q.BREACHED_PASSWORD_ON_RESET,Q.SUCCESS_RESOURCE_CLEANUP,Q.RICH_CONSENTS_ACCESS_ERROR,Q.SUCCESS_LOGIN,Q.SUCCESS_API_OPERATION,Q.FAILED_API_OPERATION,Q.SUCCESS_CHANGE_EMAIL,Q.SUCCESS_CROSS_ORIGIN_AUTHENTICATION,Q.SUCCESS_CHANGE_PASSWORD,Q.SUCCESS_CHANGE_PHONE_NUMBER,Q.SUCCESS_CHANGE_PASSWORD_REQUEST,Q.SUCCESS_CHANGE_USERNAME,Q.SUCCESS_CREDENTIAL_VALIDATION,Q.SUCCESS_DELEGATION,Q.SUCCESS_USER_DELETION,Q.SUCCESS_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN,Q.SUCCESS_EXCHANGE_ACCESS_TOKEN_FOR_CLIENT_CREDENTIALS,Q.SUCCESS_EXCHANGE_CUSTOM_TOKEN,Q.SUCCESS_EXCHANGE_DEVICE_CODE_FOR_ACCESS_TOKEN,Q.SUCCESS_EXCHANGE_NATIVE_SOCIAL_LOGIN,Q.SUCCESS_EXCHANGE_PASSWORD_OOB_FOR_ACCESS_TOKEN,Q.SUCCESS_EXCHANGE_PASSWORD_OTP_FOR_ACCESS_TOKEN,Q.SUCCESS_EXCHANGE_PASSWORDLESS_OTP_FOR_ACCESS_TOKEN,Q.SUCCESS_EXCHANGE_PASSWORD_FOR_ACCESS_TOKEN,Q.SUCCESS_EXCHANGE_PASSKEY_OOB_FOR_ACCESS_TOKEN,Q.SUCCESS_EXCHANGE_PASSKEY_OTP_FOR_ACCESS_TOKEN,Q.SUCCESS_EXCHANGE_PASSKEY_MFA_RECOVERY_FOR_ACCESS_TOKEN,Q.SUCCESS_EXCHANGE_PASSWORD_MFA_RECOVERY_FOR_ACCESS_TOKEN,Q.SUCCESS_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN,Q.SUCCESS_EXCHANGE_SUBJECT_TOKEN_FOR_ACCESS_TOKEN,Q.SUCCESS_IMPERSONATION,Q.SUCCESSFULLY_ACCEPTED_USER_INVITE,Q.BREACHED_PASSWORD_ON_SIGNUP,Q.SUCCESS_LOGOUT,Q.SUCCESS_HOOK,Q.SUCCESS_PASSWORD_MIGRATION,Q.SUCCESS_REVOCATION,Q.SUCCESS_SIGNUP,Q.FAILED_SS_SSO_OPERATION,Q.INFORMATION_FROM_SS_SSO_OPERATION,Q.SUCCESS_SS_SSO_OPERATION,Q.SUCCESS_SILENT_AUTH,Q.SUCCESSFUL_SCIM_OPERATION,Q.SUCCESSFULLY_IMPORTED_USERS,Q.SUCCESS_VERIFICATION_EMAIL,Q.SUCCESS_VERIFICATION_EMAIL_REQUEST,Q.MAX_AMOUNT_OF_AUTHENTICATORS,Q.USER_LOGIN_BLOCK_RELEASED,Q.FAILED_UNIVERSAL_LOGOUT,Q.SUCCESSFUL_UNIVERSAL_LOGOUT,Q.WARNING_DURING_LOGIN,Q.WARNING_SENDING_NOTIFICATION,Q.WARNING_USER_MANAGEMENT,(()=>{let e={};for(let[t,n]of Object.entries(Q))t.startsWith(`SUCCESS_`)||t.startsWith(`SUCCESSFUL_`)||t.startsWith(`SUCCESSFULLY_`)||t.endsWith(`_SUCCEEDED`)||t.endsWith(`_COMPLETED`)?e[n]=`success`:t.startsWith(`FAILED_`)||t.startsWith(`ERROR_`)||t.startsWith(`BREACHED_`)||t.startsWith(`BLOCKED_`)||t===`MFA_AUTH_FAILED`||t===`MFA_AUTH_REJECTED`||t===`MFA_RECOVERY_FAILED`||t===`MFA_ENROLLMENT_FAILED`||t===`EMAIL_VERIFICATION_FAILED`||t===`WEBAUTHN_CHALLENGE_FAILED`||t===`WEBAUTHN_ENROLLMENT_FAILED`||t===`PASSKEY_CHALLENGE_FAILED`||t===`FLOWS_EXECUTION_FAILED`||t===`FORMS_SUBMISSION_FAILED`||t===`CIBA_EXCHANGE_FAILED`||t===`CIBA_START_FAILED`||t===`ACTIONS_EXECUTION_FAILED`||t===`RICH_CONSENTS_ACCESS_ERROR`||t===`USER_CANCELED_DEVICE_CONFIRMATION`||t===`TOO_MANY_MFA_FAILURES`||t===`MFA_RECOVERY_RATE_LIMIT_EXCEED`||t===`API_LIMIT`||t===`MAX_AMOUNT_OF_AUTHENTICATORS`?e[n]=`failure`:t.startsWith(`WARNING_`)||t===`API_LIMIT_WARNING`||t===`DEPRECATION_NOTICE`||t===`PRE_LOGIN_ASSESSMENT`?e[n]=`warning`:t===`CODE_SENT`||t===`CODE_LINK_SENT`||t===`MFA_EMAIL_SENT`||t===`MFA_SMS_SENT`||t===`EMAIL_VERIFICATION_SENT`||t===`PUSH_NOTIFICATION_SENT`?e[n]=`code_sent`:t===`INFORMATION`||t===`INFORMATION_FROM_SS_SSO_OPERATION`||t===`MANAGEMENT_API_READ_OPERATION`||t===`APPI`||t===`CONFIG_INHERITANCE_DIFF`||t===`CONFIG_DRIFT`||t===`ACLS_SUMMARY`||t===`ORGANIZATION_MEMBER_ADDED`?e[n]=`info`:e[n]=`other`;return e})();var rF=f.z.object({name:f.z.string(),version:f.z.string(),env:f.z.object({node:f.z.string().optional()}).optional()}),iF=f.z.object({country_code:f.z.string().length(2),city_name:f.z.string(),latitude:f.z.string(),longitude:f.z.string(),time_zone:f.z.string(),continent_code:f.z.string()});f.z.object({type:nF,date:f.z.string(),description:f.z.string().optional(),ip:f.z.string().optional(),user_agent:f.z.string().optional(),details:f.z.any().optional(),isMobile:f.z.boolean(),user_id:f.z.string().optional(),user_name:f.z.string().optional(),connection:f.z.string().optional(),connection_id:f.z.string().optional(),client_id:f.z.string().optional(),client_name:f.z.string().optional(),audience:f.z.string().optional(),scope:f.z.string().optional(),strategy:f.z.string().optional(),strategy_type:f.z.string().optional(),hostname:f.z.string().optional(),auth0_client:rF.optional(),log_id:f.z.string().optional(),location_info:iF.optional()}).extend({log_id:f.z.string()});var aF=f.z.enum([`http`,`eventbridge`,`eventgrid`,`splunk`,`datadog`,`sumo`,`firehose`]),oF=f.z.enum([`active`,`paused`,`suspended`]),sF=f.z.object({type:f.z.string(),name:f.z.string()});f.z.object({name:f.z.string(),type:aF,status:oF.optional(),sink:f.z.record(f.z.string(),f.z.unknown()),filters:f.z.array(sF).optional(),isPriority:f.z.boolean().optional()}).extend({id:f.z.string(),status:oF,created_at:f.z.string().optional(),updated_at:f.z.string().optional()});var cF=f.z.enum([`auth0`,`cognito`,`okta`,`oidc`]),lF=f.z.object({domain:f.z.string(),client_id:f.z.string(),client_secret:JM(),audience:f.z.string().optional(),scope:f.z.string().optional()}),uF=f.z.object({id:f.z.string().optional(),name:f.z.string(),provider:cF,connection:f.z.string(),enabled:f.z.boolean().default(!0),credentials:lF});f.z.object({id:f.z.string(),created_at:f.z.string(),updated_at:f.z.string()}).extend(uF.shape);var dF=f.z.object({enabled:f.z.boolean().optional(),shields:f.z.array(f.z.string()).optional(),admin_notification_frequency:f.z.array(f.z.string()).optional(),method:f.z.string().optional(),stage:f.z.object({"pre-user-registration":f.z.object({shields:f.z.array(f.z.string()).optional()}).optional(),"pre-change-password":f.z.object({shields:f.z.array(f.z.string()).optional()}).optional()}).optional()}),fF=f.z.object({enabled:f.z.boolean().optional(),shields:f.z.array(f.z.string()).optional(),allowlist:f.z.array(f.z.string()).optional(),mode:f.z.string().optional(),max_attempts:f.z.number().optional()}),pF=f.z.object({enabled:f.z.boolean().optional(),shields:f.z.array(f.z.string()).optional(),allowlist:f.z.array(f.z.string()).optional(),stage:f.z.object({"pre-login":f.z.object({max_attempts:f.z.number().optional(),rate:f.z.number().optional()}).optional(),"pre-user-registration":f.z.object({max_attempts:f.z.number().optional(),rate:f.z.number().optional()}).optional()}).optional()}),mF=f.z.object({breached_password_detection:dF.optional(),brute_force_protection:fF.optional(),suspicious_ip_throttling:pF.optional()});f.z.object({id:f.z.string().optional(),user_id:f.z.string(),password:f.z.string(),algorithm:f.z.enum([`bcrypt`,`argon2id`]).default(`argon2id`),is_current:f.z.boolean().default(!0)}).extend({id:f.z.string(),created_at:f.z.string(),updated_at:f.z.string()});var hF=f.z.object({initial_user_agent:f.z.string().describe(`First user agent of the device from which this user logged in`),initial_ip:f.z.string().describe(`First IP address associated with this session`),initial_asn:f.z.string().describe(`First autonomous system number associated with this session`),last_user_agent:f.z.string().describe(`Last user agent of the device from which this user logged in`),last_ip:f.z.string().describe(`Last IP address from which this user logged in`),last_asn:f.z.string().describe(`Last autonomous system number from which this user logged in`)}),gF=f.z.object({name:f.z.string().describe(`Authentication method name, e.g. "mfa" for a completed second factor`),timestamp:f.z.string().describe(`When the method was completed (ISO 8601)`),type:f.z.string().optional().describe(`For "mfa": the authentication method type used, e.g. "totp", "phone", "passkey"`)}),_F=f.z.object({methods:f.z.array(gF)}),vF=f.z.object({id:f.z.string(),revoked_at:f.z.string().optional(),used_at:f.z.string().optional(),user_id:f.z.string().describe(`The user ID associated with the session`),expires_at:f.z.string().optional(),login_session_id:f.z.string(),idle_expires_at:f.z.string().optional(),device:hF.describe(`Metadata related to the device used in the session`),clients:f.z.array(f.z.string()).describe(`List of client details for the session`),authentication:_F.optional().describe(`Authentication methods completed in this session (currently MFA only)`),session_transfer:eN.optional().describe(`Set when the session was created by redeeming a session_transfer_token`)});f.z.object({created_at:f.z.string(),updated_at:f.z.string(),authenticated_at:f.z.string(),last_interaction_at:f.z.string()}).extend(vF.shape),f.z.object({kid:f.z.string().openapi({description:`The key id of the signing key`}),tenant_id:f.z.string().optional().openapi({description:`The tenant the key belongs to. Omitted means the key is shared / control-plane scoped.`}),cert:f.z.string().openapi({description:`The public certificate of the signing key`}),fingerprint:f.z.string().openapi({description:`The cert fingerprint`}),thumbprint:f.z.string().openapi({description:`The cert thumbprint`}),pkcs7:f.z.string().optional().openapi({description:`The private key in pkcs7 format`}),current:f.z.boolean().optional().openapi({description:`True if the key is the current key`}),next:f.z.boolean().optional().openapi({description:`True if the key is the next key`}),previous:f.z.boolean().optional().openapi({description:`True if the key is the previous key`}),current_since:f.z.string().optional().openapi({description:`The date and time when the key became the current key`}),current_until:f.z.string().optional().openapi({description:`The date and time when the current key was rotated`}),revoked:f.z.boolean().optional().openapi({description:`True if the key is revoked`}),revoked_at:f.z.string().optional().openapi({description:`The date and time when the key was revoked`}),connection:f.z.string().optional().openapi({description:`The connection identifier associated with the key`}),type:f.z.enum([`jwt_signing`,`saml_encryption`]).openapi({description:`The type of the signing key`})});var yF=f.z.enum([`never`,`always`,`all-applications`,`confidence-score`]),bF={allow_remember_browser:f.z.boolean().optional(),remember_browser_lifetime_in_days:f.z.number().int().min(1).max(365).optional()};f.z.object({idle_session_lifetime:f.z.number().default(72),session_lifetime:f.z.number().default(168),session_cookie:f.z.object({mode:f.z.enum([`persistent`,`non-persistent`]).optional()}).optional(),enable_client_connections:f.z.boolean().optional(),default_redirection_uri:f.z.string().optional(),enabled_locales:f.z.array(f.z.string()).optional(),default_directory:f.z.string().optional(),error_page:f.z.object({html:f.z.string().optional(),show_log_link:f.z.boolean().optional(),url:f.z.string().optional()}).optional(),flags:f.z.object({allow_legacy_delegation_grant_types:f.z.boolean().optional(),allow_legacy_ro_grant_types:f.z.boolean().optional(),allow_legacy_tokeninfo_endpoint:f.z.boolean().optional(),disable_clickjack_protection_headers:f.z.boolean().optional(),enable_apis_section:f.z.boolean().optional(),enable_client_connections:f.z.boolean().optional(),enable_custom_domain_in_emails:f.z.boolean().optional(),enable_dynamic_client_registration:f.z.boolean().optional(),enable_idtoken_api2:f.z.boolean().optional(),enable_legacy_logs_search_v2:f.z.boolean().optional(),enable_legacy_profile:f.z.boolean().optional(),enable_pipeline2:f.z.boolean().optional(),enable_public_signup_user_exists_error:f.z.boolean().optional(),use_scope_descriptions_for_consent:f.z.boolean().optional(),disable_management_api_sms_obfuscation:f.z.boolean().optional(),enable_adfs_waad_email_verification:f.z.boolean().optional(),revoke_refresh_token_grant:f.z.boolean().optional(),dashboard_log_streams_next:f.z.boolean().optional(),dashboard_insights_view:f.z.boolean().optional(),disable_fields_map_fix:f.z.boolean().optional(),mfa_show_factor_list_on_enrollment:f.z.boolean().optional()}).optional(),friendly_name:f.z.string().optional(),picture_url:f.z.string().optional(),support_email:f.z.string().optional(),support_url:f.z.string().optional(),sandbox_version:f.z.string().optional(),sandbox_versions_available:f.z.array(f.z.string()).optional(),change_password:f.z.object({enabled:f.z.boolean(),html:f.z.string()}).optional(),guardian_mfa_page:f.z.object({enabled:f.z.boolean(),html:f.z.string()}).optional(),default_audience:f.z.string().optional(),default_organization:f.z.string().optional(),sessions:f.z.object({oidc_logout_prompt_enabled:f.z.boolean().optional()}).optional(),mfa:f.z.object({policy:yF.default(`never`).optional(),...bF,factors:f.z.object({sms:f.z.boolean().default(!1),otp:f.z.boolean().default(!1),email:f.z.boolean().default(!1),push_notification:f.z.boolean().default(!1),webauthn_roaming:f.z.boolean().default(!1),webauthn_platform:f.z.boolean().default(!1),recovery_code:f.z.boolean().default(!1),duo:f.z.boolean().default(!1)}).optional(),sms_provider:f.z.object({provider:f.z.enum([`twilio`,`vonage`,`aws_sns`,`phone_message_hook`]).optional()}).optional(),twilio:f.z.object({sid:JM().optional(),auth_token:JM().optional(),from:f.z.string().optional(),messaging_service_sid:f.z.string().optional()}).optional(),phone_message:f.z.object({message:f.z.string().optional()}).optional()}).optional()});var xF=f.z.object({id:f.z.string().optional(),parent_tenant_id:f.z.string().nullish(),config_sync:f.z.enum([`inherit-on-read`,`synced`,`detached`]).nullish(),config_sync_hash:f.z.string().nullish(),config_synced_at:f.z.string().nullish(),audience:f.z.string().optional(),friendly_name:f.z.string(),picture_url:f.z.string().optional(),support_email:f.z.string().optional(),support_url:f.z.string().optional(),sender_email:f.z.string().email().nullish(),sender_name:f.z.string().optional(),session_lifetime:f.z.number().optional(),idle_session_lifetime:f.z.number().optional(),ephemeral_session_lifetime:f.z.number().optional(),idle_ephemeral_session_lifetime:f.z.number().optional(),session_cookie:f.z.object({mode:f.z.enum([`persistent`,`non-persistent`]).optional()}).optional(),allowed_logout_urls:f.z.array(f.z.string()).optional(),default_redirection_uri:f.z.string().optional(),default_client_id:f.z.string().optional(),enabled_locales:f.z.array(f.z.string()).optional(),default_directory:f.z.string().optional(),error_page:f.z.object({html:f.z.string().optional(),show_log_link:f.z.boolean().optional(),url:f.z.string().optional()}).nullish(),flags:f.z.object({allow_changing_enable_sso:f.z.boolean().optional(),allow_legacy_delegation_grant_types:f.z.boolean().optional(),allow_legacy_ro_grant_types:f.z.boolean().optional(),allow_legacy_tokeninfo_endpoint:f.z.boolean().optional(),change_pwd_flow_v1:f.z.boolean().optional(),client_id_metadata_document_registration:f.z.boolean().optional(),custom_domains_provisioning:f.z.boolean().optional(),dashboard_insights_view:f.z.boolean().optional(),dashboard_log_streams_next:f.z.boolean().optional(),disable_clickjack_protection_headers:f.z.boolean().optional(),disable_fields_map_fix:f.z.boolean().optional(),disable_impersonation:f.z.boolean().optional(),disable_management_api_sms_obfuscation:f.z.boolean().optional(),enable_adfs_waad_email_verification:f.z.boolean().optional(),enable_apis_section:f.z.boolean().optional(),enable_client_connections:f.z.boolean().optional(),enable_custom_domain_in_emails:f.z.boolean().optional(),enable_dynamic_client_registration:f.z.boolean().optional(),dcr_require_initial_access_token:f.z.boolean().optional(),dcr_allowed_grant_types:f.z.array(f.z.string()).optional(),allow_http_return_to:f.z.array(f.z.string().refine(e=>{try{let t=new URL(e);return t.protocol===`http:`&&(t.pathname===``||t.pathname===`/`)&&!t.search&&!t.hash&&e===t.origin}catch{return!1}},{message:`must be a fully-qualified http origin (scheme + host + port, no path)`})).optional(),enable_idtoken_api2:f.z.boolean().optional(),enable_legacy_logs_search_v2:f.z.boolean().optional(),enable_legacy_profile:f.z.boolean().optional(),enable_pipeline2:f.z.boolean().optional(),enable_public_signup_user_exists_error:f.z.boolean().optional(),enable_sso:f.z.boolean().optional(),enforce_client_authentication_on_passwordless_start:f.z.boolean().optional(),genai_trial:f.z.boolean().optional(),improved_signup_bot_detection_in_classic:f.z.boolean().optional(),mfa_show_factor_list_on_enrollment:f.z.boolean().optional(),no_disclose_enterprise_connections:f.z.boolean().optional(),remove_alg_from_jwks:f.z.boolean().optional(),revoke_refresh_token_grant:f.z.boolean().optional(),trust_azure_adfs_email_verified_connection_property:f.z.boolean().optional(),use_scope_descriptions_for_consent:f.z.boolean().optional(),inherit_global_permissions_in_organizations:f.z.boolean().optional(),restrict_undefined_scopes:f.z.boolean().optional(),universal_login_version:f.z.enum([`1`,`2`]).optional()}).optional(),sandbox_version:f.z.string().optional(),legacy_sandbox_version:f.z.string().optional(),sandbox_versions_available:f.z.array(f.z.string()).optional(),change_password:f.z.object({enabled:f.z.boolean().optional(),html:f.z.string().optional()}).optional(),guardian_mfa_page:f.z.object({enabled:f.z.boolean().optional(),html:f.z.string().optional()}).optional(),device_flow:f.z.object({charset:f.z.enum([`base20`,`digits`]).optional(),mask:f.z.string().max(20).optional()}).optional(),default_token_quota:f.z.object({clients:f.z.object({client_credentials:f.z.record(f.z.string(),f.z.any()).optional()}).optional(),organizations:f.z.object({client_credentials:f.z.record(f.z.string(),f.z.any()).optional()}).optional()}).nullish(),default_audience:f.z.string().optional(),default_organization:f.z.string().optional(),sessions:f.z.object({oidc_logout_prompt_enabled:f.z.boolean().optional()}).optional(),oidc_logout:f.z.object({rp_logout_end_session_endpoint_discovery:f.z.boolean().optional()}).optional(),allow_organization_name_in_authentication_api:f.z.boolean().optional(),customize_mfa_in_postlogin_action:f.z.boolean().optional(),acr_values_supported:f.z.array(f.z.string()).optional(),mtls:f.z.object({enable_endpoint_aliases:f.z.boolean().optional()}).nullish(),pushed_authorization_requests_supported:f.z.boolean().optional(),authorization_response_iss_parameter_supported:f.z.boolean().optional(),deployment_type:f.z.enum([`shared`,`wfp`]).default(`shared`).optional(),provisioning_state:f.z.enum([`pending`,`ready`,`failed`]).default(`ready`).optional(),provisioning_error:f.z.string().max(2048).optional(),provisioning_state_changed_at:f.z.string().optional(),bundle_configuration:f.z.string().max(64).optional(),worker_version:f.z.string().max(64).optional(),database_version:f.z.string().max(64).optional(),worker_script_name:f.z.string().max(255).optional(),storage_kind:f.z.enum([`own_d1`,`existing_d1`,`shared_planetscale`]).optional(),d1_database_id:f.z.string().max(64).optional(),attack_protection:mF.optional(),mfa:f.z.object({policy:yF.default(`never`).optional(),...bF,factors:f.z.object({sms:f.z.boolean().default(!1),otp:f.z.boolean().default(!1),email:f.z.boolean().default(!1),push_notification:f.z.boolean().default(!1),webauthn_roaming:f.z.boolean().default(!1),webauthn_platform:f.z.boolean().default(!1),recovery_code:f.z.boolean().default(!1),duo:f.z.boolean().default(!1)}).optional(),sms_provider:f.z.object({provider:f.z.enum([`twilio`,`vonage`,`aws_sns`,`phone_message_hook`]).optional()}).optional(),twilio:f.z.object({sid:JM().optional(),auth_token:JM().optional(),from:f.z.string().optional(),messaging_service_sid:f.z.string().optional()}).optional(),phone_message:f.z.object({message:f.z.string().optional()}).optional()}).optional()});f.z.object({created_at:f.z.string().nullable().transform(e=>e??``),updated_at:f.z.string().nullable().transform(e=>e??``)}).extend(xF.shape).extend({id:f.z.string(),is_control_plane:f.z.boolean().optional(),has_children:f.z.boolean().optional()});var SF=xF.shape.mfa.unwrap().shape,CF=f.z.object({...SF,policy:yF.optional(),factors:f.z.object({sms:f.z.boolean().optional(),otp:f.z.boolean().optional(),email:f.z.boolean().optional(),push_notification:f.z.boolean().optional(),webauthn_roaming:f.z.boolean().optional(),webauthn_platform:f.z.boolean().optional(),recovery_code:f.z.boolean().optional(),duo:f.z.boolean().optional()}).optional()});f.z.object(xF.shape).extend({deployment_type:f.z.enum([`shared`,`wfp`]),provisioning_state:f.z.enum([`pending`,`ready`,`failed`]),mfa:CF}).partial();var wF=f.z.enum([`provision`,`seed`,`upgrade`,`backup`,`deprovision`,`users_import`,`sync-defaults`,`detach`,`tenant-members-request`]),TF=f.z.enum([`pending`,`running`,`succeeded`,`failed`,`cancelled`]),EF=f.z.string().max(64);f.z.object({tenant_id:f.z.string().max(255).nullable().default(null),rollout_id:f.z.string().max(255).nullable().optional(),kind:wF,engine:EF,engine_instance_id:f.z.string().max(100).nullable().optional(),target_worker_version:f.z.string().max(255).nullable().optional(),target_database_version:f.z.string().max(255).nullable().optional(),initiated_by:f.z.string().max(255).nullable().optional(),input:f.z.record(f.z.string(),f.z.unknown()).nullable().optional()}).extend({id:f.z.string(),status:TF,current_step:f.z.string().max(255).nullable().optional(),error:f.z.string().nullable().optional(),result:f.z.record(f.z.string(),f.z.unknown()).nullable().optional(),claimed_by:f.z.string().max(255).nullable().optional(),claim_expires_at:f.z.string().nullable().optional(),created_at:f.z.string(),updated_at:f.z.string(),finished_at:f.z.string().nullable().optional()}).pick({status:!0,current_step:!0,engine_instance_id:!0,target_worker_version:!0,target_database_version:!0,error:!0,result:!0,claimed_by:!0,claim_expires_at:!0,finished_at:!0}).partial();var DF=f.z.enum([`started`,`succeeded`,`failed`,`retried`,`skipped`,`reconciled`]);f.z.object({operation_id:f.z.string().max(255),step:f.z.string().max(255),outcome:DF,detail:f.z.record(f.z.string(),f.z.unknown()).nullable().optional(),attempt:f.z.number().int().min(1).default(1)}).extend({id:f.z.string(),created_at:f.z.string()});var OF=f.z.enum([`pending`,`inserted`,`updated`,`failed`,`skipped`]);f.z.object({operation_id:f.z.string().max(255),seq:f.z.number().int().min(0),payload:f.z.record(f.z.string(),f.z.unknown()),status:OF.default(`pending`),error_code:f.z.string().max(64).nullable().optional(),error_message:f.z.string().nullable().optional(),error_path:f.z.string().max(255).nullable().optional(),entity_id:f.z.string().max(255).nullable().optional()}).extend({status:OF,created_at:f.z.string(),updated_at:f.z.string()}),f.z.object({seq:f.z.number().int().min(0),status:OF,error_code:f.z.string().max(64).nullable().optional(),error_message:f.z.string().nullable().optional(),error_path:f.z.string().max(255).nullable().optional(),entity_id:f.z.string().max(255).nullable().optional()});var kF=f.z.enum([`upgrade`,`reseed`,`backup`,`config-sync`]),AF=f.z.enum([`pending`,`canary`,`rolling`,`paused`,`done`,`failed`]);f.z.object({kind:kF,target_worker_version:f.z.string().max(255).nullable().optional(),target_database_version:f.z.string().max(255).nullable().optional(),wave_size:f.z.number().int().min(1).default(10),canary_tenant_ids:f.z.array(f.z.string()).nullable().optional(),filter:f.z.record(f.z.string(),f.z.unknown()).nullable().optional(),initiated_by:f.z.string().max(255).nullable().optional(),config:f.z.record(f.z.string(),f.z.unknown()).nullable().optional()}).extend({id:f.z.string(),status:AF,created_at:f.z.string(),updated_at:f.z.string(),finished_at:f.z.string().nullable().optional(),paused_reason:f.z.string().nullable().optional()}).pick({status:!0,wave_size:!0,canary_tenant_ids:!0,filter:!0,config:!0,paused_reason:!0,finished_at:!0}).partial();var jF=f.z.enum([`invite`,`add_members`,`remove_members`,`assign_roles`,`remove_roles`,`revoke_invitation`]),MF=f.z.enum([`pending`,`succeeded`,`failed`]);f.z.object({kind:jF,requested_by:f.z.string().min(1).max(255),payload:f.z.record(f.z.string(),f.z.unknown())}).extend({id:f.z.string(),tenant_id:f.z.string(),status:MF,result:f.z.record(f.z.string(),f.z.unknown()).nullable().optional(),error:f.z.string().nullable().optional(),notified_at:f.z.string().nullable().optional(),created_at:f.z.string(),updated_at:f.z.string(),finished_at:f.z.string().nullable().optional()}),f.z.object({status:MF.optional(),result:f.z.record(f.z.string(),f.z.unknown()).nullable().optional(),error:f.z.string().nullable().optional(),notified_at:f.z.string().nullable().optional(),finished_at:f.z.string().nullable().optional()}),f.z.object({access_token:f.z.string(),id_token:f.z.string().optional(),scope:f.z.string().optional(),state:f.z.string().optional(),refresh_token:f.z.string().optional(),token_type:f.z.string(),expires_in:f.z.number(),issued_token_type:f.z.string().optional()}),f.z.object({code:f.z.string(),state:f.z.string().optional()});var NF=f.z.object({button_border_radius:f.z.number(),button_border_weight:f.z.number(),buttons_style:f.z.enum([`pill`,`rounded`,`sharp`]),input_border_radius:f.z.number(),input_border_weight:f.z.number(),inputs_style:f.z.enum([`pill`,`rounded`,`sharp`]),show_widget_shadow:f.z.boolean(),widget_border_weight:f.z.number(),widget_corner_radius:f.z.number()}),PF=f.z.object({base_focus_color:f.z.string(),base_hover_color:f.z.string(),body_text:f.z.string(),captcha_widget_theme:f.z.enum([`auto`,`dark`,`light`]),error:f.z.string(),header:f.z.string(),icons:f.z.string(),input_background:f.z.string(),input_border:f.z.string(),input_filled_text:f.z.string(),input_labels_placeholders:f.z.string(),links_focused_components:f.z.string(),primary_button:f.z.string(),primary_button_label:f.z.string(),secondary_button_border:f.z.string(),secondary_button_label:f.z.string(),success:f.z.string(),widget_background:f.z.string(),widget_border:f.z.string()}),FF=PF.omit({captcha_widget_theme:!0}).partial(),IF=f.z.object({bold:f.z.boolean(),size:f.z.number()}),LF=f.z.object({body_text:IF,buttons_text:IF,font_url:f.z.string(),input_labels:IF,links:IF,links_style:f.z.enum([`normal`,`underlined`]),reference_text_size:f.z.number(),subtitle:IF,title:IF}),RF=f.z.object({background_color:f.z.string(),background_image_url:f.z.string(),background_color_dark:f.z.string().optional(),background_image_url_dark:f.z.string().optional(),page_layout:f.z.enum([`center`,`left`,`right`]),logo_placement:f.z.enum([`widget`,`chip`,`none`]).optional()}),zF=f.z.object({header_text_alignment:f.z.enum([`center`,`left`,`right`]),logo_height:f.z.number(),logo_position:f.z.enum([`center`,`left`,`none`,`right`]),logo_url:f.z.string(),logo_url_dark:f.z.string().optional(),social_buttons_layout:f.z.enum([`bottom`,`top`])});f.z.object({borders:NF,colors:PF,colors_dark:FF.optional(),displayName:f.z.string(),fonts:LF,page_background:RF,widget:zF}).extend({themeId:f.z.string()}),f.z.object({..._M,universal_login_experience:f.z.enum([`new`,`classic`]).default(`new`),identifier_first:f.z.boolean().default(!0),password_first:f.z.boolean().default(!1),show_last_used_connection:f.z.boolean().default(!1),webauthn_platform_first_factor:f.z.boolean()});var BF=f.z.object({hosts:f.z.array(f.z.string()).optional(),methods:f.z.array(f.z.string()).optional(),path:f.z.string().default(`/*`),headers:f.z.record(f.z.string(),f.z.string()).optional(),query:f.z.record(f.z.string(),f.z.string()).optional()}),VF=f.z.object({type:f.z.string(),options:f.z.record(f.z.string(),f.z.unknown()).default({})}),HF=f.z.object({id:f.z.string().optional(),custom_domain_id:f.z.string(),priority:f.z.number().int().default(100),match:BF,handlers:f.z.array(VF).min(1)});HF.extend({id:f.z.string(),tenant_id:f.z.string(),created_at:f.z.string(),updated_at:f.z.string()}),HF.partial().omit({id:!0,custom_domain_id:!0});var UF=`custom_authentication`,WF=[`urn:ietf:params:oauth:`,`urn:auth0`,`urn:okta`,`http://auth0.com`,`https://auth0.com`,`http://okta.com`,`https://okta.com`],GF=f.z.string().min(1).max(200).refine(e=>e.startsWith(`https://`)||e.startsWith(`urn:`),{message:`subject_token_type must be a URI starting with https:// or urn:`}).refine(e=>!WF.some(t=>e.toLowerCase().startsWith(t)),{message:`subject_token_type uses a reserved namespace`}),KF=f.z.enum([`RS256`,`RS384`,`RS512`,`ES256`,`ES384`,`ES512`]),qF=f.z.discriminatedUnion(`type`,[f.z.object({type:f.z.literal(`connection`),connection:f.z.string().min(1),create_if_not_exists:f.z.boolean().default(!0),trust_email_verified:f.z.boolean().default(!1)}),f.z.object({type:f.z.literal(`user_id`)})]),JF=f.z.object({issuer:f.z.string().min(1).max(2048),jwks:QP.optional(),jwks_uri:f.z.string().url().optional(),audience:f.z.array(f.z.string().min(1)).min(1).optional(),algorithms:f.z.array(KF).min(1).optional(),max_lifetime_seconds:f.z.number().int().min(1).max(3600).default(300),require_jti:f.z.boolean().default(!0),user_mapping:qF});f.z.object({name:f.z.string().min(1).max(255),subject_token_type:GF,action_id:f.z.string().min(1).optional(),type:f.z.literal(UF),jwt_verification:JF.optional()}).extend({id:f.z.string(),created_at:f.z.string(),updated_at:f.z.string()}),f.z.object({name:f.z.string().min(1).max(255).optional(),subject_token_type:GF.optional(),jwt_verification:JF.optional()});var YF=f.z.enum([`oidc`,`samlp`,`waad`,`google-apps`,`adfs`,`okta`,`auth0-samlp`,`okta-samlp`,`keycloak-samlp`,`pingfederate`]),XF=f.z.object({name:f.z.string(),description:f.z.string(),is_optional:f.z.boolean()}),ZF=f.z.object({logo_url:f.z.string().optional(),colors:f.z.object({primary:f.z.string()}).optional()});f.z.object({name:f.z.string(),description:f.z.string().optional(),allowed_strategies:f.z.array(YF).optional(),user_attributes:f.z.array(XF).optional(),branding:ZF.optional()}).extend({id:f.z.string(),created_at:f.z.string(),updated_at:f.z.string()});var QF=f.z.record(f.z.string(),f.z.string()),$F=f.z.enum([`none`,`optional`,`required`]),eI=f.z.object({icon_url:f.z.string().optional(),domain_aliases:f.z.array(f.z.string()).optional()}),tI=f.z.object({name:f.z.string(),display_name:f.z.string().optional(),is_domain_connection:f.z.boolean().optional(),show_as_button:f.z.boolean().optional(),metadata:f.z.record(f.z.string(),f.z.string()).optional(),options:eI.optional()}),nI=f.z.object({organization_id:f.z.string(),assign_membership_on_login:f.z.boolean().optional(),show_as_button:f.z.boolean().optional()});f.z.object({id:f.z.string(),profile_id:f.z.string(),connection_id:f.z.string().optional(),connection_config:tI.optional(),enabled_clients:f.z.array(f.z.string()),enabled_organizations:f.z.array(nI),domain_verification:$F,expires_at:f.z.string(),revoked_at:f.z.string().optional(),completed_at:f.z.string().optional(),created_at:f.z.string(),updated_at:f.z.string()});var rI=f.z.object({scim:f.z.string(),auth0:f.z.string()}),iI=f.z.object({connection_id:f.z.string(),user_id_attribute:f.z.string().default(`externalId`),mapping:f.z.array(rI).default([])});f.z.object({created_at:f.z.string(),updated_at:f.z.string()}).extend(iI.shape);var aI=f.z.object({token_id:f.z.string(),connection_id:f.z.string(),token_hash:f.z.string(),scopes:f.z.array(f.z.string()).default([]),valid_until:f.z.string().optional()});f.z.object({created_at:f.z.string(),last_used_at:f.z.string().optional()}).extend(aI.shape);var oI=f.z.object({connection_id:f.z.string(),external_id:f.z.string(),user_id:f.z.string()});f.z.object({created_at:f.z.string()}).extend(oI.shape),f.z.object({..._M,name:f.z.string(),enabled:f.z.boolean().optional().default(!0),default_from_address:f.z.string().optional(),credentials:f.z.record(f.z.string(),f.z.unknown()),settings:f.z.object({}).optional()});var sI=f.z.enum([`verify_email`,`verify_email_by_code`,`reset_email`,`reset_email_by_code`,`welcome_email`,`blocked_account`,`stolen_credentials`,`enrollment_email`,`mfa_oob_code`,`change_password`,`password_reset`,`user_invitation`]);f.z.object({template:sI,body:f.z.string(),from:f.z.string(),subject:f.z.string(),syntax:f.z.literal(`liquid`).default(`liquid`),resultUrl:f.z.string().optional(),urlLifetimeInSeconds:f.z.number().int().nonnegative().optional(),includeEmailInRedirect:f.z.boolean().default(!1),enabled:f.z.boolean().default(!0)}),f.z.object({id:f.z.string(),login_id:f.z.string(),session_id:f.z.string().optional(),organization:f.z.string().optional(),auth_connection:f.z.string().optional(),auth_strategy:tF.optional(),session_transfer:eN.optional(),user_id:f.z.string(),client_id:f.z.string(),expires_at:f.z.string().optional(),idle_expires_at:f.z.string().optional(),last_exchanged_at:f.z.string().optional(),device:hF,resource_servers:f.z.array(f.z.object({audience:f.z.string(),scopes:f.z.string()})),rotating:f.z.boolean(),token_lookup:f.z.string().optional(),token_hash:f.z.string().optional(),family_id:f.z.string().optional(),rotated_to:f.z.string().optional(),rotated_at:f.z.string().optional()}).extend({created_at:f.z.string(),revoked_at:f.z.string().optional()}),f.z.object({to:f.z.string(),message:f.z.string()}),f.z.object({name:f.z.string(),options:f.z.object({})});var cI=f.z.object({value:f.z.string(),description:f.z.string().optional()}),lI=f.z.object({token_dialect:f.z.enum([`access_token`,`access_token_authz`]).optional(),enforce_policies:f.z.boolean().optional(),allow_skipping_userinfo:f.z.boolean().optional(),skip_userinfo:f.z.boolean().optional(),persist_client_authorization:f.z.boolean().optional(),enable_introspection_endpoint:f.z.boolean().optional(),mtls:f.z.object({bound_access_tokens:f.z.boolean().optional()}).optional()}),uI=f.z.object({id:f.z.string().optional(),name:f.z.string(),identifier:f.z.string(),scopes:f.z.array(cI).optional(),signing_alg:f.z.string().optional(),signing_secret:JM().optional(),token_lifetime:f.z.number().default(86400),token_lifetime_for_web:f.z.number().default(7200),skip_consent_for_verifiable_first_party_clients:f.z.boolean().optional(),allow_offline_access:f.z.boolean().optional(),verificationKey:f.z.string().optional(),options:lI.optional(),is_system:f.z.boolean().optional(),..._M,metadata:f.z.record(f.z.string(),f.z.any()).optional()}).extend({created_at:f.z.string().optional(),updated_at:f.z.string().optional()});f.z.array(uI);var dI=f.z.object({role_id:f.z.string(),resource_server_identifier:f.z.string(),permission_name:f.z.string()}).extend({created_at:f.z.string()});f.z.array(dI),f.z.object({user_id:f.z.string().openapi({description:`The id of the user that granted the consent`}),clientID:f.z.string().openapi({description:`The id of the client the grant was issued to`}),audience:f.z.string().optional().openapi({description:`The audience the grant applies to`}),scope:f.z.array(f.z.string()).default([]).openapi({description:`The list of OAuth scopes the user has consented to`})}).extend({id:f.z.string()}),f.z.object({user_id:f.z.string(),last_login:f.z.string().optional(),last_ip:f.z.string().optional(),login_count:f.z.number().default(0),failed_logins:f.z.array(f.z.string()).optional(),last_password_reset:f.z.string().optional()});var fI=f.z.object({user_id:f.z.string(),resource_server_identifier:f.z.string(),permission_name:f.z.string(),organization_id:f.z.string().optional()}).extend({tenant_id:f.z.string(),created_at:f.z.string().optional()});f.z.array(fI);var pI=f.z.object({user_id:f.z.string(),resource_server_identifier:f.z.string(),resource_server_name:f.z.string(),permission_name:f.z.string(),description:f.z.string().nullable().optional(),created_at:f.z.string().optional(),organization_id:f.z.string().optional()});f.z.array(pI);var mI=f.z.object({user_id:f.z.string(),role_id:f.z.string(),organization_id:f.z.string().optional()}).extend({tenant_id:f.z.string(),created_at:f.z.string().optional()});f.z.array(mI);var hI=f.z.object({id:f.z.string().optional().openapi({description:`The unique identifier of the role. If not provided, one will be generated.`}),name:f.z.string().min(1).max(50).openapi({description:`The name of the role. Cannot include '<' or '>'`}),description:f.z.string().max(255).optional().openapi({description:`The description of the role`}),is_system:f.z.boolean().optional(),metadata:f.z.record(f.z.string(),f.z.any()).optional().openapi({description:`Metadata associated with the role. Can be used to control sync behavior in multi-tenancy scenarios.`})}).extend({id:f.z.string().openapi({description:`The unique identifier of the role`}),created_at:f.z.string().optional(),updated_at:f.z.string().optional()});f.z.array(hI);var gI=f.z.object({logo_url:f.z.string().optional().openapi({description:`URL of the organization's logo`}),colors:f.z.object({primary:f.z.string().optional().openapi({description:`Primary color in hex format (e.g., #FF0000)`}),page_background:f.z.string().optional().openapi({description:`Page background color in hex format (e.g., #FFFFFF)`})}).optional()}).optional(),_I=f.z.object({connection_id:f.z.string().openapi({description:`ID of the connection`}),assign_membership_on_login:f.z.boolean().default(!1).openapi({description:`Whether to assign membership to the organization on login`}),show_as_button:f.z.boolean().default(!0).openapi({description:`Whether to show this connection as a button in the login screen`}),is_signup_enabled:f.z.boolean().default(!0).openapi({description:`Whether signup is enabled for this connection`})}),vI=f.z.object({client_credentials:f.z.object({enforce:f.z.boolean().default(!1).openapi({description:`Whether to enforce token quota limits`}),per_day:f.z.number().min(0).default(0).openapi({description:`Maximum tokens per day (0 = unlimited)`}),per_hour:f.z.number().min(0).default(0).openapi({description:`Maximum tokens per hour (0 = unlimited)`})}).optional()}).optional();f.z.object({id:f.z.string().optional(),name:f.z.string().min(1).regex(/^[a-z0-9_-]+$/,{message:`Organization name must be lowercase and can only contain letters, numbers, hyphens, and underscores`}).openapi({description:`The name of the organization. Must be lowercase and can only contain letters, numbers, hyphens, and underscores.`}),display_name:f.z.string().optional().openapi({description:`The display name of the organization`}),branding:gI,metadata:f.z.record(f.z.string(),f.z.any()).default({}).optional().openapi({description:`Custom metadata for the organization`}),enabled_connections:f.z.array(_I).default([]).optional().openapi({description:`List of enabled connections for the organization`}),token_quota:vI}).extend(mM.shape).extend({id:f.z.string(),name:f.z.string().min(1).openapi({description:`The name of the organization`})});var yI=f.z.object({connection_id:f.z.string().openapi({description:`ID of the tenant-level connection to enable for the org.`}),assign_membership_on_login:f.z.boolean().optional().default(!1),show_as_button:f.z.boolean().optional().default(!0),is_signup_enabled:f.z.boolean().optional().default(!0)}).extend({connection:f.z.object({name:f.z.string().optional(),strategy:f.z.string().optional()}).optional(),created_at:f.z.string().optional(),updated_at:f.z.string().optional()});f.z.array(yI),f.z.object({user_id:f.z.string().openapi({description:`ID of the user`}),organization_id:f.z.string().openapi({description:`ID of the organization`})}).extend(mM.shape).extend({id:f.z.string()}),f.z.object({date:f.z.string().openapi({description:`Date these events occurred in ISO 8601 format`,example:`2025-12-19`}),logins:f.z.number().openapi({description:`Number of logins on this date`,example:150}),signups:f.z.number().openapi({description:`Number of signups on this date`,example:25}),leaked_passwords:f.z.number().openapi({description:`Number of breached-password detections on this date (subscription required)`,example:0}),updated_at:f.z.string().openapi({description:`Date and time this stats entry was last updated in ISO 8601 format`,example:`2025-12-19T10:30:00.000Z`}),created_at:f.z.string().openapi({description:`Approximate date and time the first event occurred in ISO 8601 format`,example:`2025-12-19T00:00:00.000Z`})}),f.z.number().openapi({description:`Number of active users in the last 30 days`,example:1234}),f.z.enum([`active-users`,`logins`,`signups`,`refresh-tokens`,`sessions`,`logouts`,`password-changes`,`password-migrations`,`mfa`,`email-verifications`,`codes-sent`]),f.z.enum([`hour`,`day`,`week`,`month`]),f.z.enum([`time`,`connection`,`client_id`,`user_type`,`event`]),f.z.enum([`password`,`social`,`passwordless`,`enterprise`]);var bI=f.z.object({cohort:f.z.string(),sessions:f.z.number(),active:f.z.array(f.z.number())});f.z.object({interval:f.z.literal(`week`),from:f.z.string(),to:f.z.string(),cohorts:f.z.array(bI)});var xI=f.z.object({cohort:f.z.string(),tokens:f.z.number(),active:f.z.array(f.z.number())});f.z.object({interval:f.z.literal(`week`),from:f.z.string(),to:f.z.string(),cohorts:f.z.array(xI)});var SI=f.z.object({name:f.z.string(),type:f.z.string()}),CI=f.z.object({elapsed:f.z.number(),rows_read:f.z.number().optional(),bytes_read:f.z.number().optional()});f.z.object({meta:f.z.array(SI),data:f.z.array(f.z.record(f.z.string(),f.z.any())),rows:f.z.number(),rows_before_limit_at_least:f.z.number().optional(),statistics:CI.optional()});var wI=f.z.enum(`login.login-id.login-password.signup.signup-id.signup-password.reset-password.consent.mfa.mfa-push.mfa-otp.mfa-voice.mfa-phone.mfa-webauthn.mfa-email.mfa-recovery-code.status.device-flow.email-verification.email-otp-challenge.organizations.invitation.common.passkeys.captcha.custom-form.login-passwordless.mfa-login-options`.split(`.`)),TI=f.z.record(f.z.string(),f.z.record(f.z.string(),f.z.string())).openapi({type:`object`,additionalProperties:{type:`object`,additionalProperties:{type:`string`}}});f.z.object({prompt:wI,language:f.z.string(),custom_text:TI});var EI=f.z.object({"form-content-start":f.z.string().optional(),"form-content-end":f.z.string().optional(),"form-footer-start":f.z.string().optional(),"form-footer-end":f.z.string().optional(),"secondary-actions-start":f.z.string().optional(),"secondary-actions-end":f.z.string().optional()}).strict(),DI=f.z.record(f.z.string(),EI);f.z.object({prompt:f.z.string(),partials:DI});var OI=f.z.enum([`phone`,`totp`,`email`,`push`,`webauthn-roaming`,`webauthn-platform`,`passkey`]),kI=f.z.object({user_id:f.z.string(),type:OI,phone_number:f.z.string().optional(),totp_secret:f.z.string().optional(),totp_last_step:f.z.number().int().nonnegative().optional(),credential_id:f.z.string().optional(),public_key:f.z.string().optional(),sign_count:f.z.number().int().nonnegative().optional(),credential_backed_up:f.z.boolean().optional(),transports:f.z.array(f.z.string()).optional(),friendly_name:f.z.string().optional(),confirmed:f.z.boolean().default(!1)});function AI(e,t){e.type===`phone`&&!e.phone_number&&t.addIssue({code:f.z.ZodIssueCode.custom,message:`phone_number is required when type is 'phone'`,path:[`phone_number`]}),e.type===`totp`&&!e.totp_secret&&t.addIssue({code:f.z.ZodIssueCode.custom,message:`totp_secret is required when type is 'totp'`,path:[`totp_secret`]}),[`webauthn-roaming`,`webauthn-platform`,`passkey`].includes(e.type)&&(e.credential_id||t.addIssue({code:f.z.ZodIssueCode.custom,message:`credential_id is required when type is '${e.type}'`,path:[`credential_id`]}),e.public_key||t.addIssue({code:f.z.ZodIssueCode.custom,message:`public_key is required when type is '${e.type}'`,path:[`public_key`]}))}kI.superRefine(AI),kI.extend({id:f.z.string(),created_at:f.z.string(),updated_at:f.z.string()}).superRefine(AI),f.z.object({id:f.z.string().optional(),created_at:f.z.string().datetime({offset:!0}).optional(),updated_at:f.z.string().datetime({offset:!0}).optional()}),f.z.enum([`verify_email`,`verify_email_by_code`,`reset_email`,`reset_email_by_code`,`welcome_email`,`verification_code`,`mfa_oob_code`,`enrollment_email`,`blocked_account`,`stolen_credentials`,`try_provider_configuration_email`,`organization_invitation`]),f.z.enum([`otp_verify`,`otp_enroll`,`blocked_account`,`change_password`,`password_breach`]);function jI(e){let t=``;for(let n of e)t+=String.fromCharCode(n);return btoa(t)}function MI(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}f.z.record(f.z.string(),f.z.record(f.z.string(),QF));var NI=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`,PI=(e=21)=>{let t=``,n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=NI[n[e]&63];return t};async function FI(e){let t=new DecompressionStream(`deflate-raw`),n=new Uint8Array(e),r=new Blob([n]).stream().pipeThrough(t);return new Uint8Array(await new Response(r).arrayBuffer())}async function II(e){let t=MI(e.replace(/ /g,`+`));try{let e=await FI(t);return new TextDecoder().decode(e)}catch(e){return console.warn(`Decompression failed, assuming data is not compressed:`,e),new TextDecoder().decode(t)}}async function LI(e){let t=await II(e),n=new Uj({attributeNamePrefix:`@_`,alwaysCreateTextNode:!0,ignoreAttributes:!1});return ak.parse(n.parse(t))}async function RI(e){let t=e=>e.replace(/&/g,`&amp;`).replace(/"/g,`&quot;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`),n=e.success?`urn:oasis:names:tc:SAML:2.0:status:Success`:`urn:oasis:names:tc:SAML:2.0:status:Responder`,r=e.inResponseTo?` InResponseTo="${t(e.inResponseTo)}"`:``,i=!e.success&&e.statusMessage?`<samlp:StatusMessage>${t(e.statusMessage)}</samlp:StatusMessage>`:``,a=`<samlp:LogoutResponse xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" ID="_${PI()}" Version="2.0" IssueInstant="${new Date().toISOString()}" Destination="${t(e.destination)}"${r}><saml:Issuer>${t(e.issuer)}</saml:Issuer><samlp:Status><samlp:StatusCode Value="${n}"/>${i}</samlp:Status></samlp:LogoutResponse>`,o=new Blob([new TextEncoder().encode(a)]).stream().pipeThrough(new CompressionStream(`deflate-raw`)),s=new Uint8Array(await new Response(o).arrayBuffer()),c=``;for(let e of s)c+=String.fromCharCode(e);return btoa(c)}function zI(e){let t=e.certificates.map(e=>({"@_use":`signing`,KeyInfo:{"@_xmlns":`http://www.w3.org/2000/09/xmldsig#`,X509Data:{X509Certificate:e}}})),n={EntityDescriptor:{"@_entityID":e.entityId,"@_xmlns":`urn:oasis:names:tc:SAML:2.0:metadata`,IDPSSODescriptor:{"@_protocolSupportEnumeration":`urn:oasis:names:tc:SAML:2.0:protocol`,KeyDescriptor:t,SingleLogoutService:[{"@_Binding":`urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect`,"@_Location":e.singleLogoutServiceUrl},{"@_Binding":`urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST`,"@_Location":e.singleLogoutServiceUrl}],NameIDFormat:[`urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress`,`urn:oasis:names:tc:SAML:2.0:nameid-format:persistent`,`urn:oasis:names:tc:SAML:2.0:nameid-format:transient`],SingleSignOnService:[{"@_Binding":`urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect`,"@_Location":e.assertionConsumerServiceUrl},{"@_Binding":`urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST`,"@_Location":e.assertionConsumerServiceUrl}],Attribute:[{"@_Name":`http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress`,"@_NameFormat":`urn:oasis:names:tc:SAML:2.0:attrname-format:uri`,"@_FriendlyName":`E-Mail Address`,"@_xmlns":`urn:oasis:names:tc:SAML:2.0:assertion`},{"@_Name":`http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname`,"@_NameFormat":`urn:oasis:names:tc:SAML:2.0:attrname-format:uri`,"@_FriendlyName":`Given Name`,"@_xmlns":`urn:oasis:names:tc:SAML:2.0:assertion`},{"@_Name":`http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name`,"@_NameFormat":`urn:oasis:names:tc:SAML:2.0:attrname-format:uri`,"@_FriendlyName":`Name`,"@_xmlns":`urn:oasis:names:tc:SAML:2.0:assertion`},{"@_Name":`http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname`,"@_NameFormat":`urn:oasis:names:tc:SAML:2.0:attrname-format:uri`,"@_FriendlyName":`Surname`,"@_xmlns":`urn:oasis:names:tc:SAML:2.0:assertion`},{"@_Name":`http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier`,"@_NameFormat":`urn:oasis:names:tc:SAML:2.0:attrname-format:uri`,"@_FriendlyName":`Name ID`,"@_xmlns":`urn:oasis:names:tc:SAML:2.0:assertion`}]}}};return new pM({ignoreAttributes:!1,suppressEmptyNode:!0,preserveOrder:!1,format:!0,attributeNamePrefix:`@_`}).build(n)}async function BI(e,t){let n=e.notBefore||new Date().toISOString(),r=e.notAfter||new Date(new Date(n).getTime()+600*1e3).toISOString(),i=e.issueInstant||n,a=e.sessionNotOnOrAfter||r,o=e.responseId||`_${PI()}`,s=e.assertionId||`_${PI()}`,c=[{"samlp:Response":[{"saml:Issuer":[{"#text":e.issuer}]},{"samlp:Status":[{"samlp:StatusCode":[],":@":{"@_Value":`urn:oasis:names:tc:SAML:2.0:status:Success`}}]},{"saml:Assertion":[{"saml:Issuer":[{"#text":e.issuer}]},{"saml:Subject":[{"saml:NameID":[{"#text":e.email}],":@":{"@_Format":`urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress`}},{"saml:SubjectConfirmation":[{"saml:SubjectConfirmationData":[],":@":{"@_InResponseTo":e.inResponseTo,"@_NotOnOrAfter":r,"@_Recipient":e.destination}}],":@":{"@_Method":`urn:oasis:names:tc:SAML:2.0:cm:bearer`}}]},{"saml:Conditions":[{"saml:AudienceRestriction":[{"saml:Audience":[{"#text":e.audience}]}]}],":@":{"@_NotBefore":n,"@_NotOnOrAfter":r}},{"saml:AuthnStatement":[{"saml:AuthnContext":[{"saml:AuthnContextClassRef":[{"#text":`urn:oasis:names:tc:SAML:2.0:ac:classes:unspecified`}]}]}],":@":{"@_AuthnInstant":i,"@_SessionIndex":e.sessionIndex,"@_SessionNotOnOrAfter":a}},{"saml:AttributeStatement":[{"saml:Attribute":[{"saml:AttributeValue":[{"#text":e.userId}],":@":{"@_xmlns:xs":`http://www.w3.org/2001/XMLSchema`,"@_xmlns:xsi":`http://www.w3.org/2001/XMLSchema-instance`,"@_xsi:type":`xs:string`}}],":@":{"@_FriendlyName":`persistent`,"@_Name":`id`,"@_NameFormat":`urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified`}},{"saml:Attribute":[{"saml:AttributeValue":[{"#text":e.email}],":@":{"@_xmlns:xs":`http://www.w3.org/2001/XMLSchema`,"@_xmlns:xsi":`http://www.w3.org/2001/XMLSchema-instance`,"@_xsi:type":`xs:string`}}],":@":{"@_Name":`email`,"@_NameFormat":`urn:oasis:names:tc:SAML:2.0:attrname-format:basic`}},{"saml:Attribute":[{"saml:AttributeValue":[{"#text":`manage-account`}],":@":{"@_xmlns:xs":`http://www.w3.org/2001/XMLSchema`,"@_xmlns:xsi":`http://www.w3.org/2001/XMLSchema-instance`,"@_xsi:type":`xs:string`}}],":@":{"@_Name":`Role`,"@_NameFormat":`urn:oasis:names:tc:SAML:2.0:attrname-format:basic`}},{"saml:Attribute":[{"saml:AttributeValue":[{"#text":`default-roles-master`}],":@":{"@_xmlns:xs":`http://www.w3.org/2001/XMLSchema`,"@_xmlns:xsi":`http://www.w3.org/2001/XMLSchema-instance`,"@_xsi:type":`xs:string`}}],":@":{"@_Name":`Role`,"@_NameFormat":`urn:oasis:names:tc:SAML:2.0:attrname-format:basic`}},{"saml:Attribute":[{"saml:AttributeValue":[{"#text":`offline_access`}],":@":{"@_xmlns:xs":`http://www.w3.org/2001/XMLSchema`,"@_xmlns:xsi":`http://www.w3.org/2001/XMLSchema-instance`,"@_xsi:type":`xs:string`}}],":@":{"@_Name":`Role`,"@_NameFormat":`urn:oasis:names:tc:SAML:2.0:attrname-format:basic`}},{"saml:Attribute":[{"saml:AttributeValue":[{"#text":`view-profile`}],":@":{"@_xmlns:xs":`http://www.w3.org/2001/XMLSchema`,"@_xmlns:xsi":`http://www.w3.org/2001/XMLSchema-instance`,"@_xsi:type":`xs:string`}}],":@":{"@_Name":`Role`,"@_NameFormat":`urn:oasis:names:tc:SAML:2.0:attrname-format:basic`}},{"saml:Attribute":[{"saml:AttributeValue":[{"#text":`uma_authorization`}],":@":{"@_xmlns:xs":`http://www.w3.org/2001/XMLSchema`,"@_xmlns:xsi":`http://www.w3.org/2001/XMLSchema-instance`,"@_xsi:type":`xs:string`}}],":@":{"@_Name":`Role`,"@_NameFormat":`urn:oasis:names:tc:SAML:2.0:attrname-format:basic`}},{"saml:Attribute":[{"saml:AttributeValue":[{"#text":`manage-account-links`}],":@":{"@_xmlns:xs":`http://www.w3.org/2001/XMLSchema`,"@_xmlns:xsi":`http://www.w3.org/2001/XMLSchema-instance`,"@_xsi:type":`xs:string`}}],":@":{"@_Name":`Role`,"@_NameFormat":`urn:oasis:names:tc:SAML:2.0:attrname-format:basic`}}]}],":@":{"@_xmlns":`urn:oasis:names:tc:SAML:2.0:assertion`,"@_ID":s,"@_IssueInstant":i,"@_Version":`2.0`}}],":@":{"@_xmlns:samlp":`urn:oasis:names:tc:SAML:2.0:protocol`,"@_xmlns:saml":`urn:oasis:names:tc:SAML:2.0:assertion`,"@_Destination":e.destination,"@_ID":o,"@_InResponseTo":e.inResponseTo,"@_IssueInstant":i,"@_Version":`2.0`}}],l=new pM({ignoreAttributes:!1,suppressEmptyNode:!0,preserveOrder:!0}).build(c);return e.signature&&t&&(l=await t.signSAML(l,e.signature.privateKeyPem,e.signature.cert)),e.encode===!1?l:btoa(l)}var VI=`urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect`,HI=`urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST`,UI={"rsa-sha256":`http://www.w3.org/2001/04/xmldsig-more#rsa-sha256`,"rsa-sha1":`http://www.w3.org/2000/09/xmldsig#rsa-sha1`},WI={"rsa-sha256":`SHA-256`,"rsa-sha1":`SHA-1`};function GI(e){return e.replace(/&/g,`&amp;`).replace(/"/g,`&quot;`).replace(/'/g,`&apos;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}async function KI(e){let t=new Blob([new TextEncoder().encode(e)]).stream().pipeThrough(new CompressionStream(`deflate-raw`));return jI(new Uint8Array(await new Response(t).arrayBuffer()))}function qI(e){let t=e.id||`_${PI()}`,n=e.issueInstant||new Date().toISOString(),r=e.nameIdFormat||`urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified`,i=e.forceAuthn?` ForceAuthn="true"`:``;return{id:t,xml:`<samlp:AuthnRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" ID="${GI(t)}" Version="2.0" IssueInstant="${GI(n)}" Destination="${GI(e.destination)}" AssertionConsumerServiceURL="${GI(e.assertionConsumerServiceUrl)}" ProtocolBinding="${HI}"${i}><saml:Issuer>${GI(e.issuer)}</saml:Issuer><samlp:NameIDPolicy Format="${GI(r)}" AllowCreate="true"/></samlp:AuthnRequest>`}}function JI(e,t){let n=e.replace(RegExp(`-----(BEGIN|END) ${t}-----`,`g`),``).replace(/\s/g,``);return Uint8Array.from(MI(n))}async function YI(e){let t=e.parameter||`SAMLRequest`,n=await KI(e.xml),r=`${t}=${encodeURIComponent(n)}`;if(e.relayState&&(r+=`&RelayState=${encodeURIComponent(e.relayState)}`),e.signingKey){let t=e.signingKey.algorithm||`rsa-sha256`;r+=`&SigAlg=${encodeURIComponent(UI[t])}`;let n=await crypto.subtle.importKey(`pkcs8`,JI(e.signingKey.privateKeyPem,`PRIVATE KEY`),{name:`RSASSA-PKCS1-v1_5`,hash:WI[t]},!1,[`sign`]),i=await crypto.subtle.sign(`RSASSA-PKCS1-v1_5`,n,new TextEncoder().encode(r));r+=`&Signature=${encodeURIComponent(jI(new Uint8Array(i)))}`}let i=e.endpoint.indexOf(`#`),a=i===-1?e.endpoint:e.endpoint.slice(0,i),o=i===-1?``:e.endpoint.slice(i);return`${a}${a.includes(`?`)?`&`:`?`}${r}${o}`}function XI(e){let t=e.replace(/\\[rn]/g,`
311
311
  `).trim();if(!t)return;if(t.startsWith(`-----BEGIN`)){let e=t.match(/-----BEGIN CERTIFICATE-----([\s\S]+?)-----END CERTIFICATE-----/)?.[1]?.replace(/\s/g,``);return e&&XI(e)===e?e:void 0}let n=t.replace(/\s/g,``);if(!/^[A-Za-z0-9+/]+=*$/.test(n))return;let r;try{r=MI(n)}catch{return}return new TextDecoder().decode(r.slice(0,64)).trimStart().startsWith(`-----BEGIN`)?XI(new TextDecoder().decode(r)):r[0]===48?n:void 0}function ZI(e){return`-----BEGIN CERTIFICATE-----\n${(e.replace(/\s/g,``).match(/.{1,64}/g)||[]).join(`
312
312
  `)}\n-----END CERTIFICATE-----\n`}var QI=`urn:oasis:names:tc:SAML:2.0:protocol`,$I=new Set([`EntitiesDescriptor`,`EntityDescriptor`,`IDPSSODescriptor`,`X509Certificate`,`SingleSignOnService`,`SingleLogoutService`,`KeyDescriptor`]);function eL(e){if(/<!DOCTYPE|<!ENTITY/i.test(e))throw Error(`SAML documents must not contain a DOCTYPE`)}function tL(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:void 0}function nL(e){if(Array.isArray(e))return e.map(e=>tL(e)).filter(e=>e!==void 0);let t=tL(e);return t?[t]:[]}function rL(e){if(typeof e==`string`)return e;if(typeof e==`number`||typeof e==`boolean`)return String(e);let t=tL(e);if(!t)return;let n=t[`#text`];return typeof n==`string`?n:void 0}function iL(e,t){let n=e?.[`@_${t}`];return typeof n==`string`?n:void 0}function aL(e){return nL(e).flatMap(e=>{let t=iL(e,`Binding`),n=iL(e,`Location`);return t&&n?[{binding:t,location:n}]:[]})}function oL(e){eL(e);let t=new Uj({ignoreAttributes:!1,attributeNamePrefix:`@_`,removeNSPrefix:!0,parseTagValue:!1,parseAttributeValue:!1,isArray:e=>$I.has(e)}).parse(e),n=[],r=e=>{n.push(...nL(e.EntityDescriptor));for(let t of nL(e.EntitiesDescriptor))r(t)};r(t);let i=e=>nL(e.IDPSSODescriptor).find(e=>(iL(e,`protocolSupportEnumeration`)||``).split(/\s+/).includes(QI)),a=n.find(e=>i(e)),o=a&&i(a),s=iL(a,`entityID`);if(!a||!o||!s)throw Error(`Metadata does not describe a SAML 2.0 identity provider`);let c=nL(o.KeyDescriptor).filter(e=>{let t=iL(e,`use`);return!t||t===`signing`}).flatMap(e=>nL(tL(e.KeyInfo)?.X509Data).flatMap(e=>(Array.isArray(e.X509Certificate)?e.X509Certificate:[e.X509Certificate]).map(e=>rL(e)?.replace(/\s/g,``)).filter(e=>!!e)));return{entityId:s,singleSignOnServices:aL(o.SingleSignOnService),singleLogoutServices:aL(o.SingleLogoutService),signingCertificates:[...new Set(c)]}}function sL(e,t=VI){return e.find(e=>e.binding===t)||e.find(e=>e.binding===`urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect`||e.binding===`urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST`)}function cL(e){let t={"@_protocolSupportEnumeration":`urn:oasis:names:tc:SAML:2.0:protocol`,"@_AuthnRequestsSigned":e.authnRequestsSigned?`true`:`false`,"@_WantAssertionsSigned":`true`};return e.signingCertificates?.length&&(t.KeyDescriptor=e.signingCertificates.map(e=>({"@_use":`signing`,KeyInfo:{"@_xmlns":`http://www.w3.org/2000/09/xmldsig#`,X509Data:{X509Certificate:e}}}))),t.NameIDFormat=e.nameIdFormats||[`urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress`,`urn:oasis:names:tc:SAML:2.0:nameid-format:persistent`,`urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified`],t.AssertionConsumerService={"@_Binding":HI,"@_Location":e.assertionConsumerServiceUrl,"@_index":`0`,"@_isDefault":`true`},new pM({ignoreAttributes:!1,attributeNamePrefix:`@_`,suppressEmptyNode:!0,suppressBooleanAttributes:!1,format:!0}).build({EntityDescriptor:{"@_xmlns":`urn:oasis:names:tc:SAML:2.0:metadata`,"@_entityID":e.entityId,SPSSODescriptor:t}})}var lL=`urn:oasis:names:tc:SAML:2.0:cm:bearer`,uL=`urn:oasis:names:tc:SAML:2.0:status:Success`,$=class extends Error{code;status;constructor(e,t,n){super(t),this.name=`SamlResponseError`,this.code=e,this.status=n}};function dL(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:void 0}function fL(e){return(Array.isArray(e)?e:[e]).map(e=>dL(e)).filter(e=>e!==void 0)}function pL(e){if(typeof e==`string`)return e;let t=dL(e);if(!t)return;let n=t[`#text`];return typeof n==`string`?n:``}function mL(e,t){let n=e?.[`@_${t}`];return typeof n==`string`?n:void 0}var hL=new Set([`Assertion`,`EncryptedAssertion`,`AudienceRestriction`,`Audience`,`SubjectConfirmation`,`AuthnStatement`,`AttributeStatement`,`Attribute`,`AttributeValue`]);function gL(e){return eL(e),new Uj({ignoreAttributes:!1,attributeNamePrefix:`@_`,removeNSPrefix:!0,parseTagValue:!1,parseAttributeValue:!1,trimValues:!0,isArray:e=>hL.has(e)}).parse(e)}function _L(e,t){if(e===t)return!0;try{return new URL(e).href===new URL(t).href}catch{return!1}}function vL(e,t){if(e===void 0)return;let n=Date.parse(e);if(Number.isNaN(n))throw new $(`invalid_response`,`Invalid ${t}`);return n}function yL(e){try{return new TextDecoder().decode(MI(e.replace(/\s/g,``)))}catch{throw new $(`invalid_response`,`SAMLResponse is not valid base64`)}}function bL(e){let t=new Map;for(let n of fL(e.AttributeStatement))for(let e of fL(n.Attribute)){let n=mL(e,`Name`);if(!n)continue;let r=e.AttributeValue,i=(Array.isArray(r)?r:[r]).map(e=>pL(e)).filter(e=>e!==void 0);if(i.length===0)continue;let a=t.get(n),o=[...a===void 0?[]:Array.isArray(a)?a:[a],...i];t.set(n,o.length===1?o[0]:o)}return Object.fromEntries(t)}var xL=new Set([`AudienceRestriction`,`OneTimeUse`,`ProxyRestriction`]);async function SL(e){let t=(e.clockSkewSeconds??120)*1e3,n=yL(e.samlResponse),r;try{r=gL(n)}catch(e){throw new $(`invalid_response`,`SAMLResponse could not be parsed: ${e instanceof Error?e.message:String(e)}`)}let i=dL(r.Response);if(!i)throw new $(`invalid_response`,`SAMLResponse is not a samlp:Response`);let a=dL(i.Status),o=dL(a?.StatusCode),s=mL(o,`Value`);if(s!==uL){let e=mL(dL(o?.StatusCode),`Value`),t=pL(a?.StatusMessage)||void 0;throw new $(`idp_error`,`Identity provider returned ${e||s||`no status`}${t?`: ${t}`:``}`,{code:s,subCode:e,message:t})}if(fL(i.EncryptedAssertion).length>0)throw new $(`encrypted_assertion`,`Encrypted assertions are not supported; turn off assertion encryption at the identity provider`);let c=fL(i.Assertion);if(c.length!==1)throw new $(`invalid_response`,`SAMLResponse must contain exactly one assertion, found ${c.length}`);let l=e.idpCertificates.map(e=>XI(e)).filter(e=>!!e).map(e=>ZI(e));if(l.length===0)throw new $(`invalid_signature`,`No identity provider signing certificate is configured`);let u;try{u=await e.verifier.verifySignedReferences(n,l)}catch(e){throw new $(`invalid_signature`,`SAMLResponse signature is invalid: ${e instanceof Error?e.message:String(e)}`)}let d=(e.now??new Date).getTime(),f,p=new Map;for(let e of u){let t;try{t=gL(e)}catch{continue}let n=dL(t.Response);if(n){f=n;for(let e of fL(n.Assertion)){let t=mL(e,`ID`);t&&p.set(t,e)}}for(let e of fL(t.Assertion)){let t=mL(e,`ID`);t&&p.set(t,e)}}if(p.size===0)throw new $(`unsigned`,`Neither the SAMLResponse nor its assertion is signed`);if(p.size>1)throw new $(`invalid_response`,`Signed content contains more than one assertion`);let[[m,h]]=[...p.entries()];if(mL(c[0],`ID`)!==m)throw new $(`invalid_response`,`The signed assertion is not the assertion in the response`);let g=f??i,_=mL(g,`Destination`);if(_&&!_L(_,e.assertionConsumerServiceUrl))throw new $(`recipient_mismatch`,`Response Destination ${_} is not this connection's ACS URL`);let v=mL(g,`InResponseTo`);if(v!==void 0&&v!==e.inResponseTo)throw new $(`in_response_to_mismatch`,`Response InResponseTo does not match the authentication request`);let y=pL(h.Issuer)?.trim()||void 0;if(e.idpEntityId&&y!==e.idpEntityId)throw new $(`issuer_mismatch`,`Assertion Issuer ${y??`(none)`} is not the configured identity provider ${e.idpEntityId}`);let b=dL(h.Conditions),x=Object.keys(b??{}).find(e=>!e.startsWith(`@_`)&&e!==`#text`&&!xL.has(e));if(x)throw new $(`invalid_response`,`Assertion has a condition this service provider does not understand: ${x}`);if(fL(b?.ProxyRestriction).length>0)throw new $(`invalid_response`,`The identity provider restricts passing this login on (ProxyRestriction), which this service provider cannot honour`);let S=vL(mL(b,`NotBefore`),`NotBefore`),ee=mL(b,`NotOnOrAfter`),te=vL(ee,`NotOnOrAfter`);if(S!==void 0&&d+t<S)throw new $(`not_yet_valid`,`Assertion is not yet valid`);if(te!==void 0&&d-t>=te)throw new $(`expired`,`Assertion has expired`);let ne=fL(b?.AudienceRestriction);if(!(ne.length>0&&ne.every(t=>(Array.isArray(t.Audience)?t.Audience:[t.Audience]).some(t=>pL(t)?.trim()===e.spEntityId))))throw new $(`audience_mismatch`,`Assertion audience does not include ${e.spEntityId}`);let re=dL(h.Subject),ie=re?.NameID,ae=pL(ie)?.trim();if(!ae)throw new $(`missing_subject`,`Assertion has no NameID (encrypted NameIDs are not supported)`);let oe,se;if(!fL(re?.SubjectConfirmation).some(n=>{if(mL(n,`Method`)!==lL)return!1;let r=dL(n.SubjectConfirmationData),i=mL(r,`Recipient`),a=mL(r,`NotOnOrAfter`),o=mL(r,`InResponseTo`);try{let n=vL(a,`SubjectConfirmationData NotOnOrAfter`);if(n===void 0||d-t>=n)throw new $(`expired`,`Subject confirmation has expired`);if(!i||!_L(i,e.assertionConsumerServiceUrl))throw new $(`recipient_mismatch`,`Subject confirmation Recipient ${i??`(none)`} is not this connection's ACS URL`);if(o!==e.inResponseTo)throw new $(`in_response_to_mismatch`,e.inResponseTo?`Assertion does not answer this authentication request`:`Unsolicited response refers to an authentication request`)}catch(e){if(e instanceof $)return oe??=e,!1;throw e}return se=a,!0}))throw oe??new $(`invalid_response`,`Assertion has no bearer subject confirmation`);let ce=fL(h.AuthnStatement)[0];if(!ce)throw new $(`invalid_response`,`Assertion has no AuthnStatement`);let le=vL(mL(ce,`SessionNotOnOrAfter`),`SessionNotOnOrAfter`);if(le!==void 0&&d-t>=le)throw new $(`expired`,`Authentication session has expired`);return{assertionId:m,issuer:y,nameId:ae,nameIdFormat:mL(dL(ie),`Format`),sessionIndex:mL(ce,`SessionIndex`),authnInstant:mL(ce,`AuthnInstant`),inResponseTo:e.inResponseTo,attributes:bL(h),notOnOrAfter:se??ee}}function CL(e,t){let n=e[`@_${t}`];return typeof n==`string`?n:void 0}function wL(e){eL(e);let t=new Uj({ignoreAttributes:!1,attributeNamePrefix:`@_`,removeNSPrefix:!0,parseTagValue:!1,parseAttributeValue:!1,trimValues:!0}).parse(e).AuthnRequest;if(!t||typeof t!=`object`||Array.isArray(t))throw Error(`SAMLRequest is not an AuthnRequest`);let n=t,r=CL(n,`ID`);if(!r)throw Error(`AuthnRequest has no ID`);let i=n.Issuer,a=typeof i==`string`?i:i&&typeof i==`object`?i[`#text`]:void 0;return{id:r,issuer:typeof a==`string`&&a?a:void 0,assertionConsumerServiceUrl:CL(n,`AssertionConsumerServiceURL`),destination:CL(n,`Destination`),protocolBinding:CL(n,`ProtocolBinding`),issueInstant:CL(n,`IssueInstant`),forceAuthn:[`true`,`1`].includes(CL(n,`ForceAuthn`)?.trim().toLowerCase()??``)}}function TL(e){return new TextDecoder().decode(MI(e.replace(/\s/g,``)))}var EL={"http://www.w3.org/2001/04/xmldsig-more#rsa-sha256":`SHA-256`,"http://www.w3.org/2001/04/xmldsig-more#rsa-sha512":`SHA-512`,"http://www.w3.org/2000/09/xmldsig#rsa-sha1":`SHA-1`};function DL(e){let t=new Map;for(let n of e.replace(/^\?/,``).split(`&`)){if(!n)continue;let e=n.indexOf(`=`),r=decodeURIComponent(e===-1?n:n.slice(0,e));if(t.has(r))throw Error(`Query parameter ${r} is repeated`);t.set(r,e===-1?``:n.slice(e+1))}return t}async function OL(e){let t=DL(e.rawQuery),n=t.get(e.parameter),r=t.get(`SigAlg`),i=t.get(`Signature`);if(n===void 0||!r||!i)throw Error(`The request is not signed`);let a=decodeURIComponent(r.replace(/\+/g,`%20`)),o=EL[a];if(!o)throw Error(`Unsupported SigAlg ${a}`);let s=t.get(`RelayState`),c=new TextEncoder().encode(`${e.parameter}=${n}`+(s===void 0?``:`&RelayState=${s}`)+`&SigAlg=${r}`),l;try{l=Uint8Array.from(MI(decodeURIComponent(i.replace(/\+/g,`%20`)).replace(/\s/g,``)))}catch{return!1}for(let t of e.spkiKeys){let e;try{e=await crypto.subtle.importKey(`spki`,Uint8Array.from(t),{name:`RSASSA-PKCS1-v1_5`,hash:o},!1,[`verify`])}catch{continue}if(await crypto.subtle.verify(`RSASSA-PKCS1-v1_5`,e,l,c))return!0}return!1}var kL=class{signUrl;constructor(e){this.signUrl=e}async signSAML(e,t,n){let r=await fetch(this.signUrl,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({xmlContent:e,privateKey:t,publicCert:n})});if(!r.ok)throw Error(`Failed to sign SAML via HTTP: ${r.status} ${r.statusText}`);return await r.text()}};function AL(e){return e.replace(/&/g,`&amp;`).replace(/"/g,`&quot;`).replace(/'/g,`&#39;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}function jL(e,t,n){let r=`
313
313
  <!DOCTYPE html>
@@ -392,4 +392,4 @@ type ActionAPI = {
392
392
  ${r}
393
393
  </form>
394
394
  </body>
395
- </html>`;return n.set(`content-type`,`text/html; charset=utf-8`),n.set(`cache-control`,`no-store`),n.set(`pragma`,`no-cache`),new Response(i,{status:200,headers:n})}function SB(e){if(!e)return;let[t,n]=e.split(` `);if(!(!t||t.toLowerCase()!==`bearer`))return n?.trim()||void 0}function CB(e){if(!e)return{};let[t,n]=e.split(` `);if(t?.toLowerCase()!==`basic`||!n)return{};try{let[e,t]=atob(n).split(`:`);return!e||!t?{}:{client_id:e,client_secret:t}}catch{return{}}}var wB=`urn:authhero:management`;function TB(e){return e===`/tenants`?!0:!e.startsWith(`/tenants/`)||/^\/tenants\/[^/]+\/(operations|config-sync)(\/|$)/.test(e)?!1:e!==`/tenants/settings`&&!e.startsWith(`/tenants/settings/`)}function EB(e){return e.replace(/:([a-zA-Z_][a-zA-Z0-9_]*)/g,`{$1}`)}function DB(e){let t=e.split(`:`);if(t.length!==2||!t[0]||!t[1])return[e];let n=`${t[1]}:${t[0]}`;return n===e?[e]:[e,n]}function OB(e,t={}){let n=t.requireManagementAudience??!1,r=t.relaxManagementAudience??!1,i=t.additionalManagementAudiences,a=t.additionalIssuers;return async(t,o)=>{let s=t.req.method===`HEAD`?`GET`:t.req.method,c=t.req.matchedRoutes.find(e=>e.method.toUpperCase()===s&&e.path!==`/*`);if(!c)return await o();let l=EB(c.path),u=l.startsWith(`/api/v2`)?l.slice(7)||`/`:l,d=e.openAPIRegistry.definitions.find(e=>`route`in e&&e.route.path===u&&e.route.method.toUpperCase()===s.toUpperCase());if(d&&`route`in d){let e=d.route.security?.[0]?.Bearer;if(e===void 0)return await o();let s=SB(t.req.header(`authorization`));if(!s)throw Fl.missingAuthentication();try{let o;if(a){let{payload:e}=(0,h.decode)(s);o=await a({tenant_id:typeof e?.tenant_id==`string`?e.tenant_id:void 0})}let c=await nO(t,s,{additionalIssuers:o});if(t.set(`user_id`,c.sub),t.set(`user`,c),c.azp&&(t.set(`client_id`,c.azp),t.set(`client_id_from_token`,!0)),c.org_name&&t.set(`org_name`,c.org_name),c.org_id&&t.set(`organization_id`,c.org_id),!t.var.tenant_id&&c.tenant_id&&t.set(`tenant_id`,c.tenant_id),n){let e=c.aud,n=Array.isArray(e)?e:e?[e]:[],a=typeof c.tenant_id==`string`?c.tenant_id:void 0,o=i?await i({tenant_id:a}):[],s=new Set([wB,...o]);if(!n.some(e=>s.has(e)))if(r)console.warn(`[authhero] management API accepted token without management audience (relaxManagementAudience=true): sub=${c.sub??`unknown`} aud=${JSON.stringify(e)}`);else throw new k(403,{message:`Invalid audience`});let l=typeof c.tenant_id==`string`?c.tenant_id:void 0,d=t.var.tenant_id;if(l&&d&&l!==d){let e=t.env.data?.multiTenancyConfig?.controlPlaneTenantId;if(!e||l!==e)throw new k(403,{message:`Cross-tenant management requires a control-plane token`});if(!await t.var.data.tenants.get(d).catch(e=>{throw new p.HTTPException(500,{message:`Failed to look up tenant`,cause:e})}))throw Nl.tenant()}let f=t.env.data?.multiTenancyConfig?.controlPlaneTenantId,m=typeof c.org_name==`string`?c.org_name:void 0,h=typeof c.org_id==`string`?c.org_id:void 0;if(f&&l===f&&d&&(m||h)){let e=m??(await t.env.data.organizations.get(f,h).catch(e=>{throw new p.HTTPException(500,{message:`Failed to look up organization`,cause:e})}))?.name,n=!!e&&e.toLowerCase()===d.toLowerCase(),r=d===f&&TB(u);if(r&&e&&!t.var.org_name&&t.set(`org_name`,e),!n&&(!r||!e))throw new k(403,{message:e?`This token is for another tenant's organization ("${e}"), not "${d}"`:`An organization token must belong to a tenant's organization`})}}let l=Array.isArray(c.permissions)?c.permissions:[],d=typeof c.scope==`string`?c.scope.split(` `):Array.isArray(c.scope)?c.scope:[];if(e.length){let t=e.flatMap(DB);if(!(t.some(e=>l.includes(e))||t.some(e=>d.includes(e))))throw Fl.insufficientScope(e)}}catch(e){throw e instanceof p.HTTPException?e:Fl.invalidToken()}}return await o()}}async function kB(e,t,n){if(n===`urn:authhero:management`)return!0;let r=e.env.additionalManagementAudiences;return r?(await r({tenant_id:t})).includes(n):!1}var AB=[`openid`,`profile`,`email`,`address`,`phone`,`offline_access`];async function jB(e,t,n,r){let i=[];if(!(await e.env.data.tenants.get(t))?.flags?.inherit_global_permissions_in_organizations)return[];let a=await e.env.data.userRoles.list(t,n,void 0,``),o=await Promise.all(a.map(n=>e.env.data.rolePermissions.list(t,n.id,{per_page:1e3})));for(let e of o)e.forEach(e=>{e.resource_server_identifier===r&&i.push(e.permission_name)});return[...new Set(i)]}var MB=`admin:organizations`,NB=`access:all_organizations`;async function PB(e,t,n,r){let i=new Set,a=e=>{for(let t of e)t.resource_server_identifier===`urn:authhero:management`&&r.includes(t.permission_name)&&i.add(t.permission_name)};if(a(await e.env.data.userPermissions.list(t,n,void 0,``)),i.size===r.length)return i;let o=await e.env.data.userRoles.list(t,n,void 0,``);for(let n of o)if(a(await e.env.data.rolePermissions.list(t,n.id,{per_page:1e3})),i.size===r.length)break;return i}async function FB(e,t,n,r){return(await PB(e,t,n,[r])).has(r)}async function IB(e,t,n,r){let i=(r===void 0?await e.env.data.tenants.get(t):r)?.flags?.inherit_global_permissions_in_organizations===!0,a=await PB(e,t,n,i?[NB,MB]:[NB]);return a.has(`access:all_organizations`)||i&&a.has(`admin:organizations`)}async function LB(e,t,n,r,i){return await IB(e,t,n,i)?!0:(await e.env.data.userOrganizations.list(t,{q:`user_id:${D(n)}`,per_page:1e3})).userOrganizations.some(e=>e.organization_id===r)}function RB(e){let t=e.granted.filter(t=>!e.definedScopes.includes(t));if(t.length===0)return;let n=e.userId?`, user_id=${e.userId}`:``;console.warn(`[scopes-permissions] Dropped scope(s) not defined on the resource server: ${t.join(`, `)} (source=${e.source}, tenant_id=${e.tenantId}, client_id=${e.clientId}, audience=${e.audience}${n})`)}async function zB(e,t){let{tenantId:n,audience:r,scopes:i}=t;if(i.length===0)return[];let{resource_servers:a}=await e.env.data.resourceServers.list(n),o=a.find(e=>e.identifier===r);if(!o)return[];let s=(o.scopes||[]).map(e=>e.value);return i.filter(e=>!s.includes(e))}async function BB(e,t){let{tenantId:n,clientId:r,audience:i,requestedScopes:a}=t,o=a.filter(e=>AB.includes(e)),s=a.filter(e=>!AB.includes(e)),c=(await e.env.data.resourceServers.list(n)).resource_servers.filter(e=>e.identifier===i);if(c.length===0)return{scopes:o,permissions:[],token_lifetime:86400,token_lifetime_for_web:7200};let l=c[0];if(!l)return{scopes:o,permissions:[],token_lifetime:86400,token_lifetime_for_web:7200};let u=l.options?.enforce_policies===!0,d=l.options?.token_dialect||`access_token`,f=(await e.env.data.clientGrants.list(n,{q:`client_id:${D(r)}`})).client_grants.find(e=>e.audience===i);if(!f)return{scopes:o,permissions:[],token_lifetime:l.token_lifetime,token_lifetime_for_web:l.token_lifetime_for_web};let p=f.scope||[],m=(l.scopes||[]).map(e=>e.value);if(s.length>0){let e=s.filter(e=>!p.includes(e));if(e.length>0)throw new k(403,{error:`access_denied`,error_description:`Client is not authorized for scope(s): ${e.join(`, `)}`})}let h=p.filter(e=>m.includes(e));RB({source:`client_grant`,tenantId:n,clientId:r,audience:i,granted:p,definedScopes:m});let g=a.length===0?h:s.filter(e=>h.includes(e)),_={token_lifetime:l.token_lifetime,token_lifetime_for_web:l.token_lifetime_for_web};if(!u)return{scopes:[...new Set([...o,...g])],permissions:[],..._};let v=g;return d===`access_token_authz`?{scopes:[...new Set([...o,...g])],permissions:v,..._}:{scopes:[...new Set([...o,...g])],permissions:[],..._}}async function VB(e,t){if(t.grantType===Wi.ClientCredential)return await BB(e,{tenantId:t.tenantId,clientId:t.clientId,audience:t.audience,requestedScopes:t.requestedScopes});let{tenantId:n,clientId:r,userId:i,audience:a,requestedScopes:o,organizationId:s}=t,c=await e.env.data.tenants.get(n),l=c?.flags?.restrict_undefined_scopes===!0;if(s&&!await LB(e,n,i,s,c))throw new k(403,{error:`access_denied`,error_description:`User is not a member of the specified organization`});let u=o.filter(e=>AB.includes(e)),d=(await e.env.data.resourceServers.list(n)).resource_servers.filter(e=>e.identifier===a)[0];if(!d){if(o.filter(e=>e&&!AB.includes(e)).length>0)throw new k(403,{error:`access_denied`,error_description:`Service not found: ${a}`});return{scopes:u,permissions:[],token_lifetime:86400,token_lifetime_for_web:7200}}let f=(d.scopes||[]).map(e=>e.value),p=await kB(e,n,a),m=d.options?.enforce_policies===!0||p,h=d.options?.token_dialect||`access_token`,g={token_lifetime:d.token_lifetime,token_lifetime_for_web:d.token_lifetime_for_web};if(!m){let e=l?o.filter(e=>f.includes(e)||AB.includes(e)):o;return{scopes:[...new Set(e)],permissions:[],...g}}let[_,v,y]=await Promise.all([e.env.data.userPermissions.list(n,i,void 0,s),e.env.data.userRoles.list(n,i,void 0,``),s?e.env.data.userRoles.list(n,i,void 0,s):Promise.resolve([])]),b=[...v,...y],x=s?await jB(e,n,i,a):[],S=await Promise.all(b.map(t=>e.env.data.rolePermissions.list(n,t.id,{per_page:1e3}))),ee=[];for(let e of S)e.forEach(e=>{e.resource_server_identifier===a&&ee.push(e.permission_name)});let te=new Set;_.forEach(e=>{e.resource_server_identifier===a&&te.add(e.permission_name)}),ee.forEach(e=>{te.add(e)}),x.forEach(e=>{te.add(e)});let ne=Array.from(te),re=ne.filter(e=>f.includes(e));RB({source:`user_permissions`,tenantId:n,clientId:r,audience:a,granted:ne,definedScopes:f,userId:i});let ie=l?[]:o.filter(e=>!f.includes(e)&&!AB.includes(e)&&(!p||te.has(e)));if(h===`access_token_authz`)return{scopes:[...new Set([...u,...ie])],permissions:re,...g};let ae=o.filter(e=>f.includes(e)&&ne.includes(e));return{scopes:[...new Set([...u,...ae,...ie])],permissions:[],...g}}var HB=new Set([`openid`,`profile`,`email`]);function UB(e,t){let n=new Set(t),r=[];for(let t of e)t&&(HB.has(t)||n.has(t)||r.push(t));return Array.from(new Set(r))}async function WB(e,t){if(!e.env.data.grants)return UB(t.requestedScopes,[]);let n=await e.env.data.grants.get(t.tenantId,t.userId,t.clientId);return UB(t.requestedScopes,n?.scope??[])}function GB(e,t){if(!e||!t||e.length!==t.length)return!1;let n=0;for(let r=0;r<e.length;r++)n|=e.charCodeAt(r)^t.charCodeAt(r);return n===0}async function KB(e){return Is(await crypto.subtle.digest(`SHA-256`,new TextEncoder().encode(e)))}function qB(e){return e.replace(/[\s-]/g,``).toUpperCase()}function JB(e){if(!e.deviceCodes)throw new k(503,{error:`temporarily_unavailable`,error_description:`Device authorization storage is not configured`});return e.deviceCodes}function YB(e){if(!e.grant_types?.some(e=>e===Wi.DeviceCode||e===`device_code`))throw new k(400,{error:`unauthorized_client`,error_description:`Device authorization is not enabled for this client`})}function XB(e,t,n,r=!1){let i=t.token_endpoint_auth_method??(t.app_type===`native`||t.app_type===`spa`?`none`:`client_secret_post`);if(!e.var.client_authenticated_via_assertion&&!(i===`none`&&n===void 0)&&!((i===`client_secret_basic`&&r||i===`client_secret_post`&&!r)&&n&&GB(t.client_secret,n)))throw new k(401,{error:`invalid_client`,error_description:`Client authentication failed`})}async function ZB(e,t,n,r,i=e.var.ip||`unknown`){let a=300*1e3,o=Math.floor(Date.now()/a),s=`${n}:${await KB(i)}:${o}`;if(await JB(e.env.data).incrementAttempts(t,s,new Date((o+1)*a).toISOString())>r)throw new k(429,{error:`slow_down`,error_description:`Too many device authorization attempts. Try again later.`})}function QB(e){return Pm(e.state_data).deviceFlow}function $B(e){return!!Pm(e).deviceFlow?.deviceCodeHash}function eV(e){return`__Host-authhero_device_${e}`}function tV(e){return(0,Sd.serialize)(eV(e.id),e.csrf_token,{httpOnly:!0,secure:!0,sameSite:`lax`,path:`/`,maxAge:600})}function nV(e,t){let n=(0,Sd.parse)(e.req.header(`cookie`)||``)[eV(t.id)];if(!n||!GB(t.csrf_token,n))throw new k(403,{error:`access_denied`,error_description:`Start device activation again in this browser`})}function rV(e){if(!e)return!1;try{return!!JSON.parse(e)?.connect}catch{return!1}}function iV(e,t){switch(t){case`email`:return e.email||void 0;case`email_verified`:return e.email_verified===void 0?void 0:e.email_verified;case`name`:return e.name||void 0;case`family_name`:return e.family_name||void 0;case`given_name`:return e.given_name||void 0;case`middle_name`:return e.middle_name||void 0;case`nickname`:return e.nickname||void 0;case`preferred_username`:return e.preferred_username||e.username||void 0;case`profile`:return e.profile||void 0;case`picture`:return e.picture||void 0;case`website`:return e.website||void 0;case`gender`:return e.gender||void 0;case`birthdate`:return e.birthdate||void 0;case`zoneinfo`:return e.zoneinfo||void 0;case`locale`:return e.locale||void 0;case`updated_at`:{if(!e.updated_at)return;let t=new Date(e.updated_at).getTime();return Number.isFinite(t)?Math.floor(t/1e3):void 0}case`address`:return e.address||void 0;case`phone_number`:return e.phone_number||void 0;case`phone_number_verified`:return e.phone_verified===void 0?void 0:e.phone_verified;default:return}}var aV={email:[`email`,`email_verified`],profile:[`name`,`family_name`,`given_name`,`middle_name`,`nickname`,`preferred_username`,`profile`,`picture`,`website`,`gender`,`birthdate`,`zoneinfo`,`locale`,`updated_at`],address:[`address`],phone:[`phone_number`,`phone_number_verified`]};function oV(e,t){let n={};for(let r of t){let t=aV[r];if(t)for(let r of t){let t=iV(e,r);t!==void 0&&(n[r]=t)}}return n}function sV(e,t){let n={};for(let r of t){let t=iV(e,r);t!==void 0&&(n[r]=t)}return n}var cV=[`1F77B4`,`FF7F0E`,`2CA02C`,`D62728`,`9467BD`,`8C564B`,`E377C2`,`17BECF`,`BCBD22`,`7F7F7F`];function lV(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return Math.abs(t)}function uV(e){return e.email||e.name||e.user_id||`?`}function dV(e){return cV[lV(e.length>0?e:`?`)%cV.length]??`7F7F7F`}function fV(e){return e.replace(/[\uD800-\uDBFF](?![\uDC00-\uDFFF])/g,``).replace(/(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/g,``)}function pV(e){let t=fV(e.name?.trim()||`${e.given_name??``} ${e.family_name??``}`.trim()||e.nickname?.trim()||e.email?.trim()||e.username?.trim()||``).split(/\s+/).filter(Boolean),n=t[0];if(!n)return`?`;if(t.length===1)return[...n].slice(0,2).join(``).toUpperCase()||`?`;let r=t[t.length-1]??n;return`${[...n][0]??``}${[...r][0]??``}`.toUpperCase()||`?`}function mV(e,t){return`${e.endsWith(`/`)?e:`${e}/`}${t}`}function hV(e,t){let n=pV(t),r=dV(uV(t));return mV(e,`avatars/${encodeURIComponent(n)}.svg?bg=${r}`)}function gV(e,t){return e.picture?e:{...e,picture:hV(t,e)}}function _V(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&apos;`)}function vV(e,t){let n=/^[0-9a-fA-F]{6}$/.test(t)?`#${t}`:`#7F7F7F`,r=_V([...fV(e)].slice(0,2).join(``).toUpperCase())||`?`;return[`<svg xmlns="http://www.w3.org/2000/svg" width="120" height="120" viewBox="0 0 120 120" role="img">`,`<rect width="120" height="120" fill="${n}"/>`,`<text x="50%" y="50%" dy=".05em" fill="#ffffff" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif" font-size="52" font-weight="600" text-anchor="middle" dominant-baseline="central">${r}</text>`,`</svg>`].join(``)}var yV=3600*1e3;function bV(e,t=Date.now()){let n=e.used_at??e.created_at,r=n?new Date(n).getTime():NaN;return Number.isFinite(r)?t-r>=yV:!0}function xV(e,t,n,r){let i=Date.now(),a=()=>e.env.data.sessions.update(t,n,{used_at:new Date(i).toISOString()});if(r){if(!bV(r,i))return;Uc(e,a().catch(()=>{}));return}Uc(e,(async()=>{let r=await e.env.data.sessions.get(t,n);!r||r.revoked_at||bV(r,i)&&await a()})().catch(()=>{}))}function SV(e,t){Object.keys(t).forEach(n=>{let r=t[n];r!=null&&r.length&&e.searchParams.set(n,r)})}function CV(e){try{let t=typeof e==`string`?new URL(e):e,n=`${t.protocol}//${t.host}${t.pathname}`;if(t.search){let e=Array.from(t.searchParams.keys()).map(e=>`${e}=[REDACTED]`).join(`&`);n+=`?${e}`}return t.hash&&(n+=`#[REDACTED]`),n}catch{let t=(typeof e==`string`?e:e.toString()).match(/^([^?#]*)(\?[^#]*)?(#.*)?$/);if(!t)return`[invalid-url]`;let[,n=``,r,i]=t,a=n;if(r){let e=r.substring(1).split(`&`).map(e=>{let[t]=e.split(`=`);return`${t}=[REDACTED]`}).join(`&`);a+=`?${e}`}return i&&(a+=`#[REDACTED]`),a}}var wV=3600;function TV(e){return!e||e<=0?{kind:`unset`}:{kind:`seconds`,seconds:e*wV}}function EV(e){if(!(e===void 0||e<=0))return{kind:`seconds`,seconds:e}}function DV(e){let t=e.refresh_token;return t?.expiration_type===`non-expiring`||t?.infinite_token_lifetime?{kind:`infinite`}:EV(t?.token_lifetime)??TV(e.tenant.session_lifetime)}function OV(e){let t=e.refresh_token;return t?.expiration_type===`non-expiring`||t?.infinite_idle_token_lifetime?{kind:`infinite`}:EV(t?.idle_token_lifetime)??TV(e.tenant.idle_session_lifetime)}function kV(e,t=Date.now()){if(e.kind===`seconds`)return new Date(t+e.seconds*1e3).toISOString()}function AV(e,t=Date.now()){return{expires_at:kV(DV(e),t),idle_expires_at:kV(OV(e),t)}}function jV(e,t,n=Date.now()){let r=OV(e);if(r.kind!==`infinite`)return r.kind===`unset`||!t?t:kV(r,n)}function MV(e,t,n=Date.now()){let r={};if(t.expires_at&&DV(e).kind===`infinite`&&(r.expires_at=null),t.idle_expires_at){let t=OV(e);t.kind===`infinite`?r.idle_expires_at=null:t.kind===`seconds`&&(r.idle_expires_at=kV(t,n))}return r}function NV(e){switch(e){case Wi.DeviceCode:return E.FAILED_EXCHANGE_DEVICE_CODE_FOR_ACCESS_TOKEN;case Wi.AuthorizationCode:return E.FAILED_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN;case Wi.ClientCredential:return E.FAILED_EXCHANGE_ACCESS_TOKEN_FOR_CLIENT_CREDENTIALS;case Wi.RefreshToken:return E.FAILED_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN;case Wi.OTP:return E.FAILED_EXCHANGE_PASSWORD_OTP_FOR_ACCESS_TOKEN;case Wi.Password:return E.FAILED_EXCHANGE_PASSWORD_FOR_ACCESS_TOKEN;case Wi.Passwordless:return E.FAILED_EXCHANGE_PASSWORDLESS_OTP_FOR_ACCESS_TOKEN;case Wi.TokenExchange:return E.FAILED_EXCHANGE_SUBJECT_TOKEN_FOR_ACCESS_TOKEN;default:return E.FAILED_EXCHANGE_CUSTOM_TOKEN}}function PV(e,t,n,r,i=`onExecuteCredentialsExchange`){return{accessToken:{setCustomClaim:(n,r)=>{lO(t,n,r,{kind:`access_token`,source:i,ctx:e})}},idToken:{setCustomClaim:(t,r)=>{n&&lO(n,t,r,{kind:`id_token`,source:i,ctx:e})}},access:{deny:(t,n)=>{let i=n?`${t} - ${n}`:t;throw O(e,e.var.tenant_id||``,{type:NV(r),description:`Access denied by credentials-exchange hook: ${i}`}),new k(400,{message:`Access denied: ${i}`})}},token:{createServiceToken:async t=>(await hO(e,e.var.tenant_id,t.scope,t.expiresInSeconds,t.customClaims)).access_token}}}function FV(e){if(!e?.state_data)return;let t=Pm(e.state_data);return t.mfa_verified&&t.mfa_method?[`mfa`]:void 0}async function IV(e,t){let{authParams:n,user:r,client:i,session_id:a,organization:o,permissions:s,impersonatingUser:c,actClient:l,grantType:u}=t;if(r?.blocked)throw new k(403,{error:`access_denied`,error_description:`User is blocked`});let d=(()=>{if(c&&l)return{sub:c.user_id,client_id:l.client_id};if(c)return{sub:c.user_id};if(l)return{sub:l.client_id,client_id:l.client_id}})(),f=t.amr??(r&&t.loginSession?.user_id===r.user_id?FV(t.loginSession):void 0),m=t.auth_time,h=n.prompt?.split(` `)??[],g=n.max_age!==void 0||h.includes(`login`)||n.claims?.id_token?.auth_time?.essential===!0;if(m===void 0&&g){if(t.loginSession?.authenticated_at)m=Math.floor(new Date(t.loginSession.authenticated_at).getTime()/1e3);else if(a&&e.var.tenant_id){let t=await e.env.data.sessions.get(e.var.tenant_id,a);t?.authenticated_at&&(m=Math.floor(new Date(t.authenticated_at).getTime()/1e3))}}let _=e.var.tenant_id,v=(await BD(e.env.data.keys,_??``,_?e.env.signingKeyMode:`control-plane`,{purpose:`sign`}))[0];if(!v?.pkcs7||!v.cert)throw new k(500,{message:`No signing key configured for ${_?`tenant "${_}"`:`the control-plane scope`}: found ${(await BD(e.env.data.keys,_??``,_?e.env.signingKeyMode:`control-plane`,{purpose:`publish`})).length} verify key(s) but none with private material to sign tokens.`});let y=iD(v.pkcs7),b=await rD(v.cert),x=Cc(e.env,e.var.custom_domain),S=n.audience??i.tenant.default_audience??`${x}userinfo`,ee=n.claims?.userinfo?Object.keys(n.claims.userinfo):void 0,te=uO(t.customClaims,{kind:`access_token`,source:`createAuthTokens(customClaims)`,ctx:e}),ne={aud:S,scope:n.scope||``,sub:r?.user_id||n.client_id,iss:x,tenant_id:i.tenant.id,sid:a,act:d,org_id:o?o.id:void 0,requested_userinfo_claims:ee,org_name:o&&i.tenant.allow_organization_name_in_authentication_api?o.name.toLowerCase():void 0,permissions:s,...te},re=n.scope?.split(` `)||[],ie=re.includes(`openid`);if(!f&&r&&ie&&a&&e.var.tenant_id){let t=await e.env.data.sessions.get(e.var.tenant_id,a);t&&lB(t,r.user_id)&&(f=[`mfa`])}let ae=(n.response_type??``).trim()===kt.ID_TOKEN,oe=i.auth0_conformant!==!1||ae,se={aud:n.client_id,sub:r?.user_id,iss:x,sid:a,nonce:n.nonce,...m===void 0?{}:{auth_time:m},...f?{amr:f}:{},...n.acr_values?{acr:n.acr_values.split(` `)[0]}:{}},ce={act:d,org_id:o?.id,org_name:o?.name.toLowerCase()},le=r&&ie?{...se,...oe?oV(gV(r,x),re):{},...n.claims?.id_token?sV(gV(r,x),Object.keys(n.claims.id_token)):{},...ae&&n.claims?.userinfo?sV(gV(r,x),Object.keys(n.claims.userinfo)):{},...ce}:void 0,ue=Kc({loginSession:t.loginSession,authConnection:t.authConnection,ctxConnection:e.var.connection,user:r}),de=await qc(e,e.var.tenant_id,ue,r);if(r&&u!==Wi.RefreshToken){let n=e.var.post_login_action_claims??Pm(t.loginSession?.state_data).action_claims;if(n?.user_id===r.user_id){for(let[t,r]of Object.entries(n.access_token??{}))lO(ne,t,r,{kind:`access_token`,source:`post-login-code-hook`,ctx:e});if(le)for(let[t,r]of Object.entries(n.id_token??{}))lO(le,t,r,{kind:`id_token`,source:`post-login-code-hook`,ctx:e})}}e.env.hooks?.onExecuteCredentialsExchange&&await e.env.hooks.onExecuteCredentialsExchange({ctx:e,client:i,user:r,request:{ip:e.var.ip||``,user_agent:e.var.useragent||``,method:e.req.method,url:ll(e.req.url)},scope:n.scope||``,grant_type:u??``,organization:o,connection:de||(ue?{id:ue,name:ue,strategy:r?.provider||`auth0`}:void 0)},PV(e,ne,le,u));{let{hooks:t}=await e.env.data.hooks.list(e.var.tenant_id),a=t.filter(e=>e.trigger_id===`credentials-exchange`&&e.enabled&&fz(e));if(r){for(let t of a)if(fz(t))try{await gz(e,t.template_id,r,PV(e,ne,le,u,`template-hook:${t.template_id}`))}catch(e){if(e instanceof p.HTTPException)throw e;console.warn(`[credentials-exchange] Failed to execute template hook: ${t.template_id}`,e)}}let s=PV(e,ne,le,u,`credentials-exchange-code-hook`),c=await RR(e,t,{ctx:e,client:i,user:r,request:{ip:e.var.ip||``,user_agent:e.var.useragent||``,method:e.req?.method||``,url:ll(e.req?.url||``)},scope:n.scope||``,grant_type:u??``,organization:o,connection:de||(ue?{id:ue,name:ue,strategy:r?.provider||`auth0`}:void 0)},s);c&&e.set(`action_execution_id`,c)}let fe=c?3600:t.token_lifetime??86400,pe={includeIssuedTimestamp:!0,expiresInSeconds:fe,headers:{kid:v.kid}},C=await QD(b,y,ne,pe);if(le){let e=(n.response_type??``).split(` `);t.code&&e.includes(`code`)&&(le.c_hash=await nk(t.code,b)),e.includes(`id_token`)&&e.includes(`token`)&&(le.at_hash=await nk(C,b))}let me=le?await QD(b,y,le,pe):void 0;return{access_token:C,refresh_token:t.refresh_token,id_token:me,token_type:`Bearer`,expires_in:fe}}async function LV(e,t){return{code:(await e.env.data.codes.create(t.client.tenant.id,{code_id:Yl(32),user_id:t.user.user_id,code_type:`authorization_code`,login_id:t.login_id,expires_at:new Date(Date.now()+300*1e3).toISOString(),code_challenge:t.authParams.code_challenge,code_challenge_method:t.authParams.code_challenge_method,redirect_uri:t.authParams.redirect_uri,state:t.authParams.state,nonce:t.authParams.nonce})).code_id,state:t.authParams.state}}function RV(e){if(e)return new Date(Date.now()+e*60*60*1e3).toISOString()}function zV(e,t){return t?e&&Date.parse(e)<=Date.parse(t)?e:t:e}async function BV(e,t){let{client:n,scope:r,login_id:i}=t,a=Cc(e.env,e.var.custom_domain),o=t.audience??n.tenant.default_audience??`${a}userinfo`,{expires_at:s,idle_expires_at:c}=AV(n),l=NO(),{lookup:u,secret:d}=XO(),f=await ZO(d),p=n.refresh_token?.rotation_type===`rotating`;return{row:await e.env.data.refreshTokens.create(n.tenant.id,{id:l,login_id:i,session_id:t.session_id,organization:t.organization,auth_connection:t.auth_connection,auth_strategy:t.auth_strategy,client_id:n.client_id,idle_expires_at:c?zV(c,t.max_expires_at):void 0,expires_at:zV(s,t.max_expires_at),session_transfer:t.session_transfer,user_id:t.user.user_id,device:{last_ip:e.var.ip,initial_ip:e.var.ip,last_user_agent:e.var.useragent||``,initial_user_agent:e.var.useragent||``,initial_asn:``,last_asn:``},resource_servers:[{audience:o,scopes:r}],rotating:p,token_lookup:u,token_hash:f,family_id:l}),wireToken:QO(u,d)}}async function VV(e,{user:t,client:n,loginSession:r}){let i=RV(n.tenant.idle_session_lifetime),a=RV(n.tenant.session_lifetime);return await e.env.data.sessions.create(n.tenant.id,{id:NO(),user_id:t.user_id,login_session_id:r.id,idle_expires_at:i,expires_at:a,device:{last_ip:e.var.ip||``,initial_ip:e.var.ip||``,last_user_agent:e.var.useragent||``,initial_user_agent:e.var.useragent||``,initial_asn:``,last_asn:``},clients:[n.client_id]})}async function HV(e,{user:t,client:n,loginSession:r,existingSessionId:i,authConnection:a,authStrategy:o}){let s=await e.env.data.loginSessions.get(n.tenant.id,r.id);if(!s)throw new p.HTTPException(400,{message:`Login session ${r.id} not found`});let c=s.state||T.PENDING;if(c===T.FAILED)throw new k(400,{error:`access_denied`,error_description:s.failure_reason||`Cannot authenticate login session in failed state`});if(c===T.COMPLETED)throw new k(400,{error:`access_denied`,error_description:`Login session has already been completed`});if(c===T.AUTHENTICATED){if(s.session_id)return s.session_id;throw new p.HTTPException(500,{message:`Login session is authenticated but has no session_id`})}let l,u;if(i){let a=await e.env.data.sessions.get(n.tenant.id,i);if(!a||a.revoked_at){let i=await VV(e,{user:t,client:n,loginSession:r});l=i.id,u=i.authenticated_at}else l=i,u=a.authenticated_at,a.clients.includes(n.client_id)?xV(e,n.tenant.id,i,a):await e.env.data.sessions.update(n.tenant.id,i,{clients:[...a.clients,n.client_id],...bV(a)&&{used_at:new Date().toISOString()}})}else{let i=await VV(e,{user:t,client:n,loginSession:r});l=i.id,u=i.authenticated_at}let{state:d}=Lm(c===T.EXPIRED?T.PENDING:c,{type:j.AUTHENTICATE,userId:t.user_id}),f=Kc({authConnection:a,ctxConnection:e.var.connection});return await e.env.data.loginSessions.update(n.tenant.id,r.id,{session_id:l,state:d,user_id:t.user_id,authenticated_at:u,...f?{auth_connection:f}:{},...o?{auth_strategy:o}:{},...c===T.EXPIRED?{expires_at:new Date(Date.now()+ld*1e3).toISOString()}:{}}),l}async function UV(e,t){let{user:n,client:r,loginSession:i,authStrategy:a,authConnection:o}=t;await HV(e,{user:n,client:r,loginSession:i,existingSessionId:t.existingSessionId,authConnection:o,authStrategy:a});let s=`/authorize/resume?state=${encodeURIComponent(i.id)}`,c=s,l=!1;if(i.authorization_url)try{let t=new URL(i.authorization_url),n=e.var.host||``;t.host&&t.host!==n&&(c=`${t.origin}${s}`,l=!0)}catch{}let u=new Headers({location:c});return l&&u.set(xs,`1`),new Response(null,{status:302,headers:u})}async function WV(e,t,n,r){let i=await e.env.data.loginSessions.get(t,n.id);if(!i){console.warn(`Login session ${n.id} not found when trying to mark as failed`);return}let a=i.state||T.PENDING,{state:o,context:s}=Lm(a,{type:j.FAIL,reason:r});o!==a&&await e.env.data.loginSessions.update(t,n.id,{state:o,failure_reason:s.failureReason})}async function GV(e,t,n,r){let i=await e.env.data.loginSessions.get(t,n.id);if(!i){console.warn(`Login session ${n.id} not found when trying to start hook`);return}let a=i.state||T.PENDING,{state:o,context:s}=Lm(a,{type:j.START_HOOK,hookId:r});o!==a&&await wO(e.env.data.loginSessions,t,n.id,{type:j.UPDATE_CONTEXT,data:{hookId:s.hookId}},{state:o})}async function KV(e,t,n){let r=await e.env.data.loginSessions.get(t,n.id);if(!r){console.warn(`Login session ${n.id} not found when trying to complete hook`);return}let i=r.state||T.PENDING,{state:a}=Lm(i,{type:j.COMPLETE_HOOK});a!==i&&await wO(e.env.data.loginSessions,t,n.id,{type:j.UPDATE_CONTEXT,data:{hookId:void 0,form_values:void 0}},{state:a})}async function qV(e,t,n,r,i){let a=i??await e.env.data.loginSessions.get(t,n.id);if(!a){console.warn(`Login session ${n.id} not found when trying to mark as completed`);return}let o=a.state||T.PENDING,{state:s}=Lm(o,{type:j.COMPLETE});s!==o&&await e.env.data.loginSessions.update(t,n.id,{state:s,...r?{auth_connection:r}:{}})}async function JV(e,t,n,r,i){let a=await e.env.data.loginSessions.get(t,n.id);if(!a){console.warn(`Login session ${n.id} not found when trying to start continuation`);return}let o=a.state||T.PENDING,{state:s}=Lm(o,{type:j.START_CONTINUATION,scope:r});s===o?console.warn(`Failed to start continuation for login session ${n.id}: cannot transition from ${o} to AWAITING_CONTINUATION. Scope: ${JSON.stringify(r)}, Return URL: ${CV(i)}`):await wO(e.env.data.loginSessions,t,n.id,{type:j.UPDATE_CONTEXT,data:{continuationScope:r,continuationReturnUrl:i}},{state:s})}async function YV(e,t,n){let r=await e.env.data.loginSessions.get(t,n.id);if(!r){console.warn(`Login session ${n.id} not found when trying to complete continuation`);return}let i=Pm(r.state_data).continuationReturnUrl,a=r.state||T.PENDING,{state:o}=Lm(a,{type:j.COMPLETE_CONTINUATION});return o===a?console.warn(`completeLoginSessionContinuation: State transition from ${a} with COMPLETE_CONTINUATION was invalid or no-op`):await wO(e.env.data.loginSessions,t,n.id,{type:j.UPDATE_CONTEXT,data:{continuationScope:void 0,continuationReturnUrl:void 0}},{state:o}),i}function XV(e){if(!e.state_data)return null;try{return JSON.parse(e.state_data).continuationScope||null}catch{return null}}function ZV(e,t){if(e.state!==T.AWAITING_CONTINUATION||!(Date.parse(e.expires_at)>Date.now()))return!1;let n=XV(e);return n?n.includes(t):!1}async function QV(e,t){let{authParams:n,client:r,ticketAuth:i}=t,{user:a}=t,o=n.response_type||kt.CODE,s=n.response_mode||At.QUERY;if(i){if(!t.loginSession)throw new k(500,{message:`Login session not found for ticket auth.`});a&&!t.skipHooks&&(t.authStrategy&&a.app_metadata?.strategy!==t.authStrategy.strategy&&(a.app_metadata={...a.app_metadata,strategy:t.authStrategy.strategy},await e.env.data.users.update(r.tenant.id,a.user_id,{app_metadata:{...a.app_metadata||{},strategy:t.authStrategy.strategy}})),await _B(e,e.env.data,r.tenant.id,a,t.loginSession,{client:r,authParams:n,authStrategy:t.authStrategy,authConnection:t.authConnection}));let i=aD(),o=Yl(12),s=await e.env.data.codes.create(r.tenant.id,{code_id:Yl(32),code_type:`ticket`,login_id:t.loginSession.id,user_id:a?.user_id,expires_at:new Date(Date.now()+gd).toISOString(),code_verifier:[o,i].join(`|`),redirect_uri:n.redirect_uri,state:n.state,nonce:n.nonce});return e.json({login_ticket:s.code_id,co_verifier:i,co_id:o})}let c=t.refreshToken,l;if(!t.loginSession)throw new k(500,{message:`loginSession must be provided for front-channel auth responses.`});let u=await e.env.data.loginSessions.get(r.tenant.id,t.loginSession.id);if(!u)throw new k(500,{message:`Login session not found.`});let d=u.state||T.PENDING;if(d===T.COMPLETED)throw new k(400,{error:`invalid_request`,error_description:`Login session has already been completed`});if(d===T.FAILED)throw new k(400,{error:`access_denied`,error_description:`Login session failed: ${u.failure_reason||`unknown reason`}`});if(d===T.PENDING||d===T.EXPIRED){l=await HV(e,{user:a,client:r,loginSession:t.loginSession,existingSessionId:t.existingSessionIdToLink,authConnection:t.authConnection,authStrategy:t.authStrategy});let n=await e.env.data.loginSessions.get(r.tenant.id,t.loginSession.id);n&&(u=n)}else if(l=u.session_id,!l)throw new k(500,{message:`Login session in ${d} state but has no session_id`});let f=!!Pm(u.state_data).mfa_required_by_action,m=t.skipHooks||f;if(f&&a&&(a=await Hu(e.env.data.users,r.tenant.id,a),u.user_id!==a.user_id&&(await e.env.data.loginSessions.update(r.tenant.id,u.id,{user_id:a.user_id}),u={...u,user_id:a.user_id})),t.loginSession&&a){let i=u.state||T.PENDING,o={};if(u.state_data)try{o=JSON.parse(u.state_data)}catch{console.error(`Failed to parse state_data for login session`,u.id)}if(i===T.AWAITING_MFA){let n=`/u2/mfa/login-options`;if(o.authenticationMethodId){let t=(await e.env.data.authenticationMethods.list(r.tenant.id,a.user_id)).find(e=>e.id===o.authenticationMethodId);t?.confirmed&&t.type===`phone`?n=`/u2/mfa/phone-challenge`:t?.confirmed&&t.type===`totp`?n=`/u2/mfa/totp-challenge`:t?.confirmed&&(t.type===`passkey`||t.type===`webauthn-roaming`||t.type===`webauthn-platform`)?n=`/u2/passkey/challenge`:t?.type===`totp`?n=`/u2/mfa/totp-enrollment`:t?.type===`phone`&&(n=`/u2/mfa/phone-enrollment`)}return new Response(null,{status:302,headers:{location:`${n}?state=${encodeURIComponent(t.loginSession.id)}`}})}if(i===T.AUTHENTICATED&&o.mfa_verified===!0&&l)try{let t=await e.env.data.sessions.get(r.tenant.id,l),n=typeof o.mfa_verified_at==`string`?o.mfa_verified_at:void 0;t&&!t.revoked_at&&t.user_id===a.user_id&&(n||!cB(t))&&await uB(e.env.data.sessions,r.tenant.id,t,{type:typeof o.mfa_method==`string`?o.mfa_method:void 0,timestamp:n??new Date().toISOString()})}catch(e){console.error(`Failed to record MFA completion on session`,e)}if(i===T.AUTHENTICATED&&!o.mfa_verified){let{checkMfaRequired:n,sendMfaOtp:i}=await Promise.resolve().then(()=>require("./mfa-C8qBEQeH.js")).then(e=>e.i),{isBrowserRememberedForMfa:s}=await Promise.resolve().then(()=>require("./authhero.cjs")).then(e=>e.t),c=await n(e,r.tenant.id,a.user_id,{force:!!o.mfa_required_by_action}),d=c.required&&l?await e.env.data.sessions.get(r.tenant.id,l).then(e=>e?lB(e,a.user_id):!1):!1,f=c.required&&c.enrolled&&!d?await s(e,{tenant:r.tenant,userId:a.user_id,actionRequest:Pm(u.state_data).mfa_required_by_action}):!1;if(c.required&&!d&&!f){let{state:n}=Lm(T.AUTHENTICATED,{type:j.REQUIRE_MFA});if(c.enrolled){if(c.allEnrollments.length>1)return await e.env.data.loginSessions.update(r.tenant.id,t.loginSession.id,{state:n}),new Response(null,{status:302,headers:{location:`/u2/mfa/login-options?state=${encodeURIComponent(t.loginSession.id)}`}});if(await wO(e.env.data.loginSessions,r.tenant.id,t.loginSession.id,{type:j.UPDATE_CONTEXT,data:{authenticationMethodId:c.enrollment.id}},{state:n}),c.enrollment.type===`totp`)return new Response(null,{status:302,headers:{location:`/u2/mfa/totp-challenge?state=${encodeURIComponent(t.loginSession.id)}`}});if(c.enrollment.type===`passkey`||c.enrollment.type===`webauthn-roaming`||c.enrollment.type===`webauthn-platform`)return new Response(null,{status:302,headers:{location:`/u2/passkey/challenge?state=${encodeURIComponent(t.loginSession.id)}`}});if(!c.enrollment.phone_number)throw Error(`MFA enrollment is missing phone_number`);let{MfaSmsRateLimitError:a}=await Promise.resolve().then(()=>eH);try{await i(e,r,t.loginSession,c.enrollment.phone_number)}catch(e){if(!(e instanceof a))throw e}return new Response(null,{status:302,headers:{location:`/u2/mfa/phone-challenge?state=${encodeURIComponent(t.loginSession.id)}`}})}else{let i=r.tenant,a=i.mfa?.factors?.otp===!0,o=i.mfa?.factors?.sms===!0,s=i.mfa?.factors?.webauthn_roaming===!0||i.mfa?.factors?.webauthn_platform===!0;return await e.env.data.loginSessions.update(r.tenant.id,t.loginSession.id,{state:n}),+!!a+ +!!o+ +!!s>1?new Response(null,{status:302,headers:{location:`/u2/mfa/login-options?state=${encodeURIComponent(t.loginSession.id)}`}}):a?new Response(null,{status:302,headers:{location:`/u2/mfa/totp-enrollment?state=${encodeURIComponent(t.loginSession.id)}`}}):s?new Response(null,{status:302,headers:{location:`/u2/passkey/enrollment?state=${encodeURIComponent(t.loginSession.id)}`}}):new Response(null,{status:302,headers:{location:`/u2/mfa/phone-enrollment?state=${encodeURIComponent(t.loginSession.id)}`}})}}}if(o.mfa_required_by_action&&!o.mfa_verified&&!(l&&await e.env.data.sessions.get(r.tenant.id,l).then(e=>e?lB(e,a.user_id):!1))&&!await Promise.resolve().then(()=>require("./authhero.cjs")).then(e=>e.t).then(({isBrowserRememberedForMfa:t})=>t(e,{tenant:r.tenant,userId:a.user_id,actionRequest:Pm(u.state_data).mfa_required_by_action})))throw new k(403,{error:`access_denied`,error_description:`Multi-factor authentication is required to complete this login`});if(l&&$B(u.state_data)){if(!QB(u)?.ready&&!m){let i=await _B(e,e.env.data,r.tenant.id,a,u,{client:r,authParams:{...n,grant_type:Wi.DeviceCode},authStrategy:t.authStrategy,authConnection:t.authConnection});if(i instanceof Response)return i}await wO(e.env.data.loginSessions,r.tenant.id,u.id,{type:j.UPDATE_CONTEXT,data:{deviceFlow:{...QB(u),ready:!0}}});let i=new Headers({location:`/u2/device/confirmation?state=${encodeURIComponent(u.id)}`});return Ld(r.tenant.id,l,e.var.host||``).forEach(e=>i.append(`set-cookie`,e)),new Response(null,{status:302,headers:i})}if(l&&rV(u.state_data)){let n=new Headers;return Ld(r.tenant.id,l,e.var.host||``).forEach(e=>n.append(`set-cookie`,e)),n.set(`location`,`/u2/connect/start?state=${encodeURIComponent(t.loginSession.id)}`),new Response(null,{status:302,headers:n})}}if(t.loginSession&&a&&!r.is_first_party&&s!==At.WEB_MESSAGE){let n=u.state||T.PENDING;if(n===T.AWAITING_CONSENT)return new Response(null,{status:302,headers:{location:`/u2/consent?state=${encodeURIComponent(t.loginSession.id)}`}});if(n===T.AUTHENTICATED){let n=u.authParams.scope?.split(` `).filter(Boolean)??[];if((await WB(e,{tenantId:r.tenant.id,userId:a.user_id,clientId:r.client_id,requestedScopes:n})).length>0){let{state:n}=Lm(T.AUTHENTICATED,{type:j.REQUIRE_CONSENT});return await e.env.data.loginSessions.update(r.tenant.id,t.loginSession.id,{state:n}),new Response(null,{status:302,headers:{location:`/u2/consent?state=${encodeURIComponent(t.loginSession.id)}`}})}}}if(t.loginSession&&a&&s!==At.WEB_MESSAGE){let n=u.state||T.PENDING,i={};if(u.state_data)try{i=JSON.parse(u.state_data)}catch{}if(n===T.AUTHENTICATED&&!i.passkey_nudge_completed){let{checkPasskeyNudgeRequired:n}=await Promise.resolve().then(()=>require("./passkey-enrollment-CAb2zWEF.js"));if((await n(e,r.tenant.id,a.user_id,u.auth_connection)).show)return await JV(e,r.tenant.id,u,[`passkey-enrollment`],`/u2/continue?state=${encodeURIComponent(t.loginSession.id)}`),new Response(null,{status:302,headers:{location:`/u2/passkey/enrollment-nudge?state=${encodeURIComponent(t.loginSession.id)}`}})}}let h=o.split(` `).includes(`code`);if(!c&&n.scope?.split(` `).includes(`offline_access`)&&o!==kt.TOKEN&&!h&&!t.impersonatingUser){let i=qO(r,l?await e.env.data.sessions.get(r.tenant.id,l):null);i.allowed&&(c=(await BV(e,{user:a,client:r,login_id:t.loginSession?.id||``,session_id:l,organization:n.organization,auth_connection:u.auth_connection,auth_strategy:u.auth_strategy,scope:n.scope,audience:n.audience,session_transfer:i.session_transfer,max_expires_at:i.max_expires_at})).wireToken)}if(s===At.SAML_POST){if(!l)throw new p.HTTPException(500,{message:`Session ID not available for SAML response`});let i=a;if(t.loginSession&&!m){let o=await _B(e,e.env.data,r.tenant.id,a,t.loginSession,{client:r,authParams:n,authStrategy:t.authStrategy,authConnection:t.authConnection,sessionReused:!!t.existingSessionIdToLink});if(o instanceof Response)return o;i=o}return ML(e,t.client,t.authParams,i,l,t.loginSession?.id)}let g=await $V(e,{authParams:n,user:a,client:r,session_id:l,refresh_token:c,authStrategy:t.authStrategy,authConnection:t.authConnection,loginSession:u,loginSessionIsCurrent:!0,responseType:o,skipHooks:m,organization:t.organization,impersonatingUser:t.impersonatingUser,sessionReused:!!t.existingSessionIdToLink});if(g instanceof Response)return g;if(!n.redirect_uri)throw new k(400,{message:s===At.WEB_MESSAGE?`Redirect URI not allowed for WEB_MESSAGE response mode.`:`Redirect uri not found for this response mode.`});let _=new Headers;l?(Ld(r.tenant.id,l,e.var.host||``).forEach(e=>{_.append(`set-cookie`,e)}),u.auth_connection&&(await e.env.data.promptSettings.get(r.tenant.id))?.show_last_used_connection===!0&&_.append(`set-cookie`,Hd(r.tenant.id,u.auth_connection,e.var.host||``))):s===At.WEB_MESSAGE&&console.warn(`Session ID not available for WEB_MESSAGE, cookie will not be set.`);let v=o.split(` `),y=v.includes(`code`),b=v.includes(`id_token`),x=v.includes(`token`),S={},ee=`code`in g&&typeof g.code==`string`,te=`access_token`in g&&typeof g.access_token==`string`;if(ee&&y&&(S.code=g.code),te&&(x&&(S.access_token=g.access_token,S.token_type=g.token_type,S.expires_in=g.expires_in.toString()),b&&g.id_token&&(S.id_token=g.id_token)),!ee&&!te)throw new k(500,{message:`Invalid token response for front-channel flow.`});let ne=(`state`in g&&typeof g.state==`string`?g.state:void 0)??n.state;if(ne&&(S.state=ne),(x||b)&&n.scope&&(S.scope=n.scope),s===At.WEB_MESSAGE){let t=new URL(n.redirect_uri);return vB(e,`${t.protocol}//${t.host}`,JSON.stringify(S),_)}if(s===At.FORM_POST)return xB(n.redirect_uri,S,_);let re=b||x,ie=new URL(n.redirect_uri);if(re)ie.hash=new URLSearchParams(S).toString();else for(let[e,t]of Object.entries(S))ie.searchParams.set(e,t);return _.set(`location`,ie.toString()),new Response(`Redirecting`,{status:302,headers:_})}async function $V(e,t){let{user:n}=t,r=t.responseType||kt.TOKEN;if(n&&t.organization&&!await LB(e,t.client.tenant.id,n.user_id,t.organization.id))throw new k(403,{error:`access_denied`,error_description:`User is not a member of the specified organization`});let i=t.authParams.scope||``,a=[],o,s=Cc(e.env,e.var.custom_domain),c=t.authParams.audience??t.client.tenant.default_audience??`${s}userinfo`;if(c)try{let r;if(t.grantType===Wi.ClientCredential||!n&&!t.user)r=await VB(e,{grantType:Wi.ClientCredential,tenantId:t.client.tenant.id,clientId:t.client.client_id,audience:c,requestedScopes:t.authParams.scope?.split(` `)||[],organizationId:t.organization?.id});else{let i=n?.user_id||t.user?.user_id;if(!i)throw new k(400,{error:`invalid_request`,error_description:`User ID is required for user-based grants`});r=await VB(e,{grantType:t.grantType,tenantId:t.client.tenant.id,userId:i,clientId:t.client.client_id,audience:c,requestedScopes:t.authParams.scope?.split(` `)||[],organizationId:t.organization?.id})}i=r.scopes.join(` `),a=r.permissions,o=t.client.app_type===`spa`&&r.token_lifetime_for_web?r.token_lifetime_for_web:r.token_lifetime}catch(e){if(e instanceof p.HTTPException)throw e}let l={...t.authParams,scope:i};if(t.loginSession&&n&&!t.skipHooks){t.authStrategy&&n.app_metadata?.strategy!==t.authStrategy.strategy&&(n.app_metadata={...n.app_metadata,strategy:t.authStrategy.strategy},await e.env.data.users.update(t.client.tenant.id,n.user_id,{app_metadata:{...n.app_metadata||{},strategy:t.authStrategy.strategy}}));let r=await _B(e,e.env.data,t.client.tenant.id,n,t.loginSession,{client:t.client,authParams:l,authStrategy:t.authStrategy,authConnection:t.authConnection,sessionReused:t.sessionReused});if(r instanceof Response)return r;n=r}let u=Kc({loginSession:t.loginSession,authConnection:t.authConnection,ctxConnection:e.var.connection}),d=r.split(` `),f=d.includes(`code`),m=d.includes(`id_token`)||d.includes(`token`),h=f&&m;if(r===kt.CODE){if(!n||!t.loginSession)throw new k(500,{message:`User and loginSession is required for code flow`});let r=await LV(e,{user:n,client:t.client,authParams:l,login_id:t.loginSession.id});return await qV(e,t.client.tenant.id,t.loginSession,u,t.loginSessionIsCurrent?t.loginSession:void 0),r}else if(h){if(!n||!t.loginSession)throw new k(500,{message:`User and loginSession is required for hybrid flow`});let r=await LV(e,{user:n,client:t.client,authParams:l,login_id:t.loginSession.id}),i=await IV(e,{...t,user:n,authParams:l,permissions:a,token_lifetime:o,code:r.code});return await qV(e,t.client.tenant.id,t.loginSession,u,t.loginSessionIsCurrent?t.loginSession:void 0),{...i,code:r.code,state:r.state}}else{let r=await IV(e,{...t,user:n,authParams:l,permissions:a,token_lifetime:o});return t.loginSession&&await qV(e,t.client.tenant.id,t.loginSession,u,t.loginSessionIsCurrent?t.loginSession:void 0),r}}var eH=c({MFA_LOCKOUT_REASON:()=>tH,MFA_MAX_FAILED_ATTEMPTS:()=>5,MFA_MAX_SMS_SENDS:()=>5,MfaSmsRateLimitError:()=>nH,checkMfaAttemptAllowed:()=>sH,enforceMfaSmsSendLimit:()=>uH,isMfaLockedOut:()=>aH,recordMfaFailure:()=>cH,resetMfaFailures:()=>lH}),tH=`too_many_mfa_failures`,nH=class extends Error{constructor(){super(`Too many MFA SMS messages sent`),this.name=`MfaSmsRateLimitError`}};function rH(e){return typeof e==`object`&&!!e&&`allowed`in e&&typeof e.allowed==`boolean`}async function iH(e,t){let n=e.env.data.rateLimit;if(!n)return!0;try{let e=await n.consume(`brute-force`,t);return rH(e)?e.allowed:!0}catch(e){return console.error(`MFA rate limit consume failed:`,e),!0}}function aH(e){return e.state===T.FAILED&&e.failure_reason===`too_many_mfa_failures`?!0:(Pm(e.state_data).mfa_failed_attempts??0)>=5}async function oH(e,t,n,r,i){O(e,t,{type:E.TOO_MANY_MFA_FAILURES,description:i,userId:r}),await WV(e,t,n,tH)}async function sH(e,t,n,r){return aH(n)?!1:await iH(e,`mfa:${t}:${r}`)?!0:(await oH(e,t,n,r,`MFA verification rate limit exceeded`),!1)}async function cH(e,t,n,r){let i=await e.env.data.loginSessions.get(t,n);if(!i||aH(i))return{lockedOut:!0};let a=(Pm(i.state_data).mfa_failed_attempts??0)+1;try{await wO(e.env.data.loginSessions,t,n,{type:j.UPDATE_CONTEXT,data:{mfa_failed_attempts:a}})}catch(e){if(e instanceof yO)return{lockedOut:!0};throw e}return a<5?{lockedOut:!1}:(await oH(e,t,i,r,`Too many failed MFA attempts (${a})`),{lockedOut:!0})}async function lH(e,t,n){await wO(e.env.data.loginSessions,t,n,{type:j.UPDATE_CONTEXT,data:{mfa_failed_attempts:void 0}})}async function uH(e,t,n,r,i){let a=await e.env.data.loginSessions.get(t,n);if(a&&(bO(a)||new Date(a.expires_at).getTime()<Date.now()))throw new yO(n);let o=Pm(a?.state_data).mfa_sms_sent??0,s=i??a?.user_id??r,c=()=>(O(e,t,{type:E.ERROR_SENDING_MFA_SMS,description:`MFA SMS send limit reached`,userId:i??a?.user_id}),new nH);if(o>=5||!await iH(e,`mfa-sms:${t}:${s}`))throw c();if(!a)return;let{status:l}=await TO(e.env.data.loginSessions,t,n,`mfa_sms_sent`,5);if(l===`finalized`)throw new yO(n);if(l===`limit_reached`||l===`contended`)throw c()}Object.defineProperty(exports,"$",{enumerable:!0,get:function(){return CB}}),Object.defineProperty(exports,"$a",{enumerable:!0,get:function(){return pa}}),Object.defineProperty(exports,"$c",{enumerable:!0,get:function(){return ac}}),Object.defineProperty(exports,"$d",{enumerable:!0,get:function(){return Ur}}),Object.defineProperty(exports,"$i",{enumerable:!0,get:function(){return kc}}),Object.defineProperty(exports,"$l",{enumerable:!0,get:function(){return go}}),Object.defineProperty(exports,"$n",{enumerable:!0,get:function(){return FT}}),Object.defineProperty(exports,"$o",{enumerable:!0,get:function(){return vo}}),Object.defineProperty(exports,"$r",{enumerable:!0,get:function(){return ju}}),Object.defineProperty(exports,"$s",{enumerable:!0,get:function(){return He}}),Object.defineProperty(exports,"$t",{enumerable:!0,get:function(){return oL}}),Object.defineProperty(exports,"$u",{enumerable:!0,get:function(){return Da}}),Object.defineProperty(exports,"A",{enumerable:!0,get:function(){return nV}}),Object.defineProperty(exports,"Aa",{enumerable:!0,get:function(){return Se}}),Object.defineProperty(exports,"Ac",{enumerable:!0,get:function(){return Fa}}),Object.defineProperty(exports,"Ad",{enumerable:!0,get:function(){return Mr}}),Object.defineProperty(exports,"Ai",{enumerable:!0,get:function(){return Vl}}),Object.defineProperty(exports,"Al",{enumerable:!0,get:function(){return eo}}),Object.defineProperty(exports,"An",{enumerable:!0,get:function(){return QD}}),Object.defineProperty(exports,"Ao",{enumerable:!0,get:function(){return jo}}),Object.defineProperty(exports,"Ar",{enumerable:!0,get:function(){return Nm}}),Object.defineProperty(exports,"As",{enumerable:!0,get:function(){return ki}}),Object.defineProperty(exports,"At",{enumerable:!0,get:function(){return oR}}),Object.defineProperty(exports,"Au",{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,"B",{enumerable:!0,get:function(){return GB}}),Object.defineProperty(exports,"Ba",{enumerable:!0,get:function(){return Xr}}),Object.defineProperty(exports,"Bc",{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,"Bd",{enumerable:!0,get:function(){return Ct}}),Object.defineProperty(exports,"Bi",{enumerable:!0,get:function(){return Yc}}),Object.defineProperty(exports,"Bl",{enumerable:!0,get:function(){return Ui}}),Object.defineProperty(exports,"Bn",{enumerable:!0,get:function(){return CD}}),Object.defineProperty(exports,"Bo",{enumerable:!0,get:function(){return Cs}}),Object.defineProperty(exports,"Br",{enumerable:!0,get:function(){return Pd}}),Object.defineProperty(exports,"Bs",{enumerable:!0,get:function(){return Fn}}),Object.defineProperty(exports,"Bt",{enumerable:!0,get:function(){return VL}}),Object.defineProperty(exports,"Bu",{enumerable:!0,get:function(){return se}}),Object.defineProperty(exports,"C",{enumerable:!0,get:function(){return xV}}),Object.defineProperty(exports,"Ca",{enumerable:!0,get:function(){return ze}}),Object.defineProperty(exports,"Cc",{enumerable:!0,get:function(){return Ye}}),Object.defineProperty(exports,"Cd",{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,"Ci",{enumerable:!0,get:function(){return $l}}),Object.defineProperty(exports,"Cl",{enumerable:!0,get:function(){return $e}}),Object.defineProperty(exports,"Cn",{enumerable:!0,get:function(){return vO}}),Object.defineProperty(exports,"Co",{enumerable:!0,get:function(){return ka}}),Object.defineProperty(exports,"Cr",{enumerable:!0,get:function(){return I}}),Object.defineProperty(exports,"Cs",{enumerable:!0,get:function(){return Ht}}),Object.defineProperty(exports,"Ct",{enumerable:!0,get:function(){return _R}}),Object.defineProperty(exports,"Cu",{enumerable:!0,get:function(){return mt}}),Object.defineProperty(exports,"D",{enumerable:!0,get:function(){return sV}}),Object.defineProperty(exports,"Da",{enumerable:!0,get:function(){return li}}),Object.defineProperty(exports,"Dc",{enumerable:!0,get:function(){return ps}}),Object.defineProperty(exports,"Dd",{enumerable:!0,get:function(){return de}}),Object.defineProperty(exports,"Di",{enumerable:!0,get:function(){return Yl}}),Object.defineProperty(exports,"Dl",{enumerable:!0,get:function(){return Zs}}),Object.defineProperty(exports,"Dn",{enumerable:!0,get:function(){return lO}}),Object.defineProperty(exports,"Do",{enumerable:!0,get:function(){return Ps}}),Object.defineProperty(exports,"Dr",{enumerable:!0,get:function(){return Rm}}),Object.defineProperty(exports,"Ds",{enumerable:!0,get:function(){return br}}),Object.defineProperty(exports,"Dt",{enumerable:!0,get:function(){return mR}}),Object.defineProperty(exports,"Du",{enumerable:!0,get:function(){return Qo}}),Object.defineProperty(exports,"E",{enumerable:!0,get:function(){return gV}}),Object.defineProperty(exports,"Ea",{enumerable:!0,get:function(){return Es}}),Object.defineProperty(exports,"Ec",{enumerable:!0,get:function(){return xi}}),Object.defineProperty(exports,"Ed",{enumerable:!0,get:function(){return Ja}}),Object.defineProperty(exports,"Ei",{enumerable:!0,get:function(){return Jl}}),Object.defineProperty(exports,"El",{enumerable:!0,get:function(){return zi}}),Object.defineProperty(exports,"En",{enumerable:!0,get:function(){return gO}}),Object.defineProperty(exports,"Eo",{enumerable:!0,get:function(){return Ma}}),Object.defineProperty(exports,"Er",{enumerable:!0,get:function(){return j}}),Object.defineProperty(exports,"Es",{enumerable:!0,get:function(){return Ia}}),Object.defineProperty(exports,"Et",{enumerable:!0,get:function(){return pR}}),Object.defineProperty(exports,"Eu",{enumerable:!0,get:function(){return Hi}}),Object.defineProperty(exports,"F",{enumerable:!0,get:function(){return KB}}),Object.defineProperty(exports,"Fa",{enumerable:!0,get:function(){return Ot}}),Object.defineProperty(exports,"Fc",{enumerable:!0,get:function(){return Gi}}),Object.defineProperty(exports,"Fd",{enumerable:!0,get:function(){return _e}}),Object.defineProperty(exports,"Fi",{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,"Fl",{enumerable:!0,get:function(){return tc}}),Object.defineProperty(exports,"Fn",{enumerable:!0,get:function(){return HD}}),Object.defineProperty(exports,"Fo",{enumerable:!0,get:function(){return mi}}),Object.defineProperty(exports,"Fr",{enumerable:!0,get:function(){return Vd}}),Object.defineProperty(exports,"Fs",{enumerable:!0,get:function(){return si}}),Object.defineProperty(exports,"Ft",{enumerable:!0,get:function(){return KL}}),Object.defineProperty(exports,"Fu",{enumerable:!0,get:function(){return wr}}),Object.defineProperty(exports,"G",{enumerable:!0,get:function(){return zB}}),Object.defineProperty(exports,"Ga",{enumerable:!0,get:function(){return ta}}),Object.defineProperty(exports,"Gc",{enumerable:!0,get:function(){return Dr}}),Object.defineProperty(exports,"Gd",{enumerable:!0,get:function(){return ls}}),Object.defineProperty(exports,"Gi",{enumerable:!0,get:function(){return Ic}}),Object.defineProperty(exports,"Gl",{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,"Gn",{enumerable:!0,get:function(){return pD}}),Object.defineProperty(exports,"Go",{enumerable:!0,get:function(){return je}}),Object.defineProperty(exports,"Gr",{enumerable:!0,get:function(){return sd}}),Object.defineProperty(exports,"Gs",{enumerable:!0,get:function(){return lo}}),Object.defineProperty(exports,"Gt",{enumerable:!0,get:function(){return zI}}),Object.defineProperty(exports,"Gu",{enumerable:!0,get:function(){return ut}}),Object.defineProperty(exports,"H",{enumerable:!0,get:function(){return WB}}),Object.defineProperty(exports,"Ha",{enumerable:!0,get:function(){return Pt}}),Object.defineProperty(exports,"Hc",{enumerable:!0,get:function(){return oe}}),Object.defineProperty(exports,"Hd",{enumerable:!0,get:function(){return Ce}}),Object.defineProperty(exports,"Hi",{enumerable:!0,get:function(){return Kc}}),Object.defineProperty(exports,"Hl",{enumerable:!0,get:function(){return Lr}}),Object.defineProperty(exports,"Hn",{enumerable:!0,get:function(){return DD}}),Object.defineProperty(exports,"Ho",{enumerable:!0,get:function(){return Gt}}),Object.defineProperty(exports,"Hr",{enumerable:!0,get:function(){return vd}}),Object.defineProperty(exports,"Hs",{enumerable:!0,get:function(){return Gr}}),Object.defineProperty(exports,"Ht",{enumerable:!0,get:function(){return kL}}),Object.defineProperty(exports,"Hu",{enumerable:!0,get:function(){return Go}}),Object.defineProperty(exports,"I",{enumerable:!0,get:function(){return $B}}),Object.defineProperty(exports,"Ia",{enumerable:!0,get:function(){return fo}}),Object.defineProperty(exports,"Ic",{enumerable:!0,get:function(){return ts}}),Object.defineProperty(exports,"Id",{enumerable:!0,get:function(){return Ki}}),Object.defineProperty(exports,"Ii",{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,"Il",{enumerable:!0,get:function(){return xt}}),Object.defineProperty(exports,"In",{enumerable:!0,get:function(){return LD}}),Object.defineProperty(exports,"Io",{enumerable:!0,get:function(){return So}}),Object.defineProperty(exports,"Ir",{enumerable:!0,get:function(){return Nd}}),Object.defineProperty(exports,"Is",{enumerable:!0,get:function(){return qt}}),Object.defineProperty(exports,"It",{enumerable:!0,get:function(){return GL}}),Object.defineProperty(exports,"Iu",{enumerable:!0,get:function(){return Vs}}),Object.defineProperty(exports,"J",{enumerable:!0,get:function(){return kB}}),Object.defineProperty(exports,"Ja",{enumerable:!0,get:function(){return dc}}),Object.defineProperty(exports,"Jc",{enumerable:!0,get:function(){return ye}}),Object.defineProperty(exports,"Jd",{enumerable:!0,get:function(){return ao}}),Object.defineProperty(exports,"Ji",{enumerable:!0,get:function(){return Rc}}),Object.defineProperty(exports,"Jl",{enumerable:!0,get:function(){return ji}}),Object.defineProperty(exports,"Jn",{enumerable:!0,get:function(){return aD}}),Object.defineProperty(exports,"Jo",{enumerable:!0,get:function(){return vs}}),Object.defineProperty(exports,"Jr",{enumerable:!0,get:function(){return bd}}),Object.defineProperty(exports,"Js",{enumerable:!0,get:function(){return us}}),Object.defineProperty(exports,"Jt",{enumerable:!0,get:function(){return RI}}),Object.defineProperty(exports,"Ju",{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,"K",{enumerable:!0,get:function(){return LB}}),Object.defineProperty(exports,"Ka",{enumerable:!0,get:function(){return ds}}),Object.defineProperty(exports,"Kc",{enumerable:!0,get:function(){return ct}}),Object.defineProperty(exports,"Kd",{enumerable:!0,get:function(){return qr}}),Object.defineProperty(exports,"Ki",{enumerable:!0,get:function(){return Lc}}),Object.defineProperty(exports,"Kl",{enumerable:!0,get:function(){return Ha}}),Object.defineProperty(exports,"Kn",{enumerable:!0,get:function(){return _D}}),Object.defineProperty(exports,"Ko",{enumerable:!0,get:function(){return ca}}),Object.defineProperty(exports,"Kr",{enumerable:!0,get:function(){return ld}}),Object.defineProperty(exports,"Ks",{enumerable:!0,get:function(){return we}}),Object.defineProperty(exports,"Kt",{enumerable:!0,get:function(){return LI}}),Object.defineProperty(exports,"Ku",{enumerable:!0,get:function(){return lt}}),Object.defineProperty(exports,"L",{enumerable:!0,get:function(){return ZB}}),Object.defineProperty(exports,"La",{enumerable:!0,get:function(){return Ee}}),Object.defineProperty(exports,"Lc",{enumerable:!0,get:function(){return zr}}),Object.defineProperty(exports,"Ld",{enumerable:!0,get:function(){return ns}}),Object.defineProperty(exports,"Li",{enumerable:!0,get:function(){return Zc}}),Object.defineProperty(exports,"Ll",{enumerable:!0,get:function(){return kt}}),Object.defineProperty(exports,"Ln",{enumerable:!0,get:function(){return RD}}),Object.defineProperty(exports,"Lo",{enumerable:!0,get:function(){return Ie}}),Object.defineProperty(exports,"Lr",{enumerable:!0,get:function(){return Rd}}),Object.defineProperty(exports,"Ls",{enumerable:!0,get:function(){return oo}}),Object.defineProperty(exports,"Lt",{enumerable:!0,get:function(){return zL}}),Object.defineProperty(exports,"Lu",{enumerable:!0,get:function(){return at}}),Object.defineProperty(exports,"M",{enumerable:!0,get:function(){return XB}}),Object.defineProperty(exports,"Ma",{enumerable:!0,get:function(){return In}}),Object.defineProperty(exports,"Mc",{enumerable:!0,get:function(){return Ci}}),Object.defineProperty(exports,"Md",{enumerable:!0,get:function(){return ht}}),Object.defineProperty(exports,"Mi",{enumerable:!0,get:function(){return jl}}),Object.defineProperty(exports,"Ml",{enumerable:!0,get:function(){return Wi}}),Object.defineProperty(exports,"Mn",{enumerable:!0,get:function(){return KD}}),Object.defineProperty(exports,"Mo",{enumerable:!0,get:function(){return mr}}),Object.defineProperty(exports,"Mr",{enumerable:!0,get:function(){return Wd}}),Object.defineProperty(exports,"Ms",{enumerable:!0,get:function(){return Le}}),Object.defineProperty(exports,"Mt",{enumerable:!0,get:function(){return aR}}),Object.defineProperty(exports,"Mu",{enumerable:!0,get:function(){return re}}),Object.defineProperty(exports,"N",{enumerable:!0,get:function(){return tV}}),Object.defineProperty(exports,"Na",{enumerable:!0,get:function(){return cs}}),Object.defineProperty(exports,"Nc",{enumerable:!0,get:function(){return to}}),Object.defineProperty(exports,"Nd",{enumerable:!0,get:function(){return Kt}}),Object.defineProperty(exports,"Ni",{enumerable:!0,get:function(){return Wl}}),Object.defineProperty(exports,"Nl",{enumerable:!0,get:function(){return es}}),Object.defineProperty(exports,"Nn",{enumerable:!0,get:function(){return WD}}),Object.defineProperty(exports,"No",{enumerable:!0,get:function(){return Ms}}),Object.defineProperty(exports,"Nr",{enumerable:!0,get:function(){return Dd}}),Object.defineProperty(exports,"Ns",{enumerable:!0,get:function(){return ga}}),Object.defineProperty(exports,"Nt",{enumerable:!0,get:function(){return rR}}),Object.defineProperty(exports,"Nu",{enumerable:!0,get:function(){return Oi}}),Object.defineProperty(exports,"O",{enumerable:!0,get:function(){return oV}}),Object.defineProperty(exports,"Oa",{enumerable:!0,get:function(){return Yt}}),Object.defineProperty(exports,"Oc",{enumerable:!0,get:function(){return Io}}),Object.defineProperty(exports,"Od",{enumerable:!0,get:function(){return Li}}),Object.defineProperty(exports,"Oi",{enumerable:!0,get:function(){return Al}}),Object.defineProperty(exports,"Ol",{enumerable:!0,get:function(){return _t}}),Object.defineProperty(exports,"On",{enumerable:!0,get:function(){return tO}}),Object.defineProperty(exports,"Oo",{enumerable:!0,get:function(){return bi}}),Object.defineProperty(exports,"Or",{enumerable:!0,get:function(){return Pm}}),Object.defineProperty(exports,"Os",{enumerable:!0,get:function(){return Rs}}),Object.defineProperty(exports,"Ot",{enumerable:!0,get:function(){return dR}}),Object.defineProperty(exports,"Ou",{enumerable:!0,get:function(){return Ir}}),Object.defineProperty(exports,"P",{enumerable:!0,get:function(){return QB}}),Object.defineProperty(exports,"Pa",{enumerable:!0,get:function(){return Kr}}),Object.defineProperty(exports,"Pc",{enumerable:!0,get:function(){return ge}}),Object.defineProperty(exports,"Pd",{enumerable:!0,get:function(){return no}}),Object.defineProperty(exports,"Pi",{enumerable:!0,get:function(){return Nl}}),Object.defineProperty(exports,"Pl",{enumerable:!0,get:function(){return Rr}}),Object.defineProperty(exports,"Pn",{enumerable:!0,get:function(){return VD}}),Object.defineProperty(exports,"Po",{enumerable:!0,get:function(){return vi}}),Object.defineProperty(exports,"Pr",{enumerable:!0,get:function(){return Fd}}),Object.defineProperty(exports,"Ps",{enumerable:!0,get:function(){return ws}}),Object.defineProperty(exports,"Pt",{enumerable:!0,get:function(){return nR}}),Object.defineProperty(exports,"Pu",{enumerable:!0,get:function(){return Vo}}),Object.defineProperty(exports,"Q",{enumerable:!0,get:function(){return SB}}),Object.defineProperty(exports,"Qa",{enumerable:!0,get:function(){return Pe}}),Object.defineProperty(exports,"Qc",{enumerable:!0,get:function(){return Hr}}),Object.defineProperty(exports,"Qd",{enumerable:!0,get:function(){return os}}),Object.defineProperty(exports,"Qi",{enumerable:!0,get:function(){return jc}}),Object.defineProperty(exports,"Ql",{enumerable:!0,get:function(){return st}}),Object.defineProperty(exports,"Qn",{enumerable:!0,get:function(){return tD}}),Object.defineProperty(exports,"Qo",{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,"Qr",{enumerable:!0,get:function(){return Ku}}),Object.defineProperty(exports,"Qs",{enumerable:!0,get:function(){return Oo}}),Object.defineProperty(exports,"Qt",{enumerable:!0,get:function(){return VI}}),Object.defineProperty(exports,"Qu",{enumerable:!0,get:function(){return vt}}),Object.defineProperty(exports,"R",{enumerable:!0,get:function(){return qB}}),Object.defineProperty(exports,"Ra",{enumerable:!0,get:function(){return na}}),Object.defineProperty(exports,"Rc",{enumerable:!0,get:function(){return nc}}),Object.defineProperty(exports,"Rd",{enumerable:!0,get:function(){return Br}}),Object.defineProperty(exports,"Ri",{enumerable:!0,get:function(){return rl}}),Object.defineProperty(exports,"Rl",{enumerable:!0,get:function(){return $a}}),Object.defineProperty(exports,"Rn",{enumerable:!0,get:function(){return BD}}),Object.defineProperty(exports,"Ro",{enumerable:!0,get:function(){return ha}}),Object.defineProperty(exports,"Rr",{enumerable:!0,get:function(){return Ud}}),Object.defineProperty(exports,"Rs",{enumerable:!0,get:function(){return xe}}),Object.defineProperty(exports,"Rt",{enumerable:!0,get:function(){return BL}}),Object.defineProperty(exports,"Ru",{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,"S",{enumerable:!0,get:function(){return SV}}),Object.defineProperty(exports,"Sa",{enumerable:!0,get:function(){return To}}),Object.defineProperty(exports,"Sc",{enumerable:!0,get:function(){return Po}}),Object.defineProperty(exports,"Sd",{enumerable:!0,get:function(){return Cr}}),Object.defineProperty(exports,"Sf",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"Si",{enumerable:!0,get:function(){return eu}}),Object.defineProperty(exports,"Sl",{enumerable:!0,get:function(){return rt}}),Object.defineProperty(exports,"Sn",{enumerable:!0,get:function(){return wO}}),Object.defineProperty(exports,"So",{enumerable:!0,get:function(){return Wt}}),Object.defineProperty(exports,"Sr",{enumerable:!0,get:function(){return R}}),Object.defineProperty(exports,"Ss",{enumerable:!0,get:function(){return xc}}),Object.defineProperty(exports,"St",{enumerable:!0,get:function(){return vR}}),Object.defineProperty(exports,"Su",{enumerable:!0,get:function(){return Js}}),Object.defineProperty(exports,"T",{enumerable:!0,get:function(){return vV}}),Object.defineProperty(exports,"Ta",{enumerable:!0,get:function(){return sr}}),Object.defineProperty(exports,"Tc",{enumerable:!0,get:function(){return Fs}}),Object.defineProperty(exports,"Td",{enumerable:!0,get:function(){return Xe}}),Object.defineProperty(exports,"Ti",{enumerable:!0,get:function(){return Ql}}),Object.defineProperty(exports,"Tl",{enumerable:!0,get:function(){return pe}}),Object.defineProperty(exports,"Tn",{enumerable:!0,get:function(){return mO}}),Object.defineProperty(exports,"To",{enumerable:!0,get:function(){return Je}}),Object.defineProperty(exports,"Tr",{enumerable:!0,get:function(){return P}}),Object.defineProperty(exports,"Ts",{enumerable:!0,get:function(){return tt}}),Object.defineProperty(exports,"Tt",{enumerable:!0,get:function(){return hR}}),Object.defineProperty(exports,"Tu",{enumerable:!0,get:function(){return me}}),Object.defineProperty(exports,"U",{enumerable:!0,get:function(){return NB}}),Object.defineProperty(exports,"Ua",{enumerable:!0,get:function(){return uo}}),Object.defineProperty(exports,"Uc",{enumerable:!0,get:function(){return Mi}}),Object.defineProperty(exports,"Ud",{enumerable:!0,get:function(){return $i}}),Object.defineProperty(exports,"Ui",{enumerable:!0,get:function(){return Wc}}),Object.defineProperty(exports,"Ul",{enumerable:!0,get:function(){return ec}}),Object.defineProperty(exports,"Un",{enumerable:!0,get:function(){return OD}}),Object.defineProperty(exports,"Uo",{enumerable:!0,get:function(){return jr}}),Object.defineProperty(exports,"Ur",{enumerable:!0,get:function(){return md}}),Object.defineProperty(exports,"Us",{enumerable:!0,get:function(){return sc}}),Object.defineProperty(exports,"Ut",{enumerable:!0,get:function(){return II}}),Object.defineProperty(exports,"Uu",{enumerable:!0,get:function(){return Or}}),Object.defineProperty(exports,"V",{enumerable:!0,get:function(){return UB}}),Object.defineProperty(exports,"Va",{enumerable:!0,get:function(){return mc}}),Object.defineProperty(exports,"Vc",{enumerable:!0,get:function(){return Ua}}),Object.defineProperty(exports,"Vd",{enumerable:!0,get:function(){return co}}),Object.defineProperty(exports,"Vi",{enumerable:!0,get:function(){return Xc}}),Object.defineProperty(exports,"Vl",{enumerable:!0,get:function(){return $o}}),Object.defineProperty(exports,"Vn",{enumerable:!0,get:function(){return wD}}),Object.defineProperty(exports,"Vo",{enumerable:!0,get:function(){return oi}}),Object.defineProperty(exports,"Vr",{enumerable:!0,get:function(){return hd}}),Object.defineProperty(exports,"Vs",{enumerable:!0,get:function(){return ss}}),Object.defineProperty(exports,"Vt",{enumerable:!0,get:function(){return wL}}),Object.defineProperty(exports,"Vu",{enumerable:!0,get:function(){return Ni}}),Object.defineProperty(exports,"W",{enumerable:!0,get:function(){return VB}}),Object.defineProperty(exports,"Wa",{enumerable:!0,get:function(){return Te}}),Object.defineProperty(exports,"Wc",{enumerable:!0,get:function(){return Wo}}),Object.defineProperty(exports,"Wd",{enumerable:!0,get:function(){return Ln}}),Object.defineProperty(exports,"Wi",{enumerable:!0,get:function(){return Uc}}),Object.defineProperty(exports,"Wl",{enumerable:!0,get:function(){return bt}}),Object.defineProperty(exports,"Wn",{enumerable:!0,get:function(){return AD}}),Object.defineProperty(exports,"Wo",{enumerable:!0,get:function(){return _o}}),Object.defineProperty(exports,"Wr",{enumerable:!0,get:function(){return _d}}),Object.defineProperty(exports,"Ws",{enumerable:!0,get:function(){return Dt}}),Object.defineProperty(exports,"Wt",{enumerable:!0,get:function(){return OL}}),Object.defineProperty(exports,"Wu",{enumerable:!0,get:function(){return Gs}}),Object.defineProperty(exports,"X",{enumerable:!0,get:function(){return OB}}),Object.defineProperty(exports,"Xa",{enumerable:!0,get:function(){return ui}}),Object.defineProperty(exports,"Xc",{enumerable:!0,get:function(){return Nn}}),Object.defineProperty(exports,"Xd",{enumerable:!0,get:function(){return Xi}}),Object.defineProperty(exports,"Xi",{enumerable:!0,get:function(){return Hc}}),Object.defineProperty(exports,"Xl",{enumerable:!0,get:function(){return Er}}),Object.defineProperty(exports,"Xn",{enumerable:!0,get:function(){return nD}}),Object.defineProperty(exports,"Xo",{enumerable:!0,get:function(){return yc}}),Object.defineProperty(exports,"Xr",{enumerable:!0,get:function(){return id}}),Object.defineProperty(exports,"Xs",{enumerable:!0,get:function(){return uc}}),Object.defineProperty(exports,"Xt",{enumerable:!0,get:function(){return qI}}),Object.defineProperty(exports,"Xu",{enumerable:!0,get:function(){return Fr}}),Object.defineProperty(exports,"Y",{enumerable:!0,get:function(){return wB}}),Object.defineProperty(exports,"Ya",{enumerable:!0,get:function(){return Nt}}),Object.defineProperty(exports,"Yc",{enumerable:!0,get:function(){return Ji}}),Object.defineProperty(exports,"Yd",{enumerable:!0,get:function(){return be}}),Object.defineProperty(exports,"Yi",{enumerable:!0,get:function(){return zc}}),Object.defineProperty(exports,"Yl",{enumerable:!0,get:function(){return Uo}}),Object.defineProperty(exports,"Yn",{enumerable:!0,get:function(){return iD}}),Object.defineProperty(exports,"Yo",{enumerable:!0,get:function(){return ti}}),Object.defineProperty(exports,"Yr",{enumerable:!0,get:function(){return xd}}),Object.defineProperty(exports,"Ys",{enumerable:!0,get:function(){return Jr}}),Object.defineProperty(exports,"Yt",{enumerable:!0,get:function(){return sL}}),Object.defineProperty(exports,"Yu",{enumerable:!0,get:function(){return Vi}}),Object.defineProperty(exports,"Z",{enumerable:!0,get:function(){return DB}}),Object.defineProperty(exports,"Za",{enumerable:!0,get:function(){return bo}}),Object.defineProperty(exports,"Zc",{enumerable:!0,get:function(){return as}}),Object.defineProperty(exports,"Zd",{enumerable:!0,get:function(){return Pn}}),Object.defineProperty(exports,"Zi",{enumerable:!0,get:function(){return Ac}}),Object.defineProperty(exports,"Zl",{enumerable:!0,get:function(){return Us}}),Object.defineProperty(exports,"Zn",{enumerable:!0,get:function(){return rD}}),Object.defineProperty(exports,"Zo",{enumerable:!0,get:function(){return zt}}),Object.defineProperty(exports,"Zr",{enumerable:!0,get:function(){return qu}}),Object.defineProperty(exports,"Zs",{enumerable:!0,get:function(){return fa}}),Object.defineProperty(exports,"Zt",{enumerable:!0,get:function(){return XI}}),Object.defineProperty(exports,"Zu",{enumerable:!0,get:function(){return Qs}}),Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return ZV}}),Object.defineProperty(exports,"_a",{enumerable:!0,get:function(){return Wn}}),Object.defineProperty(exports,"_c",{enumerable:!0,get:function(){return Qe}}),Object.defineProperty(exports,"_d",{enumerable:!0,get:function(){return dt}}),Object.defineProperty(exports,"_f",{enumerable:!0,get:function(){return Jt}}),Object.defineProperty(exports,"_i",{enumerable:!0,get:function(){return ou}}),Object.defineProperty(exports,"_l",{enumerable:!0,get:function(){return te}}),Object.defineProperty(exports,"_n",{enumerable:!0,get:function(){return NO}}),Object.defineProperty(exports,"_o",{enumerable:!0,get:function(){return xo}}),Object.defineProperty(exports,"_r",{enumerable:!0,get:function(){return yv}}),Object.defineProperty(exports,"_s",{enumerable:!0,get:function(){return Ne}}),Object.defineProperty(exports,"_t",{enumerable:!0,get:function(){return JR}}),Object.defineProperty(exports,"_u",{enumerable:!0,get:function(){return qa}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return eH}}),Object.defineProperty(exports,"aa",{enumerable:!0,get:function(){return Tc}}),Object.defineProperty(exports,"ac",{enumerable:!0,get:function(){return Be}}),Object.defineProperty(exports,"ad",{enumerable:!0,get:function(){return ie}}),Object.defineProperty(exports,"af",{enumerable:!0,get:function(){return Mn}}),Object.defineProperty(exports,"ai",{enumerable:!0,get:function(){return Pu}}),Object.defineProperty(exports,"al",{enumerable:!0,get:function(){return qo}}),Object.defineProperty(exports,"an",{enumerable:!0,get:function(){return cL}}),Object.defineProperty(exports,"ao",{enumerable:!0,get:function(){return Ao}}),Object.defineProperty(exports,"ar",{enumerable:!0,get:function(){return qx}}),Object.defineProperty(exports,"as",{enumerable:!0,get:function(){return bc}}),Object.defineProperty(exports,"at",{enumerable:!0,get:function(){return nB}}),Object.defineProperty(exports,"au",{enumerable:!0,get:function(){return vc}}),Object.defineProperty(exports,"b",{enumerable:!0,get:function(){return MV}}),Object.defineProperty(exports,"ba",{enumerable:!0,get:function(){return Lt}}),Object.defineProperty(exports,"bc",{enumerable:!0,get:function(){return Si}}),Object.defineProperty(exports,"bd",{enumerable:!0,get:function(){return Di}}),Object.defineProperty(exports,"bf",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"bi",{enumerable:!0,get:function(){return pu}}),Object.defineProperty(exports,"bl",{enumerable:!0,get:function(){return Sr}}),Object.defineProperty(exports,"bn",{enumerable:!0,get:function(){return bO}}),Object.defineProperty(exports,"bo",{enumerable:!0,get:function(){return Xn}}),Object.defineProperty(exports,"br",{enumerable:!0,get:function(){return U_}}),Object.defineProperty(exports,"bs",{enumerable:!0,get:function(){return bs}}),Object.defineProperty(exports,"bt",{enumerable:!0,get:function(){return wR}}),Object.defineProperty(exports,"bu",{enumerable:!0,get:function(){return Jo}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return HV}}),Object.defineProperty(exports,"ca",{enumerable:!0,get:function(){return nt}}),Object.defineProperty(exports,"cc",{enumerable:!0,get:function(){return di}}),Object.defineProperty(exports,"cd",{enumerable:!0,get:function(){return Hs}}),Object.defineProperty(exports,"cf",{enumerable:!0,get:function(){return ic}}),Object.defineProperty(exports,"ci",{enumerable:!0,get:function(){return Lu}}),Object.defineProperty(exports,"cl",{enumerable:!0,get:function(){return pt}}),Object.defineProperty(exports,"cn",{enumerable:!0,get:function(){return ZO}}),Object.defineProperty(exports,"co",{enumerable:!0,get:function(){return js}}),Object.defineProperty(exports,"cr",{enumerable:!0,get:function(){return wx}}),Object.defineProperty(exports,"cs",{enumerable:!0,get:function(){return De}}),Object.defineProperty(exports,"ct",{enumerable:!0,get:function(){return Yz}}),Object.defineProperty(exports,"cu",{enumerable:!0,get:function(){return mo}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return IV}}),Object.defineProperty(exports,"da",{enumerable:!0,get:function(){return zs}}),Object.defineProperty(exports,"dc",{enumerable:!0,get:function(){return ko}}),Object.defineProperty(exports,"dd",{enumerable:!0,get:function(){return Ga}}),Object.defineProperty(exports,"df",{enumerable:!0,get:function(){return wo}}),Object.defineProperty(exports,"di",{enumerable:!0,get:function(){return ku}}),Object.defineProperty(exports,"dl",{enumerable:!0,get:function(){return fe}}),Object.defineProperty(exports,"dn",{enumerable:!0,get:function(){return WO}}),Object.defineProperty(exports,"do",{enumerable:!0,get:function(){return Ve}}),Object.defineProperty(exports,"dr",{enumerable:!0,get:function(){return Uy}}),Object.defineProperty(exports,"ds",{enumerable:!0,get:function(){return ms}}),Object.defineProperty(exports,"dt",{enumerable:!0,get:function(){return Bz}}),Object.defineProperty(exports,"du",{enumerable:!0,get:function(){return Un}}),Object.defineProperty(exports,"ea",{enumerable:!0,get:function(){return Nc}}),Object.defineProperty(exports,"ec",{enumerable:!0,get:function(){return wa}}),Object.defineProperty(exports,"ed",{enumerable:!0,get:function(){return Mo}}),Object.defineProperty(exports,"ef",{enumerable:!0,get:function(){return oc}}),Object.defineProperty(exports,"ei",{enumerable:!0,get:function(){return Mu}}),Object.defineProperty(exports,"el",{enumerable:!0,get:function(){return Tt}}),Object.defineProperty(exports,"en",{enumerable:!0,get:function(){return TL}}),Object.defineProperty(exports,"eo",{enumerable:!0,get:function(){return Yn}}),Object.defineProperty(exports,"er",{enumerable:!0,get:function(){return GT}}),Object.defineProperty(exports,"es",{enumerable:!0,get:function(){return Me}}),Object.defineProperty(exports,"et",{enumerable:!0,get:function(){return xB}}),Object.defineProperty(exports,"eu",{enumerable:!0,get:function(){return Ae}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return LV}}),Object.defineProperty(exports,"fa",{enumerable:!0,get:function(){return Ti}}),Object.defineProperty(exports,"fc",{enumerable:!0,get:function(){return Ue}}),Object.defineProperty(exports,"fd",{enumerable:!0,get:function(){return ce}}),Object.defineProperty(exports,"ff",{enumerable:!0,get:function(){return Re}}),Object.defineProperty(exports,"fi",{enumerable:!0,get:function(){return Tu}}),Object.defineProperty(exports,"fl",{enumerable:!0,get:function(){return Ri}}),Object.defineProperty(exports,"fn",{enumerable:!0,get:function(){return UO}}),Object.defineProperty(exports,"fo",{enumerable:!0,get:function(){return Ca}}),Object.defineProperty(exports,"fr",{enumerable:!0,get:function(){return Cy}}),Object.defineProperty(exports,"fs",{enumerable:!0,get:function(){return Zr}}),Object.defineProperty(exports,"ft",{enumerable:!0,get:function(){return Fz}}),Object.defineProperty(exports,"fu",{enumerable:!0,get:function(){return hs}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return UV}}),Object.defineProperty(exports,"ga",{enumerable:!0,get:function(){return oa}}),Object.defineProperty(exports,"gc",{enumerable:!0,get:function(){return Fo}}),Object.defineProperty(exports,"gd",{enumerable:!0,get:function(){return Ks}}),Object.defineProperty(exports,"gf",{enumerable:!0,get:function(){return ci}}),Object.defineProperty(exports,"gi",{enumerable:!0,get:function(){return xu}}),Object.defineProperty(exports,"gl",{enumerable:!0,get:function(){return Ra}}),Object.defineProperty(exports,"gn",{enumerable:!0,get:function(){return qO}}),Object.defineProperty(exports,"go",{enumerable:!0,get:function(){return fi}}),Object.defineProperty(exports,"gr",{enumerable:!0,get:function(){return bv}}),Object.defineProperty(exports,"gs",{enumerable:!0,get:function(){return yo}}),Object.defineProperty(exports,"gt",{enumerable:!0,get:function(){return dz}}),Object.defineProperty(exports,"gu",{enumerable:!0,get:function(){return We}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return WV}}),Object.defineProperty(exports,"ha",{enumerable:!0,get:function(){return ke}}),Object.defineProperty(exports,"hc",{enumerable:!0,get:function(){return rs}}),Object.defineProperty(exports,"hd",{enumerable:!0,get:function(){return kr}}),Object.defineProperty(exports,"hf",{enumerable:!0,get:function(){return Ts}}),Object.defineProperty(exports,"hi",{enumerable:!0,get:function(){return Su}}),Object.defineProperty(exports,"hl",{enumerable:!0,get:function(){return gt}}),Object.defineProperty(exports,"hn",{enumerable:!0,get:function(){return HO}}),Object.defineProperty(exports,"ho",{enumerable:!0,get:function(){return Zt}}),Object.defineProperty(exports,"hr",{enumerable:!0,get:function(){return Xv}}),Object.defineProperty(exports,"hs",{enumerable:!0,get:function(){return Wr}}),Object.defineProperty(exports,"ht",{enumerable:!0,get:function(){return _z}}),Object.defineProperty(exports,"hu",{enumerable:!0,get:function(){return It}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return aH}}),Object.defineProperty(exports,"ia",{enumerable:!0,get:function(){return Cc}}),Object.defineProperty(exports,"ic",{enumerable:!0,get:function(){return Eo}}),Object.defineProperty(exports,"id",{enumerable:!0,get:function(){return Va}}),Object.defineProperty(exports,"if",{enumerable:!0,get:function(){return qi}}),Object.defineProperty(exports,"ii",{enumerable:!0,get:function(){return Ju}}),Object.defineProperty(exports,"il",{enumerable:!0,get:function(){return Fi}}),Object.defineProperty(exports,"in",{enumerable:!0,get:function(){return HI}}),Object.defineProperty(exports,"io",{enumerable:!0,get:function(){return ya}}),Object.defineProperty(exports,"ir",{enumerable:!0,get:function(){return DS}}),Object.defineProperty(exports,"is",{enumerable:!0,get:function(){return ni}}),Object.defineProperty(exports,"it",{enumerable:!0,get:function(){return eB}}),Object.defineProperty(exports,"iu",{enumerable:!0,get:function(){return ei}}),Object.defineProperty(exports,"j",{enumerable:!0,get:function(){return YB}}),Object.defineProperty(exports,"ja",{enumerable:!0,get:function(){return Qi}}),Object.defineProperty(exports,"jc",{enumerable:!0,get:function(){return Ls}}),Object.defineProperty(exports,"jd",{enumerable:!0,get:function(){return Ys}}),Object.defineProperty(exports,"ji",{enumerable:!0,get:function(){return Ml}}),Object.defineProperty(exports,"jl",{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,"jn",{enumerable:!0,get:function(){return nO}}),Object.defineProperty(exports,"jo",{enumerable:!0,get:function(){return Oa}}),Object.defineProperty(exports,"jr",{enumerable:!0,get:function(){return Id}}),Object.defineProperty(exports,"js",{enumerable:!0,get:function(){return Co}}),Object.defineProperty(exports,"jt",{enumerable:!0,get:function(){return sR}}),Object.defineProperty(exports,"ju",{enumerable:!0,get:function(){return Ba}}),Object.defineProperty(exports,"k",{enumerable:!0,get:function(){return rV}}),Object.defineProperty(exports,"ka",{enumerable:!0,get:function(){return so}}),Object.defineProperty(exports,"kc",{enumerable:!0,get:function(){return et}}),Object.defineProperty(exports,"kd",{enumerable:!0,get:function(){return Yo}}),Object.defineProperty(exports,"ki",{enumerable:!0,get:function(){return Pl}}),Object.defineProperty(exports,"kl",{enumerable:!0,get:function(){return At}}),Object.defineProperty(exports,"kn",{enumerable:!0,get:function(){return $D}}),Object.defineProperty(exports,"ko",{enumerable:!0,get:function(){return ba}}),Object.defineProperty(exports,"kr",{enumerable:!0,get:function(){return Lm}}),Object.defineProperty(exports,"ks",{enumerable:!0,get:function(){return wi}}),Object.defineProperty(exports,"kt",{enumerable:!0,get:function(){return cR}}),Object.defineProperty(exports,"ku",{enumerable:!0,get:function(){return yt}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return YV}}),Object.defineProperty(exports,"la",{enumerable:!0,get:function(){return La}}),Object.defineProperty(exports,"lc",{enumerable:!0,get:function(){return Xt}}),Object.defineProperty(exports,"ld",{enumerable:!0,get:function(){return ot}}),Object.defineProperty(exports,"lf",{enumerable:!0,get:function(){return wt}}),Object.defineProperty(exports,"li",{enumerable:!0,get:function(){return Du}}),Object.defineProperty(exports,"ll",{enumerable:!0,get:function(){return Ze}}),Object.defineProperty(exports,"ln",{enumerable:!0,get:function(){return ek}}),Object.defineProperty(exports,"lo",{enumerable:!0,get:function(){return la}}),Object.defineProperty(exports,"lr",{enumerable:!0,get:function(){return Ax}}),Object.defineProperty(exports,"ls",{enumerable:!0,get:function(){return ra}}),Object.defineProperty(exports,"lt",{enumerable:!0,get:function(){return Hz}}),Object.defineProperty(exports,"lu",{enumerable:!0,get:function(){return Oe}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return BV}}),Object.defineProperty(exports,"ma",{enumerable:!0,get:function(){return ho}}),Object.defineProperty(exports,"mc",{enumerable:!0,get:function(){return As}}),Object.defineProperty(exports,"md",{enumerable:!0,get:function(){return Ko}}),Object.defineProperty(exports,"mf",{enumerable:!0,get:function(){return ir}}),Object.defineProperty(exports,"mi",{enumerable:!0,get:function(){return Cu}}),Object.defineProperty(exports,"ml",{enumerable:!0,get:function(){return Xs}}),Object.defineProperty(exports,"mn",{enumerable:!0,get:function(){return KO}}),Object.defineProperty(exports,"mo",{enumerable:!0,get:function(){return pi}}),Object.defineProperty(exports,"mr",{enumerable:!0,get:function(){return Zv}}),Object.defineProperty(exports,"ms",{enumerable:!0,get:function(){return Ft}}),Object.defineProperty(exports,"mt",{enumerable:!0,get:function(){return Dz}}),Object.defineProperty(exports,"mu",{enumerable:!0,get:function(){return gc}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return sH}}),Object.defineProperty(exports,"na",{enumerable:!0,get:function(){return Oc}}),Object.defineProperty(exports,"nc",{enumerable:!0,get:function(){return hi}}),Object.defineProperty(exports,"nd",{enumerable:!0,get:function(){return yi}}),Object.defineProperty(exports,"nf",{enumerable:!0,get:function(){return ro}}),Object.defineProperty(exports,"ni",{enumerable:!0,get:function(){return rd}}),Object.defineProperty(exports,"nl",{enumerable:!0,get:function(){return Ka}}),Object.defineProperty(exports,"nn",{enumerable:!0,get:function(){return ZI}}),Object.defineProperty(exports,"no",{enumerable:!0,get:function(){return Sc}}),Object.defineProperty(exports,"nr",{enumerable:!0,get:function(){return ME}}),Object.defineProperty(exports,"ns",{enumerable:!0,get:function(){return qn}}),Object.defineProperty(exports,"nt",{enumerable:!0,get:function(){return lB}}),Object.defineProperty(exports,"nu",{enumerable:!0,get:function(){return Gn}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return cH}}),Object.defineProperty(exports,"oa",{enumerable:!0,get:function(){return wc}}),Object.defineProperty(exports,"oc",{enumerable:!0,get:function(){return Sa}}),Object.defineProperty(exports,"od",{enumerable:!0,get:function(){return Ai}}),Object.defineProperty(exports,"of",{enumerable:!0,get:function(){return is}}),Object.defineProperty(exports,"oi",{enumerable:!0,get:function(){return Au}}),Object.defineProperty(exports,"ol",{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,"on",{enumerable:!0,get:function(){return QO}}),Object.defineProperty(exports,"oo",{enumerable:!0,get:function(){return Ge}}),Object.defineProperty(exports,"or",{enumerable:!0,get:function(){return Gx}}),Object.defineProperty(exports,"os",{enumerable:!0,get:function(){return Bt}}),Object.defineProperty(exports,"ot",{enumerable:!0,get:function(){return tB}}),Object.defineProperty(exports,"ou",{enumerable:!0,get:function(){return Rt}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return QV}}),Object.defineProperty(exports,"pa",{enumerable:!0,get:function(){return or}}),Object.defineProperty(exports,"pc",{enumerable:!0,get:function(){return Ta}}),Object.defineProperty(exports,"pd",{enumerable:!0,get:function(){return Pi}}),Object.defineProperty(exports,"pf",{enumerable:!0,get:function(){return _a}}),Object.defineProperty(exports,"pi",{enumerable:!0,get:function(){return wu}}),Object.defineProperty(exports,"pl",{enumerable:!0,get:function(){return Nr}}),Object.defineProperty(exports,"pn",{enumerable:!0,get:function(){return VO}}),Object.defineProperty(exports,"po",{enumerable:!0,get:function(){return Os}}),Object.defineProperty(exports,"pr",{enumerable:!0,get:function(){return Sy}}),Object.defineProperty(exports,"ps",{enumerable:!0,get:function(){return hc}}),Object.defineProperty(exports,"pt",{enumerable:!0,get:function(){return jz}}),Object.defineProperty(exports,"pu",{enumerable:!0,get:function(){return Qr}}),Object.defineProperty(exports,"q",{enumerable:!0,get:function(){return FB}}),Object.defineProperty(exports,"qa",{enumerable:!0,get:function(){return Yr}}),Object.defineProperty(exports,"qc",{enumerable:!0,get:function(){return io}}),Object.defineProperty(exports,"qd",{enumerable:!0,get:function(){return jt}}),Object.defineProperty(exports,"qi",{enumerable:!0,get:function(){return Bc}}),Object.defineProperty(exports,"ql",{enumerable:!0,get:function(){return ae}}),Object.defineProperty(exports,"qn",{enumerable:!0,get:function(){return oD}}),Object.defineProperty(exports,"qo",{enumerable:!0,get:function(){return Kn}}),Object.defineProperty(exports,"qr",{enumerable:!0,get:function(){return od}}),Object.defineProperty(exports,"qs",{enumerable:!0,get:function(){return ea}}),Object.defineProperty(exports,"qt",{enumerable:!0,get:function(){return $}}),Object.defineProperty(exports,"qu",{enumerable:!0,get:function(){return Za}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return uH}}),Object.defineProperty(exports,"ra",{enumerable:!0,get:function(){return Ec}}),Object.defineProperty(exports,"rc",{enumerable:!0,get:function(){return ia}}),Object.defineProperty(exports,"rd",{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,"rf",{enumerable:!0,get:function(){return ve}}),Object.defineProperty(exports,"ri",{enumerable:!0,get:function(){return Ru}}),Object.defineProperty(exports,"rl",{enumerable:!0,get:function(){return le}}),Object.defineProperty(exports,"rn",{enumerable:!0,get:function(){return YI}}),Object.defineProperty(exports,"ro",{enumerable:!0,get:function(){return Ut}}),Object.defineProperty(exports,"rr",{enumerable:!0,get:function(){return YE}}),Object.defineProperty(exports,"rs",{enumerable:!0,get:function(){return ys}}),Object.defineProperty(exports,"rt",{enumerable:!0,get:function(){return qz}}),Object.defineProperty(exports,"ru",{enumerable:!0,get:function(){return _s}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return lH}}),Object.defineProperty(exports,"sa",{enumerable:!0,get:function(){return Ro}}),Object.defineProperty(exports,"sc",{enumerable:!0,get:function(){return Ds}}),Object.defineProperty(exports,"sd",{enumerable:!0,get:function(){return Tr}}),Object.defineProperty(exports,"sf",{enumerable:!0,get:function(){return Vr}}),Object.defineProperty(exports,"si",{enumerable:!0,get:function(){return Hu}}),Object.defineProperty(exports,"sl",{enumerable:!0,get:function(){return qs}}),Object.defineProperty(exports,"sn",{enumerable:!0,get:function(){return XO}}),Object.defineProperty(exports,"so",{enumerable:!0,get:function(){return Ea}}),Object.defineProperty(exports,"sr",{enumerable:!0,get:function(){return Ux}}),Object.defineProperty(exports,"ss",{enumerable:!0,get:function(){return po}}),Object.defineProperty(exports,"st",{enumerable:!0,get:function(){return rB}}),Object.defineProperty(exports,"su",{enumerable:!0,get:function(){return ar}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return nH}}),Object.defineProperty(exports,"ta",{enumerable:!0,get:function(){return Dc}}),Object.defineProperty(exports,"tc",{enumerable:!0,get:function(){return ks}}),Object.defineProperty(exports,"td",{enumerable:!0,get:function(){return ja}}),Object.defineProperty(exports,"tf",{enumerable:!0,get:function(){return Et}}),Object.defineProperty(exports,"ti",{enumerable:!0,get:function(){return zu}}),Object.defineProperty(exports,"tl",{enumerable:!0,get:function(){return ee}}),Object.defineProperty(exports,"tn",{enumerable:!0,get:function(){return SL}}),Object.defineProperty(exports,"to",{enumerable:!0,get:function(){return xs}}),Object.defineProperty(exports,"tr",{enumerable:!0,get:function(){return VT}}),Object.defineProperty(exports,"ts",{enumerable:!0,get:function(){return ua}}),Object.defineProperty(exports,"tt",{enumerable:!0,get:function(){return vB}}),Object.defineProperty(exports,"tu",{enumerable:!0,get:function(){return sa}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return KV}}),Object.defineProperty(exports,"ua",{enumerable:!0,get:function(){return xr}}),Object.defineProperty(exports,"uc",{enumerable:!0,get:function(){return va}}),Object.defineProperty(exports,"ud",{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,"uf",{enumerable:!0,get:function(){return Bi}}),Object.defineProperty(exports,"ui",{enumerable:!0,get:function(){return Ou}}),Object.defineProperty(exports,"ul",{enumerable:!0,get:function(){return Ya}}),Object.defineProperty(exports,"un",{enumerable:!0,get:function(){return $O}}),Object.defineProperty(exports,"uo",{enumerable:!0,get:function(){return Do}}),Object.defineProperty(exports,"ur",{enumerable:!0,get:function(){return jx}}),Object.defineProperty(exports,"us",{enumerable:!0,get:function(){return Hn}}),Object.defineProperty(exports,"ut",{enumerable:!0,get:function(){return Vz}}),Object.defineProperty(exports,"uu",{enumerable:!0,get:function(){return aa}}),Object.defineProperty(exports,"v",{enumerable:!0,get:function(){return JV}}),Object.defineProperty(exports,"va",{enumerable:!0,get:function(){return gs}}),Object.defineProperty(exports,"vc",{enumerable:!0,get:function(){return Pa}}),Object.defineProperty(exports,"vd",{enumerable:!0,get:function(){return za}}),Object.defineProperty(exports,"vf",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"vi",{enumerable:!0,get:function(){return hu}}),Object.defineProperty(exports,"vl",{enumerable:!0,get:function(){return Ei}}),Object.defineProperty(exports,"vn",{enumerable:!0,get:function(){return yO}}),Object.defineProperty(exports,"vo",{enumerable:!0,get:function(){return Fe}}),Object.defineProperty(exports,"vr",{enumerable:!0,get:function(){return H}}),Object.defineProperty(exports,"vs",{enumerable:!0,get:function(){return da}}),Object.defineProperty(exports,"vt",{enumerable:!0,get:function(){return VR}}),Object.defineProperty(exports,"vu",{enumerable:!0,get:function(){return ue}}),Object.defineProperty(exports,"w",{enumerable:!0,get:function(){return hV}}),Object.defineProperty(exports,"wa",{enumerable:!0,get:function(){return xa}}),Object.defineProperty(exports,"wc",{enumerable:!0,get:function(){return Na}}),Object.defineProperty(exports,"wd",{enumerable:!0,get:function(){return it}}),Object.defineProperty(exports,"wi",{enumerable:!0,get:function(){return Zl}}),Object.defineProperty(exports,"wl",{enumerable:!0,get:function(){return Xa}}),Object.defineProperty(exports,"wn",{enumerable:!0,get:function(){return hO}}),Object.defineProperty(exports,"wo",{enumerable:!0,get:function(){return No}}),Object.defineProperty(exports,"wr",{enumerable:!0,get:function(){return F}}),Object.defineProperty(exports,"ws",{enumerable:!0,get:function(){return Lo}}),Object.defineProperty(exports,"wt",{enumerable:!0,get:function(){return gR}}),Object.defineProperty(exports,"wu",{enumerable:!0,get:function(){return Qa}}),Object.defineProperty(exports,"x",{enumerable:!0,get:function(){return jV}}),Object.defineProperty(exports,"xa",{enumerable:!0,get:function(){return Yi}}),Object.defineProperty(exports,"xc",{enumerable:!0,get:function(){return Aa}}),Object.defineProperty(exports,"xd",{enumerable:!0,get:function(){return Bo}}),Object.defineProperty(exports,"xf",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"xi",{enumerable:!0,get:function(){return cu}}),Object.defineProperty(exports,"xl",{enumerable:!0,get:function(){return Bs}}),Object.defineProperty(exports,"xn",{enumerable:!0,get:function(){return TO}}),Object.defineProperty(exports,"xo",{enumerable:!0,get:function(){return ai}}),Object.defineProperty(exports,"xr",{enumerable:!0,get:function(){return z}}),Object.defineProperty(exports,"xs",{enumerable:!0,get:function(){return ri}}),Object.defineProperty(exports,"xt",{enumerable:!0,get:function(){return LR}}),Object.defineProperty(exports,"xu",{enumerable:!0,get:function(){return Ar}}),Object.defineProperty(exports,"y",{enumerable:!0,get:function(){return DV}}),Object.defineProperty(exports,"ya",{enumerable:!0,get:function(){return $r}}),Object.defineProperty(exports,"yc",{enumerable:!0,get:function(){return Is}}),Object.defineProperty(exports,"yd",{enumerable:!0,get:function(){return ne}}),Object.defineProperty(exports,"yf",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"yi",{enumerable:!0,get:function(){return fu}}),Object.defineProperty(exports,"yl",{enumerable:!0,get:function(){return zo}}),Object.defineProperty(exports,"yn",{enumerable:!0,get:function(){return EO}}),Object.defineProperty(exports,"yo",{enumerable:!0,get:function(){return ma}}),Object.defineProperty(exports,"yr",{enumerable:!0,get:function(){return B}}),Object.defineProperty(exports,"ys",{enumerable:!0,get:function(){return Jn}}),Object.defineProperty(exports,"yt",{enumerable:!0,get:function(){return NR}}),Object.defineProperty(exports,"yu",{enumerable:!0,get:function(){return Ii}}),Object.defineProperty(exports,"z",{enumerable:!0,get:function(){return JB}}),Object.defineProperty(exports,"za",{enumerable:!0,get:function(){return fs}}),Object.defineProperty(exports,"zc",{enumerable:!0,get:function(){return St}}),Object.defineProperty(exports,"zd",{enumerable:!0,get:function(){return rc}}),Object.defineProperty(exports,"zi",{enumerable:!0,get:function(){return ll}}),Object.defineProperty(exports,"zl",{enumerable:!0,get:function(){return he}}),Object.defineProperty(exports,"zn",{enumerable:!0,get:function(){return TD}}),Object.defineProperty(exports,"zo",{enumerable:!0,get:function(){return Zn}}),Object.defineProperty(exports,"zr",{enumerable:!0,get:function(){return Ld}}),Object.defineProperty(exports,"zs",{enumerable:!0,get:function(){return Zi}}),Object.defineProperty(exports,"zt",{enumerable:!0,get:function(){return RL}}),Object.defineProperty(exports,"zu",{enumerable:!0,get:function(){return Wa}});
395
+ </html>`;return n.set(`content-type`,`text/html; charset=utf-8`),n.set(`cache-control`,`no-store`),n.set(`pragma`,`no-cache`),new Response(i,{status:200,headers:n})}function SB(e){if(!e)return;let[t,n]=e.split(` `);if(!(!t||t.toLowerCase()!==`bearer`))return n?.trim()||void 0}function CB(e){if(!e)return{};let[t,n]=e.split(` `);if(t?.toLowerCase()!==`basic`||!n)return{};try{let[e,t]=atob(n).split(`:`);return!e||!t?{}:{client_id:e,client_secret:t}}catch{return{}}}var wB=`urn:authhero:management`;function TB(e){return e===`/tenants`?!0:!e.startsWith(`/tenants/`)||/^\/tenants\/[^/]+\/(operations|config-sync)(\/|$)/.test(e)?!1:e!==`/tenants/settings`&&!e.startsWith(`/tenants/settings/`)}function EB(e){return e.replace(/:([a-zA-Z_][a-zA-Z0-9_]*)/g,`{$1}`)}function DB(e){let t=e.split(`:`);if(t.length!==2||!t[0]||!t[1])return[e];let n=`${t[1]}:${t[0]}`;return n===e?[e]:[e,n]}function OB(e,t={}){let n=t.requireManagementAudience??!1,r=t.relaxManagementAudience??!1,i=t.additionalManagementAudiences,a=t.additionalIssuers;return async(t,o)=>{let s=t.req.method===`HEAD`?`GET`:t.req.method,c=t.req.matchedRoutes.find(e=>e.method.toUpperCase()===s&&e.path!==`/*`);if(!c)return await o();let l=EB(c.path),u=l.startsWith(`/api/v2`)?l.slice(7)||`/`:l,d=e.openAPIRegistry.definitions.find(e=>`route`in e&&e.route.path===u&&e.route.method.toUpperCase()===s.toUpperCase());if(d&&`route`in d){let e=d.route.security?.[0]?.Bearer;if(e===void 0)return await o();let s=SB(t.req.header(`authorization`));if(!s)throw Fl.missingAuthentication();try{let o;if(a){let{payload:e}=(0,h.decode)(s);o=await a({tenant_id:typeof e?.tenant_id==`string`?e.tenant_id:void 0})}let c=await nO(t,s,{additionalIssuers:o});if(t.set(`user_id`,c.sub),t.set(`user`,c),c.azp&&(t.set(`client_id`,c.azp),t.set(`client_id_from_token`,!0)),c.org_name&&t.set(`org_name`,c.org_name),c.org_id&&t.set(`organization_id`,c.org_id),!t.var.tenant_id&&c.tenant_id&&t.set(`tenant_id`,c.tenant_id),n){let e=c.aud,n=Array.isArray(e)?e:e?[e]:[],a=typeof c.tenant_id==`string`?c.tenant_id:void 0,o=i?await i({tenant_id:a}):[],s=new Set([wB,...o]);if(!n.some(e=>s.has(e)))if(r)console.warn(`[authhero] management API accepted token without management audience (relaxManagementAudience=true): sub=${c.sub??`unknown`} aud=${JSON.stringify(e)}`);else throw new k(403,{message:`Invalid audience`});let l=typeof c.tenant_id==`string`?c.tenant_id:void 0,d=t.var.tenant_id;if(l&&d&&l!==d){let e=t.env.data?.multiTenancyConfig?.controlPlaneTenantId;if(!e||l!==e)throw new k(403,{message:`Cross-tenant management requires a control-plane token`});if(!await t.var.data.tenants.get(d).catch(e=>{throw new p.HTTPException(500,{message:`Failed to look up tenant`,cause:e})}))throw Nl.tenant()}let f=t.env.data?.multiTenancyConfig?.controlPlaneTenantId,m=typeof c.org_name==`string`?c.org_name:void 0,h=typeof c.org_id==`string`?c.org_id:void 0;if(f&&l===f&&d&&(m||h)){let e=m??(await t.env.data.organizations.get(f,h).catch(e=>{throw new p.HTTPException(500,{message:`Failed to look up organization`,cause:e})}))?.name,n=!!e&&e.toLowerCase()===d.toLowerCase(),r=d===f&&TB(u);if(r&&e&&!t.var.org_name&&t.set(`org_name`,e),!n&&(!r||!e))throw new k(403,{message:e?`This token is for another tenant's organization ("${e}"), not "${d}"`:`An organization token must belong to a tenant's organization`})}}let l=Array.isArray(c.permissions)?c.permissions:[],d=typeof c.scope==`string`?c.scope.split(` `):Array.isArray(c.scope)?c.scope:[];if(e.length){let t=e.flatMap(DB);if(!(t.some(e=>l.includes(e))||t.some(e=>d.includes(e))))throw Fl.insufficientScope(e)}}catch(e){throw e instanceof p.HTTPException?e:Fl.invalidToken()}}return await o()}}async function kB(e,t,n){if(n===`urn:authhero:management`)return!0;let r=e.env.additionalManagementAudiences;return r?(await r({tenant_id:t})).includes(n):!1}var AB=[`openid`,`profile`,`email`,`address`,`phone`,`offline_access`];async function jB(e,t,n,r){let i=[];if(!(await e.env.data.tenants.get(t))?.flags?.inherit_global_permissions_in_organizations)return[];let a=await e.env.data.userRoles.list(t,n,void 0,``),o=await Promise.all(a.map(n=>e.env.data.rolePermissions.list(t,n.id,{per_page:1e3})));for(let e of o)e.forEach(e=>{e.resource_server_identifier===r&&i.push(e.permission_name)});return[...new Set(i)]}var MB=`admin:organizations`,NB=`access:all_organizations`;async function PB(e,t,n,r){let i=new Set,a=e=>{for(let t of e)t.resource_server_identifier===`urn:authhero:management`&&r.includes(t.permission_name)&&i.add(t.permission_name)};if(a(await e.env.data.userPermissions.list(t,n,void 0,``)),i.size===r.length)return i;let o=await e.env.data.userRoles.list(t,n,void 0,``);for(let n of o)if(a(await e.env.data.rolePermissions.list(t,n.id,{per_page:1e3})),i.size===r.length)break;return i}async function FB(e,t,n,r){return(await PB(e,t,n,[r])).has(r)}async function IB(e,t,n,r){let i=(r===void 0?await e.env.data.tenants.get(t):r)?.flags?.inherit_global_permissions_in_organizations===!0,a=await PB(e,t,n,i?[NB,MB]:[NB]);return a.has(`access:all_organizations`)||i&&a.has(`admin:organizations`)}async function LB(e,t,n,r,i){return await IB(e,t,n,i)?!0:(await e.env.data.userOrganizations.list(t,{q:`user_id:${D(n)}`,per_page:1e3})).userOrganizations.some(e=>e.organization_id===r)}function RB(e){let t=e.granted.filter(t=>!e.definedScopes.includes(t));if(t.length===0)return;let n=e.userId?`, user_id=${e.userId}`:``;console.warn(`[scopes-permissions] Dropped scope(s) not defined on the resource server: ${t.join(`, `)} (source=${e.source}, tenant_id=${e.tenantId}, client_id=${e.clientId}, audience=${e.audience}${n})`)}async function zB(e,t){let{tenantId:n,audience:r,scopes:i}=t;if(i.length===0)return[];let{resource_servers:a}=await e.env.data.resourceServers.list(n),o=a.find(e=>e.identifier===r);if(!o)return[];let s=(o.scopes||[]).map(e=>e.value);return i.filter(e=>!s.includes(e))}async function BB(e,t){let{tenantId:n,clientId:r,audience:i,requestedScopes:a}=t,o=a.filter(e=>AB.includes(e)),s=a.filter(e=>!AB.includes(e)),c=(await e.env.data.resourceServers.list(n)).resource_servers.filter(e=>e.identifier===i);if(c.length===0)return{scopes:o,permissions:[],token_lifetime:86400,token_lifetime_for_web:7200};let l=c[0];if(!l)return{scopes:o,permissions:[],token_lifetime:86400,token_lifetime_for_web:7200};let u=l.options?.enforce_policies===!0,d=l.options?.token_dialect||`access_token`,f=(await e.env.data.clientGrants.list(n,{q:`client_id:${D(r)}`})).client_grants.find(e=>e.audience===i);if(!f)return{scopes:o,permissions:[],token_lifetime:l.token_lifetime,token_lifetime_for_web:l.token_lifetime_for_web};let p=f.scope||[],m=(l.scopes||[]).map(e=>e.value);if(s.length>0){let e=s.filter(e=>!p.includes(e));if(e.length>0)throw new k(403,{error:`access_denied`,error_description:`Client is not authorized for scope(s): ${e.join(`, `)}`})}let h=p.filter(e=>m.includes(e));RB({source:`client_grant`,tenantId:n,clientId:r,audience:i,granted:p,definedScopes:m});let g=a.length===0?h:s.filter(e=>h.includes(e)),_={token_lifetime:l.token_lifetime,token_lifetime_for_web:l.token_lifetime_for_web};if(!u)return{scopes:[...new Set([...o,...g])],permissions:[],..._};let v=g;return d===`access_token_authz`?{scopes:[...new Set([...o,...g])],permissions:v,..._}:{scopes:[...new Set([...o,...g])],permissions:[],..._}}async function VB(e,t){if(t.grantType===Wi.ClientCredential)return await BB(e,{tenantId:t.tenantId,clientId:t.clientId,audience:t.audience,requestedScopes:t.requestedScopes});let{tenantId:n,clientId:r,userId:i,audience:a,requestedScopes:o,organizationId:s}=t,c=await e.env.data.tenants.get(n),l=c?.flags?.restrict_undefined_scopes===!0;if(s&&!await LB(e,n,i,s,c))throw new k(403,{error:`access_denied`,error_description:`User is not a member of the specified organization`});let u=o.filter(e=>AB.includes(e)),d=(await e.env.data.resourceServers.list(n)).resource_servers.filter(e=>e.identifier===a)[0];if(!d){if(o.filter(e=>e&&!AB.includes(e)).length>0)throw new k(403,{error:`access_denied`,error_description:`Service not found: ${a}`});return{scopes:u,permissions:[],token_lifetime:86400,token_lifetime_for_web:7200}}let f=(d.scopes||[]).map(e=>e.value),p=await kB(e,n,a),m=d.options?.enforce_policies===!0||p,h=d.options?.token_dialect||`access_token`,g={token_lifetime:d.token_lifetime,token_lifetime_for_web:d.token_lifetime_for_web};if(!m){let e=l?o.filter(e=>f.includes(e)||AB.includes(e)):o;return{scopes:[...new Set(e)],permissions:[],...g}}let[_,v,y]=await Promise.all([e.env.data.userPermissions.list(n,i,void 0,s),e.env.data.userRoles.list(n,i,void 0,``),s?e.env.data.userRoles.list(n,i,void 0,s):Promise.resolve([])]),b=[...v,...y],x=s?await jB(e,n,i,a):[],S=await Promise.all(b.map(t=>e.env.data.rolePermissions.list(n,t.id,{per_page:1e3}))),ee=[];for(let e of S)e.forEach(e=>{e.resource_server_identifier===a&&ee.push(e.permission_name)});let te=new Set;_.forEach(e=>{e.resource_server_identifier===a&&te.add(e.permission_name)}),ee.forEach(e=>{te.add(e)}),x.forEach(e=>{te.add(e)});let ne=Array.from(te),re=ne.filter(e=>f.includes(e));RB({source:`user_permissions`,tenantId:n,clientId:r,audience:a,granted:ne,definedScopes:f,userId:i});let ie=l?[]:o.filter(e=>!f.includes(e)&&!AB.includes(e)&&(!p||te.has(e)));if(h===`access_token_authz`)return{scopes:[...new Set([...u,...ie])],permissions:re,...g};let ae=o.filter(e=>f.includes(e)&&ne.includes(e));return{scopes:[...new Set([...u,...ae,...ie])],permissions:[],...g}}var HB=new Set([`openid`,`profile`,`email`]);function UB(e,t){let n=new Set(t),r=[];for(let t of e)t&&(HB.has(t)||n.has(t)||r.push(t));return Array.from(new Set(r))}async function WB(e,t){if(!e.env.data.grants)return UB(t.requestedScopes,[]);let n=await e.env.data.grants.get(t.tenantId,t.userId,t.clientId);return UB(t.requestedScopes,n?.scope??[])}function GB(e,t){if(!e||!t||e.length!==t.length)return!1;let n=0;for(let r=0;r<e.length;r++)n|=e.charCodeAt(r)^t.charCodeAt(r);return n===0}async function KB(e){return Is(await crypto.subtle.digest(`SHA-256`,new TextEncoder().encode(e)))}function qB(e){return e.replace(/[\s-]/g,``).toUpperCase()}function JB(e){if(!e.deviceCodes)throw new k(503,{error:`temporarily_unavailable`,error_description:`Device authorization storage is not configured`});return e.deviceCodes}function YB(e){if(!e.grant_types?.some(e=>e===Wi.DeviceCode||e===`device_code`))throw new k(400,{error:`unauthorized_client`,error_description:`Device authorization is not enabled for this client`})}function XB(e,t,n,r=!1){let i=t.token_endpoint_auth_method??(t.app_type===`native`||t.app_type===`spa`?`none`:`client_secret_post`);if(!e.var.client_authenticated_via_assertion&&!(i===`none`&&n===void 0)&&!((i===`client_secret_basic`&&r||i===`client_secret_post`&&!r)&&n&&GB(t.client_secret,n)))throw new k(401,{error:`invalid_client`,error_description:`Client authentication failed`})}async function ZB(e,t,n,r,i=e.var.ip||`unknown`){let a=300*1e3,o=Math.floor(Date.now()/a),s=`${n}:${await KB(i)}:${o}`;if(await JB(e.env.data).incrementAttempts(t,s,new Date((o+1)*a).toISOString())>r)throw new k(429,{error:`slow_down`,error_description:`Too many device authorization attempts. Try again later.`})}function QB(e){return Pm(e.state_data).deviceFlow}function $B(e){return!!Pm(e).deviceFlow?.deviceCodeHash}function eV(e){return`__Host-authhero_device_${e}`}function tV(e){return(0,Sd.serialize)(eV(e.id),e.csrf_token,{httpOnly:!0,secure:!0,sameSite:`lax`,path:`/`,maxAge:600})}function nV(e,t){let n=(0,Sd.parse)(e.req.header(`cookie`)||``)[eV(t.id)];if(!n||!GB(t.csrf_token,n))throw new k(403,{error:`access_denied`,error_description:`Start device activation again in this browser`})}function rV(e){if(!e)return!1;try{return!!JSON.parse(e)?.connect}catch{return!1}}function iV(e,t){switch(t){case`email`:return e.email||void 0;case`email_verified`:return e.email_verified===void 0?void 0:e.email_verified;case`name`:return e.name||void 0;case`family_name`:return e.family_name||void 0;case`given_name`:return e.given_name||void 0;case`middle_name`:return e.middle_name||void 0;case`nickname`:return e.nickname||void 0;case`preferred_username`:return e.preferred_username||e.username||void 0;case`profile`:return e.profile||void 0;case`picture`:return e.picture||void 0;case`website`:return e.website||void 0;case`gender`:return e.gender||void 0;case`birthdate`:return e.birthdate||void 0;case`zoneinfo`:return e.zoneinfo||void 0;case`locale`:return e.locale||void 0;case`updated_at`:{if(!e.updated_at)return;let t=new Date(e.updated_at).getTime();return Number.isFinite(t)?Math.floor(t/1e3):void 0}case`address`:return e.address||void 0;case`phone_number`:return e.phone_number||void 0;case`phone_number_verified`:return e.phone_verified===void 0?void 0:e.phone_verified;default:return}}var aV={email:[`email`,`email_verified`],profile:[`name`,`family_name`,`given_name`,`middle_name`,`nickname`,`preferred_username`,`profile`,`picture`,`website`,`gender`,`birthdate`,`zoneinfo`,`locale`,`updated_at`],address:[`address`],phone:[`phone_number`,`phone_number_verified`]};function oV(e,t){let n={};for(let r of t){let t=aV[r];if(t)for(let r of t){let t=iV(e,r);t!==void 0&&(n[r]=t)}}return n}function sV(e,t){let n={};for(let r of t){let t=iV(e,r);t!==void 0&&(n[r]=t)}return n}var cV=[`1F77B4`,`FF7F0E`,`2CA02C`,`D62728`,`9467BD`,`8C564B`,`E377C2`,`17BECF`,`BCBD22`,`7F7F7F`];function lV(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return Math.abs(t)}function uV(e){return e.email||e.name||e.user_id||`?`}function dV(e){return cV[lV(e.length>0?e:`?`)%cV.length]??`7F7F7F`}function fV(e){return e.replace(/[\uD800-\uDBFF](?![\uDC00-\uDFFF])/g,``).replace(/(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/g,``)}function pV(e){let t=fV(e.name?.trim()||`${e.given_name??``} ${e.family_name??``}`.trim()||e.nickname?.trim()||e.email?.trim()||e.username?.trim()||``).split(/\s+/).filter(Boolean),n=t[0];if(!n)return`?`;if(t.length===1)return[...n].slice(0,2).join(``).toUpperCase()||`?`;let r=t[t.length-1]??n;return`${[...n][0]??``}${[...r][0]??``}`.toUpperCase()||`?`}function mV(e,t){return`${e.endsWith(`/`)?e:`${e}/`}${t}`}function hV(e,t){let n=pV(t),r=dV(uV(t));return mV(e,`avatars/${encodeURIComponent(n)}.svg?bg=${r}`)}function gV(e,t){return e.picture?e:{...e,picture:hV(t,e)}}function _V(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&apos;`)}function vV(e,t){let n=/^[0-9a-fA-F]{6}$/.test(t)?`#${t}`:`#7F7F7F`,r=_V([...fV(e)].slice(0,2).join(``).toUpperCase())||`?`;return[`<svg xmlns="http://www.w3.org/2000/svg" width="120" height="120" viewBox="0 0 120 120" role="img">`,`<rect width="120" height="120" fill="${n}"/>`,`<text x="50%" y="50%" dy=".05em" fill="#ffffff" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif" font-size="52" font-weight="600" text-anchor="middle" dominant-baseline="central">${r}</text>`,`</svg>`].join(``)}var yV=3600*1e3;function bV(e,t=Date.now()){let n=e.used_at??e.created_at,r=n?new Date(n).getTime():NaN;return Number.isFinite(r)?t-r>=yV:!0}function xV(e,t,n,r){let i=Date.now(),a=()=>e.env.data.sessions.update(t,n,{used_at:new Date(i).toISOString()});if(r){if(!bV(r,i))return;Uc(e,a().catch(()=>{}));return}Uc(e,(async()=>{let r=await e.env.data.sessions.get(t,n);!r||r.revoked_at||bV(r,i)&&await a()})().catch(()=>{}))}function SV(e,t){Object.keys(t).forEach(n=>{let r=t[n];r!=null&&r.length&&e.searchParams.set(n,r)})}function CV(e){try{let t=typeof e==`string`?new URL(e):e,n=`${t.protocol}//${t.host}${t.pathname}`;if(t.search){let e=Array.from(t.searchParams.keys()).map(e=>`${e}=[REDACTED]`).join(`&`);n+=`?${e}`}return t.hash&&(n+=`#[REDACTED]`),n}catch{let t=(typeof e==`string`?e:e.toString()).match(/^([^?#]*)(\?[^#]*)?(#.*)?$/);if(!t)return`[invalid-url]`;let[,n=``,r,i]=t,a=n;if(r){let e=r.substring(1).split(`&`).map(e=>{let[t]=e.split(`=`);return`${t}=[REDACTED]`}).join(`&`);a+=`?${e}`}return i&&(a+=`#[REDACTED]`),a}}var wV=3600;function TV(e){return!e||e<=0?{kind:`unset`}:{kind:`seconds`,seconds:e*wV}}function EV(e){if(!(e===void 0||e<=0))return{kind:`seconds`,seconds:e}}function DV(e){let t=e.refresh_token;return t?.expiration_type===`non-expiring`||t?.infinite_token_lifetime?{kind:`infinite`}:EV(t?.token_lifetime)??TV(e.tenant.session_lifetime)}function OV(e){let t=e.refresh_token;return t?.expiration_type===`non-expiring`||t?.infinite_idle_token_lifetime?{kind:`infinite`}:EV(t?.idle_token_lifetime)??TV(e.tenant.idle_session_lifetime)}function kV(e,t=Date.now()){if(e.kind===`seconds`)return new Date(t+e.seconds*1e3).toISOString()}function AV(e,t=Date.now()){return{expires_at:kV(DV(e),t),idle_expires_at:kV(OV(e),t)}}function jV(e,t,n=Date.now()){let r=OV(e);if(r.kind!==`infinite`)return r.kind===`unset`||!t?t:kV(r,n)}function MV(e,t,n=Date.now()){let r={};if(t.expires_at&&DV(e).kind===`infinite`&&(r.expires_at=null),t.idle_expires_at){let t=OV(e);t.kind===`infinite`?r.idle_expires_at=null:t.kind===`seconds`&&(r.idle_expires_at=kV(t,n))}return r}function NV(e){switch(e){case Wi.DeviceCode:return E.FAILED_EXCHANGE_DEVICE_CODE_FOR_ACCESS_TOKEN;case Wi.AuthorizationCode:return E.FAILED_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN;case Wi.ClientCredential:return E.FAILED_EXCHANGE_ACCESS_TOKEN_FOR_CLIENT_CREDENTIALS;case Wi.RefreshToken:return E.FAILED_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN;case Wi.OTP:return E.FAILED_EXCHANGE_PASSWORD_OTP_FOR_ACCESS_TOKEN;case Wi.Password:return E.FAILED_EXCHANGE_PASSWORD_FOR_ACCESS_TOKEN;case Wi.Passwordless:return E.FAILED_EXCHANGE_PASSWORDLESS_OTP_FOR_ACCESS_TOKEN;case Wi.TokenExchange:return E.FAILED_EXCHANGE_SUBJECT_TOKEN_FOR_ACCESS_TOKEN;default:return E.FAILED_EXCHANGE_CUSTOM_TOKEN}}function PV(e,t,n,r,i=`onExecuteCredentialsExchange`){return{accessToken:{setCustomClaim:(n,r)=>{lO(t,n,r,{kind:`access_token`,source:i,ctx:e})}},idToken:{setCustomClaim:(t,r)=>{n&&lO(n,t,r,{kind:`id_token`,source:i,ctx:e})}},access:{deny:(t,n)=>{let i=n?`${t} - ${n}`:t;throw O(e,e.var.tenant_id||``,{type:NV(r),description:`Access denied by credentials-exchange hook: ${i}`}),new k(400,{message:`Access denied: ${i}`})}},token:{createServiceToken:async t=>(await hO(e,e.var.tenant_id,t.scope,t.expiresInSeconds,t.customClaims)).access_token}}}function FV(e){if(!e?.state_data)return;let t=Pm(e.state_data);return t.mfa_verified&&t.mfa_method?[`mfa`]:void 0}async function IV(e,t){let{authParams:n,user:r,client:i,session_id:a,organization:o,permissions:s,impersonatingUser:c,actClient:l,grantType:u}=t;if(r?.blocked)throw new k(403,{error:`access_denied`,error_description:`User is blocked`});let d=(()=>{if(c&&l)return{sub:c.user_id,client_id:l.client_id};if(c)return{sub:c.user_id};if(l)return{sub:l.client_id,client_id:l.client_id}})(),f=t.amr??(r&&t.loginSession?.user_id===r.user_id?FV(t.loginSession):void 0),m=t.auth_time,h=n.prompt?.split(` `)??[],g=n.max_age!==void 0||h.includes(`login`)||n.claims?.id_token?.auth_time?.essential===!0;if(m===void 0&&g){if(t.loginSession?.authenticated_at)m=Math.floor(new Date(t.loginSession.authenticated_at).getTime()/1e3);else if(a&&e.var.tenant_id){let t=await e.env.data.sessions.get(e.var.tenant_id,a);t?.authenticated_at&&(m=Math.floor(new Date(t.authenticated_at).getTime()/1e3))}}let _=e.var.tenant_id,v=(await BD(e.env.data.keys,_??``,_?e.env.signingKeyMode:`control-plane`,{purpose:`sign`}))[0];if(!v?.pkcs7||!v.cert)throw new k(500,{message:`No signing key configured for ${_?`tenant "${_}"`:`the control-plane scope`}: found ${(await BD(e.env.data.keys,_??``,_?e.env.signingKeyMode:`control-plane`,{purpose:`publish`})).length} verify key(s) but none with private material to sign tokens.`});let y=iD(v.pkcs7),b=await rD(v.cert),x=Cc(e.env,e.var.custom_domain),S=n.audience??i.tenant.default_audience??`${x}userinfo`,ee=n.claims?.userinfo?Object.keys(n.claims.userinfo):void 0,te=uO(t.customClaims,{kind:`access_token`,source:`createAuthTokens(customClaims)`,ctx:e}),ne={aud:S,scope:n.scope||``,sub:r?.user_id||n.client_id,iss:x,tenant_id:i.tenant.id,sid:a,act:d,org_id:o?o.id:void 0,requested_userinfo_claims:ee,org_name:o&&i.tenant.allow_organization_name_in_authentication_api?o.name.toLowerCase():void 0,permissions:s,...te},re=n.scope?.split(` `)||[],ie=re.includes(`openid`);if(!f&&r&&ie&&a&&e.var.tenant_id){let t=await e.env.data.sessions.get(e.var.tenant_id,a);t&&lB(t,r.user_id)&&(f=[`mfa`])}let ae=(n.response_type??``).trim()===kt.ID_TOKEN,oe=i.auth0_conformant!==!1||ae,se={aud:n.client_id,sub:r?.user_id,iss:x,sid:a,nonce:n.nonce,...m===void 0?{}:{auth_time:m},...f?{amr:f}:{},...n.acr_values?{acr:n.acr_values.split(` `)[0]}:{}},ce={act:d,org_id:o?.id,org_name:o?.name.toLowerCase()},le=r&&ie?{...se,...oe?oV(gV(r,x),re):{},...n.claims?.id_token?sV(gV(r,x),Object.keys(n.claims.id_token)):{},...ae&&n.claims?.userinfo?sV(gV(r,x),Object.keys(n.claims.userinfo)):{},...ce}:void 0,ue=Kc({loginSession:t.loginSession,authConnection:t.authConnection,ctxConnection:e.var.connection,user:r}),de=await qc(e,e.var.tenant_id,ue,r);if(r&&u!==Wi.RefreshToken){let n=e.var.post_login_action_claims??Pm(t.loginSession?.state_data).action_claims;if(n?.user_id===r.user_id){for(let[t,r]of Object.entries(n.access_token??{}))lO(ne,t,r,{kind:`access_token`,source:`post-login-code-hook`,ctx:e});if(le)for(let[t,r]of Object.entries(n.id_token??{}))lO(le,t,r,{kind:`id_token`,source:`post-login-code-hook`,ctx:e})}}e.env.hooks?.onExecuteCredentialsExchange&&await e.env.hooks.onExecuteCredentialsExchange({ctx:e,client:i,user:r,request:{ip:e.var.ip||``,user_agent:e.var.useragent||``,method:e.req.method,url:ll(e.req.url)},scope:n.scope||``,grant_type:u??``,organization:o,connection:de||(ue?{id:ue,name:ue,strategy:r?.provider||`auth0`}:void 0)},PV(e,ne,le,u));{let{hooks:t}=await e.env.data.hooks.list(e.var.tenant_id),a=t.filter(e=>e.trigger_id===`credentials-exchange`&&e.enabled&&fz(e));if(r){for(let t of a)if(fz(t))try{await gz(e,t.template_id,r,PV(e,ne,le,u,`template-hook:${t.template_id}`))}catch(e){if(e instanceof p.HTTPException)throw e;console.warn(`[credentials-exchange] Failed to execute template hook: ${t.template_id}`,e)}}let s=PV(e,ne,le,u,`credentials-exchange-code-hook`),c=await RR(e,t,{ctx:e,client:i,user:r,request:{ip:e.var.ip||``,user_agent:e.var.useragent||``,method:e.req?.method||``,url:ll(e.req?.url||``)},scope:n.scope||``,grant_type:u??``,organization:o,connection:de||(ue?{id:ue,name:ue,strategy:r?.provider||`auth0`}:void 0)},s);c&&e.set(`action_execution_id`,c)}let fe=c?3600:t.token_lifetime??86400,pe={includeIssuedTimestamp:!0,expiresInSeconds:fe,headers:{kid:v.kid}},C=await QD(b,y,ne,pe);if(le){let e=(n.response_type??``).split(` `);t.code&&e.includes(`code`)&&(le.c_hash=await nk(t.code,b)),e.includes(`id_token`)&&e.includes(`token`)&&(le.at_hash=await nk(C,b))}let me=le?await QD(b,y,le,pe):void 0;return{access_token:C,refresh_token:t.refresh_token,id_token:me,token_type:`Bearer`,expires_in:fe}}async function LV(e,t){return{code:(await e.env.data.codes.create(t.client.tenant.id,{code_id:Yl(32),user_id:t.user.user_id,code_type:`authorization_code`,login_id:t.login_id,expires_at:new Date(Date.now()+300*1e3).toISOString(),code_challenge:t.authParams.code_challenge,code_challenge_method:t.authParams.code_challenge_method,redirect_uri:t.authParams.redirect_uri,state:t.authParams.state,nonce:t.authParams.nonce})).code_id,state:t.authParams.state}}function RV(e){if(e)return new Date(Date.now()+e*60*60*1e3).toISOString()}function zV(e,t){return t?e&&Date.parse(e)<=Date.parse(t)?e:t:e}async function BV(e,t){let{client:n,scope:r,login_id:i}=t,a=Cc(e.env,e.var.custom_domain),o=t.audience??n.tenant.default_audience??`${a}userinfo`,{expires_at:s,idle_expires_at:c}=AV(n),l=NO(),{lookup:u,secret:d}=XO(),f=await ZO(d),p=n.refresh_token?.rotation_type===`rotating`;return{row:await e.env.data.refreshTokens.create(n.tenant.id,{id:l,login_id:i,session_id:t.session_id,organization:t.organization,auth_connection:t.auth_connection,auth_strategy:t.auth_strategy,client_id:n.client_id,idle_expires_at:c?zV(c,t.max_expires_at):void 0,expires_at:zV(s,t.max_expires_at),session_transfer:t.session_transfer,user_id:t.user.user_id,device:{last_ip:e.var.ip,initial_ip:e.var.ip,last_user_agent:e.var.useragent||``,initial_user_agent:e.var.useragent||``,initial_asn:``,last_asn:``},resource_servers:[{audience:o,scopes:r}],rotating:p,token_lookup:u,token_hash:f,family_id:l}),wireToken:QO(u,d)}}async function VV(e,{user:t,client:n,loginSession:r}){let i=RV(n.tenant.idle_session_lifetime),a=RV(n.tenant.session_lifetime);return await e.env.data.sessions.create(n.tenant.id,{id:NO(),user_id:t.user_id,login_session_id:r.id,idle_expires_at:i,expires_at:a,device:{last_ip:e.var.ip||``,initial_ip:e.var.ip||``,last_user_agent:e.var.useragent||``,initial_user_agent:e.var.useragent||``,initial_asn:``,last_asn:``},clients:[n.client_id]})}async function HV(e,{user:t,client:n,loginSession:r,existingSessionId:i,authConnection:a,authStrategy:o}){let s=await e.env.data.loginSessions.get(n.tenant.id,r.id);if(!s)throw new p.HTTPException(400,{message:`Login session ${r.id} not found`});let c=s.state||T.PENDING;if(c===T.FAILED)throw new k(400,{error:`access_denied`,error_description:s.failure_reason||`Cannot authenticate login session in failed state`});if(c===T.COMPLETED)throw new k(400,{error:`access_denied`,error_description:`Login session has already been completed`});if(c===T.AUTHENTICATED){if(s.session_id)return s.session_id;throw new p.HTTPException(500,{message:`Login session is authenticated but has no session_id`})}let l,u;if(i){let a=await e.env.data.sessions.get(n.tenant.id,i);if(!a||a.revoked_at){let i=await VV(e,{user:t,client:n,loginSession:r});l=i.id,u=i.authenticated_at}else l=i,u=a.authenticated_at,a.clients.includes(n.client_id)?xV(e,n.tenant.id,i,a):await e.env.data.sessions.update(n.tenant.id,i,{clients:[...a.clients,n.client_id],...bV(a)&&{used_at:new Date().toISOString()}})}else{let i=await VV(e,{user:t,client:n,loginSession:r});l=i.id,u=i.authenticated_at}let{state:d}=Lm(c===T.EXPIRED?T.PENDING:c,{type:j.AUTHENTICATE,userId:t.user_id}),f=Kc({authConnection:a,ctxConnection:e.var.connection});return await e.env.data.loginSessions.update(n.tenant.id,r.id,{session_id:l,state:d,user_id:t.user_id,authenticated_at:u,...f?{auth_connection:f}:{},...o?{auth_strategy:o}:{},...c===T.EXPIRED?{expires_at:new Date(Date.now()+ld*1e3).toISOString()}:{}}),l}async function UV(e,t){let{user:n,client:r,loginSession:i,authStrategy:a,authConnection:o}=t;await HV(e,{user:n,client:r,loginSession:i,existingSessionId:t.existingSessionId,authConnection:o,authStrategy:a});let s=`/authorize/resume?state=${encodeURIComponent(i.id)}`,c=s,l=!1;if(i.authorization_url)try{let t=new URL(i.authorization_url),n=e.var.host||``;t.host&&t.host!==n&&(c=`${t.origin}${s}`,l=!0)}catch{}let u=new Headers({location:c});return l&&u.set(xs,`1`),new Response(null,{status:302,headers:u})}async function WV(e,t,n,r){let i=await e.env.data.loginSessions.get(t,n.id);if(!i){console.warn(`Login session ${n.id} not found when trying to mark as failed`);return}let a=i.state||T.PENDING,{state:o,context:s}=Lm(a,{type:j.FAIL,reason:r});o!==a&&await e.env.data.loginSessions.update(t,n.id,{state:o,failure_reason:s.failureReason})}async function GV(e,t,n,r){let i=await e.env.data.loginSessions.get(t,n.id);if(!i){console.warn(`Login session ${n.id} not found when trying to start hook`);return}let a=i.state||T.PENDING,{state:o,context:s}=Lm(a,{type:j.START_HOOK,hookId:r});o!==a&&await wO(e.env.data.loginSessions,t,n.id,{type:j.UPDATE_CONTEXT,data:{hookId:s.hookId}},{state:o})}async function KV(e,t,n){let r=await e.env.data.loginSessions.get(t,n.id);if(!r){console.warn(`Login session ${n.id} not found when trying to complete hook`);return}let i=r.state||T.PENDING,{state:a}=Lm(i,{type:j.COMPLETE_HOOK});a!==i&&await wO(e.env.data.loginSessions,t,n.id,{type:j.UPDATE_CONTEXT,data:{hookId:void 0,form_values:void 0}},{state:a})}async function qV(e,t,n,r,i){let a=i??await e.env.data.loginSessions.get(t,n.id);if(!a){console.warn(`Login session ${n.id} not found when trying to mark as completed`);return}let o=a.state||T.PENDING,{state:s}=Lm(o,{type:j.COMPLETE});s!==o&&await e.env.data.loginSessions.update(t,n.id,{state:s,...r?{auth_connection:r}:{}})}async function JV(e,t,n,r,i){let a=await e.env.data.loginSessions.get(t,n.id);if(!a){console.warn(`Login session ${n.id} not found when trying to start continuation`);return}let o=a.state||T.PENDING,{state:s}=Lm(o,{type:j.START_CONTINUATION,scope:r});s===o?console.warn(`Failed to start continuation for login session ${n.id}: cannot transition from ${o} to AWAITING_CONTINUATION. Scope: ${JSON.stringify(r)}, Return URL: ${CV(i)}`):await wO(e.env.data.loginSessions,t,n.id,{type:j.UPDATE_CONTEXT,data:{continuationScope:r,continuationReturnUrl:i}},{state:s})}async function YV(e,t,n){let r=await e.env.data.loginSessions.get(t,n.id);if(!r){console.warn(`Login session ${n.id} not found when trying to complete continuation`);return}let i=Pm(r.state_data).continuationReturnUrl,a=r.state||T.PENDING,{state:o}=Lm(a,{type:j.COMPLETE_CONTINUATION});return o===a?console.warn(`completeLoginSessionContinuation: State transition from ${a} with COMPLETE_CONTINUATION was invalid or no-op`):await wO(e.env.data.loginSessions,t,n.id,{type:j.UPDATE_CONTEXT,data:{continuationScope:void 0,continuationReturnUrl:void 0}},{state:o}),i}function XV(e){if(!e.state_data)return null;try{return JSON.parse(e.state_data).continuationScope||null}catch{return null}}function ZV(e,t){if(e.state!==T.AWAITING_CONTINUATION||!(Date.parse(e.expires_at)>Date.now()))return!1;let n=XV(e);return n?n.includes(t):!1}async function QV(e,t){let{authParams:n,client:r,ticketAuth:i}=t,{user:a}=t,o=n.response_type||kt.CODE,s=n.response_mode||At.QUERY;if(i){if(!t.loginSession)throw new k(500,{message:`Login session not found for ticket auth.`});a&&!t.skipHooks&&(t.authStrategy&&a.app_metadata?.strategy!==t.authStrategy.strategy&&(a.app_metadata={...a.app_metadata,strategy:t.authStrategy.strategy},await e.env.data.users.update(r.tenant.id,a.user_id,{app_metadata:{...a.app_metadata||{},strategy:t.authStrategy.strategy}})),await _B(e,e.env.data,r.tenant.id,a,t.loginSession,{client:r,authParams:n,authStrategy:t.authStrategy,authConnection:t.authConnection}));let i=aD(),o=Yl(12),s=await e.env.data.codes.create(r.tenant.id,{code_id:Yl(32),code_type:`ticket`,login_id:t.loginSession.id,user_id:a?.user_id,expires_at:new Date(Date.now()+gd).toISOString(),code_verifier:[o,i].join(`|`),redirect_uri:n.redirect_uri,state:n.state,nonce:n.nonce});return e.json({login_ticket:s.code_id,co_verifier:i,co_id:o})}let c=t.refreshToken,l;if(!t.loginSession)throw new k(500,{message:`loginSession must be provided for front-channel auth responses.`});let u=await e.env.data.loginSessions.get(r.tenant.id,t.loginSession.id);if(!u)throw new k(500,{message:`Login session not found.`});let d=u.state||T.PENDING;if(d===T.COMPLETED)throw new k(400,{error:`invalid_request`,error_description:`Login session has already been completed`});if(d===T.FAILED)throw new k(400,{error:`access_denied`,error_description:`Login session failed: ${u.failure_reason||`unknown reason`}`});if(d===T.PENDING||d===T.EXPIRED){l=await HV(e,{user:a,client:r,loginSession:t.loginSession,existingSessionId:t.existingSessionIdToLink,authConnection:t.authConnection,authStrategy:t.authStrategy});let n=await e.env.data.loginSessions.get(r.tenant.id,t.loginSession.id);n&&(u=n)}else if(l=u.session_id,!l)throw new k(500,{message:`Login session in ${d} state but has no session_id`});let f=!!Pm(u.state_data).mfa_required_by_action,m=t.skipHooks||f;if(f&&a&&(a=await Hu(e.env.data.users,r.tenant.id,a),u.user_id!==a.user_id&&(await e.env.data.loginSessions.update(r.tenant.id,u.id,{user_id:a.user_id}),u={...u,user_id:a.user_id})),t.loginSession&&a){let i=u.state||T.PENDING,o={};if(u.state_data)try{o=JSON.parse(u.state_data)}catch{console.error(`Failed to parse state_data for login session`,u.id)}if(i===T.AWAITING_MFA){let n=`/u2/mfa/login-options`;if(o.authenticationMethodId){let t=(await e.env.data.authenticationMethods.list(r.tenant.id,a.user_id)).find(e=>e.id===o.authenticationMethodId);t?.confirmed&&t.type===`phone`?n=`/u2/mfa/phone-challenge`:t?.confirmed&&t.type===`totp`?n=`/u2/mfa/totp-challenge`:t?.confirmed&&(t.type===`passkey`||t.type===`webauthn-roaming`||t.type===`webauthn-platform`)?n=`/u2/passkey/challenge`:t?.type===`totp`?n=`/u2/mfa/totp-enrollment`:t?.type===`phone`&&(n=`/u2/mfa/phone-enrollment`)}return new Response(null,{status:302,headers:{location:`${n}?state=${encodeURIComponent(t.loginSession.id)}`}})}if(i===T.AUTHENTICATED&&o.mfa_verified===!0&&l)try{let t=await e.env.data.sessions.get(r.tenant.id,l),n=typeof o.mfa_verified_at==`string`?o.mfa_verified_at:void 0;t&&!t.revoked_at&&t.user_id===a.user_id&&(n||!cB(t))&&await uB(e.env.data.sessions,r.tenant.id,t,{type:typeof o.mfa_method==`string`?o.mfa_method:void 0,timestamp:n??new Date().toISOString()})}catch(e){console.error(`Failed to record MFA completion on session`,e)}if(i===T.AUTHENTICATED&&!o.mfa_verified){let{checkMfaRequired:n,sendMfaOtp:i}=await Promise.resolve().then(()=>require("./mfa-B0J_xOxl.js")).then(e=>e.i),{isBrowserRememberedForMfa:s}=await Promise.resolve().then(()=>require("./authhero.cjs")).then(e=>e.t),c=await n(e,r.tenant.id,a.user_id,{force:!!o.mfa_required_by_action}),d=c.required&&l?await e.env.data.sessions.get(r.tenant.id,l).then(e=>e?lB(e,a.user_id):!1):!1,f=c.required&&c.enrolled&&!d?await s(e,{tenant:r.tenant,userId:a.user_id,actionRequest:Pm(u.state_data).mfa_required_by_action}):!1;if(c.required&&!d&&!f){let{state:n}=Lm(T.AUTHENTICATED,{type:j.REQUIRE_MFA});if(c.enrolled){if(c.allEnrollments.length>1)return await e.env.data.loginSessions.update(r.tenant.id,t.loginSession.id,{state:n}),new Response(null,{status:302,headers:{location:`/u2/mfa/login-options?state=${encodeURIComponent(t.loginSession.id)}`}});if(await wO(e.env.data.loginSessions,r.tenant.id,t.loginSession.id,{type:j.UPDATE_CONTEXT,data:{authenticationMethodId:c.enrollment.id}},{state:n}),c.enrollment.type===`totp`)return new Response(null,{status:302,headers:{location:`/u2/mfa/totp-challenge?state=${encodeURIComponent(t.loginSession.id)}`}});if(c.enrollment.type===`passkey`||c.enrollment.type===`webauthn-roaming`||c.enrollment.type===`webauthn-platform`)return new Response(null,{status:302,headers:{location:`/u2/passkey/challenge?state=${encodeURIComponent(t.loginSession.id)}`}});if(!c.enrollment.phone_number)throw Error(`MFA enrollment is missing phone_number`);let{MfaSmsRateLimitError:a}=await Promise.resolve().then(()=>eH);try{await i(e,r,t.loginSession,c.enrollment.phone_number)}catch(e){if(!(e instanceof a))throw e}return new Response(null,{status:302,headers:{location:`/u2/mfa/phone-challenge?state=${encodeURIComponent(t.loginSession.id)}`}})}else{let i=r.tenant,a=i.mfa?.factors?.otp===!0,o=i.mfa?.factors?.sms===!0,s=i.mfa?.factors?.webauthn_roaming===!0||i.mfa?.factors?.webauthn_platform===!0;return await e.env.data.loginSessions.update(r.tenant.id,t.loginSession.id,{state:n}),+!!a+ +!!o+ +!!s>1?new Response(null,{status:302,headers:{location:`/u2/mfa/login-options?state=${encodeURIComponent(t.loginSession.id)}`}}):a?new Response(null,{status:302,headers:{location:`/u2/mfa/totp-enrollment?state=${encodeURIComponent(t.loginSession.id)}`}}):s?new Response(null,{status:302,headers:{location:`/u2/passkey/enrollment?state=${encodeURIComponent(t.loginSession.id)}`}}):new Response(null,{status:302,headers:{location:`/u2/mfa/phone-enrollment?state=${encodeURIComponent(t.loginSession.id)}`}})}}}if(o.mfa_required_by_action&&!o.mfa_verified&&!(l&&await e.env.data.sessions.get(r.tenant.id,l).then(e=>e?lB(e,a.user_id):!1))&&!await Promise.resolve().then(()=>require("./authhero.cjs")).then(e=>e.t).then(({isBrowserRememberedForMfa:t})=>t(e,{tenant:r.tenant,userId:a.user_id,actionRequest:Pm(u.state_data).mfa_required_by_action})))throw new k(403,{error:`access_denied`,error_description:`Multi-factor authentication is required to complete this login`});if(l&&$B(u.state_data)){if(!QB(u)?.ready&&!m){let i=await _B(e,e.env.data,r.tenant.id,a,u,{client:r,authParams:{...n,grant_type:Wi.DeviceCode},authStrategy:t.authStrategy,authConnection:t.authConnection});if(i instanceof Response)return i}await wO(e.env.data.loginSessions,r.tenant.id,u.id,{type:j.UPDATE_CONTEXT,data:{deviceFlow:{...QB(u),ready:!0}}});let i=new Headers({location:`/u2/device/confirmation?state=${encodeURIComponent(u.id)}`});return Ld(r.tenant.id,l,e.var.host||``).forEach(e=>i.append(`set-cookie`,e)),new Response(null,{status:302,headers:i})}if(l&&rV(u.state_data)){let n=new Headers;return Ld(r.tenant.id,l,e.var.host||``).forEach(e=>n.append(`set-cookie`,e)),n.set(`location`,`/u2/connect/start?state=${encodeURIComponent(t.loginSession.id)}`),new Response(null,{status:302,headers:n})}}if(t.loginSession&&a&&!r.is_first_party&&s!==At.WEB_MESSAGE){let n=u.state||T.PENDING;if(n===T.AWAITING_CONSENT)return new Response(null,{status:302,headers:{location:`/u2/consent?state=${encodeURIComponent(t.loginSession.id)}`}});if(n===T.AUTHENTICATED){let n=u.authParams.scope?.split(` `).filter(Boolean)??[];if((await WB(e,{tenantId:r.tenant.id,userId:a.user_id,clientId:r.client_id,requestedScopes:n})).length>0){let{state:n}=Lm(T.AUTHENTICATED,{type:j.REQUIRE_CONSENT});return await e.env.data.loginSessions.update(r.tenant.id,t.loginSession.id,{state:n}),new Response(null,{status:302,headers:{location:`/u2/consent?state=${encodeURIComponent(t.loginSession.id)}`}})}}}if(t.loginSession&&a&&s!==At.WEB_MESSAGE){let n=u.state||T.PENDING,i={};if(u.state_data)try{i=JSON.parse(u.state_data)}catch{}if(n===T.AUTHENTICATED&&!i.passkey_nudge_completed){let{checkPasskeyNudgeRequired:n}=await Promise.resolve().then(()=>require("./passkey-enrollment-D180Gog3.js"));if((await n(e,r.tenant.id,a.user_id,u.auth_connection)).show)return await JV(e,r.tenant.id,u,[`passkey-enrollment`],`/u2/continue?state=${encodeURIComponent(t.loginSession.id)}`),new Response(null,{status:302,headers:{location:`/u2/passkey/enrollment-nudge?state=${encodeURIComponent(t.loginSession.id)}`}})}}let h=o.split(` `).includes(`code`);if(!c&&n.scope?.split(` `).includes(`offline_access`)&&o!==kt.TOKEN&&!h&&!t.impersonatingUser){let i=qO(r,l?await e.env.data.sessions.get(r.tenant.id,l):null);i.allowed&&(c=(await BV(e,{user:a,client:r,login_id:t.loginSession?.id||``,session_id:l,organization:n.organization,auth_connection:u.auth_connection,auth_strategy:u.auth_strategy,scope:n.scope,audience:n.audience,session_transfer:i.session_transfer,max_expires_at:i.max_expires_at})).wireToken)}if(s===At.SAML_POST){if(!l)throw new p.HTTPException(500,{message:`Session ID not available for SAML response`});let i=a;if(t.loginSession&&!m){let o=await _B(e,e.env.data,r.tenant.id,a,t.loginSession,{client:r,authParams:n,authStrategy:t.authStrategy,authConnection:t.authConnection,sessionReused:!!t.existingSessionIdToLink});if(o instanceof Response)return o;i=o}return ML(e,t.client,t.authParams,i,l,t.loginSession?.id)}let g=await $V(e,{authParams:n,user:a,client:r,session_id:l,refresh_token:c,authStrategy:t.authStrategy,authConnection:t.authConnection,loginSession:u,loginSessionIsCurrent:!0,responseType:o,skipHooks:m,organization:t.organization,impersonatingUser:t.impersonatingUser,sessionReused:!!t.existingSessionIdToLink});if(g instanceof Response)return g;if(!n.redirect_uri)throw new k(400,{message:s===At.WEB_MESSAGE?`Redirect URI not allowed for WEB_MESSAGE response mode.`:`Redirect uri not found for this response mode.`});let _=new Headers;l?(Ld(r.tenant.id,l,e.var.host||``).forEach(e=>{_.append(`set-cookie`,e)}),u.auth_connection&&(await e.env.data.promptSettings.get(r.tenant.id))?.show_last_used_connection===!0&&_.append(`set-cookie`,Hd(r.tenant.id,u.auth_connection,e.var.host||``))):s===At.WEB_MESSAGE&&console.warn(`Session ID not available for WEB_MESSAGE, cookie will not be set.`);let v=o.split(` `),y=v.includes(`code`),b=v.includes(`id_token`),x=v.includes(`token`),S={},ee=`code`in g&&typeof g.code==`string`,te=`access_token`in g&&typeof g.access_token==`string`;if(ee&&y&&(S.code=g.code),te&&(x&&(S.access_token=g.access_token,S.token_type=g.token_type,S.expires_in=g.expires_in.toString()),b&&g.id_token&&(S.id_token=g.id_token)),!ee&&!te)throw new k(500,{message:`Invalid token response for front-channel flow.`});let ne=(`state`in g&&typeof g.state==`string`?g.state:void 0)??n.state;if(ne&&(S.state=ne),(x||b)&&n.scope&&(S.scope=n.scope),s===At.WEB_MESSAGE){let t=new URL(n.redirect_uri);return vB(e,`${t.protocol}//${t.host}`,JSON.stringify(S),_)}if(s===At.FORM_POST)return xB(n.redirect_uri,S,_);let re=b||x,ie=new URL(n.redirect_uri);if(re)ie.hash=new URLSearchParams(S).toString();else for(let[e,t]of Object.entries(S))ie.searchParams.set(e,t);return _.set(`location`,ie.toString()),new Response(`Redirecting`,{status:302,headers:_})}async function $V(e,t){let{user:n}=t,r=t.responseType||kt.TOKEN;if(n&&t.organization&&!await LB(e,t.client.tenant.id,n.user_id,t.organization.id))throw new k(403,{error:`access_denied`,error_description:`User is not a member of the specified organization`});let i=t.authParams.scope||``,a=[],o,s=Cc(e.env,e.var.custom_domain),c=t.authParams.audience??t.client.tenant.default_audience??`${s}userinfo`;if(c)try{let r;if(t.grantType===Wi.ClientCredential||!n&&!t.user)r=await VB(e,{grantType:Wi.ClientCredential,tenantId:t.client.tenant.id,clientId:t.client.client_id,audience:c,requestedScopes:t.authParams.scope?.split(` `)||[],organizationId:t.organization?.id});else{let i=n?.user_id||t.user?.user_id;if(!i)throw new k(400,{error:`invalid_request`,error_description:`User ID is required for user-based grants`});r=await VB(e,{grantType:t.grantType,tenantId:t.client.tenant.id,userId:i,clientId:t.client.client_id,audience:c,requestedScopes:t.authParams.scope?.split(` `)||[],organizationId:t.organization?.id})}i=r.scopes.join(` `),a=r.permissions,o=t.client.app_type===`spa`&&r.token_lifetime_for_web?r.token_lifetime_for_web:r.token_lifetime}catch(e){if(e instanceof p.HTTPException)throw e}let l={...t.authParams,scope:i};if(t.loginSession&&n&&!t.skipHooks){t.authStrategy&&n.app_metadata?.strategy!==t.authStrategy.strategy&&(n.app_metadata={...n.app_metadata,strategy:t.authStrategy.strategy},await e.env.data.users.update(t.client.tenant.id,n.user_id,{app_metadata:{...n.app_metadata||{},strategy:t.authStrategy.strategy}}));let r=await _B(e,e.env.data,t.client.tenant.id,n,t.loginSession,{client:t.client,authParams:l,authStrategy:t.authStrategy,authConnection:t.authConnection,sessionReused:t.sessionReused});if(r instanceof Response)return r;n=r}let u=Kc({loginSession:t.loginSession,authConnection:t.authConnection,ctxConnection:e.var.connection}),d=r.split(` `),f=d.includes(`code`),m=d.includes(`id_token`)||d.includes(`token`),h=f&&m;if(r===kt.CODE){if(!n||!t.loginSession)throw new k(500,{message:`User and loginSession is required for code flow`});let r=await LV(e,{user:n,client:t.client,authParams:l,login_id:t.loginSession.id});return await qV(e,t.client.tenant.id,t.loginSession,u,t.loginSessionIsCurrent?t.loginSession:void 0),r}else if(h){if(!n||!t.loginSession)throw new k(500,{message:`User and loginSession is required for hybrid flow`});let r=await LV(e,{user:n,client:t.client,authParams:l,login_id:t.loginSession.id}),i=await IV(e,{...t,user:n,authParams:l,permissions:a,token_lifetime:o,code:r.code});return await qV(e,t.client.tenant.id,t.loginSession,u,t.loginSessionIsCurrent?t.loginSession:void 0),{...i,code:r.code,state:r.state}}else{let r=await IV(e,{...t,user:n,authParams:l,permissions:a,token_lifetime:o});return t.loginSession&&await qV(e,t.client.tenant.id,t.loginSession,u,t.loginSessionIsCurrent?t.loginSession:void 0),r}}var eH=c({MFA_LOCKOUT_REASON:()=>tH,MFA_MAX_FAILED_ATTEMPTS:()=>5,MFA_MAX_SMS_SENDS:()=>5,MfaSmsRateLimitError:()=>nH,checkMfaAttemptAllowed:()=>sH,enforceMfaSmsSendLimit:()=>uH,isMfaLockedOut:()=>aH,recordMfaFailure:()=>cH,resetMfaFailures:()=>lH}),tH=`too_many_mfa_failures`,nH=class extends Error{constructor(){super(`Too many MFA SMS messages sent`),this.name=`MfaSmsRateLimitError`}};function rH(e){return typeof e==`object`&&!!e&&`allowed`in e&&typeof e.allowed==`boolean`}async function iH(e,t){let n=e.env.data.rateLimit;if(!n)return!0;try{let e=await n.consume(`brute-force`,t);return rH(e)?e.allowed:!0}catch(e){return console.error(`MFA rate limit consume failed:`,e),!0}}function aH(e){return e.state===T.FAILED&&e.failure_reason===`too_many_mfa_failures`?!0:(Pm(e.state_data).mfa_failed_attempts??0)>=5}async function oH(e,t,n,r,i){O(e,t,{type:E.TOO_MANY_MFA_FAILURES,description:i,userId:r}),await WV(e,t,n,tH)}async function sH(e,t,n,r){return aH(n)?!1:await iH(e,`mfa:${t}:${r}`)?!0:(await oH(e,t,n,r,`MFA verification rate limit exceeded`),!1)}async function cH(e,t,n,r){let i=await e.env.data.loginSessions.get(t,n);if(!i||aH(i))return{lockedOut:!0};let a=(Pm(i.state_data).mfa_failed_attempts??0)+1;try{await wO(e.env.data.loginSessions,t,n,{type:j.UPDATE_CONTEXT,data:{mfa_failed_attempts:a}})}catch(e){if(e instanceof yO)return{lockedOut:!0};throw e}return a<5?{lockedOut:!1}:(await oH(e,t,i,r,`Too many failed MFA attempts (${a})`),{lockedOut:!0})}async function lH(e,t,n){await wO(e.env.data.loginSessions,t,n,{type:j.UPDATE_CONTEXT,data:{mfa_failed_attempts:void 0}})}async function uH(e,t,n,r,i){let a=await e.env.data.loginSessions.get(t,n);if(a&&(bO(a)||new Date(a.expires_at).getTime()<Date.now()))throw new yO(n);let o=Pm(a?.state_data).mfa_sms_sent??0,s=i??a?.user_id??r,c=()=>(O(e,t,{type:E.ERROR_SENDING_MFA_SMS,description:`MFA SMS send limit reached`,userId:i??a?.user_id}),new nH);if(o>=5||!await iH(e,`mfa-sms:${t}:${s}`))throw c();if(!a)return;let{status:l}=await TO(e.env.data.loginSessions,t,n,`mfa_sms_sent`,5);if(l===`finalized`)throw new yO(n);if(l===`limit_reached`||l===`contended`)throw c()}Object.defineProperty(exports,"$",{enumerable:!0,get:function(){return CB}}),Object.defineProperty(exports,"$a",{enumerable:!0,get:function(){return pa}}),Object.defineProperty(exports,"$c",{enumerable:!0,get:function(){return ac}}),Object.defineProperty(exports,"$d",{enumerable:!0,get:function(){return Ur}}),Object.defineProperty(exports,"$i",{enumerable:!0,get:function(){return kc}}),Object.defineProperty(exports,"$l",{enumerable:!0,get:function(){return go}}),Object.defineProperty(exports,"$n",{enumerable:!0,get:function(){return FT}}),Object.defineProperty(exports,"$o",{enumerable:!0,get:function(){return vo}}),Object.defineProperty(exports,"$r",{enumerable:!0,get:function(){return ju}}),Object.defineProperty(exports,"$s",{enumerable:!0,get:function(){return He}}),Object.defineProperty(exports,"$t",{enumerable:!0,get:function(){return oL}}),Object.defineProperty(exports,"$u",{enumerable:!0,get:function(){return Da}}),Object.defineProperty(exports,"A",{enumerable:!0,get:function(){return nV}}),Object.defineProperty(exports,"Aa",{enumerable:!0,get:function(){return Se}}),Object.defineProperty(exports,"Ac",{enumerable:!0,get:function(){return Fa}}),Object.defineProperty(exports,"Ad",{enumerable:!0,get:function(){return Mr}}),Object.defineProperty(exports,"Ai",{enumerable:!0,get:function(){return Vl}}),Object.defineProperty(exports,"Al",{enumerable:!0,get:function(){return eo}}),Object.defineProperty(exports,"An",{enumerable:!0,get:function(){return QD}}),Object.defineProperty(exports,"Ao",{enumerable:!0,get:function(){return jo}}),Object.defineProperty(exports,"Ar",{enumerable:!0,get:function(){return Nm}}),Object.defineProperty(exports,"As",{enumerable:!0,get:function(){return ki}}),Object.defineProperty(exports,"At",{enumerable:!0,get:function(){return oR}}),Object.defineProperty(exports,"Au",{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,"B",{enumerable:!0,get:function(){return GB}}),Object.defineProperty(exports,"Ba",{enumerable:!0,get:function(){return Xr}}),Object.defineProperty(exports,"Bc",{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,"Bd",{enumerable:!0,get:function(){return Ct}}),Object.defineProperty(exports,"Bi",{enumerable:!0,get:function(){return Yc}}),Object.defineProperty(exports,"Bl",{enumerable:!0,get:function(){return Ui}}),Object.defineProperty(exports,"Bn",{enumerable:!0,get:function(){return CD}}),Object.defineProperty(exports,"Bo",{enumerable:!0,get:function(){return Cs}}),Object.defineProperty(exports,"Br",{enumerable:!0,get:function(){return Pd}}),Object.defineProperty(exports,"Bs",{enumerable:!0,get:function(){return Fn}}),Object.defineProperty(exports,"Bt",{enumerable:!0,get:function(){return VL}}),Object.defineProperty(exports,"Bu",{enumerable:!0,get:function(){return se}}),Object.defineProperty(exports,"C",{enumerable:!0,get:function(){return xV}}),Object.defineProperty(exports,"Ca",{enumerable:!0,get:function(){return ze}}),Object.defineProperty(exports,"Cc",{enumerable:!0,get:function(){return Ye}}),Object.defineProperty(exports,"Cd",{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,"Ci",{enumerable:!0,get:function(){return $l}}),Object.defineProperty(exports,"Cl",{enumerable:!0,get:function(){return $e}}),Object.defineProperty(exports,"Cn",{enumerable:!0,get:function(){return vO}}),Object.defineProperty(exports,"Co",{enumerable:!0,get:function(){return ka}}),Object.defineProperty(exports,"Cr",{enumerable:!0,get:function(){return I}}),Object.defineProperty(exports,"Cs",{enumerable:!0,get:function(){return Ht}}),Object.defineProperty(exports,"Ct",{enumerable:!0,get:function(){return _R}}),Object.defineProperty(exports,"Cu",{enumerable:!0,get:function(){return mt}}),Object.defineProperty(exports,"D",{enumerable:!0,get:function(){return sV}}),Object.defineProperty(exports,"Da",{enumerable:!0,get:function(){return li}}),Object.defineProperty(exports,"Dc",{enumerable:!0,get:function(){return ps}}),Object.defineProperty(exports,"Dd",{enumerable:!0,get:function(){return de}}),Object.defineProperty(exports,"Di",{enumerable:!0,get:function(){return Yl}}),Object.defineProperty(exports,"Dl",{enumerable:!0,get:function(){return Zs}}),Object.defineProperty(exports,"Dn",{enumerable:!0,get:function(){return lO}}),Object.defineProperty(exports,"Do",{enumerable:!0,get:function(){return Ps}}),Object.defineProperty(exports,"Dr",{enumerable:!0,get:function(){return Rm}}),Object.defineProperty(exports,"Ds",{enumerable:!0,get:function(){return br}}),Object.defineProperty(exports,"Dt",{enumerable:!0,get:function(){return mR}}),Object.defineProperty(exports,"Du",{enumerable:!0,get:function(){return Qo}}),Object.defineProperty(exports,"E",{enumerable:!0,get:function(){return gV}}),Object.defineProperty(exports,"Ea",{enumerable:!0,get:function(){return Es}}),Object.defineProperty(exports,"Ec",{enumerable:!0,get:function(){return xi}}),Object.defineProperty(exports,"Ed",{enumerable:!0,get:function(){return Ja}}),Object.defineProperty(exports,"Ei",{enumerable:!0,get:function(){return Jl}}),Object.defineProperty(exports,"El",{enumerable:!0,get:function(){return zi}}),Object.defineProperty(exports,"En",{enumerable:!0,get:function(){return gO}}),Object.defineProperty(exports,"Eo",{enumerable:!0,get:function(){return Ma}}),Object.defineProperty(exports,"Er",{enumerable:!0,get:function(){return j}}),Object.defineProperty(exports,"Es",{enumerable:!0,get:function(){return Ia}}),Object.defineProperty(exports,"Et",{enumerable:!0,get:function(){return pR}}),Object.defineProperty(exports,"Eu",{enumerable:!0,get:function(){return Hi}}),Object.defineProperty(exports,"F",{enumerable:!0,get:function(){return KB}}),Object.defineProperty(exports,"Fa",{enumerable:!0,get:function(){return Ot}}),Object.defineProperty(exports,"Fc",{enumerable:!0,get:function(){return Gi}}),Object.defineProperty(exports,"Fd",{enumerable:!0,get:function(){return _e}}),Object.defineProperty(exports,"Fi",{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,"Fl",{enumerable:!0,get:function(){return tc}}),Object.defineProperty(exports,"Fn",{enumerable:!0,get:function(){return HD}}),Object.defineProperty(exports,"Fo",{enumerable:!0,get:function(){return mi}}),Object.defineProperty(exports,"Fr",{enumerable:!0,get:function(){return Vd}}),Object.defineProperty(exports,"Fs",{enumerable:!0,get:function(){return si}}),Object.defineProperty(exports,"Ft",{enumerable:!0,get:function(){return KL}}),Object.defineProperty(exports,"Fu",{enumerable:!0,get:function(){return wr}}),Object.defineProperty(exports,"G",{enumerable:!0,get:function(){return zB}}),Object.defineProperty(exports,"Ga",{enumerable:!0,get:function(){return ta}}),Object.defineProperty(exports,"Gc",{enumerable:!0,get:function(){return Dr}}),Object.defineProperty(exports,"Gd",{enumerable:!0,get:function(){return ls}}),Object.defineProperty(exports,"Gi",{enumerable:!0,get:function(){return Ic}}),Object.defineProperty(exports,"Gl",{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,"Gn",{enumerable:!0,get:function(){return pD}}),Object.defineProperty(exports,"Go",{enumerable:!0,get:function(){return je}}),Object.defineProperty(exports,"Gr",{enumerable:!0,get:function(){return sd}}),Object.defineProperty(exports,"Gs",{enumerable:!0,get:function(){return lo}}),Object.defineProperty(exports,"Gt",{enumerable:!0,get:function(){return zI}}),Object.defineProperty(exports,"Gu",{enumerable:!0,get:function(){return ut}}),Object.defineProperty(exports,"H",{enumerable:!0,get:function(){return WB}}),Object.defineProperty(exports,"Ha",{enumerable:!0,get:function(){return Pt}}),Object.defineProperty(exports,"Hc",{enumerable:!0,get:function(){return oe}}),Object.defineProperty(exports,"Hd",{enumerable:!0,get:function(){return Ce}}),Object.defineProperty(exports,"Hi",{enumerable:!0,get:function(){return Kc}}),Object.defineProperty(exports,"Hl",{enumerable:!0,get:function(){return Lr}}),Object.defineProperty(exports,"Hn",{enumerable:!0,get:function(){return DD}}),Object.defineProperty(exports,"Ho",{enumerable:!0,get:function(){return Gt}}),Object.defineProperty(exports,"Hr",{enumerable:!0,get:function(){return vd}}),Object.defineProperty(exports,"Hs",{enumerable:!0,get:function(){return Gr}}),Object.defineProperty(exports,"Ht",{enumerable:!0,get:function(){return kL}}),Object.defineProperty(exports,"Hu",{enumerable:!0,get:function(){return Go}}),Object.defineProperty(exports,"I",{enumerable:!0,get:function(){return $B}}),Object.defineProperty(exports,"Ia",{enumerable:!0,get:function(){return fo}}),Object.defineProperty(exports,"Ic",{enumerable:!0,get:function(){return ts}}),Object.defineProperty(exports,"Id",{enumerable:!0,get:function(){return Ki}}),Object.defineProperty(exports,"Ii",{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,"Il",{enumerable:!0,get:function(){return xt}}),Object.defineProperty(exports,"In",{enumerable:!0,get:function(){return LD}}),Object.defineProperty(exports,"Io",{enumerable:!0,get:function(){return So}}),Object.defineProperty(exports,"Ir",{enumerable:!0,get:function(){return Nd}}),Object.defineProperty(exports,"Is",{enumerable:!0,get:function(){return qt}}),Object.defineProperty(exports,"It",{enumerable:!0,get:function(){return GL}}),Object.defineProperty(exports,"Iu",{enumerable:!0,get:function(){return Vs}}),Object.defineProperty(exports,"J",{enumerable:!0,get:function(){return kB}}),Object.defineProperty(exports,"Ja",{enumerable:!0,get:function(){return dc}}),Object.defineProperty(exports,"Jc",{enumerable:!0,get:function(){return ye}}),Object.defineProperty(exports,"Jd",{enumerable:!0,get:function(){return ao}}),Object.defineProperty(exports,"Ji",{enumerable:!0,get:function(){return Rc}}),Object.defineProperty(exports,"Jl",{enumerable:!0,get:function(){return ji}}),Object.defineProperty(exports,"Jn",{enumerable:!0,get:function(){return aD}}),Object.defineProperty(exports,"Jo",{enumerable:!0,get:function(){return vs}}),Object.defineProperty(exports,"Jr",{enumerable:!0,get:function(){return bd}}),Object.defineProperty(exports,"Js",{enumerable:!0,get:function(){return us}}),Object.defineProperty(exports,"Jt",{enumerable:!0,get:function(){return RI}}),Object.defineProperty(exports,"Ju",{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,"K",{enumerable:!0,get:function(){return LB}}),Object.defineProperty(exports,"Ka",{enumerable:!0,get:function(){return ds}}),Object.defineProperty(exports,"Kc",{enumerable:!0,get:function(){return ct}}),Object.defineProperty(exports,"Kd",{enumerable:!0,get:function(){return qr}}),Object.defineProperty(exports,"Ki",{enumerable:!0,get:function(){return Lc}}),Object.defineProperty(exports,"Kl",{enumerable:!0,get:function(){return Ha}}),Object.defineProperty(exports,"Kn",{enumerable:!0,get:function(){return _D}}),Object.defineProperty(exports,"Ko",{enumerable:!0,get:function(){return ca}}),Object.defineProperty(exports,"Kr",{enumerable:!0,get:function(){return ld}}),Object.defineProperty(exports,"Ks",{enumerable:!0,get:function(){return we}}),Object.defineProperty(exports,"Kt",{enumerable:!0,get:function(){return LI}}),Object.defineProperty(exports,"Ku",{enumerable:!0,get:function(){return lt}}),Object.defineProperty(exports,"L",{enumerable:!0,get:function(){return ZB}}),Object.defineProperty(exports,"La",{enumerable:!0,get:function(){return Ee}}),Object.defineProperty(exports,"Lc",{enumerable:!0,get:function(){return zr}}),Object.defineProperty(exports,"Ld",{enumerable:!0,get:function(){return ns}}),Object.defineProperty(exports,"Li",{enumerable:!0,get:function(){return Zc}}),Object.defineProperty(exports,"Ll",{enumerable:!0,get:function(){return kt}}),Object.defineProperty(exports,"Ln",{enumerable:!0,get:function(){return RD}}),Object.defineProperty(exports,"Lo",{enumerable:!0,get:function(){return Ie}}),Object.defineProperty(exports,"Lr",{enumerable:!0,get:function(){return Rd}}),Object.defineProperty(exports,"Ls",{enumerable:!0,get:function(){return oo}}),Object.defineProperty(exports,"Lt",{enumerable:!0,get:function(){return zL}}),Object.defineProperty(exports,"Lu",{enumerable:!0,get:function(){return at}}),Object.defineProperty(exports,"M",{enumerable:!0,get:function(){return XB}}),Object.defineProperty(exports,"Ma",{enumerable:!0,get:function(){return In}}),Object.defineProperty(exports,"Mc",{enumerable:!0,get:function(){return Ci}}),Object.defineProperty(exports,"Md",{enumerable:!0,get:function(){return ht}}),Object.defineProperty(exports,"Mi",{enumerable:!0,get:function(){return jl}}),Object.defineProperty(exports,"Ml",{enumerable:!0,get:function(){return Wi}}),Object.defineProperty(exports,"Mn",{enumerable:!0,get:function(){return KD}}),Object.defineProperty(exports,"Mo",{enumerable:!0,get:function(){return mr}}),Object.defineProperty(exports,"Mr",{enumerable:!0,get:function(){return Wd}}),Object.defineProperty(exports,"Ms",{enumerable:!0,get:function(){return Le}}),Object.defineProperty(exports,"Mt",{enumerable:!0,get:function(){return aR}}),Object.defineProperty(exports,"Mu",{enumerable:!0,get:function(){return re}}),Object.defineProperty(exports,"N",{enumerable:!0,get:function(){return tV}}),Object.defineProperty(exports,"Na",{enumerable:!0,get:function(){return cs}}),Object.defineProperty(exports,"Nc",{enumerable:!0,get:function(){return to}}),Object.defineProperty(exports,"Nd",{enumerable:!0,get:function(){return Kt}}),Object.defineProperty(exports,"Ni",{enumerable:!0,get:function(){return Wl}}),Object.defineProperty(exports,"Nl",{enumerable:!0,get:function(){return es}}),Object.defineProperty(exports,"Nn",{enumerable:!0,get:function(){return WD}}),Object.defineProperty(exports,"No",{enumerable:!0,get:function(){return Ms}}),Object.defineProperty(exports,"Nr",{enumerable:!0,get:function(){return Dd}}),Object.defineProperty(exports,"Ns",{enumerable:!0,get:function(){return ga}}),Object.defineProperty(exports,"Nt",{enumerable:!0,get:function(){return rR}}),Object.defineProperty(exports,"Nu",{enumerable:!0,get:function(){return Oi}}),Object.defineProperty(exports,"O",{enumerable:!0,get:function(){return oV}}),Object.defineProperty(exports,"Oa",{enumerable:!0,get:function(){return Yt}}),Object.defineProperty(exports,"Oc",{enumerable:!0,get:function(){return Io}}),Object.defineProperty(exports,"Od",{enumerable:!0,get:function(){return Li}}),Object.defineProperty(exports,"Oi",{enumerable:!0,get:function(){return Al}}),Object.defineProperty(exports,"Ol",{enumerable:!0,get:function(){return _t}}),Object.defineProperty(exports,"On",{enumerable:!0,get:function(){return tO}}),Object.defineProperty(exports,"Oo",{enumerable:!0,get:function(){return bi}}),Object.defineProperty(exports,"Or",{enumerable:!0,get:function(){return Pm}}),Object.defineProperty(exports,"Os",{enumerable:!0,get:function(){return Rs}}),Object.defineProperty(exports,"Ot",{enumerable:!0,get:function(){return dR}}),Object.defineProperty(exports,"Ou",{enumerable:!0,get:function(){return Ir}}),Object.defineProperty(exports,"P",{enumerable:!0,get:function(){return QB}}),Object.defineProperty(exports,"Pa",{enumerable:!0,get:function(){return Kr}}),Object.defineProperty(exports,"Pc",{enumerable:!0,get:function(){return ge}}),Object.defineProperty(exports,"Pd",{enumerable:!0,get:function(){return no}}),Object.defineProperty(exports,"Pi",{enumerable:!0,get:function(){return Nl}}),Object.defineProperty(exports,"Pl",{enumerable:!0,get:function(){return Rr}}),Object.defineProperty(exports,"Pn",{enumerable:!0,get:function(){return VD}}),Object.defineProperty(exports,"Po",{enumerable:!0,get:function(){return vi}}),Object.defineProperty(exports,"Pr",{enumerable:!0,get:function(){return Fd}}),Object.defineProperty(exports,"Ps",{enumerable:!0,get:function(){return ws}}),Object.defineProperty(exports,"Pt",{enumerable:!0,get:function(){return nR}}),Object.defineProperty(exports,"Pu",{enumerable:!0,get:function(){return Vo}}),Object.defineProperty(exports,"Q",{enumerable:!0,get:function(){return SB}}),Object.defineProperty(exports,"Qa",{enumerable:!0,get:function(){return Pe}}),Object.defineProperty(exports,"Qc",{enumerable:!0,get:function(){return Hr}}),Object.defineProperty(exports,"Qd",{enumerable:!0,get:function(){return os}}),Object.defineProperty(exports,"Qi",{enumerable:!0,get:function(){return jc}}),Object.defineProperty(exports,"Ql",{enumerable:!0,get:function(){return st}}),Object.defineProperty(exports,"Qn",{enumerable:!0,get:function(){return tD}}),Object.defineProperty(exports,"Qo",{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,"Qr",{enumerable:!0,get:function(){return Ku}}),Object.defineProperty(exports,"Qs",{enumerable:!0,get:function(){return Oo}}),Object.defineProperty(exports,"Qt",{enumerable:!0,get:function(){return VI}}),Object.defineProperty(exports,"Qu",{enumerable:!0,get:function(){return vt}}),Object.defineProperty(exports,"R",{enumerable:!0,get:function(){return qB}}),Object.defineProperty(exports,"Ra",{enumerable:!0,get:function(){return na}}),Object.defineProperty(exports,"Rc",{enumerable:!0,get:function(){return nc}}),Object.defineProperty(exports,"Rd",{enumerable:!0,get:function(){return Br}}),Object.defineProperty(exports,"Ri",{enumerable:!0,get:function(){return rl}}),Object.defineProperty(exports,"Rl",{enumerable:!0,get:function(){return $a}}),Object.defineProperty(exports,"Rn",{enumerable:!0,get:function(){return BD}}),Object.defineProperty(exports,"Ro",{enumerable:!0,get:function(){return ha}}),Object.defineProperty(exports,"Rr",{enumerable:!0,get:function(){return Ud}}),Object.defineProperty(exports,"Rs",{enumerable:!0,get:function(){return xe}}),Object.defineProperty(exports,"Rt",{enumerable:!0,get:function(){return BL}}),Object.defineProperty(exports,"Ru",{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,"S",{enumerable:!0,get:function(){return SV}}),Object.defineProperty(exports,"Sa",{enumerable:!0,get:function(){return To}}),Object.defineProperty(exports,"Sc",{enumerable:!0,get:function(){return Po}}),Object.defineProperty(exports,"Sd",{enumerable:!0,get:function(){return Cr}}),Object.defineProperty(exports,"Sf",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"Si",{enumerable:!0,get:function(){return eu}}),Object.defineProperty(exports,"Sl",{enumerable:!0,get:function(){return rt}}),Object.defineProperty(exports,"Sn",{enumerable:!0,get:function(){return wO}}),Object.defineProperty(exports,"So",{enumerable:!0,get:function(){return Wt}}),Object.defineProperty(exports,"Sr",{enumerable:!0,get:function(){return R}}),Object.defineProperty(exports,"Ss",{enumerable:!0,get:function(){return xc}}),Object.defineProperty(exports,"St",{enumerable:!0,get:function(){return vR}}),Object.defineProperty(exports,"Su",{enumerable:!0,get:function(){return Js}}),Object.defineProperty(exports,"T",{enumerable:!0,get:function(){return vV}}),Object.defineProperty(exports,"Ta",{enumerable:!0,get:function(){return sr}}),Object.defineProperty(exports,"Tc",{enumerable:!0,get:function(){return Fs}}),Object.defineProperty(exports,"Td",{enumerable:!0,get:function(){return Xe}}),Object.defineProperty(exports,"Ti",{enumerable:!0,get:function(){return Ql}}),Object.defineProperty(exports,"Tl",{enumerable:!0,get:function(){return pe}}),Object.defineProperty(exports,"Tn",{enumerable:!0,get:function(){return mO}}),Object.defineProperty(exports,"To",{enumerable:!0,get:function(){return Je}}),Object.defineProperty(exports,"Tr",{enumerable:!0,get:function(){return P}}),Object.defineProperty(exports,"Ts",{enumerable:!0,get:function(){return tt}}),Object.defineProperty(exports,"Tt",{enumerable:!0,get:function(){return hR}}),Object.defineProperty(exports,"Tu",{enumerable:!0,get:function(){return me}}),Object.defineProperty(exports,"U",{enumerable:!0,get:function(){return NB}}),Object.defineProperty(exports,"Ua",{enumerable:!0,get:function(){return uo}}),Object.defineProperty(exports,"Uc",{enumerable:!0,get:function(){return Mi}}),Object.defineProperty(exports,"Ud",{enumerable:!0,get:function(){return $i}}),Object.defineProperty(exports,"Ui",{enumerable:!0,get:function(){return Wc}}),Object.defineProperty(exports,"Ul",{enumerable:!0,get:function(){return ec}}),Object.defineProperty(exports,"Un",{enumerable:!0,get:function(){return OD}}),Object.defineProperty(exports,"Uo",{enumerable:!0,get:function(){return jr}}),Object.defineProperty(exports,"Ur",{enumerable:!0,get:function(){return md}}),Object.defineProperty(exports,"Us",{enumerable:!0,get:function(){return sc}}),Object.defineProperty(exports,"Ut",{enumerable:!0,get:function(){return II}}),Object.defineProperty(exports,"Uu",{enumerable:!0,get:function(){return Or}}),Object.defineProperty(exports,"V",{enumerable:!0,get:function(){return UB}}),Object.defineProperty(exports,"Va",{enumerable:!0,get:function(){return mc}}),Object.defineProperty(exports,"Vc",{enumerable:!0,get:function(){return Ua}}),Object.defineProperty(exports,"Vd",{enumerable:!0,get:function(){return co}}),Object.defineProperty(exports,"Vi",{enumerable:!0,get:function(){return Xc}}),Object.defineProperty(exports,"Vl",{enumerable:!0,get:function(){return $o}}),Object.defineProperty(exports,"Vn",{enumerable:!0,get:function(){return wD}}),Object.defineProperty(exports,"Vo",{enumerable:!0,get:function(){return oi}}),Object.defineProperty(exports,"Vr",{enumerable:!0,get:function(){return hd}}),Object.defineProperty(exports,"Vs",{enumerable:!0,get:function(){return ss}}),Object.defineProperty(exports,"Vt",{enumerable:!0,get:function(){return wL}}),Object.defineProperty(exports,"Vu",{enumerable:!0,get:function(){return Ni}}),Object.defineProperty(exports,"W",{enumerable:!0,get:function(){return VB}}),Object.defineProperty(exports,"Wa",{enumerable:!0,get:function(){return Te}}),Object.defineProperty(exports,"Wc",{enumerable:!0,get:function(){return Wo}}),Object.defineProperty(exports,"Wd",{enumerable:!0,get:function(){return Ln}}),Object.defineProperty(exports,"Wi",{enumerable:!0,get:function(){return Uc}}),Object.defineProperty(exports,"Wl",{enumerable:!0,get:function(){return bt}}),Object.defineProperty(exports,"Wn",{enumerable:!0,get:function(){return AD}}),Object.defineProperty(exports,"Wo",{enumerable:!0,get:function(){return _o}}),Object.defineProperty(exports,"Wr",{enumerable:!0,get:function(){return _d}}),Object.defineProperty(exports,"Ws",{enumerable:!0,get:function(){return Dt}}),Object.defineProperty(exports,"Wt",{enumerable:!0,get:function(){return OL}}),Object.defineProperty(exports,"Wu",{enumerable:!0,get:function(){return Gs}}),Object.defineProperty(exports,"X",{enumerable:!0,get:function(){return OB}}),Object.defineProperty(exports,"Xa",{enumerable:!0,get:function(){return ui}}),Object.defineProperty(exports,"Xc",{enumerable:!0,get:function(){return Nn}}),Object.defineProperty(exports,"Xd",{enumerable:!0,get:function(){return Xi}}),Object.defineProperty(exports,"Xi",{enumerable:!0,get:function(){return Hc}}),Object.defineProperty(exports,"Xl",{enumerable:!0,get:function(){return Er}}),Object.defineProperty(exports,"Xn",{enumerable:!0,get:function(){return nD}}),Object.defineProperty(exports,"Xo",{enumerable:!0,get:function(){return yc}}),Object.defineProperty(exports,"Xr",{enumerable:!0,get:function(){return id}}),Object.defineProperty(exports,"Xs",{enumerable:!0,get:function(){return uc}}),Object.defineProperty(exports,"Xt",{enumerable:!0,get:function(){return qI}}),Object.defineProperty(exports,"Xu",{enumerable:!0,get:function(){return Fr}}),Object.defineProperty(exports,"Y",{enumerable:!0,get:function(){return wB}}),Object.defineProperty(exports,"Ya",{enumerable:!0,get:function(){return Nt}}),Object.defineProperty(exports,"Yc",{enumerable:!0,get:function(){return Ji}}),Object.defineProperty(exports,"Yd",{enumerable:!0,get:function(){return be}}),Object.defineProperty(exports,"Yi",{enumerable:!0,get:function(){return zc}}),Object.defineProperty(exports,"Yl",{enumerable:!0,get:function(){return Uo}}),Object.defineProperty(exports,"Yn",{enumerable:!0,get:function(){return iD}}),Object.defineProperty(exports,"Yo",{enumerable:!0,get:function(){return ti}}),Object.defineProperty(exports,"Yr",{enumerable:!0,get:function(){return xd}}),Object.defineProperty(exports,"Ys",{enumerable:!0,get:function(){return Jr}}),Object.defineProperty(exports,"Yt",{enumerable:!0,get:function(){return sL}}),Object.defineProperty(exports,"Yu",{enumerable:!0,get:function(){return Vi}}),Object.defineProperty(exports,"Z",{enumerable:!0,get:function(){return DB}}),Object.defineProperty(exports,"Za",{enumerable:!0,get:function(){return bo}}),Object.defineProperty(exports,"Zc",{enumerable:!0,get:function(){return as}}),Object.defineProperty(exports,"Zd",{enumerable:!0,get:function(){return Pn}}),Object.defineProperty(exports,"Zi",{enumerable:!0,get:function(){return Ac}}),Object.defineProperty(exports,"Zl",{enumerable:!0,get:function(){return Us}}),Object.defineProperty(exports,"Zn",{enumerable:!0,get:function(){return rD}}),Object.defineProperty(exports,"Zo",{enumerable:!0,get:function(){return zt}}),Object.defineProperty(exports,"Zr",{enumerable:!0,get:function(){return qu}}),Object.defineProperty(exports,"Zs",{enumerable:!0,get:function(){return fa}}),Object.defineProperty(exports,"Zt",{enumerable:!0,get:function(){return XI}}),Object.defineProperty(exports,"Zu",{enumerable:!0,get:function(){return Qs}}),Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return ZV}}),Object.defineProperty(exports,"_a",{enumerable:!0,get:function(){return Wn}}),Object.defineProperty(exports,"_c",{enumerable:!0,get:function(){return Qe}}),Object.defineProperty(exports,"_d",{enumerable:!0,get:function(){return dt}}),Object.defineProperty(exports,"_f",{enumerable:!0,get:function(){return Jt}}),Object.defineProperty(exports,"_i",{enumerable:!0,get:function(){return ou}}),Object.defineProperty(exports,"_l",{enumerable:!0,get:function(){return te}}),Object.defineProperty(exports,"_n",{enumerable:!0,get:function(){return NO}}),Object.defineProperty(exports,"_o",{enumerable:!0,get:function(){return xo}}),Object.defineProperty(exports,"_r",{enumerable:!0,get:function(){return yv}}),Object.defineProperty(exports,"_s",{enumerable:!0,get:function(){return Ne}}),Object.defineProperty(exports,"_t",{enumerable:!0,get:function(){return JR}}),Object.defineProperty(exports,"_u",{enumerable:!0,get:function(){return qa}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return eH}}),Object.defineProperty(exports,"aa",{enumerable:!0,get:function(){return Tc}}),Object.defineProperty(exports,"ac",{enumerable:!0,get:function(){return Be}}),Object.defineProperty(exports,"ad",{enumerable:!0,get:function(){return ie}}),Object.defineProperty(exports,"af",{enumerable:!0,get:function(){return Mn}}),Object.defineProperty(exports,"ai",{enumerable:!0,get:function(){return Pu}}),Object.defineProperty(exports,"al",{enumerable:!0,get:function(){return qo}}),Object.defineProperty(exports,"an",{enumerable:!0,get:function(){return cL}}),Object.defineProperty(exports,"ao",{enumerable:!0,get:function(){return Ao}}),Object.defineProperty(exports,"ar",{enumerable:!0,get:function(){return qx}}),Object.defineProperty(exports,"as",{enumerable:!0,get:function(){return bc}}),Object.defineProperty(exports,"at",{enumerable:!0,get:function(){return nB}}),Object.defineProperty(exports,"au",{enumerable:!0,get:function(){return vc}}),Object.defineProperty(exports,"b",{enumerable:!0,get:function(){return MV}}),Object.defineProperty(exports,"ba",{enumerable:!0,get:function(){return Lt}}),Object.defineProperty(exports,"bc",{enumerable:!0,get:function(){return Si}}),Object.defineProperty(exports,"bd",{enumerable:!0,get:function(){return Di}}),Object.defineProperty(exports,"bf",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"bi",{enumerable:!0,get:function(){return pu}}),Object.defineProperty(exports,"bl",{enumerable:!0,get:function(){return Sr}}),Object.defineProperty(exports,"bn",{enumerable:!0,get:function(){return bO}}),Object.defineProperty(exports,"bo",{enumerable:!0,get:function(){return Xn}}),Object.defineProperty(exports,"br",{enumerable:!0,get:function(){return U_}}),Object.defineProperty(exports,"bs",{enumerable:!0,get:function(){return bs}}),Object.defineProperty(exports,"bt",{enumerable:!0,get:function(){return wR}}),Object.defineProperty(exports,"bu",{enumerable:!0,get:function(){return Jo}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return HV}}),Object.defineProperty(exports,"ca",{enumerable:!0,get:function(){return nt}}),Object.defineProperty(exports,"cc",{enumerable:!0,get:function(){return di}}),Object.defineProperty(exports,"cd",{enumerable:!0,get:function(){return Hs}}),Object.defineProperty(exports,"cf",{enumerable:!0,get:function(){return ic}}),Object.defineProperty(exports,"ci",{enumerable:!0,get:function(){return Lu}}),Object.defineProperty(exports,"cl",{enumerable:!0,get:function(){return pt}}),Object.defineProperty(exports,"cn",{enumerable:!0,get:function(){return ZO}}),Object.defineProperty(exports,"co",{enumerable:!0,get:function(){return js}}),Object.defineProperty(exports,"cr",{enumerable:!0,get:function(){return wx}}),Object.defineProperty(exports,"cs",{enumerable:!0,get:function(){return De}}),Object.defineProperty(exports,"ct",{enumerable:!0,get:function(){return Yz}}),Object.defineProperty(exports,"cu",{enumerable:!0,get:function(){return mo}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return IV}}),Object.defineProperty(exports,"da",{enumerable:!0,get:function(){return zs}}),Object.defineProperty(exports,"dc",{enumerable:!0,get:function(){return ko}}),Object.defineProperty(exports,"dd",{enumerable:!0,get:function(){return Ga}}),Object.defineProperty(exports,"df",{enumerable:!0,get:function(){return wo}}),Object.defineProperty(exports,"di",{enumerable:!0,get:function(){return ku}}),Object.defineProperty(exports,"dl",{enumerable:!0,get:function(){return fe}}),Object.defineProperty(exports,"dn",{enumerable:!0,get:function(){return WO}}),Object.defineProperty(exports,"do",{enumerable:!0,get:function(){return Ve}}),Object.defineProperty(exports,"dr",{enumerable:!0,get:function(){return Uy}}),Object.defineProperty(exports,"ds",{enumerable:!0,get:function(){return ms}}),Object.defineProperty(exports,"dt",{enumerable:!0,get:function(){return Bz}}),Object.defineProperty(exports,"du",{enumerable:!0,get:function(){return Un}}),Object.defineProperty(exports,"ea",{enumerable:!0,get:function(){return Nc}}),Object.defineProperty(exports,"ec",{enumerable:!0,get:function(){return wa}}),Object.defineProperty(exports,"ed",{enumerable:!0,get:function(){return Mo}}),Object.defineProperty(exports,"ef",{enumerable:!0,get:function(){return oc}}),Object.defineProperty(exports,"ei",{enumerable:!0,get:function(){return Mu}}),Object.defineProperty(exports,"el",{enumerable:!0,get:function(){return Tt}}),Object.defineProperty(exports,"en",{enumerable:!0,get:function(){return TL}}),Object.defineProperty(exports,"eo",{enumerable:!0,get:function(){return Yn}}),Object.defineProperty(exports,"er",{enumerable:!0,get:function(){return GT}}),Object.defineProperty(exports,"es",{enumerable:!0,get:function(){return Me}}),Object.defineProperty(exports,"et",{enumerable:!0,get:function(){return xB}}),Object.defineProperty(exports,"eu",{enumerable:!0,get:function(){return Ae}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return LV}}),Object.defineProperty(exports,"fa",{enumerable:!0,get:function(){return Ti}}),Object.defineProperty(exports,"fc",{enumerable:!0,get:function(){return Ue}}),Object.defineProperty(exports,"fd",{enumerable:!0,get:function(){return ce}}),Object.defineProperty(exports,"ff",{enumerable:!0,get:function(){return Re}}),Object.defineProperty(exports,"fi",{enumerable:!0,get:function(){return Tu}}),Object.defineProperty(exports,"fl",{enumerable:!0,get:function(){return Ri}}),Object.defineProperty(exports,"fn",{enumerable:!0,get:function(){return UO}}),Object.defineProperty(exports,"fo",{enumerable:!0,get:function(){return Ca}}),Object.defineProperty(exports,"fr",{enumerable:!0,get:function(){return Cy}}),Object.defineProperty(exports,"fs",{enumerable:!0,get:function(){return Zr}}),Object.defineProperty(exports,"ft",{enumerable:!0,get:function(){return Fz}}),Object.defineProperty(exports,"fu",{enumerable:!0,get:function(){return hs}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return UV}}),Object.defineProperty(exports,"ga",{enumerable:!0,get:function(){return oa}}),Object.defineProperty(exports,"gc",{enumerable:!0,get:function(){return Fo}}),Object.defineProperty(exports,"gd",{enumerable:!0,get:function(){return Ks}}),Object.defineProperty(exports,"gf",{enumerable:!0,get:function(){return ci}}),Object.defineProperty(exports,"gi",{enumerable:!0,get:function(){return xu}}),Object.defineProperty(exports,"gl",{enumerable:!0,get:function(){return Ra}}),Object.defineProperty(exports,"gn",{enumerable:!0,get:function(){return qO}}),Object.defineProperty(exports,"go",{enumerable:!0,get:function(){return fi}}),Object.defineProperty(exports,"gr",{enumerable:!0,get:function(){return bv}}),Object.defineProperty(exports,"gs",{enumerable:!0,get:function(){return yo}}),Object.defineProperty(exports,"gt",{enumerable:!0,get:function(){return dz}}),Object.defineProperty(exports,"gu",{enumerable:!0,get:function(){return We}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return WV}}),Object.defineProperty(exports,"ha",{enumerable:!0,get:function(){return ke}}),Object.defineProperty(exports,"hc",{enumerable:!0,get:function(){return rs}}),Object.defineProperty(exports,"hd",{enumerable:!0,get:function(){return kr}}),Object.defineProperty(exports,"hf",{enumerable:!0,get:function(){return Ts}}),Object.defineProperty(exports,"hi",{enumerable:!0,get:function(){return Su}}),Object.defineProperty(exports,"hl",{enumerable:!0,get:function(){return gt}}),Object.defineProperty(exports,"hn",{enumerable:!0,get:function(){return HO}}),Object.defineProperty(exports,"ho",{enumerable:!0,get:function(){return Zt}}),Object.defineProperty(exports,"hr",{enumerable:!0,get:function(){return Xv}}),Object.defineProperty(exports,"hs",{enumerable:!0,get:function(){return Wr}}),Object.defineProperty(exports,"ht",{enumerable:!0,get:function(){return _z}}),Object.defineProperty(exports,"hu",{enumerable:!0,get:function(){return It}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return aH}}),Object.defineProperty(exports,"ia",{enumerable:!0,get:function(){return Cc}}),Object.defineProperty(exports,"ic",{enumerable:!0,get:function(){return Eo}}),Object.defineProperty(exports,"id",{enumerable:!0,get:function(){return Va}}),Object.defineProperty(exports,"if",{enumerable:!0,get:function(){return qi}}),Object.defineProperty(exports,"ii",{enumerable:!0,get:function(){return Ju}}),Object.defineProperty(exports,"il",{enumerable:!0,get:function(){return Fi}}),Object.defineProperty(exports,"in",{enumerable:!0,get:function(){return HI}}),Object.defineProperty(exports,"io",{enumerable:!0,get:function(){return ya}}),Object.defineProperty(exports,"ir",{enumerable:!0,get:function(){return DS}}),Object.defineProperty(exports,"is",{enumerable:!0,get:function(){return ni}}),Object.defineProperty(exports,"it",{enumerable:!0,get:function(){return eB}}),Object.defineProperty(exports,"iu",{enumerable:!0,get:function(){return ei}}),Object.defineProperty(exports,"j",{enumerable:!0,get:function(){return YB}}),Object.defineProperty(exports,"ja",{enumerable:!0,get:function(){return Qi}}),Object.defineProperty(exports,"jc",{enumerable:!0,get:function(){return Ls}}),Object.defineProperty(exports,"jd",{enumerable:!0,get:function(){return Ys}}),Object.defineProperty(exports,"ji",{enumerable:!0,get:function(){return Ml}}),Object.defineProperty(exports,"jl",{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,"jn",{enumerable:!0,get:function(){return nO}}),Object.defineProperty(exports,"jo",{enumerable:!0,get:function(){return Oa}}),Object.defineProperty(exports,"jr",{enumerable:!0,get:function(){return Id}}),Object.defineProperty(exports,"js",{enumerable:!0,get:function(){return Co}}),Object.defineProperty(exports,"jt",{enumerable:!0,get:function(){return sR}}),Object.defineProperty(exports,"ju",{enumerable:!0,get:function(){return Ba}}),Object.defineProperty(exports,"k",{enumerable:!0,get:function(){return rV}}),Object.defineProperty(exports,"ka",{enumerable:!0,get:function(){return so}}),Object.defineProperty(exports,"kc",{enumerable:!0,get:function(){return et}}),Object.defineProperty(exports,"kd",{enumerable:!0,get:function(){return Yo}}),Object.defineProperty(exports,"ki",{enumerable:!0,get:function(){return Pl}}),Object.defineProperty(exports,"kl",{enumerable:!0,get:function(){return At}}),Object.defineProperty(exports,"kn",{enumerable:!0,get:function(){return $D}}),Object.defineProperty(exports,"ko",{enumerable:!0,get:function(){return ba}}),Object.defineProperty(exports,"kr",{enumerable:!0,get:function(){return Lm}}),Object.defineProperty(exports,"ks",{enumerable:!0,get:function(){return wi}}),Object.defineProperty(exports,"kt",{enumerable:!0,get:function(){return cR}}),Object.defineProperty(exports,"ku",{enumerable:!0,get:function(){return yt}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return YV}}),Object.defineProperty(exports,"la",{enumerable:!0,get:function(){return La}}),Object.defineProperty(exports,"lc",{enumerable:!0,get:function(){return Xt}}),Object.defineProperty(exports,"ld",{enumerable:!0,get:function(){return ot}}),Object.defineProperty(exports,"lf",{enumerable:!0,get:function(){return wt}}),Object.defineProperty(exports,"li",{enumerable:!0,get:function(){return Du}}),Object.defineProperty(exports,"ll",{enumerable:!0,get:function(){return Ze}}),Object.defineProperty(exports,"ln",{enumerable:!0,get:function(){return ek}}),Object.defineProperty(exports,"lo",{enumerable:!0,get:function(){return la}}),Object.defineProperty(exports,"lr",{enumerable:!0,get:function(){return Ax}}),Object.defineProperty(exports,"ls",{enumerable:!0,get:function(){return ra}}),Object.defineProperty(exports,"lt",{enumerable:!0,get:function(){return Hz}}),Object.defineProperty(exports,"lu",{enumerable:!0,get:function(){return Oe}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return BV}}),Object.defineProperty(exports,"ma",{enumerable:!0,get:function(){return ho}}),Object.defineProperty(exports,"mc",{enumerable:!0,get:function(){return As}}),Object.defineProperty(exports,"md",{enumerable:!0,get:function(){return Ko}}),Object.defineProperty(exports,"mf",{enumerable:!0,get:function(){return ir}}),Object.defineProperty(exports,"mi",{enumerable:!0,get:function(){return Cu}}),Object.defineProperty(exports,"ml",{enumerable:!0,get:function(){return Xs}}),Object.defineProperty(exports,"mn",{enumerable:!0,get:function(){return KO}}),Object.defineProperty(exports,"mo",{enumerable:!0,get:function(){return pi}}),Object.defineProperty(exports,"mr",{enumerable:!0,get:function(){return Zv}}),Object.defineProperty(exports,"ms",{enumerable:!0,get:function(){return Ft}}),Object.defineProperty(exports,"mt",{enumerable:!0,get:function(){return Dz}}),Object.defineProperty(exports,"mu",{enumerable:!0,get:function(){return gc}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return sH}}),Object.defineProperty(exports,"na",{enumerable:!0,get:function(){return Oc}}),Object.defineProperty(exports,"nc",{enumerable:!0,get:function(){return hi}}),Object.defineProperty(exports,"nd",{enumerable:!0,get:function(){return yi}}),Object.defineProperty(exports,"nf",{enumerable:!0,get:function(){return ro}}),Object.defineProperty(exports,"ni",{enumerable:!0,get:function(){return rd}}),Object.defineProperty(exports,"nl",{enumerable:!0,get:function(){return Ka}}),Object.defineProperty(exports,"nn",{enumerable:!0,get:function(){return ZI}}),Object.defineProperty(exports,"no",{enumerable:!0,get:function(){return Sc}}),Object.defineProperty(exports,"nr",{enumerable:!0,get:function(){return ME}}),Object.defineProperty(exports,"ns",{enumerable:!0,get:function(){return qn}}),Object.defineProperty(exports,"nt",{enumerable:!0,get:function(){return lB}}),Object.defineProperty(exports,"nu",{enumerable:!0,get:function(){return Gn}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return cH}}),Object.defineProperty(exports,"oa",{enumerable:!0,get:function(){return wc}}),Object.defineProperty(exports,"oc",{enumerable:!0,get:function(){return Sa}}),Object.defineProperty(exports,"od",{enumerable:!0,get:function(){return Ai}}),Object.defineProperty(exports,"of",{enumerable:!0,get:function(){return is}}),Object.defineProperty(exports,"oi",{enumerable:!0,get:function(){return Au}}),Object.defineProperty(exports,"ol",{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,"on",{enumerable:!0,get:function(){return QO}}),Object.defineProperty(exports,"oo",{enumerable:!0,get:function(){return Ge}}),Object.defineProperty(exports,"or",{enumerable:!0,get:function(){return Gx}}),Object.defineProperty(exports,"os",{enumerable:!0,get:function(){return Bt}}),Object.defineProperty(exports,"ot",{enumerable:!0,get:function(){return tB}}),Object.defineProperty(exports,"ou",{enumerable:!0,get:function(){return Rt}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return QV}}),Object.defineProperty(exports,"pa",{enumerable:!0,get:function(){return or}}),Object.defineProperty(exports,"pc",{enumerable:!0,get:function(){return Ta}}),Object.defineProperty(exports,"pd",{enumerable:!0,get:function(){return Pi}}),Object.defineProperty(exports,"pf",{enumerable:!0,get:function(){return _a}}),Object.defineProperty(exports,"pi",{enumerable:!0,get:function(){return wu}}),Object.defineProperty(exports,"pl",{enumerable:!0,get:function(){return Nr}}),Object.defineProperty(exports,"pn",{enumerable:!0,get:function(){return VO}}),Object.defineProperty(exports,"po",{enumerable:!0,get:function(){return Os}}),Object.defineProperty(exports,"pr",{enumerable:!0,get:function(){return Sy}}),Object.defineProperty(exports,"ps",{enumerable:!0,get:function(){return hc}}),Object.defineProperty(exports,"pt",{enumerable:!0,get:function(){return jz}}),Object.defineProperty(exports,"pu",{enumerable:!0,get:function(){return Qr}}),Object.defineProperty(exports,"q",{enumerable:!0,get:function(){return FB}}),Object.defineProperty(exports,"qa",{enumerable:!0,get:function(){return Yr}}),Object.defineProperty(exports,"qc",{enumerable:!0,get:function(){return io}}),Object.defineProperty(exports,"qd",{enumerable:!0,get:function(){return jt}}),Object.defineProperty(exports,"qi",{enumerable:!0,get:function(){return Bc}}),Object.defineProperty(exports,"ql",{enumerable:!0,get:function(){return ae}}),Object.defineProperty(exports,"qn",{enumerable:!0,get:function(){return oD}}),Object.defineProperty(exports,"qo",{enumerable:!0,get:function(){return Kn}}),Object.defineProperty(exports,"qr",{enumerable:!0,get:function(){return od}}),Object.defineProperty(exports,"qs",{enumerable:!0,get:function(){return ea}}),Object.defineProperty(exports,"qt",{enumerable:!0,get:function(){return $}}),Object.defineProperty(exports,"qu",{enumerable:!0,get:function(){return Za}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return uH}}),Object.defineProperty(exports,"ra",{enumerable:!0,get:function(){return Ec}}),Object.defineProperty(exports,"rc",{enumerable:!0,get:function(){return ia}}),Object.defineProperty(exports,"rd",{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,"rf",{enumerable:!0,get:function(){return ve}}),Object.defineProperty(exports,"ri",{enumerable:!0,get:function(){return Ru}}),Object.defineProperty(exports,"rl",{enumerable:!0,get:function(){return le}}),Object.defineProperty(exports,"rn",{enumerable:!0,get:function(){return YI}}),Object.defineProperty(exports,"ro",{enumerable:!0,get:function(){return Ut}}),Object.defineProperty(exports,"rr",{enumerable:!0,get:function(){return YE}}),Object.defineProperty(exports,"rs",{enumerable:!0,get:function(){return ys}}),Object.defineProperty(exports,"rt",{enumerable:!0,get:function(){return qz}}),Object.defineProperty(exports,"ru",{enumerable:!0,get:function(){return _s}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return lH}}),Object.defineProperty(exports,"sa",{enumerable:!0,get:function(){return Ro}}),Object.defineProperty(exports,"sc",{enumerable:!0,get:function(){return Ds}}),Object.defineProperty(exports,"sd",{enumerable:!0,get:function(){return Tr}}),Object.defineProperty(exports,"sf",{enumerable:!0,get:function(){return Vr}}),Object.defineProperty(exports,"si",{enumerable:!0,get:function(){return Hu}}),Object.defineProperty(exports,"sl",{enumerable:!0,get:function(){return qs}}),Object.defineProperty(exports,"sn",{enumerable:!0,get:function(){return XO}}),Object.defineProperty(exports,"so",{enumerable:!0,get:function(){return Ea}}),Object.defineProperty(exports,"sr",{enumerable:!0,get:function(){return Ux}}),Object.defineProperty(exports,"ss",{enumerable:!0,get:function(){return po}}),Object.defineProperty(exports,"st",{enumerable:!0,get:function(){return rB}}),Object.defineProperty(exports,"su",{enumerable:!0,get:function(){return ar}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return nH}}),Object.defineProperty(exports,"ta",{enumerable:!0,get:function(){return Dc}}),Object.defineProperty(exports,"tc",{enumerable:!0,get:function(){return ks}}),Object.defineProperty(exports,"td",{enumerable:!0,get:function(){return ja}}),Object.defineProperty(exports,"tf",{enumerable:!0,get:function(){return Et}}),Object.defineProperty(exports,"ti",{enumerable:!0,get:function(){return zu}}),Object.defineProperty(exports,"tl",{enumerable:!0,get:function(){return ee}}),Object.defineProperty(exports,"tn",{enumerable:!0,get:function(){return SL}}),Object.defineProperty(exports,"to",{enumerable:!0,get:function(){return xs}}),Object.defineProperty(exports,"tr",{enumerable:!0,get:function(){return VT}}),Object.defineProperty(exports,"ts",{enumerable:!0,get:function(){return ua}}),Object.defineProperty(exports,"tt",{enumerable:!0,get:function(){return vB}}),Object.defineProperty(exports,"tu",{enumerable:!0,get:function(){return sa}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return KV}}),Object.defineProperty(exports,"ua",{enumerable:!0,get:function(){return xr}}),Object.defineProperty(exports,"uc",{enumerable:!0,get:function(){return va}}),Object.defineProperty(exports,"ud",{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,"uf",{enumerable:!0,get:function(){return Bi}}),Object.defineProperty(exports,"ui",{enumerable:!0,get:function(){return Ou}}),Object.defineProperty(exports,"ul",{enumerable:!0,get:function(){return Ya}}),Object.defineProperty(exports,"un",{enumerable:!0,get:function(){return $O}}),Object.defineProperty(exports,"uo",{enumerable:!0,get:function(){return Do}}),Object.defineProperty(exports,"ur",{enumerable:!0,get:function(){return jx}}),Object.defineProperty(exports,"us",{enumerable:!0,get:function(){return Hn}}),Object.defineProperty(exports,"ut",{enumerable:!0,get:function(){return Vz}}),Object.defineProperty(exports,"uu",{enumerable:!0,get:function(){return aa}}),Object.defineProperty(exports,"v",{enumerable:!0,get:function(){return JV}}),Object.defineProperty(exports,"va",{enumerable:!0,get:function(){return gs}}),Object.defineProperty(exports,"vc",{enumerable:!0,get:function(){return Pa}}),Object.defineProperty(exports,"vd",{enumerable:!0,get:function(){return za}}),Object.defineProperty(exports,"vf",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"vi",{enumerable:!0,get:function(){return hu}}),Object.defineProperty(exports,"vl",{enumerable:!0,get:function(){return Ei}}),Object.defineProperty(exports,"vn",{enumerable:!0,get:function(){return yO}}),Object.defineProperty(exports,"vo",{enumerable:!0,get:function(){return Fe}}),Object.defineProperty(exports,"vr",{enumerable:!0,get:function(){return H}}),Object.defineProperty(exports,"vs",{enumerable:!0,get:function(){return da}}),Object.defineProperty(exports,"vt",{enumerable:!0,get:function(){return VR}}),Object.defineProperty(exports,"vu",{enumerable:!0,get:function(){return ue}}),Object.defineProperty(exports,"w",{enumerable:!0,get:function(){return hV}}),Object.defineProperty(exports,"wa",{enumerable:!0,get:function(){return xa}}),Object.defineProperty(exports,"wc",{enumerable:!0,get:function(){return Na}}),Object.defineProperty(exports,"wd",{enumerable:!0,get:function(){return it}}),Object.defineProperty(exports,"wi",{enumerable:!0,get:function(){return Zl}}),Object.defineProperty(exports,"wl",{enumerable:!0,get:function(){return Xa}}),Object.defineProperty(exports,"wn",{enumerable:!0,get:function(){return hO}}),Object.defineProperty(exports,"wo",{enumerable:!0,get:function(){return No}}),Object.defineProperty(exports,"wr",{enumerable:!0,get:function(){return F}}),Object.defineProperty(exports,"ws",{enumerable:!0,get:function(){return Lo}}),Object.defineProperty(exports,"wt",{enumerable:!0,get:function(){return gR}}),Object.defineProperty(exports,"wu",{enumerable:!0,get:function(){return Qa}}),Object.defineProperty(exports,"x",{enumerable:!0,get:function(){return jV}}),Object.defineProperty(exports,"xa",{enumerable:!0,get:function(){return Yi}}),Object.defineProperty(exports,"xc",{enumerable:!0,get:function(){return Aa}}),Object.defineProperty(exports,"xd",{enumerable:!0,get:function(){return Bo}}),Object.defineProperty(exports,"xf",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"xi",{enumerable:!0,get:function(){return cu}}),Object.defineProperty(exports,"xl",{enumerable:!0,get:function(){return Bs}}),Object.defineProperty(exports,"xn",{enumerable:!0,get:function(){return TO}}),Object.defineProperty(exports,"xo",{enumerable:!0,get:function(){return ai}}),Object.defineProperty(exports,"xr",{enumerable:!0,get:function(){return z}}),Object.defineProperty(exports,"xs",{enumerable:!0,get:function(){return ri}}),Object.defineProperty(exports,"xt",{enumerable:!0,get:function(){return LR}}),Object.defineProperty(exports,"xu",{enumerable:!0,get:function(){return Ar}}),Object.defineProperty(exports,"y",{enumerable:!0,get:function(){return DV}}),Object.defineProperty(exports,"ya",{enumerable:!0,get:function(){return $r}}),Object.defineProperty(exports,"yc",{enumerable:!0,get:function(){return Is}}),Object.defineProperty(exports,"yd",{enumerable:!0,get:function(){return ne}}),Object.defineProperty(exports,"yf",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"yi",{enumerable:!0,get:function(){return fu}}),Object.defineProperty(exports,"yl",{enumerable:!0,get:function(){return zo}}),Object.defineProperty(exports,"yn",{enumerable:!0,get:function(){return EO}}),Object.defineProperty(exports,"yo",{enumerable:!0,get:function(){return ma}}),Object.defineProperty(exports,"yr",{enumerable:!0,get:function(){return B}}),Object.defineProperty(exports,"ys",{enumerable:!0,get:function(){return Jn}}),Object.defineProperty(exports,"yt",{enumerable:!0,get:function(){return NR}}),Object.defineProperty(exports,"yu",{enumerable:!0,get:function(){return Ii}}),Object.defineProperty(exports,"z",{enumerable:!0,get:function(){return JB}}),Object.defineProperty(exports,"za",{enumerable:!0,get:function(){return fs}}),Object.defineProperty(exports,"zc",{enumerable:!0,get:function(){return St}}),Object.defineProperty(exports,"zd",{enumerable:!0,get:function(){return rc}}),Object.defineProperty(exports,"zi",{enumerable:!0,get:function(){return ll}}),Object.defineProperty(exports,"zl",{enumerable:!0,get:function(){return he}}),Object.defineProperty(exports,"zn",{enumerable:!0,get:function(){return TD}}),Object.defineProperty(exports,"zo",{enumerable:!0,get:function(){return Zn}}),Object.defineProperty(exports,"zr",{enumerable:!0,get:function(){return Ld}}),Object.defineProperty(exports,"zs",{enumerable:!0,get:function(){return Zi}}),Object.defineProperty(exports,"zt",{enumerable:!0,get:function(){return RL}}),Object.defineProperty(exports,"zu",{enumerable:!0,get:function(){return Wa}});