@adguard/agtree 3.3.1 → 3.4.1

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 (263) hide show
  1. package/dist/ast-utils/clone.js +1 -1
  2. package/dist/ast-utils/modifiers.js +1 -1
  3. package/dist/ast-utils/network-rules.js +1 -1
  4. package/dist/ast-utils/scriptlets.js +1 -1
  5. package/dist/common/abp-snippet-injection-body-common.js +1 -1
  6. package/dist/common/agent-common.js +1 -1
  7. package/dist/common/ubo-selector-common.js +1 -1
  8. package/dist/compatibility-tables/base.js +2 -2
  9. package/dist/compatibility-tables/compatibility-table-data.js +1 -1
  10. package/dist/compatibility-tables/modifiers.js +4 -3
  11. package/dist/compatibility-tables/platforms.js +32 -30
  12. package/dist/compatibility-tables/redirects.js +2 -2
  13. package/dist/compatibility-tables/schemas/base.js +1 -1
  14. package/dist/compatibility-tables/schemas/modifier.js +1 -1
  15. package/dist/compatibility-tables/schemas/platform.js +57 -4
  16. package/dist/compatibility-tables/schemas/redirect.js +1 -1
  17. package/dist/compatibility-tables/schemas/resource-type.js +1 -1
  18. package/dist/compatibility-tables/schemas/scriptlet.js +1 -1
  19. package/dist/compatibility-tables/scriptlets.js +1 -1
  20. package/dist/compatibility-tables/utils/platform-helpers.js +317 -34
  21. package/dist/compatibility-tables/utils/resource-type-helpers.js +2 -2
  22. package/dist/compatibility-tables/utils/zod-camelcase.js +1 -1
  23. package/dist/converter/base-interfaces/base-converter.js +1 -1
  24. package/dist/converter/base-interfaces/conversion-result.js +1 -1
  25. package/dist/converter/base-interfaces/rule-converter-base.js +1 -1
  26. package/dist/converter/comment/index.js +1 -1
  27. package/dist/converter/cosmetic/css.js +1 -1
  28. package/dist/converter/cosmetic/element-hiding.js +1 -1
  29. package/dist/converter/cosmetic/header-removal.js +1 -1
  30. package/dist/converter/cosmetic/html.js +1 -1
  31. package/dist/converter/cosmetic/index.js +1 -1
  32. package/dist/converter/cosmetic/rule-modifiers/adg.js +1 -1
  33. package/dist/converter/cosmetic/rule-modifiers/ubo.js +9 -1
  34. package/dist/converter/cosmetic/scriptlet.js +8 -1
  35. package/dist/converter/css/index.js +2 -1
  36. package/dist/converter/data/css.js +1 -1
  37. package/dist/converter/filter-list.js +1 -1
  38. package/dist/converter/index.js +1 -1
  39. package/dist/converter/misc/network-rule-modifier.js +1 -1
  40. package/dist/converter/network/index.js +1 -1
  41. package/dist/converter/raw-filter-list.js +1 -1
  42. package/dist/converter/raw-rule.js +2 -1
  43. package/dist/converter/rule.js +1 -1
  44. package/dist/deserializer/base-deserializer.js +1 -1
  45. package/dist/deserializer/comment/agent-comment-deserializer.js +1 -1
  46. package/dist/deserializer/comment/agent-deserializer.js +1 -1
  47. package/dist/deserializer/comment/comment-rule-deserializer.js +1 -1
  48. package/dist/deserializer/comment/config-comment-deserializer.js +1 -1
  49. package/dist/deserializer/comment/hint-comment-deserializer.js +1 -1
  50. package/dist/deserializer/comment/hint-deserializer.js +1 -1
  51. package/dist/deserializer/comment/metadata-comment-deserializer.js +1 -1
  52. package/dist/deserializer/comment/pre-processor-comment-deserializer.js +1 -1
  53. package/dist/deserializer/comment/simple-comment-deserializer.js +1 -1
  54. package/dist/deserializer/cosmetic/cosmetic-rule-deserializer.js +1 -1
  55. package/dist/deserializer/cosmetic/css-injection-body-deserializer.js +1 -1
  56. package/dist/deserializer/cosmetic/element-hiding-body-deserializer.js +1 -1
  57. package/dist/deserializer/cosmetic/scriptlet-body/abp-snippet-injection-body-deserializer.js +1 -1
  58. package/dist/deserializer/cosmetic/scriptlet-body/adg-scriptlet-injection-body-deserializer.js +1 -1
  59. package/dist/deserializer/cosmetic/scriptlet-body/scriptlet-body-deserializer.js +1 -1
  60. package/dist/deserializer/cosmetic/scriptlet-body/ubo-scriptlet-injection-body-deserializer.js +1 -1
  61. package/dist/deserializer/empty-rule-deserializer.js +1 -1
  62. package/dist/deserializer/filterlist-deserializer.js +1 -1
  63. package/dist/deserializer/index.js +1 -1
  64. package/dist/deserializer/invalid-rule-deserializer.js +1 -1
  65. package/dist/deserializer/invalid-rule-error-node-deserializer.js +1 -1
  66. package/dist/deserializer/misc/domain-list-deserializer.js +1 -1
  67. package/dist/deserializer/misc/list-item-deserializer.js +1 -1
  68. package/dist/deserializer/misc/list-items-deserializer.js +1 -1
  69. package/dist/deserializer/misc/logical-expression-deserializer.js +1 -1
  70. package/dist/deserializer/misc/modifier-deserializer.js +1 -1
  71. package/dist/deserializer/misc/modifier-list-deserializer.js +1 -1
  72. package/dist/deserializer/misc/parameter-list-deserializer.js +1 -1
  73. package/dist/deserializer/misc/value-deserializer.js +1 -1
  74. package/dist/deserializer/network/host-rule-deserializer.js +1 -1
  75. package/dist/deserializer/network/hostname-list-deserializer.js +1 -1
  76. package/dist/deserializer/network/network-rule-deserializer.js +1 -1
  77. package/dist/deserializer/rule-deserializer.js +1 -1
  78. package/dist/deserializer/syntax-deserialization-map.js +1 -1
  79. package/dist/errors/adblock-syntax-error.js +1 -1
  80. package/dist/errors/binary-schema-mismatch-error.js +1 -1
  81. package/dist/errors/not-implemented-error.js +1 -1
  82. package/dist/errors/rule-conversion-error.js +1 -1
  83. package/dist/generator/base-generator.js +1 -1
  84. package/dist/generator/comment/agent-comment-generator.js +1 -1
  85. package/dist/generator/comment/agent-generator.js +1 -1
  86. package/dist/generator/comment/comment-rule-generator.js +1 -1
  87. package/dist/generator/comment/config-comment-generator.js +1 -1
  88. package/dist/generator/comment/hint-comment-generator.js +1 -1
  89. package/dist/generator/comment/hint-generator.js +1 -1
  90. package/dist/generator/comment/metadata-comment-generator.js +1 -1
  91. package/dist/generator/comment/pre-processor-comment-generator.js +1 -1
  92. package/dist/generator/comment/simple-comment-generator.js +1 -1
  93. package/dist/generator/cosmetic/body/abp-snippet-injection-body-generator.js +1 -1
  94. package/dist/generator/cosmetic/body/adg-scriptlet-injection-body-generator.js +1 -1
  95. package/dist/generator/cosmetic/body/ubo-scriptlet-injection-body-generator.js +1 -1
  96. package/dist/generator/cosmetic/cosmetic-rule-body-generator.js +1 -1
  97. package/dist/generator/cosmetic/cosmetic-rule-generator.js +1 -1
  98. package/dist/generator/cosmetic/cosmetic-rule-pattern-generator.js +1 -1
  99. package/dist/generator/css/adg-css-injection-generator.js +1 -1
  100. package/dist/generator/filterlist-generator.js +1 -1
  101. package/dist/generator/index.js +1 -1
  102. package/dist/generator/misc/domain-list-generator.js +1 -1
  103. package/dist/generator/misc/list-items-generator.js +1 -1
  104. package/dist/generator/misc/logical-expression-generator.js +1 -1
  105. package/dist/generator/misc/modifier-generator.js +1 -1
  106. package/dist/generator/misc/modifier-list-generator.js +1 -1
  107. package/dist/generator/misc/parameter-list-generator.js +1 -1
  108. package/dist/generator/misc/value-generator.js +1 -1
  109. package/dist/generator/network/host-rule-generator.js +1 -1
  110. package/dist/generator/network/network-rule-generator.js +1 -1
  111. package/dist/generator/rule-generator.js +1 -1
  112. package/dist/index.js +4 -4
  113. package/dist/marshalling-utils/comment/agent-comment-common.js +1 -1
  114. package/dist/marshalling-utils/comment/agent-common.js +1 -1
  115. package/dist/marshalling-utils/comment/config-comment-common.js +1 -1
  116. package/dist/marshalling-utils/comment/hint-comment-common.js +1 -1
  117. package/dist/marshalling-utils/comment/hint-common.js +1 -1
  118. package/dist/marshalling-utils/comment/metadata-comment-common.js +1 -1
  119. package/dist/marshalling-utils/comment/pre-processor-comment-common.js +1 -1
  120. package/dist/marshalling-utils/comment/simple-comment-common.js +1 -1
  121. package/dist/marshalling-utils/cosmetic/body/abp-snippet-injection-body-common.js +1 -1
  122. package/dist/marshalling-utils/cosmetic/body/adg-scriptlet-injection-body-common.js +1 -1
  123. package/dist/marshalling-utils/cosmetic/body/css-injection-body-common.js +1 -1
  124. package/dist/marshalling-utils/cosmetic/body/element-hiding-body-common.js +1 -1
  125. package/dist/marshalling-utils/cosmetic/body/ubo-scriptlet-injection-body-common.js +1 -1
  126. package/dist/marshalling-utils/cosmetic/cosmetic-rule-common.js +1 -1
  127. package/dist/marshalling-utils/empty-rule-common.js +1 -1
  128. package/dist/marshalling-utils/filter-list-common.js +1 -1
  129. package/dist/marshalling-utils/invalid-rule-common.js +1 -1
  130. package/dist/marshalling-utils/invalid-rule-error-node-common.js +1 -1
  131. package/dist/marshalling-utils/misc/binary-type-common.js +1 -1
  132. package/dist/marshalling-utils/misc/domain-list-common.js +1 -1
  133. package/dist/marshalling-utils/misc/host-rule-common.js +1 -1
  134. package/dist/marshalling-utils/misc/hostname-list-common.js +1 -1
  135. package/dist/marshalling-utils/misc/list-item-common.js +1 -1
  136. package/dist/marshalling-utils/misc/logical-expression-common.js +1 -1
  137. package/dist/marshalling-utils/misc/modifier-common.js +1 -1
  138. package/dist/marshalling-utils/misc/modifier-list-common.js +1 -1
  139. package/dist/marshalling-utils/misc/parameter-list-common.js +1 -1
  140. package/dist/marshalling-utils/misc/value-common.js +1 -1
  141. package/dist/marshalling-utils/network/network-rule-common.js +1 -1
  142. package/dist/marshalling-utils/syntax-serialization-map.js +1 -1
  143. package/dist/nodes/index.js +1 -1
  144. package/dist/package.json.js +2 -2
  145. package/dist/parser/base-parser.js +1 -1
  146. package/dist/parser/comment/agent-comment-parser.js +1 -1
  147. package/dist/parser/comment/agent-parser.js +1 -1
  148. package/dist/parser/comment/comment-parser.js +1 -1
  149. package/dist/parser/comment/config-comment-parser.js +1 -1
  150. package/dist/parser/comment/hint-comment-parser.js +1 -1
  151. package/dist/parser/comment/hint-parser.js +1 -1
  152. package/dist/parser/comment/metadata-comment-parser.js +1 -1
  153. package/dist/parser/comment/preprocessor-parser.js +1 -1
  154. package/dist/parser/comment/simple-comment-parser.js +1 -1
  155. package/dist/parser/cosmetic/body/abp-snippet-injection-body-parser.js +1 -1
  156. package/dist/parser/cosmetic/body/adg-scriptlet-injection-body-parser.js +1 -1
  157. package/dist/parser/cosmetic/body/ubo-scriptlet-injection-body-parser.js +1 -1
  158. package/dist/parser/cosmetic/cosmetic-rule-parser.js +1 -1
  159. package/dist/parser/css/adg-css-injection-parser.js +1 -1
  160. package/dist/parser/css/balancing.js +1 -1
  161. package/dist/parser/css/constants.js +1 -1
  162. package/dist/parser/css/css-token-stream.js +1 -1
  163. package/dist/parser/css/ubo-selector-parser.js +1 -1
  164. package/dist/parser/filterlist-parser.js +1 -1
  165. package/dist/parser/index.js +1 -1
  166. package/dist/parser/misc/app-list-parser.js +1 -1
  167. package/dist/parser/misc/domain-list-parser.js +1 -1
  168. package/dist/parser/misc/list-items-parser.js +1 -1
  169. package/dist/parser/misc/logical-expression-parser.js +1 -1
  170. package/dist/parser/misc/method-list-parser.js +1 -1
  171. package/dist/parser/misc/modifier-list.js +1 -1
  172. package/dist/parser/misc/modifier-parser.js +1 -1
  173. package/dist/parser/misc/parameter-list-parser.js +1 -1
  174. package/dist/parser/misc/stealth-option-list-parser.js +1 -1
  175. package/dist/parser/misc/ubo-parameter-list-parser.js +1 -1
  176. package/dist/parser/misc/value-parser.js +1 -1
  177. package/dist/parser/network/host-rule-parser.js +1 -1
  178. package/dist/parser/network/network-rule-parser.js +1 -1
  179. package/dist/parser/options.js +1 -1
  180. package/dist/parser/rule-parser.js +1 -1
  181. package/dist/serializer/base-serializer.js +1 -1
  182. package/dist/serializer/comment/agent-comment-serializer.js +1 -1
  183. package/dist/serializer/comment/agent-serializer.js +1 -1
  184. package/dist/serializer/comment/comment-rule-serializer.js +1 -1
  185. package/dist/serializer/comment/config-comment-serializer.js +1 -1
  186. package/dist/serializer/comment/hint-comment-serializer.js +1 -1
  187. package/dist/serializer/comment/hint-serializer.js +1 -1
  188. package/dist/serializer/comment/metadata-comment-serializer.js +1 -1
  189. package/dist/serializer/comment/pre-processor-comment-serializer.js +1 -1
  190. package/dist/serializer/comment/simple-comment-serializer.js +1 -1
  191. package/dist/serializer/cosmetic/body/abp-snippet-injection-body-serializer.js +1 -1
  192. package/dist/serializer/cosmetic/body/adg-scriptlet-injection-body-serializer.js +1 -1
  193. package/dist/serializer/cosmetic/body/scriptlet-body-serializer.js +1 -1
  194. package/dist/serializer/cosmetic/body/ubo-scriptlet-injection-body-serializer.js +1 -1
  195. package/dist/serializer/cosmetic/cosmetic-rule-serializer.js +1 -1
  196. package/dist/serializer/cosmetic/css-injection-body-serializer.js +1 -1
  197. package/dist/serializer/cosmetic/element-hiding-body-serializer.js +1 -1
  198. package/dist/serializer/empty-rule-serializer.js +1 -1
  199. package/dist/serializer/filterlist-serializer.js +1 -1
  200. package/dist/serializer/index.js +1 -1
  201. package/dist/serializer/invalid-rule-error-node-serializer.js +1 -1
  202. package/dist/serializer/invalid-rule-serializer.js +1 -1
  203. package/dist/serializer/misc/domain-list-serializer.js +1 -1
  204. package/dist/serializer/misc/list-item-serializer.js +1 -1
  205. package/dist/serializer/misc/list-items-serializer.js +1 -1
  206. package/dist/serializer/misc/logical-expression-serializer.js +1 -1
  207. package/dist/serializer/misc/modifier-list-serializer.js +1 -1
  208. package/dist/serializer/misc/modifier-serializer.js +1 -1
  209. package/dist/serializer/misc/parameter-list-serializer.js +1 -1
  210. package/dist/serializer/misc/value-serializer.js +1 -1
  211. package/dist/serializer/network/host-rule-serializer.js +1 -1
  212. package/dist/serializer/network/hostname-list-serializer.js +1 -1
  213. package/dist/serializer/network/network-rule-serializer.js +1 -1
  214. package/dist/serializer/rule-serializer.js +1 -1
  215. package/dist/types/compatibility-tables/base.d.ts +11 -11
  216. package/dist/types/compatibility-tables/index.d.ts +3 -2
  217. package/dist/types/compatibility-tables/platforms.d.ts +67 -33
  218. package/dist/types/compatibility-tables/redirects.d.ts +3 -3
  219. package/dist/types/compatibility-tables/schemas/base.d.ts +1 -1
  220. package/dist/types/compatibility-tables/schemas/platform.d.ts +16 -5
  221. package/dist/types/compatibility-tables/utils/platform-helpers.d.ts +112 -3
  222. package/dist/types/compatibility-tables/utils/resource-type-helpers.d.ts +3 -3
  223. package/dist/types/index.d.ts +2 -2
  224. package/dist/types/utils/adblockers.d.ts +45 -0
  225. package/dist/types/utils/bit-count.d.ts +21 -0
  226. package/dist/types/utils/index.d.ts +2 -0
  227. package/dist/types/utils/noop-modifier.d.ts +8 -0
  228. package/dist/types/utils/storage-interface.d.ts +1 -1
  229. package/dist/types/utils/types.d.ts +21 -0
  230. package/dist/types/validator/constants.d.ts +0 -9
  231. package/dist/types/validator/helpers.d.ts +0 -8
  232. package/dist/types/validator/index.d.ts +10 -9
  233. package/dist/utils/adblockers.js +59 -5
  234. package/dist/utils/binary-schema-version.js +1 -1
  235. package/dist/utils/bit-count.js +37 -0
  236. package/dist/utils/byte-buffer.js +1 -1
  237. package/dist/utils/categorizer.js +1 -1
  238. package/dist/utils/clone.js +1 -1
  239. package/dist/utils/constants.js +1 -1
  240. package/dist/utils/cosmetic-rule-separator.js +1 -1
  241. package/dist/utils/deep-freeze.js +1 -1
  242. package/dist/utils/domain.js +1 -1
  243. package/dist/utils/error.js +1 -1
  244. package/dist/utils/index.js +2 -1
  245. package/dist/utils/input-byte-buffer.js +1 -1
  246. package/dist/utils/is-chromium.js +1 -1
  247. package/dist/utils/logical-expression.js +1 -1
  248. package/dist/utils/multi-value-map.js +1 -1
  249. package/dist/utils/noop-modifier.js +29 -0
  250. package/dist/utils/output-byte-buffer.js +1 -1
  251. package/dist/utils/position-provider.js +1 -1
  252. package/dist/utils/quotes.js +1 -1
  253. package/dist/utils/regexp.js +1 -1
  254. package/dist/utils/string.js +1 -1
  255. package/dist/utils/text-decoder-polyfill.js +1 -1
  256. package/dist/utils/text-encoder-polyfill.js +1 -1
  257. package/dist/utils/type-guards.js +1 -1
  258. package/dist/validator/constants.js +3 -13
  259. package/dist/validator/helpers.js +2 -13
  260. package/dist/validator/index.js +44 -48
  261. package/dist/validator/value.js +1 -1
  262. package/dist/version.js +1 -1
  263. package/package.json +1 -1
@@ -2,6 +2,8 @@
2
2
  * @file Provides platform mapping and helper functions.
3
3
  */
4
4
  import { type AnyPlatform, GenericPlatform, SpecificPlatform } from '../platforms.js';
5
+ import { AdblockProduct } from '../../utils/adblockers.js';
6
+ import { type ReadonlyRecord } from '../../utils/types.js';
5
7
  /**
6
8
  * Map of specific platforms string names to their corresponding enum values.
7
9
  */
@@ -17,13 +19,89 @@ export declare const SPECIFIC_PLATFORM_MAP_REVERSE: Map<SpecificPlatform, string
17
19
  */
18
20
  export declare const GENERIC_PLATFORM_MAP: Map<string, GenericPlatform>;
19
21
  /**
20
- * Check if the platform is a generic platform.
22
+ * Initializes and returns the product generic platforms map.
23
+ * Filters all generic platforms by product prefix and sorts by specificity (fewer bits = more specific).
24
+ *
25
+ * @returns Map of products to their generic platforms, ordered from most to least specific.
26
+ */
27
+ export declare const getProductGenericPlatforms: () => ReadonlyRecord<AdblockProduct, readonly GenericPlatform[]>;
28
+ /**
29
+ * Check if the platform is a generic platform (or a combination of platforms).
30
+ *
31
+ * @param platform Platform to check.
32
+ *
33
+ * @returns True if the platform is a generic platform or combined platforms, false if it's a specific platform.
34
+ */
35
+ export declare const isGenericPlatform: (platform: AnyPlatform) => platform is GenericPlatform | number;
36
+ /**
37
+ * Check if the platform has multiple products specified.
38
+ * Multiple products means at least 2 of: AdgAny, AbpAny, UboAny.
21
39
  *
22
40
  * @param platform Platform to check.
23
41
  *
24
- * @returns True if the platform is a generic platform, false otherwise.
42
+ * @returns True if at least 2 products are specified, false otherwise.
43
+ */
44
+ export declare const hasPlatformMultipleProducts: (platform: AnyPlatform) => boolean;
45
+ /**
46
+ * Converts a platform to its corresponding adblock products.
47
+ *
48
+ * Note: This conversion is less specific than the platform itself, as it only returns
49
+ * which products (AdGuard/uBlock/Abp) are present, dropping specific platform information
50
+ * (e.g., Windows vs Chrome extension).
51
+ *
52
+ * @param platform Platform to convert.
53
+ *
54
+ * @returns Array of AdblockProduct values:
55
+ * - Empty array `[]` if platform is 0 or no products are found
56
+ * - Array of specific products based on which products are present
57
+ * (e.g., `['AdGuard', 'UblockOrigin']` if both AdGuard and uBlock Origin are specified)
58
+ * - `['AdGuard', 'UblockOrigin', 'AdblockPlus']` for GenericPlatform.Any
59
+ */
60
+ export declare const platformToAdblockProduct: (platform: AnyPlatform) => AdblockProduct[];
61
+ /**
62
+ * Platforms grouped by product.
63
+ * Maps each product to an array of its platform values.
64
+ */
65
+ export type PlatformsByProduct = Partial<Record<AdblockProduct, AnyPlatform[]>>;
66
+ /**
67
+ * Splits a platform by products, returning a record mapping each product to its platforms.
68
+ * This is useful for iterating over each product separately when validating or processing.
69
+ *
70
+ * The function optimizes the platform representation by combining specific platforms
71
+ * into generic ones when possible, returning the minimal set needed.
72
+ *
73
+ * @param platform Platform to split (can be single or multi-product).
74
+ *
75
+ * @returns Record mapping products to optimized platform arrays:
76
+ * - Empty object `{}` if platform is 0 or no products are found
77
+ * - Object with single product key for single-product platforms
78
+ * - Object with multiple product keys for multi-product platforms
79
+ * - Each array contains the minimal representation using generic platforms where possible
80
+ *
81
+ * @example
82
+ * ```typescript
83
+ * // Multi-product platform
84
+ * const platforms = getPlatformsByProduct(GenericPlatform.AdgAny | GenericPlatform.UboAny);
85
+ * // Returns: {
86
+ * // 'AdGuard': [GenericPlatform.AdgAny],
87
+ * // 'UblockOrigin': [GenericPlatform.UboAny]
88
+ * // }
89
+ *
90
+ * // Mixed specific and generic
91
+ * const mixed = SpecificPlatform.AdgExtChrome | SpecificPlatform.AdgExtFirefox | SpecificPlatform.AdgOsWindows;
92
+ * const result = getPlatformsByProduct(mixed);
93
+ * // Might return: { 'AdGuard': [GenericPlatform.AdgExtChromium, SpecificPlatform.AdgOsWindows] }
94
+ *
95
+ * // Iterate and validate for each product
96
+ * for (const [product, platformList] of Object.entries(platforms)) {
97
+ * for (const p of platformList) {
98
+ * const result = modifierValidator.validate(p, modifier);
99
+ * console.log(`${product}: ${result.valid}`);
100
+ * }
101
+ * }
102
+ * ```
25
103
  */
26
- export declare const isGenericPlatform: (platform: AnyPlatform) => boolean;
104
+ export declare const getPlatformsByProduct: (platform: AnyPlatform) => PlatformsByProduct;
27
105
  /**
28
106
  * Returns the platform enum value for the given platform string name.
29
107
  *
@@ -52,3 +130,34 @@ export declare const getSpecificPlatformName: (platform: SpecificPlatform) => st
52
130
  * @throws Error if the platform is unknown.
53
131
  */
54
132
  export declare const getHumanReadablePlatformName: (platform: AnyPlatform) => string;
133
+ /**
134
+ * Gets all specific platforms for a given AdblockProduct.
135
+ * Results are cached after the first call.
136
+ *
137
+ * @param product AdblockProduct to get specific platforms for.
138
+ *
139
+ * @returns Array of all specific platforms for the given product.
140
+ *
141
+ * @example
142
+ * ```typescript
143
+ * const adgPlatforms = getProductSpecificPlatforms(AdblockProduct.Adg);
144
+ * // Returns: [AdgOsWindows, AdgOsMac, AdgOsAndroid, AdgExtChrome, ...]
145
+ * ```
146
+ */
147
+ export declare const getProductSpecificPlatforms: (product: AdblockProduct) => readonly SpecificPlatform[];
148
+ /**
149
+ * Gets all available platform names from the platform maps.
150
+ *
151
+ * @returns Object containing arrays of all specific and generic platform names.
152
+ *
153
+ * @example
154
+ * ```typescript
155
+ * const { specificPlatformNames, genericPlatformNames } = getAllPlatformNames();
156
+ * // specificPlatformNames: ['adg_os_windows', 'adg_os_mac', 'adg_os_android', ...]
157
+ * // genericPlatformNames: ['adg_os_any', 'adg_safari_any', 'adg_ext_chromium', ...]
158
+ * ```
159
+ */
160
+ export declare const getAllPlatformNames: () => {
161
+ specificPlatformNames: readonly string[];
162
+ genericPlatformNames: readonly string[];
163
+ };
@@ -1,15 +1,15 @@
1
- import { type GenericPlatform, type SpecificPlatform } from '../platforms.js';
1
+ import { type AnyPlatform } from '../platforms.js';
2
2
  import { ResourceType } from '../schemas/resource-type.js';
3
3
  /**
4
4
  * Gets the adblock modifier name for the given resource type.
5
5
  *
6
6
  * @param resourceType Resource type to get the modifier name for.
7
- * @param platform Platform to get the modifier for.
7
+ * @param platform Platform to get the modifier for (can be specific, generic, or combined platforms).
8
8
  *
9
9
  * @returns A string containing the adblock modifier name for the given resource type
10
10
  * or `null` if the modifier could not be found.
11
11
  */
12
- export declare const getResourceTypeModifier: (resourceType: ResourceType, platform: SpecificPlatform | GenericPlatform) => string | null;
12
+ export declare const getResourceTypeModifier: (resourceType: ResourceType, platform: AnyPlatform) => string | null;
13
13
  /**
14
14
  * Checks if the given resource type is valid.
15
15
  *
@@ -37,7 +37,7 @@ export { modifierValidator } from './validator/index.js';
37
37
  export * from './converter/index.js';
38
38
  export { ADG_SCRIPTLET_MASK, AGLINT_COMMAND_PREFIX, COMMA_DOMAIN_LIST_SEPARATOR, NEGATION_MARKER, HINT_MARKER, IF, INCLUDE, MODIFIERS_SEPARATOR, MODIFIER_ASSIGN_OPERATOR, PIPE_MODIFIER_SEPARATOR, NETWORK_RULE_EXCEPTION_MARKER, NETWORK_RULE_SEPARATOR, PREPROCESSOR_MARKER, SAFARI_CB_AFFINITY, UBO_SCRIPTLET_MASK, } from './utils/constants.js';
39
39
  export { BINARY_SCHEMA_VERSION } from './utils/binary-schema-version.js';
40
- export { AdblockSyntax } from './utils/adblockers.js';
40
+ export { AdblockSyntax, AdblockProduct, getHumanReadableProductName } from './utils/adblockers.js';
41
41
  export { type CosmeticRuleSeparatorFinderResult, CosmeticRuleSeparatorUtils } from './utils/cosmetic-rule-separator.js';
42
42
  export { DomainUtils } from './utils/domain.js';
43
43
  export { type VariableTable, LogicalExpressionUtils } from './utils/logical-expression.js';
@@ -51,6 +51,6 @@ export { encodeIntoPolyfill, type TextEncoderPolyfillResult } from './utils/text
51
51
  export { decodeTextPolyfill } from './utils/text-decoder-polyfill.js';
52
52
  export { RuleCategorizer } from './utils/categorizer.js';
53
53
  export { EXT_CSS_PSEUDO_CLASSES, EXT_CSS_LEGACY_ATTRIBUTES, FORBIDDEN_CSS_FUNCTIONS } from './converter/data/css.js';
54
- export { GenericPlatform, SpecificPlatform, modifiersCompatibilityTable, redirectsCompatibilityTable, scriptletsCompatibilityTable, parseRawPlatforms, type CompatibilityTable, type CompatibilityTableRow, type ProductRecords, type RowByProduct, type RowsByProduct, isGenericPlatform, getPlatformId, getSpecificPlatformName, ResourceType, getResourceTypeModifier, isValidResourceType, } from './compatibility-tables/index.js';
54
+ export { GenericPlatform, SpecificPlatform, modifiersCompatibilityTable, redirectsCompatibilityTable, scriptletsCompatibilityTable, parseRawPlatforms, type CompatibilityTable, type CompatibilityTableRow, type ProductRecords, type RowByProduct, type RowsByProduct, isGenericPlatform, getPlatformId, getSpecificPlatformName, hasPlatformMultipleProducts, getProductGenericPlatforms, getProductSpecificPlatforms, platformToAdblockProduct, getPlatformsByProduct, getHumanReadablePlatformName, getAllPlatformNames, ResourceType, getResourceTypeModifier, isValidResourceType, stringifyPlatforms, type PlatformsByProduct, type AnyPlatform, PLATFORM_NEGATION, PLATFORM_SEPARATOR, } from './compatibility-tables/index.js';
55
55
  export { AGTREE_VERSION } from './version.js';
56
56
  export { getSyntaxSerializationMap } from './marshalling-utils/syntax-serialization-map.js';
@@ -1,6 +1,30 @@
1
1
  /**
2
2
  * @file Possible adblock syntaxes are listed here.
3
3
  */
4
+ /**
5
+ * Adblock products (specific adblockers, excludes 'Common').
6
+ */
7
+ export declare const AdblockProduct: {
8
+ /**
9
+ * Adblock Plus.
10
+ *
11
+ * @see {@link https://adblockplus.org/}
12
+ */
13
+ readonly Abp: "AdblockPlus";
14
+ /**
15
+ * uBlock Origin.
16
+ *
17
+ * @see {@link https://github.com/gorhill/uBlock}
18
+ */
19
+ readonly Ubo: "UblockOrigin";
20
+ /**
21
+ * AdGuard.
22
+ *
23
+ * @see {@link https://adguard.com/}
24
+ */
25
+ readonly Adg: "AdGuard";
26
+ };
27
+ export type AdblockProduct = typeof AdblockProduct[keyof typeof AdblockProduct];
4
28
  /**
5
29
  * Possible adblock syntaxes (supported by this library)
6
30
  */
@@ -47,3 +71,24 @@ export declare const AdblockSyntax: {
47
71
  readonly Adg: "AdGuard";
48
72
  };
49
73
  export type AdblockSyntax = typeof AdblockSyntax[keyof typeof AdblockSyntax];
74
+ /**
75
+ * @deprecated Use AdblockProduct instead.
76
+ */
77
+ export type StrictAdblockSyntax = AdblockProduct;
78
+ /**
79
+ * Returns the human-readable name for the given adblock product.
80
+ *
81
+ * @param product Adblock product.
82
+ *
83
+ * @returns Human-readable product name, e.g., 'Adblock Plus', 'uBlock Origin', 'AdGuard'.
84
+ *
85
+ * @throws Error if the product is unknown.
86
+ *
87
+ * @example
88
+ * ```typescript
89
+ * getHumanReadableProductName(AdblockProduct.Abp); // 'Adblock Plus'
90
+ * getHumanReadableProductName(AdblockProduct.Ubo); // 'uBlock Origin'
91
+ * getHumanReadableProductName(AdblockProduct.Adg); // 'AdGuard'
92
+ * ```
93
+ */
94
+ export declare const getHumanReadableProductName: (product: AdblockProduct) => string;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @file Utility for counting set bits in numbers.
3
+ */
4
+ /**
5
+ * Counts the number of set bits (1s) in a 32-bit number using Hamming Weight (SWAR) method.
6
+ *
7
+ * This is a fast bit counting algorithm that uses SWAR (SIMD Within A Register) technique.
8
+ * It's significantly faster than string conversion methods and works in O(1) time.
9
+ *
10
+ * @param a Number to count bits in.
11
+ *
12
+ * @returns The number of bits set to 1.
13
+ *
14
+ * @example
15
+ * ```typescript
16
+ * getBitCount(0); // 0
17
+ * getBitCount(7); // 3 (0b111)
18
+ * getBitCount(0xFF); // 8 (0b11111111)
19
+ * ```
20
+ */
21
+ export declare function getBitCount(a: number): number;
@@ -1,6 +1,8 @@
1
1
  export { ADG_SCRIPTLET_MASK, AGLINT_COMMAND_PREFIX, COMMA_DOMAIN_LIST_SEPARATOR, NEGATION_MARKER, HINT_MARKER, IF, INCLUDE, MODIFIERS_SEPARATOR, MODIFIER_ASSIGN_OPERATOR, PIPE_MODIFIER_SEPARATOR, NETWORK_RULE_EXCEPTION_MARKER, NETWORK_RULE_SEPARATOR, PREPROCESSOR_MARKER, SAFARI_CB_AFFINITY, UBO_SCRIPTLET_MASK, COMMA, PIPE, } from './constants.js';
2
2
  export { BINARY_SCHEMA_VERSION } from './binary-schema-version.js';
3
3
  export { AdblockSyntax } from './adblockers.js';
4
+ export { getBitCount } from './bit-count.js';
5
+ export { type ReadonlyRecord } from './types.js';
4
6
  export { type CosmeticRuleSeparatorFinderResult, CosmeticRuleSeparatorUtils } from './cosmetic-rule-separator.js';
5
7
  export { DomainUtils } from './domain.js';
6
8
  export { type VariableTable, LogicalExpressionUtils } from './logical-expression.js';
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Validates the noop modifier (i.e. only underscores).
3
+ *
4
+ * @param value Value of the modifier.
5
+ *
6
+ * @returns True if the modifier is valid, false otherwise.
7
+ */
8
+ export declare const isValidNoopModifier: (value: string) => boolean;
@@ -9,7 +9,7 @@ export interface Storage<K = string, V = unknown> {
9
9
  * Writes the given data to the storage with the specified key.
10
10
  *
11
11
  * @param key The key to identify the data in the storage.
12
- * @param chunks The data to write to the storage.
12
+ * @param data The data to write to the storage.
13
13
  * @returns A promise that resolves when the write operation is complete.
14
14
  */
15
15
  set(key: K, data: V): Promise<void>;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @file Common utility types.
3
+ */
4
+ /**
5
+ * Readonly record type - makes all properties of a record readonly.
6
+ *
7
+ * @template K Key type (string, number, or symbol).
8
+ * @template V Value type.
9
+ *
10
+ * @example
11
+ * ```typescript
12
+ * const config: ReadonlyRecord<string, number> = {
13
+ * timeout: 1000,
14
+ * retries: 3,
15
+ * };
16
+ * // config is readonly, cannot modify properties
17
+ * ```
18
+ */
19
+ export type ReadonlyRecord<K extends string | number | symbol, V> = {
20
+ readonly [P in K]: V;
21
+ };
@@ -1,12 +1,3 @@
1
- /**
2
- * Prefixes for different adblockers to describe the platform-specific modifiers data
3
- * stored in the yaml files.
4
- */
5
- export declare const BLOCKER_PREFIX: {
6
- AdGuard: string;
7
- UblockOrigin: string;
8
- AdblockPlus: string;
9
- };
10
1
  /**
11
2
  * Set of all allowed characters for app name except the dot `.`.
12
3
  */
@@ -10,14 +10,6 @@ export type ValidationResult = {
10
10
  error?: string;
11
11
  warn?: string;
12
12
  };
13
- /**
14
- * Validates the noop modifier (i.e. only underscores).
15
- *
16
- * @param value Value of the modifier.
17
- *
18
- * @returns True if the modifier is valid, false otherwise.
19
- */
20
- export declare const isValidNoopModifier: (value: string) => boolean;
21
13
  /**
22
14
  * Returns invalid validation result with given error message.
23
15
  *
@@ -2,8 +2,8 @@
2
2
  * @file Validator for modifiers.
3
3
  */
4
4
  import { type Modifier } from '../nodes/index.js';
5
- import { AdblockSyntax } from '../utils/adblockers.js';
6
5
  import { type ValidationResult } from './helpers.js';
6
+ import { type AnyPlatform } from '../compatibility-tables/index.js';
7
7
  /**
8
8
  * Modifier validator class.
9
9
  */
@@ -19,20 +19,21 @@ declare class ModifierValidator {
19
19
  */
20
20
  exists: (modifier: Modifier) => boolean;
21
21
  /**
22
- * Checks whether the given `modifier` is valid for specified `syntax`.
22
+ * Checks whether the given `modifier` is valid for specified `platforms`.
23
+ * It checks whether the modifier is supported by the product, deprecated, assignable, negatable, etc.
23
24
  *
24
- * For `Common` syntax it simply checks whether the modifier exists.
25
- * For specific syntax the validation is more complex
26
- * deprecated, assignable, negatable and other requirements are checked.
27
- *
28
- * @param syntax Adblock syntax to check the modifier for.
29
- * @param rawModifier Modifier AST node.
25
+ * @param platforms Platforms to check the modifier for. Can be a specific platform (e.g., AdgExtChrome)
26
+ * or a generic platform (e.g., AdgAny, UboExtChromium, or combination of multiple products).
27
+ * @param modifier Modifier AST node.
30
28
  * @param isException Whether the modifier is used in exception rule, default to false.
31
29
  * Needed to check whether the modifier is allowed only in blocking or exception rules.
32
30
  *
31
+ * @note For single product: specific platforms use exact lookup, generic platforms use first match.
32
+ * If multiple products are specified (e.g., AdgAny | UboAny), validation is skipped and returns valid.
33
+ *
33
34
  * @returns Result of modifier validation.
34
35
  */
35
- validate: (syntax: AdblockSyntax, rawModifier: Modifier, isException?: boolean) => ValidationResult;
36
+ validate: (platforms: AnyPlatform, modifier: Modifier, isException?: boolean) => ValidationResult;
36
37
  }
37
38
  export declare const modifierValidator: ModifierValidator;
38
39
  export {};
@@ -1,5 +1,5 @@
1
1
  /*
2
- * AGTree v3.3.1 (build date: Tue, 25 Nov 2025 05:36:56 GMT)
2
+ * AGTree v3.4.1 (build date: Fri, 28 Nov 2025 11:48:53 GMT)
3
3
  * (c) 2025 Adguard Software Ltd.
4
4
  * Released under the MIT license
5
5
  * https://github.com/AdguardTeam/tsurlfilter/tree/master/packages/agtree#readme
@@ -7,6 +7,29 @@
7
7
  /**
8
8
  * @file Possible adblock syntaxes are listed here.
9
9
  */
10
+ /**
11
+ * Adblock products (specific adblockers, excludes 'Common').
12
+ */
13
+ const AdblockProduct = {
14
+ /**
15
+ * Adblock Plus.
16
+ *
17
+ * @see {@link https://adblockplus.org/}
18
+ */
19
+ Abp: 'AdblockPlus',
20
+ /**
21
+ * uBlock Origin.
22
+ *
23
+ * @see {@link https://github.com/gorhill/uBlock}
24
+ */
25
+ Ubo: 'UblockOrigin',
26
+ /**
27
+ * AdGuard.
28
+ *
29
+ * @see {@link https://adguard.com/}
30
+ */
31
+ Adg: 'AdGuard',
32
+ };
10
33
  /**
11
34
  * Possible adblock syntaxes (supported by this library)
12
35
  */
@@ -31,7 +54,7 @@ const AdblockSyntax = {
31
54
  * adblockers directly (probably supported by some on-the-fly conversion, but this is not the native syntax).
32
55
  * @see {@link https://adblockplus.org/}
33
56
  */
34
- Abp: 'AdblockPlus',
57
+ Abp: AdblockProduct.Abp,
35
58
  /**
36
59
  * uBlock Origin syntax.
37
60
  *
@@ -40,7 +63,7 @@ const AdblockSyntax = {
40
63
  * adblockers directly (probably supported by some on-the-fly conversion, but this is not the native syntax).
41
64
  * @see {@link https://github.com/gorhill/uBlock}
42
65
  */
43
- Ubo: 'UblockOrigin',
66
+ Ubo: AdblockProduct.Ubo,
44
67
  /**
45
68
  * AdGuard syntax.
46
69
  *
@@ -50,7 +73,38 @@ const AdblockSyntax = {
50
73
  * syntax).
51
74
  * @see {@link https://adguard.com/}
52
75
  */
53
- Adg: 'AdGuard',
76
+ Adg: AdblockProduct.Adg,
77
+ };
78
+ /**
79
+ * Map of adblock products to their human-readable names.
80
+ */
81
+ const PRODUCT_HUMAN_READABLE_NAME_MAP = new Map([
82
+ [AdblockProduct.Abp, 'AdBlock / Adblock Plus'],
83
+ [AdblockProduct.Ubo, 'uBlock Origin'],
84
+ [AdblockProduct.Adg, 'AdGuard'],
85
+ ]);
86
+ /**
87
+ * Returns the human-readable name for the given adblock product.
88
+ *
89
+ * @param product Adblock product.
90
+ *
91
+ * @returns Human-readable product name, e.g., 'Adblock Plus', 'uBlock Origin', 'AdGuard'.
92
+ *
93
+ * @throws Error if the product is unknown.
94
+ *
95
+ * @example
96
+ * ```typescript
97
+ * getHumanReadableProductName(AdblockProduct.Abp); // 'Adblock Plus'
98
+ * getHumanReadableProductName(AdblockProduct.Ubo); // 'uBlock Origin'
99
+ * getHumanReadableProductName(AdblockProduct.Adg); // 'AdGuard'
100
+ * ```
101
+ */
102
+ const getHumanReadableProductName = (product) => {
103
+ const name = PRODUCT_HUMAN_READABLE_NAME_MAP.get(product);
104
+ if (!name) {
105
+ throw new Error(`Unknown product: ${product}`);
106
+ }
107
+ return name;
54
108
  };
55
109
 
56
- export { AdblockSyntax };
110
+ export { AdblockProduct, AdblockSyntax, getHumanReadableProductName };
@@ -1,5 +1,5 @@
1
1
  /*
2
- * AGTree v3.3.1 (build date: Tue, 25 Nov 2025 05:36:56 GMT)
2
+ * AGTree v3.4.1 (build date: Fri, 28 Nov 2025 11:48:53 GMT)
3
3
  * (c) 2025 Adguard Software Ltd.
4
4
  * Released under the MIT license
5
5
  * https://github.com/AdguardTeam/tsurlfilter/tree/master/packages/agtree#readme
@@ -0,0 +1,37 @@
1
+ /*
2
+ * AGTree v3.4.1 (build date: Fri, 28 Nov 2025 11:48:53 GMT)
3
+ * (c) 2025 Adguard Software Ltd.
4
+ * Released under the MIT license
5
+ * https://github.com/AdguardTeam/tsurlfilter/tree/master/packages/agtree#readme
6
+ */
7
+ /* eslint-disable no-param-reassign, no-bitwise */
8
+ /**
9
+ * @file Utility for counting set bits in numbers.
10
+ */
11
+ /**
12
+ * Counts the number of set bits (1s) in a 32-bit number using Hamming Weight (SWAR) method.
13
+ *
14
+ * This is a fast bit counting algorithm that uses SWAR (SIMD Within A Register) technique.
15
+ * It's significantly faster than string conversion methods and works in O(1) time.
16
+ *
17
+ * @param a Number to count bits in.
18
+ *
19
+ * @returns The number of bits set to 1.
20
+ *
21
+ * @example
22
+ * ```typescript
23
+ * getBitCount(0); // 0
24
+ * getBitCount(7); // 3 (0b111)
25
+ * getBitCount(0xFF); // 8 (0b11111111)
26
+ * ```
27
+ */
28
+ function getBitCount(a) {
29
+ a -= ((a >>> 1) & 0x55555555);
30
+ a = (a & 0x33333333) + ((a >>> 2) & 0x33333333);
31
+ a = (a + (a >>> 4)) & 0x0F0F0F0F;
32
+ a += (a >>> 8);
33
+ a += (a >>> 16);
34
+ return a & 0x3F;
35
+ }
36
+
37
+ export { getBitCount };
@@ -1,5 +1,5 @@
1
1
  /*
2
- * AGTree v3.3.1 (build date: Tue, 25 Nov 2025 05:36:56 GMT)
2
+ * AGTree v3.4.1 (build date: Fri, 28 Nov 2025 11:48:53 GMT)
3
3
  * (c) 2025 Adguard Software Ltd.
4
4
  * Released under the MIT license
5
5
  * https://github.com/AdguardTeam/tsurlfilter/tree/master/packages/agtree#readme
@@ -1,5 +1,5 @@
1
1
  /*
2
- * AGTree v3.3.1 (build date: Tue, 25 Nov 2025 05:36:56 GMT)
2
+ * AGTree v3.4.1 (build date: Fri, 28 Nov 2025 11:48:53 GMT)
3
3
  * (c) 2025 Adguard Software Ltd.
4
4
  * Released under the MIT license
5
5
  * https://github.com/AdguardTeam/tsurlfilter/tree/master/packages/agtree#readme
@@ -1,5 +1,5 @@
1
1
  /*
2
- * AGTree v3.3.1 (build date: Tue, 25 Nov 2025 05:36:56 GMT)
2
+ * AGTree v3.4.1 (build date: Fri, 28 Nov 2025 11:48:53 GMT)
3
3
  * (c) 2025 Adguard Software Ltd.
4
4
  * Released under the MIT license
5
5
  * https://github.com/AdguardTeam/tsurlfilter/tree/master/packages/agtree#readme
@@ -1,5 +1,5 @@
1
1
  /*
2
- * AGTree v3.3.1 (build date: Tue, 25 Nov 2025 05:36:56 GMT)
2
+ * AGTree v3.4.1 (build date: Fri, 28 Nov 2025 11:48:53 GMT)
3
3
  * (c) 2025 Adguard Software Ltd.
4
4
  * Released under the MIT license
5
5
  * https://github.com/AdguardTeam/tsurlfilter/tree/master/packages/agtree#readme
@@ -1,5 +1,5 @@
1
1
  /*
2
- * AGTree v3.3.1 (build date: Tue, 25 Nov 2025 05:36:56 GMT)
2
+ * AGTree v3.4.1 (build date: Fri, 28 Nov 2025 11:48:53 GMT)
3
3
  * (c) 2025 Adguard Software Ltd.
4
4
  * Released under the MIT license
5
5
  * https://github.com/AdguardTeam/tsurlfilter/tree/master/packages/agtree#readme
@@ -1,5 +1,5 @@
1
1
  /*
2
- * AGTree v3.3.1 (build date: Tue, 25 Nov 2025 05:36:56 GMT)
2
+ * AGTree v3.4.1 (build date: Fri, 28 Nov 2025 11:48:53 GMT)
3
3
  * (c) 2025 Adguard Software Ltd.
4
4
  * Released under the MIT license
5
5
  * https://github.com/AdguardTeam/tsurlfilter/tree/master/packages/agtree#readme
@@ -1,5 +1,5 @@
1
1
  /*
2
- * AGTree v3.3.1 (build date: Tue, 25 Nov 2025 05:36:56 GMT)
2
+ * AGTree v3.4.1 (build date: Fri, 28 Nov 2025 11:48:53 GMT)
3
3
  * (c) 2025 Adguard Software Ltd.
4
4
  * Released under the MIT license
5
5
  * https://github.com/AdguardTeam/tsurlfilter/tree/master/packages/agtree#readme
@@ -1,5 +1,5 @@
1
1
  /*
2
- * AGTree v3.3.1 (build date: Tue, 25 Nov 2025 05:36:56 GMT)
2
+ * AGTree v3.4.1 (build date: Fri, 28 Nov 2025 11:48:53 GMT)
3
3
  * (c) 2025 Adguard Software Ltd.
4
4
  * Released under the MIT license
5
5
  * https://github.com/AdguardTeam/tsurlfilter/tree/master/packages/agtree#readme
@@ -1,5 +1,5 @@
1
1
  /*
2
- * AGTree v3.3.1 (build date: Tue, 25 Nov 2025 05:36:56 GMT)
2
+ * AGTree v3.4.1 (build date: Fri, 28 Nov 2025 11:48:53 GMT)
3
3
  * (c) 2025 Adguard Software Ltd.
4
4
  * Released under the MIT license
5
5
  * https://github.com/AdguardTeam/tsurlfilter/tree/master/packages/agtree#readme
@@ -7,6 +7,7 @@
7
7
  export { ADG_SCRIPTLET_MASK, AGLINT_COMMAND_PREFIX, COMMA, COMMA_DOMAIN_LIST_SEPARATOR, HINT_MARKER, IF, INCLUDE, MODIFIERS_SEPARATOR, MODIFIER_ASSIGN_OPERATOR, NEGATION_MARKER, NETWORK_RULE_EXCEPTION_MARKER, NETWORK_RULE_SEPARATOR, PIPE, PIPE_MODIFIER_SEPARATOR, PREPROCESSOR_MARKER, SAFARI_CB_AFFINITY, UBO_SCRIPTLET_MASK } from './constants.js';
8
8
  export { BINARY_SCHEMA_VERSION } from './binary-schema-version.js';
9
9
  export { AdblockSyntax } from './adblockers.js';
10
+ export { getBitCount } from './bit-count.js';
10
11
  export { CosmeticRuleSeparatorUtils } from './cosmetic-rule-separator.js';
11
12
  export { DomainUtils } from './domain.js';
12
13
  export { LogicalExpressionUtils } from './logical-expression.js';
@@ -1,5 +1,5 @@
1
1
  /*
2
- * AGTree v3.3.1 (build date: Tue, 25 Nov 2025 05:36:56 GMT)
2
+ * AGTree v3.4.1 (build date: Fri, 28 Nov 2025 11:48:53 GMT)
3
3
  * (c) 2025 Adguard Software Ltd.
4
4
  * Released under the MIT license
5
5
  * https://github.com/AdguardTeam/tsurlfilter/tree/master/packages/agtree#readme
@@ -1,5 +1,5 @@
1
1
  /*
2
- * AGTree v3.3.1 (build date: Tue, 25 Nov 2025 05:36:56 GMT)
2
+ * AGTree v3.4.1 (build date: Fri, 28 Nov 2025 11:48:53 GMT)
3
3
  * (c) 2025 Adguard Software Ltd.
4
4
  * Released under the MIT license
5
5
  * https://github.com/AdguardTeam/tsurlfilter/tree/master/packages/agtree#readme
@@ -1,5 +1,5 @@
1
1
  /*
2
- * AGTree v3.3.1 (build date: Tue, 25 Nov 2025 05:36:56 GMT)
2
+ * AGTree v3.4.1 (build date: Fri, 28 Nov 2025 11:48:53 GMT)
3
3
  * (c) 2025 Adguard Software Ltd.
4
4
  * Released under the MIT license
5
5
  * https://github.com/AdguardTeam/tsurlfilter/tree/master/packages/agtree#readme
@@ -1,5 +1,5 @@
1
1
  /*
2
- * AGTree v3.3.1 (build date: Tue, 25 Nov 2025 05:36:56 GMT)
2
+ * AGTree v3.4.1 (build date: Fri, 28 Nov 2025 11:48:53 GMT)
3
3
  * (c) 2025 Adguard Software Ltd.
4
4
  * Released under the MIT license
5
5
  * https://github.com/AdguardTeam/tsurlfilter/tree/master/packages/agtree#readme