{"version":3,"file":"native-registration.mjs","names":[],"sources":["../../../src/internal/oauth/native-registration.ts"],"sourcesContent":["import type { LifecycleHooks } from \"@yielded/auth/Hooks\";\nimport * as M from \"@yielded/auth/OAuth\";\nimport * as Digest from \"effect/crypto/Digest\";\nimport * as SecureRandom from \"effect/crypto/SecureRandom\";\nimport * as Effect from \"effect/Effect\";\nimport * as Option from \"effect/Option\";\nimport * as Schema from \"effect/Schema\";\nimport * as SqlClient from \"effect/sql/SqlClient\";\nimport type * as Statement from \"effect/sql/Statement\";\n\nimport { sqlBatchAssertion } from \"../d1-planning\";\nimport { PersistenceMappingError } from \"../mapping-error\";\nimport type {\n  OAuthRegistrationAuthority,\n  OAuthRegistrationIntentMapping,\n  OAuthRegistrationMapping,\n} from \"../models/oauth-model\";\nimport type { NativeSqlTables } from \"../native-sql-table\";\nimport { makeConditionalSqlInsert } from \"../session-native-record\";\nimport { exactSqlText, executeSqlChange } from \"../sql-change\";\nimport { cleanupSqlRows } from \"../sql-cleanup\";\nimport {\n  appendSqlBatchStatement,\n  CurrentSqlCommit,\n  makeSqlCommitExecutor,\n  registerSqlBatchPostcondition,\n  registerSqlPostcondition,\n  SqlBatchCommit,\n} from \"../sql-commit\";\nimport type { SqlExpression, TableModel } from \"../table-model\";\nimport { makeOAuthNativeMutation } from \"./native-mutation\";\nimport { prepareOAuthNative } from \"./native-sign-in\";\nimport { invalidState, oauthIdentityKey, storage, unavailable } from \"./state\";\n\n// Physical metadata is validated at the driver boundary.\nexport type OAuthNativeRegistrationIntentMapping = OAuthRegistrationIntentMapping<\n  TableModel,\n  TableModel,\n  unknown,\n  SqlExpression\n>;\n\nexport type OAuthNativeRegistrationMapping<Registration> = OAuthRegistrationMapping<\n  Registration,\n  TableModel,\n  TableModel,\n  TableModel,\n  TableModel,\n  TableModel,\n  unknown,\n  SqlExpression\n>;\n\nconst makeIntent = Effect.fnUntraced(function* (\n  tables: NativeSqlTables,\n  mapping: Pick<OAuthNativeRegistrationIntentMapping, \"intent\" | \"clock\" | \"ownership\">,\n  batch: boolean,\n) {\n  const sql = (yield* SqlClient.SqlClient).withoutTransforms();\n  const intent = tables(mapping.intent.table);\n  const ownership = tables(mapping.ownership.table);\n  const i = mapping.intent;\n  const o = mapping.ownership;\n  const stored = storage(M.OAuthRegistrationInspection);\n  const intentStored = storage(M.OAuthRegistrationIntent);\n  const now = tables.expression(mapping.clock.engineNowMillis);\n\n  const exact = (key: string, value: unknown) =>\n    exactSqlText(sql, intent.column(key), intent.value(key, value));\n\n  const key = (moduleId: string, reference: string) =>\n    sql.and([exact(i.moduleId, moduleId), exact(i.reference, reference)]);\n\n  const horizon = (value: M.OAuthRegistrationIntent) =>\n    sql`${now} >= ${value.issuedAtMillis} and ${now} < ${value.expiresAtMillis}`;\n\n  const unowned = (identityKey: string) =>\n    sql`not exists(select 1 from ${ownership.name} where ${exactSqlText(sql, ownership.column(o.identityKey), ownership.value(o.identityKey, identityKey))})`;\n\n  const read = Effect.fnUntraced(function* (access: M.OAuthRegistrationAccess) {\n    const rows =\n      yield* sql`select ${intent.fields(\"intent_\")}, ${now} as engine_now from ${intent.name} where ${key(access.moduleId, access.reference)}`;\n\n    if (!(rows.length <= 1)) return yield* invalidState();\n    if (rows[0] === undefined) return undefined;\n    const row = intent.decode(rows[0], \"intent_\");\n    const encoded = row[i.snapshot];\n\n    if (!(typeof encoded === \"string\")) return yield* invalidState();\n    const inspection = stored.decode(encoded);\n    const value = inspection.intent;\n    const context = value.context;\n    const identityKey = yield* oauthIdentityKey(value.identity);\n\n    if (\n      !(\n        row[i.moduleId] === context.moduleId &&\n        row[i.reference] === value.reference &&\n        row[i.flowId] === context.flowId &&\n        row[i.identityKey] === identityKey &&\n        mapping.clock.decodeInstant(row[i.expiresAt]) === value.expiresAtMillis &&\n        mapping.clock.decodeInstant(row[i.retentionUntil]) === value.retentionUntilMillis\n      )\n    )\n      return yield* invalidState();\n    const engineNow = yield* Schema.decodeEffect(Schema.Int)(Number(rows[0].engine_now));\n\n    if (\n      access.moduleId !== context.moduleId ||\n      access.flowId !== context.flowId ||\n      access.reference !== value.reference ||\n      access.requestBindingVerifier !== context.requestBindingVerifier ||\n      access.requestBindingExpiresAtMillis !== context.requestBindingExpiresAtMillis ||\n      access.credentialDigest !== value.credentialDigest ||\n      engineNow < value.issuedAtMillis ||\n      // A bound decision stays replayable through retention after the intent expires.\n      engineNow >=\n        (inspection.application._tag === \"Unbound\"\n          ? value.expiresAtMillis\n          : value.retentionUntilMillis)\n    )\n      return undefined;\n\n    return { inspection, encoded, identityKey, engineNow };\n  });\n\n  const finish = (name: string, condition: Statement.Fragment) =>\n    batch\n      ? registerSqlBatchPostcondition({ name, statement: sqlBatchAssertion(sql, condition) })\n      : registerSqlPostcondition({\n          name,\n          check: Effect.gen(function* () {\n            if (!((yield* sql`select 1 where ${condition}`).length === 1))\n              return yield* PersistenceMappingError.make({\n                operation: \"postcondition\",\n                cause: invalidState(),\n              });\n          }),\n        });\n\n  const change = Effect.fnUntraced(function* (statement: Statement.Fragment) {\n    if (batch) {\n      yield* appendSqlBatchStatement(sql`${statement}`);\n      yield* appendSqlBatchStatement(sqlBatchAssertion(sql, sql`changes() = 1`));\n    } else {\n      if (!((yield* executeSqlChange(sql, statement)) === 1)) return yield* invalidState();\n    }\n  });\n\n  const cleanup = (moduleId: string, limit: number) =>\n    cleanupSqlRows(\n      [\n        {\n          table: intent,\n          keys: [i.moduleId, i.reference],\n          due: sql`${exact(i.moduleId, moduleId)} and ${tables.expression(mapping.clock.toMillis(intent.column(i.retentionUntil)))} <= ${now}`,\n          order: [intent.column(i.retentionUntil), intent.column(i.reference)],\n        },\n      ],\n      limit,\n      batch,\n    );\n\n  return {\n    sql,\n    now,\n    intent,\n    stored,\n    intentStored,\n    exact,\n    key,\n    horizon,\n    unowned,\n    read,\n    finish,\n    change,\n    cleanup,\n  };\n});\n\nexport const makeNativeOAuthRegistrationIntentServices = Effect.fnUntraced(function* (\n  tables: NativeSqlTables,\n  mapping: OAuthNativeRegistrationIntentMapping,\n  batch?: SqlBatchCommit[\"Service\"],\n): Effect.fn.Return<\n  { readonly oauthRegistrationIntents: M.OAuthRegistrationIntents[\"Service\"] },\n  M.OAuthUnavailable,\n  SqlClient.SqlClient | LifecycleHooks | (SecureRandom.SecureRandom | Digest.Digest)\n> {\n  const conditionalInsert = yield* makeConditionalSqlInsert();\n  const executor = yield* makeSqlCommitExecutor(unavailable);\n  const crypto = yield* SecureRandom.SecureRandom;\n  const digests = yield* Digest.Digest;\n  const external = yield* Effect.serviceOption(CurrentSqlCommit);\n  const state = yield* makeIntent(tables, mapping, batch !== undefined);\n  const { sql, intent, unowned, horizon, stored } = state;\n  const i = mapping.intent;\n\n  const run = <A, E, R>(effect: Effect.Effect<A, E, R>) => {\n    const work = Effect.provideService(effect, SecureRandom.SecureRandom, crypto).pipe(\n      Effect.provideService(Digest.Digest, digests),\n    );\n\n    return batch === undefined\n      ? executor.run(work, \"statement\")\n      : executor.batch(work).pipe(Effect.provideService(SqlBatchCommit, batch));\n  };\n\n  const service: M.OAuthRegistrationIntents[\"Service\"] = {\n    issue: (original, prepare) =>\n      run(\n        Effect.gen(function* () {\n          const value = M.snapshotOAuthSync(M.OAuthRegistrationIntent, original.intent);\n          const context = value.context;\n          const rejected = () => prepareOAuthNative({ _tag: \"Rejected\" } as const, prepare);\n\n          if (\n            value.identity.provider !== context.provider ||\n            value.identity.issuer !== context.issuer ||\n            value.issuedAtMillis < context.issuedAtMillis ||\n            value.verifiedAtMillis > value.issuedAtMillis ||\n            value.issuedAtMillis >= value.expiresAtMillis ||\n            value.expiresAtMillis > context.requestBindingExpiresAtMillis ||\n            value.retentionUntilMillis < value.expiresAtMillis\n          )\n            return yield* rejected();\n          const identityKey = yield* oauthIdentityKey(value.identity);\n\n          const eligible = sql.and([\n            unowned(identityKey),\n            horizon(value),\n            tables.expression(mapping.eligible(value)),\n          ]);\n\n          const snapshot = stored.encode({ intent: value, application: { _tag: \"Unbound\" } });\n\n          const values = {\n            ...i.encodeInsert(value),\n            [i.moduleId]: context.moduleId,\n            [i.reference]: value.reference,\n            [i.flowId]: context.flowId,\n            [i.identityKey]: identityKey,\n            [i.snapshot]: snapshot,\n            [i.expiresAt]: mapping.clock.encodeInstant(value.expiresAtMillis),\n            [i.retentionUntil]: mapping.clock.encodeInstant(value.retentionUntilMillis),\n          };\n\n          const statement = yield* conditionalInsert(intent, values, eligible);\n\n          if (batch !== undefined) {\n            // D1 classifies eligibility before staging, as the row count does for\n            // interactive owners; the batch still asserts the conditional insert.\n            if ((yield* sql`select 1 where ${eligible}`).length === 0) return yield* rejected();\n            yield* state.change(statement);\n          } else if ((yield* executeSqlChange(sql, statement)) !== 1) return yield* rejected();\n          if (Option.isSome(external))\n            yield* state.finish(\n              \"oauth-registration-intent-issued\",\n              sql.and([\n                eligible,\n                sql`exists(select 1 from ${intent.name} where ${state.key(context.moduleId, value.reference)} and ${state.exact(i.snapshot, snapshot)})`,\n              ]),\n            );\n\n          return yield* prepareOAuthNative({ _tag: \"RegistrationIssued\", intent: value }, prepare);\n        }),\n      ),\n  };\n\n  return { oauthRegistrationIntents: service };\n});\n\nexport const makeNativeOAuthRegistrationServices = Effect.fnUntraced(function* <Registration>(\n  tables: NativeSqlTables,\n  mapping: OAuthNativeRegistrationMapping<Registration>,\n  batch?: SqlBatchCommit[\"Service\"],\n): Effect.fn.Return<\n  { readonly registrationAuthority: OAuthRegistrationAuthority<Registration> },\n  M.OAuthUnavailable,\n  SqlClient.SqlClient | LifecycleHooks | (SecureRandom.SecureRandom | Digest.Digest)\n> {\n  const conditionalInsert = yield* makeConditionalSqlInsert();\n  const executor = yield* makeSqlCommitExecutor(unavailable);\n  const crypto = yield* SecureRandom.SecureRandom;\n  const digests = yield* Digest.Digest;\n  const external = yield* Effect.serviceOption(CurrentSqlCommit);\n  const state = yield* makeIntent(tables, mapping, batch !== undefined);\n  const mutation = yield* makeOAuthNativeMutation(tables, mapping, batch !== undefined);\n  const { sql, now, intent, horizon, stored } = state;\n  const i = mapping.intent;\n  const c = mapping.credential;\n  const a = mapping.authority;\n  const s = mapping.subject;\n  const credential = tables(c.table);\n  const authority = tables(a.table);\n  const subject = tables(s.table);\n  const application = Schema.fromJsonString(mapping.registration);\n\n  const run = <A, E, R>(\n    effect: Effect.Effect<A, E, R>,\n    mode: \"transaction\" | \"statement\" = \"transaction\",\n  ) => {\n    const work = Effect.provideService(effect, SecureRandom.SecureRandom, crypto).pipe(\n      Effect.provideService(Digest.Digest, digests),\n    );\n\n    return batch === undefined\n      ? executor.run(work, mode)\n      : executor.batch(work).pipe(Effect.provideService(SqlBatchCommit, batch));\n  };\n\n  const read = <A, E, R>(effect: Effect.Effect<A, E, R>) =>\n    executor.read(\n      Effect.provideService(effect, SecureRandom.SecureRandom, crypto).pipe(\n        Effect.provideService(Digest.Digest, digests),\n      ),\n    );\n\n  const service: OAuthRegistrationAuthority<Registration> = {\n    authentication: \"first-confirmed-registration\",\n    read: (access) =>\n      read(\n        Effect.map(\n          state.read(M.snapshotOAuthSync(M.OAuthRegistrationAccess, access)),\n          (value) => value?.inspection,\n        ),\n      ),\n    inspect: (input) =>\n      read(\n        Effect.gen(function* () {\n          const payload = yield* Schema.encodeEffect(application)(input.registration);\n\n          if (!(new TextEncoder().encode(payload).length <= 1048576)) return yield* invalidState();\n          const registration = yield* Schema.decodeEffect(application)(payload);\n\n          const result = yield* mapping.inspect({\n            intent: M.snapshotOAuthSync(M.OAuthRegistrationIntent, input.intent),\n            registration,\n          });\n\n          return {\n            ...result,\n            fingerprint: yield* Schema.decodeEffect(M.OAuthRegistrationFingerprint)(\n              result.fingerprint,\n            ),\n          };\n        }),\n      ),\n    register: (original, prepare) =>\n      read(\n        Effect.gen(function* () {\n          const access = M.snapshotOAuthSync(M.OAuthRegistrationAccess, original.access);\n          const expected = M.snapshotOAuthSync(M.OAuthRegistrationIntent, original.intent);\n          const found = yield* state.read(access);\n\n          const decide = (decision: M.OAuthRegistrationDecision) =>\n            run(prepareOAuthNative(decision, prepare), \"statement\");\n\n          const rejected = () => prepareOAuthNative({ _tag: \"Rejected\" } as const, prepare);\n\n          if (\n            found === undefined ||\n            state.intentStored.encode(found.inspection.intent) !==\n              state.intentStored.encode(expected)\n          )\n            return yield* Effect.succeed(decide({ _tag: \"Rejected\" }));\n\n          const binding = M.snapshotOAuthSync(M.OAuthRegistrationInspection, {\n            intent: expected,\n            application: {\n              _tag: \"Registered\",\n              commandId: original.commandId,\n              fingerprint: original.fingerprint,\n              payload: original.payload,\n              requestId: original.requestId,\n            },\n          }).application;\n\n          if (!(binding._tag === \"Registered\")) return yield* invalidState();\n          // Replay comparison precedes application callbacks, allocation and writes.\n          const previous = found.inspection.application;\n\n          if (previous._tag !== \"Unbound\") {\n            if (\n              previous.commandId !== binding.commandId ||\n              previous.fingerprint !== binding.fingerprint ||\n              previous.payload !== binding.payload ||\n              previous.requestId !== binding.requestId\n            )\n              return yield* Effect.succeed(decide({ _tag: \"Conflict\" }));\n\n            return yield* Effect.succeed(\n              decide(\n                previous._tag === \"Registered\"\n                  ? { _tag: \"Registered\", replayed: true }\n                  : { _tag: \"Rejected\" },\n              ),\n            );\n          }\n\n          return yield* Effect.succeed(\n            run(\n              Effect.gen(function* () {\n                if (!(new TextEncoder().encode(binding.payload).length <= 1048576))\n                  return yield* invalidState();\n                const registration = yield* Schema.decodeEffect(application)(binding.payload);\n\n                if (!((yield* Schema.encodeEffect(application)(registration)) === binding.payload))\n                  return yield* invalidState();\n                if (\n                  (yield* Schema.encodeEffect(application)(original.registration)) !==\n                  binding.payload\n                )\n                  return yield* rejected();\n                const inspection = yield* mapping.inspect({ intent: expected, registration });\n\n                if (inspection.fingerprint !== binding.fingerprint) return yield* rejected();\n                const policyInput = { intent: expected, registration };\n\n                const eligible = sql.and([\n                  state.unowned(found.identityKey),\n                  tables.expression(mapping.eligibility.admission(policyInput)),\n                  horizon(expected),\n                ]);\n\n                let admitted =\n                  inspection.eligible &&\n                  (batch === undefined || (yield* sql`select 1 where ${eligible}`).length === 1);\n\n                let final: Statement.Fragment = horizon(expected);\n                let authentication: M.OAuthRegistrationAuthentication | undefined;\n\n                if (admitted) {\n                  const nativeId = yield* mapping.allocateSubjectId;\n                  const subjectId = yield* mapping.subjectId.toSubject(nativeId);\n\n                  if (\n                    !mapping.subjectId.equals(\n                      nativeId,\n                      yield* mapping.subjectId.toNative(subjectId),\n                    )\n                  )\n                    return yield* invalidState();\n\n                  const credentialId = yield* Schema.decodeEffect(\n                    M.OAuthCredentialSnapshot.fields.credentialId,\n                  )(yield* mapping.allocateCredentialId);\n\n                  const revision = yield* Schema.decodeEffect(\n                    M.OAuthCredentialSnapshot.fields.credentialRevision,\n                  )(yield* mapping.allocateRevision);\n\n                  const subjectValues = {\n                    ...mapping.encodeSubjectInsert(\n                      { ...policyInput, requestId: binding.requestId },\n                      { subjectId: nativeId, securityRevision: revision },\n                    ),\n                    [s.id]: nativeId,\n                    [s.securityRevision]: revision,\n                  };\n\n                  if (!s.isActiveStatus(subjectValues[s.status])) return yield* invalidState();\n                  // A newly inserted subject is the first lock. The exact unbound intent\n                  // CAS below arbitrates concurrent registration; a loser rolls back all\n                  // local rows and never repeats provisioning automatically.\n                  const creation = yield* conditionalInsert(subject, subjectValues, eligible);\n\n                  if (batch !== undefined) yield* state.change(creation);\n                  else admitted = (yield* executeSqlChange(sql, creation)) === 1;\n                  if (admitted) {\n                    const policy = { ...policyInput, nativeSubjectId: nativeId };\n\n                    if (!((mapping.eligibility.guards?.length ?? 0) <= 32))\n                      return yield* invalidState();\n                    for (const guard of mapping.eligibility.guards ?? []) {\n                      const table = tables(guard.table);\n\n                      const rows =\n                        yield* sql`select ${table.column(guard.orderBy)} from ${table.name} where ${tables.expression(guard.condition(policy))} order by ${table.column(guard.orderBy)} limit 65 ${batch === undefined ? sql.onDialectOrElse({ sqlite: () => sql``, orElse: () => sql`for update` }) : sql``}`;\n\n                      if (!(rows.length > 0 && rows.length <= 64)) return yield* invalidState();\n                    }\n\n                    if (\n                      !(\n                        (yield* mutation.ensureOwnership(expected.identity, nativeId)) ===\n                        found.identityKey\n                      )\n                    )\n                      return yield* invalidState();\n\n                    const values = {\n                      ...c.encodeInsert({\n                        moduleId: expected.context.moduleId,\n                        subjectId: nativeId,\n                        identityKey: found.identityKey,\n                        credentialId,\n                        credentialRevision: revision,\n                      }),\n                      [c.moduleId]: expected.context.moduleId,\n                      [c.subjectId]: nativeId,\n                      [c.identityKey]: found.identityKey,\n                      [c.credentialId]: credentialId,\n                      [c.credentialRevision]: revision,\n                    };\n\n                    if (!c.isActiveStatus(values[c.status])) return yield* invalidState();\n                    yield* state.change(\n                      yield* conditionalInsert(\n                        credential,\n                        values,\n                        sql.and([\n                          tables.expression(mapping.eligibility.admission(policy)),\n                          horizon(expected),\n                          sql`exists(select 1 from ${mutation.ownership.name} where ${mutation.ownerCondition(found.identityKey, nativeId)})`,\n                        ]),\n                      ),\n                    );\n\n                    const factor = {\n                      ...a.encodeInsert({ subjectId: nativeId, credentialId, revision }),\n                      [a.subjectId]: nativeId,\n                      [a.credentialId]: credentialId,\n                      [a.revision]: revision,\n                    };\n\n                    if (!a.isActiveStatus(factor[a.status])) return yield* invalidState();\n                    yield* state.change(authority.insert(factor));\n                    authentication = M.snapshotOAuthSync(M.OAuthRegistrationAuthentication, {\n                      intent: expected,\n                      credentialId,\n                      credentialRevision: revision,\n                      revision: {\n                        subjectId,\n                        securityRevision: revision,\n                        credentials: [{ credentialId, revision }],\n                      },\n                    });\n                    final = sql.and([\n                      horizon(expected),\n                      tables.expression(mapping.eligibility.postcondition(policy)),\n                      mutation.authorityCondition(nativeId, authentication.revision),\n                      sql`exists(select 1 from ${credential.name} where ${credential.column(c.subjectId)} = ${credential.value(c.subjectId, nativeId)} and ${exactSqlText(sql, credential.column(c.credentialId), credential.value(c.credentialId, credentialId))} and ${exactSqlText(sql, credential.column(c.credentialRevision), credential.value(c.credentialRevision, revision))} and ${exactSqlText(sql, credential.column(c.identityKey), credential.value(c.identityKey, found.identityKey))} and ${tables.expression(c.activeCondition)})`,\n                      sql`exists(select 1 from ${mutation.ownership.name} where ${mutation.ownerCondition(found.identityKey, nativeId)})`,\n                    ]);\n                  }\n                }\n\n                const snapshot = stored.encode({\n                  intent: expected,\n                  application: { ...binding, _tag: admitted ? \"Registered\" : \"Rejected\" },\n                });\n\n                yield* state.change(\n                  sql`${intent.update({ [i.snapshot]: snapshot })} where ${state.key(access.moduleId, access.reference)} and ${state.exact(i.snapshot, found.encoded)} and ${final}`,\n                );\n                if (Option.isSome(external))\n                  yield* state.finish(\n                    \"oauth-registration-outcome\",\n                    sql.and([\n                      final,\n                      sql`exists(select 1 from ${intent.name} where ${state.key(access.moduleId, access.reference)} and ${state.exact(i.snapshot, snapshot)})`,\n                      sql`${now} < ${expected.expiresAtMillis}`,\n                    ]),\n                  );\n\n                if (!admitted) return yield* rejected();\n                if (!(authentication !== undefined)) return yield* invalidState();\n\n                return yield* prepareOAuthNative(\n                  { _tag: \"Registered\", replayed: false, authentication },\n                  prepare,\n                );\n              }),\n            ),\n          );\n        }),\n      ).pipe(Effect.flatten),\n    cleanup: (input, prepare) =>\n      run(\n        Effect.gen(function* () {\n          const parsed = M.snapshotOAuthSync(M.OAuthCleanupInput, input);\n\n          return yield* prepareOAuthNative(\n            yield* state.cleanup(parsed.moduleId, parsed.limit),\n            prepare,\n          );\n        }),\n      ),\n  };\n\n  return { registrationAuthority: service };\n});\n"],"mappings":";;;;;;;;;;;;;;;;;AAqDA,MAAM,aAAa,OAAO,WAAW,WACnC,QACA,SACA,OACA;CACA,MAAM,OAAO,OAAO,UAAU,UAAA,CAAW,kBAAkB;CAC3D,MAAM,SAAS,OAAO,QAAQ,OAAO,KAAK;CAC1C,MAAM,YAAY,OAAO,QAAQ,UAAU,KAAK;CAChD,MAAM,IAAI,QAAQ;CAClB,MAAM,IAAI,QAAQ;CAClB,MAAM,SAAS,QAAQ,EAAE,2BAA2B;CACpD,MAAM,eAAe,QAAQ,EAAE,uBAAuB;CACtD,MAAM,MAAM,OAAO,WAAW,Q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