@duckduckgo/autoconsent 17.3.0 → 18.0.0
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.
- package/.prettierignore +1 -0
- package/AGENTS.md +2 -0
- package/CHANGELOG.md +90 -0
- package/dist/addon-firefox/background.bundle.js +28 -7
- package/dist/addon-firefox/compact-rules.json +1 -1
- package/dist/addon-firefox/content.bundle.js +624 -54
- package/dist/addon-firefox/manifest.json +1 -1
- package/dist/addon-firefox/popup.bundle.js +19 -7
- package/dist/addon-firefox/rule-index.json +1 -1
- package/dist/addon-firefox/rules.json +1 -1
- package/dist/addon-mv3/background.bundle.js +28 -7
- package/dist/addon-mv3/compact-rules.json +1 -1
- package/dist/addon-mv3/content.bundle.js +624 -54
- package/dist/addon-mv3/manifest.json +1 -1
- package/dist/addon-mv3/popup.bundle.js +19 -7
- package/dist/addon-mv3/rule-index.json +1 -1
- package/dist/addon-mv3/rules.json +1 -1
- package/dist/autoconsent.cjs.js +630 -60
- package/dist/autoconsent.esm.js +630 -60
- package/dist/autoconsent.playwright.js +624 -54
- package/dist/autoconsent.standalone.js +631 -61
- package/dist/heuristics.cjs.js +621 -52
- package/dist/heuristics.mjs +609 -50
- package/dist/types/cmps/trustarc-top.d.ts +1 -0
- package/dist/types/eval-snippets.d.ts +2 -0
- package/dist/types/heuristic-classify.d.ts +2 -6
- package/dist/types/heuristic-detect.d.ts +32 -0
- package/dist/types/heuristic-literals.d.ts +1 -0
- package/dist/types/heuristic-negatives.d.ts +25 -0
- package/dist/types/heuristic-patterns.d.ts +18 -2
- package/dist/types/heuristic-prefilter.d.ts +13 -0
- package/docs/heuristic-detection.md +78 -0
- package/docs/heuristic-prefilter.md +62 -0
- package/eslint.config.mjs +16 -1
- package/lib/cmps/admiral.ts +10 -0
- package/lib/cmps/trustarc-top.ts +10 -1
- package/lib/eval-snippets.ts +9 -0
- package/lib/heuristic-classify.ts +4 -39
- package/lib/heuristic-detect.ts +209 -0
- package/lib/heuristic-literals.ts +207 -0
- package/lib/heuristic-negatives.ts +173 -0
- package/lib/heuristic-patterns.ts +104 -31
- package/lib/heuristic-prefilter.ts +40 -0
- package/lib/heuristics.ts +8 -4
- package/lib/web.ts +1 -1
- package/package.json +2 -1
- package/rules/autoconsent/adblockplus.json +94 -0
- package/rules/autoconsent/alertamodal-cookies.json +29 -0
- package/rules/autoconsent/altamar-cookieconsent.json +45 -0
- package/rules/autoconsent/autohero.json +49 -0
- package/rules/autoconsent/bing.com-notice-cosmetic.json +28 -0
- package/rules/autoconsent/bing.com-notice.json +13 -0
- package/rules/autoconsent/binogi.json +32 -0
- package/rules/autoconsent/bokio.json +32 -0
- package/rules/autoconsent/botble-cookie-consent.json +16 -0
- package/rules/autoconsent/bsgdprcookies.json +16 -0
- package/rules/autoconsent/calcolo-tools.json +23 -0
- package/rules/autoconsent/casasrurales.json +15 -0
- package/rules/autoconsent/ccoo.json +40 -0
- package/rules/autoconsent/cdu-edu-au.json +29 -0
- package/rules/autoconsent/cnmc-gob-es.json +14 -0
- package/rules/autoconsent/comparandonos.json +66 -0
- package/rules/autoconsent/consent-backdrop.json +34 -0
- package/rules/autoconsent/consilium-europa-eu.json +35 -0
- package/rules/autoconsent/cookie-accordion-settings.json +56 -0
- package/rules/autoconsent/cookies-tip-v1.json +9 -0
- package/rules/autoconsent/cookiesplus.json +20 -0
- package/rules/autoconsent/crtm.json +36 -0
- package/rules/autoconsent/dtu-findit.json +47 -0
- package/rules/autoconsent/edebe.json +22 -0
- package/rules/autoconsent/eduardolosilla.json +12 -0
- package/rules/autoconsent/educastur-alojaweb.json +13 -0
- package/rules/autoconsent/flatsome-cookies.json +25 -0
- package/rules/autoconsent/gameforge.json +42 -0
- package/rules/autoconsent/gamefound-com.json +12 -0
- package/rules/autoconsent/generalitat-catalunya.json +15 -0
- package/rules/autoconsent/hikvision.com.json +18 -0
- package/rules/autoconsent/hurra-consent.json +16 -0
- package/rules/autoconsent/ihavecookies.json +5 -1
- package/rules/autoconsent/imarina.json +25 -0
- package/rules/autoconsent/isidewith.com.json +38 -0
- package/rules/autoconsent/jobtoday.json +18 -0
- package/rules/autoconsent/kaggle.json +21 -0
- package/rules/autoconsent/landgate.json +10 -0
- package/rules/autoconsent/mblock.json +28 -0
- package/rules/autoconsent/mirasvit-gdpr.json +18 -7
- package/rules/autoconsent/mites.gob.es.json +18 -0
- package/rules/autoconsent/pakamera.json +19 -0
- package/rules/autoconsent/purecookie-cosmetic.json +13 -0
- package/rules/autoconsent/random-org.json +41 -0
- package/rules/autoconsent/react-cookie-consent-cosmetic.json +40 -0
- package/rules/autoconsent/supercontable.json +19 -0
- package/rules/autoconsent/tallink.json +13 -0
- package/rules/autoconsent/tealium.json +4 -1
- package/rules/autoconsent/tusclasesparticulares.com.json +14 -0
- package/rules/autoconsent/typo3-cookieconsent.json +9 -0
- package/rules/autoconsent/udg.edu.json +47 -0
- package/rules/autoconsent/uned-barbastro.json +58 -0
- package/rules/autoconsent/uregina.json +35 -0
- package/rules/autoconsent/vinnies-org-au.json +29 -0
- package/rules/autoconsent/vrg-bottom-cookies.json +52 -0
- package/rules/autoconsent/wiki.gg.json +1 -1
- package/rules/compact-rules.json +1 -1
- package/rules/rule-index.json +1 -1
- package/rules/rules.json +1 -1
- package/scripts/build-heuristic-literals.ts +24 -0
- package/scripts/required-literals.ts +177 -0
- package/tests/adblockplus.spec.ts +7 -0
- package/tests/admiral.spec.ts +5 -4
- package/tests/alertamodal-cookies.spec.ts +8 -0
- package/tests/altamar-cookieconsent.spec.ts +6 -0
- package/tests/autohero.spec.ts +3 -0
- package/tests/bing.com-notice-cosmetic.spec.ts +5 -0
- package/tests/bing.com-notice.spec.ts +6 -0
- package/tests/binogi.spec.ts +3 -0
- package/tests/bokio.spec.ts +6 -0
- package/tests/botble-cookie-consent.spec.ts +11 -0
- package/tests/bsgdprcookies.spec.ts +6 -0
- package/tests/calcolo-tools.spec.ts +3 -0
- package/tests/casasrurales.spec.ts +3 -0
- package/tests/ccoo.spec.ts +5 -0
- package/tests/cdu-edu-au.spec.ts +3 -0
- package/tests/cnmc-gob-es.spec.ts +3 -0
- package/tests/comparandonos.spec.ts +3 -0
- package/tests/consent-backdrop.spec.ts +9 -0
- package/tests/consilium-europa-eu.spec.ts +3 -0
- package/tests/cookie-accordion-settings.spec.ts +5 -0
- package/tests/cookies-tip-v1.spec.ts +3 -0
- package/tests/cookiesplus.spec.ts +6 -0
- package/tests/crtm.spec.ts +3 -0
- package/tests/dtu-findit.spec.ts +3 -0
- package/tests/edebe.spec.ts +3 -0
- package/tests/eduardolosilla.spec.ts +3 -0
- package/tests/educastur-alojaweb.spec.ts +6 -0
- package/tests/flatsome-cookies.spec.ts +3 -0
- package/tests/gameforge.spec.ts +8 -0
- package/tests/gamefound-com.spec.ts +3 -0
- package/tests/generalitat-catalunya.spec.ts +3 -0
- package/tests/hikvision.com.spec.ts +3 -0
- package/tests/hurra-consent.spec.ts +8 -0
- package/tests/ihavecookies.spec.ts +7 -1
- package/tests/imarina.spec.ts +8 -0
- package/tests/isidewith.com.spec.ts +3 -0
- package/tests/jobtoday.spec.ts +5 -0
- package/tests/kaggle.spec.ts +3 -0
- package/tests/landgate.spec.ts +3 -0
- package/tests/mblock.spec.ts +3 -0
- package/tests/mirasvit-gdpr.spec.ts +5 -0
- package/tests/mites.gob.es.spec.ts +3 -0
- package/tests/pakamera.spec.ts +5 -0
- package/tests/purecookie-cosmetic.spec.ts +8 -0
- package/tests/random-org.spec.ts +3 -0
- package/tests/react-cookie-consent-cosmetic.spec.ts +9 -0
- package/tests/supercontable.spec.ts +3 -0
- package/tests/tallink.spec.ts +3 -0
- package/tests/trustarc.spec.ts +7 -0
- package/tests/tusclasesparticulares.com.spec.ts +3 -0
- package/tests/typo3-cookieconsent.spec.ts +10 -0
- package/tests/udg.edu.spec.ts +3 -0
- package/tests/uned-barbastro.spec.ts +3 -0
- package/tests/uregina.spec.ts +3 -0
- package/tests/vinnies-org-au.spec.ts +3 -0
- package/tests/vrg-bottom-cookies.spec.ts +3 -0
- package/tests-wtr/heuristics/heuristics-utils.test.ts +222 -8
- package/tests-wtr/heuristics/regex-syntax.test.ts +81 -0
- package/rules/generated/auto_CA_promessedefleurs.com_noy.json +0 -40
- package/rules/generated/auto_FR_ludum.fr_gl5.json +0 -40
- package/rules/generated/auto_FR_meillandrichardier.com_c2f.json +0 -40
- package/rules/generated/auto_NL_bonprix.nl_ovi.json +0 -40
- package/tests/generated/auto_CA_promessedefleurs.com_noy.spec.ts +0 -6
- package/tests/generated/auto_FR_ludum.fr_gl5.spec.ts +0 -2
- package/tests/generated/auto_FR_meillandrichardier.com_c2f.spec.ts +0 -6
- package/tests/generated/auto_NL_bonprix.nl_ovi.spec.ts +0 -2
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import { expect } from '@esm-bundle/chai';
|
|
2
2
|
import {
|
|
3
3
|
checkHeuristicPatterns,
|
|
4
|
+
hasHeuristicPatterns,
|
|
4
5
|
cleanButtonText,
|
|
5
6
|
classifyButtonTextRegex,
|
|
6
7
|
classifyButtons,
|
|
7
8
|
classifyPopup,
|
|
8
|
-
|
|
9
|
+
excludedBy,
|
|
10
|
+
negativeContext,
|
|
11
|
+
DETECT_PATTERNS,
|
|
9
12
|
} from '../../lib/heuristic-classify';
|
|
13
|
+
import { detectLiteralTable, requiredLiterals } from '../../scripts/required-literals';
|
|
14
|
+
import { DETECT_PATTERN_LITERALS } from '../../lib/heuristic-literals';
|
|
10
15
|
import { getActionablePopups, isDisabled, excludeContainers, getButtonData, isDialogLikeElement } from '../../lib/heuristics';
|
|
11
16
|
import { ButtonData } from '../../lib/types';
|
|
12
17
|
|
|
@@ -20,28 +25,30 @@ function nonRejectButtons(buttons: ButtonData[]) {
|
|
|
20
25
|
|
|
21
26
|
describe('checkHeuristicPatterns', () => {
|
|
22
27
|
it('detects cookie-related text', () => {
|
|
23
|
-
const { patterns, snippets } = checkHeuristicPatterns('We use cookies here', [/we use cookies/gi]);
|
|
28
|
+
const { patterns, snippets } = checkHeuristicPatterns('We use cookies here', undefined, { patterns: [/we use cookies/gi] });
|
|
24
29
|
|
|
25
30
|
expect(patterns.length).to.be.greaterThan(0);
|
|
26
31
|
expect(snippets.length).to.be.greaterThan(0);
|
|
27
32
|
});
|
|
28
33
|
|
|
29
34
|
it('returns empty arrays for unrelated text', () => {
|
|
30
|
-
const { patterns, snippets } = checkHeuristicPatterns('Welcome to our website', [/we use cookies/gi]);
|
|
35
|
+
const { patterns, snippets } = checkHeuristicPatterns('Welcome to our website', undefined, { patterns: [/we use cookies/gi] });
|
|
31
36
|
|
|
32
37
|
expect(patterns).to.have.length(0);
|
|
33
38
|
expect(snippets).to.have.length(0);
|
|
34
39
|
});
|
|
35
40
|
|
|
36
41
|
it('returns empty arrays for empty text', () => {
|
|
37
|
-
const { patterns, snippets } = checkHeuristicPatterns('', [/we use cookies/gi]);
|
|
42
|
+
const { patterns, snippets } = checkHeuristicPatterns('', undefined, { patterns: [/we use cookies/gi] });
|
|
38
43
|
|
|
39
44
|
expect(patterns).to.have.length(0);
|
|
40
45
|
expect(snippets).to.have.length(0);
|
|
41
46
|
});
|
|
42
47
|
|
|
43
48
|
it('does not match after the text limit', () => {
|
|
44
|
-
const { patterns, snippets } = checkHeuristicPatterns('X'.repeat(100000) + 'We use cookies here',
|
|
49
|
+
const { patterns, snippets } = checkHeuristicPatterns('X'.repeat(100000) + 'We use cookies here', undefined, {
|
|
50
|
+
patterns: [/we use cookies/gi],
|
|
51
|
+
});
|
|
45
52
|
|
|
46
53
|
expect(patterns).to.have.length(0);
|
|
47
54
|
expect(snippets).to.have.length(0);
|
|
@@ -52,7 +59,9 @@ describe('checkHeuristicPatterns', () => {
|
|
|
52
59
|
// no `g` flag. `String.prototype.match` returns `undefined` entries for optional
|
|
53
60
|
// groups that did not match, which used to crash the caller with a TypeError.
|
|
54
61
|
const pattern = /(używamy|stosujemy)( są)?.{0,20} plik(i|ów|ach) cookie/i;
|
|
55
|
-
const { patterns, snippets } = checkHeuristicPatterns('Używamy plików cookie i innych technologii',
|
|
62
|
+
const { patterns, snippets } = checkHeuristicPatterns('Używamy plików cookie i innych technologii', undefined, {
|
|
63
|
+
patterns: [pattern],
|
|
64
|
+
});
|
|
56
65
|
|
|
57
66
|
expect(patterns.length).to.be.greaterThan(0);
|
|
58
67
|
expect(snippets.length).to.be.greaterThan(0);
|
|
@@ -93,7 +102,9 @@ describe('checkHeuristicPatterns with qualifiers before "cookies"', () => {
|
|
|
93
102
|
|
|
94
103
|
it('does not match when "cookies" is further away', () => {
|
|
95
104
|
expect(
|
|
96
|
-
checkHeuristicPatterns('We use the best chocolate in our cookies',
|
|
105
|
+
checkHeuristicPatterns('We use the best chocolate in our cookies', undefined, {
|
|
106
|
+
patterns: [/we (?:use|serve)(?: \w+){0,2} cookies/gi],
|
|
107
|
+
}).patterns,
|
|
97
108
|
).to.have.length(0);
|
|
98
109
|
});
|
|
99
110
|
});
|
|
@@ -181,6 +192,129 @@ describe('checkHeuristicPatterns with Japanese popups', () => {
|
|
|
181
192
|
});
|
|
182
193
|
});
|
|
183
194
|
|
|
195
|
+
describe('checkHeuristicPatterns with inputs and context negatives', () => {
|
|
196
|
+
it('runs patterns scoped to an input on that input only', () => {
|
|
197
|
+
const patterns = [{ pattern: /accept all/gi, input: 'popup' as const }];
|
|
198
|
+
expect(checkHeuristicPatterns('Accept all', 'popup', { patterns }).patterns).to.have.length(1);
|
|
199
|
+
expect(checkHeuristicPatterns('Accept all', 'page', { patterns }).patterns).to.have.length(0);
|
|
200
|
+
expect(checkHeuristicPatterns('Accept all', undefined, { patterns }).patterns).to.have.length(0);
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
it('drops a match whose context hits a negative, and keeps the text if another match survives', () => {
|
|
204
|
+
const negatives = [{ name: 'footer', pattern: /^[^.\n]{0,60}\n[^.\n]{0,60}$/, lines: [0, 1] as [number, number] }];
|
|
205
|
+
const footer = 'Contact\nUse of cookies\nImprint';
|
|
206
|
+
const dropped = checkHeuristicPatterns(footer, 'page', { patterns: [/use of cookies/gi], negatives });
|
|
207
|
+
expect(dropped.patterns).to.have.length(0);
|
|
208
|
+
expect(dropped.suppressed).to.deep.equal([{ pattern: '/use of cookies/gi', negative: 'footer' }]);
|
|
209
|
+
const both = `We ask for your consent to the use of cookies on this site. Accept or reject.\n\n${footer}`;
|
|
210
|
+
expect(checkHeuristicPatterns(both, 'page', { patterns: [/use of cookies/gi], negatives }).patterns).to.have.length(1);
|
|
211
|
+
});
|
|
212
|
+
|
|
213
|
+
it('keeps a match when the negative unless wording is present', () => {
|
|
214
|
+
const negatives = [{ name: 'terms', pattern: /\bterms\b/i, unless: /cookie/i, window: 80 }];
|
|
215
|
+
expect(
|
|
216
|
+
checkHeuristicPatterns('By continuing you accept our terms.', undefined, { patterns: [/by continuing/gi], negatives }).patterns,
|
|
217
|
+
).to.have.length(0);
|
|
218
|
+
expect(
|
|
219
|
+
checkHeuristicPatterns('By continuing you accept our terms and cookies.', undefined, {
|
|
220
|
+
patterns: [/by continuing/gi],
|
|
221
|
+
negatives,
|
|
222
|
+
}).patterns,
|
|
223
|
+
).to.have.length(1);
|
|
224
|
+
});
|
|
225
|
+
|
|
226
|
+
it('does not count "accept all" in prose', () => {
|
|
227
|
+
expect(checkHeuristicPatterns('We accept all major credit cards.', 'page').patterns).to.not.include('/accept all/gi');
|
|
228
|
+
expect(checkHeuristicPatterns('Cookies help us.\nAccept all\nReject all', 'popup').patterns).to.include('/accept all/gi');
|
|
229
|
+
});
|
|
230
|
+
|
|
231
|
+
it('drops page matches next to an age gate with a leave button, not next to a consent control', () => {
|
|
232
|
+
const gate = 'Adults only. You must be over 18 to enter.\nThis site uses cookies.\n\nOK\nLeave';
|
|
233
|
+
expect(checkHeuristicPatterns(gate, 'page').patterns).to.have.length(0);
|
|
234
|
+
const banner = 'Adults only. You must be over 18 to enter.\nThis site uses cookies.\n\nAccept all\nReject all';
|
|
235
|
+
expect(checkHeuristicPatterns(banner, 'page').patterns.length).to.be.greaterThan(0);
|
|
236
|
+
});
|
|
237
|
+
|
|
238
|
+
it('detects Italian, Dutch and German cookie notices', () => {
|
|
239
|
+
expect(checkHeuristicPatterns('Questo sito utilizza cookie tecnici. Accetta tutti', 'popup').patterns.length).to.be.greaterThan(0);
|
|
240
|
+
expect(
|
|
241
|
+
checkHeuristicPatterns('Wij en onze partners slaan informatie op en/of lezen deze.', 'popup').patterns.length,
|
|
242
|
+
).to.be.greaterThan(0);
|
|
243
|
+
expect(checkHeuristicPatterns('Auf dieser Seite werden Cookies verwendet.', 'popup').patterns.length).to.be.greaterThan(0);
|
|
244
|
+
});
|
|
245
|
+
|
|
246
|
+
it('hasHeuristicPatterns agrees with checkHeuristicPatterns on inputs and negatives', () => {
|
|
247
|
+
const texts = ['We accept all major credit cards.', 'Cookies help us.\nAccept all\nReject all', 'Contact\nUse of cookies\nImprint'];
|
|
248
|
+
for (const text of texts) {
|
|
249
|
+
for (const input of ['popup', 'page'] as const) {
|
|
250
|
+
const expected = checkHeuristicPatterns(text, input).patterns.length > 0;
|
|
251
|
+
expect(hasHeuristicPatterns(text, input), `${input}: ${text}`).to.equal(expected);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
});
|
|
255
|
+
|
|
256
|
+
it('rejects a pattern list as the input argument', () => {
|
|
257
|
+
const legacy = checkHeuristicPatterns as unknown as (text: string, patterns: RegExp[]) => unknown;
|
|
258
|
+
expect(() => legacy('We use cookies', [/we use cookies/gi])).to.throw(TypeError, /patterns/);
|
|
259
|
+
expect(() => (hasHeuristicPatterns as unknown as (t: string, i: string) => boolean)('We use cookies', 'frame')).to.throw(TypeError);
|
|
260
|
+
});
|
|
261
|
+
|
|
262
|
+
it('takes the line or neighbouring lines as the context', () => {
|
|
263
|
+
const text = 'one\ntwo\nthree four\nfive\nsix';
|
|
264
|
+
const at = text.indexOf('four');
|
|
265
|
+
expect(negativeContext(text, at, at + 4, { name: 'n', lines: 0 })).to.equal('three four');
|
|
266
|
+
expect(negativeContext(text, at, at + 4, { name: 'n', lines: [1, 0] })).to.equal('two\nthree four');
|
|
267
|
+
expect(negativeContext(text, at, at + 4, { name: 'n', window: 3 })).to.equal('ee four\nfi');
|
|
268
|
+
});
|
|
269
|
+
});
|
|
270
|
+
|
|
271
|
+
describe('requiredLiterals', () => {
|
|
272
|
+
it('matches the generated table for the built-in patterns (run npm run build-heuristic-literals if not)', () => {
|
|
273
|
+
expect(DETECT_PATTERN_LITERALS).to.deep.equal(detectLiteralTable());
|
|
274
|
+
});
|
|
275
|
+
|
|
276
|
+
it('finds literals every match contains', () => {
|
|
277
|
+
expect(requiredLiterals(/accept all/gi)).to.deep.equal(['accept all']);
|
|
278
|
+
expect(requiredLiterals(/\b(?:our|unseren) \d{2,4} (?:partners|partnern)\b/gi)).to.deep.equal(['partners', 'partnern']);
|
|
279
|
+
expect(requiredLiterals(/\bcookies? zum einsatz\b|\beinsatz von cookies\b/gi)).to.deep.equal([
|
|
280
|
+
' zum einsatz',
|
|
281
|
+
'einsatz von cookies',
|
|
282
|
+
]);
|
|
283
|
+
});
|
|
284
|
+
|
|
285
|
+
it('finds none when a part is optional or unknown', () => {
|
|
286
|
+
expect(requiredLiterals(/(?:cookie)?/gi)).to.deep.equal([]);
|
|
287
|
+
expect(requiredLiterals(/by continuing|\bab\b/gi)).to.deep.equal([]);
|
|
288
|
+
});
|
|
289
|
+
|
|
290
|
+
it('does not read the characters of a multi-character escape as literals', () => {
|
|
291
|
+
// built from strings: the bundler would turn some escapes in regex literals into the characters themselves
|
|
292
|
+
const literals = (source: string, flags = 'i') => requiredLiterals(new RegExp(source, flags));
|
|
293
|
+
// each literal must appear in text the pattern matches, such as "café cookies" or "Abcde"
|
|
294
|
+
expect(literals('caf\\u00e9 cookies')).to.deep.equal([' cookies']);
|
|
295
|
+
expect(literals('\\u{e9}tat des cookies', 'iu')).to.deep.equal(['tat des cookies']);
|
|
296
|
+
expect(literals('\\x41bcde')).to.deep.equal(['bcde']);
|
|
297
|
+
expect(literals('\\p{L}+ cookie banner', 'iu')).to.deep.equal([' cookie banner']);
|
|
298
|
+
expect(literals('(?<w>allow)\\k<w> cookies')).to.deep.equal([' cookies']);
|
|
299
|
+
expect(literals('\\cJcookie notice', '')).to.deep.equal(['cookie notice']);
|
|
300
|
+
});
|
|
301
|
+
|
|
302
|
+
it('does not change results: the same patterns match as without the prefilter', () => {
|
|
303
|
+
const plain = DETECT_PATTERNS.filter((p): p is RegExp => p instanceof RegExp);
|
|
304
|
+
const texts = ['ACCEPT ALL COOKIES', 'We use analytics Cookies', 'nothing here', 'Tout refuser', 'Utilizziamo i cookie', ''];
|
|
305
|
+
for (const t of texts) {
|
|
306
|
+
const expected = plain.filter((p) => t.match(p)).map(String);
|
|
307
|
+
expect(checkHeuristicPatterns(t, undefined, { patterns: plain, negatives: [] }).patterns).to.deep.equal(expected);
|
|
308
|
+
}
|
|
309
|
+
});
|
|
310
|
+
|
|
311
|
+
it('never skips a custom pattern, which has no generated literals', () => {
|
|
312
|
+
expect(
|
|
313
|
+
checkHeuristicPatterns('Zorblax consent', undefined, { patterns: [/zorblax consent/gi], negatives: [] }).patterns,
|
|
314
|
+
).to.deep.equal(['/zorblax consent/gi']);
|
|
315
|
+
});
|
|
316
|
+
});
|
|
317
|
+
|
|
184
318
|
describe('checkHeuristicPatterns with Danish popups', () => {
|
|
185
319
|
it('detects Danish cookie notices', () => {
|
|
186
320
|
const texts = [
|
|
@@ -214,7 +348,10 @@ describe('checkHeuristicPatterns with Norwegian popups', () => {
|
|
|
214
348
|
});
|
|
215
349
|
});
|
|
216
350
|
|
|
217
|
-
|
|
351
|
+
// excluded as a popup by a whole-text context negative
|
|
352
|
+
const isExcludedPopup = (text: string) => excludedBy(text, 'popup').length > 0;
|
|
353
|
+
|
|
354
|
+
describe('popup exclusions', () => {
|
|
218
355
|
it('flags doublelist-style age verification popups', () => {
|
|
219
356
|
// Real-world text from the doublelist.com age gate (listings page)
|
|
220
357
|
const text =
|
|
@@ -228,6 +365,13 @@ describe('isExcludedPopup', () => {
|
|
|
228
365
|
expect(isExcludedPopup('Age verification\nYou must confirm your age to continue.')).to.be.true;
|
|
229
366
|
});
|
|
230
367
|
|
|
368
|
+
it('flags an age gate whose only button is a bare accept, but not one with a cookie reject', () => {
|
|
369
|
+
const gate = 'Age verification\nYou must be over 18 years old to enter. This site uses cookies.';
|
|
370
|
+
expect(isExcludedPopup(`${gate}\nAccept all`)).to.be.true;
|
|
371
|
+
expect(isExcludedPopup(`${gate}\nAccepter`)).to.be.true;
|
|
372
|
+
expect(isExcludedPopup(`${gate}\nAccept all\nReject all`)).to.be.false;
|
|
373
|
+
});
|
|
374
|
+
|
|
231
375
|
it('flags "must be 18 or older" disclaimers', () => {
|
|
232
376
|
expect(isExcludedPopup('You must be 18 years or older to enter this site.')).to.be.true;
|
|
233
377
|
});
|
|
@@ -249,6 +393,76 @@ describe('isExcludedPopup', () => {
|
|
|
249
393
|
it('does not flag empty strings', () => {
|
|
250
394
|
expect(isExcludedPopup('')).to.be.false;
|
|
251
395
|
});
|
|
396
|
+
|
|
397
|
+
it('flags age gates in other languages', () => {
|
|
398
|
+
expect(isExcludedPopup('Diese Website ist nur für Erwachsene. Du musst mindestens 18 Jahre alt sein.')).to.be.true;
|
|
399
|
+
expect(isExcludedPopup('Sitio solo para mayores de edad. Debes tener más de 18 años.')).to.be.true;
|
|
400
|
+
});
|
|
401
|
+
|
|
402
|
+
it('does not flag a cookie banner that states an age in passing', () => {
|
|
403
|
+
expect(isExcludedPopup('By using this site you confirm you are over 18. We use cookies. Accept cookies Reject cookies')).to.be
|
|
404
|
+
.false;
|
|
405
|
+
});
|
|
406
|
+
|
|
407
|
+
it('does not flag a passive age statement whose notice has its own cookie or close control', () => {
|
|
408
|
+
expect(isExcludedPopup('We use cookies.\nBy using this site you confirm you are over 18.\nCustomise\nAccept')).to.be.false;
|
|
409
|
+
expect(isExcludedPopup('Nur für Erwachsene über 18 Jahre.\nWir verwenden Cookies.\nCookies verwalten\nAkzeptieren')).to.be.false;
|
|
410
|
+
expect(isExcludedPopup('You must be of legal age to enter.\nThis site uses cookies.\nClose this popup')).to.be.false;
|
|
411
|
+
});
|
|
412
|
+
|
|
413
|
+
it('flags an age gate with its own leave button even when it offers cookie settings', () => {
|
|
414
|
+
expect(isExcludedPopup('Solo para mayores de edad.\nEntrar\nNo, abandonar sitio\nConfigurar cookies')).to.be.true;
|
|
415
|
+
expect(isExcludedPopup('Alleen voor 18 jaar of ouder.\nIk ben 18+\nIk ben onder 18\nMeer opties')).to.be.true;
|
|
416
|
+
});
|
|
417
|
+
|
|
418
|
+
it('flags an age gate whose OK sits next to a leave button', () => {
|
|
419
|
+
expect(isExcludedPopup('You must be over 18. We use cookies. Accept all\nOK\nLeave')).to.be.true;
|
|
420
|
+
});
|
|
421
|
+
|
|
422
|
+
it('flags a license agreement that mentions cookies', () => {
|
|
423
|
+
const agreement =
|
|
424
|
+
'Our End-User License Agreement has changed. Please read and accept it to keep using the software.\n' +
|
|
425
|
+
'Privacy. Our websites may use cookies; you can reject the use of cookies in your browser settings.\n' +
|
|
426
|
+
'Limitation of Liability. To the extent permitted by law, the vendor is not liable for indirect damages.\n' +
|
|
427
|
+
'Governing Law. This agreement is governed by the laws of the vendor’s country.\n' +
|
|
428
|
+
'Accept\nDecline';
|
|
429
|
+
expect(isExcludedPopup(agreement)).to.be.true;
|
|
430
|
+
});
|
|
431
|
+
|
|
432
|
+
it('does not flag a consent dialog that uses legal wording in passing', () => {
|
|
433
|
+
expect(
|
|
434
|
+
isExcludedPopup(
|
|
435
|
+
'We and our partners use cookies and other technologies (together hereinafter: "Cookies") to store and/or access device information.\nAccept all\nReject all',
|
|
436
|
+
),
|
|
437
|
+
).to.be.false;
|
|
438
|
+
});
|
|
439
|
+
|
|
440
|
+
it('flags "must be 18" and "21+ years" age gates', () => {
|
|
441
|
+
expect(isExcludedPopup('You must be 18 to enter this site. This site uses cookies.\nYes\nNo')).to.be.true;
|
|
442
|
+
expect(isExcludedPopup('Visitors must be at least 21 to continue. We use cookies.\nEnter')).to.be.true;
|
|
443
|
+
expect(isExcludedPopup('This site is 21+ years of age only. We use cookies.\nYes\nNo')).to.be.true;
|
|
444
|
+
expect(isExcludedPopup('Content for 18+ years old visitors. This site uses cookies.\nEnter')).to.be.true;
|
|
445
|
+
});
|
|
446
|
+
|
|
447
|
+
it('flags French and Italian age gates worded with accented letters', () => {
|
|
448
|
+
expect(isExcludedPopup("Vous devez avoir l'âge légal pour entrer. Ce site utilise des cookies.\nOui\nNon")).to.be.true;
|
|
449
|
+
expect(isExcludedPopup("Prima di entrare: verifica dell'età. Questo sito usa cookie.\nSì\nNo")).to.be.true;
|
|
450
|
+
});
|
|
451
|
+
|
|
452
|
+
it('does not flag a cookie notice that states an age and offers essential-only cookies', () => {
|
|
453
|
+
expect(isExcludedPopup('You must be 18+ to use this site.\nWe use cookies to remember your preferences.\nEssential only\nAccept'))
|
|
454
|
+
.to.be.false;
|
|
455
|
+
expect(isExcludedPopup('You must be 18 to use this site.\nWe use cookies.\nOnly necessary\nAccept all')).to.be.false;
|
|
456
|
+
});
|
|
457
|
+
|
|
458
|
+
it('suppresses every match of an excluded popup, and leaves page text alone', () => {
|
|
459
|
+
const gate = 'Age verification\nYou must be over 18 years old to enter. This site uses cookies.\nAccept all';
|
|
460
|
+
const popup = checkHeuristicPatterns(gate, 'popup');
|
|
461
|
+
expect(popup.patterns).to.have.length(0);
|
|
462
|
+
expect(popup.suppressed.map((s) => s.negative)).to.include('age-gate-popup');
|
|
463
|
+
expect(hasHeuristicPatterns(gate, 'popup')).to.be.false;
|
|
464
|
+
expect(excludedBy(gate, 'page')).to.have.length(0);
|
|
465
|
+
});
|
|
252
466
|
});
|
|
253
467
|
|
|
254
468
|
describe('cleanButtonText', () => {
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { expect } from '@esm-bundle/chai';
|
|
2
|
+
import {
|
|
3
|
+
ACCEPT_PATTERNS,
|
|
4
|
+
ACKNOWLEDGE_PATTERNS,
|
|
5
|
+
BUTTON_NEVER_MATCH_PATTERNS,
|
|
6
|
+
DETECT_CONTEXT_NEGATIVES,
|
|
7
|
+
DETECT_PATTERNS,
|
|
8
|
+
REJECT_PATTERNS,
|
|
9
|
+
SETTINGS_PATTERNS,
|
|
10
|
+
} from '../../lib/heuristic-classify';
|
|
11
|
+
import { patternOf } from '../../lib/heuristic-patterns';
|
|
12
|
+
import { alternatives, classEnd, groupEnd } from '../../scripts/required-literals';
|
|
13
|
+
|
|
14
|
+
const nonAsciiLetter = (c: string | undefined) => c !== undefined && c.charCodeAt(0) > 127 && /\p{L}/u.test(c);
|
|
15
|
+
|
|
16
|
+
/** The top-level alternatives of the group that opens at src[open], and where it closes. */
|
|
17
|
+
function groupAlternatives(src: string, open: number): { alts: string[]; close: number } {
|
|
18
|
+
const close = groupEnd(src, open);
|
|
19
|
+
const from = src.startsWith('(?:', open) ? open + 3 : open + 1;
|
|
20
|
+
return { alts: alternatives(src.slice(from, close)), close };
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Places where a regex without the u flag has \b next to a non-ASCII letter, which it treats as a non-word character,
|
|
25
|
+
* so the boundary never matches between that letter and a space.
|
|
26
|
+
*/
|
|
27
|
+
function accentBoundaries(re: RegExp): string[] {
|
|
28
|
+
if (re.flags.includes('u')) {
|
|
29
|
+
return [];
|
|
30
|
+
}
|
|
31
|
+
const src = re.source;
|
|
32
|
+
const found: string[] = [];
|
|
33
|
+
const groupOpens = new Map<number, number>();
|
|
34
|
+
for (let i = 0; i < src.length; i++) {
|
|
35
|
+
if (src[i] === '\\') {
|
|
36
|
+
i++;
|
|
37
|
+
} else if (src[i] === '[') {
|
|
38
|
+
i = classEnd(src, i);
|
|
39
|
+
} else if (src[i] === '(') {
|
|
40
|
+
groupOpens.set(groupEnd(src, i), i);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
for (let i = 0; i < src.length - 1; i++) {
|
|
44
|
+
if (src[i] !== '\\') {
|
|
45
|
+
continue;
|
|
46
|
+
}
|
|
47
|
+
if (src[i + 1] === 'b') {
|
|
48
|
+
const next = src[i + 2];
|
|
49
|
+
const after = next === '(' ? groupAlternatives(src, i + 2).alts.map((a) => a[0]) : [next];
|
|
50
|
+
const open = groupOpens.get(i - 1);
|
|
51
|
+
const before = open !== undefined ? groupAlternatives(src, open).alts.map((a) => a[a.length - 1]) : [src[i - 1]];
|
|
52
|
+
if ([...after, ...before].some(nonAsciiLetter)) {
|
|
53
|
+
found.push(src.slice(Math.max(0, i - 15), i + 17));
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
i++;
|
|
57
|
+
}
|
|
58
|
+
return found;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
describe('heuristic regex syntax', () => {
|
|
62
|
+
const regexes: RegExp[] = [
|
|
63
|
+
...DETECT_PATTERNS.map(patternOf),
|
|
64
|
+
...DETECT_CONTEXT_NEGATIVES.flatMap((n) => [n.pattern, n.unless].filter((r): r is RegExp => r instanceof RegExp)),
|
|
65
|
+
...[REJECT_PATTERNS, SETTINGS_PATTERNS, ACCEPT_PATTERNS, ACKNOWLEDGE_PATTERNS, BUTTON_NEVER_MATCH_PATTERNS]
|
|
66
|
+
.flat()
|
|
67
|
+
.filter((p): p is RegExp => p instanceof RegExp),
|
|
68
|
+
];
|
|
69
|
+
|
|
70
|
+
it('finds the boundaries it checks for', () => {
|
|
71
|
+
expect(accentBoundaries(/\b(?:x|âge)\b/i)).to.have.length(1);
|
|
72
|
+
expect(accentBoundaries(/età\b/i)).to.have.length(1);
|
|
73
|
+
expect(accentBoundaries(/\bage\b/i)).to.have.length(0);
|
|
74
|
+
expect(accentBoundaries(/\bâge\b/iu)).to.have.length(0);
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
it('has no \\b next to an accented letter', () => {
|
|
78
|
+
const bad = regexes.flatMap((re) => accentBoundaries(re).map((at) => `${String(re).slice(0, 60)}: …${at}…`));
|
|
79
|
+
expect(bad).to.deep.equal([]);
|
|
80
|
+
});
|
|
81
|
+
});
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "auto_CA_promessedefleurs.com_noy",
|
|
3
|
-
"cosmetic": false,
|
|
4
|
-
"_metadata": {
|
|
5
|
-
"vendorUrl": "http://www.promessedefleurs.com/"
|
|
6
|
-
},
|
|
7
|
-
"runContext": {
|
|
8
|
-
"main": true,
|
|
9
|
-
"frame": false,
|
|
10
|
-
"urlPattern": "^https?://(www\\.)?promessedefleurs\\.com/"
|
|
11
|
-
},
|
|
12
|
-
"prehideSelectors": [],
|
|
13
|
-
"detectCmp": [
|
|
14
|
-
{
|
|
15
|
-
"exists": "body > div#gdprCookieBar > div:not([id]) > div:nth-child(1):not([id]) > div:not([id]) > div:nth-child(2):not([id]) > button:nth-child(3):not([id])"
|
|
16
|
-
}
|
|
17
|
-
],
|
|
18
|
-
"detectPopup": [
|
|
19
|
-
{
|
|
20
|
-
"visible": "body > div#gdprCookieBar > div:not([id]) > div:nth-child(1):not([id]) > div:not([id]) > div:nth-child(2):not([id]) > button:nth-child(3):not([id])"
|
|
21
|
-
}
|
|
22
|
-
],
|
|
23
|
-
"optIn": [],
|
|
24
|
-
"optOut": [
|
|
25
|
-
{
|
|
26
|
-
"wait": 500
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"waitForThenClick": "body > div#gdprCookieBar > div:not([id]) > div:nth-child(1):not([id]) > div:not([id]) > div:nth-child(2):not([id]) > button:nth-child(3):not([id])",
|
|
30
|
-
"comment": "Refuser"
|
|
31
|
-
}
|
|
32
|
-
],
|
|
33
|
-
"test": [
|
|
34
|
-
{
|
|
35
|
-
"waitForVisible": "body > div#gdprCookieBar > div:not([id]) > div:nth-child(1):not([id]) > div:not([id]) > div:nth-child(2):not([id]) > button:nth-child(3):not([id])",
|
|
36
|
-
"timeout": 1000,
|
|
37
|
-
"check": "none"
|
|
38
|
-
}
|
|
39
|
-
]
|
|
40
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "auto_FR_ludum.fr_gl5",
|
|
3
|
-
"cosmetic": false,
|
|
4
|
-
"_metadata": {
|
|
5
|
-
"vendorUrl": "http://www.ludum.fr/"
|
|
6
|
-
},
|
|
7
|
-
"runContext": {
|
|
8
|
-
"main": true,
|
|
9
|
-
"frame": false,
|
|
10
|
-
"urlPattern": "^https?://(www\\.)?ludum\\.fr/"
|
|
11
|
-
},
|
|
12
|
-
"prehideSelectors": [],
|
|
13
|
-
"detectCmp": [
|
|
14
|
-
{
|
|
15
|
-
"exists": "body > div#cookiesplus-modal-container > div:not([id]) > div:nth-child(1)#cookiesplus-modal > div:nth-child(3)#cookiesplus-content > div:not([id]) > form#cookiesplus-form > div:nth-child(3):not([id]) > div:nth-child(1):not([id]) > div:nth-child(1):not([id]) > div:nth-child(2):not([id]) > button:not([id])"
|
|
16
|
-
}
|
|
17
|
-
],
|
|
18
|
-
"detectPopup": [
|
|
19
|
-
{
|
|
20
|
-
"visible": "body > div#cookiesplus-modal-container > div:not([id]) > div:nth-child(1)#cookiesplus-modal > div:nth-child(3)#cookiesplus-content > div:not([id]) > form#cookiesplus-form > div:nth-child(3):not([id]) > div:nth-child(1):not([id]) > div:nth-child(1):not([id]) > div:nth-child(2):not([id]) > button:not([id])"
|
|
21
|
-
}
|
|
22
|
-
],
|
|
23
|
-
"optIn": [],
|
|
24
|
-
"optOut": [
|
|
25
|
-
{
|
|
26
|
-
"wait": 500
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"waitForThenClick": "body > div#cookiesplus-modal-container > div:not([id]) > div:nth-child(1)#cookiesplus-modal > div:nth-child(3)#cookiesplus-content > div:not([id]) > form#cookiesplus-form > div:nth-child(3):not([id]) > div:nth-child(1):not([id]) > div:nth-child(1):not([id]) > div:nth-child(2):not([id]) > button:not([id])",
|
|
30
|
-
"comment": "Rejeter"
|
|
31
|
-
}
|
|
32
|
-
],
|
|
33
|
-
"test": [
|
|
34
|
-
{
|
|
35
|
-
"waitForVisible": "body > div#cookiesplus-modal-container > div:not([id]) > div:nth-child(1)#cookiesplus-modal > div:nth-child(3)#cookiesplus-content > div:not([id]) > form#cookiesplus-form > div:nth-child(3):not([id]) > div:nth-child(1):not([id]) > div:nth-child(1):not([id]) > div:nth-child(2):not([id]) > button:not([id])",
|
|
36
|
-
"timeout": 1000,
|
|
37
|
-
"check": "none"
|
|
38
|
-
}
|
|
39
|
-
]
|
|
40
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "auto_FR_meillandrichardier.com_c2f",
|
|
3
|
-
"cosmetic": false,
|
|
4
|
-
"_metadata": {
|
|
5
|
-
"vendorUrl": "http://www.meillandrichardier.com/"
|
|
6
|
-
},
|
|
7
|
-
"runContext": {
|
|
8
|
-
"main": true,
|
|
9
|
-
"frame": false,
|
|
10
|
-
"urlPattern": "^https?://(www\\.)?meillandrichardier\\.com/"
|
|
11
|
-
},
|
|
12
|
-
"prehideSelectors": [],
|
|
13
|
-
"detectCmp": [
|
|
14
|
-
{
|
|
15
|
-
"exists": "body > div#gdprCookieBar > div:not([id]) > div:nth-child(1):not([id]) > div:not([id]) > div:nth-child(2):not([id]) > button:nth-child(3):not([id])"
|
|
16
|
-
}
|
|
17
|
-
],
|
|
18
|
-
"detectPopup": [
|
|
19
|
-
{
|
|
20
|
-
"visible": "body > div#gdprCookieBar > div:not([id]) > div:nth-child(1):not([id]) > div:not([id]) > div:nth-child(2):not([id]) > button:nth-child(3):not([id])"
|
|
21
|
-
}
|
|
22
|
-
],
|
|
23
|
-
"optIn": [],
|
|
24
|
-
"optOut": [
|
|
25
|
-
{
|
|
26
|
-
"wait": 500
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"waitForThenClick": "body > div#gdprCookieBar > div:not([id]) > div:nth-child(1):not([id]) > div:not([id]) > div:nth-child(2):not([id]) > button:nth-child(3):not([id])",
|
|
30
|
-
"comment": "Refuser"
|
|
31
|
-
}
|
|
32
|
-
],
|
|
33
|
-
"test": [
|
|
34
|
-
{
|
|
35
|
-
"waitForVisible": "body > div#gdprCookieBar > div:not([id]) > div:nth-child(1):not([id]) > div:not([id]) > div:nth-child(2):not([id]) > button:nth-child(3):not([id])",
|
|
36
|
-
"timeout": 1000,
|
|
37
|
-
"check": "none"
|
|
38
|
-
}
|
|
39
|
-
]
|
|
40
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "auto_NL_bonprix.nl_ovi",
|
|
3
|
-
"cosmetic": false,
|
|
4
|
-
"_metadata": {
|
|
5
|
-
"vendorUrl": "http://www.bonprix.nl/"
|
|
6
|
-
},
|
|
7
|
-
"runContext": {
|
|
8
|
-
"main": true,
|
|
9
|
-
"frame": false,
|
|
10
|
-
"urlPattern": "^https?://(www\\.)?bonprix\\.nl/"
|
|
11
|
-
},
|
|
12
|
-
"prehideSelectors": [],
|
|
13
|
-
"detectCmp": [
|
|
14
|
-
{
|
|
15
|
-
"exists": "body > div#cookie-bar-2019 > div:nth-child(4):not([id]) > a#declineLink"
|
|
16
|
-
}
|
|
17
|
-
],
|
|
18
|
-
"detectPopup": [
|
|
19
|
-
{
|
|
20
|
-
"visible": "body > div#cookie-bar-2019 > div:nth-child(4):not([id]) > a#declineLink"
|
|
21
|
-
}
|
|
22
|
-
],
|
|
23
|
-
"optIn": [],
|
|
24
|
-
"optOut": [
|
|
25
|
-
{
|
|
26
|
-
"wait": 500
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"waitForThenClick": "body > div#cookie-bar-2019 > div:nth-child(4):not([id]) > a#declineLink",
|
|
30
|
-
"comment": "hier weigeren"
|
|
31
|
-
}
|
|
32
|
-
],
|
|
33
|
-
"test": [
|
|
34
|
-
{
|
|
35
|
-
"waitForVisible": "body > div#cookie-bar-2019 > div:nth-child(4):not([id]) > a#declineLink",
|
|
36
|
-
"timeout": 1000,
|
|
37
|
-
"check": "none"
|
|
38
|
-
}
|
|
39
|
-
]
|
|
40
|
-
}
|