import { A as caseInsensitive, C as whitespace, D as Join, E as wordChar, F as unicode, I as withIndices, M as global, N as multiline, O as UnionToTuple, P as sticky, S as tab, T as wordBoundary, _ as letter, a as InputSource, b as not, c as MapToGroups, d as carriageReturn, f as char, g as exactly, h as digit, i as StringCapturedBy, j as dotAll, k as Flag, l as Input$1, m as charNotIn, n as MagicRegExpMatchArray, o as JoinValues, p as charIn, r as MapToStringCapturedBy, u as anyOf, v as linefeed, w as word, x as oneOrMore, y as maybe } from "./magic-regexp-KJeJieb-.cjs"; import { MatchAllRegExp, MatchRegExp, ParseRegExp, RegExpMatchResult, ReplaceWithRegExp, spreadRegExpIterator, spreadRegExpMatchArray } from "type-level-regexp/regexp"; //#region src/further-magic.d.ts declare const NamedGroupsS: unique symbol; declare const ValueS: unique symbol; declare const FlagsS: unique symbol; export type MagicRegExp = RegExp & { [NamedGroupsS]: NamedGroups; [ValueS]: Value; [FlagsS]: Flags; }; export declare const createRegExp: { /** Create Magic RegExp from Input helpers and string (string will be sanitized) */ (...inputs: Inputs): MagicRegExp<`/${JoinValues}/`, MapToGroups, []>; extends (infer F extends Flag[]) ? F : never>(...inputs: [...Inputs, [...Flags] | string | Set]): MagicRegExp<`/${JoinValues}/${Join}`, MapToGroups, Flags>; }; declare global { interface String { match(this: InputString, regexp: MagicRegExp<`/${RegExpPattern}/${Join}`, string, Flags>): MatchRegExp, Flag[] extends Flags ? never : Flags[number]>; /** @deprecated String.matchAll requires global flag to be set. */ matchAll[]>>(regexp: R): never; matchAll(this: InputString, regexp: MagicRegExp<`/${RegExpPattern}/${Join}`, string, Flags>): MatchAllRegExp, Flag[] extends Flags ? never : Flags[number]>; /** @deprecated String.matchAll requires global flag to be set. */ matchAll>(regexp: R): never; replace, MatchResult = MatchRegExp, Match extends any[] = MatchResult extends RegExpMatchResult<{ matched: infer MatchArray extends any[]; namedCaptures: [string, any]; input: infer Input extends string; restInput: string | undefined; }, { index: infer Index extends number; groups: infer Groups; input: string; keys: (...arg: any) => any; }> ? [...MatchArray, Index, Input, Groups] : never>(this: InputString, regexp: MagicRegExp<`/${RegExpPattern}/${Join}`, string, Flags>, replaceValue: ReplaceValue | ((...match: Match) => ReplaceValue)): any[] extends RegExpParsedAST ? never : ReplaceWithRegExp; /** @deprecated String.replaceAll requires global flag to be set. */ replaceAll>(searchValue: R, replaceValue: string | ((substring: string, ...args: any[]) => string)): never; /** @deprecated String.replaceAll requires global flag to be set. */ replaceAll[]>>(searchValue: R, replaceValue: string | ((substring: string, ...args: any[]) => string)): never; } } //#endregion export { Flag, type Input$1 as Input, MagicRegExpMatchArray, MapToStringCapturedBy, StringCapturedBy, anyOf, carriageReturn, caseInsensitive, char, charIn, charNotIn, digit, dotAll, exactly, global, letter, linefeed, maybe, multiline, not, oneOrMore, spreadRegExpIterator, spreadRegExpMatchArray, sticky, tab, unicode, whitespace, withIndices, word, wordBoundary, wordChar };