@duckduckgo/autoconsent 10.7.0 → 10.9.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.
Files changed (37) hide show
  1. package/.github/workflows/ddg-release.yml +5 -9
  2. package/CHANGELOG.md +51 -0
  3. package/ci/asana-create-tasks.js +2 -2
  4. package/ci/clients_pr_template.md +3 -0
  5. package/data/coverage.json +997 -1011
  6. package/dist/addon-firefox/background.bundle.js +5 -0
  7. package/dist/addon-firefox/content.bundle.js +28 -10
  8. package/dist/addon-firefox/manifest.json +1 -1
  9. package/dist/addon-firefox/rules.json +135 -17
  10. package/dist/addon-mv3/background.bundle.js +5 -0
  11. package/dist/addon-mv3/content.bundle.js +28 -10
  12. package/dist/addon-mv3/manifest.json +1 -1
  13. package/dist/addon-mv3/rules.json +135 -17
  14. package/dist/autoconsent.cjs.js +28 -10
  15. package/dist/autoconsent.esm.js +28 -10
  16. package/dist/autoconsent.playwright.js +1 -1
  17. package/dist/autoconsent.unit.js +163 -27
  18. package/lib/cmps/evidon.ts +4 -3
  19. package/lib/cmps/trustarc-frame.ts +25 -6
  20. package/lib/cmps/trustarc-top.ts +2 -1
  21. package/lib/eval-snippets.ts +5 -0
  22. package/package.json +1 -1
  23. package/readme.md +2 -4
  24. package/rules/autoconsent/aquasana-com.json +12 -3
  25. package/rules/autoconsent/complianz-opt-out.json +12 -1
  26. package/rules/autoconsent/cookiecuttr.json +37 -0
  27. package/rules/autoconsent/fides.json +5 -2
  28. package/rules/autoconsent/instagram.json +1 -1
  29. package/rules/autoconsent/ketch.json +8 -5
  30. package/rules/autoconsent/roblox.json +36 -0
  31. package/rules/autoconsent/uswitch.json +10 -5
  32. package/rules/rules.json +135 -17
  33. package/tests/aquasana-com.spec.ts +4 -1
  34. package/tests/cookiecuttr.spec.ts +7 -0
  35. package/tests/fides.spec.ts +1 -0
  36. package/tests/ketch.spec.ts +6 -0
  37. package/tests/roblox.spec.ts +5 -0
@@ -374,7 +374,6 @@
374
374
  },
375
375
  {
376
376
  "name": "aquasana.com",
377
- "cosmetic": true,
378
377
  "prehideSelectors": [
379
378
  "#consent-tracking"
380
379
  ],
@@ -390,12 +389,24 @@
390
389
  ],
391
390
  "optIn": [
392
391
  {
393
- "click": "#accept_consent"
392
+ "waitForThenClick": "#consent-tracking .affirm.btn"
394
393
  }
395
394
  ],
396
395
  "optOut": [
397
396
  {
398
- "hide": "#consent-tracking"
397
+ "if": {
398
+ "exists": "#consent-tracking .decline.btn"
399
+ },
400
+ "then": [
401
+ {
402
+ "click": "#consent-tracking .decline.btn"
403
+ }
404
+ ],
405
+ "else": [
406
+ {
407
+ "hide": "#consent-tracking"
408
+ }
409
+ ]
399
410
  }
400
411
  ]
401
412
  },
@@ -1571,7 +1582,20 @@
1571
1582
  ],
1572
1583
  "else": [
1573
1584
  {
1574
- "hide": "[aria-describedby=\"cookieconsent:desc\"]"
1585
+ "if": {
1586
+ "exists": ".cmp-pref-link"
1587
+ },
1588
+ "then": [
1589
+ {
1590
+ "click": ".cmp-pref-link"
1591
+ },
1592
+ {
1593
+ "waitForThenClick": ".cmp-body [id*=rejectAll]"
1594
+ },
1595
+ {
1596
+ "waitForThenClick": ".cmp-body .cmp-save-btn"
1597
+ }
1598
+ ]
1575
1599
  }
1576
1600
  ]
1577
1601
  }
@@ -1965,6 +1989,51 @@
1965
1989
  }
1966
1990
  ]
1967
1991
  },
1992
+ {
1993
+ "name": "cookiecuttr",
1994
+ "vendorUrl": "https://github.com/cdwharton/cookieCuttr",
1995
+ "cosmetic": false,
1996
+ "runContext": {
1997
+ "main": true,
1998
+ "frame": false,
1999
+ "urlPattern": ""
2000
+ },
2001
+ "prehideSelectors": [
2002
+ ".cc-cookies"
2003
+ ],
2004
+ "detectCmp": [
2005
+ {
2006
+ "exists": ".cc-cookies .cc-cookie-accept"
2007
+ }
2008
+ ],
2009
+ "detectPopup": [
2010
+ {
2011
+ "visible": ".cc-cookies .cc-cookie-accept"
2012
+ }
2013
+ ],
2014
+ "optIn": [
2015
+ {
2016
+ "waitForThenClick": ".cc-cookies .cc-cookie-accept"
2017
+ }
2018
+ ],
2019
+ "optOut": [
2020
+ {
2021
+ "if": {
2022
+ "exists": ".cc-cookies .cc-cookie-decline"
2023
+ },
2024
+ "then": [
2025
+ {
2026
+ "click": ".cc-cookies .cc-cookie-decline"
2027
+ }
2028
+ ],
2029
+ "else": [
2030
+ {
2031
+ "hide": ".cc-cookies"
2032
+ }
2033
+ ]
2034
+ }
2035
+ ]
2036
+ },
1968
2037
  {
1969
2038
  "name": "cookiefirst.com",
1970
2039
  "prehideSelectors": [
@@ -2884,16 +2953,19 @@
2884
2953
  "detectPopup": [
2885
2954
  {
2886
2955
  "visible": "#fides-overlay #fides-banner"
2956
+ },
2957
+ {
2958
+ "eval": "EVAL_FIDES_DETECT_POPUP"
2887
2959
  }
2888
2960
  ],
2889
2961
  "optIn": [
2890
2962
  {
2891
- "waitForThenClick": "#fides-banner [data-testid=\"Accept all-btn\"]"
2963
+ "waitForThenClick": "#fides-banner .fides-accept-all-button"
2892
2964
  }
2893
2965
  ],
2894
2966
  "optOut": [
2895
2967
  {
2896
- "waitForThenClick": "#fides-banner [data-testid=\"Reject all-btn\"]"
2968
+ "waitForThenClick": "#fides-banner .fides-reject-all-button"
2897
2969
  }
2898
2970
  ]
2899
2971
  },
@@ -3376,7 +3448,7 @@
3376
3448
  "urlPattern": "^https://www\\.instagram\\.com/"
3377
3449
  },
3378
3450
  "prehideSelectors": [
3379
- ".x78zum5.xdt5ytf.xg6iff7.x1n2onr6"
3451
+ ".x78zum5.xdt5ytf.xg6iff7.x1n2onr6:has(._a9--)"
3380
3452
  ],
3381
3453
  "detectCmp": [
3382
3454
  {
@@ -3738,29 +3810,34 @@
3738
3810
  },
3739
3811
  "then": [
3740
3812
  {
3741
- "waitForThenClick": "#lanyard_root div[class*=buttons] > button[class*=secondaryButton]",
3813
+ "waitForThenClick": "#lanyard_root div[class*=buttons] > button[class*=secondaryButton], #lanyard_root button[class*=buttons-secondary]",
3742
3814
  "comment": "can be either settings or reject button"
3743
3815
  }
3744
3816
  ]
3745
3817
  },
3746
3818
  {
3747
- "waitFor": "#lanyard_root [aria-describedby=preference-description],#lanyard_root [aria-describedby=modal-description]",
3819
+ "waitFor": "#lanyard_root [aria-describedby=preference-description],#lanyard_root [aria-describedby=modal-description], #ketch-preferences",
3748
3820
  "timeout": 1000,
3749
3821
  "optional": true
3750
3822
  },
3751
3823
  {
3752
3824
  "if": {
3753
- "exists": "#lanyard_root [aria-describedby=preference-description],#lanyard_root [aria-describedby=modal-description]"
3825
+ "exists": "#lanyard_root [aria-describedby=preference-description],#lanyard_root [aria-describedby=modal-description], #ketch-preferences"
3754
3826
  },
3755
3827
  "then": [
3756
3828
  {
3757
- "waitForThenClick": "#lanyard_root button[class*=rejectButton]"
3829
+ "waitForThenClick": "#lanyard_root button[class*=rejectButton], #lanyard_root button[class*=rejectAllButton]"
3758
3830
  },
3759
3831
  {
3760
- "click": "#lanyard_root button[class*=confirmButton],#lanyard_root div[class*=actions_] > button:nth-child(1)"
3832
+ "click": "#lanyard_root button[class*=confirmButton],#lanyard_root div[class*=actions_] > button:nth-child(1), #lanyard_root button[class*=actionButton]"
3761
3833
  }
3762
3834
  ]
3763
3835
  }
3836
+ ],
3837
+ "test": [
3838
+ {
3839
+ "eval": "EVAL_KETCH_TEST"
3840
+ }
3764
3841
  ]
3765
3842
  },
3766
3843
  {
@@ -5162,6 +5239,42 @@
5162
5239
  }
5163
5240
  ]
5164
5241
  },
5242
+ {
5243
+ "name": "roblox",
5244
+ "vendorUrl": "https://roblox.com",
5245
+ "cosmetic": false,
5246
+ "runContext": {
5247
+ "main": true,
5248
+ "frame": false,
5249
+ "urlPattern": "^https://(www\\.)?roblox\\.com/"
5250
+ },
5251
+ "prehideSelectors": [],
5252
+ "detectCmp": [
5253
+ {
5254
+ "exists": ".cookie-banner-wrapper"
5255
+ }
5256
+ ],
5257
+ "detectPopup": [
5258
+ {
5259
+ "visible": ".cookie-banner-wrapper .cookie-banner"
5260
+ }
5261
+ ],
5262
+ "optIn": [
5263
+ {
5264
+ "waitForThenClick": ".cookie-banner-wrapper button.btn-cta-lg"
5265
+ }
5266
+ ],
5267
+ "optOut": [
5268
+ {
5269
+ "waitForThenClick": ".cookie-banner-wrapper button.btn-secondary-lg"
5270
+ }
5271
+ ],
5272
+ "test": [
5273
+ {
5274
+ "eval": "EVAL_ROBLOX_TEST"
5275
+ }
5276
+ ]
5277
+ },
5165
5278
  {
5166
5279
  "name": "rog-forum.asus.com",
5167
5280
  "runContext": {
@@ -6583,27 +6696,32 @@
6583
6696
  },
6584
6697
  {
6585
6698
  "name": "uswitch.com",
6699
+ "runContext": {
6700
+ "main": true,
6701
+ "frame": false,
6702
+ "urlPattern": "^https://(www\\.)?uswitch\\.com/"
6703
+ },
6586
6704
  "prehideSelectors": [
6587
- "#cookie-banner-wrapper"
6705
+ ".ucb"
6588
6706
  ],
6589
6707
  "detectCmp": [
6590
6708
  {
6591
- "exists": "#cookie-banner-wrapper"
6709
+ "exists": ".ucb-banner"
6592
6710
  }
6593
6711
  ],
6594
6712
  "detectPopup": [
6595
6713
  {
6596
- "visible": "#cookie-banner-wrapper"
6714
+ "visible": ".ucb-banner"
6597
6715
  }
6598
6716
  ],
6599
6717
  "optIn": [
6600
6718
  {
6601
- "click": "#cookie_banner_accept_mobile"
6719
+ "waitForThenClick": ".ucb-banner .ucb-btn-accept"
6602
6720
  }
6603
6721
  ],
6604
6722
  "optOut": [
6605
6723
  {
6606
- "click": "#cookie_banner_save"
6724
+ "waitForThenClick": ".ucb-banner .ucb-btn-save"
6607
6725
  }
6608
6726
  ]
6609
6727
  },
@@ -516,6 +516,8 @@ var snippets = {
516
516
  },
517
517
  EVAL_ONETRUST_1: () => window.OnetrustActiveGroups.split(",").filter((s) => s.length > 0).length <= 1,
518
518
  EVAL_TRUSTARC_TOP: () => window && window.truste && window.truste.eu.bindMap.prefCookie === "0",
519
+ EVAL_TRUSTARC_FRAME_TEST: () => window && window.QueryString && window.QueryString.preferences === "0",
520
+ EVAL_TRUSTARC_FRAME_GTM: () => window && window.QueryString && window.QueryString.gtm === "1",
519
521
  // declarative rules
520
522
  EVAL_ADROLL_0: () => !document.cookie.includes("__adroll_fpc"),
521
523
  EVAL_ALMACMP_0: () => document.cookie.includes('"name":"Google","consent":false'),
@@ -560,6 +562,7 @@ var snippets = {
560
562
  EVAL_EU_COOKIE_LAW_0: () => !document.cookie.includes("euCookie"),
561
563
  EVAL_EZOIC_0: () => ezCMP.handleAcceptAllClick(),
562
564
  EVAL_EZOIC_1: () => !!document.cookie.match(/ez-consent-tcf/),
565
+ EVAL_FIDES_DETECT_POPUP: () => window.Fides?.initialized,
563
566
  EVAL_GOOGLE_0: () => !!document.cookie.match(/SOCS=CAE/),
564
567
  EVAL_HEMA_TEST_0: () => document.cookie.includes("cookies_rejected=1"),
565
568
  EVAL_IUBENDA_0: () => document.querySelectorAll(".purposes-item input[type=checkbox]:not([disabled])").forEach((x) => {
@@ -569,6 +572,7 @@ var snippets = {
569
572
  EVAL_IUBENDA_1: () => !!document.cookie.match(/_iub_cs-\d+=/),
570
573
  EVAL_IWINK_TEST: () => document.cookie.includes("cookie_permission_granted=no"),
571
574
  EVAL_JQUERY_COOKIEBAR_0: () => !document.cookie.includes("cookies-state=accepted"),
575
+ EVAL_KETCH_TEST: () => document.cookie.includes("_ketch_consent_v1_"),
572
576
  EVAL_MEDIAVINE_0: () => document.querySelectorAll('[data-name="mediavine-gdpr-cmp"] input[type=checkbox]').forEach((x) => x.checked && x.click()) || true,
573
577
  EVAL_MICROSOFT_0: () => Array.from(document.querySelectorAll("div > button")).filter((el) => el.innerText.match("Reject|Ablehnen"))[0].click() || true,
574
578
  EVAL_MICROSOFT_1: () => Array.from(document.querySelectorAll("div > button")).filter((el) => el.innerText.match("Accept|Annehmen"))[0].click() || true,
@@ -583,6 +587,7 @@ var snippets = {
583
587
  EVAL_PRIMEBOX_0: () => !document.cookie.includes("cb-enabled=accepted"),
584
588
  EVAL_PUBTECH_0: () => document.cookie.includes("euconsent-v2") && (document.cookie.match(/.YAAAAAAAAAAA/) || document.cookie.match(/.aAAAAAAAAAAA/) || document.cookie.match(/.YAAACFgAAAAA/)),
585
589
  EVAL_REDDIT_0: () => document.cookie.includes("eu_cookie={%22opted%22:true%2C%22nonessential%22:false}"),
590
+ EVAL_ROBLOX_TEST: () => document.cookie.includes("RBXcb"),
586
591
  EVAL_SIRDATA_UNBLOCK_SCROLL: () => {
587
592
  document.documentElement.classList.forEach((cls) => {
588
593
  if (cls.startsWith("sd-cmp-"))
@@ -1061,7 +1066,7 @@ var TrustArcTop = class extends AutoConsentCMPBase {
1061
1066
  this._optInDone = false;
1062
1067
  }
1063
1068
  get hasSelfTest() {
1064
- return false;
1069
+ return true;
1065
1070
  }
1066
1071
  get isIntermediate() {
1067
1072
  if (this._optInDone) {
@@ -1108,6 +1113,7 @@ var TrustArcTop = class extends AutoConsentCMPBase {
1108
1113
  return true;
1109
1114
  }
1110
1115
  async test() {
1116
+ await this.wait(500);
1111
1117
  return await this.mainWorldEval("EVAL_TRUSTARC_TOP");
1112
1118
  }
1113
1119
  };
@@ -1124,7 +1130,7 @@ var TrustArcFrame = class extends AutoConsentCMPBase {
1124
1130
  };
1125
1131
  }
1126
1132
  get hasSelfTest() {
1127
- return false;
1133
+ return true;
1128
1134
  }
1129
1135
  get isIntermediate() {
1130
1136
  return false;
@@ -1160,27 +1166,34 @@ var TrustArcFrame = class extends AutoConsentCMPBase {
1160
1166
  );
1161
1167
  }
1162
1168
  async optOut() {
1169
+ if (await this.mainWorldEval("EVAL_TRUSTARC_FRAME_TEST")) {
1170
+ return true;
1171
+ }
1172
+ let timeout = 3e3;
1173
+ if (await this.mainWorldEval("EVAL_TRUSTARC_FRAME_GTM")) {
1174
+ timeout = 1500;
1175
+ }
1163
1176
  await waitFor(() => document.readyState === "complete", 20, 100);
1164
- await this.waitForElement(".mainContent[aria-hidden=false]", 5e3);
1177
+ await this.waitForElement(".mainContent[aria-hidden=false]", timeout);
1165
1178
  if (this.click(".rejectAll")) {
1166
1179
  return true;
1167
1180
  }
1168
1181
  if (this.elementExists(".prefPanel")) {
1169
- await this.waitForElement('.prefPanel[style="visibility: visible;"]', 3e3);
1182
+ await this.waitForElement('.prefPanel[style="visibility: visible;"]', timeout);
1170
1183
  }
1171
1184
  if (this.click("#catDetails0")) {
1172
1185
  this.click(".submit");
1173
- this.waitForThenClick("#gwt-debug-close_id", 5e3);
1186
+ this.waitForThenClick("#gwt-debug-close_id", timeout);
1174
1187
  return true;
1175
1188
  }
1176
1189
  if (this.click(".required")) {
1177
- this.waitForThenClick("#gwt-debug-close_id", 5e3);
1190
+ this.waitForThenClick("#gwt-debug-close_id", timeout);
1178
1191
  return true;
1179
1192
  }
1180
1193
  await this.navigateToSettings();
1181
1194
  this.click(".switch span:nth-child(1):not(.active)", true);
1182
1195
  this.click(".submit");
1183
- this.waitForThenClick("#gwt-debug-close_id", 3e5);
1196
+ this.waitForThenClick("#gwt-debug-close_id", timeout * 10);
1184
1197
  return true;
1185
1198
  }
1186
1199
  async optIn() {
@@ -1195,6 +1208,10 @@ var TrustArcFrame = class extends AutoConsentCMPBase {
1195
1208
  });
1196
1209
  return true;
1197
1210
  }
1211
+ async test() {
1212
+ await this.wait(500);
1213
+ return await this.mainWorldEval("EVAL_TRUSTARC_FRAME_TEST");
1214
+ }
1198
1215
  };
1199
1216
 
1200
1217
  // lib/cmps/cookiebot.ts
@@ -1443,10 +1460,11 @@ var Evidon = class extends AutoConsentCMPBase {
1443
1460
  if (this.click("#_evidon-decline-button")) {
1444
1461
  return true;
1445
1462
  }
1446
- hideElements(getStyleElement(), "#evidon-prefdiag-overlay,#evidon-prefdiag-background");
1447
- this.click("#_evidon-option-button");
1463
+ hideElements(getStyleElement(), "#evidon-prefdiag-overlay,#evidon-prefdiag-background,#_evidon-background");
1464
+ await this.waitForThenClick("#_evidon-option-button");
1448
1465
  await this.waitForElement("#evidon-prefdiag-overlay", 5e3);
1449
- this.click("#evidon-prefdiag-decline");
1466
+ await this.wait(500);
1467
+ await this.waitForThenClick("#evidon-prefdiag-decline");
1450
1468
  return true;
1451
1469
  }
1452
1470
  async optIn() {
@@ -491,6 +491,8 @@ var snippets = {
491
491
  },
492
492
  EVAL_ONETRUST_1: () => window.OnetrustActiveGroups.split(",").filter((s) => s.length > 0).length <= 1,
493
493
  EVAL_TRUSTARC_TOP: () => window && window.truste && window.truste.eu.bindMap.prefCookie === "0",
494
+ EVAL_TRUSTARC_FRAME_TEST: () => window && window.QueryString && window.QueryString.preferences === "0",
495
+ EVAL_TRUSTARC_FRAME_GTM: () => window && window.QueryString && window.QueryString.gtm === "1",
494
496
  // declarative rules
495
497
  EVAL_ADROLL_0: () => !document.cookie.includes("__adroll_fpc"),
496
498
  EVAL_ALMACMP_0: () => document.cookie.includes('"name":"Google","consent":false'),
@@ -535,6 +537,7 @@ var snippets = {
535
537
  EVAL_EU_COOKIE_LAW_0: () => !document.cookie.includes("euCookie"),
536
538
  EVAL_EZOIC_0: () => ezCMP.handleAcceptAllClick(),
537
539
  EVAL_EZOIC_1: () => !!document.cookie.match(/ez-consent-tcf/),
540
+ EVAL_FIDES_DETECT_POPUP: () => window.Fides?.initialized,
538
541
  EVAL_GOOGLE_0: () => !!document.cookie.match(/SOCS=CAE/),
539
542
  EVAL_HEMA_TEST_0: () => document.cookie.includes("cookies_rejected=1"),
540
543
  EVAL_IUBENDA_0: () => document.querySelectorAll(".purposes-item input[type=checkbox]:not([disabled])").forEach((x) => {
@@ -544,6 +547,7 @@ var snippets = {
544
547
  EVAL_IUBENDA_1: () => !!document.cookie.match(/_iub_cs-\d+=/),
545
548
  EVAL_IWINK_TEST: () => document.cookie.includes("cookie_permission_granted=no"),
546
549
  EVAL_JQUERY_COOKIEBAR_0: () => !document.cookie.includes("cookies-state=accepted"),
550
+ EVAL_KETCH_TEST: () => document.cookie.includes("_ketch_consent_v1_"),
547
551
  EVAL_MEDIAVINE_0: () => document.querySelectorAll('[data-name="mediavine-gdpr-cmp"] input[type=checkbox]').forEach((x) => x.checked && x.click()) || true,
548
552
  EVAL_MICROSOFT_0: () => Array.from(document.querySelectorAll("div > button")).filter((el) => el.innerText.match("Reject|Ablehnen"))[0].click() || true,
549
553
  EVAL_MICROSOFT_1: () => Array.from(document.querySelectorAll("div > button")).filter((el) => el.innerText.match("Accept|Annehmen"))[0].click() || true,
@@ -558,6 +562,7 @@ var snippets = {
558
562
  EVAL_PRIMEBOX_0: () => !document.cookie.includes("cb-enabled=accepted"),
559
563
  EVAL_PUBTECH_0: () => document.cookie.includes("euconsent-v2") && (document.cookie.match(/.YAAAAAAAAAAA/) || document.cookie.match(/.aAAAAAAAAAAA/) || document.cookie.match(/.YAAACFgAAAAA/)),
560
564
  EVAL_REDDIT_0: () => document.cookie.includes("eu_cookie={%22opted%22:true%2C%22nonessential%22:false}"),
565
+ EVAL_ROBLOX_TEST: () => document.cookie.includes("RBXcb"),
561
566
  EVAL_SIRDATA_UNBLOCK_SCROLL: () => {
562
567
  document.documentElement.classList.forEach((cls) => {
563
568
  if (cls.startsWith("sd-cmp-"))
@@ -1036,7 +1041,7 @@ var TrustArcTop = class extends AutoConsentCMPBase {
1036
1041
  this._optInDone = false;
1037
1042
  }
1038
1043
  get hasSelfTest() {
1039
- return false;
1044
+ return true;
1040
1045
  }
1041
1046
  get isIntermediate() {
1042
1047
  if (this._optInDone) {
@@ -1083,6 +1088,7 @@ var TrustArcTop = class extends AutoConsentCMPBase {
1083
1088
  return true;
1084
1089
  }
1085
1090
  async test() {
1091
+ await this.wait(500);
1086
1092
  return await this.mainWorldEval("EVAL_TRUSTARC_TOP");
1087
1093
  }
1088
1094
  };
@@ -1099,7 +1105,7 @@ var TrustArcFrame = class extends AutoConsentCMPBase {
1099
1105
  };
1100
1106
  }
1101
1107
  get hasSelfTest() {
1102
- return false;
1108
+ return true;
1103
1109
  }
1104
1110
  get isIntermediate() {
1105
1111
  return false;
@@ -1135,27 +1141,34 @@ var TrustArcFrame = class extends AutoConsentCMPBase {
1135
1141
  );
1136
1142
  }
1137
1143
  async optOut() {
1144
+ if (await this.mainWorldEval("EVAL_TRUSTARC_FRAME_TEST")) {
1145
+ return true;
1146
+ }
1147
+ let timeout = 3e3;
1148
+ if (await this.mainWorldEval("EVAL_TRUSTARC_FRAME_GTM")) {
1149
+ timeout = 1500;
1150
+ }
1138
1151
  await waitFor(() => document.readyState === "complete", 20, 100);
1139
- await this.waitForElement(".mainContent[aria-hidden=false]", 5e3);
1152
+ await this.waitForElement(".mainContent[aria-hidden=false]", timeout);
1140
1153
  if (this.click(".rejectAll")) {
1141
1154
  return true;
1142
1155
  }
1143
1156
  if (this.elementExists(".prefPanel")) {
1144
- await this.waitForElement('.prefPanel[style="visibility: visible;"]', 3e3);
1157
+ await this.waitForElement('.prefPanel[style="visibility: visible;"]', timeout);
1145
1158
  }
1146
1159
  if (this.click("#catDetails0")) {
1147
1160
  this.click(".submit");
1148
- this.waitForThenClick("#gwt-debug-close_id", 5e3);
1161
+ this.waitForThenClick("#gwt-debug-close_id", timeout);
1149
1162
  return true;
1150
1163
  }
1151
1164
  if (this.click(".required")) {
1152
- this.waitForThenClick("#gwt-debug-close_id", 5e3);
1165
+ this.waitForThenClick("#gwt-debug-close_id", timeout);
1153
1166
  return true;
1154
1167
  }
1155
1168
  await this.navigateToSettings();
1156
1169
  this.click(".switch span:nth-child(1):not(.active)", true);
1157
1170
  this.click(".submit");
1158
- this.waitForThenClick("#gwt-debug-close_id", 3e5);
1171
+ this.waitForThenClick("#gwt-debug-close_id", timeout * 10);
1159
1172
  return true;
1160
1173
  }
1161
1174
  async optIn() {
@@ -1170,6 +1183,10 @@ var TrustArcFrame = class extends AutoConsentCMPBase {
1170
1183
  });
1171
1184
  return true;
1172
1185
  }
1186
+ async test() {
1187
+ await this.wait(500);
1188
+ return await this.mainWorldEval("EVAL_TRUSTARC_FRAME_TEST");
1189
+ }
1173
1190
  };
1174
1191
 
1175
1192
  // lib/cmps/cookiebot.ts
@@ -1418,10 +1435,11 @@ var Evidon = class extends AutoConsentCMPBase {
1418
1435
  if (this.click("#_evidon-decline-button")) {
1419
1436
  return true;
1420
1437
  }
1421
- hideElements(getStyleElement(), "#evidon-prefdiag-overlay,#evidon-prefdiag-background");
1422
- this.click("#_evidon-option-button");
1438
+ hideElements(getStyleElement(), "#evidon-prefdiag-overlay,#evidon-prefdiag-background,#_evidon-background");
1439
+ await this.waitForThenClick("#_evidon-option-button");
1423
1440
  await this.waitForElement("#evidon-prefdiag-overlay", 5e3);
1424
- this.click("#evidon-prefdiag-decline");
1441
+ await this.wait(500);
1442
+ await this.waitForThenClick("#evidon-prefdiag-decline");
1425
1443
  return true;
1426
1444
  }
1427
1445
  async optIn() {