@typescript-package/data
Version:
A lightweight TypeScript library for basic data management.
1 lines • 32.7 kB
Source Map (JSON)
{"version":3,"file":"typescript-package-data.mjs","sources":["../../../package/data/src/lib/immutability.abstract.ts","../../../package/data/src/lib/data-core.abstract.ts","../../../package/data/src/lib/value.class.ts","../../../package/data/src/lib/data.class.ts","../../../package/data/src/lib/readonly-data.class.ts","../../../package/data/src/lib/immutable-data.class.ts","../../../package/data/src/lib/weak-data.class.ts","../../../package/data/src/lib/indexed-weak-data.class.ts","../../../package/data/src/lib/named-weak-data.class.ts","../../../package/data/src/lib/value.symbol.ts","../../../package/data/src/lib/index.ts","../../../package/data/src/public-api.ts","../../../package/data/src/typescript-package-data.ts"],"sourcesContent":["/**\n * @description Manages the immutability states of `this` current instance.\n * @export\n * @abstract\n * @class Immutability\n */\nexport abstract class Immutability {\n /**\n * @description\n * @template Type \n * @param {Type} object \n * @returns {Readonly<Type>} \n */\n public static deepFreeze<Type>(object: Type): Readonly<Type> {\n if (object && typeof object === \"object\" && !Object.isFrozen(object)) {\n Object.getOwnPropertyNames(object).forEach(prop => Immutability.deepFreeze((object as any)[prop]));\n Object.freeze(object);\n }\n return object;\n }\n\n /**\n * @description\n * @public\n * @readonly\n * @type {boolean}\n */\n public get frozen() {\n return this.isFrozen();\n }\n\n /**\n * @description\n * @public\n * @readonly\n * @type {boolean}\n */\n public get locked() {\n return this.#locked;\n }\n\n /**\n * @description\n * @public\n * @readonly\n * @type {boolean}\n */\n public get mutable() {\n return this.isMutable();\n }\n\n /**\n * @description\n * @public\n * @readonly\n * @type {boolean}\n */\n public get sealed() {\n return this.isSealed();\n }\n\n /**\n * @description Privately stored locked state as `true` if locked, otherwise `false`.\n * @type {boolean}\n */\n #locked = false;\n\n /**\n * @description Deeply freezes current `this` instance.\n * @public\n * @returns {this} Returns current instance.\n */\n public deepFreeze(): this {\n if (this.isLocked()) {\n throw new Error('Cannot freeze a locked object.');\n }\n Immutability.deepFreeze(this);\n return this;\n }\n\n /**\n * @description \"Prevents the modification of existing property attributes and values, and prevents the addition of new properties.\"\n * @public\n * @returns {this} Returns current instance.\n */\n public freeze(): this {\n if (this.isLocked()) {\n throw new Error('Cannot freeze a locked object.');\n }\n Object.freeze(this);\n return this;\n }\n\n /**\n * @description Checks whether `this` current instance is frozen.\n * @public\n * @returns {boolean}\n */\n public isFrozen(): boolean {\n return Object.isFrozen(this);\n }\n\n /**\n * @description Checks whether the current instance is locked.\n * @public\n * @returns {boolean} Returns a `boolean` indicating whether current instance is locked.\n */\n public isLocked() {\n return this.#locked === true;\n }\n\n /**\n * @description Checks whether the object is mutable.\n * @public\n * @returns {boolean} True if the object is mutable, otherwise `false`.\n */\n public isMutable(): boolean {\n return !this.isSealed() && !this.isFrozen() && !this.isLocked();\n }\n\n /**\n * @description Checks whether `this` current instance is sealed.\n * @public\n * @returns {boolean} Returns a `boolean` indicating whether current instance is sealed.\n */\n public isSealed(): boolean {\n return Object.isSealed(this);\n }\n\n /**\n * @description Locks the object, means deeply freezes and blocks the `set()`, ensuring deep immutability.\n * It combines the features of `Object.freeze`, but extends immutability to nested structures (deep immutability).\n * @public\n * @returns {this} Returns current instance.\n */\n public lock(): this {\n Immutability.deepFreeze(this);\n this.#locked = true;\n return this;\n }\n\n /**\n * @description \"Prevents the modification of attributes of existing properties, and prevents the addition of new properties.\"\n * @public\n * @returns {this} Returns current instance.\n */\n public seal(): this {\n if (this.isLocked()) {\n throw new Error('Cannot seal a locked object.');\n }\n Object.seal(this);\n return this;\n }\n\n /**\n * @description Validates the ability to set the value.\n * @protected\n * @returns {this} Returns current instance.\n */\n protected validate(): this {\n if (this.isLocked()) {\n throw new Error('Cannot set when data is locked.');\n }\n return this;\n }\n}\n","// Abstract.\nimport { Immutability } from './immutability.abstract';\n/**\n * @description The base abstraction with immutability for handling data-related classes.\n * @export\n * @abstract\n * @class DataCore\n * @template Type Represents the type of data value.\n * @extends {Immutability}\n */\nexport abstract class DataCore<Type> extends Immutability {\n /**\n * @description Returns the `string` tag representation of the `DataCore` class when used in `Object.prototype.toString.call(instance)`.\n * @public\n * @readonly\n * @type {string}\n */\n public get [Symbol.toStringTag](): string {\n return DataCore.name;\n }\n\n /**\n * @description Returns the string tag of the current instance defined by the `Symbol.toStringTag`.\n * @public\n * @returns {string | undefined} The extracted class name, such as `'DataCore'`, or `undefined` if extraction fails.\n */\n public get tag(): string | undefined {\n const tag = Object.prototype.toString.call(this).slice(8, -1);\n return tag !== 'Object' ? tag : undefined;\n }\n\n /**\n * @description Returns the value of generic type variable `Type`.\n * @public\n * @abstract\n * @readonly\n * @type {Type}\n */\n public abstract get value(): Type;\n\n /**\n * @description Clears the value by setting to `undefined` or `null`.\n * @public\n * @abstract\n * @returns {this} Returns `this` current instance.\n */\n public abstract clear(): this;\n\n /**\n * @description Abstract method to clear or remove the stored data value.\n * @public\n * @abstract\n * @returns {this} Returns `this` current instance.\n */\n public abstract destroy(): this;\n\n /**\n * @inheritdoc\n * @public\n * @returns {this} \n */\n public override lock(): this {\n Immutability.deepFreeze(this.value);\n super.lock(); \n return this;\n }\n\n /**\n * @description Sets the data value. Ensure `super.validate()` is called before invoking this method.\n * @public\n * @abstract\n * @param {Type} value The data value of `Type` to set.\n * @returns {this} Returns `this` current instance.\n */ \n public abstract set(value: Type): this;\n}\n","/**\n * @description The class to manage the value of generic type variable `Type`.\n * @export\n * @class Value\n * @template Type The type of the privately stored `#value`.\n */\nexport class Value<Type> {\n /**\n * @description Returns the `string` tag representation of the `Value` class when used in `Object.prototype.toString.call(instance)`.\n * The `tag` getter returns the actual class name defined with the `Symbol.toStringTag()` of the child class.\n * @public\n * @readonly\n * @type {string}\n */\n public get [Symbol.toStringTag]() {\n return Value.name;\n }\n\n /**\n * @description Returns the string tag of the current instance defined by the `Symbol.toStringTag`.\n * @public\n * @returns {string | undefined} The extracted class name, such as `'Value'`, or `undefined` if extraction fails.\n */\n public get tag(): string | undefined {\n const tag = Object.prototype.toString.call(this).slice(8, -1);\n return tag !== 'Object' ? tag : undefined;\n }\n\n /**\n * @description Returns the privately stored value of generic type variable `Type`.\n * @public\n * @readonly\n * @type {Type} \n */\n public get value(): Type {\n return this.#value;\n }\n\n /**\n * @description Privately stored value of generic type variable `Type`.\n * @type {Type}\n */\n #value: Type;\n\n /**\n * Creates an instance of child class.\n * @constructor\n * @param {Type} value The value of generic type variable `Type`.\n */\n constructor(value: Type) {\n this.#value = value;\n }\n \n /**\n * @description Sets the value of generic type variable `Type`.\n * @public\n * @param {Type} value The value of `Type` to set.\n * @returns {this} The `this` current instance.\n */\n public set(value: Type): this {\n this.#value = value;\n return this;\n }\n}\n","// Abstract.\nimport { DataCore } from './data-core.abstract';\n// Class.\nimport { Value } from './value.class';\n/**\n * @description The `Data` class is a concrete class that wraps a value and provides methods for setting, retrieving, and destroying the value.\n * @export\n * @class Data\n * @template Type \n * @extends {DataCore<Type>}\n */\nexport class Data<Type> extends DataCore<Type> {\n /**\n * @description Returns the `string` tag representation of the `Data` class when used in `Object.prototype.toString.call(instance)`.\n * @public\n * @readonly\n * @type {string}\n */\n public override get [Symbol.toStringTag](): string {\n return Data.name;\n }\n \n /**\n * @description Returns the privately stored value of generic type variable `Type`.\n * @public\n * @readonly\n * @type {Type}\n */\n public get value(): Type {\n return this.#value.value;\n }\n\n /**\n * @description Privately stored value of class `Value<Type>`.\n * @type {Value<Type>}\n */\n #value: Value<Type>;\n\n /**\n * Creates an instance of `Data`.\n * @constructor\n * @param {Type} value Initial data value of generic type variable `Type`.\n */\n constructor(value: Type) {\n super();\n this.#value = new Value(value);\n }\n\n /**\n * @description \n * @public\n * @returns {Type} \n */\n public [Symbol.for('value')](): Type {\n return this.value;\n }\n\n /**\n * @description Clears the value to `null`.\n * @public\n * @returns {this} The `this` current instance.\n */\n public clear(): this {\n this.#value.set(null as unknown as Type);\n return this;\n }\n\n /**\n * @description Destroys the `Value` object by setting it to `null`.\n * @public\n * @returns {this} The `this` current instance.\n */\n public destroy(): this {\n this.#value = null as any;\n return this;\n }\n\n /**\n * @description Sets the data value.\n * @public\n * @param {Type} value The data value of `Type` to set.\n * @returns {this} The `this` current instance.\n */\n public set(value: Type): this {\n super.validate(), this.#value!.set(value);\n return this;\n }\n}\n","// Class.\nimport { Data } from './data.class';\n/**\n * @description \n * @export\n * @class ReadonlyData\n * @template Type \n * @extends {Data<Readonly<Type>>}\n */\nexport class ReadonlyData<Type> extends Data<Readonly<Type>> {\n /**\n * @inheritdoc\n * @public\n * @readonly\n * @type {string}\n */\n public override get [Symbol.toStringTag](): string {\n return ReadonlyData.name;\n }\n}\n","// Abstract.\nimport { Immutability } from './immutability.abstract';\n// Class.\nimport { ReadonlyData } from './readonly-data.class';\n/**\n * @description A class that stores and returns an immutable version of the provided value.\n * The value is frozen at runtime and marked as `readonly` at type level.\n * @export\n * @class ImmutableData\n * @template Type The original input type.\n * @extends {ReadonlyData<Type>}\n */\nexport class ImmutableData<Type> extends ReadonlyData<Type> {\n /**\n * @description Returns the `string` tag representation of the `ImmutableData` class when used in `Object.prototype.toString.call(instance)`.\n * @public\n * @readonly\n * @type {string}\n */\n public override get [Symbol.toStringTag](): string {\n return ImmutableData.name;\n }\n\n /**\n * Creates an instance of `ImmutableData`.\n * @constructor\n * @param {Type} value Initial value to store.\n */\n constructor(value: Type) {\n super(Immutability.deepFreeze(value));\n }\n\n /**\n * @description Sets the data value.\n * @public\n * @param {Type} value The data value of `Type` to set.\n * @returns {this} The `this` current instance.\n */\n public override set(value: Type): this {\n return super.set(Immutability.deepFreeze(value));\n }\n}\n","// Abstract.\nimport { DataCore } from './data-core.abstract';\n/**\n * @description The `WeakData` class is a concrete class that stores data in a static `WeakMap`.\n * @export\n * @class WeakData\n * @template Type \n * @extends {DataCore<Type>}\n */\nexport class WeakData<Type> extends DataCore<Type> {\n /**\n * @description Returns a new `WeakData` instance with a given value.\n * @public\n * @static\n * @template Type \n * @param {Type} value The value of `Type`.\n * @returns {WeakData<Type>} Returns a new `WeakData` instance.\n */\n public static create<Type>(value: Type): WeakData<Type> {\n return new WeakData(value);\n }\n\n /**\n * @description Gets the data value from another instance.\n * @public\n * @static\n * @template Type \n * @param {WeakData<Type>} instance Another instance from which to get the data.\n * @returns {Type} The value of the data stored in the given instance.\n */\n public static get<Type>(instance: WeakData<Type>): Type {\n return WeakData.#value.get(instance);\n }\n\n /**\n * @description Checks whether the instance exists in the data.\n * @public\n * @static\n * @template Type \n * @param {WeakData<Type>} instance The instance to check.\n * @returns {boolean} \"a boolean indicating whether an element with the specified key exists or not.\"\n */\n public static has<Type>(instance: WeakData<Type>): boolean {\n return WeakData.#value.has(instance);\n }\n\n /**\n * @description Returns the `string` tag representation of the `WeakData` class when used in `Object.prototype.toString.call(instance)`.\n * @public\n * @readonly\n * @type {string}\n */\n public override get [Symbol.toStringTag](): string {\n return WeakData.name;\n }\n \n /**\n * @description A static, privately stored `WeakMap` used for associating each instance with its value.\n * @readonly\n * @type {WeakMap}\n */\n static readonly #value: WeakMap<object, any> = new WeakMap();\n\n /**\n * @description Returns the readonly value of `Type` from static `WeakMap`.\n * @public\n * @readonly\n * @type {Type} \n */\n public get value(): Readonly<Type> {\n return WeakData.#value.get(this);\n }\n\n /**\n * Creates an instance of `WeakData`.\n * @constructor\n * @param {Type} value Initial data value of `Type`.\n */ \n constructor(value: Type) {\n super();\n WeakData.#value.set(this, value);\n }\n\n /**\n * @description\n * @public\n * @returns {Type} \n */\n public [Symbol.for('value')](): Readonly<Type> {\n return this.value;\n }\n\n /**\n * @description Clears the value to `null`.\n * @public\n * @returns {this} The `this` current instance.\n */\n public clear(): this {\n WeakData.#value.set(this, null as unknown as Type);\n return this;\n }\n\n /**\n * @description Removes the data value in a static `WeakMap`.\n * @public\n * @returns {this} The `this` current instance.\n */\n public delete(): this {\n WeakData.#value.delete(this);\n return this;\n }\n\n /**\n * @description Destroys the value in a static `WeakMap`.\n * @public\n * @returns {this} The `this` current instance.\n */\n public destroy(): this {\n this.clear().delete();\n return this;\n }\n\n /**\n * @description Sets the data value in a static `WeakMap`.\n * @public\n * @param {Type} value The data of `Type` to set.\n * @returns {this} The `this` current instance.\n */ \n public set(value: Type): this {\n super.validate();\n WeakData.#value.set(this, value);\n return this;\n }\n\n /**\n * @description Applies the callback to the current value and updates it.\n * @public\n * @param {(value: Type) => Type} callbackFn The callback to apply to the value.\n * @returns {this} The `this` current instance.\n */\n public update(callbackFn: (value: Type) => Type): this {\n if (typeof callbackFn === 'function') {\n this.set(callbackFn(this.value));\n } else {\n throw new Error(\"`callbackFn` must a function type.\");\n }\n return this;\n }\n\n /**\n * @description Creates a new instance with a new value of `Type`.\n * @public\n * @param {Type} value The value of `Type`.\n * @returns {WeakData<Type>} Returns a `WeakData` instance with value of `Type`.\n */\n public with(value: Type): WeakData<Type> {\n return WeakData.create(value);\n }\n}\n","// Class.\nimport { WeakData } from \"./weak-data.class\";\n/**\n * @description\n * @export\n * @class IndexedWeakData\n * @template {object} [Obj=object] \n * @template {keyof Obj} [Key=keyof Obj] \n * @extends {WeakData<Obj>}\n */\nexport class IndexedWeakData<\n Obj extends object = object,\n Key extends keyof Obj = keyof Obj,\n> extends WeakData<Obj> {\n /**\n * @description\n * @public\n * @static\n * @template {object} [Obj=object] \n * @param {number} index \n * @returns {(Obj | undefined)} \n */\n public static getByIndex<Obj extends object = object>(index: number): Obj | undefined {\n return IndexedWeakData.#registry.get(index)?.deref()?.value;\n }\n\n /**\n * @description\n * @static\n * @type {Map}\n */\n static #registry = new Map<number, WeakRef<IndexedWeakData<any, any>>>();\n\n /**\n * @description\n * @static\n * @type {FinalizationRegistry}\n */\n static #finalizationRegistry = new FinalizationRegistry((id: number) => IndexedWeakData.#registry.delete(id));\n\n /**\n * @description\n * @public\n * @readonly\n * @type {(number | undefined)}\n */\n public get index(): number | undefined {\n return Object.hasOwn(super.value, this.#key) ? super.value[this.#key] as number : undefined;\n }\n\n /**\n * @description\n * @public\n * @readonly\n * @type {Key}\n */\n public get key() {\n return this.#key;\n }\n\n /**\n * @description\n * @type {!Key}\n */\n #key!: Key;\n\n /**\n * Creates an instance of `IndexedWeakData`.\n * @constructor\n * @param {Obj} object \n * @param {Key} key \n */\n constructor(object: Obj, key: Key) {\n super(object);\n if (typeof object[key] === 'number') {\n this.#key = key;\n if (this.index) {\n IndexedWeakData.#registry.set(this.index, new WeakRef(this));\n IndexedWeakData.#finalizationRegistry.register(this, this.index);\n }\n } else {\n throw Error(`Key must be associated with \\`number\\` type value in \\`object\\`.`);\n }\n }\n\n /**\n * @inheritdoc\n * @public\n * @returns {this} \n */\n public override destroy(): this {\n typeof this.index === 'number' && IndexedWeakData.#registry.delete(this.index);\n return super.destroy();\n }\n\n /**\n * @description\n * @public\n * @param {number} index \n * @returns {(Obj | undefined)} \n */\n public getByIndex(index: number): Obj | undefined {\n return IndexedWeakData.getByIndex<Obj>(index);\n }\n}\n","// Abstract.\nimport { DataCore } from '.';\n/**\n * @deprecated In favor of `WeakStorage` in `typescript-package/storage`.\n * @description The `NamedWeakData` class is a concrete class that manages data in a static `Map` where data is associated with a specified name.\n * @export\n * @class NamedWeakData\n * @template [Type=any] \n * @template {string} [Name='default'] \n * @extends {DataCore<Type>}\n */\nexport class NamedWeakData<Type = any, Name extends string = 'default'> extends DataCore<Type> {\n /**\n * @description Gets the data from another instance.\n * @public\n * @static\n * @template {string} Name \n * @template Type \n * @param {NamedWeakData<Name, Type>} instance Another instance from which to get the data.\n * @param {Name} name The name from which get the data.\n * @returns {Type} The value of the data stored in the given instance.\n */\n public static getFrom<Name extends string, Type>(instance: NamedWeakData<Type, Name>, name: Name): Type {\n return NamedWeakData.#value.get(name)?.get(instance);\n }\n\n /**\n * @description Returns the `string` tag representation of the `NamedWeakData` class when used in `Object.prototype.toString.call(instance)`.\n * @public\n * @readonly\n * @type {string}\n */\n public override get [Symbol.toStringTag](): string {\n return NamedWeakData.name;\n }\n\n\n /**\n * @description A private static `Map` stores under specified `string` type name the data value instance in `WeakMap`.\n * @static\n * @readonly\n * @type {Map<string, WeakMap<any, any>>}\n */\n static readonly #value: Map<string, WeakMap<any, any>> = new Map();\n\n /**\n * @description\n * @public\n * @readonly\n * @type {Name}\n */\n public get name(): Name {\n return this.#name;\n }\n\n /**\n * @description Returns the privately stored data value from the specified name of static `Map`.\n * @public\n * @readonly\n * @type {Type}\n */\n public get value(): Type {\n return NamedWeakData.#value.get(this.name)?.get(this);\n }\n\n /**\n * @description\n * @type {Name}\n */\n #name: Name;\n\n /**\n * Creates an instance of `NamedWeakData` child class.\n * @constructor\n * @param {Type} value Initial data value of `Type`.\n * @param {string} [name='default'] The name under which the value is stored, defaults to `default`.\n */ \n constructor(value: Type, name: Name = 'default' as Name) {\n super();\n this.#name = name;\n NamedWeakData.#value.has(name) || NamedWeakData.#value.set(name, new WeakMap<any, any>());\n NamedWeakData.#value.get(name)?.set(this, value);\n }\n\n /**\n * @description Clears the value in the `WeakMap`.\n * @public\n * @returns {this} Returns `this` current instance.\n */\n public clear(): this {\n this.set(null as any);\n return this;\n }\n\n /**\n * @description \n * @public\n * @returns {this} Returns `this` current instance.\n */\n public destroy(): this {\n NamedWeakData.#value.clear();\n return this;\n }\n\n /**\n * @description Sets the data value.\n * @public\n * @param {Type} value The data of `Type` to set.\n * @returns {this} Returns `this` current instance.\n */\n public set(value: Type): this {\n super.validate();\n NamedWeakData.#value.get(this.name)?.set(this, value);\n return this;\n }\n}","export const SymbolValue = Symbol.for('value');","// Abstract class.\nexport { DataCore } from './data-core.abstract';\nexport { Immutability } from './immutability.abstract';\n// Class.\nexport { Data } from './data.class';\nexport { ImmutableData } from './immutable-data.class';\nexport { ReadonlyData } from './readonly-data.class';\n// `WeakData`.\nexport { IndexedWeakData } from './indexed-weak-data.class';\nexport { NamedWeakData } from './named-weak-data.class';\nexport { WeakData } from './weak-data.class';\n// `Value`.\nexport { Value } from './value.class';\n// Constant.\nexport { SymbolValue } from './value.symbol';","/*\n * Public API Surface of data\n */\nexport {\n // Abstract.\n DataCore,\n Immutability,\n\n // Class.\n // Base.\n Data,\n ImmutableData,\n ReadonlyData,\n Value,\n\n // `WeakData`.\n NamedWeakData,\n // Indexed.\n IndexedWeakData,\n // Basic.\n WeakData,\n} from './lib';\n\n// Constant.\nexport { SymbolValue } from './lib';\n\n// Interface.\nexport type {\n DataConstructor,\n MapTypeConstructor,\n SetTypeConstructor,\n WeakMapTypeConstructor\n} from './interface';\n\n// Type.\nexport type {\n DataConstructorInput,\n ImmutableArray,\n} from './type';","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAA;;;;;AAKG;MACmB,YAAY,CAAA;AAChC;;;;;AAKG;IACI,OAAO,UAAU,CAAO,MAAY,EAAA;AACzC,QAAA,IAAI,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;YACpE,MAAM,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,IAAI,YAAY,CAAC,UAAU,CAAE,MAAc,CAAC,IAAI,CAAC,CAAC,CAAC;AAClG,YAAA,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC;;AAEvB,QAAA,OAAO,MAAM;;AAGf;;;;;AAKG;AACH,IAAA,IAAW,MAAM,GAAA;AACf,QAAA,OAAO,IAAI,CAAC,QAAQ,EAAE;;AAGxB;;;;;AAKG;AACH,IAAA,IAAW,MAAM,GAAA;QACf,OAAO,IAAI,CAAC,OAAO;;AAGrB;;;;;AAKG;AACH,IAAA,IAAW,OAAO,GAAA;AAChB,QAAA,OAAO,IAAI,CAAC,SAAS,EAAE;;AAGzB;;;;;AAKG;AACH,IAAA,IAAW,MAAM,GAAA;AACf,QAAA,OAAO,IAAI,CAAC,QAAQ,EAAE;;AAGxB;;;AAGG;IACH,OAAO,GAAG,KAAK;AAEf;;;;AAIG;IACI,UAAU,GAAA;AACf,QAAA,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAE;AACnB,YAAA,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC;;AAEnD,QAAA,YAAY,CAAC,UAAU,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