@abdokouta/react-support 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/str/str.ts","../src/collections/collection.ts","../src/collections/map.collection.ts","../src/collections/set.collection.ts","../src/registry/base-registry.ts","../src/facades/facade.ts","../src/facades/facade.interface.ts","../src/facades/create-facade.ts"],"sourcesContent":["/**\n * Laravel-style string manipulation class\n * Provides static methods for common string operations\n */\nexport class Str {\n /**\n * Return the remainder of a string after the first occurrence of a given value\n */\n static after(subject: string, search: string): string {\n if (search === '') return subject;\n const index = subject.indexOf(search);\n return index === -1 ? subject : subject.substring(index + search.length);\n }\n\n /**\n * Return the remainder of a string after the last occurrence of a given value\n */\n static afterLast(subject: string, search: string): string {\n if (search === '') return subject;\n const index = subject.lastIndexOf(search);\n return index === -1 ? subject : subject.substring(index + search.length);\n }\n\n /**\n * Convert a string to title case following APA guidelines\n */\n static apa(value: string): string {\n const minorWords = ['a', 'an', 'and', 'as', 'at', 'but', 'by', 'for', 'in', 'of', 'on', 'or', 'the', 'to', 'up'];\n const words = value.split(' ');\n \n return words.map((word, index) => {\n if (index === 0 || !minorWords.includes(word.toLowerCase())) {\n return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();\n }\n return word.toLowerCase();\n }).join(' ');\n }\n\n /**\n * Transliterate a UTF-8 value to ASCII\n */\n static ascii(value: string): string {\n return value.normalize('NFD').replace(/[\\u0300-\\u036f]/g, '');\n }\n\n /**\n * Get the portion of a string before the first occurrence of a given value\n */\n static before(subject: string, search: string): string {\n if (search === '') return subject;\n const index = subject.indexOf(search);\n return index === -1 ? subject : subject.substring(0, index);\n }\n\n /**\n * Get the portion of a string before the last occurrence of a given value\n */\n static beforeLast(subject: string, search: string): string {\n if (search === '') return subject;\n const index = subject.lastIndexOf(search);\n return index === -1 ? subject : subject.substring(0, index);\n }\n\n /**\n * Get the portion of a string between two values\n */\n static between(subject: string, from: string, to: string): string {\n if (from === '' || to === '') return subject;\n const startIndex = subject.indexOf(from);\n if (startIndex === -1) return '';\n const start = startIndex + from.length;\n const endIndex = subject.indexOf(to, start);\n return endIndex === -1 ? '' : subject.substring(start, endIndex);\n }\n\n /**\n * Get the smallest possible portion of a string between two values\n */\n static betweenFirst(subject: string, from: string, to: string): string {\n return Str.between(subject, from, to);\n }\n\n /**\n * Convert a string to camelCase\n */\n static camel(value: string): string {\n return value\n .replace(/[-_\\s]+(.)?/g, (_, char) => char ? char.toUpperCase() : '')\n .replace(/^(.)/, (char) => char.toLowerCase());\n }\n\n /**\n * Get the character at the specified index\n */\n static charAt(subject: string, index: number): string | false {\n if (index < 0 || index >= subject.length) return false;\n return subject.charAt(index);\n }\n\n /**\n * Remove the first occurrence of the given value from the start of the string\n */\n static chopStart(subject: string, search: string | string[]): string {\n const searches = Array.isArray(search) ? search : [search];\n for (const s of searches) {\n if (subject.startsWith(s)) {\n return subject.substring(s.length);\n }\n }\n return subject;\n }\n\n /**\n * Remove the last occurrence of the given value from the end of the string\n */\n static chopEnd(subject: string, search: string | string[]): string {\n const searches = Array.isArray(search) ? search : [search];\n for (const s of searches) {\n if (subject.endsWith(s)) {\n return subject.substring(0, subject.length - s.length);\n }\n }\n return subject;\n }\n\n /**\n * Determine if a given string contains a given substring\n */\n static contains(haystack: string, needles: string | string[], ignoreCase = false): boolean {\n const needleArray = Array.isArray(needles) ? needles : [needles];\n const subject = ignoreCase ? haystack.toLowerCase() : haystack;\n \n return needleArray.some(needle => {\n const search = ignoreCase ? needle.toLowerCase() : needle;\n return subject.includes(search);\n });\n }\n\n /**\n * Determine if a given string contains all array values\n */\n static containsAll(haystack: string, needles: string[], ignoreCase = false): boolean {\n const subject = ignoreCase ? haystack.toLowerCase() : haystack;\n \n return needles.every(needle => {\n const search = ignoreCase ? needle.toLowerCase() : needle;\n return subject.includes(search);\n });\n }\n\n /**\n * Determine if a given string doesn't contain a given substring\n */\n static doesntContain(haystack: string, needles: string | string[], ignoreCase = false): boolean {\n return !Str.contains(haystack, needles, ignoreCase);\n }\n\n /**\n * Replace consecutive instances of a character with a single instance\n */\n static deduplicate(value: string, character = ' '): string {\n const escaped = character.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n const regex = new RegExp(`${escaped}+`, 'g');\n return value.replace(regex, character);\n }\n\n /**\n * Determine if a given string ends with a given substring\n */\n static endsWith(haystack: string, needles: string | string[]): boolean {\n const needleArray = Array.isArray(needles) ? needles : [needles];\n return needleArray.some(needle => haystack.endsWith(needle));\n }\n\n /**\n * Extract an excerpt from text that matches the first instance of a phrase\n */\n static excerpt(text: string, phrase: string, options: { radius?: number; omission?: string } = {}): string {\n const radius = options.radius ?? 100;\n const omission = options.omission ?? '...';\n \n const index = text.indexOf(phrase);\n if (index === -1) return '';\n \n const start = Math.max(0, index - radius);\n const end = Math.min(text.length, index + phrase.length + radius);\n \n let excerpt = text.substring(start, end);\n if (start > 0) excerpt = omission + excerpt;\n if (end < text.length) excerpt = excerpt + omission;\n \n return excerpt;\n }\n\n /**\n * Cap a string with a single instance of a given value\n */\n static finish(value: string, cap: string): string {\n return value.endsWith(cap) ? value : value + cap;\n }\n\n /**\n * Convert a string to headline case\n */\n static headline(value: string): string {\n return value\n .replace(/([a-z])([A-Z])/g, '$1 $2')\n .replace(/[-_]/g, ' ')\n .split(' ')\n .map(word => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())\n .join(' ');\n }\n\n /**\n * Determine if a given string matches a given pattern\n */\n static is(pattern: string, value: string, ignoreCase = false): boolean {\n const regexPattern = pattern.replace(/\\*/g, '.*');\n const flags = ignoreCase ? 'i' : '';\n const regex = new RegExp(`^${regexPattern}$`, flags);\n return regex.test(value);\n }\n\n /**\n * Determine if a given string is 7-bit ASCII\n */\n static isAscii(value: string): boolean {\n return /^[\\x00-\\x7F]*$/.test(value);\n }\n\n /**\n * Determine if a given string is valid JSON\n */\n static isJson(value: string): boolean {\n try {\n JSON.parse(value);\n return true;\n } catch {\n return false;\n }\n }\n\n /**\n * Determine if a given string is a valid URL\n */\n static isUrl(value: string, protocols?: string[]): boolean {\n try {\n if (typeof URL === 'undefined') {\n // Fallback for environments without URL constructor\n const urlPattern = /^https?:\\/\\/.+/i;\n return urlPattern.test(value);\n }\n const urlObj = new URL(value);\n if (protocols) {\n return protocols.includes(urlObj.protocol.replace(':', ''));\n }\n return true;\n } catch {\n return false;\n }\n }\n\n /**\n * Determine if a given string is a valid ULID\n */\n static isUlid(value: string): boolean {\n return /^[0-9A-HJKMNP-TV-Z]{26}$/i.test(value);\n }\n\n /**\n * Determine if a given string is a valid UUID\n */\n static isUuid(value: string): boolean {\n return /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(value);\n }\n\n /**\n * Convert a string to kebab-case\n */\n static kebab(value: string): string {\n return value\n .replace(/([a-z])([A-Z])/g, '$1-$2')\n .replace(/[\\s_]+/g, '-')\n .toLowerCase();\n }\n\n /**\n * Return the given string with the first character lowercased\n */\n static lcfirst(value: string): string {\n return value.charAt(0).toLowerCase() + value.slice(1);\n }\n\n /**\n * Return the length of the given string\n */\n static len(value: string): number {\n return value.length;\n }\n\n /**\n * Limit the number of characters in a string\n */\n static limit(value: string, limit = 100, end = '...', preserveWords = false): string {\n if (value.length <= limit) return value;\n \n let truncated = value.substring(0, limit);\n \n if (preserveWords) {\n const lastSpace = truncated.lastIndexOf(' ');\n if (lastSpace > 0) {\n truncated = truncated.substring(0, lastSpace);\n }\n }\n \n return truncated + end;\n }\n\n /**\n * Convert the given string to lowercase\n */\n static lower(value: string): string {\n return value.toLowerCase();\n }\n\n /**\n * Masks a portion of a string with a repeated character\n */\n static mask(value: string, character: string, index: number, length?: number): string {\n if (index < 0) {\n index = value.length + index;\n }\n \n const maskLength = length ?? value.length - index;\n const mask = character.repeat(Math.abs(maskLength));\n \n return value.substring(0, index) + mask + value.substring(index + Math.abs(maskLength));\n }\n\n /**\n * Pad both sides of a string with another\n */\n static padBoth(value: string, length: number, pad = ' '): string {\n const totalPadding = length - value.length;\n if (totalPadding <= 0) return value;\n \n const leftPadding = Math.floor(totalPadding / 2);\n const rightPadding = totalPadding - leftPadding;\n \n return pad.repeat(leftPadding) + value + pad.repeat(rightPadding);\n }\n\n /**\n * Pad the left side of a string with another\n */\n static padLeft(value: string, length: number, pad = ' '): string {\n return value.padStart(length, pad);\n }\n\n /**\n * Pad the right side of a string with another\n */\n static padRight(value: string, length: number, pad = ' '): string {\n return value.padEnd(length, pad);\n }\n\n /**\n * Get the plural form of an English word\n */\n static plural(value: string, count = 2): string {\n if (count === 1) return value;\n \n // Simple pluralization rules\n if (value.endsWith('y') && !/[aeiou]y$/i.test(value)) {\n return value.slice(0, -1) + 'ies';\n }\n if (value.endsWith('s') || value.endsWith('x') || value.endsWith('z') || \n value.endsWith('ch') || value.endsWith('sh')) {\n return value + 'es';\n }\n return value + 's';\n }\n\n /**\n * Pluralize the last word of an English, studly caps case string\n */\n static pluralStudly(value: string, count = 2): string {\n const parts = value.match(/[A-Z][a-z]*/g) || [value];\n const lastWord = parts[parts.length - 1];\n const pluralized = Str.plural(lastWord, count);\n parts[parts.length - 1] = pluralized;\n return parts.join('');\n }\n\n /**\n * Find the position of the first occurrence of a substring\n */\n static position(haystack: string, needle: string): number | false {\n const pos = haystack.indexOf(needle);\n return pos === -1 ? false : pos;\n }\n\n /**\n * Generate a random string\n */\n static random(length = 16): string {\n const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n let result = '';\n for (let i = 0; i < length; i++) {\n result += chars.charAt(Math.floor(Math.random() * chars.length));\n }\n return result;\n }\n\n /**\n * Remove the given value from the string\n */\n static remove(search: string | string[], subject: string, caseSensitive = true): string {\n const searches = Array.isArray(search) ? search : [search];\n let result = subject;\n \n searches.forEach(s => {\n const flags = caseSensitive ? 'g' : 'gi';\n const escaped = s.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n result = result.replace(new RegExp(escaped, flags), '');\n });\n \n return result;\n }\n\n /**\n * Repeat the given string\n */\n static repeat(value: string, times: number): string {\n return value.repeat(times);\n }\n\n /**\n * Replace the given value in the given string\n */\n static replace(search: string, replace: string, subject: string, caseSensitive = true): string {\n const flags = caseSensitive ? 'g' : 'gi';\n const escaped = search.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n return subject.replace(new RegExp(escaped, flags), replace);\n }\n\n /**\n * Replace a given value in the string sequentially with an array\n */\n static replaceArray(search: string, replacements: string[], subject: string): string {\n let result = subject;\n let index = 0;\n \n while (result.includes(search) && index < replacements.length) {\n result = result.replace(search, replacements[index]);\n index++;\n }\n \n return result;\n }\n\n /**\n * Replace the first occurrence of a given value in the string\n */\n static replaceFirst(search: string, replace: string, subject: string): string {\n return subject.replace(search, replace);\n }\n\n /**\n * Replace the last occurrence of a given value in the string\n */\n static replaceLast(search: string, replace: string, subject: string): string {\n const index = subject.lastIndexOf(search);\n if (index === -1) return subject;\n return subject.substring(0, index) + replace + subject.substring(index + search.length);\n }\n\n /**\n * Replace the first occurrence only if it appears at the start\n */\n static replaceStart(search: string, replace: string, subject: string): string {\n return subject.startsWith(search) \n ? replace + subject.substring(search.length)\n : subject;\n }\n\n /**\n * Replace the last occurrence only if it appears at the end\n */\n static replaceEnd(search: string, replace: string, subject: string): string {\n return subject.endsWith(search)\n ? subject.substring(0, subject.length - search.length) + replace\n : subject;\n }\n\n /**\n * Reverse the given string\n */\n static reverse(value: string): string {\n return value.split('').reverse().join('');\n }\n\n /**\n * Get the singular form of an English word\n */\n static singular(value: string): string {\n // Simple singularization rules\n if (value.endsWith('ies')) {\n return value.slice(0, -3) + 'y';\n }\n if (value.endsWith('es')) {\n return value.slice(0, -2);\n }\n if (value.endsWith('s') && !value.endsWith('ss')) {\n return value.slice(0, -1);\n }\n return value;\n }\n\n /**\n * Generate a URL friendly slug\n */\n static slug(value: string, separator = '-'): string {\n return value\n .toLowerCase()\n .replace(/[^\\w\\s-]/g, '')\n .replace(/[\\s_]+/g, separator)\n .replace(new RegExp(`${separator}+`, 'g'), separator)\n .replace(new RegExp(`^${separator}|${separator}$`, 'g'), '');\n }\n\n /**\n * Convert a string to snake_case\n */\n static snake(value: string, delimiter = '_'): string {\n return value\n .replace(/([a-z])([A-Z])/g, `$1${delimiter}$2`)\n .replace(/[\\s-]+/g, delimiter)\n .toLowerCase();\n }\n\n /**\n * Remove all extraneous whitespace\n */\n static squish(value: string): string {\n return value.trim().replace(/\\s+/g, ' ');\n }\n\n /**\n * Begin a string with a single instance of a given value\n */\n static start(value: string, prefix: string): string {\n return value.startsWith(prefix) ? value : prefix + value;\n }\n\n /**\n * Determine if a given string starts with a given substring\n */\n static startsWith(haystack: string, needles: string | string[]): boolean {\n const needleArray = Array.isArray(needles) ? needles : [needles];\n return needleArray.some(needle => haystack.startsWith(needle));\n }\n\n /**\n * Convert a value to studly caps case\n */\n static studly(value: string): string {\n return value\n .replace(/[-_\\s]+(.)?/g, (_, char) => char ? char.toUpperCase() : '')\n .replace(/^(.)/, (char) => char.toUpperCase());\n }\n\n /**\n * Returns the portion of string specified by the start and length parameters\n */\n static substr(value: string, start: number, length?: number): string {\n return value.substr(start, length);\n }\n\n /**\n * Returns the number of substring occurrences\n */\n static substrCount(haystack: string, needle: string): number {\n return (haystack.match(new RegExp(needle, 'g')) || []).length;\n }\n\n /**\n * Replace text within a portion of a string\n */\n static substrReplace(value: string, replace: string, start: number, length?: number): string {\n const actualLength = length ?? value.length - start;\n return value.substring(0, start) + replace + value.substring(start + actualLength);\n }\n\n /**\n * Swap multiple keywords in a string with other keywords\n */\n static swap(map: Record<string, string>, subject: string): string {\n let result = subject;\n Object.entries(map).forEach(([search, replace]) => {\n result = Str.replace(search, replace, result);\n });\n return result;\n }\n\n /**\n * Take the first or last {limit} characters\n */\n static take(value: string, limit: number): string {\n if (limit < 0) {\n return value.slice(limit);\n }\n return value.slice(0, limit);\n }\n\n /**\n * Convert the given string to title case\n */\n static title(value: string): string {\n return value\n .toLowerCase()\n .split(' ')\n .map(word => word.charAt(0).toUpperCase() + word.slice(1))\n .join(' ');\n }\n\n /**\n * Convert the given string to Base64\n */\n static toBase64(value: string): string {\n if (typeof Buffer !== 'undefined') {\n return Buffer.from(value).toString('base64');\n }\n // Fallback for browser environments\n if (typeof btoa !== 'undefined') {\n return btoa(value);\n }\n throw new Error('Base64 encoding not supported in this environment');\n }\n\n /**\n * Transliterate a string to its closest ASCII representation\n */\n static transliterate(value: string): string {\n return Str.ascii(value);\n }\n\n /**\n * Trim whitespace from both ends of the string\n */\n static trim(value: string, characters?: string): string {\n if (!characters) return value.trim();\n const escaped = characters.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n return value.replace(new RegExp(`^[${escaped}]+|[${escaped}]+$`, 'g'), '');\n }\n\n /**\n * Trim whitespace from the beginning of the string\n */\n static ltrim(value: string, characters?: string): string {\n if (!characters) return value.trimStart();\n const escaped = characters.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n return value.replace(new RegExp(`^[${escaped}]+`, 'g'), '');\n }\n\n /**\n * Trim whitespace from the end of the string\n */\n static rtrim(value: string, characters?: string): string {\n if (!characters) return value.trimEnd();\n const escaped = characters.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n return value.replace(new RegExp(`[${escaped}]+$`, 'g'), '');\n }\n\n /**\n * Make a string's first character uppercase\n */\n static ucfirst(value: string): string {\n return value.charAt(0).toUpperCase() + value.slice(1);\n }\n\n /**\n * Split a string by uppercase characters\n */\n static ucsplit(value: string): string[] {\n return value.match(/[A-Z][a-z]*/g) || [value];\n }\n\n /**\n * Convert the given string to uppercase\n */\n static upper(value: string): string {\n return value.toUpperCase();\n }\n\n /**\n * Remove the specified strings from the beginning and end\n */\n static unwrap(value: string, before: string, after?: string): string {\n const actualAfter = after ?? before;\n let result = value;\n if (result.startsWith(before)) {\n result = result.substring(before.length);\n }\n if (result.endsWith(actualAfter)) {\n result = result.substring(0, result.length - actualAfter.length);\n }\n return result;\n }\n\n /**\n * Get the number of words a string contains\n */\n static wordCount(value: string): number {\n return value.trim().split(/\\s+/).filter(word => word.length > 0).length;\n }\n\n /**\n * Wrap a string to a given number of characters\n */\n static wordWrap(value: string, characters = 75, breakStr = '\\n'): string {\n const words = value.split(' ');\n let line = '';\n const lines: string[] = [];\n \n words.forEach(word => {\n if ((line + word).length > characters) {\n if (line) lines.push(line.trim());\n line = word + ' ';\n } else {\n line += word + ' ';\n }\n });\n \n if (line) lines.push(line.trim());\n return lines.join(breakStr);\n }\n\n /**\n * Limit the number of words in a string\n */\n static words(value: string, words = 100, end = '...'): string {\n const wordArray = value.split(/\\s+/);\n if (wordArray.length <= words) return value;\n return wordArray.slice(0, words).join(' ') + end;\n }\n\n /**\n * Wrap the string with the given strings\n */\n static wrap(value: string, before: string, after?: string): string {\n const actualAfter = after ?? before;\n return before + value + actualAfter;\n }\n}\n","/**\n * Laravel-style Collection class for arrays\n * Wraps collect.js for Laravel-compatible collection operations\n */\nimport collectJs, { Collection as CollectJsCollection } from 'collect.js';\n\nexport class Collection<T = any> {\n private collection: CollectJsCollection<T>;\n\n constructor(items: T[] = []) {\n this.collection = collectJs(items);\n }\n\n /**\n * Create a new collection instance\n */\n static make<T>(items: T[] = []): Collection<T> {\n return new Collection(items);\n }\n\n /**\n * Get all items in the collection\n */\n all(): T[] {\n return this.collection.all();\n }\n\n /**\n * Get the average value of a given key\n */\n avg(key?: keyof T | ((item: T) => number)): number {\n return this.collection.avg(key as any);\n }\n\n /**\n * Chunk the collection into chunks of the given size\n */\n chunk(size: number): Collection<T[]> {\n return new Collection(this.collection.chunk(size).all());\n }\n\n /**\n * Collapse a collection of arrays into a single, flat collection\n */\n collapse(): Collection<any> {\n return new Collection(this.collection.collapse().all());\n }\n\n /**\n * Determine if an item exists in the collection\n */\n contains(key: keyof T | ((item: T) => boolean), value?: any): boolean {\n return this.collection.contains(key as any, value);\n }\n\n /**\n * Get the total number of items in the collection\n */\n count(): number {\n return this.collection.count();\n }\n\n /**\n * Get the items in the collection that are not present in the given items\n */\n diff(items: T[]): Collection<T> {\n return new Collection(this.collection.diff(items).all());\n }\n\n /**\n * Execute a callback over each item\n */\n each(callback: (item: T, key: number) => void | false): this {\n this.collection.each(callback as any);\n return this;\n }\n\n /**\n * Determine if all items pass the given test\n */\n every(callback: (item: T, key: number) => boolean): boolean {\n return this.collection.every(callback as any);\n }\n\n /**\n * Get all items except for those with the specified keys\n */\n except(keys: (keyof T)[]): Collection<T> {\n return new Collection(this.collection.except(keys as any).all());\n }\n\n /**\n * Run a filter over each of the items\n */\n filter(callback?: (item: T, key: number) => boolean): Collection<T> {\n return new Collection(this.collection.filter(callback as any).all());\n }\n\n /**\n * Get the first item from the collection\n */\n first(callback?: (item: T, key: number) => boolean): T | undefined {\n return this.collection.first(callback as any);\n }\n\n /**\n * Get a flattened array of the items in the collection\n */\n flatten(depth?: number): Collection<any> {\n return new Collection(this.collection.flatten(depth).all());\n }\n\n /**\n * Flip the items in the collection\n */\n flip(): Collection<any> {\n return new Collection(this.collection.flip().all());\n }\n\n /**\n * Remove an item from the collection by key\n */\n forget(key: number): this {\n this.collection.forget(key);\n return this;\n }\n\n /**\n * Get an item from the collection by key\n */\n get(key: number, defaultValue?: T): T | undefined {\n const result = this.collection.get(key, defaultValue as any);\n return result === null ? undefined : result;\n }\n\n /**\n * Group the collection's items by a given key\n */\n groupBy(key: keyof T | ((item: T) => any)): Collection<Collection<T>> {\n const grouped = this.collection.groupBy(key as any);\n const result: any = {};\n grouped.each((items: any, groupKey: any) => {\n result[groupKey] = new Collection(items.all());\n });\n return new Collection(Object.values(result));\n }\n\n /**\n * Determine if a given key exists in the collection\n */\n has(key: number): boolean {\n return this.collection.has(key);\n }\n\n /**\n * Concatenate values of a given key as a string\n */\n implode(key: keyof T | string, glue?: string): string {\n return this.collection.implode(key as any, glue);\n }\n\n /**\n * Intersect the collection with the given items\n */\n intersect(items: T[]): Collection<T> {\n return new Collection(this.collection.intersect(items).all());\n }\n\n /**\n * Determine if the collection is empty\n */\n isEmpty(): boolean {\n return this.collection.isEmpty();\n }\n\n /**\n * Determine if the collection is not empty\n */\n isNotEmpty(): boolean {\n return this.collection.isNotEmpty();\n }\n\n /**\n * Join all items from the collection using a string\n */\n join(glue: string, finalGlue?: string): string {\n return this.collection.join(glue, finalGlue);\n }\n\n /**\n * Key the collection by the given key\n */\n keyBy(key: keyof T | ((item: T) => any)): Collection<T> {\n return new Collection(this.collection.keyBy(key as any).all() as T[]);\n }\n\n /**\n * Get the keys of the collection items\n */\n keys(): Collection<string | number> {\n return new Collection(this.collection.keys().all() as (string | number)[]);\n }\n\n /**\n * Get the last item from the collection\n */\n last(callback?: (item: T, key: number) => boolean): T | undefined {\n return this.collection.last(callback as any);\n }\n\n /**\n * Run a map over each of the items\n */\n map<U>(callback: (item: T, key: number) => U): Collection<U> {\n return new Collection(this.collection.map(callback as any).all() as U[]);\n }\n\n /**\n * Get the max value of a given key\n */\n max(key?: keyof T): number {\n return this.collection.max(key as any);\n }\n\n /**\n * Merge the collection with the given items\n */\n merge(items: T[]): Collection<T> {\n return new Collection(this.collection.merge(items).all());\n }\n\n /**\n * Get the min value of a given key\n */\n min(key?: keyof T): number {\n return this.collection.min(key as any);\n }\n\n /**\n * Get the items with the specified keys\n */\n only(keys: (keyof T)[]): Collection<T> {\n return new Collection(this.collection.only(keys as any).all());\n }\n\n /**\n * Get and remove the last item from the collection\n */\n pop(): T | undefined {\n return this.collection.pop();\n }\n\n /**\n * Push an item onto the beginning of the collection\n */\n prepend(value: T): this {\n this.collection.prepend(value);\n return this;\n }\n\n /**\n * Get and remove an item from the collection\n */\n pull(key: number): T | undefined {\n const result = this.collection.pull(key);\n return result === null ? undefined : result;\n }\n\n /**\n * Push an item onto the end of the collection\n */\n push(value: T): this {\n this.collection.push(value);\n return this;\n }\n\n /**\n * Put an item in the collection by key\n */\n put(key: number, value: T): this {\n this.collection.put(key, value);\n return this;\n }\n\n /**\n * Get one or a specified number of items randomly from the collection\n */\n random(count?: number): T | Collection<T> {\n if (count) {\n const result = this.collection.random(count) as CollectJsCollection<T>;\n return new Collection(result.all());\n }\n return this.collection.random() as T;\n }\n\n /**\n * Reduce the collection to a single value\n */\n reduce<U>(callback: (carry: U, item: T) => U, initial: U): U {\n return this.collection.reduce(callback as any, initial);\n }\n\n /**\n * Filter items by the given key value pair\n */\n reject(callback: (item: T, key: number) => boolean): Collection<T> {\n return new Collection(this.collection.reject(callback as any).all());\n }\n\n /**\n * Reverse items order\n */\n reverse(): Collection<T> {\n return new Collection(this.collection.reverse().all());\n }\n\n /**\n * Search the collection for a given value\n */\n search(value: T | ((item: T) => boolean)): number | false {\n const result = this.collection.search(value as any);\n return result === false ? false : result;\n }\n\n /**\n * Get and remove the first item from the collection\n */\n shift(): T | undefined {\n return this.collection.shift();\n }\n\n /**\n * Shuffle the items in the collection\n */\n shuffle(): Collection<T> {\n return new Collection(this.collection.shuffle().all());\n }\n\n /**\n * Slice the underlying collection array\n */\n slice(start: number, length?: number): Collection<T> {\n return new Collection(this.collection.slice(start, length).all());\n }\n\n /**\n * Sort through each item with a callback\n */\n sort(callback?: (a: T, b: T) => number): Collection<T> {\n return new Collection(this.collection.sort(callback as any).all());\n }\n\n /**\n * Sort the collection by the given key\n */\n sortBy(key: keyof T | ((item: T) => any)): Collection<T> {\n return new Collection(this.collection.sortBy(key as any).all());\n }\n\n /**\n * Sort the collection in descending order by the given key\n */\n sortByDesc(key: keyof T | ((item: T) => any)): Collection<T> {\n return new Collection(this.collection.sortByDesc(key as any).all());\n }\n\n /**\n * Splice a portion of the underlying collection array\n */\n splice(start: number, length?: number, ...items: T[]): Collection<T> {\n const actualLength = length ?? 0;\n const itemsArray = items as any;\n return new Collection(this.collection.splice(start, actualLength, ...itemsArray).all());\n }\n\n /**\n * Get the sum of the given values\n */\n sum(key?: keyof T | ((item: T) => number)): number {\n const result = this.collection.sum(key as any);\n return typeof result === 'number' ? result : 0;\n }\n\n /**\n * Take the first or last {limit} items\n */\n take(limit: number): Collection<T> {\n return new Collection(this.collection.take(limit).all());\n }\n\n /**\n * Pass the collection to the given callback and return the result\n */\n pipe<U>(callback: (collection: Collection<T>) => U): U {\n return callback(this);\n }\n\n /**\n * Pass the collection to the given callback and then return it\n */\n tap(callback: (collection: Collection<T>) => void): this {\n callback(this);\n return this;\n }\n\n /**\n * Transform each item in the collection using a callback\n */\n transform(callback: (item: T, key: number) => T): this {\n this.collection = this.collection.map(callback as any);\n return this;\n }\n\n /**\n * Return only unique items from the collection array\n */\n unique(key?: keyof T): Collection<T> {\n return new Collection(this.collection.unique(key as any).all());\n }\n\n /**\n * Reset the keys on the underlying array\n */\n values(): Collection<T> {\n return new Collection(this.collection.values().all() as T[]);\n }\n\n /**\n * Filter items by the given key value pair\n */\n where(key: keyof T, value: any): Collection<T>;\n where(key: keyof T, operator: string, value: any): Collection<T>;\n where(key: keyof T, operatorOrValue: any, value?: any): Collection<T> {\n if (value === undefined) {\n return new Collection(this.collection.where(key as any, operatorOrValue).all());\n }\n return new Collection(this.collection.where(key as any, operatorOrValue, value).all());\n }\n\n /**\n * Filter items by the given key value pair using loose comparison\n */\n whereIn(key: keyof T, values: any[]): Collection<T> {\n return new Collection(this.collection.whereIn(key as any, values).all());\n }\n\n /**\n * Filter items by the given key value pair using loose comparison\n */\n whereNotIn(key: keyof T, values: any[]): Collection<T> {\n return new Collection(this.collection.whereNotIn(key as any, values).all());\n }\n\n /**\n * Zip the collection together with one or more arrays\n */\n zip<U>(...arrays: U[][]): Collection<any[]> {\n const zipArgs = arrays as any;\n return new Collection((this.collection as any).zip(...zipArgs).all() as any[]);\n }\n\n /**\n * Convert the collection to a plain array\n */\n toArray(): T[] {\n return this.all();\n }\n\n /**\n * Convert the collection to JSON\n */\n toJson(): string {\n return JSON.stringify(this.all());\n }\n\n /**\n * Get the collection as a string\n */\n toString(): string {\n return this.toJson();\n }\n}\n\n/**\n * Helper function to create a new collection\n */\nexport function collect<T>(items: T[] = []): Collection<T> {\n return new Collection(items);\n}\n","/**\n * Laravel-style Map Collection class\n * Provides collection methods for Map data structures\n */\nexport class MapCollection<K = any, V = any> {\n private internalMap: Map<K, V>;\n\n constructor(entries?: Iterable<[K, V]> | Record<string, V>) {\n if (entries && typeof entries === 'object' && !(Symbol.iterator in entries)) {\n this.internalMap = new Map(Object.entries(entries) as [K, V][]);\n } else {\n this.internalMap = new Map(entries as Iterable<[K, V]>);\n }\n }\n\n /**\n * Create a new map collection instance\n */\n static make<K, V>(entries?: Iterable<[K, V]> | Record<string, V>): MapCollection<K, V> {\n return new MapCollection(entries);\n }\n\n /**\n * Get all entries as an array of [key, value] pairs\n */\n all(): [K, V][] {\n return Array.from(this.internalMap.entries());\n }\n\n /**\n * Get the number of items in the map\n */\n count(): number {\n return this.internalMap.size;\n }\n\n /**\n * Get the number of items in the map (alias for count)\n */\n size(): number {\n return this.internalMap.size;\n }\n\n /**\n * Determine if the map is empty\n */\n isEmpty(): boolean {\n return this.internalMap.size === 0;\n }\n\n /**\n * Determine if the map is not empty\n */\n isNotEmpty(): boolean {\n return this.internalMap.size > 0;\n }\n\n /**\n * Determine if a key exists in the map\n */\n has(key: K): boolean {\n return this.internalMap.has(key);\n }\n\n /**\n * Get a value from the map by key\n */\n get(key: K, defaultValue?: V): V | undefined {\n return this.internalMap.has(key) ? this.internalMap.get(key) : defaultValue;\n }\n\n /**\n * Set a value in the map\n */\n set(key: K, value: V): this {\n this.internalMap.set(key, value);\n return this;\n }\n\n /**\n * Put a value in the map (alias for set)\n */\n put(key: K, value: V): this {\n return this.set(key, value);\n }\n\n /**\n * Remove a key from the map\n */\n delete(key: K): boolean {\n return this.internalMap.delete(key);\n }\n\n /**\n * Remove a key from the map (alias for delete)\n */\n forget(key: K): boolean {\n return this.delete(key);\n }\n\n /**\n * Remove all items from the map\n */\n clear(): this {\n this.internalMap.clear();\n return this;\n }\n\n /**\n * Get all keys from the map\n */\n keys(): K[] {\n return Array.from(this.internalMap.keys());\n }\n\n /**\n * Get all values from the map\n */\n values(): V[] {\n return Array.from(this.internalMap.values());\n }\n\n /**\n * Execute a callback over each item\n */\n each(callback: (value: V, key: K) => void | false): this {\n for (const [key, value] of this.internalMap) {\n if (callback(value, key) === false) {\n break;\n }\n }\n return this;\n }\n\n /**\n * Run a map over each of the items\n */\n mapValues<U>(callback: (value: V, key: K) => U): MapCollection<K, U> {\n const result = new Map<K, U>();\n this.internalMap.forEach((value, key) => {\n result.set(key, callback(value, key));\n });\n return new MapCollection(result);\n }\n\n /**\n * Run a filter over each of the items\n */\n filter(callback: (value: V, key: K) => boolean): MapCollection<K, V> {\n const result = new Map<K, V>();\n this.internalMap.forEach((value, key) => {\n if (callback(value, key)) {\n result.set(key, value);\n }\n });\n return new MapCollection(result);\n }\n\n /**\n * Determine if all items pass the given test\n */\n every(callback: (value: V, key: K) => boolean): boolean {\n for (const [key, value] of this.internalMap) {\n if (!callback(value, key)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Determine if any item passes the given test\n */\n some(callback: (value: V, key: K) => boolean): boolean {\n for (const [key, value] of this.internalMap) {\n if (callback(value, key)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Get the first value that passes the given test\n */\n first(callback?: (value: V, key: K) => boolean): V | undefined {\n if (!callback) {\n return this.internalMap.values().next().value;\n }\n \n for (const [key, value] of this.internalMap) {\n if (callback(value, key)) {\n return value;\n }\n }\n return undefined;\n }\n\n /**\n * Get the last value that passes the given test\n */\n last(callback?: (value: V, key: K) => boolean): V | undefined {\n const entries = Array.from(this.internalMap.entries()).reverse();\n \n if (!callback) {\n return entries[0]?.[1];\n }\n \n for (const [key, value] of entries) {\n if (callback(value, key)) {\n return value;\n }\n }\n return undefined;\n }\n\n /**\n * Reduce the map to a single value\n */\n reduce<U>(callback: (carry: U, value: V, key: K) => U, initial: U): U {\n let carry = initial;\n this.internalMap.forEach((value, key) => {\n carry = callback(carry, value, key);\n });\n return carry;\n }\n\n /**\n * Merge another map into this one\n */\n merge(other: MapCollection<K, V> | Map<K, V> | Record<string, V>): this {\n if (other instanceof MapCollection) {\n other.each((value, key) => {\n this.set(key, value);\n return undefined;\n });\n } else if (other instanceof Map) {\n other.forEach((value, key) => this.set(key, value));\n } else {\n Object.entries(other).forEach(([key, value]) => {\n this.set(key as K, value as V);\n });\n }\n return this;\n }\n\n /**\n * Get only the specified keys\n */\n only(keys: K[]): MapCollection<K, V> {\n const result = new Map<K, V>();\n keys.forEach(key => {\n if (this.internalMap.has(key)) {\n result.set(key, this.internalMap.get(key)!);\n }\n });\n return new MapCollection(result);\n }\n\n /**\n * Get all items except the specified keys\n */\n except(keys: K[]): MapCollection<K, V> {\n const result = new Map<K, V>();\n this.internalMap.forEach((value, key) => {\n if (!keys.includes(key)) {\n result.set(key, value);\n }\n });\n return new MapCollection(result);\n }\n\n /**\n * Flip the keys and values\n */\n flip(): MapCollection<V, K> {\n const result = new Map<V, K>();\n this.internalMap.forEach((value, key) => {\n result.set(value, key);\n });\n return new MapCollection(result);\n }\n\n /**\n * Pass the map to the given callback and return the result\n */\n pipe<U>(callback: (map: MapCollection<K, V>) => U): U {\n return callback(this);\n }\n\n /**\n * Pass the map to the given callback and then return it\n */\n tap(callback: (map: MapCollection<K, V>) => void): this {\n callback(this);\n return this;\n }\n\n /**\n * Convert the map to a plain object\n */\n toObject(): Record<string, V> {\n const obj: Record<string, V> = {};\n this.internalMap.forEach((value, key) => {\n obj[String(key)] = value;\n });\n return obj;\n }\n\n /**\n * Convert the map to an array of [key, value] pairs\n */\n toArray(): [K, V][] {\n return this.all();\n }\n\n /**\n * Convert the map to JSON\n */\n toJson(): string {\n return JSON.stringify(this.toObject());\n }\n\n /**\n * Get the map as a string\n */\n toString(): string {\n return this.toJson();\n }\n\n /**\n * Get the underlying Map instance\n */\n toMap(): Map<K, V> {\n return new Map(this.internalMap);\n }\n}\n\n/**\n * Helper function to create a new map collection\n */\nexport function collectMap<K, V>(entries?: Iterable<[K, V]> | Record<string, V>): MapCollection<K, V> {\n return new MapCollection(entries);\n}\n","/**\n * Laravel-style Set Collection class\n * Provides collection methods for Set data structures\n */\nexport class SetCollection<T = any> {\n private set: Set<T>;\n\n constructor(items?: Iterable<T>) {\n this.set = new Set(items);\n }\n\n /**\n * Create a new set collection instance\n */\n static make<T>(items?: Iterable<T>): SetCollection<T> {\n return new SetCollection(items);\n }\n\n /**\n * Get all items as an array\n */\n all(): T[] {\n return Array.from(this.set);\n }\n\n /**\n * Get the number of items in the set\n */\n count(): number {\n return this.set.size;\n }\n\n /**\n * Get the number of items in the set (alias for count)\n */\n size(): number {\n return this.set.size;\n }\n\n /**\n * Determine if the set is empty\n */\n isEmpty(): boolean {\n return this.set.size === 0;\n }\n\n /**\n * Determine if the set is not empty\n */\n isNotEmpty(): boolean {\n return this.set.size > 0;\n }\n\n /**\n * Determine if an item exists in the set\n */\n has(item: T): boolean {\n return this.set.has(item);\n }\n\n /**\n * Determine if an item exists in the set (alias for has)\n */\n contains(item: T): boolean {\n return this.has(item);\n }\n\n /**\n * Add an item to the set\n */\n add(item: T): this {\n this.set.add(item);\n return this;\n }\n\n /**\n * Add an item to the set (alias for add)\n */\n push(item: T): this {\n return this.add(item);\n }\n\n /**\n * Remove an item from the set\n */\n delete(item: T): boolean {\n return this.set.delete(item);\n }\n\n /**\n * Remove an item from the set (alias for delete)\n */\n forget(item: T): boolean {\n return this.delete(item);\n }\n\n /**\n * Remove all items from the set\n */\n clear(): this {\n this.set.clear();\n return this;\n }\n\n /**\n * Execute a callback over each item\n */\n each(callback: (item: T, index: number) => void | false): this {\n let index = 0;\n for (const item of this.set) {\n if (callback(item, index++) === false) {\n break;\n }\n }\n return this;\n }\n\n /**\n * Run a map over each of the items\n */\n map<U>(callback: (item: T, index: number) => U): SetCollection<U> {\n const result = new Set<U>();\n let index = 0;\n this.set.forEach(item => {\n result.add(callback(item, index++));\n });\n return new SetCollection(result);\n }\n\n /**\n * Run a filter over each of the items\n */\n filter(callback: (item: T, index: number) => boolean): SetCollection<T> {\n const result = new Set<T>();\n let index = 0;\n this.set.forEach(item => {\n if (callback(item, index++)) {\n result.add(item);\n }\n });\n return new SetCollection(result);\n }\n\n /**\n * Determine if all items pass the given test\n */\n every(callback: (item: T, index: number) => boolean): boolean {\n let index = 0;\n for (const item of this.set) {\n if (!callback(item, index++)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Determine if any item passes the given test\n */\n some(callback: (item: T, index: number) => boolean): boolean {\n let index = 0;\n for (const item of this.set) {\n if (callback(item, index++)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Get the first item that passes the given test\n */\n first(callback?: (item: T, index: number) => boolean): T | undefined {\n if (!callback) {\n return this.set.values().next().value;\n }\n \n let index = 0;\n for (const item of this.set) {\n if (callback(item, index++)) {\n return item;\n }\n }\n return undefined;\n }\n\n /**\n * Get the last item that passes the given test\n */\n last(callback?: (item: T, index: number) => boolean): T | undefined {\n const items = Array.from(this.set).reverse();\n \n if (!callback) {\n return items[0];\n }\n \n for (let i = 0; i < items.length; i++) {\n if (callback(items[i], i)) {\n return items[i];\n }\n }\n return undefined;\n }\n\n /**\n * Reduce the set to a single value\n */\n reduce<U>(callback: (carry: U, item: T, index: number) => U, initial: U): U {\n let carry = initial;\n let index = 0;\n this.set.forEach(item => {\n carry = callback(carry, item, index++);\n });\n return carry;\n }\n\n /**\n * Merge another set into this one\n */\n merge(other: SetCollection<T> | Set<T> | T[]): this {\n if (other instanceof SetCollection) {\n other.each(item => {\n this.add(item);\n return undefined;\n });\n } else if (other instanceof Set) {\n other.forEach(item => this.add(item));\n } else {\n other.forEach(item => this.add(item));\n }\n return this;\n }\n\n /**\n * Get the union of this set and another\n */\n union(other: SetCollection<T> | Set<T> | T[]): SetCollection<T> {\n const result = new SetCollection(this.set);\n return result.merge(other);\n }\n\n /**\n * Get the intersection of this set and another\n */\n intersect(other: SetCollection<T> | Set<T> | T[]): SetCollection<T> {\n const otherSet = other instanceof SetCollection \n ? other.toSet() \n : other instanceof Set \n ? other \n : new Set(other);\n \n const result = new Set<T>();\n this.set.forEach(item => {\n if (otherSet.has(item)) {\n result.add(item);\n }\n });\n return new SetCollection(result);\n }\n\n /**\n * Get the difference between this set and another\n */\n diff(other: SetCollection<T> | Set<T> | T[]): SetCollection<T> {\n const otherSet = other instanceof SetCollection \n ? other.toSet() \n : other instanceof Set \n ? other \n : new Set(other);\n \n const result = new Set<T>();\n this.set.forEach(item => {\n if (!otherSet.has(item)) {\n result.add(item);\n }\n });\n return new SetCollection(result);\n }\n\n /**\n * Get items that are in either set but not in both\n */\n symmetricDiff(other: SetCollection<T> | Set<T> | T[]): SetCollection<T> {\n const otherSet = other instanceof SetCollection \n ? other.toSet() \n : other instanceof Set \n ? other \n : new Set(other);\n \n const result = new Set<T>();\n \n this.set.forEach(item => {\n if (!otherSet.has(item)) {\n result.add(item);\n }\n });\n \n otherSet.forEach(item => {\n if (!this.set.has(item)) {\n result.add(item);\n }\n });\n \n return new SetCollection(result);\n }\n\n /**\n * Determine if this set is a subset of another\n */\n isSubsetOf(other: SetCollection<T> | Set<T> | T[]): boolean {\n const otherSet = other instanceof SetCollection \n ? other.toSet() \n : other instanceof Set \n ? other \n : new Set(other);\n \n for (const item of this.set) {\n if (!otherSet.has(item)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Determine if this set is a superset of another\n */\n isSupersetOf(other: SetCollection<T> | Set<T> | T[]): boolean {\n const otherSet = other instanceof SetCollection \n ? other.toSet() \n : other instanceof Set \n ? other \n : new Set(other);\n \n for (const item of otherSet) {\n if (!this.set.has(item)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Pass the set to the given callback and return the result\n */\n pipe<U>(callback: (set: SetCollection<T>) => U): U {\n return callback(this);\n }\n\n /**\n * Pass the set to the given callback and then return it\n */\n tap(callback: (set: SetCollection<T>) => void): this {\n callback(this);\n return this;\n }\n\n /**\n * Convert the set to an array\n */\n toArray(): T[] {\n return this.all();\n }\n\n /**\n * Convert the set to JSON\n */\n toJson(): string {\n return JSON.stringify(this.all());\n }\n\n /**\n * Get the set as a string\n */\n toString(): string {\n return this.toJson();\n }\n\n /**\n * Get the underlying Set instance\n */\n toSet(): Set<T> {\n return new Set(this.set);\n }\n}\n\n/**\n * Helper function to create a new set collection\n */\nexport function collectSet<T>(items?: Iterable<T>): SetCollection<T> {\n return new SetCollection(items);\n}\n","/**\n * @fileoverview Base registry implementation\n * \n * This file provides a generic base registry class that uses the Collection\n * interface for storage. It provides a consistent API for all registry\n * implementations across the application.\n * \n * Key Features:\n * - Generic type support for any item type\n * - Default item support (fallback when item not found)\n * - Validation hooks (before add, after add)\n * - Collection-based storage (efficient O(1) operations)\n * - Type-safe API\n * - Consistent interface across all registries\n * \n * Use Cases:\n * - Theme registry (storing and retrieving themes)\n * - Token registry (managing design tokens)\n * - Plugin registry (managing plugins)\n * - Configuration registry (storing configs)\n * - Any key-value registry needs\n * \n * @module @pixielity/support\n * @category Registries\n */\n\nimport { MapCollection } from \"../collections/map.collection\";\n\n/**\n * Collection interface for registry storage\n */\nexport interface Collection<T> {\n add(key: string, value: T): void;\n get(key: string): T | undefined;\n getAll(): T[];\n getKeys(): string[];\n getAsRecord(): Record<string, T>;\n has(key: string): boolean;\n remove(key: string): boolean;\n clear(): void;\n size(): number;\n isEmpty(): boolean;\n forEach(callback: (value: T, key: string) => void): void;\n map<U>(callback: (value: T, key: string) => U): U[];\n filter(predicate: (value: T, key: string) => boolean): T[];\n find(predicate: (value: T, key: string) => boolean): T | undefined;\n}\n\n/**\n * Registry collection adapter\n * Wraps MapCollection to implement Collection interface\n */\nclass RegistryCollection<T> implements Collection<T> {\n private _storage = new MapCollection<string, T>();\n\n add(key: string, value: T): void {\n this._storage.set(key, value);\n }\n\n get(key: string): T | undefined {\n return this._storage.get(key);\n }\n\n getAll(): T[] {\n return this._storage.values();\n }\n\n getKeys(): string[] {\n return this._storage.keys();\n }\n\n getAsRecord(): Record<string, T> {\n return this._storage.toObject();\n }\n\n has(key: string): boolean {\n return this._storage.has(key);\n }\n\n remove(key: string): boolean {\n return this._storage.delete(key);\n }\n\n clear(): void {\n this._storage.clear();\n }\n\n size(): number {\n return this._storage.size();\n }\n\n isEmpty(): boolean {\n return this._storage.isEmpty();\n }\n\n forEach(callback: (value: T, key: string) => void): void {\n this._storage.each((value, key) => {\n callback(value, key);\n });\n }\n\n map<U>(callback: (value: T, key: string) => U): U[] {\n const result: U[] = [];\n this._storage.each((value, key) => {\n result.push(callback(value, key));\n });\n return result;\n }\n\n filter(predicate: (value: T, key: string) => boolean): T[] {\n const result: T[] = [];\n this._storage.each((value, key) => {\n if (predicate(value, key)) {\n result.push(value);\n }\n });\n return result;\n }\n\n find(predicate: (value: T, key: string) => boolean): T | undefined {\n return this._storage.first(predicate);\n }\n}\n\n/**\n * Validation result for registry operations\n * \n * Used by validation hooks to indicate whether an operation\n * should proceed or be rejected.\n * \n * @example\n * ```typescript\n * const result: ValidationResult = {\n * valid: false,\n * error: 'Item name cannot be empty'\n * };\n * ```\n */\nexport interface ValidationResult {\n /**\n * Whether the validation passed\n */\n valid: boolean;\n \n /**\n * Error message if validation failed\n */\n error?: string;\n}\n\n/**\n * Base registry options\n * \n * Configuration options for creating a registry instance.\n * Allows customization of default item behavior and validation.\n * \n * @template T - The type of items stored in the registry\n */\nexport interface BaseRegistryOptions<T> {\n /**\n * Default item to return when requested item is not found\n * \n * If not provided, get() will return undefined for missing items.\n * If provided, get() will return this default item instead.\n */\n defaultItem?: T;\n \n /**\n * Validation hook called before adding an item\n * \n * Allows custom validation logic before items are added to the registry.\n * If validation fails, the item will not be added and an error will be thrown.\n * \n * @param key - Item key\n * @param item - Item to validate\n * @returns Validation result\n */\n validateBeforeAdd?: (key: string, item: T) => ValidationResult;\n \n /**\n * Hook called after an item is successfully added\n * \n * Useful for side effects like logging, notifications, or triggering\n * dependent updates after an item is registered.\n * \n * @param key - Item key\n * @param item - Item that was added\n */\n afterAdd?: (key: string, item: T) => void;\n}\n\n/**\n * Base registry class\n * \n * A generic registry implementation that provides a consistent API for\n * storing and retrieving items by key. Uses the Collection interface\n * for efficient storage with O(1) operations.\n * \n * This class extends Collection functionality by adding:\n * - Default item support\n * - Validation hooks\n * - Consistent registry API\n * \n * All Collection methods are directly accessible on the registry instance.\n * \n * Performance Characteristics:\n * - register(): O(1) + validation time\n * - get(): O(1)\n * - has(): O(1)\n * - remove(): O(1)\n * - getAll(): O(n)\n * - clear(): O(1)\n * \n * @template T - The type of items stored in the registry\n * \n * @example\n * ```typescript\n * // Create a theme registry\n * const themeRegistry = new BaseRegistry<Theme>({\n * defaultItem: defaultTheme,\n * validateBeforeAdd: (key, theme) => {\n * if (!theme.name) {\n * return { valid: false, error: 'Theme must have a name' };\n * }\n * return { valid: true };\n * }\n * });\n * \n * // Register themes\n * themeRegistry.register('blue', blueTheme);\n * themeRegistry.register('red', redTheme);\n * \n * // Get a theme\n * const theme = themeRegistry.get('blue');\n * \n * // Get all themes\n * const allThemes = themeRegistry.getAll();\n * \n * // Check if theme exists\n * if (themeRegistry.has('blue')) {\n * console.log('Blue theme exists');\n * }\n * ```\n * \n * @example\n * ```typescript\n * // Create a simple token registry\n * const tokenRegistry = new BaseRegistry<Token>();\n * \n * tokenRegistry.register('primary', { value: '#0000FF' });\n * tokenRegistry.register('secondary', { value: '#FF0000' });\n * \n * const allTokens = tokenRegistry.getAll();\n * console.log(allTokens.length); // 2\n * ```\n */\nexport class BaseRegistry<T> implements Collection<T> {\n /**\n * Internal collection for storing registry items\n * \n * Uses Collection interface for flexible storage implementation.\n * By default, uses MapCollection for O(1) operations.\n */\n protected collection: Collection<T>;\n \n /**\n * Default item to return when requested item is not found\n * \n * If set, get() will return this item instead of undefined\n * when the requested key doesn't exist in the registry.\n */\n protected defaultItem?: T;\n \n /**\n * Validation hook called before adding an item\n * \n * If provided, this function is called before every register()\n * operation to validate the item. If validation fails, the\n * item is not added and an error is thrown.\n */\n protected validateBeforeAdd?: (key: string, item: T) => ValidationResult;\n \n /**\n * Hook called after an item is successfully added\n * \n * If provided, this function is called after every successful\n * register() operation. Useful for side effects like logging\n * or triggering dependent updates.\n */\n protected afterAdd?: (key: string, item: T) => void;\n\n /**\n * Creates a new BaseRegistry instance\n * \n * Initializes the registry with optional configuration for default\n * item and validation hooks. By default, uses MapCollection for storage.\n * \n * @param options - Registry configuration options\n * \n * @example\n * ```typescript\n * // Simple registry without options\n * const registry = new BaseRegistry<Theme>();\n * ```\n * \n * @example\n * ```typescript\n * // Registry with default item\n * const registry = new BaseRegistry<Theme>({\n * defaultItem: defaultTheme\n * });\n * ```\n * \n * @example\n * ```typescript\n * // Registry with validation\n * const registry = new BaseRegistry<Theme>({\n * validateBeforeAdd: (key, theme) => {\n * if (!theme.name) {\n * return { valid: false, error: 'Theme must have a name' };\n * }\n * return { valid: true };\n * },\n * afterAdd: (key, theme) => {\n * console.log(`Registered theme: ${theme.name}`);\n * }\n * });\n * ```\n */\n constructor(options: BaseRegistryOptions<T> = {}) {\n // Initialize collection with RegistryCollection (O(1) operations)\n this.collection = new RegistryCollection<T>();\n \n // Store default item if provided\n this.defaultItem = options.defaultItem;\n \n // Store validation hooks if provided\n this.validateBeforeAdd = options.validateBeforeAdd;\n this.afterAdd = options.afterAdd;\n }\n\n /**\n * Register an item in the registry\n * \n * Adds or updates an item in the registry with the specified key.\n * If an item with the same key already exists, it will be replaced.\n * \n * If a validation hook is configured, it will be called before adding\n * the item. If validation fails, an error is thrown and the item is\n * not added.\n * \n * If an afterAdd hook is configured, it will be called after the item\n * is successfully added.\n * \n * Time Complexity: O(1) + validation time\n * \n * @param key - Unique identifier for the item\n * @param item - Item to register\n * @throws Error if validation fails\n * \n * @example\n * ```typescript\n * const registry = new BaseRegistry<Theme>();\n * \n * // Register a theme\n * registry.register('blue', {\n * name: 'Blue',\n * colors: { accent: '#0000FF' }\n * });\n * \n * // Update existing theme\n * registry.register('blue', {\n * name: 'Blue',\n * colors: { accent: '#0066FF' }\n * });\n * ```\n */\n register(key: string, item: T): void {\n // Run validation hook if provided\n if (this.validateBeforeAdd) {\n const result = this.validateBeforeAdd(key, item);\n \n // If validation fails, throw error with message\n if (!result.valid) {\n throw new Error(\n `Validation failed for key \"${key}\": ${result.error || 'Unknown error'}`\n );\n }\n }\n\n // Add item to collection (O(1) operation)\n this.collection.add(key, item);\n\n // Run afterAdd hook if provided\n if (this.afterAdd) {\n this.afterAdd(key, item);\n }\n }\n\n // ============================================================================\n // Collection Interface Implementation\n // All methods below delegate directly to the internal collection\n // ============================================================================\n\n /**\n * Add an item to the collection (alias for register)\n * \n * This method is part of the Collection interface.\n * It delegates to register() to ensure validation hooks are called.\n * \n * Time Complexity: O(1) + validation time\n * \n * @param key - Unique identifier for the item\n * @param value - Item to add\n */\n add(key: string, value: T): void {\n // Delegate to register() to ensure validation hooks are called\n this.register(key, value);\n }\n\n /**\n * Get an item from the registry\n * \n * Retrieves an item by its key. If the item doesn't exist:\n * - Returns the default item if one was configured\n * - Returns undefined if no default item was configured\n * \n * Time Complexity: O(1)\n * \n * @param key - Item identifier\n * @returns Item if found, default item if configured, or undefined\n * \n * @example\n * ```typescript\n * const theme = registry.get('blue');\n * ```\n */\n get(key: string): T | undefined {\n // Try to get item from collection (O(1))\n const item = this.collection.get(key);\n \n // If item exists, return it\n if (item !== undefined) {\n return item;\n }\n \n // If item doesn't exist, return default item (may be undefined)\n return this.defaultItem;\n }\n\n /**\n * Get all items in the registry\n * \n * Returns an array containing all items in the registry.\n * The order of items depends on the collection implementation\n * (MapCollection maintains insertion order).\n * \n * Time Complexity: O(n) where n is the number of items\n * \n * @returns Array of all items in the registry\n * \n * @example\n * ```typescript\n * const allThemes = registry.getAll();\n * ```\n */\n getAll(): T[] {\n return this.collection.getAll();\n }\n\n /**\n * Get all keys in the registry\n * \n * Returns an array containing all keys in the registry.\n * Useful for iteration or checking what items are registered.\n * \n * Time Complexity: O(n) where n is the number of items\n * \n * @returns Array of all keys in the registry\n * \n * @example\n * ```typescript\n * const keys = registry.getKeys();\n * ```\n */\n getKeys(): string[] {\n return this.collection.getKeys();\n }\n\n /**\n * Get registry as a record object\n * \n * Converts the registry to a plain JavaScript object (record)\n * with keys mapping to values. Useful for serialization.\n * \n * Time Complexity: O(n) where n is the number of items\n * \n * @returns Record object with keys mapping to values\n * \n * @example\n * ```typescript\n * const record = registry.getAsRecord();\n * ```\n */\n getAsRecord(): Record<string, T> {\n return this.collection.getAsRecord();\n }\n\n /**\n * Check if an item is registered\n * \n * Checks whether an item with the specified key exists in the registry.\n * Does not check the value, only the presence of the key.\n * \n * Time Complexity: O(1)\n * \n * @param key - Item identifier to check\n * @returns True if item is registered, false otherwise\n * \n * @example\n * ```typescript\n * if (registry.has('blue')) {\n * console.log('Blue theme exists');\n * }\n * ```\n */\n has(key: string): boolean {\n return this.collection.has(key);\n }\n\n /**\n * Remove an item from the registry\n * \n * Removes an item with the specified key from the registry.\n * Returns true if the item was removed, false if it didn't exist.\n * \n * Time Complexity: O(1)\n * \n * @param key - Item identifier to remove\n * @returns True if item was removed, false if it didn't exist\n * \n * @example\n * ```typescript\n * const removed = registry.remove('blue');\n * ```\n */\n remove(key: string): boolean {\n return this.collection.remove(key);\n }\n\n /**\n * Clear all items from the registry\n * \n * Removes all items from the registry, leaving it empty.\n * This operation is irreversible.\n * \n * Time Complexity: O(1)\n * \n * @example\n * ```typescript\n * registry.clear();\n * ```\n */\n clear(): void {\n this.collection.clear();\n }\n\n /**\n * Get the number of items in the registry\n * \n * Returns the total count of items currently registered.\n * \n * Time Complexity: O(1)\n * \n * @returns Number of items in the registry\n * \n * @example\n * ```typescript\n * console.log(registry.size()); // 2\n * ```\n */\n size(): number {\n return this.collection.size();\n }\n\n /**\n * Check if the registry is empty\n * \n * Returns true if the registry contains no items, false otherwise.\n * This is a convenience method equivalent to checking if size() === 0.\n * \n * Time Complexity: O(1)\n * \n * @returns True if registry has no items, false otherwise\n * \n * @example\n * ```typescript\n * console.log(registry.isEmpty()); // true\n * ```\n */\n isEmpty(): boolean {\n return this.collection.isEmpty();\n }\n\n /**\n * Iterate over all items in the registry\n * \n * Executes a callback function for each item in the registry.\n * Items are iterated in insertion order (for MapCollection).\n * \n * Time Complexity: O(n) where n is the number of items\n * \n * @param callback - Function to call for each item (value, key)\n * \n * @example\n * ```typescript\n * registry.forEach((theme, key) => {\n * console.log(`${key}: ${theme.name}`);\n * });\n * ```\n */\n forEach(callback: (value: T, key: string) => void): void {\n this.collection.forEach(callback);\n }\n\n /**\n * Map over all items in the registry\n * \n * Transforms each item in the registry using a callback function\n * and returns an array of the transformed values.\n * \n * Time Complexity: O(n) where n is the number of items\n * \n * @template U - The type of the transformed items\n * @param callback - Function to transform each item (value, key) => U\n * @returns Array of transformed items\n * \n * @example\n * ```typescript\n * const names = registry.map(theme => theme.name);\n * ```\n */\n map<U>(callback: (value: T, key: string) => U): U[] {\n return this.collection.map(callback);\n }\n\n /**\n * Filter items in the registry\n * \n * Returns an array of items that pass the test implemented by the\n * provided predicate function.\n * \n * Time Complexity: O(n) where n is the number of items\n * \n * @param predicate - Function to test each item (value, key) => boolean\n * @returns Array of items that pass the test\n * \n * @example\n * ```typescript\n * const darkThemes = registry.filter(theme => theme.isDark);\n * ```\n */\n filter(predicate: (value: T, key: string) => boolean): T[] {\n return this.collection.filter(predicate);\n }\n\n /**\n * Find an item in the registry\n * \n * Returns the first item that satisfies the provided predicate function.\n * Returns undefined if no item passes the test.\n * \n * Time Complexity: O(n) worst case, O(1) best case\n * \n * @param predicate - Function to test each item (value, key) => boolean\n * @returns First item that passes the test, or undefined\n * \n * @example\n * ```typescript\n * const defaultTheme = registry.find(theme => theme.isDefault);\n * ```\n */\n find(predicate: (value: T, key: string) => boolean): T | undefined {\n return this.collection.find(predicate);\n }\n}\n","/**\n * @fileoverview Base Facade implementation\n *\n * This file provides the base Facade class that enables static access to\n * services resolved from the DI container. Inspired by Laravel's Facade pattern.\n *\n * Uses @abdokouta/react-di's getModuleContainer to resolve services,\n * enabling facades to work outside of React components.\n *\n * Key Features:\n * - Static interface to container-resolved services\n * - Instance caching for performance\n * - Hot-swapping for testing\n * - Fake detection for test assertions\n * - Works outside React components\n *\n * @module @abdokouta/react-support\n * @category Facades\n */\n\nimport { getModuleContainer } from \"@abdokouta/react-di\";\nimport type { Newable, ModuleContainer, ServiceIdentifier } from \"@abdokouta/react-di\";\n\nimport { isFake } from \"./facade.interface\";\nimport type { FacadeApplication } from \"./facade.interface\";\n\n// Re-export types for convenience\nexport type { ServiceIdentifier, Newable, ModuleContainer };\n\n/**\n * Base Facade class\n *\n * Provides a static interface to services resolved from the DI container.\n * Subclasses must implement `getFacadeAccessor()` to specify which service\n * the facade represents.\n *\n * @example\n * ```typescript\n * import { Facade } from '@abdokouta/react-support';\n * import { LoggerService } from './logger.service';\n * import { AppModule } from './app.module';\n *\n * class Log extends Facade {\n * protected static getFacadeAccessor(): ServiceIdentifier {\n * return LoggerService;\n * }\n * }\n *\n * // Set the module once at app bootstrap\n * Facade.setFacadeModule(AppModule);\n *\n * // Use the facade statically anywhere\n * Log.info('Hello, world!');\n * Log.error('Something went wrong');\n * ```\n *\n * @example\n * ```typescript\n * // Swap with a fake for testing\n * const fakeLogs: string[] = [];\n * const fakeLogger = {\n * __isFake: true as const,\n * info: (msg: string) => fakeLogs.push(msg),\n * error: (msg: string) => fakeLogs.push(msg),\n * };\n *\n * Log.swap(fakeLogger);\n * Log.info('Test message');\n * expect(fakeLogs).toContain('Test message');\n * ```\n */\nexport abstract class Facade {\n /**\n * The root module class for resolving services\n */\n protected static moduleClass: Newable | null = null;\n\n /**\n * The module container instance (cached)\n */\n protected static container: ModuleContainer | null = null;\n\n /**\n * The resolved object instances\n *\n * Caches resolved instances by their accessor key for performance.\n */\n protected static resolvedInstance: Map<string | symbol, unknown> = new Map();\n\n /**\n * Indicates if the resolved instance should be cached\n *\n * Set to false in subclasses to always resolve fresh instances.\n */\n protected static cached = true;\n\n /**\n * Hotswap the underlying instance behind the facade\n *\n * Useful for testing - swap the real service with a mock or fake.\n *\n * @param instance - Instance to swap in\n *\n * @example\n * ```typescript\n * // In tests\n * const mockLogger = { info: vi.fn(), error: vi.fn() };\n * Log.swap(mockLogger);\n *\n * // Now Log.info() calls mockLogger.info()\n * Log.info('test');\n * expect(mockLogger.info).toHaveBeenCalledWith('test');\n * ```\n */\n public static swap(instance: unknown): void {\n const accessor = this.getFacadeAccessor();\n const key = this.getAccessorKey(accessor);\n this.resolvedInstance.set(key, instance);\n }\n\n /**\n * Determines whether a \"fake\" has been set as the facade instance\n *\n * @returns True if the current instance is a Fake\n *\n * @example\n * ```typescript\n * if (Log.isFake()) {\n * console.log('Using fake logger');\n * }\n * ```\n */\n public static isFake(): boolean {\n const accessor = this.getFacadeAccessor();\n const key = this.getAccessorKey(accessor);\n const instance = this.resolvedInstance.get(key);\n return instance !== undefined && isFake(instance);\n }\n\n /**\n * Get the root object behind the facade\n *\n * Resolves and returns the actual service instance.\n *\n * @returns The resolved service instance\n */\n public static getFacadeRoot<T = unknown>(): T {\n return this.resolveFacadeInstance(this.getFacadeAccessor()) as T;\n }\n\n /**\n * Get the registered name of the component\n *\n * Subclasses MUST override this method to specify which service\n * the facade represents.\n *\n * @returns Service identifier (string, symbol, or class)\n * @throws Error if not implemented\n *\n * @example\n * ```typescript\n * class Log extends Facade {\n * protected static getFacadeAccessor(): ServiceIdentifier {\n * return LoggerService; // or 'logger' string token\n * }\n * }\n * ```\n */\n protected static getFacadeAccessor(): ServiceIdentifier {\n throw new Error(\"Facade does not implement getFacadeAccessor method.\");\n }\n\n /**\n * Get a consistent key for the accessor\n */\n protected static getAccessorKey(accessor: ServiceIdentifier): string | symbol {\n if (typeof accessor === \"function\") {\n return accessor.name || accessor.toString();\n }\n return accessor;\n }\n\n /**\n * Resolve the facade root instance from the container\n *\n * @param identifier - Service identifier\n * @returns Resolved service instance\n */\n protected static resolveFacadeInstance<T>(identifier: ServiceIdentifier<T>): T {\n const key = this.getAccessorKey(identifier);\n\n // Check cache first\n if (this.resolvedInstance.has(key)) {\n return this.resolvedInstance.get(key) as T;\n }\n\n // Get container\n const container = this.getContainer();\n\n if (!container) {\n throw new Error(\n `Unable to resolve facade instance. Module not set. ` +\n `Call Facade.setFacadeModule(YourModule) first.`\n );\n }\n\n // Resolve from container\n const instance = container.get(identifier) as T;\n\n // Cache if enabled\n if (this.cached) {\n this.resolvedInstance.set(key, instance);\n }\n\n return instance;\n }\n\n /**\n * Get the module container\n *\n * @returns The module container instance\n */\n protected static getContainer(): ModuleContainer | null {\n if (this.container) {\n return this.container;\n }\n\n if (this.moduleClass) {\n this.container = getModuleContainer(this.moduleClass);\n return this.container;\n }\n\n return null;\n }\n\n /**\n * Clear a resolved facade instance\n *\n * @param name - Service identifier to clear (defaults to this facade's accessor)\n */\n public static clearResolvedInstance(name?: string | symbol): void {\n const key = name ?? this.getAccessorKey(this.getFacadeAccessor());\n this.resolvedInstance.delete(key);\n }\n\n /**\n * Clear all resolved instances\n *\n * Useful for test cleanup.\n */\n public static clearResolvedInstances(): void {\n this.resolvedInstance.clear();\n }\n\n /**\n * Get the module class\n *\n * @returns The module class\n */\n public static getFacadeModule(): Newable | null {\n return this.moduleClass;\n }\n\n /**\n * Set the module class for facade resolution\n *\n * Must be called during application bootstrap to enable facades.\n * Call this AFTER Inversiland.run() or Container.configure().build().\n *\n * @param module - The root module class\n *\n * @example\n * ```typescript\n * // In your app bootstrap (main.tsx)\n * import { Facade } from '@abdokouta/react-support';\n * import { Container, ContainerProvider } from '@abdokouta/react-di';\n * import { AppModule } from './app.module';\n *\n * // Initialize container\n * Container.configure().withModule(AppModule).withDefaults().build();\n *\n * // Set facade module\n * Facade.setFacadeModule(AppModule);\n *\n * // Now facades work anywhere\n * ReactDOM.createRoot(document.getElementById(\"root\")!).render(\n * <ContainerProvider module={AppModule}>\n * <App />\n * </ContainerProvider>\n * );\n * ```\n */\n public static setFacadeModule(module: Newable | null): void {\n this.moduleClass = module;\n this.container = null; // Reset container cache\n }\n\n /**\n * Set the container directly (alternative to setFacadeModule)\n *\n * @param container - The module container instance\n */\n public static setFacadeContainer(container: ModuleContainer | null): void {\n this.container = container;\n }\n\n // ============================================================================\n // Legacy API (for compatibility with FacadeApplication interface)\n // ============================================================================\n\n /**\n * @deprecated Use setFacadeModule instead\n */\n public static setFacadeApplication(app: FacadeApplication | null): void {\n // For backwards compatibility, store as a simple adapter\n if (app) {\n this.container = {\n get: <T>(id: ServiceIdentifier<T>) => app.get(id),\n } as ModuleContainer;\n } else {\n this.container = null;\n }\n }\n\n /**\n * @deprecated Use getFacadeModule instead\n */\n public static getFacadeApplication(): FacadeApplication | null {\n const container = this.getContainer();\n if (!container) return null;\n\n return {\n get: <T>(abstract: string | symbol | (new (...args: unknown[]) => T)) =>\n container.get(abstract as ServiceIdentifier<T>),\n };\n }\n}\n","/**\n * @fileoverview Facade interfaces\n *\n * Defines the interfaces for the Facade pattern implementation.\n * Facades provide a static interface to services resolved from the DI container.\n *\n * @module @abdokouta/react-support\n * @category Facades\n */\n\n/**\n * Application interface for facade resolution\n *\n * This interface represents the minimal contract that an application/container\n * must implement to work with facades. It mirrors the Laravel Application contract.\n */\nexport interface FacadeApplication {\n /**\n * Resolve a service from the container\n *\n * @param abstract - Service identifier (string, symbol, or class)\n * @returns The resolved service instance\n */\n get<T>(abstract: string | symbol | (new (...args: unknown[]) => T)): T;\n\n /**\n * Check if a service has been resolved\n *\n * @param abstract - Service identifier\n * @returns True if the service has been resolved\n */\n resolved?(abstract: string | symbol): boolean;\n\n /**\n * Register a callback to run after a service is resolved\n *\n * @param abstract - Service identifier\n * @param callback - Callback to run after resolution\n */\n afterResolving?(\n abstract: string | symbol,\n callback: (service: unknown, app: FacadeApplication) => void\n ): void;\n\n /**\n * Bind an instance to the container\n *\n * @param abstract - Service identifier\n * @param instance - Instance to bind\n */\n instance?(abstract: string | symbol, instance: unknown): void;\n}\n\n/**\n * Fake interface for testing\n *\n * Facades can be swapped with fakes for testing purposes.\n * Any object implementing this interface is considered a fake.\n */\nexport interface Fake {\n /**\n * Marker to identify fake instances\n */\n readonly __isFake: true;\n}\n\n/**\n * Check if an object is a Fake\n *\n * @param obj - Object to check\n * @returns True if the object is a Fake\n */\nexport function isFake(obj: unknown): obj is Fake {\n return (\n typeof obj === \"object\" &&\n obj !== null &&\n \"__isFake\" in obj &&\n (obj as Fake).__isFake === true\n );\n}\n","/**\n * @fileoverview Facade factory with Proxy support\n *\n * Creates facades with automatic method forwarding using JavaScript Proxy.\n * This enables the Laravel-style `Facade::method()` pattern in TypeScript.\n *\n * @module @abdokouta/react-support\n * @category Facades\n */\n\nimport type { ServiceIdentifier, Newable, ModuleContainer } from \"@abdokouta/react-di\";\nimport { getModuleContainer } from \"@abdokouta/react-di\";\n\nimport { Facade } from \"./facade\";\n\n/**\n * Facade class type with static methods and proxied service methods\n */\nexport type FacadeClass<T> = typeof Facade & {\n getFacadeRoot<R = T>(): R;\n} & {\n [K in keyof T]: T[K];\n};\n\n/**\n * Options for creating a facade\n */\nexport interface CreateFacadeOptions<T> {\n /**\n * Service identifier (string token, symbol, or class)\n */\n accessor: ServiceIdentifier<T>;\n\n /**\n * Whether to cache the resolved instance\n * @default true\n */\n cached?: boolean;\n}\n\n/**\n * Create a facade for a service\n *\n * Creates a Proxy-based facade that forwards all method calls to the\n * resolved service instance. This enables the Laravel-style pattern\n * where you can call methods directly on the facade class.\n *\n * @param options - Facade configuration\n * @returns Proxied facade class\n *\n * @example\n * ```typescript\n * // Define your service interface\n * interface ILogger {\n * info(message: string): void;\n * error(message: string): void;\n * debug(message: string): void;\n * }\n *\n * // Create the facade\n * const Log = createFacade<ILogger>({\n * accessor: 'logger', // or LoggerService class\n * });\n *\n * // Set module at bootstrap\n * Facade.setFacadeModule(AppModule);\n *\n * // Use it statically\n * Log.info('Hello!');\n * Log.error('Oops!');\n * ```\n */\nexport function createFacade<T extends object>(\n options: CreateFacadeOptions<T>\n): FacadeClass<T> {\n const { accessor, cached = true } = options;\n\n // Create a concrete facade class\n class ConcreteFacade extends Facade {\n protected static cached = cached;\n\n protected static getFacadeAccessor(): ServiceIdentifier {\n return accessor;\n }\n }\n\n // Create a proxy to forward method calls\n const proxy = new Proxy(ConcreteFacade, {\n get(target, prop, receiver) {\n // First check if it's a static method on Facade\n if (prop in target) {\n const value = Reflect.get(target, prop, receiver);\n if (typeof value === \"function\") {\n return value.bind(target);\n }\n return value;\n }\n\n // Otherwise, forward to the resolved instance\n return (...args: unknown[]) => {\n const instance = target.getFacadeRoot<T>();\n\n if (!instance) {\n throw new Error(\n `A facade root has not been set. ` +\n `Call Facade.setFacadeModule() first.`\n );\n }\n\n const method = (instance as Record<string | symbol, unknown>)[prop];\n\n if (typeof method !== \"function\") {\n throw new Error(\n `Method \"${String(prop)}\" does not exist on the facade root.`\n );\n }\n\n return method.apply(instance, args);\n };\n },\n });\n\n return proxy as unknown as FacadeClass<T>;\n}\n\n/**\n * Create a typed facade class (without proxy)\n *\n * @param accessor - Service identifier\n * @returns Facade class constructor\n */\nexport function createFacadeClass<T>(\n accessor: ServiceIdentifier<T>\n): typeof Facade {\n return class extends Facade {\n protected static getFacadeAccessor(): ServiceIdentifier {\n return accessor;\n }\n };\n}\n\n/**\n * Get container from a module class\n *\n * @param moduleClass - The module class\n * @returns ModuleContainer instance\n */\nexport function getContainerFromModule(moduleClass: Newable): ModuleContainer {\n return getModuleContainer(moduleClass);\n}\n"],"mappings":";AAIO,IAAM,MAAN,MAAM,KAAI;AAAA;AAAA;AAAA;AAAA,EAIf,OAAO,MAAM,SAAiB,QAAwB;AACpD,QAAI,WAAW,GAAI,QAAO;AAC1B,UAAM,QAAQ,QAAQ,QAAQ,MAAM;AACpC,WAAO,UAAU,KAAK,UAAU,QAAQ,UAAU,QAAQ,OAAO,MAAM;AAAA,EACzE;AAAA;AAAA;AAAA;AAAA,EAKA,OAAO,UAAU,SAAiB,QAAwB;AACxD,QAAI,WAAW,GAAI,QAAO;AAC1B,UAAM,QAAQ,QAAQ,YAAY,MAAM;AACxC,WAAO,UAAU,KAAK,UAAU,QAAQ,UAAU,QAAQ,OAAO,MAAM;AAAA,EACzE;AAAA;AA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AA,YACR,WAAW,OAAO,IAAI,CAAC;AAAA,UACzB;AAAA,QACF;AAEA,eAAO,OAAO,MAAM,UAAU,IAAI;AAAA,MACpC;AAAA,IACF;AAAA,EACF,CAAC;AAED,SAAO;AACT;AAQO,SAAS,kBACd,UACe;AACf,SAAO,cAAc,OAAO;AAAA,IAC1B,OAAiB,oBAAuC;AACtD,aAAO;AAAA,IACT;AAAA,EACF;AACF;AAQO,SAAS,uBAAuB,aAAuC;AAC5E,SAAOC,oBAAmB,WAAW;AACvC;","names":["getModuleContainer","getModuleContainer"]}
1
+ {"version":3,"sources":["../src/str/str.ts","../src/collections/collection.ts","../src/collections/map.collection.ts","../src/collections/set.collection.ts","../src/registry/base-registry.ts","../src/managers/multiple-instance-manager.ts"],"sourcesContent":["/**\n * Laravel-style string manipulation class\n * Provides static methods for common string operations\n */\nexport class Str {\n /**\n * Return the remainder of a string after the first occurrence of a given value\n */\n static after(subject: string, search: string): string {\n if (search === '') return subject;\n const index = subject.indexOf(search);\n return index === -1 ? subject : subject.substring(index + search.length);\n }\n\n /**\n * Return the remainder of a string after the last occurrence of a given value\n */\n static afterLast(subject: string, search: string): string {\n if (search === '') return subject;\n const index = subject.lastIndexOf(search);\n return index === -1 ? subject : subject.substring(index + search.length);\n }\n\n /**\n * Convert a string to title case following APA guidelines\n */\n static apa(value: string): string {\n const minorWords = [\n 'a',\n 'an',\n 'and',\n 'as',\n 'at',\n 'but',\n 'by',\n 'for',\n 'in',\n 'of',\n 'on',\n 'or',\n 'the',\n 'to',\n 'up',\n ];\n const words = value.split(' ');\n\n return words\n .map((word, index) => {\n if (index === 0 || !minorWords.includes(word.toLowerCase())) {\n return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();\n }\n return word.toLowerCase();\n })\n .join(' ');\n }\n\n /**\n * Transliterate a UTF-8 value to ASCII\n */\n static ascii(value: string): string {\n return value.normalize('NFD').replace(/[\\u0300-\\u036f]/g, '');\n }\n\n /**\n * Get the portion of a string before the first occurrence of a given value\n */\n static before(subject: string, search: string): string {\n if (search === '') return subject;\n const index = subject.indexOf(search);\n return index === -1 ? subject : subject.substring(0, index);\n }\n\n /**\n * Get the portion of a string before the last occurrence of a given value\n */\n static beforeLast(subject: string, search: string): string {\n if (search === '') return subject;\n const index = subject.lastIndexOf(search);\n return index === -1 ? subject : subject.substring(0, index);\n }\n\n /**\n * Get the portion of a string between two values\n */\n static between(subject: string, from: string, to: string): string {\n if (from === '' || to === '') return subject;\n const startIndex = subject.indexOf(from);\n if (startIndex === -1) return '';\n const start = startIndex + from.length;\n const endIndex = subject.indexOf(to, start);\n return endIndex === -1 ? '' : subject.substring(start, endIndex);\n }\n\n /**\n * Get the smallest possible portion of a string between two values\n */\n static betweenFirst(subject: string, from: string, to: string): string {\n return Str.between(subject, from, to);\n }\n\n /**\n * Convert a string to camelCase\n */\n static camel(value: string): string {\n return value\n .replace(/[-_\\s]+(.)?/g, (_, char) => (char ? char.toUpperCase() : ''))\n .replace(/^(.)/, (char) => char.toLowerCase());\n }\n\n /**\n * Get the character at the specified index\n */\n static charAt(subject: string, index: number): string | false {\n if (index < 0 || index >= subject.length) return false;\n return subject.charAt(index);\n }\n\n /**\n * Remove the first occurrence of the given value from the start of the string\n */\n static chopStart(subject: string, search: string | string[]): string {\n const searches = Array.isArray(search) ? search : [search];\n for (const s of searches) {\n if (subject.startsWith(s)) {\n return subject.substring(s.length);\n }\n }\n return subject;\n }\n\n /**\n * Remove the last occurrence of the given value from the end of the string\n */\n static chopEnd(subject: string, search: string | string[]): string {\n const searches = Array.isArray(search) ? search : [search];\n for (const s of searches) {\n if (subject.endsWith(s)) {\n return subject.substring(0, subject.length - s.length);\n }\n }\n return subject;\n }\n\n /**\n * Determine if a given string contains a given substring\n */\n static contains(haystack: string, needles: string | string[], ignoreCase = false): boolean {\n const needleArray = Array.isArray(needles) ? needles : [needles];\n const subject = ignoreCase ? haystack.toLowerCase() : haystack;\n\n return needleArray.some((needle) => {\n const search = ignoreCase ? needle.toLowerCase() : needle;\n return subject.includes(search);\n });\n }\n\n /**\n * Determine if a given string contains all array values\n */\n static containsAll(haystack: string, needles: string[], ignoreCase = false): boolean {\n const subject = ignoreCase ? haystack.toLowerCase() : haystack;\n\n return needles.every((needle) => {\n const search = ignoreCase ? needle.toLowerCase() : needle;\n return subject.includes(search);\n });\n }\n\n /**\n * Determine if a given string doesn't contain a given substring\n */\n static doesntContain(haystack: string, needles: string | string[], ignoreCase = false): boolean {\n return !Str.contains(haystack, needles, ignoreCase);\n }\n\n /**\n * Replace consecutive instances of a character with a single instance\n */\n static deduplicate(value: string, character = ' '): string {\n const escaped = character.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n const regex = new RegExp(`${escaped}+`, 'g');\n return value.replace(regex, character);\n }\n\n /**\n * Determine if a given string ends with a given substring\n */\n static endsWith(haystack: string, needles: string | string[]): boolean {\n const needleArray = Array.isArray(needles) ? needles : [needles];\n return needleArray.some((needle) => haystack.endsWith(needle));\n }\n\n /**\n * Extract an excerpt from text that matches the first instance of a phrase\n */\n static excerpt(\n text: string,\n phrase: string,\n options: { radius?: number; omission?: string } = {}\n ): string {\n const radius = options.radius ?? 100;\n const omission = options.omission ?? '...';\n\n const index = text.indexOf(phrase);\n if (index === -1) return '';\n\n const start = Math.max(0, index - radius);\n const end = Math.min(text.length, index + phrase.length + radius);\n\n let excerpt = text.substring(start, end);\n if (start > 0) excerpt = omission + excerpt;\n if (end < text.length) excerpt = excerpt + omission;\n\n return excerpt;\n }\n\n /**\n * Cap a string with a single instance of a given value\n */\n static finish(value: string, cap: string): string {\n return value.endsWith(cap) ? value : value + cap;\n }\n\n /**\n * Convert a string to headline case\n */\n static headline(value: string): string {\n return value\n .replace(/([a-z])([A-Z])/g, '$1 $2')\n .replace(/[-_]/g, ' ')\n .split(' ')\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())\n .join(' ');\n }\n\n /**\n * Determine if a given string matches a given pattern\n */\n static is(pattern: string, value: string, ignoreCase = false): boolean {\n const regexPattern = pattern.replace(/\\*/g, '.*');\n const flags = ignoreCase ? 'i' : '';\n const regex = new RegExp(`^${regexPattern}$`, flags);\n return regex.test(value);\n }\n\n /**\n * Determine if a given string is 7-bit ASCII\n */\n static isAscii(value: string): boolean {\n return /^[\\x00-\\x7F]*$/.test(value);\n }\n\n /**\n * Determine if a given string is valid JSON\n */\n static isJson(value: string): boolean {\n try {\n JSON.parse(value);\n return true;\n } catch {\n return false;\n }\n }\n\n /**\n * Determine if a given string is a valid URL\n */\n static isUrl(value: string, protocols?: string[]): boolean {\n try {\n if (typeof URL === 'undefined') {\n // Fallback for environments without URL constructor\n const urlPattern = /^https?:\\/\\/.+/i;\n return urlPattern.test(value);\n }\n const urlObj = new URL(value);\n if (protocols) {\n return protocols.includes(urlObj.protocol.replace(':', ''));\n }\n return true;\n } catch {\n return false;\n }\n }\n\n /**\n * Determine if a given string is a valid ULID\n */\n static isUlid(value: string): boolean {\n return /^[0-9A-HJKMNP-TV-Z]{26}$/i.test(value);\n }\n\n /**\n * Determine if a given string is a valid UUID\n */\n static isUuid(value: string): boolean {\n return /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(value);\n }\n\n /**\n * Convert a string to kebab-case\n */\n static kebab(value: string): string {\n return value\n .replace(/([a-z])([A-Z])/g, '$1-$2')\n .replace(/[\\s_]+/g, '-')\n .toLowerCase();\n }\n\n /**\n * Return the given string with the first character lowercased\n */\n static lcfirst(value: string): string {\n return value.charAt(0).toLowerCase() + value.slice(1);\n }\n\n /**\n * Return the length of the given string\n */\n static len(value: string): number {\n return value.length;\n }\n\n /**\n * Limit the number of characters in a string\n */\n static limit(value: string, limit = 100, end = '...', preserveWords = false): string {\n if (value.length <= limit) return value;\n\n let truncated = value.substring(0, limit);\n\n if (preserveWords) {\n const lastSpace = truncated.lastIndexOf(' ');\n if (lastSpace > 0) {\n truncated = truncated.substring(0, lastSpace);\n }\n }\n\n return truncated + end;\n }\n\n /**\n * Convert the given string to lowercase\n */\n static lower(value: string): string {\n return value.toLowerCase();\n }\n\n /**\n * Masks a portion of a string with a repeated character\n */\n static mask(value: string, character: string, index: number, length?: number): string {\n if (index < 0) {\n index = value.length + index;\n }\n\n const maskLength = length ?? value.length - index;\n const mask = character.repeat(Math.abs(maskLength));\n\n return value.substring(0, index) + mask + value.substring(index + Math.abs(maskLength));\n }\n\n /**\n * Pad both sides of a string with another\n */\n static padBoth(value: string, length: number, pad = ' '): string {\n const totalPadding = length - value.length;\n if (totalPadding <= 0) return value;\n\n const leftPadding = Math.floor(totalPadding / 2);\n const rightPadding = totalPadding - leftPadding;\n\n return pad.repeat(leftPadding) + value + pad.repeat(rightPadding);\n }\n\n /**\n * Pad the left side of a string with another\n */\n static padLeft(value: string, length: number, pad = ' '): string {\n return value.padStart(length, pad);\n }\n\n /**\n * Pad the right side of a string with another\n */\n static padRight(value: string, length: number, pad = ' '): string {\n return value.padEnd(length, pad);\n }\n\n /**\n * Get the plural form of an English word\n */\n static plural(value: string, count = 2): string {\n if (count === 1) return value;\n\n // Simple pluralization rules\n if (value.endsWith('y') && !/[aeiou]y$/i.test(value)) {\n return value.slice(0, -1) + 'ies';\n }\n if (\n value.endsWith('s') ||\n value.endsWith('x') ||\n value.endsWith('z') ||\n value.endsWith('ch') ||\n value.endsWith('sh')\n ) {\n return value + 'es';\n }\n return value + 's';\n }\n\n /**\n * Pluralize the last word of an English, studly caps case string\n */\n static pluralStudly(value: string, count = 2): string {\n const parts = value.match(/[A-Z][a-z]*/g) || [value];\n const lastWord = parts[parts.length - 1]!;\n const pluralized = Str.plural(lastWord, count);\n parts[parts.length - 1] = pluralized;\n return parts.join('');\n }\n\n /**\n * Find the position of the first occurrence of a substring\n */\n static position(haystack: string, needle: string): number | false {\n const pos = haystack.indexOf(needle);\n return pos === -1 ? false : pos;\n }\n\n /**\n * Generate a random string\n */\n static random(length = 16): string {\n const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n let result = '';\n for (let i = 0; i < length; i++) {\n result += chars.charAt(Math.floor(Math.random() * chars.length));\n }\n return result;\n }\n\n /**\n * Remove the given value from the string\n */\n static remove(search: string | string[], subject: string, caseSensitive = true): string {\n const searches = Array.isArray(search) ? search : [search];\n let result = subject;\n\n searches.forEach((s) => {\n const flags = caseSensitive ? 'g' : 'gi';\n const escaped = s.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n result = result.replace(new RegExp(escaped, flags), '');\n });\n\n return result;\n }\n\n /**\n * Repeat the given string\n */\n static repeat(value: string, times: number): string {\n return value.repeat(times);\n }\n\n /**\n * Replace the given value in the given string\n */\n static replace(search: string, replace: string, subject: string, caseSensitive = true): string {\n const flags = caseSensitive ? 'g' : 'gi';\n const escaped = search.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n return subject.replace(new RegExp(escaped, flags), replace);\n }\n\n /**\n * Replace a given value in the string sequentially with an array\n */\n static replaceArray(search: string, replacements: string[], subject: string): string {\n let result = subject;\n let index = 0;\n\n while (result.includes(search) && index < replacements.length) {\n result = result.replace(search, replacements[index]!);\n index++;\n }\n\n return result;\n }\n\n /**\n * Replace the first occurrence of a given value in the string\n */\n static replaceFirst(search: string, replace: string, subject: string): string {\n return subject.replace(search, replace);\n }\n\n /**\n * Replace the last occurrence of a given value in the string\n */\n static replaceLast(search: string, replace: string, subject: string): string {\n const index = subject.lastIndexOf(search);\n if (index === -1) return subject;\n return subject.substring(0, index) + replace + subject.substring(index + search.length);\n }\n\n /**\n * Replace the first occurrence only if it appears at the start\n */\n static replaceStart(search: string, replace: string, subject: string): string {\n return subject.startsWith(search) ? replace + subject.substring(search.length) : subject;\n }\n\n /**\n * Replace the last occurrence only if it appears at the end\n */\n static replaceEnd(search: string, replace: string, subject: string): string {\n return subject.endsWith(search)\n ? subject.substring(0, subject.length - search.length) + replace\n : subject;\n }\n\n /**\n * Reverse the given string\n */\n static reverse(value: string): string {\n return value.split('').reverse().join('');\n }\n\n /**\n * Get the singular form of an English word\n */\n static singular(value: string): string {\n // Simple singularization rules\n if (value.endsWith('ies')) {\n return value.slice(0, -3) + 'y';\n }\n if (value.endsWith('es')) {\n return value.slice(0, -2);\n }\n if (value.endsWith('s') && !value.endsWith('ss')) {\n return value.slice(0, -1);\n }\n return value;\n }\n\n /**\n * Generate a URL friendly slug\n */\n static slug(value: string, separator = '-'): string {\n return value\n .toLowerCase()\n .replace(/[^\\w\\s-]/g, '')\n .replace(/[\\s_]+/g, separator)\n .replace(new RegExp(`${separator}+`, 'g'), separator)\n .replace(new RegExp(`^${separator}|${separator}$`, 'g'), '');\n }\n\n /**\n * Convert a string to snake_case\n */\n static snake(value: string, delimiter = '_'): string {\n return value\n .replace(/([a-z])([A-Z])/g, `$1${delimiter}$2`)\n .replace(/[\\s-]+/g, delimiter)\n .toLowerCase();\n }\n\n /**\n * Remove all extraneous whitespace\n */\n static squish(value: string): string {\n return value.trim().replace(/\\s+/g, ' ');\n }\n\n /**\n * Begin a string with a single instance of a given value\n */\n static start(value: string, prefix: string): string {\n return value.startsWith(prefix) ? value : prefix + value;\n }\n\n /**\n * Determine if a given string starts with a given substring\n */\n static startsWith(haystack: string, needles: string | string[]): boolean {\n const needleArray = Array.isArray(needles) ? needles : [needles];\n return needleArray.some((needle) => haystack.startsWith(needle));\n }\n\n /**\n * Convert a value to studly caps case\n */\n static studly(value: string): string {\n return value\n .replace(/[-_\\s]+(.)?/g, (_, char) => (char ? char.toUpperCase() : ''))\n .replace(/^(.)/, (char) => char.toUpperCase());\n }\n\n /**\n * Returns the portion of string specified by the start and length parameters\n */\n static substr(value: string, start: number, length?: number): string {\n return value.substr(start, length);\n }\n\n /**\n * Returns the number of substring occurrences\n */\n static substrCount(haystack: string, needle: string): number {\n return (haystack.match(new RegExp(needle, 'g')) || []).length;\n }\n\n /**\n * Replace text within a portion of a string\n */\n static substrReplace(value: string, replace: string, start: number, length?: number): string {\n const actualLength = length ?? value.length - start;\n return value.substring(0, start) + replace + value.substring(start + actualLength);\n }\n\n /**\n * Swap multiple keywords in a string with other keywords\n */\n static swap(map: Record<string, string>, subject: string): string {\n let result = subject;\n Object.entries(map).forEach(([search, replace]) => {\n result = Str.replace(search, replace, result);\n });\n return result;\n }\n\n /**\n * Take the first or last {limit} characters\n */\n static take(value: string, limit: number): string {\n if (limit < 0) {\n return value.slice(limit);\n }\n return value.slice(0, limit);\n }\n\n /**\n * Convert the given string to title case\n */\n static title(value: string): string {\n return value\n .toLowerCase()\n .split(' ')\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1))\n .join(' ');\n }\n\n /**\n * Convert the given string to Base64\n */\n static toBase64(value: string): string {\n if (typeof Buffer !== 'undefined') {\n return Buffer.from(value).toString('base64');\n }\n // Fallback for browser environments\n if (typeof btoa !== 'undefined') {\n return btoa(value);\n }\n throw new Error('Base64 encoding not supported in this environment');\n }\n\n /**\n * Transliterate a string to its closest ASCII representation\n */\n static transliterate(value: string): string {\n return Str.ascii(value);\n }\n\n /**\n * Trim whitespace from both ends of the string\n */\n static trim(value: string, characters?: string): string {\n if (!characters) return value.trim();\n const escaped = characters.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n return value.replace(new RegExp(`^[${escaped}]+|[${escaped}]+$`, 'g'), '');\n }\n\n /**\n * Trim whitespace from the beginning of the string\n */\n static ltrim(value: string, characters?: string): string {\n if (!characters) return value.trimStart();\n const escaped = characters.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n return value.replace(new RegExp(`^[${escaped}]+`, 'g'), '');\n }\n\n /**\n * Trim whitespace from the end of the string\n */\n static rtrim(value: string, characters?: string): string {\n if (!characters) return value.trimEnd();\n const escaped = characters.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n return value.replace(new RegExp(`[${escaped}]+$`, 'g'), '');\n }\n\n /**\n * Make a string's first character uppercase\n */\n static ucfirst(value: string): string {\n return value.charAt(0).toUpperCase() + value.slice(1);\n }\n\n /**\n * Split a string by uppercase characters\n */\n static ucsplit(value: string): string[] {\n return value.match(/[A-Z][a-z]*/g) || [value];\n }\n\n /**\n * Convert the given string to uppercase\n */\n static upper(value: string): string {\n return value.toUpperCase();\n }\n\n /**\n * Remove the specified strings from the beginning and end\n */\n static unwrap(value: string, before: string, after?: string): string {\n const actualAfter = after ?? before;\n let result = value;\n if (result.startsWith(before)) {\n result = result.substring(before.length);\n }\n if (result.endsWith(actualAfter)) {\n result = result.substring(0, result.length - actualAfter.length);\n }\n return result;\n }\n\n /**\n * Get the number of words a string contains\n */\n static wordCount(value: string): number {\n return value\n .trim()\n .split(/\\s+/)\n .filter((word) => word.length > 0).length;\n }\n\n /**\n * Wrap a string to a given number of characters\n */\n static wordWrap(value: string, characters = 75, breakStr = '\\n'): string {\n const words = value.split(' ');\n let line = '';\n const lines: string[] = [];\n\n words.forEach((word) => {\n if ((line + word).length > characters) {\n if (line) lines.push(line.trim());\n line = word + ' ';\n } else {\n line += word + ' ';\n }\n });\n\n if (line) lines.push(line.trim());\n return lines.join(breakStr);\n }\n\n /**\n * Limit the number of words in a string\n */\n static words(value: string, words = 100, end = '...'): string {\n const wordArray = value.split(/\\s+/);\n if (wordArray.length <= words) return value;\n return wordArray.slice(0, words).join(' ') + end;\n }\n\n /**\n * Wrap the string with the given strings\n */\n static wrap(value: string, before: string, after?: string): string {\n const actualAfter = after ?? before;\n return before + value + actualAfter;\n }\n}\n","/**\n * Laravel-style Collection class for arrays\n * Wraps collect.js for Laravel-compatible collection operations\n */\nimport collectJs, { Collection as CollectJsCollection } from 'collect.js';\n\nexport class Collection<T = any> {\n private collection: CollectJsCollection<T>;\n\n constructor(items: T[] = []) {\n this.collection = collectJs(items);\n }\n\n /**\n * Create a new collection instance\n */\n static make<T>(items: T[] = []): Collection<T> {\n return new Collection(items);\n }\n\n /**\n * Get all items in the collection\n */\n all(): T[] {\n return this.collection.all();\n }\n\n /**\n * Get the average value of a given key\n */\n avg(key?: keyof T | ((item: T) => number)): number {\n return this.collection.avg(key as any);\n }\n\n /**\n * Chunk the collection into chunks of the given size\n */\n chunk(size: number): Collection<T[]> {\n return new Collection(this.collection.chunk(size).all());\n }\n\n /**\n * Collapse a collection of arrays into a single, flat collection\n */\n collapse(): Collection<any> {\n return new Collection(this.collection.collapse().all());\n }\n\n /**\n * Determine if an item exists in the collection\n */\n contains(key: keyof T | ((item: T) => boolean), value?: any): boolean {\n return this.collection.contains(key as any, value);\n }\n\n /**\n * Get the total number of items in the collection\n */\n count(): number {\n return this.collection.count();\n }\n\n /**\n * Get the items in the collection that are not present in the given items\n */\n diff(items: T[]): Collection<T> {\n return new Collection(this.collection.diff(items).all());\n }\n\n /**\n * Execute a callback over each item\n */\n each(callback: (item: T, key: number) => void | false): this {\n this.collection.each(callback as any);\n return this;\n }\n\n /**\n * Determine if all items pass the given test\n */\n every(callback: (item: T, key: number) => boolean): boolean {\n return this.collection.every(callback as any);\n }\n\n /**\n * Get all items except for those with the specified keys\n */\n except(keys: (keyof T)[]): Collection<T> {\n return new Collection(this.collection.except(keys as any).all());\n }\n\n /**\n * Run a filter over each of the items\n */\n filter(callback?: (item: T, key: number) => boolean): Collection<T> {\n return new Collection(this.collection.filter(callback as any).all());\n }\n\n /**\n * Get the first item from the collection\n */\n first(callback?: (item: T, key: number) => boolean): T | undefined {\n return this.collection.first(callback as any);\n }\n\n /**\n * Get a flattened array of the items in the collection\n */\n flatten(depth?: number): Collection<any> {\n return new Collection(this.collection.flatten(depth).all());\n }\n\n /**\n * Flip the items in the collection\n */\n flip(): Collection<any> {\n return new Collection(this.collection.flip().all());\n }\n\n /**\n * Remove an item from the collection by key\n */\n forget(key: number): this {\n this.collection.forget(key);\n return this;\n }\n\n /**\n * Get an item from the collection by key\n */\n get(key: number, defaultValue?: T): T | undefined {\n const result = this.collection.get(key, defaultValue as any);\n return result === null ? undefined : result;\n }\n\n /**\n * Group the collection's items by a given key\n */\n groupBy(key: keyof T | ((item: T) => any)): Collection<Collection<T>> {\n const grouped = this.collection.groupBy(key as any);\n const result: any = {};\n grouped.each((items: any, groupKey: any) => {\n result[groupKey] = new Collection(items.all());\n });\n return new Collection(Object.values(result));\n }\n\n /**\n * Determine if a given key exists in the collection\n */\n has(key: number): boolean {\n return this.collection.has(key);\n }\n\n /**\n * Concatenate values of a given key as a string\n */\n implode(key: keyof T | string, glue?: string): string {\n return this.collection.implode(key as any, glue);\n }\n\n /**\n * Intersect the collection with the given items\n */\n intersect(items: T[]): Collection<T> {\n return new Collection(this.collection.intersect(items).all());\n }\n\n /**\n * Determine if the collection is empty\n */\n isEmpty(): boolean {\n return this.collection.isEmpty();\n }\n\n /**\n * Determine if the collection is not empty\n */\n isNotEmpty(): boolean {\n return this.collection.isNotEmpty();\n }\n\n /**\n * Join all items from the collection using a string\n */\n join(glue: string, finalGlue?: string): string {\n if (finalGlue) {\n return (this.collection as any).join(glue, finalGlue);\n }\n return (this.collection as any).join(glue);\n }\n\n /**\n * Key the collection by the given key\n */\n keyBy(key: keyof T | ((item: T) => any)): Collection<T> {\n return new Collection(this.collection.keyBy(key as any).all() as T[]);\n }\n\n /**\n * Get the keys of the collection items\n */\n keys(): Collection<string | number> {\n return new Collection(this.collection.keys().all() as (string | number)[]);\n }\n\n /**\n * Get the last item from the collection\n */\n last(callback?: (item: T, key: number) => boolean): T | undefined {\n return this.collection.last(callback as any);\n }\n\n /**\n * Run a map over each of the items\n */\n map<U>(callback: (item: T, key: number) => U): Collection<U> {\n return new Collection(this.collection.map(callback as any).all() as U[]);\n }\n\n /**\n * Get the max value of a given key\n */\n max(key?: keyof T): number {\n return this.collection.max(key as any);\n }\n\n /**\n * Merge the collection with the given items\n */\n merge(items: T[]): Collection<T> {\n return new Collection(this.collection.merge(items).all());\n }\n\n /**\n * Get the min value of a given key\n */\n min(key?: keyof T): number {\n return this.collection.min(key as any);\n }\n\n /**\n * Get the items with the specified keys\n */\n only(keys: (keyof T)[]): Collection<T> {\n return new Collection(this.collection.only(keys as any).all());\n }\n\n /**\n * Get and remove the last item from the collection\n */\n pop(): T | undefined {\n return this.collection.pop();\n }\n\n /**\n * Push an item onto the beginning of the collection\n */\n prepend(value: T): this {\n this.collection.prepend(value);\n return this;\n }\n\n /**\n * Get and remove an item from the collection\n */\n pull(key: number): T | undefined {\n const result = this.collection.pull(key);\n return result === null ? undefined : result;\n }\n\n /**\n * Push an item onto the end of the collection\n */\n push(value: T): this {\n this.collection.push(value);\n return this;\n }\n\n /**\n * Put an item in the collection by key\n */\n put(key: number, value: T): this {\n this.collection.put(key, value);\n return this;\n }\n\n /**\n * Get one or a specified number of items randomly from the collection\n */\n random(count?: number): T | Collection<T> {\n if (count) {\n const result = this.collection.random(count) as CollectJsCollection<T>;\n return new Collection(result.all());\n }\n return this.collection.random() as T;\n }\n\n /**\n * Reduce the collection to a single value\n */\n reduce<U>(callback: (carry: U, item: T) => U, initial: U): U {\n return this.collection.reduce(callback as any, initial);\n }\n\n /**\n * Filter items by the given key value pair\n */\n reject(callback: (item: T, key: number) => boolean): Collection<T> {\n return new Collection(this.collection.reject(callback as any).all());\n }\n\n /**\n * Reverse items order\n */\n reverse(): Collection<T> {\n return new Collection(this.collection.reverse().all());\n }\n\n /**\n * Search the collection for a given value\n */\n search(value: T | ((item: T) => boolean)): number | false {\n const result = this.collection.search(value as any);\n return result === false ? false : result;\n }\n\n /**\n * Get and remove the first item from the collection\n */\n shift(): T | undefined {\n return this.collection.shift();\n }\n\n /**\n * Shuffle the items in the collection\n */\n shuffle(): Collection<T> {\n return new Collection(this.collection.shuffle().all());\n }\n\n /**\n * Slice the underlying collection array\n */\n slice(start: number, length?: number): Collection<T> {\n return new Collection(this.collection.slice(start, length).all());\n }\n\n /**\n * Sort through each item with a callback\n */\n sort(callback?: (a: T, b: T) => number): Collection<T> {\n return new Collection(this.collection.sort(callback as any).all());\n }\n\n /**\n * Sort the collection by the given key\n */\n sortBy(key: keyof T | ((item: T) => any)): Collection<T> {\n return new Collection(this.collection.sortBy(key as any).all());\n }\n\n /**\n * Sort the collection in descending order by the given key\n */\n sortByDesc(key: keyof T | ((item: T) => any)): Collection<T> {\n return new Collection(this.collection.sortByDesc(key as any).all());\n }\n\n /**\n * Splice a portion of the underlying collection array\n */\n splice(start: number, length?: number, ...items: T[]): Collection<T> {\n const actualLength = length ?? 0;\n const itemsArray = items as any;\n return new Collection(this.collection.splice(start, actualLength, ...itemsArray).all());\n }\n\n /**\n * Get the sum of the given values\n */\n sum(key?: keyof T | ((item: T) => number)): number {\n const result = this.collection.sum(key as any);\n return typeof result === 'number' ? result : 0;\n }\n\n /**\n * Take the first or last {limit} items\n */\n take(limit: number): Collection<T> {\n return new Collection(this.collection.take(limit).all());\n }\n\n /**\n * Pass the collection to the given callback and return the result\n */\n pipe<U>(callback: (collection: Collection<T>) => U): U {\n return callback(this);\n }\n\n /**\n * Pass the collection to the given callback and then return it\n */\n tap(callback: (collection: Collection<T>) => void): this {\n callback(this);\n return this;\n }\n\n /**\n * Transform each item in the collection using a callback\n */\n transform(callback: (item: T, key: number) => T): this {\n this.collection = this.collection.map(callback as any);\n return this;\n }\n\n /**\n * Return only unique items from the collection array\n */\n unique(key?: keyof T): Collection<T> {\n return new Collection(this.collection.unique(key as any).all());\n }\n\n /**\n * Reset the keys on the underlying array\n */\n values(): Collection<T> {\n return new Collection(this.collection.values().all() as T[]);\n }\n\n /**\n * Filter items by the given key value pair\n */\n where(key: keyof T, value: any): Collection<T>;\n where(key: keyof T, operator: string, value: any): Collection<T>;\n where(key: keyof T, operatorOrValue: any, value?: any): Collection<T> {\n if (value === undefined) {\n return new Collection(this.collection.where(key as any, operatorOrValue).all());\n }\n return new Collection(this.collection.where(key as any, operatorOrValue, value).all());\n }\n\n /**\n * Filter items by the given key value pair using loose comparison\n */\n whereIn(key: keyof T, values: any[]): Collection<T> {\n return new Collection(this.collection.whereIn(key as any, values).all());\n }\n\n /**\n * Filter items by the given key value pair using loose comparison\n */\n whereNotIn(key: keyof T, values: any[]): Collection<T> {\n return new Collection(this.collection.whereNotIn(key as any, values).all());\n }\n\n /**\n * Zip the collection together with one or more arrays\n */\n zip<U>(...arrays: U[][]): Collection<any[]> {\n const zipArgs = arrays as any;\n return new Collection((this.collection as any).zip(...zipArgs).all() as any[]);\n }\n\n /**\n * Convert the collection to a plain array\n */\n toArray(): T[] {\n return this.all();\n }\n\n /**\n * Convert the collection to JSON\n */\n toJson(): string {\n return JSON.stringify(this.all());\n }\n\n /**\n * Get the collection as a string\n */\n toString(): string {\n return this.toJson();\n }\n}\n\n/**\n * Helper function to create a new collection\n */\nexport function collect<T>(items: T[] = []): Collection<T> {\n return new Collection(items);\n}\n","/**\n * Laravel-style Map Collection class\n * Provides collection methods for Map data structures\n */\nexport class MapCollection<K = any, V = any> {\n private internalMap: Map<K, V>;\n\n constructor(entries?: Iterable<[K, V]> | Record<string, V>) {\n if (entries && typeof entries === 'object' && !(Symbol.iterator in entries)) {\n this.internalMap = new Map(Object.entries(entries) as [K, V][]);\n } else {\n this.internalMap = new Map(entries as Iterable<[K, V]>);\n }\n }\n\n /**\n * Create a new map collection instance\n */\n static make<K, V>(entries?: Iterable<[K, V]> | Record<string, V>): MapCollection<K, V> {\n return new MapCollection(entries);\n }\n\n /**\n * Get all entries as an array of [key, value] pairs\n */\n all(): [K, V][] {\n return Array.from(this.internalMap.entries());\n }\n\n /**\n * Get the number of items in the map\n */\n count(): number {\n return this.internalMap.size;\n }\n\n /**\n * Get the number of items in the map (alias for count)\n */\n size(): number {\n return this.internalMap.size;\n }\n\n /**\n * Determine if the map is empty\n */\n isEmpty(): boolean {\n return this.internalMap.size === 0;\n }\n\n /**\n * Determine if the map is not empty\n */\n isNotEmpty(): boolean {\n return this.internalMap.size > 0;\n }\n\n /**\n * Determine if a key exists in the map\n */\n has(key: K): boolean {\n return this.internalMap.has(key);\n }\n\n /**\n * Get a value from the map by key\n */\n get(key: K, defaultValue?: V): V | undefined {\n return this.internalMap.has(key) ? this.internalMap.get(key) : defaultValue;\n }\n\n /**\n * Set a value in the map\n */\n set(key: K, value: V): this {\n this.internalMap.set(key, value);\n return this;\n }\n\n /**\n * Put a value in the map (alias for set)\n */\n put(key: K, value: V): this {\n return this.set(key, value);\n }\n\n /**\n * Remove a key from the map\n */\n delete(key: K): boolean {\n return this.internalMap.delete(key);\n }\n\n /**\n * Remove a key from the map (alias for delete)\n */\n forget(key: K): boolean {\n return this.delete(key);\n }\n\n /**\n * Remove all items from the map\n */\n clear(): this {\n this.internalMap.clear();\n return this;\n }\n\n /**\n * Get all keys from the map\n */\n keys(): K[] {\n return Array.from(this.internalMap.keys());\n }\n\n /**\n * Get all values from the map\n */\n values(): V[] {\n return Array.from(this.internalMap.values());\n }\n\n /**\n * Execute a callback over each item\n */\n each(callback: (value: V, key: K) => void | false): this {\n for (const [key, value] of this.internalMap) {\n if (callback(value, key) === false) {\n break;\n }\n }\n return this;\n }\n\n /**\n * Run a map over each of the items\n */\n mapValues<U>(callback: (value: V, key: K) => U): MapCollection<K, U> {\n const result = new Map<K, U>();\n this.internalMap.forEach((value, key) => {\n result.set(key, callback(value, key));\n });\n return new MapCollection(result);\n }\n\n /**\n * Run a filter over each of the items\n */\n filter(callback: (value: V, key: K) => boolean): MapCollection<K, V> {\n const result = new Map<K, V>();\n this.internalMap.forEach((value, key) => {\n if (callback(value, key)) {\n result.set(key, value);\n }\n });\n return new MapCollection(result);\n }\n\n /**\n * Determine if all items pass the given test\n */\n every(callback: (value: V, key: K) => boolean): boolean {\n for (const [key, value] of this.internalMap) {\n if (!callback(value, key)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Determine if any item passes the given test\n */\n some(callback: (value: V, key: K) => boolean): boolean {\n for (const [key, value] of this.internalMap) {\n if (callback(value, key)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Get the first value that passes the given test\n */\n first(callback?: (value: V, key: K) => boolean): V | undefined {\n if (!callback) {\n return this.internalMap.values().next().value;\n }\n\n for (const [key, value] of this.internalMap) {\n if (callback(value, key)) {\n return value;\n }\n }\n return undefined;\n }\n\n /**\n * Get the last value that passes the given test\n */\n last(callback?: (value: V, key: K) => boolean): V | undefined {\n const entries = Array.from(this.internalMap.entries()).reverse();\n\n if (!callback) {\n return entries[0]?.[1];\n }\n\n for (const [key, value] of entries) {\n if (callback(value, key)) {\n return value;\n }\n }\n return undefined;\n }\n\n /**\n * Reduce the map to a single value\n */\n reduce<U>(callback: (carry: U, value: V, key: K) => U, initial: U): U {\n let carry = initial;\n this.internalMap.forEach((value, key) => {\n carry = callback(carry, value, key);\n });\n return carry;\n }\n\n /**\n * Merge another map into this one\n */\n merge(other: MapCollection<K, V> | Map<K, V> | Record<string, V>): this {\n if (other instanceof MapCollection) {\n other.each((value, key) => {\n this.set(key, value);\n return undefined;\n });\n } else if (other instanceof Map) {\n other.forEach((value, key) => this.set(key, value));\n } else {\n Object.entries(other).forEach(([key, value]) => {\n this.set(key as K, value as V);\n });\n }\n return this;\n }\n\n /**\n * Get only the specified keys\n */\n only(keys: K[]): MapCollection<K, V> {\n const result = new Map<K, V>();\n keys.forEach((key) => {\n if (this.internalMap.has(key)) {\n result.set(key, this.internalMap.get(key)!);\n }\n });\n return new MapCollection(result);\n }\n\n /**\n * Get all items except the specified keys\n */\n except(keys: K[]): MapCollection<K, V> {\n const result = new Map<K, V>();\n this.internalMap.forEach((value, key) => {\n if (!keys.includes(key)) {\n result.set(key, value);\n }\n });\n return new MapCollection(result);\n }\n\n /**\n * Flip the keys and values\n */\n flip(): MapCollection<V, K> {\n const result = new Map<V, K>();\n this.internalMap.forEach((value, key) => {\n result.set(value, key);\n });\n return new MapCollection(result);\n }\n\n /**\n * Pass the map to the given callback and return the result\n */\n pipe<U>(callback: (map: MapCollection<K, V>) => U): U {\n return callback(this);\n }\n\n /**\n * Pass the map to the given callback and then return it\n */\n tap(callback: (map: MapCollection<K, V>) => void): this {\n callback(this);\n return this;\n }\n\n /**\n * Convert the map to a plain object\n */\n toObject(): Record<string, V> {\n const obj: Record<string, V> = {};\n this.internalMap.forEach((value, key) => {\n obj[String(key)] = value;\n });\n return obj;\n }\n\n /**\n * Convert the map to an array of [key, value] pairs\n */\n toArray(): [K, V][] {\n return this.all();\n }\n\n /**\n * Convert the map to JSON\n */\n toJson(): string {\n return JSON.stringify(this.toObject());\n }\n\n /**\n * Get the map as a string\n */\n toString(): string {\n return this.toJson();\n }\n\n /**\n * Get the underlying Map instance\n */\n toMap(): Map<K, V> {\n return new Map(this.internalMap);\n }\n}\n\n/**\n * Helper function to create a new map collection\n */\nexport function collectMap<K, V>(\n entries?: Iterable<[K, V]> | Record<string, V>\n): MapCollection<K, V> {\n return new MapCollection(entries);\n}\n","/**\n * Laravel-style Set Collection class\n * Provides collection methods for Set data structures\n */\nexport class SetCollection<T = any> {\n private set: Set<T>;\n\n constructor(items?: Iterable<T>) {\n this.set = new Set(items);\n }\n\n /**\n * Create a new set collection instance\n */\n static make<T>(items?: Iterable<T>): SetCollection<T> {\n return new SetCollection(items);\n }\n\n /**\n * Get all items as an array\n */\n all(): T[] {\n return Array.from(this.set);\n }\n\n /**\n * Get the number of items in the set\n */\n count(): number {\n return this.set.size;\n }\n\n /**\n * Get the number of items in the set (alias for count)\n */\n size(): number {\n return this.set.size;\n }\n\n /**\n * Determine if the set is empty\n */\n isEmpty(): boolean {\n return this.set.size === 0;\n }\n\n /**\n * Determine if the set is not empty\n */\n isNotEmpty(): boolean {\n return this.set.size > 0;\n }\n\n /**\n * Determine if an item exists in the set\n */\n has(item: T): boolean {\n return this.set.has(item);\n }\n\n /**\n * Determine if an item exists in the set (alias for has)\n */\n contains(item: T): boolean {\n return this.has(item);\n }\n\n /**\n * Add an item to the set\n */\n add(item: T): this {\n this.set.add(item);\n return this;\n }\n\n /**\n * Add an item to the set (alias for add)\n */\n push(item: T): this {\n return this.add(item);\n }\n\n /**\n * Remove an item from the set\n */\n delete(item: T): boolean {\n return this.set.delete(item);\n }\n\n /**\n * Remove an item from the set (alias for delete)\n */\n forget(item: T): boolean {\n return this.delete(item);\n }\n\n /**\n * Remove all items from the set\n */\n clear(): this {\n this.set.clear();\n return this;\n }\n\n /**\n * Execute a callback over each item\n */\n each(callback: (item: T, index: number) => void | false): this {\n let index = 0;\n for (const item of this.set) {\n if (callback(item, index++) === false) {\n break;\n }\n }\n return this;\n }\n\n /**\n * Run a map over each of the items\n */\n map<U>(callback: (item: T, index: number) => U): SetCollection<U> {\n const result = new Set<U>();\n let index = 0;\n this.set.forEach((item) => {\n result.add(callback(item, index++));\n });\n return new SetCollection(result);\n }\n\n /**\n * Run a filter over each of the items\n */\n filter(callback: (item: T, index: number) => boolean): SetCollection<T> {\n const result = new Set<T>();\n let index = 0;\n this.set.forEach((item) => {\n if (callback(item, index++)) {\n result.add(item);\n }\n });\n return new SetCollection(result);\n }\n\n /**\n * Determine if all items pass the given test\n */\n every(callback: (item: T, index: number) => boolean): boolean {\n let index = 0;\n for (const item of this.set) {\n if (!callback(item, index++)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Determine if any item passes the given test\n */\n some(callback: (item: T, index: number) => boolean): boolean {\n let index = 0;\n for (const item of this.set) {\n if (callback(item, index++)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Get the first item that passes the given test\n */\n first(callback?: (item: T, index: number) => boolean): T | undefined {\n if (!callback) {\n return this.set.values().next().value;\n }\n\n let index = 0;\n for (const item of this.set) {\n if (callback(item, index++)) {\n return item;\n }\n }\n return undefined;\n }\n\n /**\n * Get the last item that passes the given test\n */\n last(callback?: (item: T, index: number) => boolean): T | undefined {\n const items = Array.from(this.set).reverse();\n\n if (!callback) {\n return items[0];\n }\n\n for (let i = 0; i < items.length; i++) {\n if (callback(items[i]!, i)) {\n return items[i];\n }\n }\n return undefined;\n }\n\n /**\n * Reduce the set to a single value\n */\n reduce<U>(callback: (carry: U, item: T, index: number) => U, initial: U): U {\n let carry = initial;\n let index = 0;\n this.set.forEach((item) => {\n carry = callback(carry, item, index++);\n });\n return carry;\n }\n\n /**\n * Merge another set into this one\n */\n merge(other: SetCollection<T> | Set<T> | T[]): this {\n if (other instanceof SetCollection) {\n other.each((item) => {\n this.add(item);\n return undefined;\n });\n } else if (other instanceof Set) {\n other.forEach((item) => this.add(item));\n } else {\n other.forEach((item) => this.add(item));\n }\n return this;\n }\n\n /**\n * Get the union of this set and another\n */\n union(other: SetCollection<T> | Set<T> | T[]): SetCollection<T> {\n const result = new SetCollection(this.set);\n return result.merge(other);\n }\n\n /**\n * Get the intersection of this set and another\n */\n intersect(other: SetCollection<T> | Set<T> | T[]): SetCollection<T> {\n const otherSet =\n other instanceof SetCollection\n ? other.toSet()\n : other instanceof Set\n ? other\n : new Set(other);\n\n const result = new Set<T>();\n this.set.forEach((item) => {\n if (otherSet.has(item)) {\n result.add(item);\n }\n });\n return new SetCollection(result);\n }\n\n /**\n * Get the difference between this set and another\n */\n diff(other: SetCollection<T> | Set<T> | T[]): SetCollection<T> {\n const otherSet =\n other instanceof SetCollection\n ? other.toSet()\n : other instanceof Set\n ? other\n : new Set(other);\n\n const result = new Set<T>();\n this.set.forEach((item) => {\n if (!otherSet.has(item)) {\n result.add(item);\n }\n });\n return new SetCollection(result);\n }\n\n /**\n * Get items that are in either set but not in both\n */\n symmetricDiff(other: SetCollection<T> | Set<T> | T[]): SetCollection<T> {\n const otherSet =\n other instanceof SetCollection\n ? other.toSet()\n : other instanceof Set\n ? other\n : new Set(other);\n\n const result = new Set<T>();\n\n this.set.forEach((item) => {\n if (!otherSet.has(item)) {\n result.add(item);\n }\n });\n\n otherSet.forEach((item) => {\n if (!this.set.has(item)) {\n result.add(item);\n }\n });\n\n return new SetCollection(result);\n }\n\n /**\n * Determine if this set is a subset of another\n */\n isSubsetOf(other: SetCollection<T> | Set<T> | T[]): boolean {\n const otherSet =\n other instanceof SetCollection\n ? other.toSet()\n : other instanceof Set\n ? other\n : new Set(other);\n\n for (const item of this.set) {\n if (!otherSet.has(item)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Determine if this set is a superset of another\n */\n isSupersetOf(other: SetCollection<T> | Set<T> | T[]): boolean {\n const otherSet =\n other instanceof SetCollection\n ? other.toSet()\n : other instanceof Set\n ? other\n : new Set(other);\n\n for (const item of otherSet) {\n if (!this.set.has(item)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Pass the set to the given callback and return the result\n */\n pipe<U>(callback: (set: SetCollection<T>) => U): U {\n return callback(this);\n }\n\n /**\n * Pass the set to the given callback and then return it\n */\n tap(callback: (set: SetCollection<T>) => void): this {\n callback(this);\n return this;\n }\n\n /**\n * Convert the set to an array\n */\n toArray(): T[] {\n return this.all();\n }\n\n /**\n * Convert the set to JSON\n */\n toJson(): string {\n return JSON.stringify(this.all());\n }\n\n /**\n * Get the set as a string\n */\n toString(): string {\n return this.toJson();\n }\n\n /**\n * Get the underlying Set instance\n */\n toSet(): Set<T> {\n return new Set(this.set);\n }\n}\n\n/**\n * Helper function to create a new set collection\n */\nexport function collectSet<T>(items?: Iterable<T>): SetCollection<T> {\n return new SetCollection(items);\n}\n","/**\n * @fileoverview Base registry implementation\n *\n * A generic key-value registry backed by {@link MapCollection}.\n * Provides O(1) lookups, optional default values, and validation hooks.\n *\n * @module @abdokouta/support\n * @category Registries\n */\n\nimport { MapCollection } from '@/collections/map.collection';\nimport type { BaseRegistryOptions, ValidationResult, Collection } from '@/types';\n\n/**\n * Base registry class\n *\n * Stores items by string key using {@link MapCollection} for O(1) operations.\n * Adds default-item fallback, before-add validation, and after-add hooks\n * on top of the raw collection.\n *\n * @typeParam T - The type of items stored in the registry\n *\n * @example\n * ```typescript\n * const registry = new BaseRegistry<Theme>({\n * defaultItem: defaultTheme,\n * validateBeforeAdd: (key, theme) => {\n * if (!theme.name) return { valid: false, error: 'Theme must have a name' };\n * return { valid: true };\n * },\n * });\n *\n * registry.register('blue', blueTheme);\n * registry.get('blue'); // blueTheme\n * registry.get('nope'); // defaultTheme\n * ```\n */\nexport class BaseRegistry<T> implements Collection<T> {\n /**\n * Internal map-based storage.\n */\n protected readonly storage = new MapCollection<string, T>();\n\n /**\n * Fallback value returned by {@link get} when a key is missing.\n */\n protected defaultItem?: T;\n\n /**\n * Optional validation executed before every {@link register} call.\n */\n protected validateBeforeAdd?: (key: string, item: T) => ValidationResult;\n\n /**\n * Optional callback executed after a successful {@link register}.\n */\n protected afterAdd?: (key: string, item: T) => void;\n\n /**\n * Create a new registry.\n *\n * @param options - Optional default item, validation, and lifecycle hooks\n */\n constructor(options: BaseRegistryOptions<T> = {}) {\n this.defaultItem = options.defaultItem;\n this.validateBeforeAdd = options.validateBeforeAdd;\n this.afterAdd = options.afterAdd;\n }\n\n // ──────────────────────────────────────────────────────────────────────────\n // Core\n // ──────────────────────────────────────────────────────────────────────────\n\n /**\n * Register (add or replace) an item.\n *\n * Runs the `validateBeforeAdd` hook first; throws on failure.\n * Fires the `afterAdd` hook on success.\n *\n * @param key - Unique identifier\n * @param item - Value to store\n * @throws Error if validation fails\n */\n register(key: string, item: T): void {\n if (this.validateBeforeAdd) {\n const result = this.validateBeforeAdd(key, item);\n\n if (!result.valid) {\n throw new Error(`Validation failed for key \"${key}\": ${result.error || 'Unknown error'}`);\n }\n }\n\n this.storage.set(key, item);\n\n if (this.afterAdd) {\n this.afterAdd(key, item);\n }\n }\n\n // ──────────────────────────────────────────────────────────────────────────\n // Collection interface\n // ──────────────────────────────────────────────────────────────────────────\n\n /**\n * @inheritdoc — delegates to {@link register} so hooks still fire.\n */\n add(key: string, value: T): void {\n this.register(key, value);\n }\n\n /**\n * Retrieve an item by key.\n *\n * Falls back to {@link defaultItem} when the key is not found.\n *\n * @param key - Item identifier\n * @returns The stored value, the default item, or `undefined`\n */\n get(key: string): T | undefined {\n return this.storage.get(key) ?? this.defaultItem;\n }\n\n /**\n * Return every stored value in insertion order.\n */\n getAll(): T[] {\n return this.storage.values();\n }\n\n /**\n * Return every registered key in insertion order.\n */\n getKeys(): string[] {\n return this.storage.keys();\n }\n\n /**\n * Convert the registry to a plain `Record<string, T>`.\n */\n getAsRecord(): Record<string, T> {\n return this.storage.toObject();\n }\n\n /**\n * Check whether a key exists.\n */\n has(key: string): boolean {\n return this.storage.has(key);\n }\n\n /**\n * Remove an item by key.\n *\n * @returns `true` if the key existed and was removed\n */\n remove(key: string): boolean {\n return this.storage.delete(key);\n }\n\n /**\n * Remove all items from the registry.\n */\n clear(): void {\n this.storage.clear();\n }\n\n /**\n * Return the number of registered items.\n */\n size(): number {\n return this.storage.size();\n }\n\n /**\n * Return `true` when the registry is empty.\n */\n isEmpty(): boolean {\n return this.storage.isEmpty();\n }\n\n /**\n * Iterate over every entry in insertion order.\n */\n forEach(callback: (value: T, key: string) => void): void {\n this.storage.each((value, key) => {\n callback(value, key);\n });\n }\n\n /**\n * Map every entry to a new value and return the results as an array.\n */\n map<U>(callback: (value: T, key: string) => U): U[] {\n const result: U[] = [];\n\n this.storage.each((value, key) => {\n result.push(callback(value, key));\n });\n\n return result;\n }\n\n /**\n * Return all values whose entries satisfy the predicate.\n */\n filter(predicate: (value: T, key: string) => boolean): T[] {\n const result: T[] = [];\n\n this.storage.each((value, key) => {\n if (predicate(value, key)) {\n result.push(value);\n }\n });\n\n return result;\n }\n\n /**\n * Return the first value whose entry satisfies the predicate.\n */\n find(predicate: (value: T, key: string) => boolean): T | undefined {\n return this.storage.first(predicate);\n }\n}\n","/**\n * Multiple Instance Manager\n *\n * Abstract base class for managing multiple named instances backed by\n * different drivers. TypeScript adaptation of Laravel's\n * `MultipleInstanceManager` pattern.\n *\n * Concrete managers extend this class and implement:\n * - `getDefaultInstance()` — which instance name to use by default\n * - `getInstanceConfig(name)` — read config for a named instance\n * - `createDriver(driver, config)` — create an instance for a known driver\n *\n * Config is injected via DI in the concrete manager's constructor using\n * `@Inject(CONFIG_TOKEN)`. The base class handles lazy resolution,\n * caching, custom driver registration, and instance lifecycle.\n *\n * @typeParam T - The type of instance this manager creates\n *\n * @example\n * ```typescript\n * @Injectable()\n * class CacheManager extends MultipleInstanceManager<Store> {\n * constructor(@Inject(CACHE_CONFIG) private config: CacheModuleOptions) {\n * super();\n * }\n *\n * getDefaultInstance() { return this.config.default; }\n * getInstanceConfig(name) { return this.config.stores[name]; }\n *\n * protected createDriver(driver, config) {\n * switch (driver) {\n * case 'memory': return new MemoryStore(config);\n * case 'redis': return new RedisStore(config);\n * case 'null': return new NullStore();\n * default: throw new Error(`Driver [${driver}] not supported.`);\n * }\n * }\n * }\n * ```\n *\n * @module services/base-manager\n */\n\nimport type { DriverCreator } from '@/types';\n\n/**\n * Abstract base manager for multi-instance, multi-driver services.\n *\n * @typeParam T - The type of instance managed (e.g., Store, RedisConnection)\n */\nexport abstract class MultipleInstanceManager<T> {\n // ──────────────────────────────────────────────────────────────────────────\n // State\n // ──────────────────────────────────────────────────────────────────────────\n\n /**\n * Resolved instances, keyed by instance name.\n * Instances are created once and reused on subsequent calls.\n */\n private readonly instances: Map<string, T> = new Map();\n\n /**\n * Custom driver creators registered via `extend()`.\n * Keyed by driver name.\n */\n private readonly customCreators: Map<string, DriverCreator<T>> = new Map();\n\n /**\n * The config key that identifies the driver.\n * Override in subclasses if your config uses a different field name.\n *\n * @default 'driver'\n */\n protected readonly driverKey: string = 'driver';\n\n // ──────────────────────────────────────────────────────────────────────────\n // Abstract Methods (implement in concrete managers)\n // ──────────────────────────────────────────────────────────────────────────\n\n /**\n * Get the default instance name.\n *\n * Reads from the injected config (e.g., `this.config.default`).\n *\n * @returns The name of the default instance\n */\n abstract getDefaultInstance(): string;\n\n /**\n * Get the configuration for a named instance.\n *\n * Reads from the injected config (e.g., `this.config.stores[name]`).\n *\n * @param name - Instance name\n * @returns The config object, or undefined if not configured\n */\n abstract getInstanceConfig(name: string): Record<string, any> | undefined;\n\n /**\n * Create a driver instance for a known driver type.\n *\n * Called when no custom creator is registered for the driver.\n * Implement with a switch/map over your package's built-in drivers.\n *\n * @param driver - The driver name (e.g., 'memory', 'redis', 'smtp')\n * @param config - The raw instance config\n * @returns A new driver instance\n * @throws Error if the driver is not supported\n */\n protected abstract createDriver(driver: string, config: Record<string, any>): T;\n\n // ──────────────────────────────────────────────────────────────────────────\n // Public API\n // ──────────────────────────────────────────────────────────────────────────\n\n /**\n * Get an instance by name.\n *\n * Returns a cached instance if available, otherwise resolves and caches it.\n * If no name is provided, returns the default instance.\n *\n * @param name - Instance name (uses default if omitted)\n * @returns The resolved instance\n * @throws Error if the instance is not configured\n */\n instance(name?: string): T {\n const instanceName = name ?? this.getDefaultInstance();\n\n // Return cached instance if it exists\n const existing = this.instances.get(instanceName);\n if (existing) {\n return existing;\n }\n\n // Resolve, cache, and return\n const resolved = this.resolve(instanceName);\n this.instances.set(instanceName, resolved);\n\n return resolved;\n }\n\n /**\n * Register a custom driver creator.\n *\n * Custom creators take priority over built-in drivers.\n *\n * @param driver - Driver name\n * @param creator - Factory function that creates an instance from config\n * @returns this (for chaining)\n */\n extend(driver: string, creator: DriverCreator<T>): this {\n this.customCreators.set(driver, creator);\n\n return this;\n }\n\n /**\n * Remove a cached instance, forcing re-creation on next access.\n *\n * @param name - Instance name (uses default if omitted)\n * @returns this (for chaining)\n */\n forgetInstance(name?: string): this {\n const instanceName = name ?? this.getDefaultInstance();\n this.instances.delete(instanceName);\n\n return this;\n }\n\n /**\n * Remove all cached instances.\n */\n purge(): void {\n this.instances.clear();\n }\n\n /**\n * Check if an instance has been resolved and cached.\n *\n * @param name - Instance name\n */\n hasResolvedInstance(name: string): boolean {\n return this.instances.has(name);\n }\n\n /**\n * Get all resolved instance names.\n */\n getResolvedInstances(): string[] {\n return Array.from(this.instances.keys());\n }\n\n // ──────────────────────────────────────────────────────────────────────────\n // Resolution (private)\n // ──────────────────────────────────────────────────────────────────────────\n\n /**\n * Resolve an instance by name.\n *\n * 1. Reads config via `getInstanceConfig()` (from injected config)\n * 2. Extracts the driver name from the config\n * 3. Checks custom creators first\n * 4. Falls back to `createDriver()`\n *\n * @param name - Instance name\n * @returns A new instance\n */\n private resolve(name: string): T {\n const config = this.getInstanceConfig(name);\n\n if (!config) {\n throw new Error(`Instance [${name}] is not defined.`);\n }\n\n const driver = config[this.driverKey];\n if (!driver) {\n throw new Error(`Instance [${name}] does not specify a \"${this.driverKey}\".`);\n }\n\n // Custom creator takes priority\n const customCreator = this.customCreators.get(driver);\n if (customCreator) {\n return customCreator(config);\n }\n\n // Delegate to concrete manager\n return this.createDriver(driver, config);\n }\n}\n"],"mappings":";;;;;AAIO,IAAM,MAAN,MAAM,KAAI;AAAA;AAAA;AAAA;AAAA,EAIf,OAAO,MAAM,SAAiB,QAAwB;AACpD,QAAI,WAAW,GAAI,QAAO;AAC1B,UAAM,QAAQ,QAAQ,QAAQ,MAAM;AACpC,WAAO,UAAU,KAAK,UAAU,QAAQ,UAAU,QAAQ,OAAO,MAAM;AAAA,EACzE;AAAA;AAAA;AAAA;AAAA,EAKA,OAAO,UAAU,SAAiB,QAAwB;AACxD,QAAI,WAAW,GAAI,QAAO;AAC1B,UAAM,QAAQ,QAAQ,YAAY,MAAM;AACxC,WAAO,UAAU,KAAK,UAAU,QAAQ,UAAU,QAAQ,OAAO,MAAM;AAAA,EACzE;AAAA;AAAA;AAAA;AAAA,EAKA,OAAO,IAAI,OAAuB;AAChC,UAAM,aAAa;AAAA,MACjB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AACA,UAAM,QAAQ,MAAM,MAAM,GAAG;AAE7B,WAAO,MACJ,IAAI,CAAC,MAAM,UAAU;AACpB,UAAI,UAAU,KAAK,CAAC,WAAW,SAAS,KAAK,YAAY,CAAC,GAAG;AAC3D,eAAO,KAAK,OAAO,CAAC,EAAE,YAAY,IAAI,KAAK,MAAM,CAAC,EAAE,YAAY;AAAA,MAClE;AACA,aAAO,KAAK,YAAY;AAAA,IAC1B,CAAC,EACA,KAAK,GAAG;AAAA,EACb;AAAA;AAAA;AAAA;AAAA,EAKA,OAAO,MAAM,OAAuB;AAClC,WAAO,MAAM,UAA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