@axe-core/watcher 3.14.2-rc.02e3b6bc → 3.14.3-next.2020777a

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. package/dist/Controller.js +0 -1
  2. package/dist/Controller.js.map +1 -1
  3. package/dist/EventForwarder.js +0 -7
  4. package/dist/EventForwarder.js.map +1 -1
  5. package/dist/createDebugger.js +0 -15
  6. package/dist/createDebugger.js.map +1 -1
  7. package/dist/cypress.js +0 -45
  8. package/dist/cypress.js.map +1 -1
  9. package/dist/cypressCommands.js +2 -68
  10. package/dist/cypressCommands.js.map +1 -1
  11. package/dist/git.js +0 -16
  12. package/dist/git.js.map +1 -1
  13. package/dist/playwright.js +1 -13
  14. package/dist/playwright.js.map +1 -1
  15. package/dist/playwrightTest.js +0 -15
  16. package/dist/playwrightTest.js.map +1 -1
  17. package/dist/playwrightWrapping.js +0 -11
  18. package/dist/playwrightWrapping.js.map +1 -1
  19. package/dist/puppeteer.js +1 -13
  20. package/dist/puppeteer.js.map +1 -1
  21. package/dist/puppeteerWrapping.js +2 -13
  22. package/dist/puppeteerWrapping.js.map +1 -1
  23. package/dist/sendResultsToServer.js +0 -15
  24. package/dist/sendResultsToServer.js.map +1 -1
  25. package/dist/utils/constants.js +0 -3
  26. package/dist/utils/constants.js.map +1 -1
  27. package/dist/utils/initializeSession.js +0 -7
  28. package/dist/utils/initializeSession.js.map +1 -1
  29. package/dist/utils/initializeSession.test.js +0 -6
  30. package/dist/utils/initializeSession.test.js.map +1 -1
  31. package/dist/utils/mergeChromeArgs.js +0 -40
  32. package/dist/utils/mergeChromeArgs.js.map +1 -1
  33. package/dist/utils/mergeChromeArgs.test.js +0 -3
  34. package/dist/utils/mergeChromeArgs.test.js.map +1 -1
  35. package/dist/utils/proxyHandlers.js +0 -19
  36. package/dist/utils/proxyHandlers.js.map +1 -1
  37. package/dist/utils/proxyHandlers.test.js +0 -1
  38. package/dist/utils/proxyHandlers.test.js.map +1 -1
  39. package/dist/utils/readVariables.js +0 -4
  40. package/dist/utils/readVariables.js.map +1 -1
  41. package/dist/utils/updateAutoAnalyze.js +0 -5
  42. package/dist/utils/updateAutoAnalyze.js.map +1 -1
  43. package/dist/utils/validateAxeRunContext.js +0 -16
  44. package/dist/utils/validateAxeRunContext.js.map +1 -1
  45. package/dist/utils/validateAxeRunContext.test.js +0 -3
  46. package/dist/utils/validateAxeRunContext.test.js.map +1 -1
  47. package/dist/utils/validateAxeRunOptions.js +0 -51
  48. package/dist/utils/validateAxeRunOptions.js.map +1 -1
  49. package/dist/utils/validateAxeRunOptions.test.js +0 -15
  50. package/dist/utils/validateAxeRunOptions.test.js.map +1 -1
  51. package/dist/utils/writeExtensionManifest.js +0 -1
  52. package/dist/utils/writeExtensionManifest.js.map +1 -1
  53. package/dist/utils/writeVariables.js +1 -14
  54. package/dist/utils/writeVariables.js.map +1 -1
  55. package/dist/utils/writeVariables.test.js +0 -1
  56. package/dist/utils/writeVariables.test.js.map +1 -1
  57. package/dist/wdio.d.ts +5 -3
  58. package/dist/wdio.js +0 -20
  59. package/dist/wdio.js.map +1 -1
  60. package/dist/webdriver.js +1 -12
  61. package/dist/webdriver.js.map +1 -1
  62. package/extension/background.js +1 -1
  63. package/extension/content.js +1 -1
  64. package/package.json +4 -4
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const path_1 = __importDefault(require("path"));
7
7
  const fs_1 = __importDefault(require("fs"));
8
8
  const constants_1 = require("./constants");
9
- /** Update the extension manifest file. */
10
9
  function writeManifest({ all_frames, exclude_globs }) {
11
10
  const manifestPath = path_1.default.join(constants_1.PATH_TO_EXTENSION, 'manifest.json');
12
11
  const manifest = JSON.parse(fs_1.default.readFileSync(manifestPath, 'utf-8'));
@@ -1 +1 @@
1
- {"version":3,"file":"writeExtensionManifest.js","sourceRoot":"","sources":["../../src/utils/writeExtensionManifest.ts"],"names":[],"mappings":";;;;;AAAA,gDAAuB;AACvB,4CAAmB;AACnB,2CAA+C;AAO/C,0CAA0C;AAC1C,SAAS,aAAa,CAAC,EACrB,UAAU,EACV,aAAa,EACO;IACpB,MAAM,YAAY,GAAG,cAAI,CAAC,IAAI,CAAC,6BAAiB,EAAE,eAAe,CAAC,CAAA;IAClE,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,YAAE,CAAC,YAAY,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC,CAAA;IACnE,QAAQ,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,UAAU,GAAG,UAAU,CAAA;IACnD,QAAQ,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,aAAa,GAAG,aAAa,CAAA;IACzD,YAAE,CAAC,aAAa,CAAC,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAA;AACnE,CAAC;AAED,kBAAe,aAAa,CAAA"}
1
+ {"version":3,"file":"writeExtensionManifest.js","sourceRoot":"","sources":["../../src/utils/writeExtensionManifest.ts"],"names":[],"mappings":";;;;;AAAA,gDAAuB;AACvB,4CAAmB;AACnB,2CAA+C;AAQ/C,SAAS,aAAa,CAAC,EACrB,UAAU,EACV,aAAa,EACO;IACpB,MAAM,YAAY,GAAG,cAAI,CAAC,IAAI,CAAC,6BAAiB,EAAE,eAAe,CAAC,CAAA;IAClE,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,YAAE,CAAC,YAAY,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC,CAAA;IACnE,QAAQ,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,UAAU,GAAG,UAAU,CAAA;IACnD,QAAQ,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,aAAa,GAAG,aAAa,CAAA;IACzD,YAAE,CAAC,aAAa,CAAC,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAA;AACnE,CAAC;AAED,kBAAe,aAAa,CAAA"}
@@ -35,16 +35,8 @@ const initializeSession_1 = __importDefault(require("./initializeSession"));
35
35
  const validateAxeRunContext_1 = require("./validateAxeRunContext");
36
36
  const isValidExcludePattern_1 = __importDefault(require("./isValidExcludePattern"));
37
37
  const debugLogger = (0, createDebugger_1.default)('config:writeVariables');
38
- // Read the version from package.json, but do not include the file in the build.
39
- // eslint-disable-next-line @typescript-eslint/no-require-imports
40
38
  const { version } = require('../../package.json');
41
- /** Write the user's settings to the disk, so the extension can load them. */
42
- function writeVariables({ apiKey, autoAnalyze, cypress, serverURL, sessionId, runContext, runOptions,
43
- // @ts-expect-error Feature flag, not part of public type
44
- takeScreenshots,
45
- // @ts-expect-error Feature flag, not part of public type
46
- experimentalAdvancedRules, excludeUrlPatterns, buildID }) {
47
- // only log the properties if they are not undefined
39
+ function writeVariables({ apiKey, autoAnalyze, cypress, serverURL, sessionId, runContext, runOptions, takeScreenshots, experimentalAdvancedRules, excludeUrlPatterns, buildID }) {
48
40
  debugLogger('Received configuration:', {
49
41
  apiKey: '<redacted>',
50
42
  ...(autoAnalyze !== undefined && { autoAnalyze }),
@@ -103,12 +95,7 @@ experimentalAdvancedRules, excludeUrlPatterns, buildID }) {
103
95
  if (excludeUrlPatterns === null || excludeUrlPatterns === void 0 ? void 0 : excludeUrlPatterns.length) {
104
96
  (0, isValidExcludePattern_1.default)(excludeUrlPatterns);
105
97
  }
106
- // Note: If a build ID is provided the session ID will be consistent
107
- // so there is no need to write to the file.
108
- // between workers/machines (parallel runners)
109
98
  if (!buildID) {
110
- // When a custom session ID is not provided, attempt to read it from the filesystem.
111
- // This enables multi-process/multi-browser test suites to all use the same session ID.
112
99
  if (!sessionId && fs_1.default.existsSync(constants_1.PATH_TO_SESSION_FILE)) {
113
100
  debugLogger('Reading session ID from file for WDIO Test Runner');
114
101
  try {
@@ -1 +1 @@
1
- {"version":3,"file":"writeVariables.js","sourceRoot":"","sources":["../../src/utils/writeVariables.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,4CAA6B;AA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gBACH,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,YAAE,CAAC,YAAY,CAAC,gCAAoB,EAAE,MAAM,CAAC,CAAC,CAAA;gBACtE,SAAS,GAAG,IAAI,CAAC,EAAY,CAAA;YAC/B,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,yCAAyC,KAAK,EAAE,CAAC,CAAA;YACnE,CAAC;QACH,CAAC;IACH,CAAC;IAED,MAAM,SAAS,GAAc;QAC3B,OAAO,EAAE,MAAM;QACf,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,UAAU,IAAI,SAAS;QACnC,gBAAgB,EAAE,CAAC,CAAC,eAAe;QACnC,YAAY,EAAE,CAAC,CAAC,WAAW;QAC3B,OAAO,EAAE,CAAC,CAAC,OAAO;QAClB,2BAA2B,EAAE,CAAC,CAAC,yBAAyB;QACxD,WAAW,EAAE,UAAU,IAAI,IAAI;QAC/B,WAAW,EAAE,UAAU,IAAI,IAAI;QAC/B,QAAQ,EAAE,OAAO;QACjB,oBAAoB,EAAE,kBAAkB,IAAI,IAAI;KACjD,CAAA;IAED,YAAE,CAAC,aAAa,CAAC,uCAA2B,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAA;AAC1E,CAAC;AAED,kBAAe,cAAc,CAAA"}
@@ -61,7 +61,6 @@ describe('writeVariables', () => {
61
61
  apiKey: 'abc',
62
62
  serverURL: 'http://localhost:3000/',
63
63
  sessionId: '123',
64
- // @ts-expect-error // Feature flag, not part of public type
65
64
  takeScreenshots: true,
66
65
  experimentalAdvancedRules: true
67
66
  });
@@ -1 +1 @@
1
- {"version":3,"file":"writeVariables.test.js","sourceRoot":"","sources":["../../src/utils/writeVariables.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iBAAc;AACd,+BAA6B;AAC7B,kDAAyB;AACzB,4CAAmB;AACnB,4CAA6B;AAC7B,0EAA2D;AA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AW,CACtB,CAAA;gBAEd,aAAM,CAAC,MAAM,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAA;YAC5C,CAAC,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;QAEF,QAAQ,CAAC,qBAAqB,EAAE,GAAG,EAAE;YACnC,EAAE,CAAC,cAAc,EAAE,GAAG,EAAE;gBACtB,aAAM,CAAC,MAAM,CAAC,GAAG,EAAE;oBACjB,IAAA,wBAAc,EAAC;wBACb,MAAM,EAAE,KAAK;wBACb,kBAAkB,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAQ;qBAC7C,CAAC,CAAA;gBACJ,CAAC,CAAC,CAAA;YACJ,CAAC,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
package/dist/wdio.d.ts CHANGED
@@ -1,8 +1,10 @@
1
1
  import type { Options } from '@wdio/types';
2
- import type { Browser, BrowserCommandsType, ElementCommandsType, RemoteOptions } from 'webdriverio';
2
+ import type { Browser as WDIOBrowser, BrowserCommandsType, ElementCommandsType, remote } from 'webdriverio';
3
3
  import Controller from './Controller';
4
4
  import { type Configuration } from './utils/writeVariables';
5
+ type RemoteOptions = Parameters<typeof remote>[0];
5
6
  type Options = RemoteOptions & Configuration;
7
+ type Browser = WebdriverIO.Browser | WDIOBrowser;
6
8
  /**
7
9
  * Creates a WebDriverIO config that uses axe extension
8
10
  *
@@ -10,9 +12,9 @@ type Options = RemoteOptions & Configuration;
10
12
  */
11
13
  export declare function wdioConfig({ axe, ...options }: Options): RemoteOptions;
12
14
  /** @deprecated This method of configuring the TestRunner is no longer supported. */
13
- export declare function wdioTestRunner(axe: Configuration['axe'], config: Options.Testrunner): Options.Testrunner;
15
+ export declare function wdioTestRunner(axe: Configuration['axe'], config: WebdriverIO.Config): WebdriverIO.Config;
14
16
  /** Configure WDIO TestRunner with axe Watcher. */
15
- export declare function wdioTestRunner({ axe, ...config }: Options.Testrunner & Configuration): Options.Testrunner;
17
+ export declare function wdioTestRunner({ axe, ...config }: WebdriverIO.Config & Configuration): WebdriverIO.Config;
16
18
  export declare class WdioController extends Controller {
17
19
  private driver;
18
20
  constructor(driver: Browser);
package/dist/wdio.js CHANGED
@@ -13,18 +13,10 @@ const constants_1 = require("./utils/constants");
13
13
  const headlessNotSupportedError_1 = require("./utils/headlessNotSupportedError");
14
14
  const mergeChromeArgs_1 = __importDefault(require("./utils/mergeChromeArgs"));
15
15
  const noop = () => {
16
- // Nothing.
17
16
  };
18
- /**
19
- * Creates a WebDriverIO config that uses axe extension
20
- *
21
- * @param arg Config to extend
22
- */
23
17
  function wdioConfig({ axe, ...options }) {
24
18
  var _a;
25
19
  (0, writeVariables_1.default)(axe);
26
- // Disable eslint. Wdio doesn't export this property even though they support it.
27
- /* eslint-disable @typescript-eslint/no-explicit-any */
28
20
  const chromeOpts = ((_a = options.capabilities) === null || _a === void 0 ? void 0 : _a['goog:chromeOptions']) || {};
29
21
  const args = chromeOpts.args || [];
30
22
  if (['headless', '--headless'].some(flag => args.includes(flag))) {
@@ -36,8 +28,6 @@ function wdioConfig({ axe, ...options }) {
36
28
  ...options === null || options === void 0 ? void 0 : options.capabilities,
37
29
  browserName: 'chrome',
38
30
  'goog:chromeOptions': {
39
- // Note: wdio v7 passes `--disable-extensions` as one of the default args.
40
- // we need to make sure we still append our args to the list.
41
31
  args: (0, mergeChromeArgs_1.default)(args, { disableOtherExtensions: true })
42
32
  }
43
33
  }
@@ -59,7 +49,6 @@ function wdioTestRunner(...params) {
59
49
  const capabilities = config.capabilities || [
60
50
  { [CHROME_OPTIONS]: { args: [] } }
61
51
  ];
62
- // has to be any because type is not exported
63
52
  const firstCapability = capabilities[0];
64
53
  firstCapability[CHROME_OPTIONS] = firstCapability[CHROME_OPTIONS] || {};
65
54
  const chromeOpts = firstCapability[CHROME_OPTIONS];
@@ -76,23 +65,17 @@ function wdioTestRunner(...params) {
76
65
  onPrepare(...prepareParams) {
77
66
  const sessionId = axe.sessionId;
78
67
  const buildID = axe.buildID;
79
- // Note: we only want to write a file if a build ID is not provided.
80
- // as the build ID will ensure the session ID is consistent between workers/machines.
81
68
  if (!buildID) {
82
69
  fs_1.default.writeFileSync(constants_1.PATH_TO_SESSION_FILE, JSON.stringify({ id: sessionId }));
83
70
  }
84
- // @ts-expect-error TS is angry about calling this ¯\_(ツ)_/¯
85
71
  return onPrepare(...prepareParams);
86
72
  },
87
- // Remove the file, preventing other sessions from reusing its ID.
88
73
  onComplete(...completeParams) {
89
74
  try {
90
75
  fs_1.default.unlinkSync(constants_1.PATH_TO_SESSION_FILE);
91
76
  }
92
77
  catch (_a) {
93
- // Oh well.
94
78
  }
95
- // @ts-expect-error TS is angry about calling this ¯\_(ツ)_/¯
96
79
  return onComplete(...completeParams);
97
80
  }
98
81
  };
@@ -114,7 +97,6 @@ class WdioController extends Controller_1.default {
114
97
  }
115
98
  }
116
99
  exports.WdioController = WdioController;
117
- /** Webdriver `browser` methods. */
118
100
  exports.WRAPPED_BROWSER_METHODS = [
119
101
  'reloadSession',
120
102
  'setWindowSize',
@@ -125,7 +107,6 @@ exports.WRAPPED_BROWSER_METHODS = [
125
107
  'url',
126
108
  'waitUntil'
127
109
  ];
128
- /** Wrapped `element` methods. */
129
110
  exports.WRAPPED_ELEMENT_METHODS = [
130
111
  'addValue',
131
112
  'clearValue',
@@ -142,7 +123,6 @@ exports.WRAPPED_ELEMENT_METHODS = [
142
123
  'waitForExist',
143
124
  'waitUntil'
144
125
  ];
145
- /** Wrap the given WDIO `browser` object, ensuring axe-core analysis is run after each command. */
146
126
  const wrapWdio = (browser, controller) => {
147
127
  const wrapper = async (fn, ...args) => {
148
128
  const res = await fn(...args);
package/dist/wdio.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"wdio.js","sourceRoot":"","sources":["../src/wdio.ts"],"names":[],"mappings":";;;;;;AA0BA,gCA0BC;AAgBD,wCA8DC;AA3HD,4CAAmB;AACnB,8DAAqC;AAC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,IAAI,CAAC,CAAA;IACxD,CAAC;IAED,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA;AAtBY,QAAA,QAAQ,YAsBpB"}
package/dist/webdriver.js CHANGED
@@ -11,28 +11,17 @@ const headlessNotSupportedError_1 = require("./utils/headlessNotSupportedError")
11
11
  const mergeChromeArgs_1 = __importDefault(require("./utils/mergeChromeArgs"));
12
12
  var webdriverWrapping_1 = require("./webdriverWrapping");
13
13
  Object.defineProperty(exports, "wrapWebdriver", { enumerable: true, get: function () { return webdriverWrapping_1.wrapDriver; } });
14
- /**
15
- * Creates a Selenium config that uses axe extension
16
- *
17
- * @param arg Config to extend
18
- */
19
14
  function webdriverConfig(arg) {
20
15
  var _a;
21
- // Lazily require `chrome` to avoid Puppeteer/Playwright/WDIO users from needing `selenium-webdriver` installed.
22
- // eslint-disable-next-line import/no-extraneous-dependencies, @typescript-eslint/no-require-imports
23
16
  const chrome = require('selenium-webdriver/chrome');
24
17
  const { axe, options } = arg;
25
18
  (0, writeVariables_1.default)(axe);
26
19
  const opts = options ? options : new chrome.Options();
27
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
28
20
  const existingArgs = (((_a = opts === null || opts === void 0 ? void 0 : opts.options_) === null || _a === void 0 ? void 0 : _a.args) || []);
29
21
  opts.options_.args = (0, mergeChromeArgs_1.default)(existingArgs, {
30
22
  disableOtherExtensions: false
31
23
  });
32
- // Note: fragile, but selenium does not give us a real way to check this
33
- if (['headless', '--headless'].some(flag => { var _a, _b;
34
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
35
- return (_b = (_a = opts === null || opts === void 0 ? void 0 : opts.options_) === null || _a === void 0 ? void 0 : _a.args) === null || _b === void 0 ? void 0 : _b.includes(flag); })) {
24
+ if (['headless', '--headless'].some(flag => { var _a, _b; return (_b = (_a = opts === null || opts === void 0 ? void 0 : opts.options_) === null || _a === void 0 ? void 0 : _a.args) === null || _b === void 0 ? void 0 : _b.includes(flag); })) {
36
25
  throw new headlessNotSupportedError_1.HeadlessNotSupportedError('In WebdriverJS, use "chromeOptions.addArguments(\'--headless=new\')" instead of "setHeadless(true)" or "addArguments(\'--headless\')"');
37
26
  }
38
27
  return opts;
@@ -1 +1 @@
1
- {"version":3,"file":"webdriver.js","sourceRoot":"","sources":["../src/webdriver.ts"],"names":[],"mappings":";;;;;;AAmBA,0CA6BC;AA9CD,8DAAqC;AACrC,4EAA2E;AAC3E,iFAA6E;AAC7E,8EAAqD;AAErD,yDAAiE;AAAxD,kHAAA,UAAU,OAAiB;AAMpC;;;;GAIG;AAEH,SAAgB,eAAe,CAAC,GAAkB;;IAChD,gHAAgH;IAChH,oGAAoG;IACpG,MAAM,MAAM,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAA;IAEnD,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,GAAG,CAAA;IAC5B,IAAA,wBAAc,EAAC,GAAG,CAAC,CAAA;IAEnB,MAAM,IAAI,GAAY,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,OAAO,EAAE,CAAA;IAC9D,8DAA8D;IAC9D,MAAM,YAAY,GAAG,CAAC,CAAA,MAAC,IAAY,aAAZ,IAAI,uBAAJ,IAAI,CAAU,QAAQ,0CAAE,IAAI,KAAI,EAAE,CAAa,CAErE;IAAC,IAAY,CAAC,QAAQ,CAAC,IAAI,GAAG,IAAA,yBAAe,EAAC,YAAY,EAAE;QAC3D,sBAAsB,EAAE,KAAK;KAC9B,CAAC,CAAA;IAEF,wEAAwE;IACxE,IACE,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;IACrC,8DAA8D;IAC9D,OAAA,MAAA,MAAC,IAAY,aAAZ,IAAI,uBAAJ,IAAI,CAAU,QAAQ,0CAAE,IAAI,0CAAE,QAAQ,CAAC,IAAI,CAAC,CAAA,EAAA,CAC9C,EACD,CAAC;QACD,MAAM,IAAI,qDAAyB,CACjC,wIAAwI,C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