{"version":3,"file":"tailwind-CZDoPF9-.cjs","names":["isNonEmptyString","isNumber","isObjectOrArray","isStringObject","isNumberObject","isBooleanObject","isArray","isPlainObject","isNumber","isNonEmptyString","isFunction","isNonEmptyArray","defaultConfig","isPlainObject","isPlainObject","twMergeV2","isFunction","createMessage","getPreciseType","twMergeV3","isString","getPreciseType","isEmptyString","isNonEmptyArray","createMessage"],"sources":["../src/tailwind/class-names/cx.ts","../src/tailwind/tw-merge/_private/validate-props.ts","../src/tailwind/tw-merge/v2/twMergeDefault.ts","../src/tailwind/tw-merge/v3/twMergeDefault.ts","../src/tailwind/class-names/customCn.ts","../src/tailwind/class-names/cn.ts","../src/tailwind/tw-macro/shouldForwardProp.ts"],"sourcesContent":["import { isArray } from \"@/predicates/is/isArray\";\nimport { isNumber } from \"@/predicates/is/isNumber\";\nimport { isStringObject } from \"@/predicates/is/isStringObject\";\nimport { isNumberObject } from \"@/predicates/is/isNumberObject\";\nimport { isBooleanObject } from \"@/predicates/is/isBooleanObject\";\nimport { isObjectOrArray } from \"@/predicates/is/isObjectOrArray\";\nimport { isNonEmptyString } from \"@/predicates/is/isNonEmptyString\";\n\n/** ----------------------------------------------------------\n * * ***Type-Utility: `ClassValue`.***\n * ----------------------------------------------------------\n * **Represents a single valid value that can be converted to a CSS class string.**\n *\n * ---\n * @description\n * - Supports the following types:\n *   - `string` ➔ literal class names (non-empty only).\n *   - `number | bigint` ➔ numeric class names.\n *   - `boolean` ➔ only `true` is considered in objects/arrays.\n *   - `null | undefined` ➔ ignored.\n *   - `ClassObject` ➔ objects where **keys with truthy values** are included.\n *   - `ClassValues` ➔ arrays recursively flattened.\n * - Used internally by ***`cx` utility function*** to process mixed input values.\n *\n * ---\n * @example\n * ```ts\n * const val1: ClassValue = \"button\";\n * // ➔ string\n * const val2: ClassValue = 0;\n * // ➔ number\n * const val3: ClassValue = [\"a\", { b: true }];\n * // ➔ array with object\n * const val4: ClassValue = { d: true, e: false };\n * // ➔ object\n * const val5: ClassValue = new String(\"foo\");\n * // ➔ boxed string\n * const val6: ClassValue = new Number(\"123\");\n * // ➔ boxed number\n * const val7: ClassValue = new Boolean(\"true\");\n * // ➔ boxed boolean\n * ```\n */\nexport type ClassValue =\n  | ClassValues\n  | ClassObject\n  | string\n  | number\n  | bigint\n  | null\n  | boolean\n  | undefined;\n\n/** ----------------------------------------------------------\n * * ***Type-Utility: `ClassObject`.***\n * ----------------------------------------------------------\n * **Represents an object whose keys with truthy values are included in the final class string.**\n *\n * ---\n * @example\n * ```ts\n * const obj: ClassObject = { \"text-red\": true, \"hidden\": false };\n * // ➔ \"text-red\" when processed by cx\n * ```\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type ClassObject = Record<string, any>;\n\n/** ----------------------------------------------------------\n * * ***Type-Utility: `ClassValues`.***\n * ----------------------------------------------------------\n * **Represents an array of {@link ClassValue | `ClassValue's`}, potentially nested.**\n *\n * ---\n * @example\n * ```ts\n * const arr: ClassValues = [\n *   \"a\",\n *   1,\n *   [\"b\", { c: true, d: false }],\n *   { e: 2 }\n * ];\n * ```\n */\nexport type ClassValues = ClassValue[];\n\n/** ----------------------------------------------------------\n * * ***Utility: `toStringValue`.***\n * ----------------------------------------------------------\n *\n * @internal **Converts a `ClassValue` into a single space-separated string suitable for CSS class usage.**\n *\n * ---\n * @description\n * - Arrays are recursively flattened.\n * - Objects include only keys with truthy values.\n * - Skips `null`, `undefined`, and empty strings.\n * - Numbers, strings, and bigint are included as-is.\n * - Boolean `false` is ignored in objects/arrays.\n * - Boxed primitives (`new String()`, `new Number()`, `new Boolean()`) are supported.\n * - Preserves inherited object keys.\n *\n * ---\n * @param {ClassValue} value The mixed value to process.\n *\n * ---\n * @returns {string} A string containing all valid class names.\n *\n * ---\n * @example\n * ```ts\n * toStringValue(\"btn\");\n * // ➔ \"btn\"\n * toStringValue([\"a\", 0, \"b\"]);\n * // ➔ \"a b\"\n * toStringValue({ a: true, b: false, c: 1 });\n * // ➔ \"a c\"\n * toStringValue([\"a\", [\"b\", { c: true, d: false }]]);\n * // ➔ \"a b c\"\n * toStringValue(new String(\"foo\"));\n * // ➔ \"foo\"\n * toStringValue(new Number(42));\n * // ➔ \"42\"\n * toStringValue(new Boolean(true));\n * // ➔ \"true\"\n * toStringValue(new Boolean(false));\n * // ➔ \"\"\n * ```\n */\nfunction toStringValue(value: ClassValue): string {\n  let str = \"\";\n\n  if (isNonEmptyString(value) || isNumber(value)) {\n    str += value;\n  } else if (isObjectOrArray(value)) {\n    if (\n      isStringObject(value) ||\n      isNumberObject(value) ||\n      isBooleanObject(value)\n    ) {\n      const val = value.valueOf();\n      if (val) str += val; // skip falsy\n    } else if (isArray(value)) {\n      for (const item of value) {\n        if (!item) continue; // skip falsy\n        const y = toStringValue(item);\n        if (!y) continue;\n        if (str) str += \" \";\n        str += y;\n      }\n    } else {\n      for (const key in value) {\n        if (!value[key]) continue; // skip falsy\n        if (str) str += \" \";\n        str += key;\n      }\n    }\n  }\n\n  return str;\n}\n\n/** ----------------------------------------------------------\n * * ***Utility: `cx`.***\n * ----------------------------------------------------------\n * **Merge multiple class values into a single, space-separated string suitable for CSS usage.**\n *\n * ---\n * - **Behavior:**\n *     - Supports **nested combinations** of arrays and objects, recursively.\n *     - **Falsy values** are skipped:\n *         - `false`, `null`, `undefined`, empty strings `\"\"` are ignored anywhere.\n *         - Numbers `0` are ignored inside nested arrays/objects.\n *     - **Boxed primitives** are correctly unwrapped to their primitive value.\n *     - **Inherited object keys** are included in the final class string.\n *     - Optimized for **CSS class merging** where conditional inclusion is common.\n *\n * ---\n * @param {ClassValues} values\n *   A list of mixed class values, which can include:\n *   - **Strings** ➔ literal class names.\n *   - **Numbers** ➔ numeric class names.\n *   - **BigInt** ➔ numeric class names larger than JS safe integer limit.\n *   - **Arrays** ➔ recursively flattened, can contain nested arrays or objects.\n *   - **Objects** ➔ include keys whose values are truthy. Inherited keys are also included.\n *   - **Boxed primitives** (`new String()`, `new Number()`, `new Boolean()`) ➔ automatically unwrapped.\n *   - **Falsy values** (`false`, `null`, `undefined`, `\"\"`, `0`) are ignored according to original behavior.\n *\n * ---\n * @returns {string}\n *   A single space-separated string containing all valid class names.\n *\n * ---\n * @example\n * 1. #### Basic string merge:\n *    ```ts\n *    cx(\"btn\", \"btn-primary\");\n *    // ➔ \"btn btn-primary\"\n *    ```\n *    ---\n * 2. #### Mixed arrays and objects:\n *    ```ts\n *    cx(\"a\", [\"b\", { c: true, d: false }], { e: 1, f: 0 }, null, 2);\n *    // ➔ \"a b c e 2\"\n *    ```\n *\n * 3. #### Empty and falsy values are ignored:\n *    ```ts\n *    cx(\"\", null, undefined, false, 0);\n *    // ➔ \"\"\n *    ```\n *    ---\n * 4. #### Nested arrays with objects:\n *    ```ts\n *    cx([\"a\", [\"b\", { c: true, d: false }]]);\n *    // ➔ \"a b c\"\n *    ```\n *    ---\n * 5. #### Boxed primitives are unwrapped:\n *    ```ts\n *    cx(new String(\"foo\"), new Number(42), new Boolean(true), new Number(0), new Boolean(false));\n *    // ➔ \"foo 42 true\"\n *    ```\n *    ---\n * 6. #### Inherited keys from objects are included:\n *    ```ts\n *    const proto = { inherited: true };\n *    const obj = Object.create(proto);\n *    obj.own = true;\n *    cx(obj);\n *    // ➔ \"own inherited\"\n *    ```\n */\nexport function cx(...values: ClassValues): string {\n  let str = \"\";\n\n  for (const value of values) {\n    if (!value) continue; // skip falsy arguments\n    const x = toStringValue(value);\n    if (!x) continue;\n    if (str) str += \" \";\n    str += x;\n  }\n\n  return str;\n}\n","import type { Config as TwConfig } from \"tailwindcss\";\nimport type { ConfigExtension } from \"tailwind-merge-v3\";\n\nimport type { OptionsMergeTwClsV3 } from \"../v3/_private/types\";\n\nimport { isNumber } from \"@/predicates/is/isNumber\";\nimport { isFunction } from \"@/predicates/is/isFunction\";\nimport { isPlainObject } from \"@/predicates/is/isPlainObject\";\nimport { isNonEmptyArray } from \"@/predicates/is/isNonEmptyArray\";\nimport { isNonEmptyString } from \"@/predicates/is/isNonEmptyString\";\n\nexport type TailwindConfig = TwConfig;\n\n/**\n * @internal\n */\ntype TwMergeConfigExt = ConfigExtension<string, string>;\n\n/**\n * @internal\n */\ntype ValidatorTwMergeReturn = {\n  config: TwConfig;\n  override: TwMergeConfigExt[\"override\"];\n  cacheSize: TwMergeConfigExt[\"cacheSize\"];\n  prefix: TwMergeConfigExt[\"prefix\"];\n  experimentalParseClassName?: TwMergeConfigExt[\"experimentalParseClassName\"];\n  theme: NonNullable<NonNullable<TwMergeConfigExt[\"extend\"]>[\"theme\"]>;\n  classGroups: NonNullable<\n    NonNullable<TwMergeConfigExt[\"extend\"]>[\"classGroups\"]\n  >;\n  conflictingClassGroupModifiers: NonNullable<\n    NonNullable<TwMergeConfigExt[\"extend\"]>[\"conflictingClassGroupModifiers\"]\n  >;\n  conflictingClassGroups: NonNullable<\n    NonNullable<TwMergeConfigExt[\"extend\"]>[\"conflictingClassGroups\"]\n  >;\n  orderSensitiveModifiers: NonNullable<\n    NonNullable<TwMergeConfigExt[\"extend\"]>[\"orderSensitiveModifiers\"]\n  >;\n};\n\n/**\n * @internal\n */\nexport const validatorPropsTwMerge = (\n  options: OptionsMergeTwClsV3\n): ValidatorTwMergeReturn => {\n  if (!isPlainObject(options)) options = {};\n  let {\n    config,\n    prefix,\n    extend,\n    override,\n    cacheSize,\n    experimentalParseClassName\n  } = options;\n\n  if (!isPlainObject(config)) config = {};\n  if (!isPlainObject(extend)) extend = {};\n  if (!isPlainObject(override)) override = {};\n  if (!isNumber(cacheSize)) cacheSize = undefined;\n  if (!isNonEmptyString(prefix)) prefix = undefined;\n  if (!isFunction(experimentalParseClassName))\n    experimentalParseClassName = undefined;\n\n  const theme = extend.theme ?? {};\n  const classGroups = extend.classGroups ?? {};\n  const conflictingClassGroupModifiers =\n    extend.conflictingClassGroupModifiers ?? {};\n\n  const conflictingClassGroups = extend.conflictingClassGroups ?? {};\n  const orderSensitiveModifiers =\n    extend.orderSensitiveModifiers &&\n    isNonEmptyArray(extend.orderSensitiveModifiers)\n      ? extend.orderSensitiveModifiers\n      : [];\n\n  return {\n    config,\n    override,\n    cacheSize,\n    prefix,\n    experimentalParseClassName,\n    theme,\n    classGroups,\n    conflictingClassGroupModifiers,\n    conflictingClassGroups,\n    orderSensitiveModifiers\n  };\n};\n","import type { OptionsMergeTwClsV2, TwMergeDefaultFnV2 } from \"./_private/types\";\n\nimport { extendTailwindMerge, getDefaultConfig } from \"tailwind-merge-v2\";\n\nimport { isPlainObject } from \"@/predicates/is/isPlainObject\";\nimport { validatorPropsTwMerge } from \"../_private/validate-props\";\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { customCnVer3 } from \"../../class-names/customCn\";\n\n// Get default Tailwind merge configuration\nconst defaultConfig = getDefaultConfig();\n\n/** -------------------------------------------------------------\n * * ***Customized Tailwind class merger Version 2 with extended rules.***\n * -------------------------------------------------------------\n * **Wraps ***`extendTailwindMerge` from [`twMerge version 2`](https://github.com/dcastil/tailwind-merge/tree/v2.6.0)*** with Tailwind’s default\n * config (_*`getDefaultConfig()` from [`twMerge version 2`](https://github.com/dcastil/tailwind-merge/tree/v2.6.0)*_) to create a **project-ready `twMerge`**.**\n *\n * ---\n * - **When to use it?**\n *     - Your project uses **Tailwind v3**.\n *     - Extend **class groups** (e.g. add `text-shadow`).\n *     - Respect your own **`tailwind.config.ts`** (colors, spacing, fontSize, etc).\n *     - Override or fine-tune **merge behavior**.\n *     - Create a **project-wide `cn` helper** that replaces raw `twMerge`.\n *\n * ---\n * @deprecated ***Still supported for advanced Tailwind merge customization, but significantly slower than native `twMerge` during SSR and hydration because merge rules are extended at runtime, prefer `twMerge` + {@link customCnVer3 | `customCnVer3`} for better performance, this utility may be removed in a future release.***\n *\n * ---\n * @param {OptionsMergeTwClsV2} [options={}]\n *  ***Merge options:***\n *     - `config` – Your Tailwind config (from `tailwind.config.ts`).\n *     - `prefix` - Utility prefix (e.g. `tw-` or `tw`).\n *     - `extend` – Extra merge rules (classGroups, theme, etc).\n *     - `override` – Fully replace rules.\n *     - `cacheSize` – Parsed class cache size.\n *     - `experimentalParseClassName` – Custom classname parser.\n *\n * ---\n * @returns {TwMergeDefaultFnV2}\n * Customized Tailwind class merge function version 3 (same signature as `twMerge`).\n *\n * ---\n * @example\n * 1. #### Default behavior (same as tailwind-merge):\n *    ```ts\n *    import { twMergeDefaultV2 } from \"@rzl-zone/utils-js/tailwind\";\n *\n *    const twMerge = twMergeDefaultV2();\n *\n *    twMerge(\"p-2 p-4\");\n *    // ➔ \"p-4\"\n *    ```\n *    ---\n * 2. #### Extend class groups:\n *    ```ts\n *    import { twMergeDefaultV2 } from \"@rzl-zone/utils-js/tailwind\";\n *\n *    const twMerge2 = twMergeDefaultV2({\n *      extend: {\n *        classGroups: {\n *          shadow: [\"shadow-soft\", \"shadow-hard\"],\n *        },\n *      },\n *    });\n *\n *    twMerge2(\"shadow-soft shadow-hard\");\n *    // ➔ \"shadow-hard\"\n *    ```\n *    ---\n * 3. #### Respect your Tailwind config:\n *    ```ts\n *    import config from \"../tailwind.config\";\n *    import { twMergeDefaultV2 } from \"@rzl-zone/utils-js/tailwind\";\n *\n *    const twMerge3 = twMergeDefaultV2({ config });\n *\n *    twMerge3(\"text-base text-xxs\");\n *    // ➔ \"text-xxs\" (resolved from config)\n *    ```\n *    ---\n * 4. #### Project-wide helper (recommended):\n *    ```ts\n *    import configTwCss from \"../tailwind.config\";\n *    import { customCnV3, twMergeDefaultV2, type ClassValues } from \"@rzl-zone/utils-js/tailwind\";\n *\n *    const customTwMerge = twMergeDefaultV2({\n *      config: configTwCss,\n *      extend: {\n *        classGroups: { shadow: [\"shadow-soft\", \"shadow-hard\"] },\n *      },\n *    });\n *\n *    export const cnApp = (...classes: ClassValues) => {\n *      return customCnV3(customTwMerge, ...classes);\n *    };\n *\n *    // Usage\n *    cnApp(\"p-2 p-4\");\n *    // ➔ \"p-4\"\n *    cnApp(\"shadow-soft shadow-hard\");\n *    // ➔ \"shadow-hard\"\n *    cnApp(\"text-base text-xxs\");\n *    // ➔ \"text-xxs\" (uses config)\n *\n *    // Difference with package-level `cn`\n *    import { cnV3, cnV4 } from \"@rzl-zone/utils-js/tailwind\";\n *\n *    cnV3(\"text-base text-xxs\");\n *    // or\n *    cnV4(\"text-base text-xxs\");\n *    // ➔ \"text-base\" (❌ doesn't know about your config)\n *\n *    cnApp(\"text-base text-xxs\");\n *    // ➔ \"text-xxs\" (✅ respects config)\n *    ```\n */\nexport const twMergeDefaultV2 = (\n  options: OptionsMergeTwClsV2 = {}\n): TwMergeDefaultFnV2 => {\n  if (!isPlainObject(options)) options = {};\n  const {\n    cacheSize,\n    classGroups,\n    config,\n    conflictingClassGroupModifiers,\n    conflictingClassGroups,\n    override,\n    prefix,\n    theme,\n    experimentalParseClassName\n  } = validatorPropsTwMerge(options);\n\n  return extendTailwindMerge<string, string>({\n    prefix: prefix ?? config.prefix,\n    cacheSize: cacheSize || defaultConfig.cacheSize,\n    experimentalParseClassName,\n    override,\n    extend: {\n      conflictingClassGroupModifiers: {\n        ...defaultConfig.conflictingClassGroupModifiers,\n        ...conflictingClassGroupModifiers\n      },\n      theme: { ...defaultConfig.theme, ...theme },\n      conflictingClassGroups: {\n        ...defaultConfig.conflictingClassGroups,\n        ...conflictingClassGroups\n      },\n      classGroups: {\n        ...defaultConfig.classGroups,\n        ...classGroups,\n\n        \"text-shadow\": [\n          \"\",\n          \"-sm\",\n          \"-md\",\n          \"-lg\",\n          \"-xl\",\n          \"-xxl\",\n          \"-none\",\n          \"-default\"\n        ].map((size) => `text-shadow${size}`),\n        \"font-size\": Object.keys({\n          ...(config.theme?.fontSize || {}),\n          ...(config.theme?.extend?.fontSize || {})\n        }).map((size) => `text-${size}`)\n      }\n    }\n  });\n};\n","import type {\n  OptionsMergeTwClsV3,\n  TwMergeDefaultFnV3\n} from \"./_private/types.js\";\n\nimport { extendTailwindMerge, getDefaultConfig } from \"tailwind-merge-v3\";\n\nimport { isPlainObject } from \"@/predicates/is/isPlainObject\";\nimport { validatorPropsTwMerge } from \"../_private/validate-props\";\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { customCnVer4 } from \"../../class-names/customCn\";\n\n// Get default Tailwind merge configuration\nconst defaultConfig = getDefaultConfig();\n\n/** -------------------------------------------------------------\n * * ***Customized Tailwind class merger Version 4 with extended rules.***\n * -------------------------------------------------------------\n * **Wraps ***`extendTailwindMerge` from [`twMerge version 3`](https://github.com/dcastil/tailwind-merge/tree/v3.6.0)*** with Tailwind’s default\n * config (_*`getDefaultConfig()` from [`twMerge version 3`](https://github.com/dcastil/tailwind-merge/tree/v3.6.0)*_) to create a **project-ready `twMerge`**.**\n *\n * ---\n * - **When to use it?**\n *     - Your project uses **Tailwind v4**.\n *     - Extend **class groups** (e.g. add `text-shadow`).\n *     - Respect your own **`tailwind.config.ts`** (colors, spacing, fontSize, etc).\n *     - Override or fine-tune **merge behavior**.\n *     - Create a **project-wide `cn` helper** that replaces raw `twMerge`.\n *\n * ---\n * @deprecated ***Still supported for advanced Tailwind merge customization, but significantly slower than native `twMerge` during SSR and hydration because merge rules are extended at runtime, prefer `twMerge` + {@link customCnVer4 | `customCnVer4`} for better performance, this utility may be removed in a future release.***\n *\n * ---\n * @param {OptionsMergeTwClsV3} [options={}]\n *  ***Merge options:***\n *     - `config` – Your Tailwind config (from `tailwind.config.ts`).\n *     - `prefix` - Utility prefix (e.g. `tw-` or `tw`).\n *     - `extend` – Extra merge rules (classGroups, theme, etc).\n *     - `override` – Fully replace rules.\n *     - `cacheSize` – Parsed class cache size.\n *     - `experimentalParseClassName` – Custom classname parser.\n *\n * ---\n * @returns {TwMergeDefaultFnV3}\n * Customized Tailwind class merge function version 4 (same signature as `twMerge`).\n *\n * ----\n * @example\n * 1. #### Default behavior (same as tailwind-merge):\n *    ```ts\n *    import { twMergeDefaultV3 } from \"@rzl-zone/utils-js/tailwind\";\n *\n *    const twMerge = twMergeDefaultV3();\n *\n *    twMerge(\"p-2 p-4\");\n *    // ➔ \"p-4\"\n *    ```\n *    ---\n * 2. #### Extend class groups:\n *    ```ts\n *    import { twMergeDefaultV3 } from \"@rzl-zone/utils-js/tailwind\";\n *\n *    const twMerge2 = twMergeDefaultV3({\n *      extend: {\n *        classGroups: {\n *          shadow: [\"shadow-soft\", \"shadow-hard\"],\n *        },\n *      },\n *    });\n *\n *    twMerge2(\"shadow-soft shadow-hard\");\n *    // ➔ \"shadow-hard\"\n *    ```\n *    ---\n * 3. #### Respect your Tailwind config:\n *    ```ts\n *    import config from \"../tailwind.config\";\n *    import { twMergeDefaultV3 } from \"@rzl-zone/utils-js/tailwind\";\n *\n *    const twMerge3 = twMergeDefaultV3({ config });\n *\n *    twMerge3(\"text-base text-xxs\");\n *    // ➔ \"text-xxs\" (resolved from config)\n *    ```\n *    ---\n * 4. #### Project-wide helper (recommended):\n *    ```ts\n *    import configTwCss from \"../tailwind.config\";\n *    import { customCnV4, twMergeDefaultV3, type ClassValues } from \"@rzl-zone/utils-js/tailwind\";\n *\n *    const customTwMerge = twMergeDefaultV3({\n *      config: configTwCss,\n *      extend: {\n *        classGroups: { shadow: [\"shadow-soft\", \"shadow-hard\"] },\n *      },\n *    });\n *\n *    export const cnApp = (...classes: ClassValues) => {\n *      return customCnV4(customTwMerge, ...classes);\n *    };\n *\n *    // Usage\n *    cnApp(\"p-2 p-4\");\n *    // ➔ \"p-4\"\n *    cnApp(\"shadow-soft shadow-hard\");\n *    // ➔ \"shadow-hard\"\n *    cnApp(\"text-base text-xxs\");\n *    // ➔ \"text-xxs\" (uses config)\n *\n *    // Difference with package-level `cn`\n *    import { cnV3, cnV4 } from \"@rzl-zone/utils-js/tailwind\";\n *\n *    cnV3(\"text-base text-xxs\");\n *    // or\n *    cnV4(\"text-base text-xxs\");\n *    // ➔ \"text-base\" (❌ doesn't know about your config)\n *\n *    cnApp(\"text-base text-xxs\");\n *    // ➔ \"text-xxs\" (✅ respects config)\n *    ```\n */\nexport const twMergeDefaultV3 = (\n  options: OptionsMergeTwClsV3 = {}\n): TwMergeDefaultFnV3 => {\n  if (!isPlainObject(options)) options = {};\n  const {\n    cacheSize,\n    classGroups,\n    config,\n    conflictingClassGroupModifiers,\n    conflictingClassGroups,\n    orderSensitiveModifiers,\n    override,\n    prefix,\n    theme,\n    experimentalParseClassName\n  } = validatorPropsTwMerge(options);\n\n  return extendTailwindMerge<string, string>({\n    prefix: prefix || config.prefix,\n    cacheSize: cacheSize || defaultConfig.cacheSize,\n    experimentalParseClassName,\n    override,\n    extend: {\n      conflictingClassGroupModifiers: {\n        ...defaultConfig.conflictingClassGroupModifiers,\n        ...conflictingClassGroupModifiers\n      },\n      theme: { ...defaultConfig.theme, ...theme },\n      conflictingClassGroups: {\n        ...defaultConfig.conflictingClassGroups,\n        ...conflictingClassGroups\n      },\n      orderSensitiveModifiers: [\n        ...defaultConfig.orderSensitiveModifiers,\n        ...orderSensitiveModifiers\n      ],\n      classGroups: {\n        ...defaultConfig.classGroups,\n        ...classGroups,\n\n        \"text-shadow\": [\n          \"\",\n          \"-sm\",\n          \"-md\",\n          \"-lg\",\n          \"-xl\",\n          \"-xxl\",\n          \"-none\",\n          \"-default\"\n        ].map((size) => `text-shadow${size}`),\n        \"font-size\": Object.keys({\n          ...(config.theme?.fontSize || {}),\n          ...(config.theme?.extend?.fontSize || {})\n        }).map((size) => `text-${size}`)\n      }\n    }\n  });\n};\n","import type { TwMergeDefaultFnV2 } from \"../tw-merge/v2/_private/types\";\nimport type { TwMergeDefaultFnV3 } from \"../tw-merge/v3/_private/types\";\n\nimport { twMerge as twMergeV2 } from \"tailwind-merge-v2\";\nimport { twMerge as twMergeV3 } from \"tailwind-merge-v3\";\n\nimport { createMessage } from \"@/_private/logger\";\n\nimport { isFunction } from \"@/predicates/is/isFunction\";\nimport { getPreciseType } from \"@/predicates/type/getPreciseType\";\n\nimport { cx, type ClassValues } from \"./cx\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { twMergeDefaultV2 } from \"../tw-merge/v2/twMergeDefault\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { twMergeDefaultV3 } from \"../tw-merge/v3/twMergeDefault\";\n\nexport type { ClassValues };\n\n/** -------------------------------------------------------------\n * * ***High-performance `cn` factory utility (Tailwind `v3`).***\n * -------------------------------------------------------------\n * **Combines class-name values and applies the provided Tailwind merge\n * function using the native [`twMerge`](https://github.com/dcastil/tailwind-merge/tree/v2.6.0) implementation\n * from `tailwind-merge` version 2 for `tailwind version 3`.**\n *\n * ---\n * *This utility is the recommended replacement for deprecated (`customCnV3`) extended\n * runtime merge helpers because it provides significantly better hydration\n * and runtime performance.*\n *\n * ---\n * - **Recommended when:**\n *     - Your project uses **Tailwind v3**.\n *     - You want the fastest possible `cn` utility.\n *     - You need reusable project-wide `cn*` helpers.\n *     - You want predictable Tailwind conflict resolution with minimal overhead.\n *\n * ---\n * - **Performance note:**\n *     - Uses the native `twMergeV2` implementation directly.\n *     - Faster than deprecated extended merge utilities.\n *     - Better suited for SSR and hydration-heavy applications.\n *\n * ---\n * @param {TwMergeDefaultFnV2} customTwMergeV2 - Merge function created via [`twMerge`](https://github.com/dcastil/tailwind-merge/tree/v2.6.0).\n * @param {ClassValues} classes - Class values (`string`, `array`, `object`, `etc`).\n *\n * ---\n * @returns {string} Merged Tailwind class string.\n *\n * ---\n * @example\n * ```ts\n * import { twMerge as twMergeV2 } from \"tailwind-merge\"; // tw-merge (v2) for tailwind version 3\n * import { customCnVer3, type ClassValues } from \"@rzl-zone/utils-js/tailwind\";\n *\n * // 1. Create app-level helper\n * export const cnApp = (...classes: ClassValues) => {\n *   return customCnVer3(twMergeV2, ...classes);\n * };\n *\n * // Usage\n * cnApp(\"p-2\", \"p-4\");\n * // ➔ \"p-4\"\n * cnApp(\"text-sm text-lg\");\n * // ➔ \"text-lg\"\n * cnApp(\"shadow-sm shadow-md\");\n * // ➔ \"shadow-md\"\n * ```\n */\nexport const customCnVer3 = (\n  customTwMergeV2: TwMergeDefaultFnV2 = twMergeV2,\n  ...classes: ClassValues\n): string => {\n  if (!isFunction(customTwMergeV2)) {\n    throw new TypeError(\n      createMessage(\n        \"customCnVer3\",\n        `first Parameter (\\`customTwMergeV2\\`) must be of type \\`function\\`, but received: \\`${getPreciseType(\n          customTwMergeV2\n        )}\\`.`\n      )\n    );\n  }\n\n  return customTwMergeV2(cx(...classes));\n};\n\n/** -------------------------------------------------------------\n * * ***High-performance `cn` factory utility (Tailwind `v4`).***\n * -------------------------------------------------------------\n * **Combines class-name values and applies the provided Tailwind merge\n * function using the native [`twMerge`](https://github.com/dcastil/tailwind-merge/tree/v3.6.0) implementation\n * from `tailwind-merge` version 3 for `tailwind version 4`.**\n *\n * ---\n * *This utility is the recommended replacement for deprecated (`customCnV4`) extended\n * runtime merge helpers because it provides significantly better hydration\n * and runtime performance.*\n *\n * ---\n * - **Recommended when:**\n *     - Your project uses **Tailwind v4**.\n *     - You want the fastest possible `cn` utility.\n *     - You need reusable project-wide `cn*` helpers.\n *     - You want predictable Tailwind conflict resolution with minimal overhead.\n *\n * ---\n * - **Performance note:**\n *     - Uses the native `twMergeV3` implementation directly.\n *     - Faster than deprecated extended merge utilities.\n *     - Better suited for SSR and hydration-heavy applications.\n *\n * ---\n * @param {TwMergeDefaultFnV3} customTwMergeV3 - Merge function created via [`twMerge`](https://github.com/dcastil/tailwind-merge/tree/v3.6.0).\n * @param {ClassValues} classes - Class values (`string`, `array`, `object`, `etc`).\n *\n * ---\n * @returns {string} Merged Tailwind class string.\n *\n * ---\n * @example\n * ```ts\n * import { twMerge as twMergeV3 } from \"tailwind-merge\"; // tw-merge (v3) for tailwind version 4\n * import { customCnVer4, type ClassValues } from \"@rzl-zone/utils-js/tailwind\";\n *\n * // 1. Create app-level helper\n * export const cnApp = (...classes: ClassValues) => {\n *   return customCnVer4(twMergeV3, ...classes);\n * };\n *\n * // Usage\n * cnApp(\"p-2\", \"p-4\");\n * // ➔ \"p-4\"\n * cnApp(\"text-sm text-lg\");\n * // ➔ \"text-lg\"\n * cnApp(\"shadow-sm shadow-md\");\n * // ➔ \"shadow-md\"\n * ```\n */\nexport const customCnVer4 = (\n  customTwMergeV3: TwMergeDefaultFnV3 = twMergeV3,\n  ...classes: ClassValues\n): string => {\n  if (!isFunction(customTwMergeV3)) {\n    throw new TypeError(\n      createMessage(\n        \"customCnVer4\",\n        `first Parameter (\\`customTwMergeV3\\`) must be of type \\`function\\`, but received: \\`${getPreciseType(\n          customTwMergeV3\n        )}\\`.`\n      )\n    );\n  }\n\n  return customTwMergeV3(cx(...classes));\n};\n\n/** -------------------------------------------------------------\n * * ***Factory utility for building a custom `cn` helper (Tailwind `v3`).***\n * -------------------------------------------------------------\n * **Wraps internally function to combines class-name values and applies the provided\n * Tailwind merge function (from {@link twMergeDefaultV2 | `twMergeDefaultV2`}).**\n *\n * ---\n * - **When to use it?**\n *     - Your project uses **Tailwind v3**.\n *     - You extend Tailwind merge rules (`classGroups`, `tailwind.config`).\n *     - You need multiple `cn*` variants across apps/packages.\n *\n * ---\n * @deprecated ***Still supported, but slower during SSR and hydration because it relies on extended runtime merge logic,\n * prefer {@link customCnVer3 | `customCnVer3`}for better performance, this utility may be removed in a future release.***\n *\n * ---\n * @param {TwMergeDefaultFnV2} customTwMergeV2 - Merge function created via {@link twMergeDefaultV2 | `twMergeDefaultV2`}.\n * @param {ClassValues} classes - Class values (`string`, `array`, `object`, `etc`).\n *\n * ---\n * @returns {string} Merged Tailwind class string.\n *\n * ---\n * @example\n * ```ts\n * import tailwindConfig from \"../tailwind.config\";\n * import { twMergeDefaultV2, customCnV3, type ClassValues } from \"@rzl-zone/utils-js/tailwind\";\n *\n * // 1. Create a custom merge function.\n * const myCustomTwMerge = twMergeDefaultV2({\n *   config: tailwindConfig,\n *   extend: {\n *     classGroups: {\n *       \"text-shadow\": [\"text-shadow\", \"text-shadow-sm\", \"text-shadow-md\"],\n *     },\n *   },\n * });\n *\n * // 2. Build your helper using `customCnV3`.\n * export const cnApp = (...classes: ClassValues) => {\n *   return customCnV3(myCustomTwMerge, ...classes);\n * };\n * // Usage\n * cnApp(\"p-2\", \"p-4\");\n * // ➔ \"p-4\"\n * cnApp(\"shadow-sm shadow-md\");\n * // ➔ \"shadow-md\"\n * cnApp(\"text-base text-xxs\");\n * // ➔ \"text-xxs\" (resolved from config)\n * ```\n */\nexport const customCnV3 = (\n  customTwMergeV2: TwMergeDefaultFnV2,\n  ...classes: ClassValues\n): string => {\n  if (!isFunction(customTwMergeV2)) {\n    throw new TypeError(\n      createMessage(\n        \"customCnV3\",\n        `first Parameter (\\`customTwMergeV2\\`) must be of type \\`function\\`, but received: \\`${getPreciseType(\n          customTwMergeV2\n        )}\\`.`\n      )\n    );\n  }\n\n  return customTwMergeV2(cx(...classes));\n};\n\n/** -------------------------------------------------------------\n * * ***Factory utility for building a custom `cn` helper (Tailwind `v4`).***\n * -------------------------------------------------------------\n * **Wraps internally function to combines class-name values and applies the provided\n * Tailwind merge function (from {@link twMergeDefaultV3 | `twMergeDefaultV3`}).**\n *\n * ---\n * - **When to use it?**\n *     - Your project uses **Tailwind v4**.\n *     - You extend Tailwind merge rules (`classGroups`, `tailwind.config`).\n *     - You need multiple `cn*` variants across apps/packages.\n *\n * ---\n * @deprecated ***Still supported, but slower during SSR and hydration because it relies on extended runtime merge logic,\n * prefer {@link customCnVer4 | `customCnVer4`}for better performance, this utility may be removed in a future release.***\n *\n * ---\n * @param {TwMergeDefaultFnV3} customTwMergeV3 - Merge function created via {@link twMergeDefaultV3 | `twMergeDefaultV3`}.\n * @param {ClassValues} classes - Class values (`string`, `array`, `object`, `etc`).\n *\n * ---\n * @returns {string} Merged Tailwind class string.\n *\n * ---\n * @example\n * ```ts\n * import tailwindConfig from \"../tailwind.config\";\n * import { twMergeDefaultV3, customCnV4, type ClassValues } from \"@rzl-zone/utils-js/tailwind\";\n *\n * // 1. Create a custom merge function.\n * const myCustomTwMerge = twMergeDefaultV3({\n *   config: tailwindConfig,\n *   extend: {\n *     classGroups: {\n *       \"text-shadow\": [\"text-shadow\", \"text-shadow-sm\", \"text-shadow-md\"],\n *     },\n *   },\n * });\n *\n * // 2. Build your helper using `customCnV4`.\n * export const cnApp = (...classes: ClassValues) => {\n *   return customCnV4(myCustomTwMerge, ...classes);\n * };\n *\n * // Usage\n * cnApp(\"p-2\", \"p-4\");\n * // ➔ \"p-4\"\n * cnApp(\"shadow-sm shadow-md\");\n * // ➔ \"shadow-md\"\n * cnApp(\"text-base text-xxs\");\n * // ➔ \"text-xxs\" (resolved from config)\n * ```\n */\nexport const customCnV4 = (\n  customTwMergeV3: TwMergeDefaultFnV3,\n  ...classes: ClassValues\n): string => {\n  if (!isFunction(customTwMergeV3)) {\n    throw new TypeError(\n      createMessage(\n        \"customCnV4\",\n        `first Parameter (\\`customTwMergeV3\\`) must be of type \\`function\\`, but received: \\`${getPreciseType(\n          customTwMergeV3\n        )}\\`.`\n      )\n    );\n  }\n\n  return customTwMergeV3(cx(...classes));\n};\n","import { twMerge as twMergeV2 } from \"tailwind-merge-v2\";\nimport { twMerge as twMergeV3 } from \"tailwind-merge-v3\";\n\nimport { cx, type ClassValues } from \"./cx\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { customCnV3, customCnV4 } from \"./customCn\";\nimport { twMergeDefaultV2 } from \"../tw-merge/v2/twMergeDefault\";\nimport { twMergeDefaultV3 } from \"../tw-merge/v3/twMergeDefault\";\n\n/** -------------------------------------------------------------------\n * * ***Combines and merges class utility values into a single normalized\n * string with `Tailwind CSS v3` conflict resolution.***\n * --------------------------------------------------------------------\n * This utility composes {@link cx | `cx`} and [`twMerge`](https://github.com/dcastil/tailwind-merge/tree/v2.6.0) version **2** for ***`tailwind version 3`***:\n * - `cx` handles flexible class inputs (like `clsx`).\n * - `twMerge` resolves Tailwind CSS utility conflicts.\n *\n * ---\n * This provides a complete solution for conditional class composition\n * with deterministic Tailwind merging.\n *\n * ---\n * - **Behavior:**\n *     - Accepts strings, numbers, arrays, and objects.\n *     - Supports deeply nested class structures.\n *     - Ignores falsy values (`false`, `null`, `undefined`, `\"\"`, `0`).\n *     - Includes object keys with truthy values (including inherited keys).\n *     - Unwraps boxed primitives (`new String()`, etc.).\n *     - Resolves Tailwind utility conflicts deterministically.\n *     - Keeps the last conflicting class based on input order.\n *     - Produces a clean, space-normalized class string.\n *\n * ---\n * This utility is a drop-in replacement for `clsx` or `classnames`\n * with built-in Tailwind conflict resolution.\n *\n * ----\n * @param values - A list of mixed class values including strings,\n * numbers, arrays, objects, and conditional expressions.\n *\n * ---\n * @returns A merged and normalized CSS class string.\n *\n * ---\n * @example\n * ```ts\n * cn(\n *   \"p-2\",\n *   isActive && \"bg-blue-500\",\n *   [\"text-sm\", { \"font-bold\": isBold }],\n *   null,\n *   0\n * );\n * // ➔ \"p-2 bg-blue-500 text-sm font-bold\"\n * ```\n *\n * ---\n * @example\n * ```ts\n * cn(\"p-2 p-4\", { \"text-sm\": true, \"text-lg\": true });\n * // ➔ \"p-4 text-lg\"\n * ```\n */\nexport const cnVer3 = (...values: ClassValues): string => {\n  return twMergeV2(cx(...values));\n};\n\n/** -------------------------------------------------------------------\n * * ***Combines and merges class utility values into a single normalized\n * string with `Tailwind CSS v4` conflict resolution.***\n * --------------------------------------------------------------------\n * This utility composes {@link cx | `cx`} and [`twMerge`](https://github.com/dcastil/tailwind-merge/tree/v3.6.0) version **3** for ***`tailwind version 4`***:\n * - `cx` handles flexible class inputs (like `clsx`).\n * - `twMerge` resolves Tailwind CSS utility conflicts.\n *\n * ---\n * This provides a complete solution for conditional class composition\n * with deterministic Tailwind merging.\n *\n * ---\n * - **Behavior:**\n *     - Accepts strings, numbers, arrays, and objects.\n *     - Supports deeply nested class structures.\n *     - Ignores falsy values (`false`, `null`, `undefined`, `\"\"`, `0`).\n *     - Includes object keys with truthy values (including inherited keys).\n *     - Unwraps boxed primitives (`new String()`, etc.).\n *     - Resolves Tailwind utility conflicts deterministically.\n *     - Keeps the last conflicting class based on input order.\n *     - Produces a clean, space-normalized class string.\n *\n * ---\n * This utility is a drop-in replacement for `clsx` or `classnames`\n * with built-in Tailwind conflict resolution.\n *\n * ---\n * @param values - A list of mixed class values including strings,\n * numbers, arrays, objects, and conditional expressions.\n *\n * ---\n * @returns A merged and normalized CSS class string.\n *\n * ---\n * @example\n * ```ts\n * cn(\n *   \"p-2\",\n *   isActive && \"bg-blue-500\",\n *   [\"text-sm\", { \"font-bold\": isBold }],\n *   null,\n *   0\n * );\n * // ➔ \"p-2 bg-blue-500 text-sm font-bold\"\n * ```\n *\n * @example\n * ```ts\n * cn(\"p-2 p-4\", { \"text-sm\": true, \"text-lg\": true });\n * // ➔ \"p-4 text-lg\"\n * ```\n */\nexport const cnVer4 = (...values: ClassValues): string => {\n  return twMergeV3(cx(...values));\n};\n\nconst defaultTwMergeV2 = twMergeDefaultV2();\nconst defaultTwMergeV3 = twMergeDefaultV3();\n\n/** -------------------------------------------------------------\n * * ***Default `cnV3` utility (Tailwind v3).***\n * --------------------------------------------------------------\n * **Combines class-name values and then deduplicates/resolves\n * conflicts using {@link twMergeDefaultV2 | `twMergeDefaultV2`}\n * with **Tailwind v3 default config only**.**\n *\n * ---\n * - **Use this when:**\n *     - Your project uses **Tailwind v3**.\n *     - You need a simple `cn` that works out of the box without a custom config.\n *\n * ---\n * - **Need custom rules?**\n *     - Create a project-wide helper using\n *       {@link twMergeDefaultV2 | `twMergeDefaultV2`} +\n *       {@link customCnV3 | `customCnV3`} (see Example 2).\n *\n * ---\n * @deprecated ***Still supported, but significantly slower during hydration because it uses extended runtime merge logic, prefer {@link cnVer3 | `cnVer3`} for\n * better performance, this utility may be removed in a future release.***\n *\n * ---\n * @param {ClassValues} classes - Class values (`string`, `array`, `object`, `etc`).\n *\n * ---\n * @returns {string} Merged Tailwind class string.\n *\n * ---\n * @example\n * 1. #### Default usage (Tailwind v3):\n *      ```ts\n *      cnV3(\"p-2\", \"p-4\");\n *      // ➔ \"p-4\"\n *\n *      cnV3(\"text-red-500\", { \"text-blue-500\": true });\n *      // ➔ \"text-blue-500\"\n *\n *      cnV3([\"m-2\", [\"m-4\"]], \"m-8\");\n *      // ➔ \"m-8\"\n *      ```\n *      ---\n * 2. #### Custom project-wide usage with Tailwind config:\n *      ```ts\n *      import tailwindConfig from \"../tailwind.config\";\n *      import { twMergeDefaultV2, customCnV3, type ClassValues } from \"@rzl-zone/utils-js/tailwind\";\n *\n *      const cnApp = (...classes: ClassValues) => {\n *        return customCnV3(\n *          twMergeDefaultV2({\n *            config: tailwindConfig,\n *            extend: {\n *              classGroups: {\n *                \"text-shadow\": [\n *                  \"text-shadow\",\n *                  \"text-shadow-sm\",\n *                  \"text-shadow-md\",\n *                ],\n *              },\n *            },\n *          }),\n *          // ...other options classes,\n *        );\n *      };\n *\n *      cnApp(\"p-2 p-4\");\n *      // ➔ \"p-4\"\n *      cnApp(\"shadow-sm shadow-md\");\n *      // ➔ \"shadow-md\"\n *      cnApp(\"text-base text-xxs\");\n *      // ➔ \"text-xxs\" (resolved from config)\n *      ```\n */\nexport const cnV3 = (...classes: ClassValues): string => {\n  return defaultTwMergeV2(cx(...classes));\n};\n\n/** -------------------------------------------------------------\n * * ***Default `cnV4` utility (Tailwind v4).***\n * --------------------------------------------------------------\n * **Combines class-name values and then deduplicates/resolves\n * conflicts using {@link twMergeDefaultV3 | `twMergeDefaultV3`}\n * with **Tailwind v4 default config only**.**\n *\n * ---\n * - **Use this when:**\n *     - Your project uses **Tailwind v4**.\n *     - You need a simple `cn` that works out of the box without a custom config.\n *\n * ---\n * - **Need custom rules?**\n *     - Create a project-wide helper using\n *       {@link twMergeDefaultV3 | `twMergeDefaultV3`} +\n *       {@link customCnV4 | `customCnV4`} (see Example 2).\n *\n * ---\n * @deprecated ***Still supported, but significantly slower during hydration because it uses extended runtime merge logic, prefer {@link cnVer4 | `cnVer4`} for\n * better performance, this utility may be removed in a future release.***\n *\n * ---\n * @param {ClassValues} classes - Class values (`string`, `array`, `object`, `etc`).\n *\n * ---\n * @returns {string} Merged Tailwind class string.\n *\n * ---\n * @example\n * 1. #### Default usage (Tailwind v4):\n *      ```ts\n *      cnV4(\"p-2\", \"p-4\");\n *      // ➔ \"p-4\"\n *\n *      cnV4(\"text-red-500\", { \"text-blue-500\": true });\n *      // ➔ \"text-blue-500\"\n *\n *      cnV4([\"m-2\", [\"m-4\"]], \"m-8\");\n *      // ➔ \"m-8\"\n *      ```\n *      ---\n * 2. #### Custom project-wide usage with Tailwind config:\n *      ```ts\n *      import tailwindConfig from \"../tailwind.config\";\n *      import { twMergeDefaultV3, customCnV4, type ClassValues } from \"@rzl-zone/utils-js/tailwind\";\n *\n *      const cnApp = (...classes: ClassValues) => {\n *        return customCnV4(\n *          twMergeDefaultV3({\n *            config: tailwindConfig,\n *            extend: {\n *              classGroups: {\n *                \"text-shadow\": [\n *                  \"text-shadow\",\n *                  \"text-shadow-sm\",\n *                  \"text-shadow-md\",\n *                ],\n *              },\n *            },\n *          }),\n *          // ...other options classes,\n *        );\n *      };\n *\n *      cnApp(\"p-2 p-4\");\n *      // ➔ \"p-4\"\n *      cnApp(\"shadow-sm shadow-md\");\n *      // ➔ \"shadow-md\"\n *      cnApp(\"text-base text-xxs\");\n *      // ➔ \"text-xxs\" (resolved from config)\n *      ```\n */\nexport const cnV4 = (...classes: ClassValues): string => {\n  return defaultTwMergeV3(cx(...classes));\n};\n","import type { Stringify } from \"@rzl-zone/ts-types-plus\";\n\nimport { createMessage } from \"@/_private/logger\";\n\nimport { isString } from \"@/predicates/is/isString\";\nimport { isEmptyString } from \"@/predicates/is/isEmptyString\";\nimport { getPreciseType } from \"@/predicates/type/getPreciseType\";\nimport { isNonEmptyArray } from \"@/predicates/is/isNonEmptyArray\";\n\nimport { assertIsArray } from \"@/assertions/objects/assertIsArray\";\n\n/** ----------------------------------------------------------\n * * ***Utility: `shouldForwardProp`.***\n * ----------------------------------------------------------\n * **Creates a helper for styled-components `shouldForwardProp`.**\n *\n * ---\n * @description\n * 1. Returns a **predicate function** that determines whether a given prop\n * should be forwarded to the DOM.\n * 2. Useful for filtering out internal props (e.g., `$size`, `$active`)\n * so they don't become invalid HTML attributes.\n *\n * ---\n * - **Behavior:**\n *     - Accepts a strict tuple of **string keys** to exclude from forwarding.\n *     - Every key is validated as a **non-empty string** at runtime.\n *     - Throws a `TypeError` if:\n *       - `props` is not an array, or any item is not a non-empty string.\n *     - Automatically coerces the tested prop name to string for matching.\n *\n * ---\n * @template CustomProps\n *   The component props type to validate against.\n *\n * ---\n * @param {readonly Stringify<keyof CustomProps>[]}\n *   props\n *   The list of prop names (keys of `CustomProps`) to exclude from forwarding.\n *\n * ---\n * @returns {(propName: keyof CustomProps | ({} & string)) => boolean}\n *   A function that receives a prop name and returns:\n *   - `true`  ➔ the prop **will** be forwarded to the DOM.\n *   - `false` ➔ the prop **will not** be forwarded.\n *\n * ---\n * @throws **{@link TypeError | `TypeError`}**\n *   when:\n *   - `props` is not an array, or\n *   - any item is not a non-empty string.\n *\n * ---\n * @example\n * 1. #### Basic usage:\n *      ```ts\n *      type Props = { $size: string; color: string; visible: boolean };\n *      const filter = shouldForwardProp<Props>([\"$size\"]);\n *\n *      filter(\"$size\");\n *      // ➔ false (blocked).\n *      filter(\"color\");\n *      // ➔ true  (forwarded).\n *      filter(\"visible\");\n *      // ➔ true  (forwarded).\n *      ```\n *      ---\n * 2. #### With styled-components:\n *      ```ts\n *      type CustomProps = { $internal: boolean; public: string; another: boolean };\n *\n *      styled.div.withConfig({\n *        shouldForwardProp: shouldForwardProp<CustomProps>([\"$internal\"])\n *      });\n *      ```\n */\nexport const shouldForwardProp = <CustomProps extends Record<string, unknown>>(\n  props: readonly Stringify<keyof CustomProps>[]\n): ((propName: keyof CustomProps | ({} & string)) => boolean) => {\n  assertIsArray(props, {\n    message: ({ currentType, validType }) =>\n      errorMsg(\n        `First parameter (\\`props\\`) must be of type \\`${validType}\\`, but received: \\`${currentType}\\`.`\n      )\n  });\n\n  const invalidItems: { index: number; reason: string }[] = [];\n\n  props.forEach((p, idx) => {\n    if (!isString(p)) {\n      invalidItems.push({\n        index: idx,\n        reason: `Expected a non-empty string, but received ${getPreciseType(p, {\n          formatCase: \"toPascalCaseSpace\"\n        })}.`\n      });\n    } else if (isEmptyString(p)) {\n      invalidItems.push({\n        index: idx,\n        reason: \"Expected a non-empty string, but received EmptyString.\"\n      });\n    }\n  });\n\n  if (isNonEmptyArray(invalidItems)) {\n    const maxWidth = Math.max(\n      ...invalidItems.map((item) => String(item.index).length)\n    );\n\n    const details = invalidItems\n      .map(\n        (item) =>\n          `• [Index ${String(item.index).padStart(maxWidth, \"0\")}] ${item.reason}`\n      )\n      .join(\"\\n\");\n\n    throw new TypeError(\n      errorMsg(\n        `First parameter (\\`props\\`) contains invalid entries:\\n${details}`\n      )\n    );\n  }\n\n  return (propName): boolean => {\n    return !props.map(String).includes(String(propName));\n  };\n};\n\n/**\n * @internal ***`Not part of the public API.`***\n */\nconst errorMsg = (msg: string) => createMessage(\"shouldForwardProp\", msg);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiIA,SAAS,cAAc,OAA2B;CAChD,IAAI,MAAM;CAEV,IAAIA,gCAAiB,KAAK,KAAKC,0BAAS,KAAK,GAC3C,OAAO;MACF,IAAIC,+BAAgB,KAAK,GAC9B,IACEC,8BAAe,KAAK,KACpBC,8BAAe,KAAK,KACpBC,+BAAgB,KAAK,GACrB;EACA,MAAM,MAAM,MAAM,QAAQ;EAC1B,IAAI,KAAK,OAAO;CAClB,OAAO,IAAIC,uBAAQ,KAAK,GACtB,KAAK,MAAM,QAAQ,OAAO;EACxB,IAAI,CAAC,MAAM;EACX,MAAM,IAAI,cAAc,IAAI;EAC5B,IAAI,CAAC,GAAG;EACR,IAAI,KAAK,OAAO;EAChB,OAAO;CACT;MAEA,KAAK,MAAM,OAAO,OAAO;EACvB,IAAI,CAAC,MAAM,MAAM;EACjB,IAAI,KAAK,OAAO;EAChB,OAAO;CACT;CAIJ,OAAO;AACT;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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