@adguard/agtree 4.0.1 → 4.0.3

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.
Files changed (284) hide show
  1. package/README.md +4 -3
  2. package/dist/ast-utils/clone.js +12 -8
  3. package/dist/ast-utils/modifiers.js +13 -11
  4. package/dist/ast-utils/network-rules.js +10 -9
  5. package/dist/ast-utils/scriptlets.js +20 -18
  6. package/dist/common/abp-snippet-injection-body-common.js +1 -1
  7. package/dist/common/agent-common.js +1 -1
  8. package/dist/common/ubo-html-filtering-body-common.js +1 -1
  9. package/dist/common/ubo-selector-common.js +1 -1
  10. package/dist/compatibility-tables/base.js +7 -6
  11. package/dist/compatibility-tables/compatibility-table-data.js +1 -1
  12. package/dist/compatibility-tables/modifiers.js +4 -3
  13. package/dist/compatibility-tables/platforms.js +1 -1
  14. package/dist/compatibility-tables/redirects.js +4 -4
  15. package/dist/compatibility-tables/schemas/base.js +2 -2
  16. package/dist/compatibility-tables/schemas/modifier.js +4 -4
  17. package/dist/compatibility-tables/schemas/platform.js +3 -2
  18. package/dist/compatibility-tables/schemas/redirect.js +1 -1
  19. package/dist/compatibility-tables/schemas/resource-type.js +1 -1
  20. package/dist/compatibility-tables/schemas/scriptlet.js +1 -1
  21. package/dist/compatibility-tables/scriptlets.js +2 -2
  22. package/dist/compatibility-tables/utils/platform-helpers.js +6 -4
  23. package/dist/compatibility-tables/utils/resource-type-helpers.js +1 -1
  24. package/dist/compatibility-tables/utils/zod-camelcase.js +3 -3
  25. package/dist/converter/base-interfaces/base-converter.js +22 -16
  26. package/dist/converter/base-interfaces/conversion-result.js +15 -11
  27. package/dist/converter/base-interfaces/rule-converter-base.js +19 -13
  28. package/dist/converter/comment/index.js +11 -9
  29. package/dist/converter/cosmetic/css.js +12 -10
  30. package/dist/converter/cosmetic/element-hiding.js +12 -10
  31. package/dist/converter/cosmetic/header-removal.js +16 -13
  32. package/dist/converter/cosmetic/html.js +107 -20
  33. package/dist/converter/cosmetic/index.js +28 -24
  34. package/dist/converter/cosmetic/rule-modifiers/adg.js +15 -12
  35. package/dist/converter/cosmetic/rule-modifiers/ubo.js +22 -19
  36. package/dist/converter/cosmetic/scriptlet.js +26 -22
  37. package/dist/converter/css/index.js +13 -11
  38. package/dist/converter/data/css.js +8 -8
  39. package/dist/converter/filter-list.js +12 -10
  40. package/dist/converter/index.js +1 -1
  41. package/dist/converter/misc/network-rule-modifier.js +20 -16
  42. package/dist/converter/network/index.js +16 -12
  43. package/dist/converter/raw-filter-list.js +12 -10
  44. package/dist/converter/raw-rule.js +14 -12
  45. package/dist/converter/rule.js +17 -13
  46. package/dist/errors/adblock-syntax-error.js +1 -1
  47. package/dist/errors/not-implemented-error.js +2 -2
  48. package/dist/errors/rule-conversion-error.js +2 -2
  49. package/dist/generator/base-generator.js +1 -1
  50. package/dist/generator/comment/agent-comment-generator.js +4 -3
  51. package/dist/generator/comment/agent-generator.js +5 -4
  52. package/dist/generator/comment/comment-rule-generator.js +6 -5
  53. package/dist/generator/comment/config-comment-generator.js +5 -4
  54. package/dist/generator/comment/hint-comment-generator.js +5 -4
  55. package/dist/generator/comment/hint-generator.js +4 -3
  56. package/dist/generator/comment/metadata-comment-generator.js +3 -2
  57. package/dist/generator/comment/pre-processor-comment-generator.js +6 -5
  58. package/dist/generator/comment/simple-comment-generator.js +3 -2
  59. package/dist/generator/cosmetic/cosmetic-rule-body-generator.js +13 -11
  60. package/dist/generator/cosmetic/cosmetic-rule-generator.js +5 -4
  61. package/dist/generator/cosmetic/cosmetic-rule-pattern-generator.js +7 -5
  62. package/dist/generator/cosmetic/html-filtering-body/adg-html-filtering-body-generator.js +3 -3
  63. package/dist/generator/cosmetic/html-filtering-body/html-filtering-body-generator.js +1 -1
  64. package/dist/generator/cosmetic/html-filtering-body/ubo-html-filtering-body-generator.js +2 -2
  65. package/dist/generator/cosmetic/scriptlet-body/abp-snippet-injection-body-generator.js +7 -5
  66. package/dist/generator/cosmetic/scriptlet-body/adg-scriptlet-injection-body-generator.js +7 -5
  67. package/dist/generator/cosmetic/scriptlet-body/ubo-scriptlet-injection-body-generator.js +8 -6
  68. package/dist/generator/cosmetic/selector/attribute-selector-generator.js +2 -2
  69. package/dist/generator/cosmetic/selector/class-selector-generator.js +1 -1
  70. package/dist/generator/cosmetic/selector/complex-selector-generator.js +4 -4
  71. package/dist/generator/cosmetic/selector/id-selector-generator.js +1 -1
  72. package/dist/generator/cosmetic/selector/pseudo-class-selector-generator.js +1 -1
  73. package/dist/generator/cosmetic/selector/selector-combinator-generator.js +1 -1
  74. package/dist/generator/cosmetic/selector/selector-list-generator.js +1 -1
  75. package/dist/generator/cosmetic/selector/type-selector-generator.js +1 -1
  76. package/dist/generator/css/adg-css-injection-generator.js +5 -1
  77. package/dist/generator/filterlist-generator.js +5 -4
  78. package/dist/generator/index.js +1 -1
  79. package/dist/generator/misc/domain-list-generator.js +1 -1
  80. package/dist/generator/misc/list-items-generator.js +5 -3
  81. package/dist/generator/misc/logical-expression-generator.js +5 -4
  82. package/dist/generator/misc/modifier-generator.js +4 -3
  83. package/dist/generator/misc/modifier-list-generator.js +5 -4
  84. package/dist/generator/misc/parameter-list-generator.js +6 -5
  85. package/dist/generator/misc/value-generator.js +2 -1
  86. package/dist/generator/network/host-rule-generator.js +2 -1
  87. package/dist/generator/network/network-rule-generator.js +2 -1
  88. package/dist/generator/rule-generator.js +6 -4
  89. package/dist/index.js +1 -2
  90. package/dist/nodes/index.js +1 -1
  91. package/dist/package.json.js +2 -2
  92. package/dist/parser/base-parser.js +1 -1
  93. package/dist/parser/comment/agent-comment-parser.js +11 -9
  94. package/dist/parser/comment/agent-parser.js +12 -9
  95. package/dist/parser/comment/comment-parser.js +8 -7
  96. package/dist/parser/comment/config-comment-parser.js +9 -6
  97. package/dist/parser/comment/hint-comment-parser.js +17 -12
  98. package/dist/parser/comment/hint-parser.js +10 -7
  99. package/dist/parser/comment/metadata-comment-parser.js +9 -7
  100. package/dist/parser/comment/preprocessor-parser.js +14 -11
  101. package/dist/parser/comment/simple-comment-parser.js +5 -2
  102. package/dist/parser/cosmetic/cosmetic-rule-parser.js +29 -25
  103. package/dist/parser/cosmetic/html-filtering-body/adg-html-filtering-body-parser.js +3 -3
  104. package/dist/parser/cosmetic/html-filtering-body/html-filtering-body-parser.js +4 -4
  105. package/dist/parser/cosmetic/html-filtering-body/ubo-html-filtering-body-parser.js +7 -7
  106. package/dist/parser/cosmetic/scriptlet-body/abp-snippet-injection-body-parser.js +12 -9
  107. package/dist/parser/cosmetic/scriptlet-body/adg-scriptlet-injection-body-parser.js +12 -9
  108. package/dist/parser/cosmetic/scriptlet-body/ubo-scriptlet-injection-body-parser.js +11 -8
  109. package/dist/parser/cosmetic/selector/handlers/attribute-selector-handler.js +1 -1
  110. package/dist/parser/cosmetic/selector/handlers/class-selector-handler.js +1 -1
  111. package/dist/parser/cosmetic/selector/handlers/complex-selector-handler.js +1 -1
  112. package/dist/parser/cosmetic/selector/handlers/compound-selector-handler.js +2 -2
  113. package/dist/parser/cosmetic/selector/handlers/id-selector-handler.js +1 -1
  114. package/dist/parser/cosmetic/selector/handlers/pseudo-class-selector-handler.js +5 -3
  115. package/dist/parser/cosmetic/selector/handlers/type-selector-handler.js +1 -1
  116. package/dist/parser/cosmetic/selector/selector-list-parser.js +7 -7
  117. package/dist/parser/css/adg-css-injection-parser.js +4 -3
  118. package/dist/parser/css/balancing.js +22 -18
  119. package/dist/parser/css/constants.js +1 -1
  120. package/dist/parser/css/css-token-stream.js +15 -4
  121. package/dist/parser/css/ubo-selector-parser.js +8 -4
  122. package/dist/parser/filterlist-parser.js +8 -5
  123. package/dist/parser/index.js +1 -1
  124. package/dist/parser/misc/app-list-parser.js +4 -3
  125. package/dist/parser/misc/domain-list-parser.js +8 -6
  126. package/dist/parser/misc/list-items-parser.js +8 -6
  127. package/dist/parser/misc/logical-expression-parser.js +25 -18
  128. package/dist/parser/misc/method-list-parser.js +4 -3
  129. package/dist/parser/misc/modifier-list.js +3 -3
  130. package/dist/parser/misc/modifier-parser.js +5 -4
  131. package/dist/parser/misc/parameter-list-parser.js +6 -5
  132. package/dist/parser/misc/stealth-option-list-parser.js +4 -3
  133. package/dist/parser/misc/ubo-parameter-list-parser.js +10 -9
  134. package/dist/parser/misc/value-parser.js +2 -2
  135. package/dist/parser/network/host-rule-parser.js +15 -7
  136. package/dist/parser/network/network-rule-parser.js +11 -9
  137. package/dist/parser/options.js +1 -1
  138. package/dist/parser/rule-parser.js +11 -7
  139. package/dist/types/ast-utils/clone.d.ts +12 -8
  140. package/dist/types/ast-utils/filter-list.d.ts +5 -4
  141. package/dist/types/ast-utils/modifiers.d.ts +11 -9
  142. package/dist/types/ast-utils/network-rules.d.ts +8 -7
  143. package/dist/types/ast-utils/scriptlets.d.ts +19 -17
  144. package/dist/types/compatibility-tables/base.d.ts +6 -5
  145. package/dist/types/compatibility-tables/redirects.d.ts +1 -1
  146. package/dist/types/compatibility-tables/schemas/platform.d.ts +1 -0
  147. package/dist/types/compatibility-tables/utils/platform-helpers.d.ts +5 -3
  148. package/dist/types/compatibility-tables/utils/zod-camelcase.d.ts +3 -3
  149. package/dist/types/converter/base-interfaces/base-converter.d.ts +21 -15
  150. package/dist/types/converter/base-interfaces/conversion-result.d.ts +20 -16
  151. package/dist/types/converter/base-interfaces/rule-converter-base.d.ts +19 -13
  152. package/dist/types/converter/comment/index.d.ts +9 -7
  153. package/dist/types/converter/cosmetic/css.d.ts +9 -7
  154. package/dist/types/converter/cosmetic/element-hiding.d.ts +9 -7
  155. package/dist/types/converter/cosmetic/header-removal.d.ts +10 -7
  156. package/dist/types/converter/cosmetic/html.d.ts +29 -9
  157. package/dist/types/converter/cosmetic/index.d.ts +14 -10
  158. package/dist/types/converter/cosmetic/rule-modifiers/adg.d.ts +9 -6
  159. package/dist/types/converter/cosmetic/rule-modifiers/ubo.d.ts +9 -6
  160. package/dist/types/converter/cosmetic/scriptlet.d.ts +14 -10
  161. package/dist/types/converter/css/index.d.ts +9 -7
  162. package/dist/types/converter/data/css.d.ts +1 -1
  163. package/dist/types/converter/filter-list.d.ts +10 -8
  164. package/dist/types/converter/index.d.ts +1 -1
  165. package/dist/types/converter/misc/network-rule-modifier.d.ts +13 -9
  166. package/dist/types/converter/network/index.d.ts +15 -11
  167. package/dist/types/converter/raw-filter-list.d.ts +8 -6
  168. package/dist/types/converter/raw-rule.d.ts +8 -6
  169. package/dist/types/converter/rule.d.ts +14 -10
  170. package/dist/types/errors/not-implemented-error.d.ts +1 -1
  171. package/dist/types/errors/rule-conversion-error.d.ts +1 -1
  172. package/dist/types/generator/comment/agent-comment-generator.d.ts +3 -2
  173. package/dist/types/generator/comment/agent-generator.d.ts +4 -3
  174. package/dist/types/generator/comment/comment-rule-generator.d.ts +3 -2
  175. package/dist/types/generator/comment/config-comment-generator.d.ts +4 -3
  176. package/dist/types/generator/comment/hint-comment-generator.d.ts +4 -3
  177. package/dist/types/generator/comment/hint-generator.d.ts +3 -2
  178. package/dist/types/generator/comment/metadata-comment-generator.d.ts +1 -0
  179. package/dist/types/generator/comment/pre-processor-comment-generator.d.ts +3 -2
  180. package/dist/types/generator/comment/simple-comment-generator.d.ts +2 -1
  181. package/dist/types/generator/cosmetic/cosmetic-rule-body-generator.d.ts +7 -5
  182. package/dist/types/generator/cosmetic/cosmetic-rule-generator.d.ts +3 -2
  183. package/dist/types/generator/cosmetic/cosmetic-rule-pattern-generator.d.ts +4 -2
  184. package/dist/types/generator/cosmetic/html-filtering-body/adg-html-filtering-body-generator.d.ts +1 -1
  185. package/dist/types/generator/cosmetic/html-filtering-body/html-filtering-body-generator.d.ts +1 -1
  186. package/dist/types/generator/cosmetic/html-filtering-body/ubo-html-filtering-body-generator.d.ts +2 -2
  187. package/dist/types/generator/cosmetic/scriptlet-body/abp-snippet-injection-body-generator.d.ts +5 -3
  188. package/dist/types/generator/cosmetic/scriptlet-body/adg-scriptlet-injection-body-generator.d.ts +5 -3
  189. package/dist/types/generator/cosmetic/scriptlet-body/ubo-scriptlet-injection-body-generator.d.ts +7 -5
  190. package/dist/types/generator/css/adg-css-injection-generator.d.ts +4 -0
  191. package/dist/types/generator/css/ubo-selector-generator.d.ts +4 -3
  192. package/dist/types/generator/filterlist-generator.d.ts +3 -2
  193. package/dist/types/generator/misc/list-items-generator.d.ts +4 -2
  194. package/dist/types/generator/misc/logical-expression-generator.d.ts +4 -3
  195. package/dist/types/generator/misc/modifier-generator.d.ts +3 -2
  196. package/dist/types/generator/misc/modifier-list-generator.d.ts +4 -3
  197. package/dist/types/generator/misc/parameter-list-generator.d.ts +5 -4
  198. package/dist/types/generator/misc/value-generator.d.ts +1 -0
  199. package/dist/types/generator/network/host-rule-generator.d.ts +1 -0
  200. package/dist/types/generator/network/network-rule-generator.d.ts +1 -0
  201. package/dist/types/generator/rule-generator.d.ts +5 -3
  202. package/dist/types/index.d.ts +1 -2
  203. package/dist/types/nodes/index.d.ts +55 -54
  204. package/dist/types/parser/comment/agent-comment-parser.d.ts +5 -3
  205. package/dist/types/parser/comment/agent-parser.d.ts +7 -4
  206. package/dist/types/parser/comment/comment-parser.d.ts +5 -3
  207. package/dist/types/parser/comment/config-comment-parser.d.ts +5 -2
  208. package/dist/types/parser/comment/hint-comment-parser.d.ts +11 -6
  209. package/dist/types/parser/comment/hint-parser.d.ts +6 -3
  210. package/dist/types/parser/comment/metadata-comment-parser.d.ts +5 -3
  211. package/dist/types/parser/comment/preprocessor-parser.d.ts +9 -6
  212. package/dist/types/parser/comment/simple-comment-parser.d.ts +3 -0
  213. package/dist/types/parser/cosmetic/cosmetic-rule-parser.d.ts +9 -6
  214. package/dist/types/parser/cosmetic/html-filtering-body/adg-html-filtering-body-parser.d.ts +3 -3
  215. package/dist/types/parser/cosmetic/html-filtering-body/html-filtering-body-parser.d.ts +4 -4
  216. package/dist/types/parser/cosmetic/html-filtering-body/ubo-html-filtering-body-parser.d.ts +4 -4
  217. package/dist/types/parser/cosmetic/scriptlet-body/abp-snippet-injection-body-parser.d.ts +8 -5
  218. package/dist/types/parser/cosmetic/scriptlet-body/adg-scriptlet-injection-body-parser.d.ts +9 -6
  219. package/dist/types/parser/cosmetic/scriptlet-body/ubo-scriptlet-injection-body-parser.d.ts +8 -5
  220. package/dist/types/parser/cosmetic/selector/context.d.ts +2 -2
  221. package/dist/types/parser/cosmetic/selector/selector-list-parser.d.ts +2 -2
  222. package/dist/types/parser/css/adg-css-injection-parser.d.ts +1 -0
  223. package/dist/types/parser/css/balancing.d.ts +17 -12
  224. package/dist/types/parser/css/css-token-stream.d.ts +11 -0
  225. package/dist/types/parser/css/ubo-selector-parser.d.ts +3 -0
  226. package/dist/types/parser/filterlist-parser.d.ts +5 -2
  227. package/dist/types/parser/misc/app-list-parser.d.ts +1 -0
  228. package/dist/types/parser/misc/domain-list-parser.d.ts +5 -3
  229. package/dist/types/parser/misc/list-items-parser.d.ts +5 -3
  230. package/dist/types/parser/misc/logical-expression-parser.d.ts +9 -5
  231. package/dist/types/parser/misc/method-list-parser.d.ts +1 -0
  232. package/dist/types/parser/misc/modifier-list.d.ts +2 -1
  233. package/dist/types/parser/misc/modifier-parser.d.ts +2 -1
  234. package/dist/types/parser/misc/parameter-list-parser.d.ts +3 -2
  235. package/dist/types/parser/misc/stealth-option-list-parser.d.ts +1 -0
  236. package/dist/types/parser/misc/ubo-parameter-list-parser.d.ts +2 -1
  237. package/dist/types/parser/misc/value-parser.d.ts +1 -1
  238. package/dist/types/parser/network/host-rule-parser.d.ts +10 -2
  239. package/dist/types/parser/network/network-rule-parser.d.ts +5 -3
  240. package/dist/types/parser/options.d.ts +1 -1
  241. package/dist/types/parser/rule-parser.d.ts +6 -2
  242. package/dist/types/tokenizer/tokenizer.d.ts +2 -2
  243. package/dist/types/utils/adblockers.d.ts +9 -6
  244. package/dist/types/utils/clone.d.ts +4 -3
  245. package/dist/types/utils/constants.d.ts +1 -1
  246. package/dist/types/utils/cosmetic-rule-separator.d.ts +13 -10
  247. package/dist/types/utils/deep-freeze.d.ts +4 -4
  248. package/dist/types/utils/domain.d.ts +3 -2
  249. package/dist/types/utils/logical-expression.d.ts +9 -5
  250. package/dist/types/utils/multi-value-map.d.ts +3 -3
  251. package/dist/types/utils/position-provider.d.ts +3 -2
  252. package/dist/types/utils/quotes.d.ts +48 -42
  253. package/dist/types/utils/regexp.d.ts +24 -17
  254. package/dist/types/utils/string.d.ts +135 -103
  255. package/dist/types/utils/type-guards.d.ts +1 -0
  256. package/dist/types/validator/helpers.d.ts +1 -1
  257. package/dist/types/validator/index.d.ts +3 -3
  258. package/dist/types/version.d.ts +1 -1
  259. package/dist/utils/adblockers.js +10 -7
  260. package/dist/utils/bit-count.js +1 -1
  261. package/dist/utils/categorizer.js +2 -2
  262. package/dist/utils/clone.js +5 -4
  263. package/dist/utils/constants.js +2 -2
  264. package/dist/utils/cosmetic-rule-separator.js +15 -11
  265. package/dist/utils/deep-freeze.js +5 -5
  266. package/dist/utils/domain.js +4 -3
  267. package/dist/utils/error.js +3 -1
  268. package/dist/utils/index.js +1 -1
  269. package/dist/utils/logical-expression.js +10 -6
  270. package/dist/utils/multi-value-map.js +4 -4
  271. package/dist/utils/noop-modifier.js +1 -1
  272. package/dist/utils/position-provider.js +2 -1
  273. package/dist/utils/quotes.js +49 -43
  274. package/dist/utils/regexp.js +25 -18
  275. package/dist/utils/string.js +136 -104
  276. package/dist/utils/type-guards.js +2 -1
  277. package/dist/validator/constants.js +1 -1
  278. package/dist/validator/helpers.js +1 -1
  279. package/dist/validator/index.js +8 -8
  280. package/dist/validator/value.js +6 -6
  281. package/dist/version.js +2 -2
  282. package/package.json +3 -1
  283. package/dist/errors/binary-schema-mismatch-error.js +0 -37
  284. package/dist/types/errors/binary-schema-mismatch-error.d.ts +0 -23
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @file Regular expression utilities
2
+ * @file Regular expression utilities.
3
3
  */
4
4
  export declare const REGEX_START = "^";
5
5
  export declare const REGEX_END = "$";
@@ -13,13 +13,13 @@ export declare const ADBLOCK_WILDCARD_REGEX: string;
13
13
  export declare const REGEX_NEGATION_PREFIX = "^((?!";
14
14
  export declare const REGEX_NEGATION_SUFFIX = ").)*$";
15
15
  /**
16
- * Special RegExp symbols
16
+ * Special RegExp symbols.
17
17
  *
18
18
  * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#special-escape
19
19
  */
20
20
  export declare const SPECIAL_REGEX_SYMBOLS: Set<string>;
21
21
  /**
22
- * Utility functions for working with RegExp patterns
22
+ * Utility functions for working with RegExp patterns.
23
23
  */
24
24
  export declare class RegExpUtils {
25
25
  /**
@@ -29,22 +29,25 @@ export declare class RegExpUtils {
29
29
  * Note: it does not perform a full validation of the pattern,
30
30
  * it just checks if the string starts and ends with a slash.
31
31
  *
32
- * @param pattern - Pattern to check
33
- * @returns `true` if the string is a RegExp pattern, `false` otherwise
32
+ * @param pattern Pattern to check.
33
+ *
34
+ * @returns `true` if the string is a RegExp pattern, `false` otherwise.
34
35
  */
35
36
  static isRegexPattern(pattern: string): boolean;
36
37
  /**
37
38
  * Checks whether a string is a negated RegExp pattern.
38
39
  *
39
- * @param pattern - Pattern to check
40
- * @returns `true` if the string is a negated RegExp pattern, `false` otherwise
40
+ * @param pattern Pattern to check.
41
+ *
42
+ * @returns `true` if the string is a negated RegExp pattern, `false` otherwise.
41
43
  */
42
44
  static isNegatedRegexPattern(pattern: string): boolean;
43
45
  /**
44
46
  * Removes negation from a RegExp pattern.
45
47
  *
46
- * @param pattern - RegExp pattern to remove negation from
47
- * @returns RegExp pattern without negation
48
+ * @param pattern RegExp pattern to remove negation from.
49
+ *
50
+ * @returns RegExp pattern without negation.
48
51
  */
49
52
  static removeNegationFromRegexPattern(pattern: string): string;
50
53
  /**
@@ -52,31 +55,35 @@ export declare class RegExpUtils {
52
55
  *
53
56
  * RegExp modifiers are not supported.
54
57
  *
55
- * @param pattern Pattern to negate (can be wrapped in slashes or not)
56
- * @returns Negated RegExp pattern
58
+ * @param pattern Pattern to negate (can be wrapped in slashes or not).
59
+ *
60
+ * @returns Negated RegExp pattern.
57
61
  */
58
62
  static negateRegexPattern(pattern: string): string;
59
63
  /**
60
64
  * Ensures that a pattern is wrapped in slashes.
61
65
  *
62
- * @param pattern Pattern to ensure slashes for
63
- * @returns Pattern with slashes
66
+ * @param pattern Pattern to ensure slashes for.
67
+ *
68
+ * @returns Pattern with slashes.
64
69
  */
65
70
  static ensureSlashes(pattern: string): string;
66
71
  /**
67
72
  * Converts a basic adblock rule pattern to a RegExp pattern. Based on
68
- * https://github.com/AdguardTeam/tsurlfilter/blob/9b26e0b4a0e30b87690bc60f7cf377d112c3085c/packages/tsurlfilter/src/rules/simple-regex.ts#L219
73
+ * https://github.com/AdguardTeam/tsurlfilter/blob/9b26e0b4a0e30b87690bc60f7cf377d112c3085c/packages/tsurlfilter/src/rules/simple-regex.ts#L219.
69
74
  *
70
- * @param pattern Pattern to convert
71
- * @returns RegExp equivalent of the pattern
72
75
  * @see {@link https://kb.adguard.com/en/general/how-to-create-your-own-ad-filters#basic-rules}
76
+ *
77
+ * @param pattern Pattern to convert.
78
+ *
79
+ * @returns RegExp equivalent of the pattern.
73
80
  */
74
81
  static patternToRegexp(pattern: string): string;
75
82
  /**
76
83
  * Creates a length-matching regular expression string: /^(?=.{min,max}$).*\/s
77
84
  * Where:
78
85
  * - (?=.{min,max}$) is a lookahead that ensures the string length is between min and max
79
- * - .* matches any character (including newlines, due to the 's' flag)
86
+ * - .* matches any character (including newlines, due to the 's' flag).
80
87
  *
81
88
  * @param min Minimum length or `null` for no minimum (default to `0`).
82
89
  * @param max Maximum length or `null` for no maximum (default to no maximum).
@@ -11,71 +11,77 @@ export type NewLineSplit = [string, NewLineType | null][];
11
11
  export declare class StringUtils {
12
12
  /**
13
13
  * Finds the first occurrence of a character that:
14
- * - isn't preceded by an escape character
14
+ * - isn't preceded by an escape character.
15
+ *
16
+ * @param pattern Source pattern.
17
+ * @param searchedCharacter Searched character.
18
+ * @param start Start index.
19
+ * @param escapeCharacter Escape character, \ by default.
20
+ * @param end End index (excluded).
15
21
  *
16
- * @param pattern - Source pattern
17
- * @param searchedCharacter - Searched character
18
- * @param start - Start index
19
- * @param escapeCharacter - Escape character, \ by default
20
- * @param end - End index (excluded)
21
- * @returns Index or -1 if the character not found
22
+ * @returns Index or -1 if the character not found.
22
23
  */
23
24
  static findNextUnescapedCharacter(pattern: string, searchedCharacter: string, start?: number, escapeCharacter?: string, end?: number): number;
24
25
  /**
25
26
  * Finds the first occurrence in backward direction of a character that isn't preceded by an escape character.
26
27
  *
27
- * @param pattern - Source pattern
28
- * @param searchedCharacter - Searched character
29
- * @param start - Start index
30
- * @param escapeCharacter - Escape character, \ by default
31
- * @param end - End index (Included)
32
- * @returns Index or -1 if the character not found
28
+ * @param pattern Source pattern.
29
+ * @param searchedCharacter Searched character.
30
+ * @param start Start index.
31
+ * @param escapeCharacter Escape character, \ by default.
32
+ * @param end End index (Included).
33
+ *
34
+ * @returns Index or -1 if the character not found.
33
35
  */
34
36
  static findNextUnescapedCharacterBackwards(pattern: string, searchedCharacter: string, start?: number, escapeCharacter?: string, end?: number): number;
35
37
  /**
36
38
  * Finds the last occurrence of a character that:
37
- * - isn't preceded by an escape character
39
+ * - isn't preceded by an escape character.
38
40
  *
39
- * @param pattern - Source pattern
40
- * @param searchedCharacter - Searched character
41
- * @param escapeCharacter - Escape character, \ by default
42
- * @returns Index or -1 if the character not found
41
+ * @param pattern Source pattern.
42
+ * @param searchedCharacter Searched character.
43
+ * @param escapeCharacter Escape character, \ by default.
44
+ *
45
+ * @returns Index or -1 if the character not found.
43
46
  */
44
47
  static findLastUnescapedCharacter(pattern: string, searchedCharacter: string, escapeCharacter?: string): number;
45
48
  /**
46
49
  * Finds the next occurrence of a character that:
47
50
  * - isn't preceded by an escape character
48
- * - isn't followed by the specified character
49
- *
50
- * @param pattern - Source pattern
51
- * @param start - Start index
52
- * @param searchedCharacter - Searched character
53
- * @param notFollowedBy - Searched character not followed by this character
54
- * @param escapeCharacter - Escape character, \ by default
55
- * @returns Index or -1 if the character not found
51
+ * - isn't followed by the specified character.
52
+ *
53
+ * @param pattern Source pattern.
54
+ * @param start Start index.
55
+ * @param searchedCharacter Searched character.
56
+ * @param notFollowedBy Searched character not followed by this character.
57
+ * @param escapeCharacter Escape character, \ by default.
58
+ *
59
+ * @returns Index or -1 if the character not found.
56
60
  */
57
61
  static findNextUnescapedCharacterThatNotFollowedBy(pattern: string, start: number, searchedCharacter: string, notFollowedBy: string, escapeCharacter?: string): number;
58
62
  /**
59
63
  * Finds the last occurrence of a character that:
60
64
  * - isn't preceded by an escape character
61
- * - isn't followed by the specified character
65
+ * - isn't followed by the specified character.
66
+ *
67
+ * @param pattern Source pattern.
68
+ * @param searchedCharacter Searched character.
69
+ * @param notFollowedBy Searched character not followed by this character.
70
+ * @param escapeCharacter Escape character, \ by default.
62
71
  *
63
- * @param pattern - Source pattern
64
- * @param searchedCharacter - Searched character
65
- * @param notFollowedBy - Searched character not followed by this character
66
- * @param escapeCharacter - Escape character, \ by default
67
- * @returns Index or -1 if the character not found
72
+ * @returns Index or -1 if the character not found.
68
73
  */
69
74
  static findLastUnescapedCharacterThatNotFollowedBy(pattern: string, searchedCharacter: string, notFollowedBy: string, escapeCharacter?: string): number;
70
75
  /**
71
76
  * Finds the next occurrence of a character that:
72
77
  * - isn't part of any string literal ('literal' or "literal")
73
- * - isn't part of any RegExp expression (/regexp/)
78
+ * - isn't part of any RegExp expression (/regexp/).
79
+ *
80
+ * @param pattern Source pattern.
81
+ * @param searchedCharacter Searched character.
82
+ * @param start Start index.
74
83
  *
75
- * @param pattern - Source pattern
76
- * @param searchedCharacter - Searched character
77
- * @param start - Start index
78
- * @returns Index or -1 if the character not found
84
+ * @returns Index or -1 if the character not found.
79
85
  */
80
86
  static findUnescapedNonStringNonRegexChar(pattern: string, searchedCharacter: string, start?: number): number;
81
87
  /**
@@ -96,71 +102,79 @@ export declare class StringUtils {
96
102
  /**
97
103
  * Finds the next occurrence of a character that:
98
104
  * - isn't part of any string literal ('literal' or "literal")
99
- * - isn't preceded by an escape character
105
+ * - isn't preceded by an escape character.
106
+ *
107
+ * @param pattern Source pattern.
108
+ * @param searchedCharacter Searched character.
109
+ * @param start Start index.
110
+ * @param escapeCharacter Escape character, \ by default.
100
111
  *
101
- * @param pattern - Source pattern
102
- * @param searchedCharacter - Searched character
103
- * @param start - Start index
104
- * @param escapeCharacter - Escape character, \ by default
105
- * @returns Index or -1 if the character not found
112
+ * @returns Index or -1 if the character not found.
106
113
  */
107
114
  static findNextUnquotedUnescapedCharacter(pattern: string, searchedCharacter: string, start?: number, escapeCharacter?: string): number;
108
115
  /**
109
116
  * Finds the next occurrence of a character that:
110
117
  * - isn't "bracketed"
111
- * - isn't preceded by an escape character
118
+ * - isn't preceded by an escape character.
119
+ *
120
+ * @param pattern Source pattern.
121
+ * @param searchedCharacter Searched character.
122
+ * @param start Start index.
123
+ * @param escapeCharacter Escape character, \ by default.
124
+ * @param openBracket Open bracket, ( by default.
125
+ * @param closeBracket Close bracket, ( by default.
112
126
  *
113
- * @param pattern - Source pattern
114
- * @param searchedCharacter - Searched character
115
- * @param start - Start index
116
- * @param escapeCharacter - Escape character, \ by default
117
- * @param openBracket - Open bracket, ( by default
118
- * @param closeBracket - Close bracket, ( by default
119
- * @throws If the opening and closing brackets are the same
120
- * @returns Index or -1 if the character not found
127
+ * @returns Index or -1 if the character not found.
128
+ *
129
+ * @throws If the opening and closing brackets are the same.
121
130
  */
122
131
  static findNextNotBracketedUnescapedCharacter(pattern: string, searchedCharacter: string, start?: number, escapeCharacter?: string, openBracket?: string, closeBracket?: string): number;
123
132
  /**
124
133
  * Splits the source pattern along characters that:
125
134
  * - isn't part of any string literal ('literal' or "literal")
126
- * - isn't preceded by an escape character
135
+ * - isn't preceded by an escape character.
127
136
  *
128
- * @param pattern - Source pattern
129
- * @param delimeterCharacter - Delimeter character
130
- * @returns Splitted string
137
+ * @param pattern Source pattern.
138
+ * @param delimeterCharacter Delimeter character.
139
+ *
140
+ * @returns Splitted string.
131
141
  */
132
142
  static splitStringByUnquotedUnescapedCharacter(pattern: string, delimeterCharacter: string): string[];
133
143
  /**
134
144
  * Splits the source pattern along characters that:
135
145
  * - isn't part of any string literal ('literal' or "literal")
136
146
  * - isn't part of any RegExp expression (/regexp/)
137
- * - isn't preceded by an escape character
147
+ * - isn't preceded by an escape character.
148
+ *
149
+ * @param pattern Source pattern.
150
+ * @param delimeterCharacter Delimeter character.
138
151
  *
139
- * @param pattern - Source pattern
140
- * @param delimeterCharacter - Delimeter character
141
- * @returns Splitted string
152
+ * @returns Splitted string.
142
153
  */
143
154
  static splitStringByUnescapedNonStringNonRegexChar(pattern: string, delimeterCharacter: string): string[];
144
155
  /**
145
156
  * Splits the source pattern along characters that:
146
- * - isn't preceded by an escape character
157
+ * - isn't preceded by an escape character.
158
+ *
159
+ * @param pattern Source pattern.
160
+ * @param delimeterCharacter Delimeter character.
147
161
  *
148
- * @param pattern - Source pattern
149
- * @param delimeterCharacter - Delimeter character
150
- * @returns Splitted string
162
+ * @returns Splitted string.
151
163
  */
152
164
  static splitStringByUnescapedCharacter(pattern: string, delimeterCharacter: string): string[];
153
165
  /**
154
166
  * Determines whether the given character is a space or tab character.
155
167
  *
156
- * @param char - The character to check.
157
- * @returns true if the given character is a space or tab character, false otherwise.
168
+ * @param char The character to check.
169
+ *
170
+ * @returns True if the given character is a space or tab character, false otherwise.
158
171
  */
159
172
  static isWhitespace(char: string): boolean;
160
173
  /**
161
174
  * Checks if the given character is a digit.
162
175
  *
163
176
  * @param char The character to check.
177
+ *
164
178
  * @returns `true` if the given character is a digit, `false` otherwise.
165
179
  */
166
180
  static isDigit(char: string): boolean;
@@ -168,6 +182,7 @@ export declare class StringUtils {
168
182
  * Checks if the given character is a small letter.
169
183
  *
170
184
  * @param char The character to check.
185
+ *
171
186
  * @returns `true` if the given character is a small letter, `false` otherwise.
172
187
  */
173
188
  static isSmallLetter(char: string): boolean;
@@ -175,6 +190,7 @@ export declare class StringUtils {
175
190
  * Checks if the given character is a capital letter.
176
191
  *
177
192
  * @param char The character to check.
193
+ *
178
194
  * @returns `true` if the given character is a capital letter, `false` otherwise.
179
195
  */
180
196
  static isCapitalLetter(char: string): boolean;
@@ -182,114 +198,130 @@ export declare class StringUtils {
182
198
  * Checks if the given character is a letter (small or capital).
183
199
  *
184
200
  * @param char The character to check.
201
+ *
185
202
  * @returns `true` if the given character is a letter, `false` otherwise.
186
203
  */
187
204
  static isLetter(char: string): boolean;
188
205
  /**
189
206
  * Checks if the given character is a letter or a digit.
190
207
  *
191
- * @param char Character to check
208
+ * @param char Character to check.
209
+ *
192
210
  * @returns `true` if the given character is a letter or a digit, `false` otherwise.
193
211
  */
194
212
  static isAlphaNumeric(char: string): boolean;
195
213
  /**
196
214
  * Searches for the first non-whitespace character in the source pattern.
197
215
  *
198
- * @param pattern - Source pattern
199
- * @param start - Start index
200
- * @returns Index or -1 if the character not found
216
+ * @param pattern Source pattern.
217
+ * @param start Start index.
218
+ *
219
+ * @returns Index or -1 if the character not found.
201
220
  */
202
221
  static findFirstNonWhitespaceCharacter(pattern: string, start?: number): number;
203
222
  /**
204
223
  * Searches for the last non-whitespace character in the source pattern.
205
224
  *
206
- * @param pattern - Source pattern
207
- * @returns Index or -1 if the character not found
225
+ * @param pattern Source pattern.
226
+ *
227
+ * @returns Index or -1 if the character not found.
208
228
  */
209
229
  static findLastNonWhitespaceCharacter(pattern: string): number;
210
230
  /**
211
231
  * Finds the next whitespace character in the pattern.
212
232
  *
213
- * @param pattern Pattern to search in
214
- * @param start Start index
215
- * @returns Index of the next whitespace character or the length of the pattern if not found
233
+ * @param pattern Pattern to search in.
234
+ * @param start Start index.
235
+ *
236
+ * @returns Index of the next whitespace character or the length of the pattern if not found.
216
237
  */
217
238
  static findNextWhitespaceCharacter(pattern: string, start?: number): number;
218
239
  /**
219
240
  * Escapes a specified character in the string.
220
241
  *
221
- * @param pattern - Input string
222
- * @param character - Character to escape
223
- * @param escapeCharacter - Escape character (optional)
224
- * @returns Escaped string
242
+ * @param pattern Input string.
243
+ * @param character Character to escape.
244
+ * @param escapeCharacter Escape character (optional).
245
+ *
246
+ * @returns Escaped string.
225
247
  */
226
248
  static escapeCharacter(pattern: string, character: string, escapeCharacter?: string): string;
227
249
  /**
228
250
  * Searches for the next non-whitespace character in the source pattern.
229
251
  *
230
- * @param pattern Pattern to search
231
- * @param start Start index
232
- * @returns Index of the next non-whitespace character or the length of the pattern
252
+ * @param pattern Pattern to search.
253
+ * @param start Start index.
254
+ *
255
+ * @returns Index of the next non-whitespace character or the length of the pattern.
233
256
  */
234
257
  static skipWS(pattern: string, start?: number): number;
235
258
  /**
236
259
  * Searches for the previous non-whitespace character in the source pattern.
237
260
  *
238
- * @param pattern Pattern to search
239
- * @param start Start index
240
- * @returns Index of the previous non-whitespace character or -1
261
+ * @param pattern Pattern to search.
262
+ * @param start Start index.
263
+ *
264
+ * @returns Index of the previous non-whitespace character or -1.
241
265
  */
242
266
  static skipWSBack(pattern: string, start?: number): number;
243
267
  /**
244
268
  * Checks if the given character is a new line character.
245
269
  *
246
- * @param char Character to check
270
+ * @param char Character to check.
271
+ *
247
272
  * @returns `true` if the given character is a new line character, `false` otherwise.
248
273
  */
249
274
  static isEOL(char: string): boolean;
250
275
  /**
251
276
  * Splits a string along newline characters.
252
277
  *
253
- * @param input - Input string
254
- * @returns Splitted string
278
+ * @param input Input string.
279
+ *
280
+ * @returns Splitted string.
255
281
  */
256
282
  static splitStringByNewLines(input: string): string[];
257
283
  /**
258
- * Splits a string by new lines and stores the new line type for each line
284
+ * Splits a string by new lines and stores the new line type for each line.
285
+ *
286
+ * @param input The input string to be split.
259
287
  *
260
- * @param input The input string to be split
261
288
  * @returns An array of tuples, where each tuple contains a line of the input string and its
262
- * corresponding new line type ("lf", "crlf", or "cr")
289
+ * corresponding new line type ("lf", "crlf", or "cr").
263
290
  */
264
291
  static splitStringByNewLinesEx(input: string): NewLineSplit;
265
292
  /**
266
- * Merges an array of tuples (line, newLineType) into a single string
293
+ * Merges an array of tuples (line, newLineType) into a single string.
267
294
  *
268
- * @param input The array of tuples to be merged
269
- * @returns A single string containing the lines and new line characters from the input array
295
+ * @param input The array of tuples to be merged.
296
+ *
297
+ * @returns A single string containing the lines and new line characters from the input array.
270
298
  */
271
299
  static mergeStringByNewLines(input: NewLineSplit): string;
272
300
  /**
273
- * Helper method to parse a raw string as a number
301
+ * Helper method to parse a raw string as a number.
302
+ *
303
+ * @param raw Raw string to parse.
274
304
  *
275
- * @param raw Raw string to parse
276
- * @returns Parsed number
277
- * @throws If the raw string can't be parsed as a number
305
+ * @returns Parsed number.
306
+ *
307
+ * @throws If the raw string can't be parsed as a number.
278
308
  */
279
309
  static parseNumber(raw: string): number;
280
310
  /**
281
311
  * Checks if the given value is a string.
282
312
  *
283
- * @param value Value to check
284
- * @returns `true` if the value is a string, `false` otherwise
313
+ * @param value Value to check.
314
+ *
315
+ * @returns `true` if the value is a string, `false` otherwise.
285
316
  */
286
317
  static isString(value: unknown): value is string;
287
318
  /**
288
319
  * Escapes the given characters in the input string.
289
320
  *
290
- * @param input Input string
291
- * @param characters Characters to escape (by default, no characters are escaped)
292
- * @returns Escaped string
321
+ * @param input Input string.
322
+ * @param characters Characters to escape (by default, no characters are escaped).
323
+ *
324
+ * @returns Escaped string.
293
325
  */
294
326
  static escapeCharacters(input: string, characters?: Set<string>): string;
295
327
  }
@@ -34,6 +34,7 @@ export declare const isInteger: (value: unknown) => value is number;
34
34
  * Checks whether the given value is a string.
35
35
  *
36
36
  * @param value Value to check.
37
+ *
37
38
  * @returns `true` if the value is a string, `false` otherwise.
38
39
  */
39
40
  export declare const isString: (value: unknown) => value is string;
@@ -3,7 +3,7 @@
3
3
  * - `{ valid: true }` for valid and _fully supported_ modifier;
4
4
  * - `{ valid: true, warn: <deprecation notice> }` for valid
5
5
  * and _still supported but deprecated_ modifier;
6
- * - otherwise `{ valid: true, error: <invalidity reason> }`
6
+ * - otherwise `{ valid: true, error: <invalidity reason> }`.
7
7
  */
8
8
  export type ValidationResult = {
9
9
  valid: boolean;
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * @file Validator for modifiers.
3
3
  */
4
+ import { type AnyPlatform } from '../compatibility-tables/index.js';
4
5
  import { type Modifier } from '../nodes/index.js';
5
6
  import { type ValidationResult } from './helpers.js';
6
- import { type AnyPlatform } from '../compatibility-tables/index.js';
7
7
  /**
8
8
  * Modifier validator class.
9
9
  */
@@ -28,10 +28,10 @@ declare class ModifierValidator {
28
28
  * @param isException Whether the modifier is used in exception rule, default to false.
29
29
  * Needed to check whether the modifier is allowed only in blocking or exception rules.
30
30
  *
31
+ * @returns Result of modifier validation.
32
+ *
31
33
  * @note For single product: specific platforms use exact lookup, generic platforms use first match.
32
34
  * If multiple products are specified (e.g., AdgAny | UboAny), validation is skipped and returns valid.
33
- *
34
- * @returns Result of modifier validation.
35
35
  */
36
36
  validate: (platforms: AnyPlatform, modifier: Modifier, isException?: boolean) => ValidationResult;
37
37
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @file AGTree version
2
+ * @file AGTree version.
3
3
  */
4
4
  declare const AGTREE_VERSION: string;
5
5
  export { AGTREE_VERSION };
@@ -1,5 +1,5 @@
1
1
  /*
2
- * AGTree v4.0.1 (build date: Thu, 19 Feb 2026 05:13:05 GMT)
2
+ * AGTree v4.0.3 (build date: Tue, 24 Mar 2026 15:29:20 GMT)
3
3
  * (c) 2026 Adguard Software Ltd.
4
4
  * Released under the MIT license
5
5
  * https://github.com/AdguardTeam/tsurlfilter/tree/master/packages/agtree#readme
@@ -18,7 +18,7 @@ const AdblockProduct = {
18
18
  */
19
19
  Abp: 'AdblockPlus',
20
20
  /**
21
- * uBlock Origin.
21
+ * UBlock Origin..
22
22
  *
23
23
  * @see {@link https://github.com/gorhill/uBlock}
24
24
  */
@@ -31,7 +31,7 @@ const AdblockProduct = {
31
31
  Adg: 'AdGuard',
32
32
  };
33
33
  /**
34
- * Possible adblock syntaxes (supported by this library)
34
+ * Possible adblock syntaxes (supported by this library).
35
35
  */
36
36
  const AdblockSyntax = {
37
37
  /**
@@ -49,29 +49,32 @@ const AdblockSyntax = {
49
49
  /**
50
50
  * Adblock Plus syntax.
51
51
  *
52
+ * @see {@link https://adblockplus.org/}
53
+ *
52
54
  * @example
53
55
  * - `example.org#$#abort-on-property-read alert` is an Adblock Plus syntax, since it is not used by any other
54
56
  * adblockers directly (probably supported by some on-the-fly conversion, but this is not the native syntax).
55
- * @see {@link https://adblockplus.org/}
56
57
  */
57
58
  Abp: AdblockProduct.Abp,
58
59
  /**
59
- * uBlock Origin syntax.
60
+ * UBlock Origin syntax..
61
+ *
62
+ * @see {@link https://github.com/gorhill/uBlock}
60
63
  *
61
64
  * @example
62
65
  * - `example.com##+js(set, atob, noopFunc)` is an uBlock Origin syntax, since it is not used by any other
63
66
  * adblockers directly (probably supported by some on-the-fly conversion, but this is not the native syntax).
64
- * @see {@link https://github.com/gorhill/uBlock}
65
67
  */
66
68
  Ubo: AdblockProduct.Ubo,
67
69
  /**
68
70
  * AdGuard syntax.
69
71
  *
72
+ * @see {@link https://adguard.com/}
73
+ *
70
74
  * @example
71
75
  * - `example.org#%#//scriptlet("abort-on-property-read", "alert")` is an AdGuard syntax, since it is not used
72
76
  * by any other adblockers directly (probably supported by some on-the-fly conversion, but this is not the native
73
77
  * syntax).
74
- * @see {@link https://adguard.com/}
75
78
  */
76
79
  Adg: AdblockProduct.Adg,
77
80
  };
@@ -1,5 +1,5 @@
1
1
  /*
2
- * AGTree v4.0.1 (build date: Thu, 19 Feb 2026 05:13:05 GMT)
2
+ * AGTree v4.0.3 (build date: Tue, 24 Mar 2026 15:29:20 GMT)
3
3
  * (c) 2026 Adguard Software Ltd.
4
4
  * Released under the MIT license
5
5
  * https://github.com/AdguardTeam/tsurlfilter/tree/master/packages/agtree#readme
@@ -1,12 +1,12 @@
1
1
  /*
2
- * AGTree v4.0.1 (build date: Thu, 19 Feb 2026 05:13:05 GMT)
2
+ * AGTree v4.0.3 (build date: Tue, 24 Mar 2026 15:29:20 GMT)
3
3
  * (c) 2026 Adguard Software Ltd.
4
4
  * Released under the MIT license
5
5
  * https://github.com/AdguardTeam/tsurlfilter/tree/master/packages/agtree#readme
6
6
  */
7
7
  import { CosmeticRuleParser } from '../parser/cosmetic/cosmetic-rule-parser.js';
8
- import { isNull } from './type-guards.js';
9
8
  import { defaultParserOptions } from '../parser/options.js';
9
+ import { isNull } from './type-guards.js';
10
10
 
11
11
  /**
12
12
  * Utility functions for categorizing rules.