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SACA,IAAA/B,GACAvhB,EAAAijB,EAAAlB,GACAD,EAAAlQ,UAAA,CAAAgJ,IAEAf,aAAA1b,QACA0b,EAAAb,IAAA,KACAhZ,EAAAijB,EAAAM,GACAzB,EAAA3Q,OAAA,CAAAyJ,EAAA2I,MAGAvjB,EAAAijB,EAAApJ,GACAiI,EAAA3Q,OAAA,CAAAyJ,EAAAf,GACA,EAGA","sources":["webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/config/constants.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/util/middleware.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/util/timeout.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/config/enums.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/config/helpers.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/config/index.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/shared/constants.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/util/realm.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/util/url.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/auth/index.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/auth/enums.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/fr-policy/enums.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/util/strings.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/fr-policy/helpers.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/fr-policy/message-creator.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/fr-policy/index.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/fr-auth/enums.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/fr-auth/fr-login-failure.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/fr-auth/fr-login-success.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/fr-auth/callbacks/index.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/fr-auth/callbacks/attribute-input-callback.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/fr-auth/callbacks/choice-callback.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/fr-auth/callbacks/confirmation-callback.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/fr-auth/callbacks/device-profile-callback.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/fr-auth/callbacks/hidden-value-callback.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/fr-auth/callbacks/kba-create-callback.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/fr-auth/callbacks/metadata-callback.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/fr-auth/callbacks/name-callback.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/fr-auth/callbacks/password-callback.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/fr-auth/callbacks/ping-protect-evaluation-callback.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/fr-auth/callbacks/ping-protect-initialize-callback.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/fr-auth/callbacks/polling-wait-callback.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/fr-auth/callbacks/recaptcha-callback.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/fr-auth/callbacks/redirect-callback.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/fr-auth/callbacks/select-idp-callback.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/fr-auth/callbacks/text-output-callback.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/fr-auth/callbacks/suspended-text-output-callback.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/fr-auth/callbacks/terms-and-conditions-callback.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/fr-auth/callbacks/text-input-callback.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/fr-auth/callbacks/validated-create-password-callback.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/fr-auth/callbacks/validated-create-username-callback.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/fr-auth/callbacks/factory.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/fr-auth/fr-step.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/fr-auth/index.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/fr-device/defaults.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/fr-device/collector.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/util/logger.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/fr-device/index.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/fr-qr-code/index.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/fr-recovery-codes/index.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/token-storage/local-storage.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/token-storage/session-storage.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/token-storage/index.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/oauth2-client/index.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/session-manager/index.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/oauth2-client/enums.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/token-manager/index.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/fr-user/index.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/fr-webauthn/enums.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/fr-webauthn/helpers.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/fr-webauthn/script-parser.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/fr-webauthn/index.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/http-client/helpers.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/http-client/index.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/user-manager/index.js","webpack://_N_E/../../node_modules/@forgerock/javascript-sdk/src/index.js","webpack://_N_E/../../node_modules/jotai/esm/react.mjs","webpack://_N_E/../../node_modules/jotai/esm/vanilla.mjs","webpack://_N_E/../../node_modules/jotai/esm/vanilla/utils.mjs"],"sourcesContent":["const T = 5e3, E = 3e4, o = \"FR-SDK\";\nexport {\n E as DEFAULT_OAUTH_THRESHOLD,\n T as DEFAULT_TIMEOUT,\n o as PREFIX\n};\n","function f(t, { type: a, payload: o }) {\n const i = Object.freeze({ type: a, payload: o });\n return (e) => {\n if (!Array.isArray(e))\n return t;\n const c = e.map((r) => r);\n function n() {\n const r = c.shift();\n return r && r(t, i, n), t;\n }\n return n();\n };\n}\nexport {\n f as default\n};\n","import { DEFAULT_TIMEOUT as e } from \"../config/constants.js\";\nfunction T(t, o = e) {\n const i = o || e, r = new Promise(\n (n, m) => setTimeout(() => m(new Error(\"Timeout\")), i)\n );\n return Promise.race([t, r]);\n}\nexport {\n T as withTimeout\n};\n","var e = /* @__PURE__ */ ((E) => (E.Authenticate = \"AUTHENTICATE\", E.Authorize = \"AUTHORIZE\", E.EndSession = \"END_SESSION\", E.Logout = \"LOGOUT\", E.ExchangeToken = \"EXCHANGE_TOKEN\", E.RefreshToken = \"REFRESH_TOKEN\", E.ResumeAuthenticate = \"RESUME_AUTHENTICATE\", E.RevokeToken = \"REVOKE_TOKEN\", E.StartAuthenticate = \"START_AUTHENTICATE\", E.UserInfo = \"USER_INFO\", E.WellKnown = \"WELL_KNOWN\", E))(e || {});\nexport {\n e as ActionTypes\n};\n","import u from \"../util/middleware.js\";\nimport { withTimeout as w } from \"../util/timeout.js\";\nimport { ActionTypes as h } from \"./enums.js\";\nfunction d(e, n) {\n var o, l;\n if (!e.authorization_endpoint)\n throw new Error(\"Wellknown endpoint did not return `authorization_endpoint`\");\n const s = new URL(e.authorization_endpoint).origin;\n let t, r;\n n != null && n.paths ? (t = (o = n == null ? void 0 : n.paths) == null ? void 0 : o.authenticate, r = (l = n == null ? void 0 : n.paths) == null ? void 0 : l.sessions) : e.issuer.includes(\"/am/\") ? (t = `${e.issuer.replace(\"oauth2\", \"json\")}/authenticate`, r = `${e.issuer.replace(\"oauth2\", \"json\")}/sessions`) : e.issuer.includes(\"/as/\");\n const a = {\n ...t ? { authenticate: new URL(t).pathname } : {},\n authorize: new URL(e.authorization_endpoint).pathname,\n accessToken: new URL(e.token_endpoint).pathname,\n endSession: new URL(e.end_session_endpoint).pathname,\n userInfo: new URL(e.userinfo_endpoint).pathname,\n revoke: new URL(e.revocation_endpoint).pathname,\n ...r ? { sessions: new URL(r).pathname } : {}\n };\n return {\n baseUrl: s,\n paths: a\n };\n}\nasync function p(e) {\n var r;\n if (!e.serverConfig.wellknown)\n throw new Error(\"wellknown URL is missing in options\");\n const i = u(\n {\n url: new URL((r = e.serverConfig) == null ? void 0 : r.wellknown),\n init: { method: \"GET\" }\n },\n {\n type: h.WellKnown,\n payload: {}\n }\n )(e.middleware);\n return await (await w(fetch(i.url.toString(), i.init), e.serverConfig.timeout)).json();\n}\nexport {\n d as convertWellKnown,\n p as fetchWellKnown\n};\n","import { DEFAULT_TIMEOUT as o, DEFAULT_OAUTH_THRESHOLD as s, PREFIX as l } from \"./constants.js\";\nimport { fetchWellKnown as a, convertWellKnown as f } from \"./helpers.js\";\nfunction w(n) {\n return {\n ...n,\n oauthThreshold: n.oauthThreshold || s,\n logLevel: n.logLevel || \"none\",\n platformHeader: n.platformHeader || !1,\n prefix: n.prefix || l\n };\n}\nclass c {\n /**\n * Sets the default options.\n *\n * @param options The options to use as defaults\n */\n static set(e) {\n if (!this.isValid(e))\n throw new Error(\"Configuration is invalid\");\n e.serverConfig && this.validateServerConfig(e.serverConfig), this.options = { ...w(e) };\n }\n /**\n * @method setAsync - Asynchronously calls the WellKnown endpoint to collect the APIs for OAuth\n * @param {AsyncConfigOptions} options - config options with wellknown endpoint URL\n * @returns {Promise} - Returns a success or failure message object\n */\n static async setAsync(e) {\n if (!e.serverConfig.wellknown)\n throw new Error(\n \"Missing well-known property. Use `Config.set` method if not using well-known endpoint.\"\n );\n e.serverConfig.baseUrl && console.warn(\n \"The baseUrl property passed in will be ignored, and replaced with well-known origin.\"\n );\n const r = await a(e), i = f(r);\n delete e.serverConfig.wellknown;\n const t = e;\n t.serverConfig = i, this.set(t);\n }\n /**\n * Merges the provided options with the default options. Ensures a server configuration exists.\n *\n * @param options The options to merge with defaults\n */\n static get(e) {\n if (!this.options && !e)\n throw new Error(\"Configuration has not been set\");\n const r = { ...this.options, ...e };\n if (!r.serverConfig || !r.serverConfig.baseUrl)\n throw new Error(\"Server configuration has not been set\");\n return r;\n }\n static isValid(e) {\n return !!(e && e.serverConfig);\n }\n static validateServerConfig(e) {\n e.timeout || (e.timeout = o);\n const r = e.baseUrl;\n r && r.charAt(r.length - 1) !== \"/\" && (e.baseUrl = r + \"/\");\n }\n}\nexport {\n c as default\n};\n","const E = \"forgerock-sdk\", o = \"javascript\";\nexport {\n E as REQUESTED_WITH,\n o as X_REQUESTED_PLATFORM\n};\n","function n(o) {\n const r = (o || \"\").split(\"/\").map((t) => t.trim()).filter((t) => t !== \"\");\n return r[0] !== \"root\" && r.unshift(\"root\"), r.map((t) => `realms/${t}`).join(\"/\");\n}\nexport {\n n as getRealmUrlPath\n};\n","import { getRealmUrlPath as c } from \"./realm.js\";\nfunction r(t) {\n const o = t.protocol === \"http:\" && [\"\", \"80\"].indexOf(t.port) === -1 || t.protocol === \"https:\" && [\"\", \"443\"].indexOf(t.port) === -1 ? `:${t.port}` : \"\";\n return `${t.protocol}//${t.hostname}${o}`;\n}\nfunction h(t, e, o) {\n const n = c(e), s = {\n authenticate: `json/${n}/authenticate`,\n authorize: `oauth2/${n}/authorize`,\n accessToken: `oauth2/${n}/access_token`,\n endSession: `oauth2/${n}/connect/endSession`,\n userInfo: `oauth2/${n}/userinfo`,\n revoke: `oauth2/${n}/token/revoke`,\n sessions: `json/${n}/sessions/`\n };\n return o && o[t] ? o[t] : s[t];\n}\nfunction f(t, e) {\n const o = new URL(t);\n if (e.startsWith(\"/\"))\n return `${r(o)}${e}`;\n const n = o.pathname.split(\"/\"), s = e.split(\"/\").filter((i) => !!i), a = [...n.slice(0, -1), ...s].join(\"/\");\n return `${r(o)}${a}`;\n}\nfunction p(t) {\n const e = new URL(t), o = {};\n return e.searchParams.forEach((n, s) => o[s] = n), o;\n}\nfunction $(t) {\n const e = [];\n for (const o in t)\n t[o] && e.push(o + \"=\" + encodeURIComponent(t[o]));\n return e.join(\"&\");\n}\nexport {\n r as getBaseUrl,\n h as getEndpointPath,\n p as parseQuery,\n f as resolve,\n $ as stringify\n};\n","import m from \"../config/index.js\";\nimport { ActionTypes as l } from \"../config/enums.js\";\nimport { X_REQUESTED_PLATFORM as c, REQUESTED_WITH as f } from \"../shared/constants.js\";\nimport { withTimeout as y } from \"../util/timeout.js\";\nimport { stringify as g, getEndpointPath as R, resolve as q } from \"../util/url.js\";\nimport P from \"../util/middleware.js\";\nclass J {\n /**\n * Gets the next step in the authentication tree.\n *\n * @param {Step} previousStep The previous step, including any required input.\n * @param {StepOptions} options Configuration default overrides.\n * @return {Step} The next step in the authentication tree.\n */\n static async next(t, e) {\n const { middleware: r, platformHeader: n, realmPath: u, serverConfig: i, tree: o, type: a } = m.get(e), d = e ? e.query : {}, p = this.constructUrl(i, u, o, d), s = P(\n {\n url: new URL(p),\n init: this.configureRequest(t)\n },\n {\n type: t ? l.Authenticate : l.StartAuthenticate,\n payload: {\n tree: o,\n type: a || \"service\"\n }\n }\n )(r);\n n && (s.init.headers instanceof Headers ? s.init.headers.set(\"X-Requested-Platform\", c) : Array.isArray(s.init.headers) ? s.init.headers.push([\"X-Requested-Platform\", c]) : s.init.headers ? s.init.headers[\"X-Requested-Platform\"] = c : s.init.headers = {\n \"X-Requested-Platform\": c\n });\n const h = await y(fetch(s.url.toString(), s.init), i.timeout);\n return await this.getResponseJson(h);\n }\n static constructUrl(t, e, r, n) {\n const i = { ...n, ...r ? { authIndexType: \"service\", authIndexValue: r } : void 0 }, o = Object.keys(i).length > 0 ? `?${g(i)}` : \"\", a = R(\"authenticate\", e, t.paths);\n return q(t.baseUrl, `${a}${o}`);\n }\n static configureRequest(t) {\n return {\n body: t ? JSON.stringify(t) : void 0,\n credentials: \"include\",\n headers: new Headers({\n Accept: \"application/json\",\n \"Accept-API-Version\": \"protocol=1.0,resource=2.1\",\n \"Content-Type\": \"application/json\",\n \"X-Requested-With\": f\n }),\n method: \"POST\"\n };\n }\n static async getResponseJson(t) {\n const e = t.headers.get(\"content-type\"), n = e && e.indexOf(\"application/json\") > -1 ? await t.json() : {};\n return n.status = t.status, n.ok = t.ok, n;\n }\n}\nexport {\n J as default\n};\n","var t = /* @__PURE__ */ ((a) => (a.BadRequest = \"BAD_REQUEST\", a.Timeout = \"TIMEOUT\", a.Unauthorized = \"UNAUTHORIZED\", a.Unknown = \"UNKNOWN\", a))(t || {}), l = /* @__PURE__ */ ((a) => (a.BooleanAttributeInputCallback = \"BooleanAttributeInputCallback\", a.ChoiceCallback = \"ChoiceCallback\", a.ConfirmationCallback = \"ConfirmationCallback\", a.DeviceProfileCallback = \"DeviceProfileCallback\", a.HiddenValueCallback = \"HiddenValueCallback\", a.KbaCreateCallback = \"KbaCreateCallback\", a.MetadataCallback = \"MetadataCallback\", a.NameCallback = \"NameCallback\", a.NumberAttributeInputCallback = \"NumberAttributeInputCallback\", a.PasswordCallback = \"PasswordCallback\", a.PingOneProtectEvaluationCallback = \"PingOneProtectEvaluationCallback\", a.PingOneProtectInitializeCallback = \"PingOneProtectInitializeCallback\", a.PollingWaitCallback = \"PollingWaitCallback\", a.ReCaptchaCallback = \"ReCaptchaCallback\", a.RedirectCallback = \"RedirectCallback\", a.SelectIdPCallback = \"SelectIdPCallback\", a.StringAttributeInputCallback = \"StringAttributeInputCallback\", a.SuspendedTextOutputCallback = \"SuspendedTextOutputCallback\", a.TermsAndConditionsCallback = \"TermsAndConditionsCallback\", a.TextInputCallback = \"TextInputCallback\", a.TextOutputCallback = \"TextOutputCallback\", a.ValidatedCreatePasswordCallback = \"ValidatedCreatePasswordCallback\", a.ValidatedCreateUsernameCallback = \"ValidatedCreateUsernameCallback\", a))(l || {});\nexport {\n l as CallbackType,\n t as ErrorCode\n};\n","var _ = /* @__PURE__ */ ((A) => (A.CannotContainCharacters = \"CANNOT_CONTAIN_CHARACTERS\", A.CannotContainDuplicates = \"CANNOT_CONTAIN_DUPLICATES\", A.CannotContainOthers = \"CANNOT_CONTAIN_OTHERS\", A.LeastCapitalLetters = \"AT_LEAST_X_CAPITAL_LETTERS\", A.LeastNumbers = \"AT_LEAST_X_NUMBERS\", A.MatchRegexp = \"MATCH_REGEXP\", A.MaximumLength = \"MAX_LENGTH\", A.MaximumNumber = \"MAXIMUM_NUMBER_VALUE\", A.MinimumLength = \"MIN_LENGTH\", A.MinimumNumber = \"MINIMUM_NUMBER_VALUE\", A.Required = \"REQUIRED\", A.Unique = \"UNIQUE\", A.UnknownPolicy = \"UNKNOWN_POLICY\", A.ValidArrayItems = \"VALID_ARRAY_ITEMS\", A.ValidDate = \"VALID_DATE\", A.ValidEmailAddress = \"VALID_EMAIL_ADDRESS_FORMAT\", A.ValidNameFormat = \"VALID_NAME_FORMAT\", A.ValidNumber = \"VALID_NUMBER\", A.ValidPhoneFormat = \"VALID_PHONE_FORMAT\", A.ValidQueryFilter = \"VALID_QUERY_FILTER\", A.ValidType = \"VALID_TYPE\", A))(_ || {});\nexport {\n _ as PolicyKey\n};\n","function f(o, r, n) {\n return o === 1 ? r : n !== void 0 ? n : r + \"s\";\n}\nexport {\n f as plural\n};\n","function n(r, t, e) {\n return !r || r[t] === void 0 ? e : r[t];\n}\nexport {\n n as getProp\n};\n","import { plural as r } from \"../util/strings.js\";\nimport { PolicyKey as e } from \"./enums.js\";\nimport { getProp as i } from \"./helpers.js\";\nconst u = {\n [e.CannotContainCharacters]: (a, n) => {\n const t = i(n, \"forbiddenChars\", \"\");\n return `${a} must not contain following characters: \"${t}\"`;\n },\n [e.CannotContainDuplicates]: (a, n) => {\n const t = i(n, \"duplicateValue\", \"\");\n return `${a} must not contain duplicates: \"${t}\"`;\n },\n [e.CannotContainOthers]: (a, n) => {\n const t = i(n, \"disallowedFields\", \"\");\n return `${a} must not contain: \"${t}\"`;\n },\n [e.LeastCapitalLetters]: (a, n) => {\n const t = i(n, \"numCaps\", 0);\n return `${a} must contain at least ${t} capital ${r(t, \"letter\")}`;\n },\n [e.LeastNumbers]: (a, n) => {\n const t = i(n, \"numNums\", 0);\n return `${a} must contain at least ${t} numeric ${r(t, \"value\")}`;\n },\n [e.MatchRegexp]: (a) => `${a} has failed the \"MATCH_REGEXP\" policy`,\n [e.MaximumLength]: (a, n) => {\n const t = i(n, \"maxLength\", 0);\n return `${a} must be at most ${t} ${r(t, \"character\")}`;\n },\n [e.MaximumNumber]: (a) => `${a} has failed the \"MAXIMUM_NUMBER_VALUE\" policy`,\n [e.MinimumLength]: (a, n) => {\n const t = i(n, \"minLength\", 0);\n return `${a} must be at least ${t} ${r(t, \"character\")}`;\n },\n [e.MinimumNumber]: (a) => `${a} has failed the \"MINIMUM_NUMBER_VALUE\" policy`,\n [e.Required]: (a) => `${a} is required`,\n [e.Unique]: (a) => `${a} must be unique`,\n [e.UnknownPolicy]: (a, n) => {\n const t = i(n, \"policyRequirement\", \"Unknown\");\n return `${a}: Unknown policy requirement \"${t}\"`;\n },\n [e.ValidArrayItems]: (a) => `${a} has failed the \"VALID_ARRAY_ITEMS\" policy`,\n [e.ValidDate]: (a) => `${a} has an invalid date`,\n [e.ValidEmailAddress]: (a) => `${a} has an invalid email address`,\n [e.ValidNameFormat]: (a) => `${a} has an invalid name format`,\n [e.ValidNumber]: (a) => `${a} has an invalid number`,\n [e.ValidPhoneFormat]: (a) => `${a} has an invalid phone number`,\n [e.ValidQueryFilter]: (a) => `${a} has failed the \"VALID_QUERY_FILTER\" policy`,\n [e.ValidType]: (a) => `${a} has failed the \"VALID_TYPE\" policy`\n};\nexport {\n u as default\n};\n","import { PolicyKey as n } from \"./enums.js\";\nimport i from \"./message-creator.js\";\nclass y {\n /**\n * Parses policy errors and generates human readable error messages.\n *\n * @param {Step} err The step containing the error.\n * @param {MessageCreator} messageCreator\n * Extensible and overridable custom error messages for policy failures.\n * @return {ProcessedPropertyError[]} Array of objects containing all processed policy errors.\n */\n static parseErrors(e, r) {\n const s = [];\n return e.detail && e.detail.failedPolicyRequirements && e.detail.failedPolicyRequirements.map((t) => {\n s.push.apply(s, [\n {\n detail: t,\n messages: this.parseFailedPolicyRequirement(t, r)\n }\n ]);\n }), s;\n }\n /**\n * Parses a failed policy and returns a string array of error messages.\n *\n * @param {FailedPolicyRequirement} failedPolicy The detail data of the failed policy.\n * @param {MessageCreator} customMessage\n * Extensible and overridable custom error messages for policy failures.\n * @return {string[]} Array of strings with all processed policy errors.\n */\n static parseFailedPolicyRequirement(e, r) {\n const s = [];\n return e.policyRequirements.map((t) => {\n s.push(\n this.parsePolicyRequirement(e.property, t, r)\n );\n }), s;\n }\n /**\n * Parses a policy error into a human readable error message.\n *\n * @param {string} property The property with the policy failure.\n * @param {PolicyRequirement} policy The policy failure data.\n * @param {MessageCreator} customMessage\n * Extensible and overridable custom error messages for policy failures.\n * @return {string} Human readable error message.\n */\n static parsePolicyRequirement(e, r, s = {}) {\n const t = typeof r == \"string\" ? JSON.parse(r) : { ...r }, a = t.policyRequirement, o = s[a] || i[a] || i[n.UnknownPolicy], c = t.params ? { ...t.params, policyRequirement: a } : { policyRequirement: a };\n return o(e, c);\n }\n}\nexport {\n n as PolicyKey,\n y as default\n};\n","var r = /* @__PURE__ */ ((i) => (i.LoginFailure = \"LoginFailure\", i.LoginSuccess = \"LoginSuccess\", i.Step = \"Step\", i))(r || {});\nexport {\n r as StepType\n};\n","import t from \"../fr-policy/index.js\";\nimport { StepType as r } from \"./enums.js\";\nclass i {\n /**\n * @param payload The raw payload returned by OpenAM\n */\n constructor(e) {\n this.payload = e, this.type = r.LoginFailure;\n }\n /**\n * Gets the error code.\n */\n getCode() {\n return Number(this.payload.code);\n }\n /**\n * Gets the failure details.\n */\n getDetail() {\n return this.payload.detail;\n }\n /**\n * Gets the failure message.\n */\n getMessage() {\n return this.payload.message;\n }\n /**\n * Gets processed failure message.\n */\n getProcessedMessage(e) {\n return t.parseErrors(this.payload, e);\n }\n /**\n * Gets the failure reason.\n */\n getReason() {\n return this.payload.reason;\n }\n}\nexport {\n i as default\n};\n","import { StepType as s } from \"./enums.js\";\nclass r {\n /**\n * @param payload The raw payload returned by OpenAM\n */\n constructor(e) {\n this.payload = e, this.type = s.LoginSuccess;\n }\n /**\n * Gets the step's realm.\n */\n getRealm() {\n return this.payload.realm;\n }\n /**\n * Gets the step's session token.\n */\n getSessionToken() {\n return this.payload.tokenId;\n }\n /**\n * Gets the step's success URL.\n */\n getSuccessUrl() {\n return this.payload.successUrl;\n }\n}\nexport {\n r as default\n};\n","class r {\n /**\n * @param payload The raw payload returned by OpenAM\n */\n constructor(e) {\n this.payload = e;\n }\n /**\n * Gets the name of this callback type.\n */\n getType() {\n return this.payload.type;\n }\n /**\n * Gets the value of the specified input element, or the first element if `selector` is not\n * provided.\n *\n * @param selector The index position or name of the desired element\n */\n getInputValue(e = 0) {\n return this.getArrayElement(this.payload.input, e).value;\n }\n /**\n * Sets the value of the specified input element, or the first element if `selector` is not\n * provided.\n *\n * @param selector The index position or name of the desired element\n */\n setInputValue(e, t = 0) {\n this.getArrayElement(this.payload.input, t).value = e;\n }\n /**\n * Gets the value of the specified output element, or the first element if `selector`\n * is not provided.\n *\n * @param selector The index position or name of the desired element\n */\n getOutputValue(e = 0) {\n return this.getArrayElement(this.payload.output, e).value;\n }\n /**\n * Gets the value of the first output element with the specified name or the\n * specified default value.\n *\n * @param name The name of the desired element\n */\n getOutputByName(e, t) {\n const n = this.payload.output.find((a) => a.name === e);\n return n ? n.value : t;\n }\n getArrayElement(e, t = 0) {\n if (e === void 0)\n throw new Error(`No NameValue array was provided to search (selector ${t})`);\n if (typeof t == \"number\") {\n if (t < 0 || t > e.length - 1)\n throw new Error(`Selector index ${t} is out of range`);\n return e[t];\n }\n if (typeof t == \"string\") {\n const n = e.find((a) => a.name === t);\n if (!n)\n throw new Error(`Missing callback input entry \"${t}\"`);\n return n;\n }\n if (typeof t == \"object\" && t.test && t.exec) {\n const n = e.find((a) => t.test(a.name));\n if (!n)\n throw new Error(`Missing callback input entry \"${t}\"`);\n return n;\n }\n throw new Error(\"Invalid selector value type\");\n }\n}\nexport {\n r as default\n};\n","import r from \"./index.js\";\nclass s extends r {\n /**\n * @param payload The raw payload returned by OpenAM\n */\n constructor(e) {\n super(e), this.payload = e;\n }\n /**\n * Gets the attribute name.\n */\n getName() {\n return this.getOutputByName(\"name\", \"\");\n }\n /**\n * Gets the attribute prompt.\n */\n getPrompt() {\n return this.getOutputByName(\"prompt\", \"\");\n }\n /**\n * Gets whether the attribute is required.\n */\n isRequired() {\n return this.getOutputByName(\"required\", !1);\n }\n /**\n * Gets the callback's failed policies.\n */\n getFailedPolicies() {\n const e = this.getOutputByName(\n \"failedPolicies\",\n []\n );\n try {\n return e.map((t) => JSON.parse(t));\n } catch {\n throw new Error(\n 'Unable to parse \"failed policies\" from the ForgeRock server. The JSON within `AttributeInputCallback` was either malformed or missing.'\n );\n }\n }\n /**\n * Gets the callback's applicable policies.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n getPolicies() {\n return this.getOutputByName(\"policies\", {});\n }\n /**\n * Set if validating value only.\n */\n setValidateOnly(e) {\n this.setInputValue(e, /validateOnly/);\n }\n /**\n * Sets the attribute's value.\n */\n setValue(e) {\n this.setInputValue(e);\n }\n}\nexport {\n s as default\n};\n","import o from \"./index.js\";\nclass h extends o {\n /**\n * @param payload The raw payload returned by OpenAM\n */\n constructor(t) {\n super(t), this.payload = t;\n }\n /**\n * Gets the choice's prompt.\n */\n getPrompt() {\n return this.getOutputByName(\"prompt\", \"\");\n }\n /**\n * Gets the choice's default answer.\n */\n getDefaultChoice() {\n return this.getOutputByName(\"defaultChoice\", 0);\n }\n /**\n * Gets the choice's possible answers.\n */\n getChoices() {\n return this.getOutputByName(\"choices\", []);\n }\n /**\n * Sets the choice's answer by index position.\n */\n setChoiceIndex(t) {\n const e = this.getChoices().length;\n if (t < 0 || t > e - 1)\n throw new Error(`${t} is out of bounds`);\n this.setInputValue(t);\n }\n /**\n * Sets the choice's answer by value.\n */\n setChoiceValue(t) {\n const e = this.getChoices().indexOf(t);\n if (e === -1)\n throw new Error(`\"${t}\" is not a valid choice`);\n this.setInputValue(e);\n }\n}\nexport {\n h as default\n};\n","import r from \"./index.js\";\nclass i extends r {\n /**\n * @param payload The raw payload returned by OpenAM\n */\n constructor(t) {\n super(t), this.payload = t;\n }\n /**\n * Gets the index position of the confirmation's default answer.\n */\n getDefaultOption() {\n return Number(this.getOutputByName(\"defaultOption\", 0));\n }\n /**\n * Gets the confirmation's message type.\n */\n getMessageType() {\n return Number(this.getOutputByName(\"messageType\", 0));\n }\n /**\n * Gets the confirmation's possible answers.\n */\n getOptions() {\n return this.getOutputByName(\"options\", []);\n }\n /**\n * Gets the confirmation's option type.\n */\n getOptionType() {\n return Number(this.getOutputByName(\"optionType\", 0));\n }\n /**\n * Gets the confirmation's prompt.\n */\n getPrompt() {\n return this.getOutputByName(\"prompt\", \"\");\n }\n /**\n * Set option index.\n */\n setOptionIndex(t) {\n if (t !== 0 && t !== 1)\n throw new Error(`\"${t}\" is not a valid choice`);\n this.setInputValue(t);\n }\n /**\n * Set option value.\n */\n setOptionValue(t) {\n const e = this.getOptions().indexOf(t);\n if (e === -1)\n throw new Error(`\"${t}\" is not a valid choice`);\n this.setInputValue(e);\n }\n}\nexport {\n i as default\n};\n","import t from \"./index.js\";\nclass i extends t {\n /**\n * @param payload The raw payload returned by OpenAM\n */\n constructor(e) {\n super(e), this.payload = e;\n }\n /**\n * Gets the callback's data.\n */\n getMessage() {\n return this.getOutputByName(\"message\", \"\");\n }\n /**\n * Does callback require metadata?\n */\n isMetadataRequired() {\n return this.getOutputByName(\"metadata\", !1);\n }\n /**\n * Does callback require location data?\n */\n isLocationRequired() {\n return this.getOutputByName(\"location\", !1);\n }\n /**\n * Sets the profile.\n */\n setProfile(e) {\n this.setInputValue(JSON.stringify(e));\n }\n}\nexport {\n i as default\n};\n","import e from \"./index.js\";\nclass t extends e {\n /**\n * @param payload The raw payload returned by OpenAM\n */\n constructor(a) {\n super(a), this.payload = a;\n }\n}\nexport {\n t as default\n};\n","import n from \"./index.js\";\nclass u extends n {\n /**\n * @param payload The raw payload returned by OpenAM\n */\n constructor(t) {\n super(t), this.payload = t;\n }\n /**\n * Gets the callback prompt.\n */\n getPrompt() {\n return this.getOutputByName(\"prompt\", \"\");\n }\n /**\n * Gets the callback's list of pre-defined security questions.\n */\n getPredefinedQuestions() {\n return this.getOutputByName(\"predefinedQuestions\", []);\n }\n /**\n * Sets the callback's security question.\n */\n setQuestion(t) {\n this.setValue(\"question\", t);\n }\n /**\n * Sets the callback's security question answer.\n */\n setAnswer(t) {\n this.setValue(\"answer\", t);\n }\n setValue(t, s) {\n if (!this.payload.input)\n throw new Error(\"KBA payload is missing input\");\n const e = this.payload.input.find((i) => i.name.endsWith(t));\n if (!e)\n throw new Error(`No input has name ending in \"${t}\"`);\n e.value = s;\n }\n}\nexport {\n u as default\n};\n","import a from \"./index.js\";\nclass s extends a {\n /**\n * @param payload The raw payload returned by OpenAM\n */\n constructor(t) {\n super(t), this.payload = t;\n }\n /**\n * Gets the callback's data.\n */\n getData() {\n return this.getOutputByName(\"data\", {});\n }\n}\nexport {\n s as default\n};\n","import e from \"./index.js\";\nclass r extends e {\n /**\n * @param payload The raw payload returned by OpenAM\n */\n constructor(t) {\n super(t), this.payload = t;\n }\n /**\n * Gets the callback's prompt.\n */\n getPrompt() {\n return this.getOutputByName(\"prompt\", \"\");\n }\n /**\n * Sets the username.\n */\n setName(t) {\n this.setInputValue(t);\n }\n}\nexport {\n r as default\n};\n","import e from \"./index.js\";\nclass r extends e {\n /**\n * @param payload The raw payload returned by OpenAM\n */\n constructor(t) {\n super(t), this.payload = t;\n }\n /**\n * Gets the callback's failed policies.\n */\n getFailedPolicies() {\n return this.getOutputByName(\"failedPolicies\", []);\n }\n /**\n * Gets the callback's applicable policies.\n */\n getPolicies() {\n return this.getOutputByName(\"policies\", []);\n }\n /**\n * Gets the callback's prompt.\n */\n getPrompt() {\n return this.getOutputByName(\"prompt\", \"\");\n }\n /**\n * Sets the password.\n */\n setPassword(t) {\n this.setInputValue(t);\n }\n}\nexport {\n r as default\n};\n","import a from \"./index.js\";\nclass r extends a {\n /**\n * @param payload The raw payload returned by OpenAM\n */\n constructor(t) {\n super(t), this.payload = t;\n }\n /**\n * Gets the callback's pauseBehavioralData value.\n * @returns {boolean}\n */\n getPauseBehavioralData() {\n return this.getOutputByName(\"pauseBehavioralData\", !1);\n }\n /**\n * @method setData - Set the result of data collection\n * @param {string} data - Data from calling pingProtect.get()\n * @returns {void}\n */\n setData(t) {\n this.setInputValue(t, /signals/);\n }\n /**\n * @method setClientError - Set the client error message\n * @param {string} errorMessage - Error message\n * @returns {void}\n */\n setClientError(t) {\n this.setInputValue(t, /clientError/);\n }\n}\nexport {\n r as default\n};\n","import e from \"./index.js\";\nclass i extends e {\n /**\n * @param payload The raw payload returned by OpenAM\n */\n constructor(t) {\n super(t), this.payload = t;\n }\n /**\n * Get callback's initialization config settings\n */\n getConfig() {\n return {\n envId: this.getOutputByName(\"envId\", \"\"),\n consoleLogEnabled: this.getOutputByName(\"consoleLogEnabled\", !1),\n deviceAttributesToIgnore: this.getOutputByName(\"deviceAttributesToIgnore\", []),\n customHost: this.getOutputByName(\"customHost\", \"\"),\n lazyMetadata: this.getOutputByName(\"lazyMetadata\", !1),\n behavioralDataCollection: this.getOutputByName(\"behavioralDataCollection\", !0),\n deviceKeyRsyncIntervals: this.getOutputByName(\"deviceKeyRsyncIntervals\", 14),\n enableTrust: this.getOutputByName(\"enableTrust\", !1),\n disableTags: this.getOutputByName(\"disableTags\", !1),\n disableHub: this.getOutputByName(\"disableHub\", !1)\n };\n }\n setClientError(t) {\n this.setInputValue(t, /clientError/);\n }\n}\nexport {\n i as default\n};\n","import e from \"./index.js\";\nclass r extends e {\n /**\n * @param payload The raw payload returned by OpenAM\n */\n constructor(t) {\n super(t), this.payload = t;\n }\n /**\n * Gets the message to display while polling.\n */\n getMessage() {\n return this.getOutputByName(\"message\", \"\");\n }\n /**\n * Gets the polling interval in milliseconds.\n */\n getWaitTime() {\n return Number(this.getOutputByName(\"waitTime\", 0));\n }\n}\nexport {\n r as default\n};\n","import e from \"./index.js\";\nclass r extends e {\n /**\n * @param payload The raw payload returned by OpenAM\n */\n constructor(t) {\n super(t), this.payload = t;\n }\n /**\n * Gets the reCAPTCHA site key.\n */\n getSiteKey() {\n return this.getOutputByName(\"recaptchaSiteKey\", \"\");\n }\n /**\n * Sets the reCAPTCHA result.\n */\n setResult(t) {\n this.setInputValue(t);\n }\n}\nexport {\n r as default\n};\n","import e from \"./index.js\";\nclass c extends e {\n /**\n * @param payload The raw payload returned by OpenAM\n */\n constructor(t) {\n super(t), this.payload = t;\n }\n /**\n * Gets the redirect URL.\n */\n getRedirectUrl() {\n return this.getOutputByName(\"redirectUrl\", \"\");\n }\n}\nexport {\n c as default\n};\n","import i from \"./index.js\";\nclass d extends i {\n /**\n * @param payload The raw payload returned by OpenAM\n */\n constructor(r) {\n super(r), this.payload = r;\n }\n /**\n * Gets the available providers.\n */\n getProviders() {\n return this.getOutputByName(\"providers\", []);\n }\n /**\n * Sets the provider by name.\n */\n setProvider(r) {\n const t = this.getProviders().find((e) => e.provider === r);\n if (!t)\n throw new Error(`\"${r}\" is not a valid choice`);\n this.setInputValue(t.provider);\n }\n}\nexport {\n d as default\n};\n","import t from \"./index.js\";\nclass u extends t {\n /**\n * @param payload The raw payload returned by OpenAM\n */\n constructor(e) {\n super(e), this.payload = e;\n }\n /**\n * Gets the message content.\n */\n getMessage() {\n return this.getOutputByName(\"message\", \"\");\n }\n /**\n * Gets the message type.\n */\n getMessageType() {\n return this.getOutputByName(\"messageType\", \"\");\n }\n}\nexport {\n u as default\n};\n","import e from \"./text-output-callback.js\";\nclass a extends e {\n /**\n * @param payload The raw payload returned by OpenAM\n */\n constructor(t) {\n super(t), this.payload = t;\n }\n}\nexport {\n a as default\n};\n","import e from \"./index.js\";\nclass a extends e {\n /**\n * @param payload The raw payload returned by OpenAM\n */\n constructor(t) {\n super(t), this.payload = t;\n }\n /**\n * Gets the terms and conditions content.\n */\n getTerms() {\n return this.getOutputByName(\"terms\", \"\");\n }\n /**\n * Gets the version of the terms and conditions.\n */\n getVersion() {\n return this.getOutputByName(\"version\", \"\");\n }\n /**\n * Gets the date of the terms and conditions.\n */\n getCreateDate() {\n const t = this.getOutputByName(\"createDate\", \"\");\n return new Date(t);\n }\n /**\n * Sets the callback's acceptance.\n */\n setAccepted(t = !0) {\n this.setInputValue(t);\n }\n}\nexport {\n a as default\n};\n","import e from \"./index.js\";\nclass r extends e {\n /**\n * @param payload The raw payload returned by OpenAM\n */\n constructor(t) {\n super(t), this.payload = t;\n }\n /**\n * Gets the callback's prompt.\n */\n getPrompt() {\n return this.getOutputByName(\"prompt\", \"\");\n }\n /**\n * Sets the callback's input value.\n */\n setInput(t) {\n this.setInputValue(t);\n }\n}\nexport {\n r as default\n};\n","import a from \"./index.js\";\nclass i extends a {\n /**\n * @param payload The raw payload returned by OpenAM\n */\n constructor(e) {\n super(e), this.payload = e;\n }\n /**\n * Gets the callback's failed policies.\n */\n getFailedPolicies() {\n const e = this.getOutputByName(\n \"failedPolicies\",\n []\n );\n try {\n return e.map((t) => JSON.parse(t));\n } catch {\n throw new Error(\n 'Unable to parse \"failed policies\" from the ForgeRock server. The JSON within `ValidatedCreatePasswordCallback` was either malformed or missing.'\n );\n }\n }\n /**\n * Gets the callback's applicable policies.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n getPolicies() {\n return this.getOutputByName(\"policies\", {});\n }\n /**\n * Gets the callback's prompt.\n */\n getPrompt() {\n return this.getOutputByName(\"prompt\", \"\");\n }\n /**\n * Gets whether the password is required.\n */\n isRequired() {\n return this.getOutputByName(\"required\", !1);\n }\n /**\n * Sets the callback's password.\n */\n setPassword(e) {\n this.setInputValue(e);\n }\n /**\n * Set if validating value only.\n */\n setValidateOnly(e) {\n this.setInputValue(e, /validateOnly/);\n }\n}\nexport {\n i as default\n};\n","import a from \"./index.js\";\nclass s extends a {\n /**\n * @param payload The raw payload returned by OpenAM\n */\n constructor(e) {\n super(e), this.payload = e;\n }\n /**\n * Gets the callback's prompt.\n */\n getPrompt() {\n return this.getOutputByName(\"prompt\", \"\");\n }\n /**\n * Gets the callback's failed policies.\n */\n getFailedPolicies() {\n const e = this.getOutputByName(\n \"failedPolicies\",\n []\n );\n try {\n return e.map((t) => JSON.parse(t));\n } catch {\n throw new Error(\n 'Unable to parse \"failed policies\" from the ForgeRock server. The JSON within `ValidatedCreateUsernameCallback` was either malformed or missing.'\n );\n }\n }\n /**\n * Gets the callback's applicable policies.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n getPolicies() {\n return this.getOutputByName(\"policies\", {});\n }\n /**\n * Gets whether the username is required.\n */\n isRequired() {\n return this.getOutputByName(\"required\", !1);\n }\n /**\n * Sets the callback's username.\n */\n setName(e) {\n this.setInputValue(e);\n }\n /**\n * Set if validating value only.\n */\n setValidateOnly(e) {\n this.setInputValue(e, /validateOnly/);\n }\n}\nexport {\n s as default\n};\n","import a from \"./index.js\";\nimport { CallbackType as r } from \"../../auth/enums.js\";\nimport t from \"./attribute-input-callback.js\";\nimport n from \"./choice-callback.js\";\nimport o from \"./confirmation-callback.js\";\nimport i from \"./device-profile-callback.js\";\nimport l from \"./hidden-value-callback.js\";\nimport C from \"./kba-create-callback.js\";\nimport m from \"./metadata-callback.js\";\nimport u from \"./name-callback.js\";\nimport s from \"./password-callback.js\";\nimport p from \"./ping-protect-evaluation-callback.js\";\nimport c from \"./ping-protect-initialize-callback.js\";\nimport d from \"./polling-wait-callback.js\";\nimport b from \"./recaptcha-callback.js\";\nimport f from \"./redirect-callback.js\";\nimport w from \"./select-idp-callback.js\";\nimport k from \"./suspended-text-output-callback.js\";\nimport P from \"./terms-and-conditions-callback.js\";\nimport I from \"./text-input-callback.js\";\nimport T from \"./text-output-callback.js\";\nimport O from \"./validated-create-password-callback.js\";\nimport g from \"./validated-create-username-callback.js\";\nfunction L(e) {\n switch (e.type) {\n case r.BooleanAttributeInputCallback:\n return new t(e);\n case r.ChoiceCallback:\n return new n(e);\n case r.ConfirmationCallback:\n return new o(e);\n case r.DeviceProfileCallback:\n return new i(e);\n case r.HiddenValueCallback:\n return new l(e);\n case r.KbaCreateCallback:\n return new C(e);\n case r.MetadataCallback:\n return new m(e);\n case r.NameCallback:\n return new u(e);\n case r.NumberAttributeInputCallback:\n return new t(e);\n case r.PasswordCallback:\n return new s(e);\n case r.PingOneProtectEvaluationCallback:\n return new p(e);\n case r.PingOneProtectInitializeCallback:\n return new c(e);\n case r.PollingWaitCallback:\n return new d(e);\n case r.ReCaptchaCallback:\n return new b(e);\n case r.RedirectCallback:\n return new f(e);\n case r.SelectIdPCallback:\n return new w(e);\n case r.StringAttributeInputCallback:\n return new t(e);\n case r.SuspendedTextOutputCallback:\n return new k(e);\n case r.TermsAndConditionsCallback:\n return new P(e);\n case r.TextInputCallback:\n return new I(e);\n case r.TextOutputCallback:\n return new T(e);\n case r.ValidatedCreatePasswordCallback:\n return new O(e);\n case r.ValidatedCreateUsernameCallback:\n return new g(e);\n default:\n return new a(e);\n }\n}\nexport {\n L as default\n};\n","import c from \"./callbacks/factory.js\";\nimport { StepType as r } from \"./enums.js\";\nclass i {\n /**\n * @param payload The raw payload returned by OpenAM\n * @param callbackFactory A function that returns am implementation of FRCallback\n */\n constructor(t, e) {\n this.payload = t, this.type = r.Step, this.callbacks = [], t.callbacks && (this.callbacks = this.convertCallbacks(t.callbacks, e));\n }\n /**\n * Gets the first callback of the specified type in this step.\n *\n * @param type The type of callback to find.\n */\n getCallbackOfType(t) {\n const e = this.getCallbacksOfType(t);\n if (e.length !== 1)\n throw new Error(`Expected 1 callback of type \"${t}\", but found ${e.length}`);\n return e[0];\n }\n /**\n * Gets all callbacks of the specified type in this step.\n *\n * @param type The type of callback to find.\n */\n getCallbacksOfType(t) {\n return this.callbacks.filter((e) => e.getType() === t);\n }\n /**\n * Sets the value of the first callback of the specified type in this step.\n *\n * @param type The type of callback to find.\n * @param value The value to set for the callback.\n */\n setCallbackValue(t, e) {\n const a = this.getCallbacksOfType(t);\n if (a.length !== 1)\n throw new Error(`Expected 1 callback of type \"${t}\", but found ${a.length}`);\n a[0].setInputValue(e);\n }\n /**\n * Gets the step's description.\n */\n getDescription() {\n return this.payload.description;\n }\n /**\n * Gets the step's header.\n */\n getHeader() {\n return this.payload.header;\n }\n /**\n * Gets the step's stage.\n */\n getStage() {\n return this.payload.stage;\n }\n convertCallbacks(t, e) {\n return t.map((l) => (e || c)(l) || c(l));\n }\n}\nexport {\n i as default\n};\n","import v from \"../config/index.js\";\nimport w from \"../auth/index.js\";\nimport { CallbackType as x } from \"../auth/enums.js\";\nimport I from \"./fr-login-failure.js\";\nimport k from \"./fr-login-success.js\";\nimport R from \"./fr-step.js\";\nclass f {\n static get previousStepKey() {\n return `${v.get().prefix}-PreviousStep`;\n }\n /**\n * Requests the next step in the authentication tree.\n *\n * Call `FRAuth.next()` recursively. At each step, check for session token or error, otherwise\n * populate the step's callbacks and call `next()` again.\n *\n * Example:\n *\n * ```js\n * async function nextStep(previousStep) {\n * const thisStep = await FRAuth.next(previousStep);\n *\n * switch (thisStep.type) {\n * case StepType.LoginSuccess:\n * const token = thisStep.getSessionToken();\n * break;\n * case StepType.LoginFailure:\n * const detail = thisStep.getDetail();\n * break;\n * case StepType.Step:\n * // Populate `thisStep` callbacks here, and then continue\n * thisStep.setInputValue('foo');\n * nextStep(thisStep);\n * break;\n * }\n * }\n * ```\n *\n * @param previousStep The previous step with its callback values populated\n * @param options Configuration overrides\n * @return The next step in the authentication tree\n */\n static async next(t, r) {\n const e = await w.next(t ? t.payload : void 0, r);\n if (e.authId) {\n const a = r ? r.callbackFactory : void 0;\n return new R(e, a);\n }\n return !e.authId && e.ok ? new k(e) : new I(e);\n }\n /**\n * Redirects to the URL identified in the RedirectCallback and saves the full\n * step information to localStorage for retrieval when user returns from login.\n *\n * Example:\n * ```js\n * forgerock.FRAuth.redirect(step);\n * ```\n */\n static redirect(t) {\n const e = t.getCallbackOfType(x.RedirectCallback).getRedirectUrl();\n localStorage.setItem(this.previousStepKey, JSON.stringify(t)), location.assign(e);\n }\n /**\n * Resumes a tree after returning from an external client or provider.\n * Requires the full URL of the current window. It will parse URL for\n * key-value pairs as well as, if required, retrieves previous step.\n *\n * Example;\n * ```js\n * forgerock.FRAuth.resume(window.location.href)\n * ```\n */\n static async resume(t, r) {\n const e = new URL(t), a = e.searchParams.get(\"code\"), n = e.searchParams.get(\"error\"), i = e.searchParams.get(\"errorCode\"), m = e.searchParams.get(\"errorMessage\"), s = e.searchParams.get(\"form_post_entry\"), l = e.searchParams.get(\"nonce\"), u = e.searchParams.get(\"RelayState\"), c = e.searchParams.get(\"responsekey\"), d = e.searchParams.get(\"scope\"), o = e.searchParams.get(\"state\"), g = e.searchParams.get(\"suspendedId\"), h = e.searchParams.get(\"authIndexValue\") ?? void 0;\n let y;\n function S() {\n return a && o || s || c;\n }\n if (S()) {\n const p = localStorage.getItem(this.previousStepKey);\n if (!p)\n throw new Error(\"Error: could not retrieve original redirect information.\");\n try {\n y = JSON.parse(p);\n } catch {\n throw new Error(\"Error: could not parse redirect params or step information\");\n }\n localStorage.removeItem(this.previousStepKey);\n }\n const P = {\n ...r,\n query: {\n // Conditionally spread properties into object. Don't spread props with undefined/null.\n ...a && { code: a },\n ...n && { error: n },\n ...i && { errorCode: i },\n ...m && { errorMessage: m },\n ...s && { form_post_entry: s },\n ...l && { nonce: l },\n ...u && { RelayState: u },\n ...c && { responsekey: c },\n ...d && { scope: d },\n ...o && { state: o },\n ...g && { suspendedId: g },\n // Allow developer to add or override params with their own.\n ...r && r.query\n },\n ...((r == null ? void 0 : r.tree) ?? h) && {\n tree: (r == null ? void 0 : r.tree) ?? h\n }\n };\n return await this.next(y, P);\n }\n /**\n * Requests the first step in the authentication tree.\n * This is essentially an alias to calling FRAuth.next without a previous step.\n *\n * @param options Configuration overrides\n * @return The next step in the authentication tree\n */\n static async start(t) {\n return await f.next(void 0, t);\n }\n}\nexport {\n f as default\n};\n","const o = [\n \"userAgent\",\n \"appName\",\n \"appCodeName\",\n \"appVersion\",\n \"appMinorVersion\",\n \"buildID\",\n \"product\",\n \"productSub\",\n \"vendor\",\n \"vendorSub\",\n \"browserLanguage\"\n], a = [\n \"fontNames\",\n \"displayProps\",\n \"browserProps\",\n \"hardwareProps\",\n \"platformProps\"\n], e = 3e4, r = {\n mac: [\"Macintosh\", \"MacIntel\", \"MacPPC\", \"Mac68K\"],\n windows: [\"Win32\", \"Win64\", \"Windows\", \"WinCE\"],\n ios: [\"iPhone\", \"iPad\", \"iPod\"]\n}, n = [\"width\", \"height\", \"pixelDepth\", \"orientation.angle\"], s = [\n \"cursive\",\n \"monospace\",\n \"serif\",\n \"sans-serif\",\n \"fantasy\",\n \"Arial\",\n \"Arial Black\",\n \"Arial Narrow\",\n \"Arial Rounded MT Bold\",\n \"Bookman Old Style\",\n \"Bradley Hand ITC\",\n \"Century\",\n \"Century Gothic\",\n \"Comic Sans MS\",\n \"Courier\",\n \"Courier New\",\n \"Georgia\",\n \"Gentium\",\n \"Impact\",\n \"King\",\n \"Lucida Console\",\n \"Lalit\",\n \"Modena\",\n \"Monotype Corsiva\",\n \"Papyrus\",\n \"Tahoma\",\n \"TeX\",\n \"Times\",\n \"Times New Roman\",\n \"Trebuchet MS\",\n \"Verdana\",\n \"Verona\"\n], i = [\n \"cpuClass\",\n \"deviceMemory\",\n \"hardwareConcurrency\",\n \"maxTouchPoints\",\n \"oscpu\"\n], t = [\"language\", \"platform\", \"userLanguage\", \"systemLanguage\"];\nexport {\n o as browserProps,\n a as configurableCategories,\n e as delay,\n r as devicePlatforms,\n n as displayProps,\n s as fontNames,\n i as hardwareProps,\n t as platformProps\n};\n","class p {\n /**\n * @method reduceToObject - goes one to two levels into source to collect attribute\n * @param props - array of strings; can use dot notation for two level lookup\n * @param src - source of attributes to check\n */\n // eslint-disable-next-line\n reduceToObject(n, t) {\n return n.reduce((e, o) => {\n if (o.includes(\".\")) {\n const l = o.split(\".\"), d = l[0], i = l[1], s = t[d] && t[d][i];\n e[i] = s ?? \"\";\n } else\n e[o] = t[o] != null ? t[o] : null;\n return e;\n }, {});\n }\n /**\n * @method reduceToString - goes one level into source to collect attribute\n * @param props - array of strings\n * @param src - source of attributes to check\n */\n // eslint-disable-next-line\n reduceToString(n, t) {\n return n.reduce((e, o) => (e = `${e}${t[o].filename};`, e), \"\");\n }\n}\nexport {\n p as default\n};\n","import r from \"../config/index.js\";\nclass t {\n static enabled() {\n const { logLevel: o } = r.get();\n return {\n none: 0,\n error: 25,\n warn: 50,\n info: 75,\n debug: 100\n }[o];\n }\n static info(...o) {\n const { logger: e } = r.get();\n this.enabled() >= 50 && (e && e.info ? e.info(...o) : console.info(...o));\n }\n static warn(...o) {\n const { logger: e } = r.get();\n this.enabled() >= 50 && (e && e.warn ? e.warn(...o) : console.warn(...o));\n }\n static error(...o) {\n const { logger: e } = r.get();\n this.enabled() >= 25 && (e && e.error ? e.error(...o) : console.error(...o));\n }\n static log(...o) {\n const { logger: e } = r.get();\n this.enabled() >= 75 && (e && e.log ? e.log(...o) : console.log(...o));\n }\n}\nexport {\n t as FRLogger\n};\n","import { fontNames as s, devicePlatforms as c, displayProps as d, browserProps as l, hardwareProps as f, platformProps as g, configurableCategories as u, delay as m } from \"./defaults.js\";\nimport p from \"./collector.js\";\nimport { FRLogger as n } from \"../util/logger.js\";\nimport w from \"../config/index.js\";\nclass O extends p {\n constructor(t) {\n super(), this.config = {\n fontNames: s,\n devicePlatforms: c,\n displayProps: d,\n browserProps: l,\n hardwareProps: f,\n platformProps: g\n }, t && Object.keys(t).forEach((e) => {\n if (!u.includes(e))\n throw new Error(\"Device profile configuration category does not exist.\");\n this.config[e] = t[e];\n });\n }\n getBrowserMeta() {\n return typeof navigator > \"u\" ? (n.warn(\"Cannot collect browser metadata. navigator is not defined.\"), {}) : this.reduceToObject(this.config.browserProps, navigator);\n }\n getBrowserPluginsNames() {\n return typeof navigator < \"u\" && navigator.plugins ? this.reduceToString(Object.keys(navigator.plugins), navigator.plugins) : (n.warn(\"Cannot collect browser plugin information. navigator.plugins is not defined.\"), \"\");\n }\n getDeviceName() {\n if (typeof navigator > \"u\")\n return n.warn(\"Cannot collect device name. navigator is not defined.\"), \"\";\n const t = navigator.userAgent, e = navigator.platform;\n switch (!0) {\n case this.config.devicePlatforms.mac.includes(e):\n return \"Mac (Browser)\";\n case this.config.devicePlatforms.ios.includes(e):\n return `${e} (Browser)`;\n case this.config.devicePlatforms.windows.includes(e):\n return \"Windows (Browser)\";\n case (/Android/.test(e) || /Android/.test(t)):\n return \"Android (Browser)\";\n case (/CrOS/.test(t) || /Chromebook/.test(t)):\n return \"Chrome OS (Browser)\";\n case /Linux/.test(e):\n return \"Linux (Browser)\";\n default:\n return `${e || \"Unknown\"} (Browser)`;\n }\n }\n getDisplayMeta() {\n return typeof screen > \"u\" ? (n.warn(\"Cannot collect screen information. screen is not defined.\"), {}) : this.reduceToObject(this.config.displayProps, screen);\n }\n getHardwareMeta() {\n return typeof navigator > \"u\" ? (n.warn(\"Cannot collect OS metadata. Navigator is not defined.\"), {}) : this.reduceToObject(this.config.hardwareProps, navigator);\n }\n getIdentifier() {\n const t = `${w.get().prefix}-DeviceID`;\n if (!(typeof globalThis.crypto < \"u\" && globalThis.crypto.getRandomValues))\n return n.warn(\"Cannot generate profile ID. Crypto and/or getRandomValues is not supported.\"), \"\";\n if (!localStorage)\n return n.warn(\"Cannot store profile ID. localStorage is not supported.\"), \"\";\n let e = localStorage.getItem(t);\n return e || (e = globalThis.crypto.getRandomValues(new Uint32Array(3)).join(\"-\"), localStorage.setItem(t, e)), e;\n }\n getInstalledFonts() {\n if (typeof document > \"u\")\n return n.warn(\"Cannot collect font data. Global document object is undefined.\"), \"\";\n const t = document.createElement(\"canvas\");\n if (!t)\n return n.warn(\"Cannot collect font data. Browser does not support canvas element\"), \"\";\n const e = t.getContext && t.getContext(\"2d\");\n if (!e)\n return n.warn(\"Cannot collect font data. Browser does not support 2d canvas context\"), \"\";\n const o = \"abcdefghi0123456789\";\n e.font = \"72px Comic Sans\";\n const i = e.measureText(o).width;\n return this.config.fontNames.reduce((r, a) => (e.font = `72px ${a}, Comic Sans`, e.measureText(o).width !== i && (r = `${r}${a};`), r), \"\");\n }\n async getLocationCoordinates() {\n return typeof navigator < \"u\" && navigator.geolocation ? new Promise(async (t) => {\n navigator.geolocation.getCurrentPosition(\n (e) => t({\n latitude: e.coords.latitude,\n longitude: e.coords.longitude\n }),\n (e) => {\n n.warn(\n \"Cannot collect geolocation information. \" + e.code + \": \" + e.message\n ), t({});\n },\n {\n enableHighAccuracy: !0,\n timeout: m,\n maximumAge: 0\n }\n );\n }) : (n.warn(\n \"Cannot collect geolocation information. navigator.geolocation is not defined.\"\n ), Promise.resolve({}));\n }\n getOSMeta() {\n return typeof navigator > \"u\" ? (n.warn(\"Cannot collect OS metadata. navigator is not defined.\"), {}) : this.reduceToObject(this.config.platformProps, navigator);\n }\n async getProfile({ location: t, metadata: e }) {\n const o = {\n identifier: this.getIdentifier()\n };\n return e && (o.metadata = {\n hardware: {\n ...this.getHardwareMeta(),\n display: this.getDisplayMeta()\n },\n browser: {\n ...this.getBrowserMeta(),\n plugins: this.getBrowserPluginsNames()\n },\n platform: {\n ...this.getOSMeta(),\n deviceName: this.getDeviceName(),\n fonts: this.getInstalledFonts(),\n timezone: this.getTimezoneOffset()\n }\n }), t && (o.location = await this.getLocationCoordinates()), o;\n }\n getTimezoneOffset() {\n try {\n return (/* @__PURE__ */ new Date()).getTimezoneOffset();\n } catch {\n return n.warn(\"Cannot collect timezone information. getTimezoneOffset is not defined.\"), null;\n }\n }\n}\nexport {\n O as default\n};\n","import { CallbackType as l } from \"../auth/enums.js\";\nclass i {\n /**\n * @method isQRCodeStep - determines if step contains QR Code callbacks\n * @param {FRStep} step - step object from AM response\n * @returns {boolean}\n */\n static isQRCodeStep(s) {\n const t = s.getCallbacksOfType(l.HiddenValueCallback);\n return t.length === 0 ? !1 : !!this.getQRCodeURICb(t);\n }\n /**\n * @method getQRCodeData - gets the necessary information from the QR Code callbacks\n * @param {FRStep} step - step object from AM response\n * @returns {QRCodeData}\n */\n static getQRCodeData(s) {\n const t = s.getCallbacksOfType(l.HiddenValueCallback);\n if (t.length === 0)\n throw new Error(\n \"QR Code step must contain a HiddenValueCallback. Use `FRQRCode.isQRCodeStep` to guard.\"\n );\n const e = this.getQRCodeURICb(t), a = e ? e.getOutputValue(\"value\") : \"\", u = typeof a == \"string\" && a.includes(\"otpauth://\") ? \"otp\" : \"push\", n = s.getCallbacksOfType(l.TextOutputCallback).find((o) => o.getMessageType() !== \"4\");\n return {\n message: n ? n.getMessage() : \"\",\n use: u,\n uri: typeof a == \"string\" ? a : \"\"\n };\n }\n static getQRCodeURICb(s) {\n return s.find((t) => {\n const e = t.getOutputValue(\"value\");\n return typeof e == \"string\" ? (e == null ? void 0 : e.includes(\"otpauth://\")) || (e == null ? void 0 : e.includes(\"pushauth://\")) : !1;\n });\n }\n}\nexport {\n i as default\n};\n","import { CallbackType as s } from \"../auth/enums.js\";\nimport { parseDeviceNameText as c, parseDisplayRecoveryCodesText as l } from \"./script-parser.js\";\nclass p {\n static getDeviceName(t) {\n var e;\n const a = ((e = this.getDisplayCallback(t)) == null ? void 0 : e.getOutputByName(\"message\", \"\")) ?? \"\";\n return c(a);\n }\n /**\n * Retrieves the recovery codes by parsing the JavaScript message text in callback.\n *\n * @param step The step to evaluate\n * @return Recovery Code values in array\n */\n static getCodes(t) {\n var e;\n const a = (e = this.getDisplayCallback(t)) == null ? void 0 : e.getOutputByName(\"message\", \"\");\n return l(a || \"\");\n }\n /**\n * Determines if the given step is a Display Recovery Codes step.\n *\n * @param step The step to evaluate\n * @return Is this step a Display Recovery Codes step\n */\n static isDisplayStep(t) {\n return !!this.getDisplayCallback(t);\n }\n /**\n * Gets the recovery codes step.\n *\n * @param step The step to evaluate\n * @return gets the Display Recovery Codes' callback\n */\n static getDisplayCallback(t) {\n return t.getCallbacksOfType(s.TextOutputCallback).find((a) => {\n const e = a.getOutputByName(\"message\", void 0);\n return e && (e.includes(\"Recovery Codes\") || e.includes(\"recovery codes\"));\n });\n }\n}\nexport {\n p as default\n};\n","import r from \"../config/index.js\";\nclass n {\n /**\n * Retrieve tokens.\n */\n static async get(t) {\n const e = localStorage.getItem(`${r.get().prefix}-${t}`);\n if (e)\n try {\n return JSON.parse(e || \"\");\n } catch {\n throw new Error(\"Could not parse token object from localStorage\");\n }\n }\n /**\n * Saves tokens.\n */\n static async set(t, e) {\n const o = JSON.stringify(e);\n localStorage.setItem(`${r.get().prefix}-${t}`, o);\n }\n /**\n * Removes stored tokens.\n */\n static async remove(t) {\n localStorage.removeItem(`${r.get().prefix}-${t}`);\n }\n}\nexport {\n n as default\n};\n","import r from \"../config/index.js\";\nclass a {\n /**\n * Retrieve tokens.\n */\n static async get(e) {\n const t = sessionStorage.getItem(`${r.get().prefix}-${e}`);\n if (t)\n try {\n return JSON.parse(t || \"\");\n } catch {\n throw new Error(\"Could not parse token from sessionStorage\");\n }\n }\n /**\n * Saves tokens.\n */\n static async set(e, t) {\n const s = JSON.stringify(t);\n sessionStorage.setItem(`${r.get().prefix}-${e}`, s);\n }\n /**\n * Removes stored tokens.\n */\n static async remove(e) {\n sessionStorage.removeItem(`${r.get().prefix}-${e}`);\n }\n}\nexport {\n a as default\n};\n","import a from \"../config/index.js\";\nimport { FRLogger as n } from \"../util/logger.js\";\nimport i from \"./local-storage.js\";\nimport o from \"./session-storage.js\";\nclass d {\n /**\n * Gets stored tokens.\n */\n static async get() {\n const { clientId: t, tokenStore: e } = this.getClientConfig();\n if (e === \"sessionStorage\")\n return await o.get(t);\n if (e === \"localStorage\")\n return await i.get(t);\n if (e === \"indexedDB\")\n n.warn(\"IndexedDB is not supported in this version.\");\n else if (e && e.get)\n return await e.get(t);\n return await i.get(t);\n }\n /**\n * Saves tokens.\n */\n static async set(t) {\n const { clientId: e, tokenStore: r } = this.getClientConfig();\n if (r === \"sessionStorage\")\n return await o.set(e, t);\n if (r === \"localStorage\")\n return await i.set(e, t);\n if (r === \"indexedDB\")\n n.warn(\"IndexedDB is not supported in this version.\");\n else if (r && r.set)\n return await r.set(e, t);\n return await i.set(e, t);\n }\n /**\n * Removes stored tokens.\n */\n static async remove() {\n const { clientId: t, tokenStore: e } = this.getClientConfig();\n if (e === \"sessionStorage\")\n return await o.remove(t);\n if (e === \"localStorage\")\n return await i.remove(t);\n if (e === \"indexedDB\")\n n.warn(\"IndexedDB is not supported in this version.\");\n else if (e && e.remove)\n return await e.remove(t);\n return await i.remove(t);\n }\n static getClientConfig() {\n const { clientId: t = \"unconfiguredClient\", tokenStore: e = \"localStorage\" } = a.get();\n return { clientId: t, tokenStore: e };\n }\n}\nexport {\n d as default\n};\n","import { ActionTypes as l } from \"../config/enums.js\";\nimport f from \"../config/index.js\";\nimport g from \"../token-storage/index.js\";\nimport { isOkOr4xx as y } from \"../util/http.js\";\nimport _ from \"../util/pkce.js\";\nimport { withTimeout as E } from \"../util/timeout.js\";\nimport { stringify as k, getEndpointPath as U, resolve as p } from \"../util/url.js\";\nimport T from \"../util/middleware.js\";\nconst A = {\n // AM error for consent requirement\n AuthenticationConsentRequired: \"Authentication or consent required\",\n // Manual iframe error\n AuthorizationTimeout: \"Authorization timed out\",\n // Chromium browser error\n FailedToFetch: \"Failed to fetch\",\n // Mozilla browser error\n NetworkError: \"NetworkError when attempting to fetch resource.\",\n // Webkit browser error\n CORSError: \"Cross-origin redirection\",\n // prompt=none errors\n InteractionNotAllowed: \"The request requires some interaction that is not allowed.\",\n // PingOne login error\n LoginRequired: \"User authentication is required\"\n};\nclass b {\n static async createAuthorizeUrl(e) {\n const { clientId: t, middleware: o, redirectUri: n, scope: i } = f.get(e), r = {\n ...e.query,\n client_id: t,\n redirect_uri: n,\n response_type: e.responseType,\n scope: i,\n state: e.state,\n ...e.prompt ? { prompt: e.prompt } : {}\n };\n if (e.verifier) {\n const a = await _.createChallenge(e.verifier);\n r.code_challenge = a, r.code_challenge_method = \"S256\";\n }\n const s = T(\n {\n url: new URL(this.getUrl(\"authorize\", r, e)),\n init: {}\n },\n { type: l.Authorize }\n ), { url: c } = s(o);\n return c.toString();\n }\n /**\n * Calls the authorize URL with an iframe. If successful,\n * it returns the callback URL with authentication code,\n * optionally using PKCE.\n * Method renamed in v3.\n * Original Name: getAuthorizeUrl\n * New Name: getAuthCodeByIframe\n */\n static async getAuthCodeByIframe(e) {\n const t = await this.createAuthorizeUrl({ ...e, prompt: \"none\" }), { serverConfig: o } = f.get(e);\n return new Promise((n, i) => {\n const r = document.createElement(\"iframe\"), s = () => {\n };\n let c = s, a = s, d = 0;\n a = () => {\n clearTimeout(d), r.removeEventListener(\"load\", c), r.remove();\n }, c = () => {\n if (r.contentWindow) {\n const u = r.contentWindow.location.href;\n (this.containsAuthCode(u) || this.containsAuthError(u)) && (a(), n(u));\n }\n }, d = setTimeout(() => {\n a(), i(new Error(A.AuthorizationTimeout));\n }, o.timeout), r.style.display = \"none\", r.addEventListener(\"load\", c), document.body.appendChild(r), r.src = t;\n });\n }\n /**\n * Exchanges an authorization code for OAuth tokens.\n */\n static async getOAuth2Tokens(e) {\n const { clientId: t, redirectUri: o } = f.get(e), n = {\n client_id: t,\n code: e.authorizationCode,\n grant_type: \"authorization_code\",\n redirect_uri: o\n };\n e.verifier && (n.code_verifier = e.verifier);\n const i = k(n), r = {\n body: i,\n headers: new Headers({\n \"Content-Length\": i.length.toString(),\n \"Content-Type\": \"application/x-www-form-urlencoded\"\n }),\n method: \"POST\"\n }, s = await this.request(\"accessToken\", void 0, !1, r, e), c = await this.getBody(s);\n if (s.status !== 200) {\n const u = typeof c == \"string\" ? `Expected 200, received ${s.status}` : this.parseError(c);\n throw new Error(u);\n }\n const a = c;\n if (!a.access_token)\n throw new Error(\"Access token not found in response\");\n let d;\n return a.expires_in && (d = Date.now() + a.expires_in * 1e3), {\n accessToken: a.access_token,\n idToken: a.id_token,\n refreshToken: a.refresh_token,\n tokenExpiry: d\n };\n }\n /**\n * Gets OIDC user information.\n */\n static async getUserInfo(e) {\n const t = await this.request(\"userInfo\", void 0, !0, void 0, e);\n if (t.status !== 200)\n throw new Error(`Failed to get user info; received ${t.status}`);\n return await t.json();\n }\n /**\n * Invokes the OIDC end session endpoint.\n * Can result in a redirect to `/signoff` if using PingOne\n * It's best to explicitly provide the logout redirect URL in options\n *\n * @function endSession - call authorization server to end associated session\n * @param options {LogoutOptions} - an extension of ConfigOptions, but with two additional props\n * @param options.logoutRedirectUri {string} - the URL you want the AS to redirect to after signout\n * @param options.redirect {boolean} - to explicitly deactivate redirect, pass `false`\n */\n static async endSession(e) {\n const t = { ...e };\n delete t.redirect, delete t.logoutRedirectUri;\n const o = {}, n = await g.get();\n o.id_token_hint = n && n.idToken || (e && \"idToken\" in e ? e.idToken : \"\");\n const i = await this.request(\"endSession\", o, !0, void 0, t, {\n redirect: e == null ? void 0 : e.redirect,\n logoutRedirectUri: e == null ? void 0 : e.logoutRedirectUri\n });\n if (!y(i))\n throw new Error(`Failed to end session; received ${i.status}`);\n return i;\n }\n /**\n * Immediately revokes the stored access token.\n */\n static async revokeToken(e) {\n const { clientId: t } = f.get(e), o = await g.get(), n = o && o.accessToken, i = {\n client_id: t\n };\n n && (i.token = n);\n const r = {\n body: k(i),\n credentials: \"include\",\n headers: new Headers({\n \"Content-Type\": \"application/x-www-form-urlencoded\"\n }),\n method: \"POST\"\n }, s = await this.request(\"revoke\", void 0, !1, r, e);\n if (!y(s))\n throw new Error(`Failed to revoke token; received ${s.status}`);\n return s;\n }\n static async request(e, t, o, n, i, r) {\n const { redirectUri: s, middleware: c, serverConfig: a } = f.get(i), d = r != null && r.logoutRedirectUri ? r.logoutRedirectUri : s, u = this.getUrl(e, t, i), m = (w) => {\n switch (w) {\n case \"accessToken\":\n return l.ExchangeToken;\n case \"endSession\":\n return l.EndSession;\n case \"revoke\":\n return l.RevokeToken;\n default:\n return l.UserInfo;\n }\n };\n if (n = n || {}, o) {\n const w = await g.get(), v = w && w.accessToken;\n n.credentials = \"include\", n.headers = n.headers || new Headers(), n.headers.set(\"Authorization\", `Bearer ${v}`);\n }\n const h = T(\n { url: new URL(u), init: n },\n { type: m(e) }\n )(c);\n return m(e) === l.EndSession && // endSession action only\n (r == null ? void 0 : r.redirect) === !0 ? (h.url.searchParams.append(\"post_logout_redirect_uri\", d || \"\"), window.location.assign(h.url.toString()), new Response()) : m(e) === l.EndSession && // endSession action only\n (r == null ? void 0 : r.redirect) !== !1 && // Only `false` explicitly disables this behavior for rare edge cases\n // If we explicitly get a logout redirect URL, then that's enough of a hint to redirect\n // If we don't have that, let's see if they are calling the typical PingOne `/signoff` endpoint\n (r != null && r.logoutRedirectUri || this.getUrl(\"endSession\").includes(\"/as/signoff\")) ? (h.url.searchParams.append(\"post_logout_redirect_uri\", d || \"\"), window.location.assign(h.url.toString()), new Response()) : await E(fetch(h.url.toString(), h.init), a.timeout);\n }\n static containsAuthCode(e) {\n return !!e && /code=([^&]+)/.test(e);\n }\n static containsAuthError(e) {\n return !!e && /error=([^&]+)/.test(e);\n }\n static async getBody(e) {\n const t = e.headers.get(\"Content-Type\");\n return t && t.indexOf(\"application/json\") > -1 ? await e.json() : await e.text();\n }\n static parseError(e) {\n if (e) {\n if (e.error && e.error_description)\n return `${e.error}: ${e.error_description}`;\n if (e.code && e.message)\n return `${e.code}: ${e.message}`;\n }\n }\n static getUrl(e, t, o) {\n const { realmPath: n, serverConfig: i } = f.get(o), r = U(e, n, i.paths);\n let s = p(i.baseUrl, r);\n return t && (s += `?${k(t)}`), s;\n }\n}\nexport {\n A as allowedErrors,\n b as default\n};\n","import f from \"../config/index.js\";\nimport { REQUESTED_WITH as u, X_REQUESTED_PLATFORM as t } from \"../shared/constants.js\";\nimport { isOkOr4xx as c } from \"../util/http.js\";\nimport { withTimeout as p } from \"../util/timeout.js\";\nimport { ActionTypes as h } from \"../config/enums.js\";\nimport g from \"../util/middleware.js\";\nimport { getEndpointPath as w, resolve as P } from \"../util/url.js\";\nclass M {\n /**\n * Ends the current session.\n */\n static async logout(i) {\n const { middleware: s, platformHeader: a, realmPath: n, serverConfig: r } = f.get(i), d = {\n credentials: \"include\",\n headers: new Headers({\n \"Accept-API-Version\": \"protocol=1.0,resource=2.0\",\n \"X-Requested-With\": u\n }),\n method: \"POST\"\n }, l = `${w(\"sessions\", n, r.paths)}?_action=logout`, m = P(r.baseUrl, l), e = g(\n { url: new URL(m), init: d },\n { type: h.Logout }\n )(s);\n a && (e.init.headers instanceof Headers ? e.init.headers.set(\"X-Requested-Platform\", t) : Array.isArray(e.init.headers) ? e.init.headers.push([\"X-Requested-Platform\", t]) : e.init.headers ? e.init.headers[\"X-Requested-Platform\"] = t : e.init.headers = {\n \"X-Requested-Platform\": t\n });\n const o = await p(fetch(e.url.toString(), e.init), r.timeout);\n if (!c(o))\n throw new Error(`Failed to log out; received ${o.status}`);\n return o;\n }\n}\nexport {\n M as default\n};\n","var r = /* @__PURE__ */ ((o) => (o.Code = \"code\", o.Token = \"token\", o))(r || {});\nexport {\n r as ResponseType\n};\n","import y from \"../config/index.js\";\nimport { FRLogger as k } from \"../util/logger.js\";\nimport m, { allowedErrors as t } from \"../oauth2-client/index.js\";\nimport l from \"../token-storage/index.js\";\nimport E from \"../util/pkce.js\";\nimport { parseQuery as q } from \"../util/url.js\";\nimport { tokensWillExpireWithinThreshold as S } from \"./helpers.js\";\nimport { ResponseType as A } from \"../oauth2-client/enums.js\";\nclass T {\n /**\n * Token Manager class that provides high-level abstraction for Authorization Code flow,\n * PKCE value generation, token exchange and token storage.\n *\n * Supports both embedded authentication as well as external authentication via redirects\n *\n Example 1:\n \n ```js\n const tokens = forgerock.TokenManager.getTokens({\n forceRenew: true, // If you want to get new tokens, despite existing ones\n login: 'embedded', // If user authentication is handled in-app\n serverConfig: {\n timeout: 5000, // If using \"legacy\", use a short timeout to catch error\n },\n });\n ```\n \n Example 2:\n \n ```js\n const tokens = forgerock.TokenManager.getTokens({\n forceRenew: false, // Will immediately return stored tokens, if they exist\n login: 'redirect', // If user authentication is handled in external Web app\n });\n ```\n \n Example 3:\n \n ```js\n const tokens = forgerock.TokenManager.getTokens({\n query: {\n code: 'lFJQYdoQG1u7nUm8 ... ', // Authorization code from redirect URL\n state: 'MTY2NDkxNTQ2Nde3D ... ', // State from redirect URL\n },\n });\n ```\n */\n static async getTokens(e) {\n var g, d, w;\n const { clientId: u, oauthThreshold: f } = y.get(e), i = `${y.get().prefix}-authflow-${u}`, o = await l.get();\n if (o && !(e != null && e.forceRenew) && !((g = e == null ? void 0 : e.query) != null && g.code) && !S(f, o.tokenExpiry))\n return o;\n if (o)\n try {\n await m.revokeToken(e), await T.deleteTokens();\n } catch (r) {\n k.warn(\"Existing tokens could not be revoked or deleted\", r);\n }\n if ((d = e == null ? void 0 : e.query) != null && d.code && ((w = e == null ? void 0 : e.query) != null && w.state)) {\n const r = sessionStorage.getItem(i);\n sessionStorage.removeItem(i);\n const h = JSON.parse(r);\n return await this.tokenExchange(e, h);\n }\n const a = E.createVerifier(), n = E.createState(), s = Object.assign({}, e);\n delete s.forceRenew, delete s.login;\n const c = {\n ...s,\n responseType: A.Code,\n state: n,\n verifier: a\n };\n try {\n const r = new URL(await m.getAuthCodeByIframe(c));\n if (r.searchParams.get(\"error\"))\n throw Error(`${r.searchParams.get(\"error_description\")}`);\n if (!r.searchParams.get(\"code\"))\n throw Error(t.AuthenticationConsentRequired);\n const h = q(r.toString());\n e || (e = {}), e.query = h;\n } catch (r) {\n if (!(r instanceof Error) || (e == null ? void 0 : e.login) !== \"redirect\" || t.AuthenticationConsentRequired !== r.message && t.AuthorizationTimeout !== r.message && t.FailedToFetch !== r.message && t.NetworkError !== r.message && t.InteractionNotAllowed !== r.message && // Check for Ping Identity Login Required error\n // Long message, so just check substring\n !r.message.includes(t.LoginRequired) && // Safari has a very long error message, so we check for a substring\n !r.message.includes(t.CORSError))\n throw r;\n sessionStorage.setItem(i, JSON.stringify(c));\n const h = await m.createAuthorizeUrl(c);\n return location.assign(h);\n }\n return await this.tokenExchange(e, { state: n, verifier: a });\n }\n static async deleteTokens() {\n await l.remove();\n }\n static async tokenExchange(e, u) {\n var n, s, c, g;\n if (((n = e.query) == null ? void 0 : n.state) !== u.state)\n throw new Error(\"State mismatch\");\n if (!((s = e.query) != null && s.code) || Array.isArray((c = e.query) == null ? void 0 : c.code))\n throw new Error(\"Failed to acquire authorization code\");\n const f = (g = e.query) == null ? void 0 : g.code, i = u.verifier, o = { ...e, authorizationCode: f, verifier: i }, a = await m.getOAuth2Tokens(o);\n if (!a || !a.accessToken)\n throw new Error(\"Unable to exchange authorization for tokens\");\n try {\n await l.set(a);\n } catch (d) {\n k.error(\"Failed to store tokens\", d);\n }\n return a;\n }\n}\nexport {\n T as default\n};\n","import { FRLogger as t } from \"../util/logger.js\";\nimport s from \"../oauth2-client/index.js\";\nimport i from \"../session-manager/index.js\";\nimport c from \"../token-manager/index.js\";\nimport l from \"../token-storage/index.js\";\nclass k {\n /**\n * Logs the user in with the specified step handler, acquires OAuth tokens, and retrieves\n * user profile. **Currently not implemented.**\n *\n * @typeparam T The type of user object expected\n * @param handler The function to invoke when handling authentication steps\n * @param options Configuration overrides\n */\n static async login(e, o) {\n throw t.info(e, o), new Error(\"FRUser.login() not implemented\");\n }\n /**\n * Ends the user's session and revokes OAuth tokens.\n *\n * @param options Configuration overrides\n */\n static async logout(e) {\n const o = { ...e };\n delete o.redirect;\n try {\n await i.logout(o);\n } catch {\n t.warn(\"Session logout was not successful\");\n }\n try {\n await s.revokeToken(o);\n } catch {\n t.warn(\"OAuth revokeToken was not successful\");\n }\n const n = await l.get(), { idToken: a = \"\" } = n || {};\n await c.deleteTokens();\n try {\n await s.endSession({ ...e, idToken: a });\n } catch {\n t.warn(\"OAuth endSession was not successful\");\n }\n }\n}\nexport {\n k as default\n};\n","var o = /* @__PURE__ */ ((r) => (r.Error = \"ERROR\", r.Unsupported = \"unsupported\", r))(o || {}), E = /* @__PURE__ */ ((r) => (r.AbortError = \"AbortError\", r.DataError = \"DataError\", r.ConstraintError = \"ConstraintError\", r.EncodingError = \"EncodingError\", r.InvalidError = \"InvalidError\", r.NetworkError = \"NetworkError\", r.NotAllowedError = \"NotAllowedError\", r.NotSupportedError = \"NotSupportedError\", r.SecurityError = \"SecurityError\", r.TimeoutError = \"TimeoutError\", r.UnknownError = \"UnknownError\", r))(E || {}), i = /* @__PURE__ */ ((r) => (r[r.None = 0] = \"None\", r[r.Authentication = 1] = \"Authentication\", r[r.Registration = 2] = \"Registration\", r))(i || {});\nexport {\n o as WebAuthnOutcome,\n E as WebAuthnOutcomeType,\n i as WebAuthnStepType\n};\n","import { WebAuthnOutcomeType as o } from \"./enums.js\";\nfunction s(r) {\n return r || [];\n}\nfunction u(r) {\n const n = new Uint8Array(r);\n return new TextDecoder().decode(n);\n}\nfunction f(r) {\n return r ? r[1] : \"\";\n}\nfunction a(r) {\n try {\n return r.split(\"}\").filter((e) => !!e && e !== \"]\").map((e) => {\n const t = c(e);\n return {\n id: new Int8Array(t).buffer,\n type: \"public-key\"\n };\n });\n } catch {\n const e = new Error(\"Transforming credential object to string failed\");\n throw e.name = o.EncodingError, e;\n }\n}\nfunction c(r) {\n const n = /new Int8Array\\((.+)\\)/.exec(r);\n return n === null || n.length < 2 ? [] : JSON.parse(n[1]);\n}\nfunction p(r) {\n if (Array.isArray(r))\n return r;\n if (typeof r == \"string\")\n return r && r[0] === \"[\" ? JSON.parse(r) : (r = r.replace(/(\\w+):/g, '\"$1\":'), JSON.parse(`[${r}]`));\n}\nfunction d(r) {\n return r.includes(\"rpId\") ? r.replace(/rpId: \"(.+)\",/, \"$1\") : r.replace(/id: \"(.+)\",/, \"$1\");\n}\nexport {\n u as arrayBufferToString,\n s as ensureArray,\n f as getIndexOne,\n a as parseCredentials,\n c as parseNumberArray,\n p as parsePubKeyArray,\n d as parseRelyingPartyId\n};\n","import { WebAuthnOutcomeType as S } from \"./enums.js\";\nimport { getIndexOne as e, parsePubKeyArray as K, parseCredentials as O, ensureArray as y } from \"./helpers.js\";\nfunction T(t) {\n const s = new TextEncoder(), r = e(t.match(/attestation\"{0,}:\\s{0,}\"(\\w+)\"/)), c = Number(e(t.match(/timeout\"{0,}:\\s{0,}(\\d+)/))), l = e(\n t.match(/userVerification\"{0,}:\\s{0,}\"(\\w+)\"/)\n ), i = e(\n t.match(/requireResidentKey\"{0,}:\\s{0,}(\\w+)/)\n ), o = e(\n t.match(/authenticatorAttachment\"{0,}:\\s{0,}\"([\\w-]+)/)\n ), m = e(t.match(/rp\"{0,}:\\s{0,}{([^}]+)}/)).trim(), a = e(m.match(/id\"{0,}:\\s{0,}\"([^\"]*)\"/)), w = e(m.match(/name\"{0,}:\\s{0,}\"([^\"]*)\"/)), n = e(t.match(/user\"{0,}:\\s{0,}{([^]{0,})},/)).trim(), u = e(n.match(/id\"{0,}:\\s{0,}Uint8Array.from\\(\"([^\"]+)\"/)), d = e(n.match(/name\"{0,}:\\s{0,}\"([\\d\\w._-]+)\"/)), h = e(n.match(/displayName\"{0,}:\\s{0,}\"([\\d\\w\\s.@_-]+)\"/)), p = e(\n // Capture the `pubKeyCredParams` without also matching `excludeCredentials` as well.\n // `excludeCredentials` values are very similar to this property, so we need to make sure\n // our last value doesn't end with \"buffer\", so we are only capturing objects that\n // end in a digit and possibly a space.\n t.match(/pubKeyCredParams\"*:\\s*\\[([^]+\\d\\s*})\\s*]/)\n ).trim(), A = K(p);\n if (!A) {\n const b = new Error(\"Missing pubKeyCredParams property from registration options\");\n throw b.name = S.DataError, b;\n }\n const g = e(\n t.match(/excludeCredentials\"{0,}:\\s{0,}\\[([^]+)\\s{0,}]/)\n ).trim(), f = O(g), C = y(\n t.match(/challenge\"{0,}:\\s{0,}new\\s{0,}(Uint|Int)8Array\\(([^\\)]+)/)\n ), N = JSON.parse(C[2]), I = new Int8Array(N).buffer;\n return {\n attestation: r,\n authenticatorSelection: {\n userVerification: l,\n // Only include authenticatorAttachment prop if the value is truthy\n ...o && { authenticatorAttachment: o },\n // Only include requireResidentKey prop if the value is of string \"true\"\n ...i === \"true\" && {\n requireResidentKey: !!i\n }\n },\n challenge: I,\n ...f.length && { excludeCredentials: f },\n pubKeyCredParams: A,\n rp: {\n name: w,\n // only add key-value pair if truthy value is provided\n ...a && { id: a }\n },\n timeout: c,\n user: {\n displayName: h,\n id: s.encode(u),\n name: d\n }\n };\n}\nfunction E(t) {\n let s, r;\n t.includes(\"acceptableCredentials\") ? r = e(\n t.match(/acceptableCredentials\"*\\s*=\\s*\\[([^]+)\\s*]/)\n ).trim() : r = e(\n t.match(/allowCredentials\"{0,}:\\s{0,}\\[([^]+)\\s{0,}]/)\n ).trim();\n const c = e(\n t.match(/userVerification\"{0,}:\\s{0,}\"(\\w+)\"/)\n );\n r && (s = (r.split(\"},\") || [r]).map((n) => {\n const u = e(n.match(/type\"{0,}:\\s{0,}\"([\\w-]+)\"/)), d = y(n.match(/id\"{0,}:\\s{0,}new\\s{0,}(Uint|Int)8Array\\(([^\\)]+)/)), h = JSON.parse(d[2]), p = new Int8Array(h).buffer;\n return {\n type: u,\n id: p\n };\n }));\n const l = Number(e(t.match(/timeout\"{0,}:\\s{0,}(\\d+)/))), i = y(\n t.match(/challenge\"{0,}:\\s{0,}new\\s{0,}(Uint|Int)8Array\\(([^\\)]+)/)\n ), o = JSON.parse(i[2]), m = new Int8Array(o).buffer, a = e(t.match(/rpId\"{0,}:\\s{0,}\\\\{0,}\"([^\"\\\\]*)/));\n return {\n challenge: m,\n timeout: l,\n // only add key-value pairs if the truthy values are provided\n ...s && { allowCredentials: s },\n ...c && { userVerification: c },\n ...a && { rpId: a }\n };\n}\nexport {\n E as parseWebAuthnAuthenticateText,\n T as parseWebAuthnRegisterText\n};\n","import { CallbackType as b } from \"../auth/enums.js\";\nimport { WebAuthnStepType as d, WebAuthnOutcomeType as s, WebAuthnOutcome as g } from \"./enums.js\";\nimport { arrayBufferToString as h, parseRelyingPartyId as f, parseCredentials as C, parsePubKeyArray as A } from \"./helpers.js\";\nimport { parseWebAuthnAuthenticateText as E, parseWebAuthnRegisterText as P } from \"./script-parser.js\";\nclass T {\n /**\n * Determines if the given step is a WebAuthn step.\n *\n * @param step The step to evaluate\n * @return A WebAuthnStepType value\n */\n static getWebAuthnStepType(e) {\n const a = this.getOutcomeCallback(e), t = this.getMetadataCallback(e), i = this.getTextOutputCallback(e);\n if (a && t) {\n const n = t.getOutputValue(\"data\");\n return n != null && n.pubKeyCredParams ? d.Registration : d.Authentication;\n } else\n return a && i ? i.getMessage().includes(\"pubKeyCredParams\") ? d.Registration : d.Authentication : d.None;\n }\n /**\n * Populates the step with the necessary authentication outcome.\n *\n * @param step The step that contains WebAuthn authentication data\n * @return The populated step\n */\n static async authenticate(e) {\n const { hiddenCallback: a, metadataCallback: t, textOutputCallback: i } = this.getCallbacks(e);\n if (a && (t || i)) {\n let n;\n try {\n let r;\n if (t) {\n const c = t.getOutputValue(\"data\");\n r = this.createAuthenticationPublicKey(c);\n } else\n i && (r = E(i.getMessage()));\n const o = await this.getAuthenticationCredential(r);\n n = this.getAuthenticationOutcome(o);\n } catch (r) {\n throw r instanceof Error ? r.name === s.NotSupportedError ? (a.setInputValue(g.Unsupported), r) : (a.setInputValue(`${g.Error}::${r.name}:${r.message}`), r) : r;\n }\n return a.setInputValue(n), e;\n } else {\n const n = new Error(\"Incorrect callbacks for WebAuthn authentication\");\n throw n.name = s.DataError, a == null || a.setInputValue(`${g.Error}::${n.name}:${n.message}`), n;\n }\n }\n /**\n * Populates the step with the necessary registration outcome.\n *\n * @param step The step that contains WebAuthn registration data\n * @return The populated step\n */\n // Can make this generic const in Typescript 5.0 > and the name itself will\n // be inferred from the type so `typeof deviceName` will not just return string\n // but the actual name of the deviceName passed in as a generic.\n static async register(e, a) {\n const { hiddenCallback: t, metadataCallback: i, textOutputCallback: n } = this.getCallbacks(e);\n if (t && (i || n)) {\n let r;\n try {\n let o;\n if (i) {\n const c = i.getOutputValue(\"data\");\n o = this.createRegistrationPublicKey(c);\n const l = await this.getRegistrationCredential(\n o\n );\n r = this.getRegistrationOutcome(l);\n } else if (n) {\n o = P(n.getMessage());\n const c = await this.getRegistrationCredential(\n o\n );\n r = this.getRegistrationOutcome(c);\n } else\n throw new Error(\"No Credential found from Public Key\");\n } catch (o) {\n throw o instanceof Error ? o.name === s.NotSupportedError ? (t.setInputValue(g.Unsupported), o) : (t.setInputValue(`${g.Error}::${o.name}:${o.message}`), o) : o;\n }\n return t.setInputValue(\n a && a.length > 0 ? `${r}::${a}` : r\n ), e;\n } else {\n const r = new Error(\"Incorrect callbacks for WebAuthn registration\");\n throw r.name = s.DataError, t == null || t.setInputValue(`${g.Error}::${r.name}:${r.message}`), r;\n }\n }\n /**\n * Returns an object containing the two WebAuthn callbacks.\n *\n * @param step The step that contains WebAuthn callbacks\n * @return The WebAuthn callbacks\n */\n static getCallbacks(e) {\n const a = this.getOutcomeCallback(e), t = this.getMetadataCallback(e), i = this.getTextOutputCallback(e), n = {\n hiddenCallback: a\n };\n return t ? n.metadataCallback = t : i && (n.textOutputCallback = i), n;\n }\n /**\n * Returns the WebAuthn metadata callback containing data to pass to the browser\n * Web Authentication API.\n *\n * @param step The step that contains WebAuthn callbacks\n * @return The metadata callback\n */\n static getMetadataCallback(e) {\n return e.getCallbacksOfType(b.MetadataCallback).find((a) => {\n const t = a.getOutputByName(\"data\", void 0);\n return t && t.hasOwnProperty(\"relyingPartyId\");\n });\n }\n /**\n * Returns the WebAuthn hidden value callback where the outcome should be populated.\n *\n * @param step The step that contains WebAuthn callbacks\n * @return The hidden value callback\n */\n static getOutcomeCallback(e) {\n return e.getCallbacksOfType(b.HiddenValueCallback).find((a) => a.getOutputByName(\"id\", \"\") === \"webAuthnOutcome\");\n }\n /**\n * Returns the WebAuthn metadata callback containing data to pass to the browser\n * Web Authentication API.\n *\n * @param step The step that contains WebAuthn callbacks\n * @return The metadata callback\n */\n static getTextOutputCallback(e) {\n return e.getCallbacksOfType(b.TextOutputCallback).find((a) => {\n const t = a.getOutputByName(\"message\", void 0);\n return t && t.includes(\"webAuthnOutcome\");\n });\n }\n /**\n * Retrieves the credential from the browser Web Authentication API.\n *\n * @param options The public key options associated with the request\n * @return The credential\n */\n static async getAuthenticationCredential(e) {\n if (!window.PublicKeyCredential) {\n const t = new Error(\"PublicKeyCredential not supported by this browser\");\n throw t.name = s.NotSupportedError, t;\n }\n return await navigator.credentials.get({ publicKey: e });\n }\n /**\n * Converts an authentication credential into the outcome expected by OpenAM.\n *\n * @param credential The credential to convert\n * @return The outcome string\n */\n static getAuthenticationOutcome(e) {\n if (e === null) {\n const a = new Error(\"No credential generated from authentication\");\n throw a.name = s.UnknownError, a;\n }\n try {\n const a = h(e.response.clientDataJSON), t = e.response, i = new Int8Array(\n t.authenticatorData\n ).toString(), n = new Int8Array(t.signature).toString(), r = h(e.response.userHandle);\n let o = `${a}::${i}::${n}::${e.id}`;\n return r && (o = `${o}::${r}`), o;\n } catch {\n const t = new Error(\"Transforming credential object to string failed\");\n throw t.name = s.EncodingError, t;\n }\n }\n /**\n * Retrieves the credential from the browser Web Authentication API.\n *\n * @param options The public key options associated with the request\n * @return The credential\n */\n static async getRegistrationCredential(e) {\n if (!window.PublicKeyCredential) {\n const t = new Error(\"PublicKeyCredential not supported by this browser\");\n throw t.name = s.NotSupportedError, t;\n }\n return await navigator.credentials.create({\n publicKey: e\n });\n }\n /**\n * Converts a registration credential into the outcome expected by OpenAM.\n *\n * @param credential The credential to convert\n * @return The outcome string\n */\n static getRegistrationOutcome(e) {\n if (e === null) {\n const a = new Error(\"No credential generated from registration\");\n throw a.name = s.UnknownError, a;\n }\n try {\n const a = h(e.response.clientDataJSON), t = e.response, i = new Int8Array(\n t.attestationObject\n ).toString();\n return `${a}::${i}::${e.id}`;\n } catch {\n const t = new Error(\"Transforming credential object to string failed\");\n throw t.name = s.EncodingError, t;\n }\n }\n /**\n * Converts authentication tree metadata into options required by the browser\n * Web Authentication API.\n *\n * @param metadata The metadata provided in the authentication tree MetadataCallback\n * @return The Web Authentication API request options\n */\n static createAuthenticationPublicKey(e) {\n const {\n acceptableCredentials: a,\n allowCredentials: t,\n challenge: i,\n relyingPartyId: n,\n timeout: r,\n userVerification: o\n } = e, c = f(n), l = C(t || a || \"\");\n return {\n challenge: Uint8Array.from(atob(i), (p) => p.charCodeAt(0)).buffer,\n timeout: r,\n // only add key-value pair if proper value is provided\n ...l && { allowCredentials: l },\n ...o && { userVerification: o },\n ...c && { rpId: c }\n };\n }\n /**\n * Converts authentication tree metadata into options required by the browser\n * Web Authentication API.\n *\n * @param metadata The metadata provided in the authentication tree MetadataCallback\n * @return The Web Authentication API request options\n */\n static createRegistrationPublicKey(e) {\n const { pubKeyCredParams: a } = e, t = A(a);\n if (!t) {\n const u = new Error(\"Missing pubKeyCredParams property from registration options\");\n throw u.name = s.DataError, u;\n }\n const i = C(e.excludeCredentials), {\n attestationPreference: n,\n authenticatorSelection: r,\n challenge: o,\n relyingPartyId: c,\n relyingPartyName: l,\n timeout: p,\n userId: w,\n userName: m,\n displayName: O\n } = e, y = f(c), k = {\n name: l,\n ...y && { id: y }\n };\n return {\n attestation: n,\n authenticatorSelection: JSON.parse(r),\n challenge: Uint8Array.from(atob(o), (u) => u.charCodeAt(0)).buffer,\n ...i.length && { excludeCredentials: i },\n pubKeyCredParams: t,\n rp: k,\n timeout: p,\n user: {\n displayName: O || m,\n id: Int8Array.from(w.split(\"\").map((u) => u.charCodeAt(0))),\n name: m\n }\n };\n }\n}\nexport {\n g as WebAuthnOutcome,\n d as WebAuthnStepType,\n T as default\n};\n","import { getEndpointPath as S, resolve as C, stringify as g } from \"../util/url.js\";\nimport { FRLogger as y } from \"../util/logger.js\";\nfunction P(e, t, n) {\n const i = new Headers(e.headers);\n return t.AuthenticateToServiceConditionAdvice ? i.set(\"X-Tree\", t.AuthenticateToServiceConditionAdvice[0]) : t.TransactionConditionAdvice && i.set(\"X-TxID\", t.TransactionConditionAdvice[0]), n && n.idToken && i.set(\"X-IdToken\", n.idToken), i;\n}\nfunction W(e, t, n) {\n const i = new URL(e);\n if (t.TransactionConditionAdvice) {\n const c = t.TransactionConditionAdvice[0];\n i.searchParams.append(\"_txid\", c);\n }\n return n && n.idToken && i.searchParams.append(\"_idtoken\", n.idToken), i.toString();\n}\nfunction b(e, t, n, i, c) {\n const r = e.advices && e.advices.AuthenticateToServiceConditionAdvice, a = e.advices && e.advices.TransactionConditionAdvice;\n let d = \"\", s = \"\";\n r ? (d = r.reduce((o, u) => {\n const l = o && ` ${o}`;\n return o = `${u}${l}`, o;\n }, \"\"), s = \"AuthenticateToServiceConditionAdvice\") : a && (d = a.reduce((o, u) => {\n const l = o && ` ${o}`;\n return o = `${u}${l}`, o;\n }, \"\"), s = \"TransactionConditionAdvice\");\n const v = \"\", h = ``, T = `${d}`, f = `${v}${h}${T}`, p = S(\"authenticate\", i, c), m = {\n authIndexType: \"composite_advice\",\n authIndexValue: f\n };\n return {\n init: {\n method: \"POST\",\n credentials: \"include\",\n headers: new Headers({\n \"Accept-API-Version\": \"resource=2.0, protocol=1.0\"\n })\n },\n timeout: n,\n url: C(t, `${p}?${g(m)}`)\n };\n}\nfunction H(e) {\n return (e.headers.get(\"Content-Type\") || \"\").includes(\"html\") && e.url.includes(\"composite_advice\");\n}\nfunction L(e) {\n return (e.get(\"WWW-Authenticate\") || \"\").includes(\"advices\");\n}\nasync function w(e) {\n return !!(await e.clone().json()).advices;\n}\nfunction A(e) {\n const n = new URL(e).searchParams.get(\"authIndexValue\") || \"\", i = new DOMParser(), c = decodeURIComponent(n), a = i.parseFromString(c, \"application/xml\").querySelector(\"Value\");\n return a ? a.innerHTML : \"\";\n}\nfunction V(e) {\n const n = (e.split(\",\") || []).find((c) => c.includes(\"advices\")) || \"\";\n let i;\n try {\n const c = n.match(/\"(\\S+)\"/), r = c ? c[1] : \"\", a = atob(r);\n return i = JSON.parse(a), i;\n } catch {\n y.error(\"Could not parse advices value from WWW-Authenticate header\");\n }\n return {};\n}\nfunction z(e) {\n return e.advices && e.advices.AuthenticateToServiceConditionAdvice ? Array.isArray(e.advices.AuthenticateToServiceConditionAdvice) && e.advices.AuthenticateToServiceConditionAdvice.length > 0 : e.advices && e.advices.TransactionConditionAdvice ? Array.isArray(e.advices.TransactionConditionAdvice) && e.advices.TransactionConditionAdvice.length > 0 : !1;\n}\nasync function F(e) {\n return !!(await e.clone().json()).callbacks;\n}\nfunction O(e, t) {\n return typeof t == \"function\" ? t(e) : e.status === 401;\n}\nfunction U(e) {\n const t = {};\n return e.url.includes(\"AuthenticateToServiceConditionAdvice\") ? t.AuthenticateToServiceConditionAdvice = [A(e.url)] : t.TransactionConditionAdvice = [A(e.url)], {\n resource: \"\",\n actions: {},\n attributes: {},\n advices: t,\n ttl: 0\n };\n}\nfunction J(e) {\n const t = e.headers.get(\"WWW-Authenticate\") || \"\", n = V(t);\n return {\n resource: \"\",\n actions: {},\n attributes: {},\n advices: n,\n ttl: 0\n };\n}\nasync function N(e) {\n return await e.json();\n}\nexport {\n P as addAuthzInfoToHeaders,\n W as addAuthzInfoToURL,\n b as buildAuthzOptions,\n H as examineForIGAuthz,\n L as examineForIGAuthzHeader,\n w as examineForRESTAuthz,\n V as getAdvicesFromHeader,\n z as hasAuthzAdvice,\n F as isAuthzStep,\n O as newTokenRequired,\n J as normalizeIGJSONResponseToAdviceJSON,\n U as normalizeIGRedirectResponseToAdviceJSON,\n N as normalizeRESTJSON\n};\n","import z from \"../config/index.js\";\nimport { ActionTypes as S } from \"../config/enums.js\";\nimport T from \"../fr-auth/index.js\";\nimport { StepType as d } from \"../fr-auth/enums.js\";\nimport y from \"../fr-auth/fr-step.js\";\nimport g from \"../token-manager/index.js\";\nimport f from \"../token-storage/index.js\";\nimport { withTimeout as I } from \"../util/timeout.js\";\nimport { newTokenRequired as R, examineForIGAuthzHeader as v, normalizeIGJSONResponseToAdviceJSON as k, examineForIGAuthz as x, normalizeIGRedirectResponseToAdviceJSON as q, examineForRESTAuthz as E, normalizeRESTJSON as N, buildAuthzOptions as O, isAuthzStep as F, hasAuthzAdvice as H, addAuthzInfoToURL as U, addAuthzInfoToHeaders as G } from \"./helpers.js\";\nimport J from \"../util/middleware.js\";\nclass D {\n /**\n * Makes a request using the specified options.\n *\n * @param options The options to use when making the request\n */\n static async request(e) {\n let r = await this._request(e, !1), t, a = !1;\n if (R(r, e.requiresNewToken) && (r = await this._request(e, !0)), e.authorization && e.authorization.handleStep)\n if (r.status === 401 && v(r.headers) ? (a = !0, t = k(r)) : r.redirected && x(r) ? (a = !0, t = q(r)) : await E(r) && (t = await N(r)), t && t.advices) {\n const { middleware: n, realmPath: i, serverConfig: o } = z.get(e.authorization.config), s = O(\n t,\n o.baseUrl,\n e.timeout,\n i,\n o.paths\n ), c = new URL(s.url), u = c.searchParams.get(\"authIndexType\"), m = c.searchParams.get(\"authIndexValue\"), w = J(\n {\n url: new URL(s.url),\n init: s.init\n },\n {\n type: S.StartAuthenticate,\n payload: { type: u, tree: m }\n }\n ), { url: p, init: A } = w(n);\n s.url = p.toString(), s.init = A;\n const h = await this._request(s, !1);\n if (!await F(h))\n throw new Error('Error: Initial response from auth server not a \"step\".');\n if (!H(t))\n throw new Error(\"Error: Transactional or Service Advice is empty.\");\n await this.stepIterator(h, e.authorization.handleStep);\n const l = await f.get();\n a ? e.url = U(e.url, t.advices, l) : e.init.headers = G(\n e.init,\n t.advices,\n l\n ), r = await this._request(e, !1);\n } else\n throw new Error(\"Error: Unable to process advice\");\n return r;\n }\n static async setAuthHeaders(e, r) {\n let t = await f.get();\n return t && t.accessToken && (t = await g.getTokens({ forceRenew: r }), t && t.accessToken && e.set(\"Authorization\", `Bearer ${t.accessToken}`)), e;\n }\n static async stepIterator(e, r) {\n const t = await e.json(), a = new y(t);\n return new Promise(async (n, i) => {\n async function o(s) {\n const c = await r(s), u = await T.next(c, { tree: \"\", type: \"\" });\n u.type === d.LoginSuccess ? n() : u.type === d.LoginFailure ? i(\"Authentication tree failure.\") : o(u);\n }\n o(a);\n });\n }\n static async _request(e, r) {\n const { url: t, init: a, timeout: n } = e;\n let i = new Headers(a.headers || {});\n return e.authorization && i.set(\"x-authenticate-response\", \"header\"), e.bypassAuthentication || (i = await this.setAuthHeaders(i, r)), a.headers = i, I(fetch(t, a), n);\n }\n}\nexport {\n D as default\n};\n","import r from \"../oauth2-client/index.js\";\nclass a {\n /**\n * Gets the current user's profile.\n */\n static getCurrentUser(e) {\n return r.getUserInfo(e);\n }\n}\nexport {\n a as default\n};\n","import { default as t } from \"./auth/index.js\";\nimport { CallbackType as r, ErrorCode as l } from \"./auth/enums.js\";\nimport { default as d } from \"./config/index.js\";\nimport { default as u } from \"./fr-auth/index.js\";\nimport { default as m } from \"./fr-auth/callbacks/index.js\";\nimport { default as c } from \"./fr-auth/callbacks/attribute-input-callback.js\";\nimport { default as n } from \"./fr-auth/callbacks/choice-callback.js\";\nimport { default as b } from \"./fr-auth/callbacks/confirmation-callback.js\";\nimport { default as R } from \"./fr-auth/callbacks/device-profile-callback.js\";\nimport { default as F } from \"./fr-auth/callbacks/hidden-value-callback.js\";\nimport { default as T } from \"./fr-auth/callbacks/kba-create-callback.js\";\nimport { default as h } from \"./fr-auth/callbacks/metadata-callback.js\";\nimport { default as A } from \"./fr-auth/callbacks/name-callback.js\";\nimport { default as M } from \"./fr-auth/callbacks/password-callback.js\";\nimport { default as I } from \"./fr-auth/callbacks/polling-wait-callback.js\";\nimport { default as D } from \"./fr-auth/callbacks/recaptcha-callback.js\";\nimport { default as K } from \"./fr-auth/callbacks/redirect-callback.js\";\nimport { default as U } from \"./fr-auth/callbacks/select-idp-callback.js\";\nimport { default as w } from \"./fr-auth/callbacks/suspended-text-output-callback.js\";\nimport { default as z } from \"./fr-auth/callbacks/terms-and-conditions-callback.js\";\nimport { default as Q } from \"./fr-auth/callbacks/text-input-callback.js\";\nimport { default as q } from \"./fr-auth/callbacks/text-output-callback.js\";\nimport { default as G } from \"./fr-auth/callbacks/validated-create-password-callback.js\";\nimport { default as X } from \"./fr-auth/callbacks/validated-create-username-callback.js\";\nimport { StepType as Z } from \"./fr-auth/enums.js\";\nimport { default as $ } from \"./fr-auth/fr-login-failure.js\";\nimport { default as ea } from \"./fr-auth/callbacks/ping-protect-evaluation-callback.js\";\nimport { default as oa } from \"./fr-auth/callbacks/ping-protect-initialize-callback.js\";\nimport { default as la } from \"./fr-auth/fr-login-success.js\";\nimport { default as da } from \"./fr-auth/fr-step.js\";\nimport { default as ua } from \"./fr-device/index.js\";\nimport { default as ma } from \"./fr-policy/index.js\";\nimport { default as ca } from \"./fr-qr-code/index.js\";\nimport { default as na } from \"./fr-policy/message-creator.js\";\nimport { default as ba } from \"./fr-recovery-codes/index.js\";\nimport { default as Ra } from \"./fr-user/index.js\";\nimport { default as Fa } from \"./fr-webauthn/index.js\";\nimport { default as Ta } from \"./http-client/index.js\";\nimport { default as ha } from \"./oauth2-client/index.js\";\nimport { default as Aa } from \"./session-manager/index.js\";\nimport { default as Ma } from \"./token-manager/index.js\";\nimport { default as Ia } from \"./token-storage/index.js\";\nimport { default as Da } from \"./user-manager/index.js\";\nimport { default as Ka } from \"./util/deferred.js\";\nimport { default as Ua } from \"./util/pkce.js\";\nimport { default as wa } from \"./util/storage.js\";\nimport { PolicyKey as za } from \"./fr-policy/enums.js\";\nimport { ResponseType as Qa } from \"./oauth2-client/enums.js\";\nimport { WebAuthnOutcome as qa, WebAuthnStepType as Ba } from \"./fr-webauthn/enums.js\";\nexport {\n c as AttributeInputCallback,\n t as Auth,\n r as CallbackType,\n n as ChoiceCallback,\n d as Config,\n b as ConfirmationCallback,\n Ka as Deferred,\n R as DeviceProfileCallback,\n l as ErrorCode,\n u as FRAuth,\n m as FRCallback,\n ua as FRDevice,\n $ as FRLoginFailure,\n la as FRLoginSuccess,\n ma as FRPolicy,\n ca as FRQRCode,\n ba as FRRecoveryCodes,\n da as FRStep,\n Ra as FRUser,\n Fa as FRWebAuthn,\n F as HiddenValueCallback,\n Ta as HttpClient,\n T as KbaCreateCallback,\n wa as LocalStorage,\n h as MetadataCallback,\n A as NameCallback,\n ha as OAuth2Client,\n Ua as PKCE,\n M as PasswordCallback,\n ea as PingOneProtectEvaluationCallback,\n oa as PingOneProtectInitializeCallback,\n za as PolicyKey,\n I as PollingWaitCallback,\n D as ReCaptchaCallback,\n K as RedirectCallback,\n Qa as ResponseType,\n U as SelectIdPCallback,\n Aa as SessionManager,\n Z as StepType,\n w as SuspendedTextOutputCallback,\n z as TermsAndConditionsCallback,\n Q as TextInputCallback,\n q as TextOutputCallback,\n Ma as TokenManager,\n Ia as TokenStorage,\n Da as UserManager,\n G as ValidatedCreatePasswordCallback,\n X as ValidatedCreateUsernameCallback,\n qa as WebAuthnOutcome,\n Ba as WebAuthnStepType,\n na as defaultMessageCreator\n};\n","'use client';\nimport ReactExports, { createContext, useContext, useRef, createElement, useReducer, useEffect, useDebugValue, useCallback } from 'react';\nimport { getDefaultStore, createStore } from 'jotai/vanilla';\n\nconst StoreContext = createContext(\n void 0\n);\nconst useStore = (options) => {\n const store = useContext(StoreContext);\n return (options == null ? void 0 : options.store) || store || getDefaultStore();\n};\nconst Provider = ({\n children,\n store\n}) => {\n const storeRef = useRef();\n if (!store && !storeRef.current) {\n storeRef.current = createStore();\n }\n return createElement(\n StoreContext.Provider,\n {\n value: store || storeRef.current\n },\n children\n );\n};\n\nconst isPromiseLike = (x) => typeof (x == null ? void 0 : x.then) === \"function\";\nconst use = ReactExports.use || ((promise) => {\n if (promise.status === \"pending\") {\n throw promise;\n } else if (promise.status === \"fulfilled\") {\n return promise.value;\n } else if (promise.status === \"rejected\") {\n throw promise.reason;\n } else {\n promise.status = \"pending\";\n promise.then(\n (v) => {\n promise.status = \"fulfilled\";\n promise.value = v;\n },\n (e) => {\n promise.status = \"rejected\";\n promise.reason = e;\n }\n );\n throw promise;\n }\n});\nfunction useAtomValue(atom, options) {\n const store = useStore(options);\n const [[valueFromReducer, storeFromReducer, atomFromReducer], rerender] = useReducer(\n (prev) => {\n const nextValue = store.get(atom);\n if (Object.is(prev[0], nextValue) && prev[1] === store && prev[2] === atom) {\n return prev;\n }\n return [nextValue, store, atom];\n },\n void 0,\n () => [store.get(atom), store, atom]\n );\n let value = valueFromReducer;\n if (storeFromReducer !== store || atomFromReducer !== atom) {\n rerender();\n value = store.get(atom);\n }\n const delay = options == null ? void 0 : options.delay;\n useEffect(() => {\n const unsub = store.sub(atom, () => {\n if (typeof delay === \"number\") {\n setTimeout(rerender, delay);\n return;\n }\n rerender();\n });\n rerender();\n return unsub;\n }, [store, atom, delay]);\n useDebugValue(value);\n return isPromiseLike(value) ? use(value) : value;\n}\n\nfunction useSetAtom(atom, options) {\n const store = useStore(options);\n const setAtom = useCallback(\n (...args) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && !(\"write\" in atom)) {\n throw new Error(\"not writable atom\");\n }\n return store.set(atom, ...args);\n },\n [store, atom]\n );\n return setAtom;\n}\n\nfunction useAtom(atom, options) {\n return [\n useAtomValue(atom, options),\n // We do wrong type assertion here, which results in throwing an error.\n useSetAtom(atom, options)\n ];\n}\n\nexport { Provider, useAtom, useAtomValue, useSetAtom, useStore };\n","let keyCount = 0;\nfunction atom(read, write) {\n const key = `atom${++keyCount}`;\n const config = {\n toString: () => key\n };\n if (typeof read === \"function\") {\n config.read = read;\n } else {\n config.init = read;\n config.read = defaultRead;\n config.write = defaultWrite;\n }\n if (write) {\n config.write = write;\n }\n return config;\n}\nfunction defaultRead(get) {\n return get(this);\n}\nfunction defaultWrite(get, set, arg) {\n return set(\n this,\n typeof arg === \"function\" ? arg(get(this)) : arg\n );\n}\n\nconst isSelfAtom = (atom, a) => atom.unstable_is ? atom.unstable_is(a) : a === atom;\nconst hasInitialValue = (atom) => \"init\" in atom;\nconst isActuallyWritableAtom = (atom) => !!atom.write;\nconst CONTINUE_PROMISE = Symbol(\n (import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" ? \"CONTINUE_PROMISE\" : \"\"\n);\nconst PENDING = \"pending\";\nconst FULFILLED = \"fulfilled\";\nconst REJECTED = \"rejected\";\nconst isContinuablePromise = (promise) => typeof promise === \"object\" && promise !== null && CONTINUE_PROMISE in promise;\nconst continuablePromiseMap = /* @__PURE__ */ new WeakMap();\nconst createContinuablePromise = (promise, abort, complete) => {\n if (!continuablePromiseMap.has(promise)) {\n let continuePromise;\n const p = new Promise((resolve, reject) => {\n let curr = promise;\n const onFulfilled = (me) => (v) => {\n if (curr === me) {\n p.status = FULFILLED;\n p.value = v;\n resolve(v);\n complete();\n }\n };\n const onRejected = (me) => (e) => {\n if (curr === me) {\n p.status = REJECTED;\n p.reason = e;\n reject(e);\n complete();\n }\n };\n promise.then(onFulfilled(promise), onRejected(promise));\n continuePromise = (nextPromise, nextAbort) => {\n if (nextPromise) {\n continuablePromiseMap.set(nextPromise, p);\n curr = nextPromise;\n nextPromise.then(onFulfilled(nextPromise), onRejected(nextPromise));\n abort();\n abort = nextAbort;\n }\n };\n });\n p.status = PENDING;\n p[CONTINUE_PROMISE] = continuePromise;\n continuablePromiseMap.set(promise, p);\n }\n return continuablePromiseMap.get(promise);\n};\nconst isPromiseLike = (x) => typeof (x == null ? void 0 : x.then) === \"function\";\nconst isAtomStateInitialized = (atomState) => \"v\" in atomState || \"e\" in atomState;\nconst returnAtomValue = (atomState) => {\n if (\"e\" in atomState) {\n throw atomState.e;\n }\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && !(\"v\" in atomState)) {\n throw new Error(\"[Bug] atom state is not initialized\");\n }\n return atomState.v;\n};\nconst getPendingContinuablePromise = (atomState) => {\n const value = atomState.v;\n if (isContinuablePromise(value) && value.status === PENDING) {\n return value;\n }\n return null;\n};\nconst addPendingContinuablePromiseToDependency = (atom, promise, dependencyAtomState) => {\n if (!dependencyAtomState.p.has(atom)) {\n dependencyAtomState.p.add(atom);\n promise.then(\n () => {\n dependencyAtomState.p.delete(atom);\n },\n () => {\n dependencyAtomState.p.delete(atom);\n }\n );\n }\n};\nconst createPending = () => [/* @__PURE__ */ new Map(), /* @__PURE__ */ new Map(), /* @__PURE__ */ new Set()];\nconst addPendingAtom = (pending, atom, atomState) => {\n if (!pending[0].has(atom)) {\n pending[0].set(atom, /* @__PURE__ */ new Set());\n }\n pending[1].set(atom, atomState);\n};\nconst addPendingDependent = (pending, atom, dependent) => {\n const dependents = pending[0].get(atom);\n if (dependents) {\n dependents.add(dependent);\n }\n};\nconst getPendingDependents = (pending, atom) => pending[0].get(atom);\nconst addPendingFunction = (pending, fn) => {\n pending[2].add(fn);\n};\nconst flushPending = (pending) => {\n while (pending[1].size || pending[2].size) {\n pending[0].clear();\n const atomStates = new Set(pending[1].values());\n pending[1].clear();\n const functions = new Set(pending[2]);\n pending[2].clear();\n atomStates.forEach((atomState) => {\n var _a;\n return (_a = atomState.m) == null ? void 0 : _a.l.forEach((l) => l());\n });\n functions.forEach((fn) => fn());\n }\n};\nconst createStore = () => {\n const atomStateMap = /* @__PURE__ */ new WeakMap();\n let debugMountedAtoms;\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n debugMountedAtoms = /* @__PURE__ */ new Set();\n }\n const getAtomState = (atom) => {\n let atomState = atomStateMap.get(atom);\n if (!atomState) {\n atomState = { d: /* @__PURE__ */ new Map(), p: /* @__PURE__ */ new Set(), n: 0 };\n atomStateMap.set(atom, atomState);\n }\n return atomState;\n };\n const setAtomStateValueOrPromise = (atom, atomState, valueOrPromise, abortPromise = () => {\n }, completePromise = () => {\n }) => {\n const hasPrevValue = \"v\" in atomState;\n const prevValue = atomState.v;\n const pendingPromise = getPendingContinuablePromise(atomState);\n if (isPromiseLike(valueOrPromise)) {\n if (pendingPromise) {\n if (pendingPromise !== valueOrPromise) {\n pendingPromise[CONTINUE_PROMISE](valueOrPromise, abortPromise);\n ++atomState.n;\n }\n } else {\n const continuablePromise = createContinuablePromise(\n valueOrPromise,\n abortPromise,\n completePromise\n );\n if (continuablePromise.status === PENDING) {\n for (const a of atomState.d.keys()) {\n const aState = getAtomState(a);\n addPendingContinuablePromiseToDependency(\n atom,\n continuablePromise,\n aState\n );\n }\n }\n atomState.v = continuablePromise;\n delete atomState.e;\n }\n } else {\n if (pendingPromise) {\n pendingPromise[CONTINUE_PROMISE](\n Promise.resolve(valueOrPromise),\n abortPromise\n );\n }\n atomState.v = valueOrPromise;\n delete atomState.e;\n }\n if (!hasPrevValue || !Object.is(prevValue, atomState.v)) {\n ++atomState.n;\n }\n };\n const addDependency = (pending, atom, a, aState) => {\n var _a;\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && a === atom) {\n throw new Error(\"[Bug] atom cannot depend on itself\");\n }\n const atomState = getAtomState(atom);\n atomState.d.set(a, aState.n);\n const continuablePromise = getPendingContinuablePromise(atomState);\n if (continuablePromise) {\n addPendingContinuablePromiseToDependency(atom, continuablePromise, aState);\n }\n (_a = aState.m) == null ? void 0 : _a.t.add(atom);\n if (pending) {\n addPendingDependent(pending, a, atom);\n }\n };\n const readAtomState = (pending, atom, force) => {\n const atomState = getAtomState(atom);\n if (!(force == null ? void 0 : force(atom)) && isAtomStateInitialized(atomState)) {\n if (atomState.m) {\n return atomState;\n }\n if (Array.from(atomState.d).every(\n ([a, n]) => (\n // Recursively, read the atom state of the dependency, and\n // check if the atom epoch number is unchanged\n readAtomState(pending, a, force).n === n\n )\n )) {\n return atomState;\n }\n }\n atomState.d.clear();\n let isSync = true;\n const getter = (a) => {\n if (isSelfAtom(atom, a)) {\n const aState2 = getAtomState(a);\n if (!isAtomStateInitialized(aState2)) {\n if (hasInitialValue(a)) {\n setAtomStateValueOrPromise(a, aState2, a.init);\n } else {\n throw new Error(\"no atom init\");\n }\n }\n return returnAtomValue(aState2);\n }\n const aState = readAtomState(pending, a, force);\n if (isSync) {\n addDependency(pending, atom, a, aState);\n } else {\n const pending2 = createPending();\n addDependency(pending2, atom, a, aState);\n mountDependencies(pending2, atom, atomState);\n flushPending(pending2);\n }\n return returnAtomValue(aState);\n };\n let controller;\n let setSelf;\n const options = {\n get signal() {\n if (!controller) {\n controller = new AbortController();\n }\n return controller.signal;\n },\n get setSelf() {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && !isActuallyWritableAtom(atom)) {\n console.warn(\"setSelf function cannot be used with read-only atom\");\n }\n if (!setSelf && isActuallyWritableAtom(atom)) {\n setSelf = (...args) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && isSync) {\n console.warn(\"setSelf function cannot be called in sync\");\n }\n if (!isSync) {\n return writeAtom(atom, ...args);\n }\n };\n }\n return setSelf;\n }\n };\n try {\n const valueOrPromise = atom.read(getter, options);\n setAtomStateValueOrPromise(\n atom,\n atomState,\n valueOrPromise,\n () => controller == null ? void 0 : controller.abort(),\n () => {\n if (atomState.m) {\n const pending2 = createPending();\n mountDependencies(pending2, atom, atomState);\n flushPending(pending2);\n }\n }\n );\n return atomState;\n } catch (error) {\n delete atomState.v;\n atomState.e = error;\n ++atomState.n;\n return atomState;\n } finally {\n isSync = false;\n }\n };\n const readAtom = (atom) => returnAtomValue(readAtomState(void 0, atom));\n const recomputeDependents = (pending, atom) => {\n const getDependents = (a) => {\n var _a, _b;\n const aState = getAtomState(a);\n const dependents = new Set((_a = aState.m) == null ? void 0 : _a.t);\n for (const atomWithPendingContinuablePromise of aState.p) {\n dependents.add(atomWithPendingContinuablePromise);\n }\n (_b = getPendingDependents(pending, a)) == null ? void 0 : _b.forEach((dependent) => {\n dependents.add(dependent);\n });\n return dependents;\n };\n const topsortedAtoms = [];\n const markedAtoms = /* @__PURE__ */ new Set();\n const visit = (n) => {\n if (markedAtoms.has(n)) {\n return;\n }\n markedAtoms.add(n);\n for (const m of getDependents(n)) {\n if (n !== m) {\n visit(m);\n }\n }\n topsortedAtoms.push(n);\n };\n visit(atom);\n const changedAtoms = /* @__PURE__ */ new Set([atom]);\n const isMarked = (a) => markedAtoms.has(a);\n for (let i = topsortedAtoms.length - 1; i >= 0; --i) {\n const a = topsortedAtoms[i];\n const aState = getAtomState(a);\n const prevEpochNumber = aState.n;\n let hasChangedDeps = false;\n for (const dep of aState.d.keys()) {\n if (dep !== a && changedAtoms.has(dep)) {\n hasChangedDeps = true;\n break;\n }\n }\n if (hasChangedDeps) {\n readAtomState(pending, a, isMarked);\n mountDependencies(pending, a, aState);\n if (prevEpochNumber !== aState.n) {\n addPendingAtom(pending, a, aState);\n changedAtoms.add(a);\n }\n }\n markedAtoms.delete(a);\n }\n };\n const writeAtomState = (pending, atom, ...args) => {\n const getter = (a) => returnAtomValue(readAtomState(pending, a));\n const setter = (a, ...args2) => {\n let r;\n if (isSelfAtom(atom, a)) {\n if (!hasInitialValue(a)) {\n throw new Error(\"atom not writable\");\n }\n const aState = getAtomState(a);\n const hasPrevValue = \"v\" in aState;\n const prevValue = aState.v;\n const v = args2[0];\n setAtomStateValueOrPromise(a, aState, v);\n mountDependencies(pending, a, aState);\n if (!hasPrevValue || !Object.is(prevValue, aState.v)) {\n addPendingAtom(pending, a, aState);\n recomputeDependents(pending, a);\n }\n } else {\n r = writeAtomState(pending, a, ...args2);\n }\n flushPending(pending);\n return r;\n };\n const result = atom.write(getter, setter, ...args);\n return result;\n };\n const writeAtom = (atom, ...args) => {\n const pending = createPending();\n const result = writeAtomState(pending, atom, ...args);\n flushPending(pending);\n return result;\n };\n const mountDependencies = (pending, atom, atomState) => {\n if (atomState.m && !getPendingContinuablePromise(atomState)) {\n for (const a of atomState.d.keys()) {\n if (!atomState.m.d.has(a)) {\n const aMounted = mountAtom(pending, a);\n aMounted.t.add(atom);\n atomState.m.d.add(a);\n }\n }\n for (const a of atomState.m.d || []) {\n if (!atomState.d.has(a)) {\n const aMounted = unmountAtom(pending, a);\n aMounted == null ? void 0 : aMounted.t.delete(atom);\n atomState.m.d.delete(a);\n }\n }\n }\n };\n const mountAtom = (pending, atom) => {\n const atomState = getAtomState(atom);\n if (!atomState.m) {\n readAtomState(pending, atom);\n for (const a of atomState.d.keys()) {\n const aMounted = mountAtom(pending, a);\n aMounted.t.add(atom);\n }\n atomState.m = {\n l: /* @__PURE__ */ new Set(),\n d: new Set(atomState.d.keys()),\n t: /* @__PURE__ */ new Set()\n };\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n debugMountedAtoms.add(atom);\n }\n if (isActuallyWritableAtom(atom) && atom.onMount) {\n const mounted = atomState.m;\n const { onMount } = atom;\n addPendingFunction(pending, () => {\n const onUnmount = onMount(\n (...args) => writeAtomState(pending, atom, ...args)\n );\n if (onUnmount) {\n mounted.u = onUnmount;\n }\n });\n }\n }\n return atomState.m;\n };\n const unmountAtom = (pending, atom) => {\n const atomState = getAtomState(atom);\n if (atomState.m && !atomState.m.l.size && !Array.from(atomState.m.t).some((a) => getAtomState(a).m)) {\n const onUnmount = atomState.m.u;\n if (onUnmount) {\n addPendingFunction(pending, onUnmount);\n }\n delete atomState.m;\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n debugMountedAtoms.delete(atom);\n }\n for (const a of atomState.d.keys()) {\n const aMounted = unmountAtom(pending, a);\n aMounted == null ? void 0 : aMounted.t.delete(atom);\n }\n const pendingPromise = getPendingContinuablePromise(atomState);\n if (pendingPromise) {\n pendingPromise[CONTINUE_PROMISE](void 0, () => {\n });\n }\n return void 0;\n }\n return atomState.m;\n };\n const subscribeAtom = (atom, listener) => {\n const pending = createPending();\n const mounted = mountAtom(pending, atom);\n flushPending(pending);\n const listeners = mounted.l;\n listeners.add(listener);\n return () => {\n listeners.delete(listener);\n const pending2 = createPending();\n unmountAtom(pending2, atom);\n flushPending(pending2);\n };\n };\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n const store = {\n get: readAtom,\n set: writeAtom,\n sub: subscribeAtom,\n // store dev methods (these are tentative and subject to change without notice)\n dev4_get_internal_weak_map: () => atomStateMap,\n dev4_get_mounted_atoms: () => debugMountedAtoms,\n dev4_restore_atoms: (values) => {\n const pending = createPending();\n for (const [atom, value] of values) {\n if (hasInitialValue(atom)) {\n const aState = getAtomState(atom);\n const hasPrevValue = \"v\" in aState;\n const prevValue = aState.v;\n setAtomStateValueOrPromise(atom, aState, value);\n mountDependencies(pending, atom, aState);\n if (!hasPrevValue || !Object.is(prevValue, aState.v)) {\n addPendingAtom(pending, atom, aState);\n recomputeDependents(pending, atom);\n }\n }\n }\n flushPending(pending);\n }\n };\n return store;\n }\n return {\n get: readAtom,\n set: writeAtom,\n sub: subscribeAtom\n };\n};\nlet defaultStore;\nconst getDefaultStore = () => {\n if (!defaultStore) {\n defaultStore = createStore();\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n globalThis.__JOTAI_DEFAULT_STORE__ || (globalThis.__JOTAI_DEFAULT_STORE__ = defaultStore);\n if (globalThis.__JOTAI_DEFAULT_STORE__ !== defaultStore) {\n console.warn(\n \"Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044\"\n );\n }\n }\n }\n return defaultStore;\n};\n\nexport { atom, createStore, getDefaultStore };\n","import { atom } from 'jotai/vanilla';\n\nconst RESET = Symbol(\n (import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" ? \"RESET\" : \"\"\n);\n\nfunction atomWithReset(initialValue) {\n const anAtom = atom(\n initialValue,\n (get, set, update) => {\n const nextValue = typeof update === \"function\" ? update(get(anAtom)) : update;\n set(anAtom, nextValue === RESET ? initialValue : nextValue);\n }\n );\n return anAtom;\n}\n\nfunction atomWithReducer(initialValue, reducer) {\n return atom(initialValue, function(get, set, action) {\n set(this, reducer(get(this), action));\n });\n}\n\nfunction atomFamily(initializeAtom, areEqual) {\n let shouldRemove = null;\n const atoms = /* @__PURE__ */ new Map();\n const createAtom = (param) => {\n let item;\n if (areEqual === void 0) {\n item = atoms.get(param);\n } else {\n for (const [key, value] of atoms) {\n if (areEqual(key, param)) {\n item = value;\n break;\n }\n }\n }\n if (item !== void 0) {\n if (shouldRemove == null ? void 0 : shouldRemove(item[1], param)) {\n createAtom.remove(param);\n } else {\n return item[0];\n }\n }\n const newAtom = initializeAtom(param);\n atoms.set(param, [newAtom, Date.now()]);\n return newAtom;\n };\n createAtom.remove = (param) => {\n if (areEqual === void 0) {\n atoms.delete(param);\n } else {\n for (const [key] of atoms) {\n if (areEqual(key, param)) {\n atoms.delete(key);\n break;\n }\n }\n }\n };\n createAtom.setShouldRemove = (fn) => {\n shouldRemove = fn;\n if (!shouldRemove) return;\n for (const [key, value] of atoms) {\n if (shouldRemove(value[1], key)) {\n atoms.delete(key);\n }\n }\n };\n return createAtom;\n}\n\nconst getCached$2 = (c, m, k) => (m.has(k) ? m : m.set(k, c())).get(k);\nconst cache1$3 = /* @__PURE__ */ new WeakMap();\nconst memo3 = (create, dep1, dep2, dep3) => {\n const cache2 = getCached$2(() => /* @__PURE__ */ new WeakMap(), cache1$3, dep1);\n const cache3 = getCached$2(() => /* @__PURE__ */ new WeakMap(), cache2, dep2);\n return getCached$2(create, cache3, dep3);\n};\nfunction selectAtom(anAtom, selector, equalityFn = Object.is) {\n return memo3(\n () => {\n const EMPTY = Symbol();\n const selectValue = ([value, prevSlice]) => {\n if (prevSlice === EMPTY) {\n return selector(value);\n }\n const slice = selector(value, prevSlice);\n return equalityFn(prevSlice, slice) ? prevSlice : slice;\n };\n const derivedAtom = atom((get) => {\n const prev = get(derivedAtom);\n const value = get(anAtom);\n return selectValue([value, prev]);\n });\n derivedAtom.init = EMPTY;\n return derivedAtom;\n },\n anAtom,\n selector,\n equalityFn\n );\n}\n\nconst frozenAtoms = /* @__PURE__ */ new WeakSet();\nconst deepFreeze = (obj) => {\n if (typeof obj !== \"object\" || obj === null) return;\n Object.freeze(obj);\n const propNames = Object.getOwnPropertyNames(obj);\n for (const name of propNames) {\n const value = obj[name];\n deepFreeze(value);\n }\n return obj;\n};\nfunction freezeAtom(anAtom) {\n if (frozenAtoms.has(anAtom)) {\n return anAtom;\n }\n frozenAtoms.add(anAtom);\n const origRead = anAtom.read;\n anAtom.read = function(get, options) {\n return deepFreeze(origRead.call(this, get, options));\n };\n if (\"write\" in anAtom) {\n const origWrite = anAtom.write;\n anAtom.write = function(get, set, ...args) {\n return origWrite.call(\n this,\n get,\n (...setArgs) => {\n if (setArgs[0] === anAtom) {\n setArgs[1] = deepFreeze(setArgs[1]);\n }\n return set(...setArgs);\n },\n ...args\n );\n };\n }\n return anAtom;\n}\nfunction freezeAtomCreator(createAtom) {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n console.warn(\n \"[DEPRECATED] freezeAtomCreator is deprecated, define it on users end\"\n );\n }\n return (...args) => freezeAtom(createAtom(...args));\n}\n\nconst getCached$1 = (c, m, k) => (m.has(k) ? m : m.set(k, c())).get(k);\nconst cache1$2 = /* @__PURE__ */ new WeakMap();\nconst memo2$1 = (create, dep1, dep2) => {\n const cache2 = getCached$1(() => /* @__PURE__ */ new WeakMap(), cache1$2, dep1);\n return getCached$1(create, cache2, dep2);\n};\nconst cacheKeyForEmptyKeyExtractor = {};\nconst isWritable = (atom2) => !!atom2.write;\nconst isFunction = (x) => typeof x === \"function\";\nfunction splitAtom(arrAtom, keyExtractor) {\n return memo2$1(\n () => {\n const mappingCache = /* @__PURE__ */ new WeakMap();\n const getMapping = (arr, prev) => {\n let mapping = mappingCache.get(arr);\n if (mapping) {\n return mapping;\n }\n const prevMapping = prev && mappingCache.get(prev);\n const atomList = [];\n const keyList = [];\n arr.forEach((item, index) => {\n const key = keyExtractor ? keyExtractor(item) : index;\n keyList[index] = key;\n const cachedAtom = prevMapping && prevMapping.atomList[prevMapping.keyList.indexOf(key)];\n if (cachedAtom) {\n atomList[index] = cachedAtom;\n return;\n }\n const read = (get) => {\n const prev2 = get(mappingAtom);\n const currArr = get(arrAtom);\n const mapping2 = getMapping(currArr, prev2 == null ? void 0 : prev2.arr);\n const index2 = mapping2.keyList.indexOf(key);\n if (index2 < 0 || index2 >= currArr.length) {\n const prevItem = arr[getMapping(arr).keyList.indexOf(key)];\n if (prevItem) {\n return prevItem;\n }\n throw new Error(\"splitAtom: index out of bounds for read\");\n }\n return currArr[index2];\n };\n const write = (get, set, update) => {\n const prev2 = get(mappingAtom);\n const arr2 = get(arrAtom);\n const mapping2 = getMapping(arr2, prev2 == null ? void 0 : prev2.arr);\n const index2 = mapping2.keyList.indexOf(key);\n if (index2 < 0 || index2 >= arr2.length) {\n throw new Error(\"splitAtom: index out of bounds for write\");\n }\n const nextItem = isFunction(update) ? update(arr2[index2]) : update;\n if (!Object.is(arr2[index2], nextItem)) {\n set(arrAtom, [\n ...arr2.slice(0, index2),\n nextItem,\n ...arr2.slice(index2 + 1)\n ]);\n }\n };\n atomList[index] = isWritable(arrAtom) ? atom(read, write) : atom(read);\n });\n if (prevMapping && prevMapping.keyList.length === keyList.length && prevMapping.keyList.every((x, i) => x === keyList[i])) {\n mapping = prevMapping;\n } else {\n mapping = { arr, atomList, keyList };\n }\n mappingCache.set(arr, mapping);\n return mapping;\n };\n const mappingAtom = atom((get) => {\n const prev = get(mappingAtom);\n const arr = get(arrAtom);\n const mapping = getMapping(arr, prev == null ? void 0 : prev.arr);\n return mapping;\n });\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n mappingAtom.debugPrivate = true;\n }\n mappingAtom.init = void 0;\n const splittedAtom = isWritable(arrAtom) ? atom(\n (get) => get(mappingAtom).atomList,\n (get, set, action) => {\n switch (action.type) {\n case \"remove\": {\n const index = get(splittedAtom).indexOf(action.atom);\n if (index >= 0) {\n const arr = get(arrAtom);\n set(arrAtom, [\n ...arr.slice(0, index),\n ...arr.slice(index + 1)\n ]);\n }\n break;\n }\n case \"insert\": {\n const index = action.before ? get(splittedAtom).indexOf(action.before) : get(splittedAtom).length;\n if (index >= 0) {\n const arr = get(arrAtom);\n set(arrAtom, [\n ...arr.slice(0, index),\n action.value,\n ...arr.slice(index)\n ]);\n }\n break;\n }\n case \"move\": {\n const index1 = get(splittedAtom).indexOf(action.atom);\n const index2 = action.before ? get(splittedAtom).indexOf(action.before) : get(splittedAtom).length;\n if (index1 >= 0 && index2 >= 0) {\n const arr = get(arrAtom);\n if (index1 < index2) {\n set(arrAtom, [\n ...arr.slice(0, index1),\n ...arr.slice(index1 + 1, index2),\n arr[index1],\n ...arr.slice(index2)\n ]);\n } else {\n set(arrAtom, [\n ...arr.slice(0, index2),\n arr[index1],\n ...arr.slice(index2, index1),\n ...arr.slice(index1 + 1)\n ]);\n }\n }\n break;\n }\n }\n }\n ) : atom((get) => get(mappingAtom).atomList);\n return splittedAtom;\n },\n arrAtom,\n keyExtractor || cacheKeyForEmptyKeyExtractor\n );\n}\n\nfunction atomWithDefault(getDefault) {\n const EMPTY = Symbol();\n const overwrittenAtom = atom(EMPTY);\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n overwrittenAtom.debugPrivate = true;\n }\n const anAtom = atom(\n (get, options) => {\n const overwritten = get(overwrittenAtom);\n if (overwritten !== EMPTY) {\n return overwritten;\n }\n return getDefault(get, options);\n },\n (get, set, update) => {\n if (update === RESET) {\n set(overwrittenAtom, EMPTY);\n } else if (typeof update === \"function\") {\n const prevValue = get(anAtom);\n set(overwrittenAtom, update(prevValue));\n } else {\n set(overwrittenAtom, update);\n }\n }\n );\n return anAtom;\n}\n\nconst isPromiseLike = (x) => typeof (x == null ? void 0 : x.then) === \"function\";\nfunction withStorageValidator(validator) {\n return (unknownStorage) => {\n const storage = {\n ...unknownStorage,\n getItem: (key, initialValue) => {\n const validate = (value2) => {\n if (!validator(value2)) {\n return initialValue;\n }\n return value2;\n };\n const value = unknownStorage.getItem(key, initialValue);\n if (isPromiseLike(value)) {\n return value.then(validate);\n }\n return validate(value);\n }\n };\n return storage;\n };\n}\nfunction createJSONStorage(getStringStorage = () => {\n try {\n return window.localStorage;\n } catch (e) {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n if (typeof window !== \"undefined\") {\n console.warn(e);\n }\n }\n return void 0;\n }\n}, options) {\n var _a;\n let lastStr;\n let lastValue;\n const storage = {\n getItem: (key, initialValue) => {\n var _a2, _b;\n const parse = (str2) => {\n str2 = str2 || \"\";\n if (lastStr !== str2) {\n try {\n lastValue = JSON.parse(str2, options == null ? void 0 : options.reviver);\n } catch (e) {\n return initialValue;\n }\n lastStr = str2;\n }\n return lastValue;\n };\n const str = (_b = (_a2 = getStringStorage()) == null ? void 0 : _a2.getItem(key)) != null ? _b : null;\n if (isPromiseLike(str)) {\n return str.then(parse);\n }\n return parse(str);\n },\n setItem: (key, newValue) => {\n var _a2;\n return (_a2 = getStringStorage()) == null ? void 0 : _a2.setItem(\n key,\n JSON.stringify(newValue, options == null ? void 0 : options.replacer)\n );\n },\n removeItem: (key) => {\n var _a2;\n return (_a2 = getStringStorage()) == null ? void 0 : _a2.removeItem(key);\n }\n };\n const createHandleSubscribe = (subscriber2) => (key, callback, initialValue) => subscriber2(key, (v) => {\n let newValue;\n try {\n newValue = JSON.parse(v || \"\");\n } catch (e) {\n newValue = initialValue;\n }\n callback(newValue);\n });\n let subscriber;\n try {\n subscriber = (_a = getStringStorage()) == null ? void 0 : _a.subscribe;\n } catch (e) {\n }\n if (!subscriber && typeof window !== \"undefined\" && typeof window.addEventListener === \"function\" && window.Storage) {\n subscriber = (key, callback) => {\n if (!(getStringStorage() instanceof window.Storage)) {\n return () => {\n };\n }\n const storageEventCallback = (e) => {\n if (e.storageArea === getStringStorage() && e.key === key) {\n callback(e.newValue);\n }\n };\n window.addEventListener(\"storage\", storageEventCallback);\n return () => {\n window.removeEventListener(\"storage\", storageEventCallback);\n };\n };\n }\n if (subscriber) {\n storage.subscribe = createHandleSubscribe(subscriber);\n }\n return storage;\n}\nconst defaultStorage = createJSONStorage();\nfunction atomWithStorage(key, initialValue, storage = defaultStorage, options) {\n const getOnInit = options == null ? void 0 : options.getOnInit;\n const baseAtom = atom(\n getOnInit ? storage.getItem(key, initialValue) : initialValue\n );\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n baseAtom.debugPrivate = true;\n }\n baseAtom.onMount = (setAtom) => {\n setAtom(storage.getItem(key, initialValue));\n let unsub;\n if (storage.subscribe) {\n unsub = storage.subscribe(key, setAtom, initialValue);\n }\n return unsub;\n };\n const anAtom = atom(\n (get) => get(baseAtom),\n (get, set, update) => {\n const nextValue = typeof update === \"function\" ? update(get(baseAtom)) : update;\n if (nextValue === RESET) {\n set(baseAtom, initialValue);\n return storage.removeItem(key);\n }\n if (nextValue instanceof Promise) {\n return nextValue.then((resolvedValue) => {\n set(baseAtom, resolvedValue);\n return storage.setItem(key, resolvedValue);\n });\n }\n set(baseAtom, nextValue);\n return storage.setItem(key, nextValue);\n }\n );\n return anAtom;\n}\n\nfunction atomWithObservable(getObservable, options) {\n const returnResultData = (result) => {\n if (\"e\" in result) {\n throw result.e;\n }\n return result.d;\n };\n const observableResultAtom = atom((get) => {\n var _a;\n let observable = getObservable(get);\n const itself = (_a = observable[Symbol.observable]) == null ? void 0 : _a.call(observable);\n if (itself) {\n observable = itself;\n }\n let resolve;\n const makePending = () => new Promise((r) => {\n resolve = r;\n });\n const initialResult = options && \"initialValue\" in options ? {\n d: typeof options.initialValue === \"function\" ? options.initialValue() : options.initialValue\n } : makePending();\n let setResult;\n let lastResult;\n const listener = (result) => {\n lastResult = result;\n resolve == null ? void 0 : resolve(result);\n setResult == null ? void 0 : setResult(result);\n };\n let subscription;\n let timer;\n const isNotMounted = () => !setResult;\n const start = () => {\n if (subscription) {\n clearTimeout(timer);\n subscription.unsubscribe();\n }\n subscription = observable.subscribe({\n next: (d) => listener({ d }),\n error: (e) => listener({ e }),\n complete: () => {\n }\n });\n if (isNotMounted() && (options == null ? void 0 : options.unstable_timeout)) {\n timer = setTimeout(() => {\n if (subscription) {\n subscription.unsubscribe();\n subscription = void 0;\n }\n }, options.unstable_timeout);\n }\n };\n start();\n const resultAtom = atom(lastResult || initialResult);\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n resultAtom.debugPrivate = true;\n }\n resultAtom.onMount = (update) => {\n setResult = update;\n if (lastResult) {\n update(lastResult);\n }\n if (subscription) {\n clearTimeout(timer);\n } else {\n start();\n }\n return () => {\n setResult = void 0;\n if (subscription) {\n subscription.unsubscribe();\n subscription = void 0;\n }\n };\n };\n return [resultAtom, observable, makePending, start, isNotMounted];\n });\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n observableResultAtom.debugPrivate = true;\n }\n const observableAtom = atom(\n (get) => {\n const [resultAtom] = get(observableResultAtom);\n const result = get(resultAtom);\n if (result instanceof Promise) {\n return result.then(returnResultData);\n }\n return returnResultData(result);\n },\n (get, set, data) => {\n const [resultAtom, observable, makePending, start, isNotMounted] = get(observableResultAtom);\n if (\"next\" in observable) {\n if (isNotMounted()) {\n set(resultAtom, makePending());\n start();\n }\n observable.next(data);\n } else {\n throw new Error(\"observable is not subject\");\n }\n }\n );\n return observableAtom;\n}\n\nconst cache1$1 = /* @__PURE__ */ new WeakMap();\nconst memo1 = (create, dep1) => (cache1$1.has(dep1) ? cache1$1 : cache1$1.set(dep1, create())).get(dep1);\nconst isPromise$1 = (x) => x instanceof Promise;\nconst LOADING = { state: \"loading\" };\nfunction loadable(anAtom) {\n return memo1(() => {\n const loadableCache = /* @__PURE__ */ new WeakMap();\n const refreshAtom = atom(0);\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n refreshAtom.debugPrivate = true;\n }\n const derivedAtom = atom(\n (get, { setSelf }) => {\n get(refreshAtom);\n let value;\n try {\n value = get(anAtom);\n } catch (error) {\n return { state: \"hasError\", error };\n }\n if (!isPromise$1(value)) {\n return { state: \"hasData\", data: value };\n }\n const promise = value;\n const cached1 = loadableCache.get(promise);\n if (cached1) {\n return cached1;\n }\n if (promise.status === \"fulfilled\") {\n loadableCache.set(promise, { state: \"hasData\", data: promise.value });\n } else if (promise.status === \"rejected\") {\n loadableCache.set(promise, {\n state: \"hasError\",\n error: promise.reason\n });\n } else {\n promise.then(\n (data) => {\n loadableCache.set(promise, { state: \"hasData\", data });\n },\n (error) => {\n loadableCache.set(promise, { state: \"hasError\", error });\n }\n ).finally(setSelf);\n }\n const cached2 = loadableCache.get(promise);\n if (cached2) {\n return cached2;\n }\n loadableCache.set(promise, LOADING);\n return LOADING;\n },\n (_get, set) => {\n set(refreshAtom, (c) => c + 1);\n }\n );\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n derivedAtom.debugPrivate = true;\n }\n return atom((get) => get(derivedAtom));\n }, anAtom);\n}\n\nconst getCached = (c, m, k) => (m.has(k) ? m : m.set(k, c())).get(k);\nconst cache1 = /* @__PURE__ */ new WeakMap();\nconst memo2 = (create, dep1, dep2) => {\n const cache2 = getCached(() => /* @__PURE__ */ new WeakMap(), cache1, dep1);\n return getCached(create, cache2, dep2);\n};\nconst isPromise = (x) => x instanceof Promise;\nconst defaultFallback = () => void 0;\nfunction unwrap(anAtom, fallback = defaultFallback) {\n return memo2(\n () => {\n const promiseErrorCache = /* @__PURE__ */ new WeakMap();\n const promiseResultCache = /* @__PURE__ */ new WeakMap();\n const refreshAtom = atom(0);\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n refreshAtom.debugPrivate = true;\n }\n const promiseAndValueAtom = atom(\n (get, { setSelf }) => {\n get(refreshAtom);\n const prev = get(promiseAndValueAtom);\n const promise = get(anAtom);\n if (!isPromise(promise)) {\n return { v: promise };\n }\n if (promise !== (prev == null ? void 0 : prev.p)) {\n if (promise.status === \"fulfilled\") {\n promiseResultCache.set(promise, promise.value);\n } else if (promise.status === \"rejected\") {\n promiseErrorCache.set(promise, promise.reason);\n } else {\n promise.then(\n (v) => promiseResultCache.set(promise, v),\n (e) => promiseErrorCache.set(promise, e)\n ).finally(setSelf);\n }\n }\n if (promiseErrorCache.has(promise)) {\n throw promiseErrorCache.get(promise);\n }\n if (promiseResultCache.has(promise)) {\n return {\n p: promise,\n v: promiseResultCache.get(promise)\n };\n }\n if (prev && \"v\" in prev) {\n return { p: promise, f: fallback(prev.v), v: prev.v };\n }\n return { p: promise, f: fallback() };\n },\n (_get, set) => {\n set(refreshAtom, (c) => c + 1);\n }\n );\n promiseAndValueAtom.init = void 0;\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n promiseAndValueAtom.debugPrivate = true;\n }\n return atom(\n (get) => {\n const state = get(promiseAndValueAtom);\n if (\"f\" in state) {\n return state.f;\n }\n return state.v;\n },\n (_get, set, ...args) => set(anAtom, ...args)\n );\n },\n anAtom,\n fallback\n );\n}\n\nfunction atomWithRefresh(read, write) {\n const refreshAtom = atom(0);\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n refreshAtom.debugPrivate = true;\n }\n return atom(\n (get, options) => {\n get(refreshAtom);\n return read(get, options);\n },\n (get, set, ...args) => {\n if (args.length === 0) {\n set(refreshAtom, (c) => c + 1);\n } else if (write) {\n return write(get, set, ...args);\n }\n }\n );\n}\n\nfunction atomWithLazy(makeInitial) {\n const a = atom(void 0);\n delete a.init;\n Object.defineProperty(a, \"init\", {\n get() {\n return makeInitial();\n }\n });\n return a;\n}\n\nexport { RESET, atomFamily, atomWithDefault, atomWithLazy, atomWithObservable, atomWithReducer, atomWithRefresh, atomWithReset, atomWithStorage, createJSONStorage, freezeAtom, freezeAtomCreator, loadable, selectAtom, splitAtom, withStorageValidator as unstable_withStorageValidator, unwrap };\n"],"names":["E","a","A","i","o","r","middleware_f","t","type","payload","Object","freeze","Array","isArray","e","c","map","n","shift","timeout_T","Promise","race","m","setTimeout","enums_e","Authenticate","Authorize","EndSession","Logout","ExchangeToken","RefreshToken","ResumeAuthenticate","RevokeToken","StartAuthenticate","UserInfo","WellKnown","helpers_p","serverConfig","wellknown","url","URL","init","method","middleware","fetch","toString","timeout","json","config_c","set","isValid","validateServerConfig","options","oauthThreshold","logLevel","platformHeader","prefix","setAsync","baseUrl","console","warn","helpers_d","authorization_endpoint","s","origin","issuer","includes","replace","paths","authenticate","pathname","authorize","accessToken","token_endpoint","endSession","end_session_endpoint","userInfo","userinfo_endpoint","revoke","revocation_endpoint","sessions","get","charAt","length","shared_constants_o","url_r","protocol","indexOf","port","hostname","auth_J","next","realmPath","u","tree","d","query","constructUrl","configureRequest","headers","Headers","push","h","getResponseJson","authIndexType","authIndexValue","keys","$","encodeURIComponent","join","url_h","realm_n","split","trim","filter","unshift","url_f","startsWith","slice","body","JSON","stringify","credentials","Accept","status","ok","enums_t","BadRequest","Timeout","Unauthorized","Unknown","enums_l","BooleanAttributeInputCallback","ChoiceCallback","ConfirmationCallback","DeviceProfileCallback","HiddenValueCallback","KbaCreateCallback","MetadataCallback","NameCallback","NumberAttributeInputCallback","PasswordCallback","PingOneProtectEvaluationCallback","PingOneProtectInitializeCallback","PollingWaitCallback","ReCaptchaCallback","RedirectCallback","SelectIdPCallback","StringAttributeInputCallback","SuspendedTextOutputCallback","TermsAndConditionsCallback","TextInputCallback","TextOutputCallback","ValidatedCreatePasswordCallback","ValidatedCreateUsernameCallback","enums_","CannotContainCharacters","CannotContainDuplicates","CannotContainOthers","LeastCapitalLetters","LeastNumbers","MatchRegexp","MaximumLength","MaximumNumber","MinimumLength","MinimumNumber","Required","Unique","UnknownPolicy","ValidArrayItems","ValidDate","ValidEmailAddress","ValidNameFormat","ValidNumber","ValidPhoneFormat","ValidQueryFilter","ValidType","strings_f","helpers_n","message_creator_u","fr_policy_y","parseErrors","detail","failedPolicyRequirements","apply","messages","parseFailedPolicyRequirement","policyRequirements","parsePolicyRequirement","property","parse","policyRequirement","params","enums_r","LoginFailure","LoginSuccess","Step","fr_login_failure_i","constructor","getCode","Number","code","getDetail","getMessage","message","getProcessedMessage","getReason","reason","fr_login_success_r","getRealm","realm","getSessionToken","tokenId","getSuccessUrl","successUrl","callbacks_r","getType","getInputValue","getArrayElement","input","value","setInputValue","getOutputValue","output","getOutputByName","find","name","test","exec","attribute_input_callback_s","getName","getPrompt","isRequired","getFailedPolicies","getPolicies","setValidateOnly","setValue","choice_callback_h","getDefaultChoice","getChoices","setChoiceIndex","setChoiceValue","confirmation_callback_i","getDefaultOption","getMessageType","getOptions","getOptionType","setOptionIndex","setOptionValue","device_profile_callback_i","isMetadataRequired","isLocationRequired","setProfile","hidden_value_callback_t","kba_create_callback_u","getPredefinedQuestions","setQuestion","setAnswer","endsWith","metadata_callback_s","getData","name_callback_r","setName","password_callback_r","setPassword","ping_protect_evaluation_callback_r","getPauseBehavioralData","setData","setClientError","ping_protect_initialize_callback_i","getConfig","envId","consoleLogEnabled","deviceAttributesToIgnore","customHost","lazyMetadata","behavioralDataCollection","deviceKeyRsyncIntervals","enableTrust","disableTags","disableHub","polling_wait_callback_r","getWaitTime","recaptcha_callback_r","getSiteKey","setResult","redirect_callback_c","getRedirectUrl","select_idp_callback_d","getProviders","setProvider","provider","text_output_callback_u","suspended_text_output_callback_a","terms_and_conditions_callback_a","getTerms","getVersion","getCreateDate","Date","setAccepted","text_input_callback_r","setInput","validated_create_password_callback_i","validated_create_username_callback_s","L","fr_step_i","callbacks","convertCallbacks","getCallbackOfType","getCallbacksOfType","setCallbackValue","getDescription","description","getHeader","header","getStage","stage","l","fr_auth_f","previousStepKey","authId","callbackFactory","redirect","localStorage","setItem","location","assign","resume","y","searchParams","g","p","getItem","removeItem","P","error","errorCode","errorMessage","form_post_entry","nonce","RelayState","responsekey","scope","state","suspendedId","start","defaults_o","defaults_a","defaults_r","mac","windows","ios","defaults_n","defaults_s","defaults_i","defaults_t","collector_p","reduceToObject","reduce","reduceToString","filename","logger_t","enabled","none","info","debug","logger","log","fr_device_O","config","fontNames","devicePlatforms","displayProps","browserProps","hardwareProps","platformProps","forEach","getBrowserMeta","navigator","getBrowserPluginsNames","plugins","getDeviceName","userAgent","platform","getDisplayMeta","screen","getHardwareMeta","getIdentifier","globalThis","crypto","getRandomValues","Uint32Array","getInstalledFonts","document","createElement","getContext","font","measureText","width","getLocationCoordinates","geolocation","getCurrentPosition","latitude","coords","longitude","enableHighAccuracy","maximumAge","resolve","getOSMeta","getProfile","metadata","identifier","hardware","display","browser","deviceName","fonts","timezone","getTimezoneOffset","oauth2_client_enums_r","Code","Token","enums_o","Error","Unsupported","enums_E","AbortError","DataError","ConstraintError","EncodingError","InvalidError","NetworkError","NotAllowedError","NotSupportedError","SecurityError","TimeoutError","UnknownError","enums_i","None","Authentication","Registration","StoreContext","createContext","useStore","store","useContext","getDefaultStore","isPromiseLike","x","then","use","ReactExports","promise","v","useAtom","atom","useAtomValue","valueFromReducer","storeFromReducer","atomFromReducer","rerender","useReducer","nextValue","is","prev","delay","useEffect","unsub","sub","useDebugValue","useSetAtom","useCallback","args","defaultStore","keyCount","read","write","key","defaultRead","defaultWrite","arg","isSelfAtom","unstable_is","hasInitialValue","isActuallyWritableAtom","CONTINUE_PROMISE","Symbol","PENDING","isContinuablePromise","continuablePromiseMap","WeakMap","createContinuablePromise","abort","complete","has","continuePromise","reject","curr","onFulfilled","me","onRejected","nextPromise","nextAbort","isAtomStateInitialized","atomState","returnAtomValue","getPendingContinuablePromise","addPendingContinuablePromiseToDependency","dependencyAtomState","add","delete","createPending","Map","Set","addPendingAtom","pending","addPendingDependent","dependent","dependents","getPendingDependents","addPendingFunction","fn","flushPending","size","clear","atomStates","values","functions","_a","createStore","debugMountedAtoms","atomStateMap","getAtomState","setAtomStateValueOrPromise","valueOrPromise","abortPromise","completePromise","hasPrevValue","prevValue","pendingPromise","continuablePromise","addDependency","aState","readAtomState","force","controller","setSelf","from","every","isSync","aState2","pending2","mountDependencies","signal","AbortController","writeAtom","recomputeDependents","getDependents","_b","atomWithPendingContinuablePromise","topsortedAtoms","markedAtoms","visit","changedAtoms","isMarked","prevEpochNumber","hasChangedDeps","dep","writeAtomState","args2","result","aMounted","unmountAtom","mountAtom","onMount","mounted","onUnmount","some","listener","listeners","dev4_get_internal_weak_map","dev4_get_mounted_atoms","dev4_restore_atoms","__JOTAI_DEFAULT_STORE__","RESET","createJSONStorage","getStringStorage","window","lastStr","lastValue","subscriber","storage","initialValue","_a2","str2","reviver","str","newValue","replacer","subscribe","addEventListener","Storage","callback","storageEventCallback","storageArea","removeEventListener","subscriber2","defaultStorage","atomWithStorage","getOnInit","baseAtom","jotai_vanilla__WEBPACK_IMPORTED_MODULE_0__","cn","debugPrivate","setAtom","update","resolvedValue"],"sourceRoot":""}