{"version":3,"file":"strings.cjs","names":["removeAccents"],"sources":["../../src/utils/strings.ts"],"sourcesContent":["import removeAccents from 'remove-accents';\n\n/**\n * All unicode characters that we consider \"dash-like\":\n * - `\\u007e`: ~ (tilde)\n * - `\\u00ad`: ­ (soft hyphen)\n * - `\\u2053`: ⁓ (swung dash)\n * - `\\u207b`: ⁻ (superscript minus)\n * - `\\u208b`: ₋ (subscript minus)\n * - `\\u2212`: − (minus sign)\n * - `\\\\p{Pd}`: any other Unicode dash character\n */\nconst ALL_UNICODE_DASH_CHARACTERS = new RegExp(\n\t/[\\u007e\\u00ad\\u2053\\u207b\\u208b\\u2212\\p{Pd}]/gu\n);\n\nexport const normalizeTextString = ( value: string ): string => {\n\treturn removeAccents( value )\n\t\t.normalize( 'NFKC' )\n\t\t.toLocaleLowerCase()\n\t\t.replace( ALL_UNICODE_DASH_CHARACTERS, '-' );\n};\n\n/**\n * Escapes the RegExp special characters.\n *\n * @param string Input string.\n *\n * @return Regex-escaped string.\n */\nexport function escapeRegExp( string: string ): string {\n\treturn string.replace( /[\\\\^$.*+?()[\\]{}|]/g, '\\\\$&' );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,MAAM,8CAA8B,IAAI,OACvC,gDACD;AAEA,MAAa,uBAAwB,UAA2B;CAC/D,QAAA,GAAOA,eAAAA,QAAAA,CAAe,KAAM,CAAC,CAC3B,UAAW,MAAO,CAAC,CACnB,kBAAkB,CAAC,CACnB,QAAS,6BAA6B,GAAI;AAC7C;;;;;;;;AASA,SAAgB,aAAc,QAAyB;CACtD,OAAO,OAAO,QAAS,uBAAuB,MAAO;AACtD"}