{
  "version": 3,
  "sources": ["../../src/index.ts", "../../src/isType.ts", "../../src/index-un-deprecated.ts", "../../src/asObject.ts", "../../src/AsTypeFactory.ts", "../../src/AsObjectFactory.ts", "../../src/deepMerge.ts", "../../src/IsObjectFactory.ts", "../../src/JsonObject.ts", "../../src/ObjectWrapper.ts", "../../src/omitBy.ts", "../../src/pickBy.ts", "../../src/removeFields.ts", "../../src/toSafeJson.ts", "../../src/Validator.ts"],
  "sourcesContent": ["export * from './index-deprecated.ts'\nexport * from './index-un-deprecated.ts'\n", "import type { FieldType } from '@xylabs/typeof'\n\n/** @deprecated use from @xylabs/typeof instead */\nexport const isType = (value: unknown, expectedType: FieldType) => {\n  const typeofValue = typeof value\n  switch (expectedType) {\n    case 'array': {\n      return Array.isArray(value)\n    }\n    case 'null': {\n      return value === null\n    }\n    case 'undefined': {\n      return value === undefined\n    }\n    case 'object': {\n      // nulls resolve to objects, so exclude them\n      if (value === null) {\n        return false\n      }\n      // arrays resolve to objects, so exclude them\n      return typeofValue === 'object' && !Array.isArray(value)\n    }\n    default: {\n      return typeofValue === expectedType\n    }\n  }\n}\n", "export * from './asObject.ts'\nexport * from './AsObjectFactory.ts'\nexport * from './AsTypeFactory.ts'\nexport * from './deepMerge.ts'\nexport * from './IsObjectFactory.ts'\nexport * from './JsonObject.ts'\nexport * from './ObjectWrapper.ts'\nexport * from './omitBy.ts'\nexport * from './OmitStartsWith.ts'\nexport * from './Optional.ts'\nexport * from './Override.ts'\nexport * from './PartialRecord.ts'\nexport * from './pickBy.ts'\nexport * from './PickStartsWith.ts'\nexport * from './removeFields.ts'\nexport * from './Simplify.ts'\nexport * from './StringKeyObject.ts'\nexport * from './toSafeJson.ts'\nexport * from './Validator.ts'\nexport * from './WithAdditional.ts'\nexport * from '@xylabs/object-model'\n", "import type { AnyObject } from '@xylabs/object-model'\nimport { isObject } from '@xylabs/typeof'\n\nimport { AsObjectFactory } from './AsObjectFactory.ts'\n\n/** Type-narrowing function that casts a value to AnyObject if it is a plain object, or returns undefined. */\nexport const asAnyObject = (() => AsObjectFactory.create<AnyObject>(<T extends AnyObject>(obj: unknown): obj is T => isObject(obj)))()\n", "import { assertDefinedEx } from '@xylabs/assert'\nimport type {\n  AsTypeFunction,\n  StringOrAlertFunction, TypeCheck, TypeCheckConfig,\n  TypeCheckRequiredConfig,\n} from '@xylabs/object-model'\nimport type { AnyNonPromise } from '@xylabs/promise'\nimport { isPromise, isTruthy } from '@xylabs/typeof'\n\n/**\n * Factory for creating type-narrowing 'as' functions that cast a value to T or return undefined.\n * Supports optional assertion messages and configuration for required/optional behavior.\n */\nexport const AsTypeFactory = {\n  create: <T extends AnyNonPromise>(typeCheck: TypeCheck<T>): AsTypeFunction<T> => {\n    const func = (\n      value: AnyNonPromise,\n      assertOrConfig?: StringOrAlertFunction<T> | TypeCheckConfig,\n      config?: TypeCheckConfig,\n    ): T | undefined => {\n      // when used as a predicate, it seems that the index is passed as the second parameter (filter,map)\n      const isPredicate = typeof assertOrConfig === 'number'\n      const resolvedAssert = isPredicate\n        ? undefined\n        : (typeof assertOrConfig === 'object' ? undefined : assertOrConfig)\n      const resolvedConfig = isPredicate ? undefined : typeof assertOrConfig === 'object' ? assertOrConfig : config\n\n      // only return undefined if not required\n      const required = isTruthy((resolvedConfig as (TypeCheckRequiredConfig | undefined))?.required)\n      if (!required && (value === undefined || value === null)) {\n        return undefined\n      }\n\n      if (isPromise(value)) {\n        throw new TypeError('un-awaited promises may not be sent to \"as\" functions')\n      }\n\n      const result = typeCheck(value, resolvedConfig) ? (value) : undefined\n\n      if (resolvedAssert !== undefined) {\n        return typeof resolvedAssert === 'function' ? assertDefinedEx<T>(result, resolvedAssert) : assertDefinedEx<T>(result, () => resolvedAssert)\n      }\n      return result\n    }\n    return func\n  },\n  createOptional: <T extends AnyNonPromise>(typeCheck: TypeCheck<T>) => {\n    const func = (value: AnyNonPromise): T | undefined => {\n      if (value === undefined || value === null) return undefined\n      if (isPromise(value)) {\n        throw new TypeError('un-awaited promises may not be sent to \"as\" functions')\n      }\n      return typeCheck(value) ? (value) : undefined\n    }\n    return func\n  },\n}\n", "import type { TypeCheck } from '@xylabs/object-model'\nimport type { TypedObject } from '@xylabs/typeof'\n\nimport { AsTypeFactory } from './AsTypeFactory.ts'\n\n/** Factory for creating type-narrowing functions for TypedObject types. */\nexport const AsObjectFactory = {\n  create: <T extends TypedObject>(typeCheck: TypeCheck<T>) => {\n    return AsTypeFactory.create<T>(typeCheck)\n  },\n  createOptional: <T extends TypedObject>(typeCheck: TypeCheck<T>) => {\n    return AsTypeFactory.createOptional<T>(typeCheck)\n  },\n}\n", "import type { AnyObject } from '@xylabs/object-model'\n\n/**\n * Deeply merges two types into a new type.\n */\ntype DeepMerge<A, B> = {\n  [K in keyof A | keyof B]:\n  K extends keyof B\n    ? K extends keyof A\n      ? A[K] extends object\n        ? B[K] extends object\n          ? DeepMerge<A[K], B[K]>\n          : B[K]\n        : B[K]\n      : B[K]\n    : K extends keyof A\n      ? A[K]\n      : never;\n}\n\n/**\n * Merges multiple types into a new type.\n */\ntype MergeAll<T extends object[], R = {}>\n  = T extends [infer First extends object, ...infer Rest extends object[]]\n    ? MergeAll<Rest, DeepMerge<R, First>>\n    : R\n\n/**\n * Options for merging objects in the deep merge function.\n */\ninterface MergeOptions {\n  /**\n   * Strategy for merging arrays.\n   * - 'overwrite': Overwrites the array with the last object's value.\n   * - 'concat': Concatenates arrays from all objects.\n   * @default 'overwrite'\n   */\n  arrayStrategy?: 'overwrite' | 'concat'\n  /**\n   * Mutate the first object in the list instead of creating a new one.\n   * @default false\n   */\n  mutate?: boolean\n}\n\nconst isUnsafeKey = (key: string | symbol): boolean =>\n  key === '__proto__' || key === 'constructor' || key === 'prototype'\n\nfunction merge<T extends AnyObject>(target: AnyObject, source?: AnyObject, options?: MergeOptions): T {\n  if (!source || typeof source !== 'object') return target as T\n\n  for (const key of Reflect.ownKeys(source)) {\n    const value = source[key]\n    if (isUnsafeKey(key)) {\n      continue\n    } else if (Array.isArray(value)) {\n      const targetValue = target[key]\n      target[key]\n      // If the value is an array, handle it based on the configured array strategy\n        = options?.arrayStrategy === 'concat' && Array.isArray(targetValue)\n          ? [...targetValue as unknown[], ...value as unknown[]]\n          : value\n    } else if (value !== null && typeof value === 'object') {\n      // Recursively merge nested objects\n      if (!target[key] || typeof target[key] !== 'object') {\n        target[key] = {}\n      }\n      merge(target[key] as AnyObject, value as AnyObject, options)\n    } else {\n      // Overwrite with non-object values\n      target[key] = value\n    }\n  }\n\n  return target as T\n}\n\n/**\n * Creates a deep merge function with the specified options.\n * @param options Options for merging.\n * @returns A deep merge function configured for the specified options.\n */\nexport function createDeepMerge(options: MergeOptions) {\n  return function deepMerge<T extends AnyObject[]>(...objects: T): MergeAll<T> {\n    const result = (options.mutate ? objects[0] ?? {} : {}) as MergeAll<T>\n    for (const obj of objects) {\n      merge(result, obj, options)\n    }\n    return result\n  }\n}\n\n/**\n * Deeply merges multiple objects into a new object.\n * @param objects Multiple objects to merge deeply.\n * The function merges properties from all objects into a new object.\n * If a property exists in multiple objects, the last object's value will be used.\n * If a property is an object, it will be merged recursively.\n * If a property is an array, it will be overwritten by the last object's value.\n * If a property is a primitive value, it will be overwritten by the last object's value.\n * If a property is undefined in the source, it will be skipped.\n * If a property is a symbol, it will be merged as well.\n * @returns A new object with the merged properties.\n */\nexport const deepMerge = createDeepMerge({ arrayStrategy: 'overwrite', mutate: false })\n", "import type { TypeCheck, TypeCheckConfig } from '@xylabs/object-model'\nimport {\n  isObject, isTruthy,\n  type ObjectTypeShape, type TypedObject,\n} from '@xylabs/typeof'\nimport { isType } from '@xylabs/typeof'\n\n/** Configuration options for object type checking. */\nexport interface ObjectTypeConfig extends TypeCheckConfig {}\n\n/** Factory class for creating type-guard functions that validate objects against a given shape and optional additional checks. */\nexport class IsObjectFactory<T extends TypedObject> {\n  /**\n   * Creates a type-guard function that validates an object matches the given shape and passes additional checks.\n   * @param shape - An optional map of property names to expected types.\n   * @param additionalChecks - Optional extra type-check functions to run after shape validation.\n   * @returns A type-guard function for type T.\n   */\n  create(shape?: ObjectTypeShape, additionalChecks?: TypeCheck<TypedObject>[]): TypeCheck<T> {\n    return (obj: unknown, config?: TypeCheckConfig | number): obj is T => {\n      if (!isObject(obj)) {\n        return false\n      }\n      const log = (typeof config === 'object') ? config.log : undefined\n      return (\n        // do primary check\n        Object.entries(shape ?? {}).filter(([key, type]) => {\n          const result = isType((obj as Record<string, unknown>)[key], type)\n          if (!result && isTruthy(log)) {\n            const logger = typeof log === 'object' ? log : console\n            logger.warn(`isType Failed: ${key}: ${type}`)\n          }\n          return !result\n        }).length === 0\n        // perform additional checks\n        // eslint-disable-next-line unicorn/no-array-reduce\n        && (additionalChecks?.reduce((prev, check) => prev && check(obj, { log }), true) ?? true)\n      )\n    }\n  }\n}\n", "import {\n  zodAsFactory, zodIsFactory, zodToFactory,\n} from '@xylabs/zod'\nimport * as z from 'zod/mini'\n\nconst JsonArrayZod = z.array(z.lazy(() => JsonValueZod))\n\n// Define recursive JSON value schema\nconst JsonValueZod: z.ZodMiniType<unknown> = z.lazy(() =>\n  z.union([\n    z.string(),\n    z.number(),\n    z.boolean(),\n    z.null(),\n    z.array(JsonValueZod),\n    z.record(z.string(), JsonValueZod), // object with string keys and JSON values\n  ]))\n\n// JSON object schema \u2014 top-level must be an object\n/** Zod schema for a JSON object with string keys and recursive JSON values. */\nexport const JsonObjectZod = z.record(z.string(), JsonValueZod)\n\n// TypeScript type for reference\n/** A recursive JSON value: string, number, boolean, null, array, or object. */\nexport type JsonValue = z.infer<typeof JsonValueZod>\n/** A JSON object with string keys and JSON values. */\nexport type JsonObject = z.infer<typeof JsonObjectZod>\n/** A JSON array containing JSON values. */\nexport type JsonArray = z.infer<typeof JsonArrayZod>\n\n/** Type guard that checks if a value is a valid JSON value. */\nexport const isJsonValue = zodIsFactory(JsonValueZod)\n/** Casts a value to JsonValue or returns undefined if it does not conform. */\nexport const asJsonValue = zodAsFactory(JsonValueZod, 'asJsonValue')\n/** Parses a value into a JsonValue, throwing if it does not conform. */\nexport const toJsonValue = zodToFactory(JsonValueZod, 'toJsonValue')\n\n/** Type guard that checks if a value is a valid JSON array. */\nexport const isJsonArray = zodIsFactory(JsonArrayZod)\n/** Casts a value to JsonArray or returns undefined if it does not conform. */\nexport const asJsonArray = zodAsFactory(JsonArrayZod, 'asJsonArray')\n/** Parses a value into a JsonArray, throwing if it does not conform. */\nexport const toJsonArray = zodToFactory(JsonArrayZod, 'toJsonArray')\n\n/** Type guard that checks if a value is a valid JSON object. */\nexport const isJsonObject = zodIsFactory(JsonObjectZod)\n/** Casts a value to JsonObject or returns undefined if it does not conform. */\nexport const asJsonObject = zodAsFactory(JsonObjectZod, 'asJsonObject')\n/** Parses a value into a JsonObject, throwing if it does not conform. */\nexport const toJsonObject = zodToFactory(JsonObjectZod, 'toJsonObject')\n", "import type { EmptyObject } from './EmptyObject.ts'\nimport type { StringKeyObject } from './StringKeyObject.ts'\n\n/** Abstract base class that wraps an object and provides typed access to it. */\nexport abstract class ObjectWrapper<T extends EmptyObject = EmptyObject> {\n  readonly obj: T\n  constructor(obj: T) {\n    this.obj = obj\n  }\n\n  protected get stringKeyObj() {\n    return this.obj as StringKeyObject\n  }\n}\n", "import { assertEx } from '@xylabs/assert'\n\nimport type { EmptyObject } from './EmptyObject.ts'\nimport type { JsonObject } from './JsonObject.ts'\nimport type { DeepOmitStartsWith } from './OmitStartsWith.ts'\n\n/** A predicate function used to determine which properties to omit from an object. */\nexport type OmitByPredicate<T extends EmptyObject = Record<string, unknown>> = (value: T[keyof T], key: keyof T) => boolean\n\nconst omitByArray = <T>(\n  obj: T[],\n  predicate: OmitByPredicate,\n  maxDepth: number,\n): T[] => {\n  return obj.map((value) => {\n    return (value !== null && typeof value === 'object') ? omitBy(value, predicate, maxDepth) : value\n  }) as T[]\n}\n\nconst omitByObject = <T extends EmptyObject>(\n  obj: T,\n  predicate: OmitByPredicate,\n  maxDepth: number,\n): Partial<T> => {\n  const result: JsonObject = {}\n\n  for (const key in obj) {\n    if (Object.hasOwn(obj, key)) {\n      const value = obj[key]\n      if (!predicate(value, key)) {\n        result[key] = ((value !== null && typeof value === 'object') ? omitBy(value, predicate, maxDepth - 1) : value)\n      }\n    }\n  }\n\n  return result as T\n}\n\n/**\n * Creates a new object excluding properties that satisfy the predicate, with optional recursive depth.\n * @param obj - The source object to omit properties from.\n * @param predicate - A function that returns true for properties to exclude.\n * @param maxDepth - Maximum recursion depth for nested objects.\n * @returns A partial copy of the object without matching properties.\n */\nexport const omitBy = <T extends EmptyObject>(\n  obj: T,\n  predicate: OmitByPredicate,\n  maxDepth = 1,\n): Partial<T> => {\n  if (maxDepth <= 0) {\n    return obj\n  }\n\n  return Array.isArray(obj) ? omitByArray(obj, predicate, maxDepth - 1) as T : omitByObject(obj, predicate, maxDepth - 1)\n}\n\nconst omitByPrefixPredicate = (prefix: string) => (_: unknown, key: string) => {\n  assertEx(typeof key === 'string', () => `Invalid key type [${key}, ${typeof key}]`)\n  return key.startsWith(prefix)\n}\n\n/**\n * Omits all properties whose keys start with the given prefix, recursively through nested objects.\n * @param payload - The source object.\n * @param prefix - The string prefix to match keys against.\n * @param maxDepth - Maximum recursion depth.\n * @returns A new object without properties that have matching prefixed keys.\n */\nexport const omitByPrefix = <T extends EmptyObject, P extends string>(payload: T, prefix: P, maxDepth = 100): DeepOmitStartsWith<T, P> => {\n  return omitBy(payload, omitByPrefixPredicate(prefix), maxDepth) as unknown as DeepOmitStartsWith<T, P>\n}\n", "import { assertEx } from '@xylabs/assert'\n\nimport type { EmptyObject } from './EmptyObject.ts'\nimport type { JsonObject } from './JsonObject.ts'\nimport type { DeepPickStartsWith } from './PickStartsWith.ts'\n\n/** A predicate function used to determine which properties to pick from an object. */\nexport type PickByPredicate<T extends EmptyObject = Record<string, unknown>> = (value: T[keyof T], key: keyof T) => boolean\n\nconst pickByArray = <T>(\n  obj: T[],\n  predicate: PickByPredicate,\n  maxDepth: number,\n): T[] => {\n  return obj.map((value) => {\n    return (value !== null && typeof value === 'object') ? pickBy(value, predicate, maxDepth) : value\n  }) as T[]\n}\n\nconst pickByObject = <T extends EmptyObject>(\n  obj: T,\n  predicate: PickByPredicate,\n  maxDepth: number,\n): Partial<T> => {\n  const result: JsonObject = {}\n\n  for (const key in obj) {\n    if (Object.hasOwn(obj, key)) {\n      const value = obj[key]\n      if (predicate(value, key)) {\n        result[key] = ((value !== null && typeof value === 'object') ? pickBy(value, predicate, maxDepth - 1) : value)\n      }\n    }\n  }\n\n  return result as T\n}\n\n/**\n * Creates a new object containing only the properties that satisfy the predicate, with optional recursive depth.\n * @param obj - The source object to pick properties from.\n * @param predicate - A function that returns true for properties to include.\n * @param maxDepth - Maximum recursion depth for nested objects.\n * @returns A partial copy of the object with only matching properties.\n */\nexport const pickBy = <T extends EmptyObject>(\n  obj: T,\n  predicate: PickByPredicate,\n  maxDepth = 1,\n): Partial<T> => {\n  if (maxDepth <= 0) {\n    return obj\n  }\n\n  return Array.isArray(obj) ? pickByArray(obj, predicate, maxDepth - 1) as T : pickByObject(obj, predicate, maxDepth - 1)\n}\n\nconst pickByPrefixPredicate = (prefix: string) => (_: unknown, key: string) => {\n  assertEx(typeof key === 'string', () => `Invalid key type [${key}, ${typeof key}]`)\n  return key.startsWith(prefix)\n}\n\n/**\n * Picks all properties whose keys start with the given prefix, recursively through nested objects.\n * @param payload - The source object.\n * @param prefix - The string prefix to match keys against.\n * @param maxDepth - Maximum recursion depth.\n * @returns A new object containing only properties with matching prefixed keys.\n */\nexport const pickByPrefix = <T extends EmptyObject, P extends string>(payload: T, prefix: P, maxDepth = 100): DeepPickStartsWith<T, P> => {\n  return pickBy(payload, pickByPrefixPredicate(prefix), maxDepth) as unknown as DeepPickStartsWith<T, P>\n}\n", "import type { EmptyObject } from './EmptyObject.ts'\n\n/**\n * Returns a shallow copy of the object with the specified fields removed.\n * @param obj - The source object.\n * @param fields - An array of keys to remove.\n * @returns A new object without the specified fields.\n */\nexport const removeFields = <T extends EmptyObject, K extends keyof T>(obj: T, fields: K[]): Omit<T, K> => {\n  const clone = { ...obj }\n  for (const field of fields) {\n    delete clone[field]\n  }\n  return clone\n}\n", "import type {\n  JsonArray, JsonObject, JsonValue,\n} from './JsonObject.ts'\n\n/**\n * Converts an array to a JSON-safe array, handling circular references and depth limits.\n * @param value - The array to convert.\n * @param cycleList - Tracks visited objects to detect circular references.\n * @param maxDepth - Maximum recursion depth before truncating.\n * @returns A JSON-safe array representation.\n */\nexport const toSafeJsonArray = (value: unknown[], cycleList?: unknown[], maxDepth = 3): JsonArray => {\n  return value.map(item => toSafeJsonValue(item, cycleList, maxDepth))\n}\n\n/**\n * Converts an object to a JSON-safe object, handling circular references and depth limits.\n * @param value - The object to convert.\n * @param cycleList - Tracks visited objects to detect circular references.\n * @param maxDepth - Maximum recursion depth before truncating.\n * @returns A JSON-safe object representation.\n */\nexport const toSafeJsonObject = (value: object, cycleList?: unknown[], maxDepth = 3): JsonObject => {\n  const result: JsonObject = {}\n  for (const [key, entry] of Object.entries(value)) {\n    result[key] = value === undefined ? '[Undefined]' : toSafeJsonValue(entry, cycleList, maxDepth)\n  }\n  return result\n}\n\n/**\n * Converts an unknown value to a JSON-safe value, replacing circular references with '[Circular]' and\n * non-JSON types with descriptive placeholder strings.\n * @param value - The value to convert.\n * @param cycleList - Tracks visited objects to detect circular references.\n * @param maxDepth - Maximum recursion depth before truncating with '[MaxDepth]'.\n * @returns A JSON-safe representation of the value.\n */\nexport const toSafeJsonValue = (value: unknown, cycleList?: unknown[], maxDepth = 3): JsonValue => {\n  if (maxDepth <= 0 && typeof value === 'object') {\n    return '[MaxDepth]'\n  }\n  if (cycleList?.includes(value)) {\n    return '[Circular]'\n  }\n  switch (typeof value) {\n    case 'string':\n    case 'boolean':\n    case 'number': {\n      return value\n    }\n    case 'object': {\n      if (value === null) {\n        return null\n      }\n      const newCycleList = cycleList ?? []\n      newCycleList.push(value)\n      return Array.isArray(value) ? toSafeJsonArray(value, newCycleList, maxDepth - 1) : toSafeJsonObject(value, newCycleList, maxDepth - 1)\n    }\n    default: {\n      return `[${typeof value}]`\n    }\n  }\n}\n\n/**\n * Converts a value to a pretty-printed JSON string, safely handling circular references and non-JSON types.\n * @param value - The value to serialize.\n * @param maxDepth - Maximum recursion depth.\n * @returns A formatted JSON string.\n */\nexport const toSafeJsonString = (value: unknown, maxDepth = 3) => {\n  return JSON.stringify(toSafeJson(value, maxDepth), null, 2)\n}\n\n/**\n * Converts a value to a JSON-safe representation, handling circular references and non-serializable types.\n * @param value - The value to convert.\n * @param maxDepth - Maximum recursion depth.\n * @returns A JSON-safe value.\n */\nexport const toSafeJson = (value: unknown, maxDepth = 3): JsonValue => {\n  return toSafeJsonValue(value, undefined, maxDepth)\n}\n", "import type { AnyObject } from '@xylabs/object-model'\nimport type { Promisable } from '@xylabs/promise'\n\nimport type { EmptyObject } from './EmptyObject.ts'\nimport { ObjectWrapper } from './ObjectWrapper.ts'\n\n/** Interface for validating objects and returning any errors found. */\nexport interface Validator<T extends EmptyObject = AnyObject> {\n  validate(payload: T): Promisable<Error[]>\n}\n\n/** Abstract base class for validators that wraps a partial object and provides a validation method. */\nexport abstract class ValidatorBase<T extends EmptyObject = AnyObject> extends ObjectWrapper<Partial<T>> implements Validator<T> {\n  abstract validate(payload: T): Promisable<Error[]>\n}\n"],
  "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACGO,IAAM,SAAS,CAAC,OAAgB,iBAA4B;AACjE,QAAM,cAAc,OAAO;AAC3B,UAAQ,cAAc;AAAA,IACpB,KAAK,SAAS;AACZ,aAAO,MAAM,QAAQ,KAAK;AAAA,IAC5B;AAAA,IACA,KAAK,QAAQ;AACX,aAAO,UAAU;AAAA,IACnB;AAA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