testcafe 3.7.0 → 3.7.1-rc.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.
@@ -7,6 +7,29 @@ function buildChromeArgs({ config, cdpPort, platformArgs, tempProfileDir, isCont
7
7
  const defaultArgs = [
8
8
  '--disable-search-engine-choice-screen',
9
9
  '--disable-component-extensions-with-background-pages',
10
+ '--allow-pre-commit-input',
11
+ '--disable-background-networking',
12
+ '--disable-background-timer-throttling',
13
+ '--disable-backgrounding-occluded-windows',
14
+ '--disable-breakpad',
15
+ '--disable-client-side-phishing-detection',
16
+ '--disable-default-apps',
17
+ '--disable-extensions',
18
+ '--disable-hang-monitor',
19
+ '--disable-infobars',
20
+ '--disable-ipc-flooding-protection',
21
+ '--disable-popup-blocking',
22
+ '--disable-prompt-on-repost',
23
+ '--disable-renderer-backgrounding',
24
+ '--disable-sync',
25
+ '--enable-automation',
26
+ '--export-tagged-pdf',
27
+ '--generate-pdf-document-outline',
28
+ '--force-color-profile=srgb',
29
+ '--metrics-recording-only',
30
+ '--no-first-run',
31
+ '--password-store=basic',
32
+ '--use-mock-keychain',
10
33
  ];
11
34
  let chromeArgs = []
12
35
  .concat(cdpPort ? [`--remote-debugging-port=${cdpPort}`] : [], !config.userProfile ? [`--user-data-dir=${tempProfileDir.path}`] : [], config.headless ? [headlessMode] : [], config.userArgs ? [config.userArgs] : [],
@@ -22,4 +45,4 @@ function buildChromeArgs({ config, cdpPort, platformArgs, tempProfileDir, isCont
22
45
  return chromeArgs;
23
46
  }
24
47
  exports.buildChromeArgs = buildChromeArgs;
25
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVpbGQtY2hyb21lLWFyZ3MuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvYnJvd3Nlci9wcm92aWRlci9idWlsdC1pbi9kZWRpY2F0ZWQvY2hyb21lL2J1aWxkLWNocm9tZS1hcmdzLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFhLFFBQUEsMEJBQTBCLEdBQUcsQ0FBQyxjQUFjLEVBQUUseUJBQXlCLENBQUMsQ0FBQztBQUV0RixTQUFnQixlQUFlLENBQUUsRUFBRSxNQUFNLEVBQUUsT0FBTyxFQUFFLFlBQVksRUFBRSxjQUFjLEVBQUUsZUFBZSxFQUFFLGtCQUFrQixFQUFFLFdBQVcsRUFBRTtJQUNoSSxNQUFNLFlBQVksR0FBRyxDQUFDLFFBQVEsRUFBRSxVQUFVLENBQUMsQ0FBQyxRQUFRLENBQUMsV0FBVyxDQUFDLENBQUMsQ0FBQyxDQUFDLGdCQUFnQixDQUFDLENBQUMsQ0FBQyxZQUFZLENBQUM7SUFDcEcsTUFBTSxXQUFXLEdBQUk7UUFDakIsdUNBQXVDO1FBQ3ZDLHNEQUFzRDtLQUN6RCxDQUFDO0lBRUYsSUFBSSxVQUFVLEdBQUcsRUFBRTtTQUNkLE1BQU0sQ0FDSCxPQUFPLENBQUMsQ0FBQyxDQUFDLENBQUMsMkJBQTJCLE9BQU8sRUFBRSxDQUFDLENBQUMsQ0FBQyxDQUFDLEVBQUUsRUFDckQsQ0FBQyxNQUFNLENBQUMsV0FBVyxDQUFDLENBQUMsQ0FBQyxDQUFDLG1CQUFtQixjQUFjLENBQUMsSUFBSSxFQUFFLENBQUMsQ0FBQyxDQUFDLENBQUMsRUFBRSxFQUNyRSxNQUFNLENBQUMsUUFBUSxDQUFDLENBQUMsQ0FBQyxDQUFDLFlBQVksQ0FBQyxDQUFDLENBQUMsQ0FBQyxFQUFFLEVBQ3JDLE1BQU0sQ0FBQyxRQUFRLENBQUMsQ0FBQyxDQUFDLENBQUMsTUFBTSxDQUFDLFFBQVEsQ0FBQyxDQUFDLENBQUMsQ0FBQyxFQUFFO0lBQ3hDLHlGQUF5RjtJQUN6RixrQkFBa0IsQ0FBQyxDQUFDLENBQUMsQ0FBQywwQkFBMEIsQ0FBQyxDQUFDLENBQUMsQ0FBQyxFQUFFLEVBQ3RELFlBQVksQ0FBQyxDQUFDLENBQUMsQ0FBQyxZQUFZLENBQUMsQ0FBQyxDQUFDLENBQUMsRUFBRSxFQUNsQyxXQUFXLENBQ2Q7U0FDQSxJQUFJLENBQUMsR0FBRyxDQUFDLENBQUM7SUFFZixJQUFJLGVBQWUsRUFBRTtRQUNqQixrQ0FBMEIsQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLEVBQUU7WUFDdEMsSUFBSSxDQUFDLFVBQVUsQ0FBQyxRQUFRLENBQUMsSUFBSSxDQUFDO2dCQUMxQixVQUFVLEdBQUcsVUFBVSxDQUFDLE1BQU0sQ0FBQyxHQUFHLEVBQUUsSUFBSSxDQUFDLENBQUM7UUFDbEQsQ0FBQyxDQUFDLENBQUM7S0FDTjtJQUVELE9BQU8sVUFBVSxDQUFDO0FBQ3RCLENBQUM7QUE1QkQsMENBNEJDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGNvbnN0IENPTlRBSU5FUklaRURfQ0hST01FX0ZMQUdTID0gWyctLW5vLXNhbmRib3gnLCAnLS1kaXNhYmxlLWRldi1zaG0tdXNhZ2UnXTtcblxuZXhwb3J0IGZ1bmN0aW9uIGJ1aWxkQ2hyb21lQXJncyAoeyBjb25maWcsIGNkcFBvcnQsIHBsYXRmb3JtQXJncywgdGVtcFByb2ZpbGVEaXIsIGlzQ29udGFpbmVyaXplZCwgaXNOYXRpdmVBdXRvbWF0aW9uLCBicm93c2VyTmFtZSB9KSB7XG4gICAgY29uc3QgaGVhZGxlc3NNb2RlID0gWydjaHJvbWUnLCAnY2hyb21pdW0nXS5pbmNsdWRlcyhicm93c2VyTmFtZSkgPyAnLS1oZWFkbGVzcz1uZXcnIDogJy0taGVhZGxlc3MnO1xuICAgIGNvbnN0IGRlZmF1bHRBcmdzICA9IFtcbiAgICAgICAgJy0tZGlzYWJsZS1zZWFyY2gtZW5naW5lLWNob2ljZS1zY3JlZW4nLFxuICAgICAgICAnLS1kaXNhYmxlLWNvbXBvbmVudC1leHRlbnNpb25zLXdpdGgtYmFja2dyb3VuZC1wYWdlcycsXG4gICAgXTtcblxuICAgIGxldCBjaHJvbWVBcmdzID0gW11cbiAgICAgICAgLmNvbmNhdChcbiAgICAgICAgICAgIGNkcFBvcnQgPyBbYC0tcmVtb3RlLWRlYnVnZ2luZy1wb3J0PSR7Y2RwUG9ydH1gXSA6IFtdLFxuICAgICAgICAgICAgIWNvbmZpZy51c2VyUHJvZmlsZSA/IFtgLS11c2VyLWRhdGEtZGlyPSR7dGVtcFByb2ZpbGVEaXIucGF0aH1gXSA6IFtdLFxuICAgICAgICAgICAgY29uZmlnLmhlYWRsZXNzID8gW2hlYWRsZXNzTW9kZV0gOiBbXSxcbiAgICAgICAgICAgIGNvbmZpZy51c2VyQXJncyA/IFtjb25maWcudXNlckFyZ3NdIDogW10sXG4gICAgICAgICAgICAvLyBOT1RFOiB3ZSBuZWVkIHRvIHByZXZlbnQgbmV3IHdpbmRvdyBibG9ja2luZyBmb3IgbXVsdGlwbGUgd2luZG93cyBpbiBOYXRpdmUgQXV0b21hdGlvblxuICAgICAgICAgICAgaXNOYXRpdmVBdXRvbWF0aW9uID8gWyctLWRpc2FibGUtcG9wdXAtYmxvY2tpbmcnXSA6IFtdLFxuICAgICAgICAgICAgcGxhdGZvcm1BcmdzID8gW3BsYXRmb3JtQXJnc10gOiBbXSxcbiAgICAgICAgICAgIGRlZmF1bHRBcmdzXG4gICAgICAgIClcbiAgICAgICAgLmpvaW4oJyAnKTtcblxuICAgIGlmIChpc0NvbnRhaW5lcml6ZWQpIHtcbiAgICAgICAgQ09OVEFJTkVSSVpFRF9DSFJPTUVfRkxBR1MuZm9yRWFjaChmbGFnID0+IHtcbiAgICAgICAgICAgIGlmICghY2hyb21lQXJncy5pbmNsdWRlcyhmbGFnKSlcbiAgICAgICAgICAgICAgICBjaHJvbWVBcmdzID0gY2hyb21lQXJncy5jb25jYXQoJyAnLCBmbGFnKTtcbiAgICAgICAgfSk7XG4gICAgfVxuXG4gICAgcmV0dXJuIGNocm9tZUFyZ3M7XG59XG4iXX0=
48
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVpbGQtY2hyb21lLWFyZ3MuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvYnJvd3Nlci9wcm92aWRlci9idWlsdC1pbi9kZWRpY2F0ZWQvY2hyb21lL2J1aWxkLWNocm9tZS1hcmdzLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFhLFFBQUEsMEJBQTBCLEdBQUcsQ0FBQyxjQUFjLEVBQUUseUJBQXlCLENBQUMsQ0FBQztBQUV0RixTQUFnQixlQUFlLENBQUUsRUFBRSxNQUFNLEVBQUUsT0FBTyxFQUFFLFlBQVksRUFBRSxjQUFjLEVBQUUsZUFBZSxFQUFFLGtCQUFrQixFQUFFLFdBQVcsRUFBRTtJQUNoSSxNQUFNLFlBQVksR0FBRyxDQUFDLFFBQVEsRUFBRSxVQUFVLENBQUMsQ0FBQyxRQUFRLENBQUMsV0FBVyxDQUFDLENBQUMsQ0FBQyxDQUFDLGdCQUFnQixDQUFDLENBQUMsQ0FBQyxZQUFZLENBQUM7SUFDcEcsTUFBTSxXQUFXLEdBQUk7UUFDakIsdUNBQXVDO1FBQ3ZDLHNEQUFzRDtRQUN0RCwwQkFBMEI7UUFDMUIsaUNBQWlDO1FBQ2pDLHVDQUF1QztRQUN2QywwQ0FBMEM7UUFDMUMsb0JBQW9CO1FBQ3BCLDBDQUEwQztRQUMxQyx3QkFBd0I7UUFDeEIsc0JBQXNCO1FBQ3RCLHdCQUF3QjtRQUN4QixvQkFBb0I7UUFDcEIsbUNBQW1DO1FBQ25DLDBCQUEwQjtRQUMxQiw0QkFBNEI7UUFDNUIsa0NBQWtDO1FBQ2xDLGdCQUFnQjtRQUNoQixxQkFBcUI7UUFDckIscUJBQXFCO1FBQ3JCLGlDQUFpQztRQUNqQyw0QkFBNEI7UUFDNUIsMEJBQTBCO1FBQzFCLGdCQUFnQjtRQUNoQix3QkFBd0I7UUFDeEIscUJBQXFCO0tBQ3hCLENBQUM7SUFFRixJQUFJLFVBQVUsR0FBRyxFQUFFO1NBQ2QsTUFBTSxDQUNILE9BQU8sQ0FBQyxDQUFDLENBQUMsQ0FBQywyQkFBMkIsT0FBTyxFQUFFLENBQUMsQ0FBQyxDQUFDLENBQUMsRUFBRSxFQUNyRCxDQUFDLE1BQU0sQ0FBQyxXQUFXLENBQUMsQ0FBQyxDQUFDLENBQUMsbUJBQW1CLGNBQWMsQ0FBQyxJQUFJLEVBQUUsQ0FBQyxDQUFDLENBQUMsQ0FBQyxFQUFFLEVBQ3JFLE1BQU0sQ0FBQyxRQUFRLENBQUMsQ0FBQyxDQUFDLENBQUMsWUFBWSxDQUFDLENBQUMsQ0FBQyxDQUFDLEVBQUUsRUFDckMsTUFBTSxDQUFDLFFBQVEsQ0FBQyxDQUFDLENBQUMsQ0FBQyxNQUFNLENBQUMsUUFBUSxDQUFDLENBQUMsQ0FBQyxDQUFDLEVBQUU7SUFDeEMseUZBQXlGO0lBQ3pGLGtCQUFrQixDQUFDLENBQUMsQ0FBQyxDQUFDLDBCQUEwQixDQUFDLENBQUMsQ0FBQyxDQUFDLEVBQUUsRUFDdEQsWUFBWSxDQUFDLENBQUMsQ0FBQyxDQUFDLFlBQVksQ0FBQyxDQUFDLENBQUMsQ0FBQyxFQUFFLEVBQ2xDLFdBQVcsQ0FDZDtTQUNBLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FBQztJQUVmLElBQUksZUFBZSxFQUFFO1FBQ2pCLGtDQUEwQixDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsRUFBRTtZQUN0QyxJQUFJLENBQUMsVUFBVSxDQUFDLFFBQVEsQ0FBQyxJQUFJLENBQUM7Z0JBQzFCLFVBQVUsR0FBRyxVQUFVLENBQUMsTUFBTSxDQUFDLEdBQUcsRUFBRSxJQUFJLENBQUMsQ0FBQztRQUNsRCxDQUFDLENBQUMsQ0FBQztLQUNOO0lBRUQsT0FBTyxVQUFVLENBQUM7QUFDdEIsQ0FBQztBQW5ERCwwQ0FtREMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgY29uc3QgQ09OVEFJTkVSSVpFRF9DSFJPTUVfRkxBR1MgPSBbJy0tbm8tc2FuZGJveCcsICctLWRpc2FibGUtZGV2LXNobS11c2FnZSddO1xuXG5leHBvcnQgZnVuY3Rpb24gYnVpbGRDaHJvbWVBcmdzICh7IGNvbmZpZywgY2RwUG9ydCwgcGxhdGZvcm1BcmdzLCB0ZW1wUHJvZmlsZURpciwgaXNDb250YWluZXJpemVkLCBpc05hdGl2ZUF1dG9tYXRpb24sIGJyb3dzZXJOYW1lIH0pIHtcbiAgICBjb25zdCBoZWFkbGVzc01vZGUgPSBbJ2Nocm9tZScsICdjaHJvbWl1bSddLmluY2x1ZGVzKGJyb3dzZXJOYW1lKSA/ICctLWhlYWRsZXNzPW5ldycgOiAnLS1oZWFkbGVzcyc7XG4gICAgY29uc3QgZGVmYXVsdEFyZ3MgID0gW1xuICAgICAgICAnLS1kaXNhYmxlLXNlYXJjaC1lbmdpbmUtY2hvaWNlLXNjcmVlbicsXG4gICAgICAgICctLWRpc2FibGUtY29tcG9uZW50LWV4dGVuc2lvbnMtd2l0aC1iYWNrZ3JvdW5kLXBhZ2VzJyxcbiAgICAgICAgJy0tYWxsb3ctcHJlLWNvbW1pdC1pbnB1dCcsXG4gICAgICAgICctLWRpc2FibGUtYmFja2dyb3VuZC1uZXR3b3JraW5nJyxcbiAgICAgICAgJy0tZGlzYWJsZS1iYWNrZ3JvdW5kLXRpbWVyLXRocm90dGxpbmcnLFxuICAgICAgICAnLS1kaXNhYmxlLWJhY2tncm91bmRpbmctb2NjbHVkZWQtd2luZG93cycsXG4gICAgICAgICctLWRpc2FibGUtYnJlYWtwYWQnLFxuICAgICAgICAnLS1kaXNhYmxlLWNsaWVudC1zaWRlLXBoaXNoaW5nLWRldGVjdGlvbicsXG4gICAgICAgICctLWRpc2FibGUtZGVmYXVsdC1hcHBzJyxcbiAgICAgICAgJy0tZGlzYWJsZS1leHRlbnNpb25zJyxcbiAgICAgICAgJy0tZGlzYWJsZS1oYW5nLW1vbml0b3InLFxuICAgICAgICAnLS1kaXNhYmxlLWluZm9iYXJzJyxcbiAgICAgICAgJy0tZGlzYWJsZS1pcGMtZmxvb2RpbmctcHJvdGVjdGlvbicsXG4gICAgICAgICctLWRpc2FibGUtcG9wdXAtYmxvY2tpbmcnLFxuICAgICAgICAnLS1kaXNhYmxlLXByb21wdC1vbi1yZXBvc3QnLFxuICAgICAgICAnLS1kaXNhYmxlLXJlbmRlcmVyLWJhY2tncm91bmRpbmcnLFxuICAgICAgICAnLS1kaXNhYmxlLXN5bmMnLFxuICAgICAgICAnLS1lbmFibGUtYXV0b21hdGlvbicsXG4gICAgICAgICctLWV4cG9ydC10YWdnZWQtcGRmJyxcbiAgICAgICAgJy0tZ2VuZXJhdGUtcGRmLWRvY3VtZW50LW91dGxpbmUnLFxuICAgICAgICAnLS1mb3JjZS1jb2xvci1wcm9maWxlPXNyZ2InLFxuICAgICAgICAnLS1tZXRyaWNzLXJlY29yZGluZy1vbmx5JyxcbiAgICAgICAgJy0tbm8tZmlyc3QtcnVuJyxcbiAgICAgICAgJy0tcGFzc3dvcmQtc3RvcmU9YmFzaWMnLFxuICAgICAgICAnLS11c2UtbW9jay1rZXljaGFpbicsXG4gICAgXTtcblxuICAgIGxldCBjaHJvbWVBcmdzID0gW11cbiAgICAgICAgLmNvbmNhdChcbiAgICAgICAgICAgIGNkcFBvcnQgPyBbYC0tcmVtb3RlLWRlYnVnZ2luZy1wb3J0PSR7Y2RwUG9ydH1gXSA6IFtdLFxuICAgICAgICAgICAgIWNvbmZpZy51c2VyUHJvZmlsZSA/IFtgLS11c2VyLWRhdGEtZGlyPSR7dGVtcFByb2ZpbGVEaXIucGF0aH1gXSA6IFtdLFxuICAgICAgICAgICAgY29uZmlnLmhlYWRsZXNzID8gW2hlYWRsZXNzTW9kZV0gOiBbXSxcbiAgICAgICAgICAgIGNvbmZpZy51c2VyQXJncyA/IFtjb25maWcudXNlckFyZ3NdIDogW10sXG4gICAgICAgICAgICAvLyBOT1RFOiB3ZSBuZWVkIHRvIHByZXZlbnQgbmV3IHdpbmRvdyBibG9ja2luZyBmb3IgbXVsdGlwbGUgd2luZG93cyBpbiBOYXRpdmUgQXV0b21hdGlvblxuICAgICAgICAgICAgaXNOYXRpdmVBdXRvbWF0aW9uID8gWyctLWRpc2FibGUtcG9wdXAtYmxvY2tpbmcnXSA6IFtdLFxuICAgICAgICAgICAgcGxhdGZvcm1BcmdzID8gW3BsYXRmb3JtQXJnc10gOiBbXSxcbiAgICAgICAgICAgIGRlZmF1bHRBcmdzXG4gICAgICAgIClcbiAgICAgICAgLmpvaW4oJyAnKTtcblxuICAgIGlmIChpc0NvbnRhaW5lcml6ZWQpIHtcbiAgICAgICAgQ09OVEFJTkVSSVpFRF9DSFJPTUVfRkxBR1MuZm9yRWFjaChmbGFnID0+IHtcbiAgICAgICAgICAgIGlmICghY2hyb21lQXJncy5pbmNsdWRlcyhmbGFnKSlcbiAgICAgICAgICAgICAgICBjaHJvbWVBcmdzID0gY2hyb21lQXJncy5jb25jYXQoJyAnLCBmbGFnKTtcbiAgICAgICAgfSk7XG4gICAgfVxuXG4gICAgcmV0dXJuIGNocm9tZUFyZ3M7XG59XG4iXX0=
@@ -4790,7 +4790,7 @@ window['%hammerhead%'].utils.removeInjectedScript();
4790
4790
  return testCafeCore.delay(_this.automationSettings.mouseActionStepDelay);
4791
4791
  });
4792
4792
  };
4793
- DragAutomationBase.prototype._mouseup = function () {
4793
+ DragAutomationBase.prototype._mouseup = function (draggedElement) {
4794
4794
  var _this = this;
4795
4795
  return cursor
4796
4796
  .buttonUp()
@@ -4819,7 +4819,7 @@ window['%hammerhead%'].utils.removeInjectedScript();
4819
4819
  })
4820
4820
  .then(function (element) {
4821
4821
  //B231323
4822
- if (topElement && element === topElement && !_this.dragAndDropState.enabled)
4822
+ if (topElement && element === topElement && !_this.dragAndDropState.enabled && element === draggedElement)
4823
4823
  eventSimulator$6.click(topElement, options);
4824
4824
  });
4825
4825
  });
@@ -4844,7 +4844,7 @@ window['%hammerhead%'].utils.removeInjectedScript();
4844
4844
  return Promise$7.all([testCafeCore.delay(_this.automationSettings.mouseActionStepDelay), _this._mousedown(eventArgs)]);
4845
4845
  })
4846
4846
  .then(function () { return _this._drag(); })
4847
- .then(function () { return _this._mouseup(); });
4847
+ .then(function () { return _this._mouseup(eventArgs.element); });
4848
4848
  };
4849
4849
  return DragAutomationBase;
4850
4850
  }(VisibleElementAutomation));
@@ -1 +1 @@
1
- window["%hammerhead%"].utils.removeInjectedScript(),function Td(Md){var Dd=Md.document;!function(m,t,g,e){function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var y=n(m),i=n(t),E=n(g),o=n(e),r=y.default.nativeMethods,s=/^((mouse\w+)|((dbl)?click)|(contextmenu))$/,l=/^((drag\w*)|(drop))$/,a=/^key\w+$/,u=/^(before)?input$/,c=/^(blur|(focus(in|out)?))$/,f=/^pointer\w+/,d={click:1,dblclick:2,mousedown:1,mouseup:1},h="MouseEvent",p="PointerEvent",v="KeyboardEvent",b="InputEvent",S="FocusEvent",_=(w.prototype.run=function(){var t=this.options,e=t.bubbles,n=t.cancelable,i=t.detail,o=(t.view,t.buttons),e=!1!==e,n=!1!==n,i=i||d[this.eventName],o=void 0===o?1:o;Object.assign(this.options,{bubbles:e,cancelable:n,detail:i,view:Md,buttons:o});var r,s=w._getEventCtorByEventType(this.eventName,this.options.eventConstructor);s&&(r=new s(this.eventName,this.options),this.element.dispatchEvent(r))},w._getEventCtorByEventType=function(t,e){if(e&&"function"==typeof w._getEventCtorFromWindow(e)){var n=w._getEventCtorFromNativeMethods(e);if(n&&"function"==typeof n)return n}return s.test(t)||l.test(t)?w._getEventCtorFromNativeMethods(h):f.test(t)?w._getEventCtorFromNativeMethods(p):a.test(t)?w._getEventCtorFromNativeMethods(v):u.test(t)?w._getEventCtorFromNativeMethods(b):c.test(t)?w._getEventCtorFromNativeMethods(S):w._getEventCtorFromNativeMethods("CustomEvent")},w._getEventCtorFromNativeMethods=function(t){return r["Window"+t]||w._getEventCtorFromWindow(t)},w._getEventCtorFromWindow=function(t){return Md[t]},w);function w(t,e,n){this.element=t,this.eventName=e,this.options=n}var P=function(t,e){return(P=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function x(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}P(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var A=function(){return(A=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function C(t,s,l,a){return new(l=l||i.default)(function(n,e){function i(t){try{r(a.next(t))}catch(t){e(t)}}function o(t){try{r(a.throw(t))}catch(t){e(t)}}function r(t){var e;t.done?n(t.value):((e=t.value)instanceof l?e:new l(function(t){t(e)})).then(i,o)}r((a=a.apply(t,s||[])).next())})}function T(n,i){var o,r,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=t(0),a.throw=t(1),a.return=t(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function t(e){return function(t){return function(e){if(o)throw new TypeError("Generator is already executing.");for(;a&&e[a=0]&&(l=0),l;)try{if(o=1,r&&(s=2&e[0]?r.return:e[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,e[1])).done)return s;switch(r=0,s&&(e=[2&e[0],s.value]),e[0]){case 0:case 1:s=e;break;case 4:return l.label++,{value:e[1],done:!1};case 5:l.label++,r=e[1],e=[0];continue;case 7:e=l.ops.pop(),l.trys.pop();continue;default:if(!(s=0<(s=l.trys).length&&s[s.length-1])&&(6===e[0]||2===e[0])){l=0;continue}if(3===e[0]&&(!s||e[1]>s[0]&&e[1]<s[3])){l.label=e[1];break}if(6===e[0]&&l.label<s[1]){l.label=s[1],s=e;break}if(s&&l.label<s[2]){l.label=s[2],l.ops.push(e);break}s[2]&&l.ops.pop(),l.trys.pop();continue}e=i.call(n,l)}catch(t){e=[6,t],r=0}finally{o=s=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}}var M=(D.create=function(t){return"left"in t?new D(t.left,t.top):"right"in t?new D(t.right,t.bottom):new D(t.x,t.y)},D.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},D.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},D.prototype.round=function(t){return void 0===t&&(t=Math.round),this.x=t(this.x),this.y=t(this.y),this},D.prototype.eql=function(t){return this.x===t.x&&this.y===t.y},D.prototype.mul=function(t){return this.x*=t,this.y*=t,this},D.prototype.distance=function(t){return Math.sqrt(Math.pow(this.x-t.x,2)+Math.pow(this.y-t.y,2))},D);function D(t,e){this.x=t,this.y=e}function U(t){var e="array"+t.charAt(0).toUpperCase()+t.slice(1),n=m.nativeMethods[e];return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return n.call.apply(n,t)}}U("filter"),U("map"),U("slice"),U("splice"),U("unshift"),U("forEach"),U("indexOf");var I=U("some");U("reverse"),U("reduce"),U("concat"),U("join"),U("every"),y.default.utils.browser;var k=y.default.nativeMethods;y.default.utils.style.get,y.default.utils.dom.getActiveElement;var O=y.default.utils.dom.findDocument,N=y.default.utils.dom.find;y.default.utils.dom.isElementInDocument;var B=y.default.utils.dom.isElementInIframe,F=y.default.utils.dom.getIframeByElement;y.default.utils.dom.isCrossDomainWindows,y.default.utils.dom.getSelectParent,y.default.utils.dom.getChildVisibleIndex,y.default.utils.dom.getSelectVisibleChildren;var L=y.default.utils.dom.isElementNode;y.default.utils.dom.isTextNode,y.default.utils.dom.isRenderedNode,y.default.utils.dom.isIframeElement,y.default.utils.dom.isInputElement,y.default.utils.dom.isButtonElement,y.default.utils.dom.isFileInput,y.default.utils.dom.isTextAreaElement,y.default.utils.dom.isAnchorElement;var K=y.default.utils.dom.isImgElement;y.default.utils.dom.isFormElement,y.default.utils.dom.isLabelElement,y.default.utils.dom.isSelectElement,y.default.utils.dom.isRadioButtonElement,y.default.utils.dom.isColorInputElement,y.default.utils.dom.isCheckboxElement,y.default.utils.dom.isOptionElement,y.default.utils.dom.isSVGElement;var V=y.default.utils.dom.isMapElement,R=y.default.utils.dom.isBodyElement,Y=y.default.utils.dom.isHtmlElement;y.default.utils.dom.isDocument,y.default.utils.dom.isTextEditableInput,y.default.utils.dom.isTextEditableElement,y.default.utils.dom.isTextEditableElementAndEditingAllowed,y.default.utils.dom.isContentEditableElement,y.default.utils.dom.isDomElement,y.default.utils.dom.isShadowUIElement,y.default.utils.dom.isShadowRoot,y.default.utils.dom.isElementFocusable,y.default.utils.dom.isHammerheadAttr,y.default.utils.dom.isElementReadOnly;var W=y.default.utils.dom.getScrollbarSize,X=y.default.utils.dom.getMapContainer,H=y.default.utils.dom.getTagName,q=y.default.utils.dom.closest,G=y.default.utils.dom.getParents,j=y.default.utils.dom.findParent;function z(t,e){return t.contains?t.contains(e):I(t,function(t){return t.contains(e)})}function $(t){var e=[];N(Dd,"*",function(t){"IFRAME"===t.tagName&&e.push(t),t.shadowRoot&&N(t.shadowRoot,"iframe",function(t){return e.push(t)})});for(var n=0;n<e.length;n++)if(k.contentWindowGetter.call(e[n])===t)return e[n];return null}function Q(t){return k.nodeTextContentGetter.call(t)}y.default.utils.dom.getTopSameDomainWindow,y.default.utils.dom.getParentExceptShadowRoot;var Z=(J.create=function(t){return new J(t.top,t.right,t.bottom,t.left)},J.prototype.add=function(t){return this.top+=t.top,this.right+=t.right,this.bottom+=t.bottom,this.left+=t.left,this},J.prototype.sub=function(t){return"top"in t&&(this.top-=t.top,this.left-=t.left),this.bottom-=t.bottom,this.right-=t.right,this},J.prototype.round=function(t,e){return void 0===t&&(t=Math.round),void 0===e&&(e=t),this.top=t(this.top),this.right=e(this.right),this.bottom=e(this.bottom),this.left=t(this.left),this},J.prototype.contains=function(t){return t.x>=this.left&&t.x<=this.right&&t.y>=this.top&&t.y<=this.bottom},J);function J(t,e,n,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=0),this.top=t,this.right=e,this.bottom=n,this.left=i}var tt=y.default.utils.style,et=y.default.utils.style.getBordersWidth;y.default.utils.style.getComputedStyle,y.default.utils.style.getElementMargin;var nt=y.default.utils.style.getElementPadding,it=y.default.utils.style.getElementScroll;y.default.utils.style.getOptionHeight,y.default.utils.style.getSelectElementSize,y.default.utils.style.isElementVisible,y.default.utils.style.isVisibleChild;var ot=y.default.utils.style.getWidth,rt=y.default.utils.style.getHeight,st=y.default.utils.style.getInnerWidth,lt=y.default.utils.style.getInnerHeight,at=y.default.utils.style.getScrollLeft,ut=y.default.utils.style.getScrollTop,ct=y.default.utils.style.setScrollLeft,ft=y.default.utils.style.setScrollTop,dt=y.default.utils.style.get,ht=y.default.utils.style.getBordersWidthFloat,mt=y.default.utils.style.getElementPaddingFloat;function pt(t){return L(t)&&"fixed"===tt.get(t,"position")}function vt(t){return L(t)&&"sticky"===tt.get(t,"position")}y.default.shadowUI,y.default.nativeMethods;var gt=function(t,e,n,i,o,r){this.width=t,this.height=e,this.left=n.x,this.top=n.y,this.right=n.x+t,this.bottom=n.y+e,this.border=i,this.scrollbar=r,this.scroll=o},yt={notElementOrTextNode:function(t){return"\n The ".concat(t," is neither a DOM element nor a text node.\n ")},elOutsideBounds:function(t,e){return"\n The ".concat(e," (").concat(t,") is located outside the the layout viewport.\n ")},elHasWidthOrHeightZero:function(t,e,n,i){return"\n The ".concat(e," (").concat(t,") is too small to be visible: ").concat(n,"px x ").concat(i,"px.\n ")},elHasDisplayNone:function(t,e){return"\n The ".concat(e," (").concat(t,") is invisible. \n The value of its 'display' property is 'none'.\n ")},parentHasDisplayNone:function(t,e,n){return"\n The ".concat(e," (").concat(t,") is invisible. \n It descends from an element that has the 'display: none' property (").concat(n,").\n ")},elHasVisibilityHidden:function(t,e){return"\n The ".concat(e," (").concat(t,") is invisible.\n The value of its 'visibility' property is 'hidden'.\n ")},parentHasVisibilityHidden:function(t,e,n){return"\n The ".concat(e," (").concat(t,") is invisible.\n It descends from an element that has the 'visibility: hidden' property (").concat(n,").\n ")},elHasVisibilityCollapse:function(t,e){return"\n The ".concat(e," (").concat(t,") is invisible.\n The value of its 'visibility' property is 'collapse'.\n ")},parentHasVisibilityCollapse:function(t,e,n){return"\n The ".concat(e," (").concat(t,") is invisible.\n It descends from an element that has the 'visibility: collapse' property (").concat(n,").\n ")},elNotRendered:function(t,e){return"\n The ".concat(e," (").concat(t,") has not been rendered.\n ")},optionNotVisible:function(t,e,n){return"\n The ".concat(e," (").concat(t,") is invisible. \n The parent element (").concat(n,") is collapsed, and its length is shorter than 2.\n ")},mapContainerNotVisible:function(t,e){return"\n The action target (".concat(t,") is invisible because ").concat(e,"\n ")}},Et=y.default.utils.html,bt=y.default.nativeMethods,St=10;function _t(t){if(!t)return"";var e,n,i,o=bt.cloneNode.call(t),r=Et.cleanUpHtml(bt.elementOuterHTMLGetter.call(o)),s=(e=bt.nodeTextContentGetter.call(t),n=St,void 0===i&&(i="..."),e.length<n?e:e.substring(0,n-i.length)+i),l=bt.elementChildrenGetter.call(t);return 0<bt.htmlCollectionLengthGetter.call(l)?r.replace("></",">...</"):s?r.replace("></",">".concat(s,"</")):r}var wt=y.default.utils.position.getElementRectangle,Pt=y.default.utils.position.getOffsetPosition,xt=y.default.utils.position.offsetToClientCoords;function At(t){var e,n,i,o,r=Y(t),s=r?t.getElementsByTagName("body")[0]:null,l=t.getBoundingClientRect(),a=Z.create(et(t)),u=it(t),c=B(t),f="BackCompat"===t.ownerDocument.compatMode,d=r?new M(0,0):M.create(l),h=l.height,m=l.width;r&&(m=s&&f?(h=s.clientHeight,s.clientWidth):(h=t.clientHeight,t.clientWidth)),!c||(e=F(t))&&(n=Pt(e),i=xt(M.create(n)),o=et(e),d.add(i).add(M.create(o)),r&&a.add(o));var p=!r&&st(t)!==t.clientWidth,v=!r&&lt(t)!==t.clientHeight,g={right:p?W():0,bottom:v?W():0};return new gt(m,h,d,a,u,g)}function Ct(t){var e=t.x,n=t.y,i=Dd.elementFromPoint,o=null;try{o=i.call(Dd,e,n)}catch(t){return null}for(null===o&&(o=i.call(Dd,e-1,n-1));o&&o.shadowRoot&&o.shadowRoot.elementFromPoint;){var r=o.shadowRoot.elementFromPoint(e,n);if(!r||o===r)break;o=r}return o}function Tt(t,e,n){var i=At(t),o=Math.max(t.scrollWidth,i.width),r=Math.max(t.scrollHeight,i.height),s=i.scrollbar.right+i.border.left+i.border.right+o,l=i.scrollbar.bottom+i.border.top+i.border.bottom+r;return(void 0===e||0<=e&&e<=s)&&(void 0===n||0<=n&&n<=l)}function Mt(t){var e=Pt(t),n=e.left,i=e.top,o=xt({x:n,y:i});return o.x=Math.round(o.x),o.y=Math.round(o.y),o}function Dt(n,e){return m.Promise.resolve(n===Dd.documentElement).then(function(t){if(t)return new M(0,0);var e=m.utils.browser.isFirefox?Math.ceil:Math.round;return m.Promise.resolve(Pt(n,e)).then(function(t){return M.create(t)})}).then(function(t){return t.add(e)})}var Ut=/auto|scroll|hidden/i;function It(t){var e,n=dt(t,"overflowX"),i=dt(t,"overflowY"),o=Ut.test(n),r=Ut.test(i),s=O(t).documentElement,l=t.scrollHeight;return(m.utils.browser.isChrome||m.utils.browser.isFirefox||m.utils.browser.isSafari)&&(e=t.getBoundingClientRect().top,l=l-s.getBoundingClientRect().top+e),(o||r)&&l>s.scrollHeight}function kt(t){if(R(t))return It(t);if(Y(t))return function(t){var e=dt(t,"overflowX"),n=dt(t,"overflowY");if("hidden"===e&&"hidden"===n)return!1;var i=t.scrollHeight>t.clientHeight,o=t.scrollWidth>t.clientWidth;if(i||o)return!0;var r=t.getElementsByTagName("body")[0];if(!r)return!1;if(It(r))return!1;var s=Math.min(t.clientWidth,r.clientWidth),l=Math.min(t.clientHeight,r.clientHeight);return r.scrollHeight>l||r.scrollWidth>s}(t);var e,n,i,o,r,s=(n=dt(e=t,"overflowX"),i=dt(e,"overflowY"),o=Ut.test(n),r=Ut.test(i),new M(o,r));if(!s.x&&!s.y)return!1;var l=s.y&&t.scrollHeight>t.clientHeight;return s.x&&t.scrollWidth>t.clientWidth||l}function Ot(i,o){return C(this,void 0,void 0,function(){var e,n;return T(this,function(t){switch(t.label){case 0:return[4,it(i)];case 1:return e=t.sent(),n=kt(i),!/html/i.test(i.tagName)&&n&&(o.x-=e.left,o.y-=e.top),[2,xt(o)]}})})}function Nt(t){if(!t)return null;var e,n,i=(e=Md.screenLeft||Md.screenX,n=Md.screenTop||Md.screenY,new M(e,n)),o=i.x,r=i.y,s=o+t.x,l=r+t.y;return new M(s,l)}function Bt(t){var e=t/2;return e<1?0:Math.round(e)}function Ft(t){var e=wt(t);return{offsetX:Bt(e.width),offsetY:Bt(e.height)}}function Lt(t,e,n){var i=Ft(t);if(e="number"==typeof e?Math.round(e):i.offsetX,n="number"==typeof n?Math.round(n):i.offsetY,0<e&&0<n)return{offsetX:e,offsetY:n};var o=At(t),r=Math.round(Math.max(t.scrollWidth,o.width)),s=Math.round(Math.max(t.scrollHeight,o.height)),l=o.scrollbar.right+o.border.left+o.border.right+r,a=o.scrollbar.bottom+o.border.top+o.border.bottom+s;return{offsetX:e<0?l+e:e,offsetY:n<0?a+n:n}}var Kt=E.default.positionUtils;function Vt(e,n){return void 0===n&&(n=!1),o.default.hide(n).then(function(){var t=Kt.getElementFromPoint(e);return o.default.show(n).then(function(){return t})})}function Rt(t,n){return m.Promise.resolve(Ct(t)).then(function(e){return m.Promise.resolve(z(n,e)).then(function(t){return t&&Q(e)}).then(function(t){return t||e&&e===n?e:null})})}function Yt(n,i){if(!i||!n||n===i)return n;if("tref"===H(i))return i;var e,o,t="area"===H(i)&&K(n);return m.utils.browser.isFirefox&&t?(e=n,o=i,m.Promise.resolve(q(o,"map")).then(function(t){return t&&t.name===e.useMap.substring(1)?o:e})):m.Promise.resolve(q(i,"a")).then(function(t){return!!t}).then(function(t){return!!t&&m.Promise.resolve(z(i,n)).then(function(t){return t&&Q(n)}).then(function(t){return!t&&Q(i)})}).then(function(t){return t?m.Promise.resolve(At(i)).then(function(e){return Rt({x:e.right-1,y:e.top+1},i).then(function(t){return t||Rt({x:e.left+1,y:e.bottom-1},i)}).then(function(t){return t||n})}):n})}function Wt(t,e,n){return Vt(t).then(function(t){return Yt(t,n)})}function Xt(t,e){this.code=t,this.isTestCafeError=!0,this.callsite=e||null}var Ht,qt,Gt,jt="E1",zt="E4",$t="E5",Qt="E9",Zt="E10",Jt="E11",te="E12",ee="E24",ne="E26",ie="E27",oe="E28",re="E29",se="E30",le="E31",ae="E32",ue="E33",ce="E34",fe="E35",de="E36",he="E37",me="E39",pe="E40",ve="E41",ge="E42",ye="E43",Ee="E44",be="E45",Se="E46",_e="E49",we="E50",Pe="E51",xe="E52",Ae="E57",Ce="E64",Te="E65",Me="E68",De="E69",Ue="E70",Ie="E71",ke="E72",Oe="E73",Ne="E74",Be="E76",Fe="E77",Le="E78",Ke="E82",Ve="E83",Re="E90",Ye="E91",We="E92",Xe="E93",He="E94",qe="E95",Ge="E97",je="E99",ze="E100",$e="E101",Qe="E102",Ze=(x(Je,Ht=Xt),Je);function Je(t,e,n){var i=Ht.call(this,t)||this;return i.optionName=e,i.actualValue=n,i}function tn(t,e){var n=qt.call(this,_e,e)||this;return n.instantiationCallsiteName=t,n}function en(t,e){var n=Gt.call(this,we,e)||this;return n.instantiationCallsiteName=t,n}x(tn,qt=Xt),x(en,Gt=Xt);var nn,on,rn,sn,ln,an,un,cn,fn=(x(dn,nn=Xt),dn);function dn(t,e,n){var i=void 0===e?{}:e,o=i.apiFnChain,r=i.apiFnIndex,s=i.reason,l=nn.call(this,t,n)||this;return l.apiFnChain=o,l.apiFnIndex=r,l.reason=s,l}function hn(t){return on.call(this,Pe,t)||this}function mn(t,e){return rn.call(this,xe,e,t)||this}function pn(t,e){var n=sn.call(this,jt)||this;return n.errStack=t,n.pageDestUrl=e,n}function vn(t,e,n){var i=ln.call(this,zt,n)||this;return i.errMsg=String(e),i.instantiationCallsiteName=t,i}function gn(t,e,n,i){var o=an.call(this,$t,i)||this;return o.errMsg=String(e),o.property=n,o.instantiationCallsiteName=t,o}function yn(t){var e=un.call(this,Ce)||this;return e.errMsg=String(t),e}function En(t,e){var n=cn.call(this,Te)||this;return n.errMsg=String(t),n.moduleName=e,n}x(hn,on=Xt),x(mn,rn=fn),x(pn,sn=Xt),x(vn,ln=Xt),x(gn,an=Xt),x(yn,un=Xt),x(En,cn=Xt);var bn,Sn=(x(_n,bn=Ze),_n);function _n(t,e){return bn.call(this,Qt,t,e)||this}var wn,Pn=(x(xn,wn=Ze),xn);function xn(t,e){return wn.call(this,Zt,t,e)||this}var An,Cn=(x(Tn,An=Ze),Tn);function Tn(t,e){return An.call(this,Jt,t,e)||this}var Mn,Dn=(x(Un,Mn=Ze),Un);function Un(t,e){return Mn.call(this,te,t,e)||this}var In,kn=(x(On,In=Ze),On);function On(t,e){return In.call(this,Re,t,e)||this}var Nn,Bn=(x(Fn,Nn=Ze),Fn);function Fn(t,e){return Nn.call(this,Ge,t,e)||this}var Ln,Kn=(x(Vn,Ln=Ze),Vn);function Vn(t,e){return Ln.call(this,Ye,t,e)||this}var Rn,Yn=(x(Wn,Rn=Ze),Wn);function Wn(t,e){return Rn.call(this,We,t,e)||this}var Xn,Hn=(x(qn,Xn=Ze),qn);function qn(t,e){return Xn.call(this,Xe,t,e)||this}var Gn,jn=(x(zn,Gn=Ze),zn);function zn(t,e){return Gn.call(this,He,t,e)||this}var $n,Qn=(x(Zn,$n=Ze),Zn);function Zn(t,e){return $n.call(this,qe,t,e)||this}var Jn,ti=(x(ei,Jn=Ze),ei);function ei(t,e){return Jn.call(this,je,t,e)||this}var ni,ii,oi=(x(ri,ni=Xt),ri);function ri(t,e,n){var i=ni.call(this,ze)||this;return i.objectName=t,i.propertyName=e,i.availableProperties=n,i}function si(t,e){return ii.call(this,ee,e,t)||this}x(si,ii=fn);var li,ai,ui,ci=(x(fi,li=fn),fi);function fi(t,e){return li.call(this,ne,e,t)||this}function di(t){var e=ai.call(this,ie)||this;return e.nodeDescription=t,e}function hi(t,e){var n=ui.call(this,oe,e)||this;return n.argumentName=t,n}x(di,ai=Xt),x(hi,ui=fn);var mi,pi,vi,gi,yi,Ei,bi,Si,_i,wi,Pi,xi,Ai,Ci,Ti,Mi,Di,Ui,Ii,ki,Oi,Ni,Bi,Fi,Li,Ki,Vi,Ri,Yi,Wi,Xi,Hi,qi=(x(Gi,mi=Xt),Gi);function Gi(t){return mi.call(this,$e,t)||this}function ji(t,e){var n=pi.call(this,re,e)||this;return n.argumentName=t,n}function zi(t,e){var n=vi.call(this,se)||this;return n.argumentName=t,n.nodeDescription=e,n}function $i(){return gi.call(this,le)||this}function Qi(){return yi.call(this,ae)||this}function Zi(t){var e=Ei.call(this,ue)||this;return e.argumentName=t,e}function Ji(){return bi.call(this,fe)||this}function to(t){var e=Si.call(this,de)||this;return e.argumentName=t,e}function eo(t,e){var n=_i.call(this,he)||this;return n.filePaths=t,n.scannedFilePaths=e,n}function no(){return wi.call(this,ce)||this}function io(t,e){var n=Pi.call(this,ve)||this;return n.properties=t?"scrollTargetY property":e?"scrollTargetX property":"scrollTargetX and scrollTargetY properties",n}function oo(t,e){var n=xi.call(this,Ae)||this;return t<=0?e<=0?(n.verb="are",n.dimensions="width and height"):(n.verb="is",n.dimensions="width"):(n.verb="is",n.dimensions="height"),n}function ro(t){return Ai.call(this,pe,t)||this}function so(){return Ci.call(this,me)||this}function lo(){return Ti.call(this,ge)||this}function ao(){return Mi.call(this,De)||this}function uo(){return Di.call(this,Me)||this}function co(){return Ui.call(this,Ue)||this}function fo(){return Ii.call(this,Ie)||this}function ho(){return ki.call(this,Oe)||this}function mo(){return Oi.call(this,Ke)||this}function po(t){var e=Ni.call(this,Le)||this;return e.errMsg=t,e}function vo(){return Bi.call(this,Ne)||this}function go(){return Fi.call(this,Be)||this}function yo(){return Li.call(this,Fe)||this}function Eo(){return Ki.call(this,ke)||this}function bo(){return Vi.call(this,Ve)||this}function So(){return Ri.call(this,ye)||this}function _o(){return Yi.call(this,Ee)||this}function wo(t,e){var n=Wi.call(this,be)||this;return n.dialogType=t,n.pageUrl=e,n}function Po(t,e,n){var i=Xi.call(this,Se)||this;return i.dialogType=t,i.errMsg=e,i.pageUrl=n,i}function xo(){return Hi.call(this,Qe)||this}x(ji,pi=fn),x(zi,vi=Xt),x($i,gi=Xt),x(Qi,yi=Xt),x(Zi,Ei=Xt),x(Ji,bi=Xt),x(to,Si=Xt),x(eo,_i=Xt),x(no,wi=Xt),x(io,Pi=Xt),x(oo,xi=Xt),x(ro,Ai=Xt),x(so,Ci=Xt),x(lo,Ti=Xt),x(ao,Mi=Xt),x(uo,Di=Xt),x(co,Ui=Xt),x(fo,Ii=Xt),x(ho,ki=Xt),x(mo,Oi=Xt),x(po,Ni=Xt),x(vo,Bi=Xt),x(go,Fi=Xt),x(yo,Li=Xt),x(Eo,Ki=Xt),x(bo,Vi=Xt),x(So,Ri=Xt),x(_o,Yi=Xt),x(wo,Wi=Xt),x(Po,Xi=Xt),x(xo,Hi=Xt);var Ao=(Object.defineProperty(Co.prototype,"mouseActionStepDelay",{get:function(){return 1===this._speedFactor?10:400*(1-this._speedFactor)},enumerable:!1,configurable:!0}),Object.defineProperty(Co.prototype,"keyActionStepDelay",{get:function(){return 1===this._speedFactor?10:200*(1-this._speedFactor)},enumerable:!1,configurable:!0}),Object.defineProperty(Co.prototype,"cursorSpeed",{get:function(){return Math.pow(400,this._speedFactor)/4},enumerable:!1,configurable:!0}),Object.defineProperty(Co.prototype,"draggingSpeed",{get:function(){return Math.pow(16,this._speedFactor)/4},enumerable:!1,configurable:!0}),Co);function Co(t){this._speedFactor=t||1}var To=y.default.Promise,Mo=y.default.nativeMethods;function Do(e){return new To(function(t){return Mo.setTimeout.call(Md,t,e)})}function Uo(){return Do(0)}var Io=Object.prototype.toString,ko=String.prototype.indexOf,Oo=String.prototype.endsWith||function(t,e){var n=Io.call(this);(void 0===e||e>n.length)&&(e=n.length),e-=t.length;var i=ko.call(n,t,e);return-1!==i&&i===e},No=Array.prototype.indexOf,Bo=Array.prototype.map,Fo=Array.prototype.sort,Lo=Array.prototype.filter,Ko=Array.prototype.concat,Vo="Command",Ro=(Yo.prototype.getAssignableProperties=function(){return[]},Yo.prototype.getAllAssignableProperties=function(){for(var t=Object.getPrototypeOf(this),e=[];t&&t.getAssignableProperties;)e=Ko.call(e,t.getAssignableProperties()),t=Object.getPrototypeOf(t);return e},Yo.prototype.getNonReportedProperties=function(){return[]},Yo.prototype.getReportedProperties=function(){var t=Bo.call(this.getAllAssignableProperties(),function(t){return t.name}),e=this.getNonReportedProperties();return Lo.call(t,function(t){return!(-1<No.call(e,t))})},Yo.prototype._assignFrom=function(t,e,n){if(void 0===n&&(n={}),t){e&&function(t,e){var n,i=e.constructor.name,o=Bo.call(e.getAllAssignableProperties(),function(t){return t.name}),r=Fo.call(e.getReportedProperties());for(n in t)if(!(-1<No.call(o,n)||n in e))throw new oi(i,n,r)}(t,this);for(var i,o,r=this.getAllAssignableProperties(),s=0;s<r.length;s++){var l=r[s],a=l.name,u=l.type,c=l.required,f=l.init,d=l.defaultValue;void 0!==d&&(this[a]=d);var h=t[a];void 0===h&&!c||(e&&u&&u((i=this.constructor.name,o=a,Oo.call(i,Vo)?o:"".concat(i,".").concat(o)),h),this[a]=f?f(a,h,n,e):h)}}},Yo);function Yo(){}function Wo(i){return function(t,e){var n=typeof e;if("number"!=n)throw new i(t,n);if(isNaN(e)||!isFinite(e)||e!==Math.floor(e))throw new i(t,e)}}var Xo,Ho,qo,Go,jo,zo,$o,Qo,Zo,Jo,tr,er,nr,ir=Wo(Sn),or=(Ho=Wo(Xo=Pn),function(t,e){if(Ho(t,e),e<0)throw new Xo(t,e)}),rr=(qo=Cn,function(t,e){var n=typeof e;if("boolean"!=n)throw new qo(t,n)}),sr=(Go=Dn,function(t,e){var n=typeof e;if("number"!=n)throw new Go(t,n);if(isNaN(e)||e<.01||1<e)throw new Go(t,e)}),lr=(jo=kn,function(t,e){var n=typeof e;if("string"!=n)throw new jo(t,n)}),ar=(zo=Bn,function(t,e){var n=typeof e;if("string"!=n&&!(e instanceof RegExp))throw new zo(t,n)}),ur=($o=Kn,function(t,e){if(!(e instanceof Date))throw new $o(t,e)}),cr=(Qo=Yn,function(t,e){if(isNaN(Number(e)))throw new Qo(t,typeof e)}),fr=(Zo=Hn,function(t,e){var n=typeof e;if("string"!=n&&!(e instanceof URL))throw new Zo(t,n)}),dr=(Jo=jn,function(t,e){var n=typeof e;if("object"!=n&&!(e instanceof URLSearchParams))throw new Jo(t,n)}),hr=(tr=Qn,function(t,e){var n=typeof e;if("object"!=n)throw new tr(t,n)}),mr=(er=ti,function(t,e){var n=typeof e;if("function"!=n)throw new er(t,n)}),pr=(x(vr,nr=Ro),vr.prototype.getAssignableProperties=function(){return[{name:"speed",type:sr}]},vr);function vr(t,e){var n=nr.call(this)||this;return n.speed=null,n._assignFrom(t,e),n}var gr,yr=(x(Er,gr=pr),Er.prototype.getAssignableProperties=function(){return[{name:"offsetX",type:ir},{name:"offsetY",type:ir},{name:"isDefaultOffset",type:rr}]},Er);function Er(t,e){var n=gr.call(this)||this;return n.offsetX=null,n.offsetY=null,n._assignFrom(t,e),n}var br,Sr=(x(_r,br=yr),_r.prototype.getAssignableProperties=function(){return[{name:"scrollToCenter",type:rr},{name:"skipParentFrames",type:rr}]},_r);function _r(t,e){var n=br.call(this)||this;return n.scrollToCenter=!1,n.skipParentFrames=!1,n._assignFrom(t,e),n}var wr,Pr,xr=(x(Ar,wr=Ro),Ar.prototype.getAssignableProperties=function(){return[{name:"left",type:ir,defaultValue:null},{name:"right",type:ir,defaultValue:null},{name:"top",type:ir,defaultValue:null},{name:"bottom",type:ir,defaultValue:null}]},Ar);function Ar(t,e){var n=wr.call(this)||this;return n._assignFrom(t,e),n}function Cr(t,e){var n=Pr.call(this)||this;return n.scrollTargetX=null,n.scrollTargetY=null,n.includeMargins=!1,n.includeBorders=!0,n.includePaddings=!0,n.crop={left:null,right:null,top:null,bottom:null},n._assignFrom(t,e),n}x(Cr,Pr=pr),Cr.prototype.getAssignableProperties=function(){return[{name:"scrollTargetX",type:ir},{name:"scrollTargetY",type:ir},{name:"crop",type:hr,init:ps},{name:"includeMargins",type:rr},{name:"includeBorders",type:rr},{name:"includePaddings",type:rr}]};var Tr,Mr=(x(Dr,Tr=Ro),Dr.prototype.getAssignableProperties=function(){return[{name:"ctrl",type:rr,defaultValue:!1},{name:"alt",type:rr,defaultValue:!1},{name:"shift",type:rr,defaultValue:!1},{name:"meta",type:rr,defaultValue:!1}]},Dr);function Dr(t,e){var n=Tr.call(this)||this;return n._assignFrom(t,e),n}var Ur,Ir=(x(kr,Ur=yr),kr.prototype.getAssignableProperties=function(){return[{name:"modifiers",type:hr,init:vs}]},kr);function kr(t,e){var n=Ur.call(this)||this;return n.modifiers={ctrl:!1,alt:!1,shift:!1,meta:!1},n._assignFrom(t,e),n}var Or,Nr=(x(Br,Or=Ir),Br.prototype.getAssignableProperties=function(){return[{name:"caretPos",type:or}]},Br);function Br(t,e){var n=Or.call(this)||this;return n.caretPos=null,n._assignFrom(t,e),n}var Fr,Lr=(x(Kr,Fr=Ir),Kr.prototype.getAssignableProperties=function(){return[{name:"speed"},{name:"minMovingTime"},{name:"holdLeftButton"},{name:"skipScrolling",type:rr},{name:"skipDefaultDragBehavior",type:rr}]},Kr);function Kr(t,e){var n=Fr.call(this)||this;return n.speed=null,n.minMovingTime=null,n.holdLeftButton=!1,n.skipScrolling=!1,n.skipDefaultDragBehavior=!1,n._assignFrom(t,e),n}var Vr,Rr,Yr,Wr,Xr,Hr,qr=(x(Gr,Vr=Nr),Gr.prototype.getAssignableProperties=function(){return[{name:"replace",type:rr},{name:"paste",type:rr},{name:"confidential",type:rr}]},Gr);function Gr(t,e){var n=Vr.call(this)||this;return n.replace=!1,n.paste=!1,n.confidential=void 0,n._assignFrom(t,e),n}function jr(t,e){var n=Rr.call(this,t,e)||this;return n.destinationOffsetX=null,n.destinationOffsetY=null,n._assignFrom(t,e),n}function zr(t,e){var n=Yr.call(this)||this;return n.portraitOrientation=!1,n._assignFrom(t,e),n}function $r(t,e){var n=Wr.call(this)||this;return n.timeout=void 0,n.allowUnawaitedPromise=!1,n._assignFrom(t,e),n}function Qr(t,e){var n=Xr.call(this)||this;return n.confidential=void 0,n._assignFrom(t,e),n}function Zr(t,e){var n=Hr.call(this)||this;return n._assignFrom(t,e),n}x(jr,Rr=Ir),jr.prototype.getAssignableProperties=function(){return[{name:"destinationOffsetX",type:ir},{name:"destinationOffsetY",type:ir}]},x(zr,Yr=Ro),zr.prototype.getAssignableProperties=function(){return[{name:"portraitOrientation",type:rr}]},x($r,Wr=Ro),$r.prototype.getAssignableProperties=function(){return[{name:"timeout",type:or},{name:"allowUnawaitedPromise",type:rr}]},x(Qr,Xr=pr),Qr.prototype.getAssignableProperties=function(){return[{name:"confidential",type:rr}]},x(Zr,Hr=Ro),Zr.prototype.getAssignableProperties=function(){return[{name:"name",type:lr},{name:"value",type:lr},{name:"domain",type:lr},{name:"path",type:lr},{name:"expires",type:ur},{name:"maxAge",type:cr},{name:"secure",type:rr},{name:"httpOnly",type:rr},{name:"sameSite",type:lr}]};var Jr,ts=(x(es,Jr=Ro),es.prototype.getAssignableProperties=function(){return[{name:"username",type:lr,required:!0},{name:"password",type:lr}]},es);function es(t,e){var n=Jr.call(this)||this;return n._assignFrom(t,e),n}var ns,is,os,rs,ss,ls=(x(as,ns=Ro),as.prototype.getAssignableProperties=function(){return[{name:"protocol",type:lr},{name:"host",type:lr,required:!0},{name:"port",type:cr,required:!0},{name:"auth",type:hr,init:hs}]},as);function as(t,e){var n=ns.call(this)||this;return n._assignFrom(t,e),n}function us(t,e){var n=is.call(this)||this;return n._assignFrom(t,e),n}function cs(t,e){var n=os.call(this)||this;return n._assignFrom(t,e),n}function fs(t,e){var n=rs.call(this)||this;return n._assignFrom(t,e),n}function ds(t,e){var n=ss.call(this)||this;return n._assignFrom(t,e),n}function hs(t,e,n,i){return void 0===i&&(i=!0),new ts(e,i)}function ms(t,e,n,i){return void 0===i&&(i=!0),new ls(e,i)}function ps(t,e,n,i){return void 0===i&&(i=!0),new xr(e,i)}function vs(t,e,n,i){return void 0===i&&(i=!0),new Mr(e,i)}x(us,is=Ro),us.prototype.getAssignableProperties=function(){return[{name:"url",type:fr},{name:"method",type:lr},{name:"headers",type:hr},{name:"params",type:dr},{name:"body"},{name:"timeout",type:cr},{name:"withCredentials",type:rr},{name:"auth",type:hr,init:hs},{name:"proxy",type:hr,init:ms},{name:"rawResponse",type:rr}]},x(cs,os=Ro),cs.prototype.getAssignableProperties=function(){return[{name:"credentials",type:cr}]},x(fs,rs=Ro),fs.prototype.getAssignableProperties=function(){return[{name:"stack",type:ar,required:!1},{name:"message",type:ar,required:!1},{name:"pageUrl",type:ar,required:!1}]},x(ds,ss=Ro),ds.prototype.getAssignableProperties=function(){return[{name:"fn",type:mr,required:!0},{name:"dependencies",type:hr,required:!1}]};var gs=null,ys=function(){return gs},Es=function(t){gs=t};y.default.Promise,y.default.nativeMethods,y.default.eventSandbox.listeners,y.default.utils.event.BUTTON;var bs=y.default.utils.event.BUTTONS_PARAMETER;function Ss(t){return t.top!==t}y.default.utils.event.DOM_EVENTS,y.default.utils.event.WHICH_PARAMETER,y.default.utils.event.preventDefault;var _s=y.default.Promise,ws=y.default.eventSandbox.message;function Ps(t,i,e){return new _s(function(n){ws.on(ws.SERVICE_MSG_RECEIVED_EVENT,function t(e){e.message.cmd===i&&(ws.off(ws.SERVICE_MSG_RECEIVED_EVENT,t),n(e.message))}),ws.sendServiceMsg(t,e)})}var xs=(As.prototype.on=function(t,e){this._eventsListeners[t]||(this._eventsListeners[t]=[]),this._eventsListeners[t].push(e)},As.prototype.once=function(n,i){var o=this;this.on(n,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return o.off(n,i),i.apply(void 0,t)})},As.prototype.off=function(t,e){var n=this._eventsListeners[t];n&&(this._eventsListeners[t]=m.nativeMethods.arrayFilter.call(n,function(t){return t!==e}))},As.prototype.offAll=function(t){t?this._eventsListeners[t]=[]:this._eventsListeners={}},As.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var i=this._eventsListeners[t];if(i)for(var o=0;o<i.length;o++)i[o].apply(this,e)},As);function As(){this._eventsListeners={}}var Cs=xs,Ts=m.eventSandbox.listeners;function Ms(){this.initialized=!1,this.stopPropagationFlag=!1,this.events=new Cs}var Ds=(Ms.prototype._internalListener=function(t,e,n,i,o){this.events.emit("scroll",t),this.stopPropagationFlag&&(i(),o())},Ms.prototype.init=function(){var n=this;this.initialized||(this.initialized=!0,Ts.initElementListening(Md,["scroll"]),Ts.addFirstInternalEventBeforeListener(Md,["scroll"],function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return n._internalListener.apply(n,t)}))},Ms.prototype.waitForScroll=function(t){var e=this,n=null,i=new m.Promise(function(t){n=t});return i.cancel=function(){return e.events.off("scroll",n)},this.initialized?this.handleScrollEvents(t,n):n(),i},Ms.prototype.handleScrollEvents=function(n,t){var e,i=this;this.events.once("scroll",t),(e=n)&&e.getRootNode&&O(e)!==e.getRootNode()&&(Ts.initElementListening(n,["scroll"]),Ts.addFirstInternalEventBeforeListener(n,["scroll"],function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];i._internalListener.apply(i,t),Ts.cancelElementListening(n)}))},Ms.prototype.stopPropagation=function(){this.stopPropagationFlag=!0},Ms.prototype.enablePropagation=function(){this.stopPropagationFlag=!1},new Ms),Us=(Is._isScrollValuesChanged=function(t,e){return at(t)!==e.left||ut(t)!==e.top},Is.prototype._setScroll=function(t,e){var n=this,i=e.left,o=e.top,r=Y(t)?O(t):t,s={left:at(r),top:ut(r)},i=Math.max(i,0),o=Math.max(o,0),l=Ds.waitForScroll(r);return ct(r,i),ft(r,o),Is._isScrollValuesChanged(r,s)?l=l.then(function(){n._scrollWasPerformed||(n._scrollWasPerformed=Is._isScrollValuesChanged(r,s))}):(l.cancel(),m.Promise.resolve())},Is.prototype._getScrollToPoint=function(t,e,n){var i=Math.floor(t.width/2),o=Math.floor(t.height/2),r=this._scrollToCenter?i:Math.min(n.left,i),s=this._scrollToCenter?o:Math.min(n.top,o),l=t.scroll,a=l.left,u=l.top,c=e.x>=a+t.width-r,f=e.x<=a+r,d=e.y>=u+t.height-s,h=e.y<=u+s;return c?a=e.x-t.width+r:f&&(a=e.x-r),d?u=e.y-t.height+s:h&&(u=e.y-s),{left:a,top:u}},Is.prototype._getScrollToFullChildView=function(t,e,n){var i,o,r,s,l,a,u={left:null,top:null},c=t.width>=e.width,f=t.height>=e.height,d=(i=e,o=t,Z.create({top:i.top-o.top,left:i.left-o.left,right:o.right-i.right,bottom:o.bottom-i.bottom}).sub(o.border).sub(o.scrollbar).round(Math.ceil,Math.floor));return c&&(r=t.width-e.width,s=Math.min(n.left,r),this._scrollToCenter&&(s=r/2),d.left<s?u.left=Math.round(t.scroll.left+d.left-s):d.right<s&&(u.left=Math.round(t.scroll.left+Math.min(d.left,-d.right)+s))),f&&(l=t.height-e.height,a=Math.min(n.top,l),this._scrollToCenter&&(a=l/2),d.top<a?u.top=Math.round(t.scroll.top+d.top-a):d.bottom<a&&(u.top=Math.round(t.scroll.top+Math.min(d.top,-d.bottom)+a))),u},Is._getChildPoint=function(t,e,n){return M.create(e).sub(M.create(t)).add(M.create(t.scroll)).add(M.create(e.border)).add(n)},Is.prototype._getScrollPosition=function(t,e,n,i){var o=Is._getChildPoint(t,e,n),r=this._getScrollToPoint(t,o,i),s=this._getScrollToFullChildView(t,e,i);return{left:Math.max(null===s.left?r.left:s.left,0),top:Math.max(null===s.top?r.top:s.top,0)}},Is._getChildPointAfterScroll=function(t,e,n,i){return M.create(e).add(M.create(t.scroll)).sub(M.create(n)).add(i)},Is.prototype._isChildFullyVisible=function(t,e,n){var i=Is._getChildPointAfterScroll(t,e,t.scroll,n),o=this._getScrollPosition(t,e,n,{left:0,top:0}),r=o.left,s=o.top;return!this._isTargetElementObscuredInPoint(i)&&r===t.scroll.left&&s===t.scroll.top},Is.prototype._scrollToChild=function(t,e,n){for(var i=At(t),o=At(e),r=st(Md),s=lt(Md),l=i.scroll,a=!this._isChildFullyVisible(i,o,n);a;){l=this._getScrollPosition(i,o,n,this._maxScrollMargin);var u=Is._getChildPointAfterScroll(i,o,l,n),c=this._isTargetElementObscuredInPoint(u);this._maxScrollMargin.left+=20,this._maxScrollMargin.left>=r&&(this._maxScrollMargin.left=50,this._maxScrollMargin.top+=20),a=c&&this._maxScrollMargin.top<s}return this._maxScrollMargin={left:50,top:50},this._setScroll(t,l)},Is.prototype._scrollElement=function(){if(!kt(this._element))return m.Promise.resolve();var t=At(this._element),e=this._getScrollToPoint(t,this._offsets,this._maxScrollMargin);return this._setScroll(this._element,e)},Is.prototype._scrollParents=function(){var t,e,n,i,o,r,s=this,l=(t=this._element,i=G(t),!B(t)||(e=F(t))&&(n=G(e),i.concat(n)),m.nativeMethods.arrayFilter.call(i,kt)),a=this._element,u=at(a),c=ut(a),f=M.create(this._offsets).sub(new M(u,c).round()),d=function(n,i){return C(this,void 0,void 0,function(){var e;return T(this,function(t){switch(t.label){case 0:e=0,t.label=1;case 1:return e<n?[4,i(e)]:[3,4];case 2:t.sent(),t.label=3;case 3:return e++,[3,1];case 4:return[2]}})})}(l.length,function(t){return s._scrollToChild(l[t],a,f).then(function(){o=At(a),r=At(l[t]),f.add(M.create(o)).sub(M.create(r)).add(M.create(r.border)),a=l[t]})}),h={scrollWasPerformed:this._scrollWasPerformed,offsetX:f.x,offsetY:f.y,maxScrollMargin:this._maxScrollMargin};return d.then(function(){if(!s._skipParentFrames&&Ss(Md))return h.cmd=Is.SCROLL_REQUEST_CMD,Ps(h,Is.SCROLL_RESPONSE_CMD,Md.parent)}).then(function(){return s._scrollWasPerformed})},Is._getPinnedElementAncestorOrSelf=function(t,e){return j(t,!0,e)},Is.prototype._isTargetElementObscuredInPointByElement=function(t,e){var n=Is._getPinnedElementAncestorOrSelf(t,e);return!!n&&!n.contains(this._element)},Is.prototype._isTargetElementObscuredInPoint=function(t){var e=Ct(t);return!!e&&(this._isTargetElementObscuredInPointByElement(e,pt)||this._isTargetElementObscuredInPointByElement(e,vt))},Is.prototype.run=function(){var t=this;return this._scrollElement().then(function(){return t._scrollParents()})},Is.SCROLL_REQUEST_CMD="automation|scroll|request",Is.SCROLL_RESPONSE_CMD="automation|scroll|response",Is);function Is(t,e,n){this._element=t,this._offsets=new M(e.offsetX,e.offsetY),this._scrollToCenter=!!e.scrollToCenter,this._skipParentFrames=!!e.skipParentFrames,this._maxScrollMargin=n||{left:50,top:50},this._scrollWasPerformed=!1}var ks=(Os.prototype.setup=function(){this.dragAndDropMode=!1,this.dropAllowed=!1},Os.prototype.leaveElement=function(){},Os.prototype.move=function(){},Os.prototype.enterElement=function(){},Os.prototype.dragAndDrop=function(){},Os.prototype.teardown=function(){},Os.prototype.run=function(t,e,n,i,o){var r=e&&g.domUtils.isElementInDocument(e),s=e&&g.domUtils.isElementInIframe(e)&&!g.domUtils.getIframeByElement(e);r&&!s||(e=null);var l=t!==e,a=l?g.domUtils.getCommonAncestor(t,e):null;this.setup(),l&&e&&this.leaveElement(t,e,a,n),l&&g.domUtils.isElementInDocument(t)&&this.enterElement(t,e,a,n),this.move(t,n),this.dragAndDrop(i,t,e,n,o),this.teardown(t,n,e);var u=this.dragAndDropMode,c=this.dropAllowed;return this.dragAndDropMode=!1,this.dropAllowed=!1,{dragAndDropMode:u,dropAllowed:c}},Os);function Os(t){var e=t.moveEvent;this.dragAndDropMode=!1,this.dropAllowed=!1,this.moveEvent=e}var Ns=y.default.eventSandbox.eventSimulator,Bs=y.default.utils.extend,Fs=y.default.nativeMethods,Ls=(Ks.leaveElement=function(t,e,n,i){Ns.mouseout(e,Bs({relatedTarget:t},i));for(var o=e;o&&o!==n;)Ns.mouseleave(o,Bs({relatedTarget:t},i)),o=Fs.nodeParentNodeGetter.call(o)},Ks.enterElement=function(t,e,n,i){Ns.mouseover(t,Bs({relatedTarget:e},i));for(var o=t,r=[];o&&o!==n;)r.push(o),o=g.domUtils.getParentExceptShadowRoot(o);for(var s=r.length-1;-1<s;s--)Ns.mouseenter(r[s],Bs({relatedTarget:e},i))},Ks.move=function(t,e,n){Ns[t](e,n)},Ks);function Ks(){}var Vs=(Rs.dragAndDrop=function(t,e,n,i){return Ns.drag(t,i),e!==n&&(g.domUtils.isElementInDocument(e)&&(i.relatedTarget=n,Ns.dragenter(e,i)),n&&(i.relatedTarget=e,Ns.dragleave(n,i))),!Ns.dragover(e,i)},Rs);function Rs(){}var Ys,Ws=y.default.eventSandbox.eventSimulator,Xs=(x(Hs,Ys=ks),Hs.prototype.leaveElement=function(t,e,n,i){Ls.leaveElement(t,e,n,i)},Hs.prototype.enterElement=function(t,e,n,i){Ls.enterElement(t,e,n,i)},Hs.prototype.move=function(t,e){this._needEmulateMoveEvent()&&Ls.move(this.moveEvent,t,e)},Hs.prototype.teardown=function(t,e,n){this._needEmulateMoveEvent()&&g.domUtils.isElementInDocument(t)&&t!==n&&Ws[this.moveEvent](t,e)},Hs.prototype._needEmulateMoveEvent=function(){return"touchmove"!==this.moveEvent||this.holdLeftButton},Hs);function Hs(t){var e=Ys.call(this,t)||this;return e.holdLeftButton=t.holdLeftButton,e}var qs,Gs=(x(js,qs=ks),js.prototype.setup=function(){qs.prototype.setup.call(this),this.dragAndDropMode=!0},js.prototype.dragAndDrop=function(t,e,n,i){this.dropAllowed=Vs.dragAndDrop(t,e,n,i)},js);function js(){return null!==qs&&qs.apply(this,arguments)||this}var zs,$s=y.default.eventSandbox.eventSimulator,Qs=(x(Zs,zs=ks),Zs.prototype.setup=function(){zs.prototype.setup.call(this),this.dragAndDropMode=!0},Zs.prototype.leaveElement=function(t,e,n,i){Ls.leaveElement(t,e,n,i)},Zs.prototype.move=function(t,e){Ls.move(this.moveEvent,t,e)},Zs.prototype.enterElement=function(t,e,n,i){Ls.enterElement(t,e,n,i)},Zs.prototype.dragAndDrop=function(t,e,n,i,o){var r=$s.dragstart(t,i);o.setReadOnlyMode(),r?this.dropAllowed=Vs.dragAndDrop(t,e,n,i):this.dragAndDropMode=!1},Zs.prototype.run=function(t,e,n,i,o){return zs.prototype.run.call(this,t,null,n,i,o)},Zs);function Zs(){return null!==zs&&zs.apply(this,arguments)||this}function Js(t,e,n){return new(t?e?Gs:Qs:Xs)(n)}function tl(a,u,c){return C(this,void 0,void 0,function(){var e,n,i,o,r,s,l;return T(this,function(t){switch(t.label){case 0:e=!0,n=M.create(a.startPoint),i=M.create(a.endPoint).round(Math.floor),o=M.create(a.startPoint).round(Math.floor),r=M.create(a.startPoint),s=u(),t.label=1;case 1:return o.eql(i)?[3,4]:(r=M.create(o),a.needMoveImmediately?o=i:e?(e=!1,o.add({x:0<a.distance.x?1:-1,y:0<a.distance.y?1:-1})):(l=Math.min((u()-s)/a.movingTime,1),o=M.create(a.distance).mul(l).add(n).round(Math.floor)),o.eql(r)?[3,3]:[4,c(o)]);case 2:t.sent(),t.label=3;case 3:return[3,1];case 4:return[2]}})})}var el=(nl.create=function(o,r,s,l,a){return void 0===a&&(a=null),C(this,void 0,m.Promise,function(){var e,n,i;return T(this,function(t){switch(t.label){case 0:return[4,nl.getTarget(o,s,new M(r.offsetX,r.offsetY))];case 1:return e=t.sent(),n=e.element,i=e.offset,[2,new nl(n,i,r,s,l,a)]}})})},nl.getTarget=function(e,n,i){return m.Promise.resolve(Tt(e,i.x,i.y)).then(function(t){return t?{element:e,offset:i}:m.Promise.all([Dt(e,i),n.document.documentElement]).then(function(t){var e=t[0];return{element:t[1],offset:e}})})},nl.prototype._getCursorSpeed=function(){return this.automationSettings.cursorSpeed},nl.prototype._getTargetClientPoint=function(){var o=this;return m.Promise.resolve(it(this.element)).then(function(i){return Y(o.element)?M.create(o.offset).sub(M.create(i)).round(Math.round):m.Promise.resolve(Mt(o.element)).then(function(t){var e=R(o.element),n=M.create(t).add(o.offset);return e||n.sub(M.create(i)),n.round(Math.floor)})})},nl.prototype._getEventSequenceOptions=function(t){var e=bs.noButton,n=Nt(t);return{eventOptions:{clientX:t.x,clientY:t.y,screenX:null==n?void 0:n.x,screenY:null==n?void 0:n.y,buttons:e,ctrl:this.modifiers.ctrl,alt:this.modifiers.alt,shift:this.modifiers.shift,meta:this.modifiers.meta},eventSequenceOptions:{moveEvent:this.moveEvent}}},nl.prototype._runEventSequence=function(t,e){var n=e.eventOptions,i=e.eventSequenceOptions;return Js(!1,this.firstMovingStepOccured,i).run(t,ys(),n,null,null)},nl.prototype._emulateEvents=function(t,e){var n=this._getEventSequenceOptions(e);this._runEventSequence(t,n),this.firstMovingStepOccured=!0,Es(t)},nl.prototype._movingStep=function(n){var i=this;return this.cursor.move(n).then(function(){return Vt(i.cursor.getPosition())}).then(function(t){var e=i._getCorrectedTopElement(t);return e?i._emulateEvents(e,n):null}).then(Uo)},nl.prototype._getCorrectedTopElement=function(t){return t},nl.prototype._move=function(l){return C(this,void 0,m.Promise,function(){var e,n,i,o,r,s=this;return T(this,function(t){switch(t.label){case 0:return e=this.cursor.getPosition(),n=M.create(l).sub(e),i=Math.max(Math.max(Math.abs(n.x),Math.abs(n.y))/this.cursorSpeed,this.minMovingTime),o={startPoint:e,endPoint:l,movingTime:i,distance:n,needMoveImmediately:this._needMoveCursorImmediately()},this.nativeAutomationInput?(r=[],[4,tl(o,m.nativeMethods.dateNow,function(i){return C(s,void 0,void 0,function(){var e,n;return T(this,function(t){switch(t.label){case 0:return[4,null===(n=this.nativeAutomationInput)||void 0===n?void 0:n.createMouseMoveEvent(i,this.modifiers)];case 1:return e=t.sent(),r.push(e),[2,Uo()]}})})})]):[3,4];case 1:return t.sent(),[4,this.nativeAutomationInput.executeEventSequence(r)];case 2:return t.sent(),[4,this.cursor.move(l)];case 3:return t.sent(),[3,6];case 4:return[4,tl(o,m.nativeMethods.dateNow,function(t){return s._movingStep(t)})];case 5:t.sent(),t.label=6;case 6:return[2]}})})},nl.prototype._needMoveCursorImmediately=function(){return this.touchMode},nl.prototype._scroll=function(){if(this.skipScrolling)return m.Promise.resolve(!1);var t=new Sr({offsetX:this.offset.x,offsetY:this.offset.y},!1);return new Us(this.element,t).run()},nl.prototype._moveToCurrentFrame=function(t,e){var n=this;if(this.cursor.isActive(this.window))return m.Promise.resolve();var i=this.cursor.getPosition(),o=i.x,r=i.y,s=this.cursor.getActiveWindow(this.window),c=null,l=null,f={cmd:"automation|move|request",startX:o,startY:r,endX:t.x,endY:t.y,modifiers:this.modifiers,speed:this.speed,nativeAutomationMove:e};return m.Promise.resolve().then(function(){if(s.parent===n.window)return m.Promise.resolve($(s)).then(function(t){return c=t,m.Promise.resolve((n=Pt(e=t),i=n.left,o=n.top,r=xt({x:i,y:o}),s=et(e),l=nt(e),a=r.x+s.left+l.left,u=r.y+s.top+l.top,new Z(u,a+ot(e),u+rt(e),a))).then(function(t){f.left=t.left,f.top=t.top,f.right=t.right,f.bottom=t.bottom});var e,n,i,o,r,s,l,a,u})}).then(function(){return Vt(n.cursor.getPosition())}).then(function(t){return l=t===c,s.parent===n.window&&(f.iframeUnderCursor=l),Ps(f,"automation|move|response",s)}).then(function(t){if(n.cursor.setActiveWindow(n.window),l||m.utils.dom.isIframeWindow(n.window))return n.cursor.move(t)})},nl.prototype.run=function(){var n=this;return this._scroll().then(function(){return m.Promise.all([n._getTargetClientPoint(),(t=n.window,new Z(0,ot(t),rt(t),0))]);var t}).then(function(t){var e=t[0];if(t[1].contains(e))return n._moveToCurrentFrame(e,!!n.nativeAutomationInput).then(function(){return n._move(e)})})},nl);function nl(t,e,n,i,o,r){void 0===r&&(r=null),this.touchMode=m.utils.featureDetection.isTouchDevice,this.moveEvent=this.touchMode?"touchmove":"mousemove",this.automationSettings=new Ao(n.speed),this.cursorSpeed=this._getCursorSpeed(),this.element=t,this.window=i,this.offset=e,this.cursor=o,this.minMovingTime=n.minMovingTime||0,this.modifiers=n.modifiers||{},this.skipScrolling=n.skipScrolling,this.skipDefaultDragBehavior=n.skipDefaultDragBehavior,this.speed=n.speed,this.nativeAutomationInput=r||null,this.firstMovingStepOccured=!1}var il=(ol.prototype._ensureActiveWindow=function(t){this._activeWindow!==t&&this._activeWindow!==t.parent&&this._activeWindow.parent!==t&&(this._activeWindow=t)},ol.prototype.isActive=function(t){return this._ensureActiveWindow(t),this._activeWindow===t},ol.prototype.setActiveWindow=function(t){this._activeWindow=t},ol.prototype.getActiveWindow=function(t){return this._ensureActiveWindow(t),this._activeWindow},ol.prototype.getPosition=function(){return new M(this._x,this._y)},ol.prototype.move=function(t){return this._x=t.x,this._y=t.y,this._ui.move(t)},ol.prototype.hide=function(){return this._ui.hide?this._ui.hide():m.Promise.resolve()},ol.prototype.show=function(){return this._ui.show?this._ui.show():m.Promise.resolve()},ol.prototype.leftButtonDown=function(){return this._ui.leftButtonDown()},ol.prototype.rightButtonDown=function(){return this._ui.rightButtonDown()},ol.prototype.buttonUp=function(){return this._ui.buttonUp()},ol);function ol(t,e){this._ui=e,this._x=-1,this._y=-1,this._activeWindow=t}var rl,sl,ll,al,ul=Ss(Md)?o.default.iframeCursorUI:o.default.cursorUI,cl=new il(Md.top,ul),fl=E.default.positionUtils,dl=E.default.domUtils,hl=E.default.eventUtils,ml="elementOverlapped";(sl=rl=rl||{})[sl.Mouse=0]="Mouse",sl[sl.Keyboard=1]="Keyboard",sl[sl.Touch=2]="Touch",sl[sl.Delay=3]="Delay",sl[sl.InsertText=4]="InsertText",(al=ll=ll||{})[al.alt=1]="alt",al[al.ctrl=2]="ctrl",al[al.meta=4]="meta";var pl={ctrl:!(al[al.shift=8]="shift"),alt:!1,shift:!1,meta:!1};function vl(t){var e=0;return t&&(t.ctrl&&(e|=ll.ctrl),t.alt&&(e|=ll.alt),t.shift&&(e|=ll.shift),t.meta&&(e|=ll.meta)),e}function gl(t){return ll[t]||0}var yl=y.default.utils,El=y.default.eventSandbox,bl=y.default.nativeMethods,Sl=El.message,_l={clickCount:1,force:.5},wl="native-automation|calculate-top-left-point|request",Pl="native-automation|calculate-top-left-point|response";function xl(){return C(this,void 0,void 0,function(){return T(this,function(t){switch(t.label){case 0:return Md===Md.parent?[3,2]:[4,Ps({cmd:wl},Pl,Md.parent)];case 1:return[2,t.sent().topLeftPoint];case 2:return[2,{x:0,y:0}]}})})}Sl.on(Sl.SERVICE_MSG_RECEIVED_EVENT,function(d){return C(void 0,void 0,void 0,function(){var r,s,l,a,u,c,f;return T(this,function(t){switch(t.label){case 0:return d.message.cmd!==wl?[3,2]:(r=d.source,[4,xl()]);case 1:s=t.sent(),l=s.x,a=s.y,u=$(r),n=(e=u).getBoundingClientRect(),i=ht(e),o=mt(e),c={x:n.left+i.left+o.left,y:n.top+i.top+o.top},f={cmd:Pl,topLeftPoint:{x:c.x+l,y:c.y+a}},Sl.sendServiceMsg(f,r),t.label=2;case 2:return[2]}var e,n,i,o})})});var Al=(Cl._isNonCharKeyModifier=function(t){var e=[ll.ctrl,ll.alt,ll.meta];return-1<bl.arrayIndexOf.call(e,t)},Cl._getKeyDownEventText=function(t){return t.isNewLine?"\r":1!==t.keyProperty.length||Cl._isNonCharKeyModifier(t.modifiers)?"":t.keyProperty},Cl.createKeyDownOptions=function(t){var e=Cl._getKeyDownEventText(t);return{type:e?"keyDown":"rawKeyDown",modifiers:t.modifiers||0,windowsVirtualKeyCode:t.keyCode,key:t.keyProperty,commands:t.commands,text:e}},Cl.createKeyUpOptions=function(t){return{type:"keyUp",modifiers:t.modifiers||0,key:t.keyProperty,windowsVirtualKeyCode:t.keyCode}},Cl.createMouseEventOptions=function(r,s){return C(this,void 0,void 0,function(){var n,i,o;return T(this,function(t){switch(t.label){case 0:return[4,xl()];case 1:return n=t.sent(),i=n.x,o=n.y,[2,yl.extend({x:s.options.clientX+i,y:s.options.clientY+o,modifiers:vl(s.options),button:(e=s.options).button?e.button:"left",type:r},_l)]}var e})})},Cl.createTouchEventOptions=function(o,r){return C(this,void 0,void 0,function(){var e,n,i;return T(this,function(t){switch(t.label){case 0:return[4,xl()];case 1:return e=t.sent(),n=e.x,i=e.y,[2,{modifiers:vl(r.options),touchPoints:[{x:r.options.clientX+n,y:r.options.clientY+i}],type:o}]}})})},Cl.delay=function(t){return{type:rl.Delay,options:{delay:t}}},Cl.keyDown=function(t){return{type:rl.Keyboard,options:Cl.createKeyDownOptions(t)}},Cl.keyUp=function(t){return{type:rl.Keyboard,options:Cl.createKeyUpOptions(t)}},Cl);function Cl(){}var Tl=y.default.utils.featureDetection.isTouchDevice,Ml=(Dl.prototype._executeTouchEvent=function(n,i){return C(this,void 0,void 0,function(){var e;return T(this,function(t){switch(t.label){case 0:return[4,Al.createTouchEventOptions(n,i)];case 1:return e=t.sent(),[2,this._dispatchEventFn.single(rl.Touch,e)]}})})},Dl.prototype._executeMouseEvent=function(n,i){return C(this,void 0,void 0,function(){var e;return T(this,function(t){switch(t.label){case 0:return[4,Al.createMouseEventOptions(n,i)];case 1:return e=t.sent(),[2,this._dispatchEventFn.single(rl.Mouse,e)]}})})},Dl.prototype.mouseDown=function(e){return C(this,void 0,void 0,function(){return T(this,function(t){return Tl?[2,this._executeTouchEvent("touchStart",e)]:[2,this._executeMouseEvent("mousePressed",e)]})})},Dl.prototype.mouseUp=function(e){return C(this,void 0,void 0,function(){return T(this,function(t){return Tl?[2,this._executeTouchEvent("touchEnd",e)]:[2,this._executeMouseEvent("mouseReleased",e)]})})},Dl.prototype.keyDown=function(t){var e=Al.createKeyDownOptions(t);return this._dispatchEventFn.single(rl.Keyboard,e)},Dl.prototype.keyUp=function(t){var e=Al.createKeyUpOptions(t);return this._dispatchEventFn.single(rl.Keyboard,e)},Dl.prototype.executeEventSequence=function(t){return this._dispatchEventFn.sequence(t)},Dl.prototype.executeInsertText=function(e){return C(this,void 0,void 0,function(){return T(this,function(t){return[2,this._dispatchEventFn.single(rl.InsertText,{text:e})]})})},Dl.prototype.createMouseMoveEvent=function(n,i){return C(this,void 0,void 0,function(){var e;return T(this,function(t){switch(t.label){case 0:return[4,Al.createMouseEventOptions("mouseMoved",{options:A({clientX:n.x,clientY:n.y,button:"none"},i)})];case 1:return e=t.sent(),[2,{type:rl.Mouse,options:e}]}})})},Dl);function Dl(t){this._dispatchEventFn=t}var Ul=(Il.create=function(t){var n=t.element,i=t.clientPoint,o=t.screenPoint,r=t.isTarget,s=t.inMoving;return C(this,void 0,void 0,function(){var e;return T(this,function(t){switch(t.label){case 0:return e=null,i?[4,Nt(i)]:[3,2];case 1:e=t.sent(),t.label=2;case 2:return[2,new Il({element:n,clientPoint:i,screenPoint:o,isTarget:r,inMoving:s,devicePoint:e})]}})})},Il);function Il(t){var e=t.element,n=void 0===e?null:e,i=t.clientPoint,o=void 0===i?null:i,r=t.screenPoint,s=void 0===r?null:r,l=t.isTarget,a=void 0!==l&&l,u=t.inMoving,c=void 0!==u&&u,f=t.devicePoint,d=void 0===f?null:f;this.element=n,this.clientPoint=o,this.screenPoint=s,this.devicePoint=d,this.isTarget=a,this.inMoving=c}var kl,Ol=(x(Nl,kl=xs),Nl.prototype._ensureWindowAndCursorForLegacyTests=function(t){t.window=t.window||Md,t.cursor=cl},Nl.prototype.canUseNativeAutomationEventSimulator=function(t){return!!this.nativeAutomationInput&&!!t&&"select"!==H(t)},Nl.prototype._getElementForEvent=function(n){return C(this,void 0,void 0,function(){var e;return T(this,function(t){return e=Tt(this.element,this.options.offsetX,this.options.offsetY)?this.element:null,[2,Wt(n.point,this.window,e)]})})},Nl.prototype._moveToElement=function(){return C(this,void 0,void 0,function(){var e,n=this;return T(this,function(t){switch(t.label){case 0:return e=new Lr(m.utils.extend({skipScrolling:!0},this.options),!1),[4,el.create(this.element,e,this.window,this.cursor,this.nativeAutomationInput)];case 1:return[2,t.sent().run().then(function(){return Do(n.automationSettings.mouseActionStepDelay)})]}})})},Nl.prototype._scrollToElement=function(){var e=this,n=!1,t=new Sr(this.options,!1);return new Us(this.element,t).run().then(function(t){return n=!!t,Do(e.automationSettings.mouseActionStepDelay)}).then(function(){return Wt(e.cursor.getPosition(),e.window)}).then(function(t){return function(s,l,a){return C(this,void 0,y.default.Promise,function(){var e,n,i,o,r;return T(this,function(t){switch(t.label){case 0:return s&&dl.contains(l,s)&&a?(e=ys(),n=dl.getCommonAncestor(s,e),[4,fl.getClientPosition(s)]):[2];case 1:return[4,Nt(i=t.sent())];case 2:return(o=t.sent())&&(r={clientX:i.x,clientY:i.y,screenX:o.x,screenY:o.y,ctrl:!1,alt:!1,shift:!1,meta:!1,buttons:hl.BUTTONS_PARAMETER.leftButton},Ls.leaveElement(s,e,n,r),Ls.enterElement(s,e,n,r),Es(s)),[2]}})})}(t,e.element,n)}).then(function(){return n})},Nl.prototype._getElementOffset=function(){var t=Lt(this.element),e=this.options,n=e.offsetX,i=e.offsetY,o=i||0===i?i:t.offsetY,r=n||0===n?n:t.offsetX;return M.create({x:r,y:o})},Nl.prototype._isTargetElement=function(n,i){return C(this,void 0,void 0,function(){var e;return T(this,function(t){switch(t.label){case 0:return(e=!i||n===i||n===this.element)||!n?[3,2]:[4,this._contains(this.element,n)];case 1:e=t.sent(),t.label=2;case 2:return[2,e]}})})},Nl.prototype._getCheckedPoints=function(t){for(var e=[t],n=t.x/2,i=t.y/2,o=2*t.x,r=2*t.y,s=i;s<r;s+=i)for(var l=n;l<o;l+=n)e.push(M.create({x:l,y:s}));return e},Nl.prototype._getAvailableOffset=function(r,s){return C(this,void 0,void 0,function(){var e,n,i,o;return T(this,function(t){switch(t.label){case 0:e=this._getCheckedPoints(s),i=n=null,o=0,t.label=1;case 1:return o<e.length?[4,Dt(this.element,e[o])]:[3,7];case 2:return n=t.sent(),[4,Ot(this.element,n)];case 3:return[4,Wt(t.sent(),this.window,r)];case 4:return i=t.sent(),[4,this._isTargetElement(i,r)];case 5:if(t.sent())return[2,e[o]];t.label=6;case 6:return o++,[3,1];case 7:return[2,null]}})})},Nl.prototype._wrapAction=function(m){return C(this,void 0,void 0,function(){var e,n,i,o,r,s,l,a,u,c,f,d,h;return T(this,function(t){switch(t.label){case 0:return e=this._getElementOffset(),[4,Tt(this.element,e.x,e.y)];case 1:return n=t.sent()?this.element:null,[4,Dt(this.element,e)];case 2:return i=t.sent(),[4,Mt(this.element)];case 3:return o=t.sent(),[4,m()];case 4:return t.sent(),this.options.isDefaultOffset?[4,this._getAvailableOffset(n,e)]:[3,6];case 5:r=t.sent(),e.x=(null==r?void 0:r.x)||e.x,e.y=(null==r?void 0:r.y)||e.y,this.options.offsetX=e.x,this.options.offsetY=e.y,t.label=6;case 6:return[4,Dt(this.element,e)];case 7:return s=t.sent(),[4,Mt(this.element)];case 8:return l=t.sent(),[4,Ot(this.element,s)];case 9:return[4,Wt(a=t.sent(),this.window,n)];case 10:return(u=t.sent())?[4,this._isTargetElement(u,n)]:[2,Ul.create({element:null,clientPoint:null,screenPoint:null,isTarget:!1,inMoving:!1})];case 11:return c=t.sent(),f=i.x!==s.x||i.y!==s.y,d=o.x!==l.x||o.y!==l.y,h=f&&d,[2,Ul.create({element:u,clientPoint:a,screenPoint:s,isTarget:c,inMoving:h})]}})})},Nl.prototype._checkElementState=function(t,e){if(!t.element)throw new ci(null,{reason:function t(e,n){void 0===n&&(n="action target");var i=_t(e);if(V(e)){var o=(t(X(q(e,"map")),"container")||"").replace(/.*The/,"its");return yt.mapContainerNotVisible(i,o)}return yt.elOutsideBounds(i,n)}(this.element)});if(e&&(!t.isTarget||t.inMoving))throw new qi;return t},Nl.prototype._ensureElement=function(o,e,n){var r=this;return void 0===e&&(e=!1),void 0===n&&(n=!1),this._wrapAction(function(){return r._scrollToElement()}).then(function(t){return r._checkElementState(t,o)}).then(function(t){return n?t:r._wrapAction(function(){return r._moveToElement()})}).then(function(t){return e||r._checkElementState(t,o),t}).then(function(t){var e,n,i=null==t?void 0:t.element;return r.emit(r.TARGET_ELEMENT_FOUND_EVENT,{element:i||null}),o||!i||t.isTarget||(e=_t(r.element),n=_t(i),r.emit(r.WARNING_EVENT,{type:ml,args:[e,n]})),{element:(null==t?void 0:t.element)||null,clientPoint:(null==t?void 0:t.clientPoint)||null,screenPoint:(null==t?void 0:t.screenPoint)||null,devicePoint:(null==t?void 0:t.devicePoint)||null}})},Nl.prototype._contains=function(o,r){return C(this,void 0,void 0,function(){var e,n,i;return T(this,function(t){switch(t.label){case 0:return[4,G(r)];case 1:for(e=t.sent(),n=0,i=e;n<i.length;n++)if(i[n]===o)return[2,!0];return[2,!1]}})})},Nl);function Nl(t,e,n,i,o){var r=kl.call(this)||this;return r.TARGET_ELEMENT_FOUND_EVENT="automation|target-element-found-event",r.WARNING_EVENT="automation|warning-event",r.element=t,r.options=e,r.automationSettings=new Ao(e.speed||1),r.window=n,r.cursor=i,r.nativeAutomationInput=o?new Ml(o):null,r._ensureWindowAndCursorForLegacyTests(r),r}var Bl,Fl=y.default.Promise,Ll=(x(Kl,Bl=Ol),Kl.prototype.run=function(t){var e=this,n=Fl.resolve();return this.element!==Dd.scrollingElement&&this.element!==Dd.documentElement&&(n=this._ensureElement(t,!0,!0)),n.then(function(){e.element.scrollLeft=e.scrollLeft,e.element.scrollTop=e.scrollTop})},Kl);function Kl(t,e,n){var i,o,r,s,l,a=e.x,u=e.y,c=e.position,f=e.byX,d=e.byY,h=Bl.call(this,t,n,Md,cl)||this;return c&&(o=t,r=c,s=Math.floor(o.scrollWidth/2-o.clientWidth/2),l=Math.floor(o.scrollHeight/2-o.clientHeight/2),a=(i={top:[s,0],right:[o.scrollWidth,l],bottom:[s,o.scrollHeight],left:[0,l],topRight:[o.scrollWidth,0],topLeft:[0,0],bottomRight:[o.scrollWidth,o.scrollHeight],bottomLeft:[0,o.scrollHeight],center:[s,l]}[r])[0],u=i[1]),h.scrollLeft="number"==typeof a?a:t.scrollLeft,h.scrollTop="number"==typeof u?u:t.scrollTop,f&&(h.scrollLeft+=f),d&&(h.scrollTop+=d),h}var Vl,Rl=(x(Yl,Vl=Ol),Yl.prototype.run=function(t){return this._ensureElement(t,!0,!0)},Yl);function Yl(t,e){return Vl.call(this,t,e,Md,cl)||this}var Wl=y.default.Promise,Xl=y.default.nativeMethods,Hl=y.default.utils.browser,ql=y.default.eventSandbox.focusBlur,Gl=E.default.contentEditable,jl=E.default.textSelection,zl=E.default.domUtils,$l=E.default.styleUtils,Ql=y.default.eventSandbox.message,Zl="automation|iframe|request",Jl="automation|iframe|response";function ta(t,e){var n,i,o=zl.isTextEditableElement(t),r=zl.isContentEditableElement(t);o||r?r&&isNaN(parseInt(e,10))?jl.setCursorToLastVisiblePosition(t):(n=isNaN(parseInt(e,10))?zl.getElementValue(t).length:e,jl.select(t,n,n)):(i=Gl.findContentEditableParent(t))&&jl.setCursorToLastVisiblePosition(Gl.findContentEditableParent(i))}function ea(v,g,y){var t=this;return new Wl(function(p){return C(t,void 0,void 0,function(){var n,i,o,r,s,l,a,u,c,f,d,h,m;return T(this,function(t){switch(t.label){case 0:return Ss(Md)?[4,Ps({cmd:Zl},Jl,Md.parent)]:[3,2];case 1:t.sent(),t.label=2;case 2:if(n=zl.getActiveElement(),i=zl.isTextEditableElement(v),o=zl.closest(v,"label[for]"),r=zl.isElementFocusable(v),s=!r&&o,l=zl.isContentEditableElement(v),a=l?Gl.findContentEditableParent(v):v,g&&Hl.isWebKit&&i&&jl.select(v,0,0),s)return g&&(e=o,zl.isElementFocusable(e)?ql.focus(e,E.default.noop,!1,!0):ia(e)),p(),[2];if(u=!g,c=!1,!r&&!l){if(f=zl.findDocument(a),d=Xl.documentActiveElementGetter.call(f),h=zl.isBodyElement(d),m=zl.isBodyElement(a)?a:zl.getFocusableParent(a),d&&!h&&zl.containsElement(d,a)||h&&zl.isBodyElement(m))return p(),[2];a=m||f.body,c=!0}return ql.focus(a,function(){!g||l||v===zl.getActiveElement()?(ta(v,y),g||zl.getActiveElement()===n?p():ql.focus(n,p,!0,!0)):p()},u,!0,!1,c),[2]}var e})})})}function na(t){var e=zl.closest(t,"label[for]"),n=e&&(e.control||Dd.getElementById(e.htmlFor));return n&&$l.isElementVisible(n)?n:null}function ia(t){var e=na(t);e&&zl.getActiveElement()!==e&&ql.focus(e,E.default.noop,!1,!0)}Ql.on(Ql.SERVICE_MSG_RECEIVED_EVENT,function(t){var e;t.message.cmd===Zl&&(e=zl.findIframeByWindow(t.source),ql.focus(e,function(){Ql.sendServiceMsg({cmd:Jl},t.source)},!1))});var oa=y.default.utils.browser,ra=y.default.eventSandbox.eventSimulator,sa=y.default.eventSandbox.listeners,la=y.default.nativeMethods,aa=E.default.domUtils,ua=E.default.styleUtils,ca=E.default.selectController,fa=o.default.selectElement,da=(ha.prototype.run=function(){this.eventState.clickElement&&ra.click(this.eventState.clickElement,this.eventArgs.options),aa.isElementFocusable(this.eventArgs.element)||ia(this.eventArgs.element)},ha);function ha(t,e){this.eventState=t,this.eventArgs=e}var ma,pa=(x(va,ma=da),va.prototype.run=function(){function t(t){n=la.eventTargetGetter.call(t)===e.input}var e=this,n=!1;sa.addInternalEventBeforeListener(Md,["focus"],t),ma.prototype.run.call(this),sa.removeInternalEventBeforeListener(Md,["focus"],t),aa.isElementFocusable(this.targetElement)&&!n&&this._ensureBoundElementFocusRaised()},va.prototype._ensureBoundElementFocusRaised=function(){ra.focus(this.input)},va);function va(t,e){var n=ma.call(this,t,e)||this;return n.targetElement=n.eventArgs.element,n.input=na(n.eventArgs.element),n}var ga,ya=(x(Ea,ga=da),Ea.prototype.run=function(){ga.prototype.run.call(this),this._toggleSelectOptionList()},Ea.prototype._toggleSelectOptionList=function(){var t=this.eventArgs.element;1===ua.getSelectElementSize(t)&&!1!==this.eventState.simulateDefaultBehavior&&(ca.isOptionListExpanded(t)?fa.collapseOptionList():fa.expandOptionList(t))},Ea);function Ea(t,e){return ga.call(this,t,e)||this}var ba,Sa=(x(_a,ba=da),_a.prototype.run=function(){return this.eventArgs.element},_a);function _a(t,e){return ba.call(this,t,e)||this}var wa,Pa=(x(xa,wa=pa),xa.prototype.run=function(){function t(){e=!0}var e=!1;sa.addInternalEventBeforeListener(Md,["change"],t),wa.prototype.run.call(this),sa.removeInternalEventBeforeListener(Md,["change"],t),!oa.isChrome||e||this.checkbox.disabled||this._isClickableElementInsideLabel(this.targetElement)||this._ensureCheckboxStateChanged()},xa.prototype._ensureCheckboxStateChanged=function(){this.checkbox.checked=!this.checkbox.checked,ra.change(this.checkbox)},xa.prototype._isClickableElementInsideLabel=function(t){var e=aa.isAnchorElement(t)&&t.getAttribute("href"),n=aa.isButtonElement(t);return e||n},xa);function xa(t,e){var n=wa.call(this,t,e)||this;return n.checkbox=n.input,n}var Aa=y.default.Promise,Ca=y.default.utils.browser,Ta=y.default.utils.featureDetection,Ma=y.default.eventSandbox.eventSimulator,Da=y.default.eventSandbox.listeners,Ua=E.default.domUtils,Ia=E.default.eventUtils,ka=E.default.arrayUtils,Oa=(Na.prototype.mousedown=function(t){var e=this;this.targetElementParentNodes=Ua.getParents(t.element),this.mouseDownElement=t.element,this._raiseTouchEvents(t);var n=Ua.getActiveElement();this.activeElementBeforeMouseDown=n;var i=Ca.isWebKit&&Ua.isSelectElement(this.mouseDownElement);return i&&this._bindMousedownHandler(),this._bindBlurHandler(n),this._isTouchEventWasCancelled()||(this.eventState.simulateDefaultBehavior=Ma.mousedown(t.element,t.options)),!1===this.eventState.simulateDefaultBehavior&&(this.eventState.simulateDefaultBehavior=i&&!this.eventState.mousedownPrevented),this._ensureActiveElementBlur(n).then(function(){return e._focus(t)})},Na.prototype.mouseup=function(t,e){var n,i,o,r,s;e.element=t,this.eventState.clickElement=(n=this.mouseDownElement,i=t,o=this.targetElementParentNodes,r=Ua.getParents(i),s=Ua.isTheSameNode(i,n),Ca.isFirefox?s?n:null:s?ka.equals(o,r)?n:null:n.contains(i)&&!Ua.isEditableFormElement(i)?n:i.contains(n)?i:ka.getCommonElement(r,o));var l={},a=function(t){l=t.timeStamp,Da.removeInternalEventBeforeListener(Md,["mouseup"],a)};return Da.addInternalEventBeforeListener(Md,["mouseup"],a),this._isTouchEventWasCancelled()||Ma.mouseup(t,e.options),e.options&&(e.options.timeStamp=l),this._click(e)},Na.prototype._click=function(u){return C(this,void 0,y.default.Promise,function(){var a;return T(this,function(t){var e,n,i,o,r,s,l;return e=this.eventState,i=na((n=u).element),o=aa.isSelectElement(n.element),r=aa.isOptionElement(n.element),s=aa.isLabelElement(n.element)&&i,l=i&&aa.isCheckboxElement(i),a=new(o?ya:r?Sa:l?Pa:s?pa:da)(e,n),this._isTouchEventWasCancelled()||a.run(),[2,u]})})},Na.prototype._isTouchEventWasCancelled=function(){return this.eventState.touchStartCancelled||this.eventState.touchEndCancelled},Na.prototype._bindMousedownHandler=function(){var e=this,n=function(t){e.eventState.mousedownPrevented=t.defaultPrevented,Ia.preventDefault(t),Ia.unbind(e.element,"mousedown",n)};Ia.bind(this.element,"mousedown",n)},Na.prototype._bindBlurHandler=function(t){var e=this,n=function(){e.eventState.blurRaised=!0,Ia.unbind(t,"blur",n,!0)};Ia.bind(t,"blur",n,!0)},Na.prototype._ensureActiveElementBlur=function(e){var n=this;return new Aa(function(t){Ua.getActiveElement()===e||n.eventState.blurRaised||Ma.blur(e),t()})},Na.prototype._focus=function(t){return!1===this.eventState.simulateDefaultBehavior?Aa.resolve():ea(Ua.isContentEditableElement(this.element)?this.element:t.element,!0,this.caretPos)},Na.prototype._raiseTouchEvents=function(t){Ta.isTouchDevice&&(this.eventState.touchStartCancelled=!Ma.touchstart(t.element,t.options),this.eventState.touchEndCancelled=!Ma.touchend(t.element,t.options))},Na);function Na(t,e){this.element=t,this.caretPos=e,this.targetElementParentNodes=[],this.activeElementBeforeMouseDown=null,this.mouseDownElement=null,this.eventState={mousedownPrevented:!1,blurRaised:!1,simulateDefaultBehavior:!0,clickElement:null,touchStartCancelled:!1,touchEndCancelled:!1}}var Ba,Fa=(x(La,Ba=Ol),La.prototype._mousedown=function(t){return this.canUseNativeAutomationEventSimulator(t.element)?this.nativeAutomationInput.mouseDown(t):this.strategy.mousedown(t)},La.prototype._mouseup=function(n,t){var i=this;return this.canUseNativeAutomationEventSimulator(t.element)?this.nativeAutomationInput.mouseUp(t).then(function(t){var e=i.options.caretPos;return"number"==typeof e&&ta(n,e),t}):this.strategy.mouseup(n,t)},La.prototype.run=function(t){var r,s=this;return this._ensureElement(t).then(function(t){var e=t.element,n=t.clientPoint,i=t.screenPoint,o=t.devicePoint;return r={point:n,screenPoint:i,element:e,options:m.utils.extend({clientX:null==n?void 0:n.x,clientY:null==n?void 0:n.y,screenX:null==o?void 0:o.x,screenY:null==o?void 0:o.y},s.modifiers)},m.Promise.all([Do(s.automationSettings.mouseActionStepDelay),s.cursor.leftButtonDown().then(function(){return s._mousedown(r)})])}).then(function(){return s.cursor.buttonUp()}).then(function(){return s._getElementForEvent(r)}).then(function(t){return t?s._mouseup(t,r):null})},La);function La(t,e,n,i,o){var r,s,l=Ba.call(this,t,e,n,i,o)||this;return l.modifiers=e.modifiers,l.strategy=(r=l.element,s=e.caretPos,new Oa(r,s)),l}function Ka(t,e,n){var i=function(t,e,n){if(e.y-t.y==0)return 0;var i=(e.x-t.x)/(e.y-t.y),o=t.y*(t.x-e.x)/(e.y-t.y)+t.x;return Math.round(i*n+o)}(t,e,n.top);return i&&i>=n.left&&i<=n.right?new M(i,n.top):null}function Va(t,e,n){var i=function(t,e,n){if(e.x===t.x)return 0;var i=(e.y-t.y)/(e.x-t.x),o=t.x*(t.y-e.y)/(e.x-t.x)+t.y;return Math.round(i*n+o)}(t,e,n.left);return i&&i>=n.top&&i<=n.bottom?new M(n.left,i):null}function Ra(t,e,n){for(var i=[],o=0,r=[{left:n.left,top:n.top,right:n.left,bottom:n.bottom,isHorizontal:!1},{left:n.right,top:n.top,right:n.right,bottom:n.bottom,isHorizontal:!1},{left:n.left,top:n.top,right:n.right,bottom:n.top,isHorizontal:!0},{left:n.left,top:n.bottom,right:n.right,bottom:n.bottom,isHorizontal:!0}];o<r.length;o++){var s=r[o],l=(s.isHorizontal?Ka:Va)(t,e,s);l&&i.push(l)}return i.length?1===i.length||i[0].distance(t)<i[1].distance(t)?i[0]:i[1]:null}var Ya=y.default.eventSandbox.eventSimulator,Wa=y.default.eventSandbox.message,Xa=E.default.positionUtils,Ha=E.default.domUtils,qa=E.default.styleUtils,Ga="automation|move|response";Wa.on(Wa.SERVICE_MSG_RECEIVED_EVENT,function(t){var e,n,i,o,r,s,l,a,u,c,f,d,h,m,p,v;"automation|move|request"===t.message.cmd&&(t.source.parent===Md?(e=Md["%testCafeDriverInstance%"],i=(n=t).message.nativeAutomationMove&&e.createDispatchNativeAutomationEventFunctions(),r=new M(n.message.endX,n.message.endY),s=n.source,l=Ha.findIframeByWindow(s),a=qa.getBordersWidth(l),u=qa.getElementPadding(l),c=Xa.getIframeClientCoordinates(l),f=Xa.getIframePointRelativeToParentFrame(r,s),d=cl.getPosition(),h=Xa.isInRectangle(d,c)?d:Ra(d,f,c),m={x:h.x-c.left,y:h.y-c.top},p=new Lr({modifiers:n.message.modifiers,offsetX:m.x+a.left+u.left,offsetY:m.y+a.top+u.top,speed:n.message.speed,skipScrolling:!0},!1),v={cmd:Ga,x:m.x,y:m.y},cl.getActiveWindow(Md)!==s?(o=null,i&&(o=new Ml(i)),el.create(l,p,Md,cl,o).then(function(t){return t.run()}).then(function(){cl.setActiveWindow(s),Wa.sendServiceMsg(v,s)})):Wa.sendServiceMsg(v,s)):(y.default.on(y.default.EVENTS.beforeUnload,function(){return Wa.sendServiceMsg({cmd:Ga},t.source)}),function(t){var e=t.source,n={left:t.message.left,right:t.message.right,top:t.message.top,bottom:t.message.bottom};if(!t.message.iframeUnderCursor){var i=t.message,o=i.startX,r=i.startY,s=o-n.left,l=r-n.top,a=ys();return a&&(Ya.mouseout(a,{clientX:s,clientY:l,relatedTarget:null}),Ya.mouseleave(a,{clientX:s,clientY:l,relatedTarget:null})),Wa.sendServiceMsg({cmd:Ga},e)}var u,c=cl.getPosition(),f=Ra(M.create(n).add(c),new M(t.message.endX,t.message.endY),n);f?(u=new Lr({modifiers:t.message.modifiers,offsetX:f.x-n.left,offsetY:f.y-n.top,speed:t.message.speed,skipScrolling:!0},!1),el.create(Dd.documentElement,u,Md,cl).then(function(t){return t.run()}).then(function(){var t={cmd:Ga,x:f.x,y:f.y};cl.setActiveWindow(e),Wa.sendServiceMsg(t,e)})):Wa.sendServiceMsg({cmd:Ga,x:n.left,y:n.top},e)}(t)))});var ja=y.default.Promise,za=y.default.utils.browser,$a=y.default.utils.featureDetection,Qa=y.default.eventSandbox.eventSimulator,Za=y.default.eventSandbox.focusBlur,Ja=y.default.nativeMethods,tu=E.default.domUtils,eu=E.default.styleUtils,nu=E.default.delay,iu=E.default.selectController,ou=o.default.selectElement,ru=$a.isTouchDevice?0:160,su=(lu.prototype._calculateEventArguments=function(){var t=this.optionListExpanded?iu.getEmulatedChildElement(this.element):this.element;return{options:this.modifiers,element:t}},lu.prototype._getMoveArguments=function(){var t,e,n=null,i=null,o=null;return o=this.optionListExpanded?(i=(t=Ft(n=iu.getEmulatedChildElement(this.element))).offsetX,t.offsetY):(n=Dd.documentElement,i=(e=ou.getSelectChildCenter(this.element)).x,e.y),{element:n,offsetX:i,offsetY:o,speed:this.speed}},lu.prototype._move=function(t){var e=this,n=t.element,i=t.offsetX,o=t.offsetY,r=t.speed,s=new Lr({offsetX:i,offsetY:o,speed:r,modifiers:this.modifiers},!1);return el.create(n,s,Md,cl).then(function(t){return t.run()}).then(function(){return nu(e.automationSettings.mouseActionStepDelay)})},lu.prototype._mousedown=function(){var t=this;return za.isFirefox?(Qa.mousedown(this.eventsArgs.element,this.eventsArgs.options),this.clickCausesChange&&(this.parentSelect.selectedIndex=this.childIndex),this._focus()):this._focus().then(function(){return nu(ru)}).then(function(){Qa.mousedown(t.eventsArgs.element,t.eventsArgs.options),t.clickCausesChange&&(t.parentSelect.selectedIndex=t.childIndex)})},lu.prototype._focus=function(){var e=this;return new ja(function(t){Za.focus(e.parentSelect,t,!1,!0)})},lu.prototype._mouseup=function(){Qa.mouseup(this.eventsArgs.element,this.eventsArgs.options);var t=za.isFirefox||za.isSafari||za.isChrome&&53<=za.version;return t&&this.clickCausesChange&&Qa.input(this.parentSelect),t&&this.clickCausesChange&&Qa.change(this.parentSelect),ja.resolve()},lu.prototype._click=function(){Qa.click(this.eventsArgs.element,this.eventsArgs.options)},lu.prototype.run=function(){var t=this;if(!this.parentSelect)return Qa.click(this.eventsArgs.element,this.eventsArgs.options),ja.resolve();this.optionListExpanded||ou.scrollOptionListByChild(this.element);var e=this._getMoveArguments();return this.eventsArgs=this._calculateEventArguments(),eu.getSelectElementSize(this.parentSelect)<=1?this._move(e).then(function(){return t._click()}):this._move(e).then(function(){return t._mousedown()}).then(function(){return t._mouseup()}).then(function(){return t._click()})},lu);function lu(t,e){var n,i,o,r,s;this.element=t,this.modifiers=e.modifiers,this.caretPos=e.caretPos,this.offsetX=e.offsetX,this.offsetY=e.offsetY,this.speed=e.speed,this.automationSettings=new Ao(e.speed),this.parentSelect=tu.getSelectParent(this.element),this.optionListExpanded=!!this.parentSelect&&iu.isOptionListExpanded(this.parentSelect),this.childIndex=null,this.clickCausesChange=!1,this.parentSelect&&(n=tu.isOptionElement(this.element),i=this.parentSelect.selectedIndex,this.childIndex=tu.getElementIndexInParent(this.parentSelect,this.element),o=Ja.nodeParentNodeGetter.call(this.element),r=tu.isOptionGroupElement(o)?o:null,s=this.element.disabled||r&&r.disabled,this.clickCausesChange=n&&!s&&this.childIndex!==i),this.eventsArgs={options:this.modifiers,element:this.element}}var au,uu=y.default.utils.featureDetection,cu=y.default.eventSandbox.eventSimulator,fu=E.default.delay,du=uu.isTouchDevice?0:160,hu=(x(mu,au=Ol),mu.prototype._firstClick=function(t){var e=this,n=new Nr(this.options);n.speed=1;var i=new Fa(this.element,n,Md,cl);return i.on(i.TARGET_ELEMENT_FOUND_EVENT,function(t){return e.emit(e.TARGET_ELEMENT_FOUND_EVENT,t)}),i.run(t).then(function(t){return fu(du).then(function(){return t})})},mu.prototype._secondClick=function(t){var e=this,n=new Nr({offsetX:t.screenPoint.x,offsetY:t.screenPoint.y,caretPos:this.caretPos,modifiers:this.modifiers,speed:1}),i=new Fa(Dd.documentElement,n,Md,cl);return i.run().then(function(t){return e.eventState.dblClickElement=i.strategy.eventState.clickElement,t})},mu.prototype._dblClick=function(t){this.eventState.dblClickElement&&cu.dblclick(this.eventState.dblClickElement,t.options)},mu.prototype.run=function(t){var e=this;return this._firstClick(t).then(function(t){return e._secondClick(t)}).then(function(t){return e._dblClick(t)})},mu);function mu(t,e){var n=au.call(this,t,e,Md,cl)||this;return n.modifiers=e.modifiers,n.caretPos=e.caretPos,n.speed=e.speed,n.automationSettings=new Ao(n.speed),n.offsetX=e.offsetX,n.offsetY=e.offsetY,n.eventArgs=null,n.eventState={dblClickElement:null},n}var pu,vu=function(){this.enabled=!1,this.dropAllowed=!1,this.element=null,this.dataTransfer=null,this.dataStore=null},gu=y.default.nativeMethods,yu=y.default.utils.featureDetection,Eu=y.default.utils.html,bu=y.default.utils.url,Su=y.default.eventSandbox.DataTransfer,_u=y.default.eventSandbox.DragDataStore,wu=E.default.eventUtils,Pu=E.default.domUtils,xu=(x(Au,pu=el),Au.create=function(o,r,s,l){return C(this,void 0,void 0,function(){var e,n,i;return T(this,function(t){switch(t.label){case 0:return[4,el.getTarget(o,s,new M(r.offsetX,r.offsetY))];case 1:return e=t.sent(),n=e.element,i=e.offset,[2,new Au(n,i,r,s,l)]}})})},Au.prototype._getCursorSpeed=function(){return this.automationSettings.draggingSpeed},Au.prototype._getEventSequenceOptions=function(t){var e=pu.prototype._getEventSequenceOptions.call(this,t),n=e.eventOptions,i=e.eventSequenceOptions;return n.dataTransfer=this.dragAndDropState.dataTransfer,n.buttons=wu.BUTTONS_PARAMETER.leftButton,i.holdLeftButton=!0,{eventOptions:n,eventSequenceOptions:i}},Au.prototype._getCorrectedTopElement=function(t){return this.touchMode?this.dragElement:t},Au.prototype._runEventSequence=function(t,e){var n=e.eventOptions,i=e.eventSequenceOptions,o=Js(this.dragAndDropState.enabled,this.firstMovingStepOccured,i).run(t,ys(),n,this.dragElement,this.dragAndDropState.dataStore),r=o.dragAndDropMode,s=o.dropAllowed;this.dragAndDropState.enabled=r,this.dragAndDropState.dropAllowed=s},Au.prototype._needMoveCursorImmediately=function(){return!1},Au.prototype.run=function(){var l=this;return Wt(this.cursor.getPosition()).then(function(t){l.dragElement=t;var e,n,i,o,r,s=function(t){for(var e=t;e;){if(e.draggable)return e;e=gu.nodeParentNodeGetter.call(e)}return null}(l.dragElement);return s&&yu.hasDataTransfer&&!l.skipDefaultDragBehavior&&(l.dragAndDropState.enabled=!0,l.dragElement=s,l.dragAndDropState.element=l.dragElement,l.dragAndDropState.dataStore=new _u,l.dragAndDropState.dataTransfer=new Su(l.dragAndDropState.dataStore),((e=Pu.isAnchorElement(l.dragElement))||Pu.isImgElement(l.dragElement))&&(n=e?"href":"src",o=(i=bu.parseProxyUrl(l.dragElement[n]))?i.destUrl:l.dragElement[n],r=Eu.cleanUpHtml(gu.elementOuterHTMLGetter.call(l.dragElement)),l.dragAndDropState.dataTransfer.setData("text/plain",o),l.dragAndDropState.dataTransfer.setData("text/uri-list",o),l.dragAndDropState.dataTransfer.setData("text/html",r))),pu.prototype.run.call(l).then(function(){return l.dragAndDropState})})},Au);function Au(t,e,n,i,o){var r=pu.call(this,t,e,n,i,o)||this;return r.dragElement=null,r.dragAndDropState=new vu,r}var Cu,Tu=y.default.Promise,Mu=y.default.utils.extend,Du=y.default.utils.featureDetection,Uu=y.default.eventSandbox.eventSimulator,Iu=y.default.eventSandbox.focusBlur,ku=(x(Ou,Cu=Ol),Ou.prototype._getEndPoint=function(){throw new Error("Not implemented")},Ou.prototype._mousedown=function(t){var e=this;return cl.leftButtonDown().then(function(){return e.simulateDefaultBehavior=Uu[e.downEvent](t.element,t.options),e._focus(t)})},Ou.prototype._focus=function(n){var i=this;return new Tu(function(t){var e=g.domUtils.isContentEditableElement(i.element)?g.contentEditable.findContentEditableParent(i.element):n.element;Iu.focus(e,t,!1,!0)})},Ou.prototype._getDestination=function(){throw new Error("Not implemented")},Ou.prototype._drag=function(){var r=this;return this._getDestination().then(function(t){var e=t.element,n=t.offsets,i=t.endPoint;r.endPoint=i;var o=new Lr({offsetX:n.offsetX,offsetY:n.offsetY,modifiers:r.modifiers,speed:r.speed,minMovingTime:25,skipDefaultDragBehavior:!1===r.simulateDefaultBehavior},!1);return xu.create(e,o,Md,cl)}).then(function(t){return t.run()}).then(function(t){return r.dragAndDropState=t,g.delay(r.automationSettings.mouseActionStepDelay)})},Ou.prototype._mouseup=function(){var o=this;return cl.buttonUp().then(function(){var e=g.positionUtils.offsetToClientCoords(o.endPoint),n=null,i=Mu({clientX:e.x,clientY:e.y},o.modifiers);return Wt(e).then(function(t){return(n=t)?(o.dragAndDropState.enabled?(i.dataTransfer=o.dragAndDropState.dataTransfer,o.dragAndDropState.dropAllowed&&Uu.drop(n,i),Uu.dragend(o.dragAndDropState.element,i),o.dragAndDropState.dataStore.setProtectedMode()):Uu[o.upEvent](n,i),Wt(e)):n}).then(function(t){n&&t===n&&!o.dragAndDropState.enabled&&Uu.click(n,i)})})},Ou.prototype.run=function(t){var i,o=this;return this._ensureElement(t).then(function(t){var e=t.element,n=t.clientPoint;return i={point:n,element:e,options:Mu({clientX:n.x,clientY:n.y},o.modifiers)},Tu.all([g.delay(o.automationSettings.mouseActionStepDelay),o._mousedown(i)])}).then(function(){return o._drag()}).then(function(){return o._mouseup()})},Ou);function Ou(t,e){var n=Cu.call(this,t,e,Md,cl)||this;return n.modifiers=e.modifiers,n.speed=e.speed,n.offsetX=e.offsetX,n.offsetY=e.offsetY,n.endPoint=null,n.simulateDefaultBehavior=!0,n.downEvent=Du.isTouchDevice?"touchstart":"mousedown",n.upEvent=Du.isTouchDevice?"touchend":"mouseup",n.dragAndDropState=null,n}var Nu,Bu=E.default.styleUtils,Fu=(x(Lu,Nu=ku),Lu.prototype._getDestination=function(){return C(this,void 0,void 0,function(){var e,n,i,o;return T(this,function(t){switch(t.label){case 0:return[4,Dt(this.element,{x:this.offsetX,y:this.offsetY})];case 1:return e=t.sent(),n=Bu.getWidth(Dd),i=Bu.getHeight(Dd),o={x:e.x+this.dragOffsetX,y:e.y+this.dragOffsetY},o={x:Math.min(Math.max(0,o.x),n),y:Math.min(Math.max(0,o.y),i)},[2,{element:Dd.documentElement,offsets:{offsetX:o.x,offsetY:o.y},endPoint:o}]}})})},Lu);function Lu(t,e,n,i){var o=Nu.call(this,t,i)||this;return o.dragOffsetX=e,o.dragOffsetY=n,o}var Ku,Vu=E.default.positionUtils,Ru=(x(Yu,Ku=ku),Yu.prototype._getDestination=function(){return C(this,void 0,void 0,function(){var e,n,i,o;return T(this,function(t){return e=this.destinationElement,n=Vu.getElementRectangle(e),i=Lt(e,this.destinationOffsetX,this.destinationOffsetY),o={x:n.left+i.offsetX,y:n.top+i.offsetY},[2,{element:e,offsets:i,endPoint:o}]})})},Yu);function Yu(t,e,n){var i=Ku.call(this,t,n)||this;return i.destinationElement=e,i.destinationOffsetX=n.destinationOffsetX,i.destinationOffsetY=n.destinationOffsetY,i}var Wu,Xu=(x(Hu,Wu=Ol),Hu.prototype.run=function(t){return this._ensureElement(t,!0)},Hu);function Hu(t,e,n){return Wu.call(this,t,e,Md,cl,n)||this}var qu=y.default.utils.browser,Gu=y.default.sandbox.event,ju=y.default.eventSandbox.eventSimulator,zu=y.default.eventSandbox.listeners,$u=y.default.nativeMethods,Qu=E.default.domUtils,Zu=E.default.contentEditable,Ju=E.default.textSelection,tc=/ /g;function ec(t){var e=Ju.getSelectionByElement(t),n=Ju.hasInverseSelectionContentEditable(t);return Ju.hasElementContainsSelection(t)?Zu.getSelection(t,e,n):{startPos:Zu.calculateNodeAndOffsetByPosition(t,0),endPos:Zu.calculateNodeAndOffsetByPosition(t,0)}}function nc(t){var e=t.startPos.node,n=t.startPos.offset,i=t.endPos.offset,o=Zu.getFirstNonWhitespaceSymbolIndex(e.nodeValue),r=Zu.getLastNonWhitespaceSymbolIndex(e.nodeValue);return n<o&&0!==n?(t.startPos.offset=o,t.endPos.offset=i+o-n):r<i&&i!==e.nodeValue.length&&(t.startPos.offset=e.nodeValue.length,t.endPos.offset=i+e.nodeValue.length-n),t}function ic(t,e,n){return!n||ju.beforeInput(t,e)}function oc(t,e){var n;function i(t){t.preventDefault(),n=!0}function o(t){"textInput"===t.type&&(n=!1)}qu.isSafari&&(zu.addInternalEventBeforeListener(Md,["textInput"],i),Gu.on(Gu.EVENT_PREVENTED_EVENT,o));var r=qu.isFirefox||ju.textInput(t,e)||n;return qu.isSafari&&(zu.removeInternalEventBeforeListener(Md,["textInput"],i),Gu.off(Gu.EVENT_PREVENTED_EVENT,o)),r}function rc(t,e){var n,i,o,r,s,l,a,u,c,f,d,h=ec(t),m=h.startPos.node,p=h.endPos.node,v=!0,g=!0,y=e;function E(){g=!1}e=e.replace(tc,String.fromCharCode(160)),m&&p&&Qu.isContentEditableElement(m)&&Qu.isContentEditableElement(p)&&(Qu.isTheSameNode(m,p)||(Ju.deleteSelectionContents(t),n=t,o=(i=h).startPos.node,r=$u.nodeParentNodeGetter.call(o)&&o.parentElement,!(qu.isChrome&&qu.version<58||qu.isSafari)&&r&&Qu.isElementContainsNode(n,o)||(i=ec(n),Ju.hasInverseSelectionContentEditable(n)&&(i={startPos:i.endPos,endPos:i.startPos})),i.endPos.offset=i.startPos.offset,m=(h=i).startPos.node),m&&Qu.isContentEditableElement(m)&&Qu.isRenderedNode(m)&&ic(t,e,qu.isChrome||qu.isFirefox)&&(v=oc(t,y),g=v,zu.addInternalEventBeforeListener(Md,["input"],E),(v=v&&ic(t,e,qu.isSafari))&&(Qu.isElementNode(m)?(s=m,l=e,c=Dd.createTextNode(l),f={node:c,offset:l.length},d=$u.nodeParentNodeGetter.call(s),"br"===Qu.getTagName(s)?d.insertBefore(c,s):0<a?(u=$u.nodeChildNodesGetter.call(s),s.insertBefore(c,u[a])):s.appendChild(c),Ju.selectByNodesAndOffsets(f,f)):function(t,e,n){var i=e.startPos.node;Qu.isElementContainsNode(t,i)||(i=(e=nc(ec(t))).startPos.node);var o=e.startPos.offset,r=e.endPos.offset,s=i.nodeValue,l={node:i,offset:o+n.length};i.nodeValue=s.substring(0,o)+n+s.substring(r,s.length),Ju.selectByNodesAndOffsets(l,l)}(t,nc(h),e)),Uo().then(function(){g&&ju.input(t,e),zu.removeInternalEventBeforeListener(Md,["input"],E)})))}function sc(t,e,n){var i,o,r,s,l,a,u,c,f,d,h,m,p;Qu.isContentEditableElement(t)&&rc(t,e),Qu.isElementReadOnly(t)||(Qu.isTextEditableElement(t)?(l=t,a=e,f=Qu.getElementValue(l),d=a.length,h=Ju.getSelectionStart(l),m=Ju.getSelectionEnd(l),p=Qu.isInputElement(l)&&"number"===l.type,ic(l,a,qu.isChrome||qu.isFirefox)&&oc(l,a)&&ic(l,a,qu.isSafari)&&((u=p?null:parseInt(l.maxLength,10))<0&&(u=null),c=f.substring(0,h)+a+f.substring(m,f.length),(null===u||isNaN(u)||c.length<=u)&&(p&&qu.isIOS&&"."===f[f.length-1]&&(h+=1),Qu.setElementValue(l,c),Ju.select(l,h+d,h+d)),ju.input(l,a))):Qu.isInputElement(t)&&(i=t,o=e,null!==(r=n)?(s=Qu.getElementValue(i),Qu.setElementValue(i,s.substr(0,r)+o+s.substr(r+o.length))):Qu.setElementValue(i,o),ju.change(i),ju.input(i,o)))}function lc(t){return 1===t.length&&("a"<=t&&t<="z"||"A"<=t&&t<="Z")}var ac=y.default.nativeMethods,uc=y.default.utils.browser,cc=y.default.eventSandbox.focusBlur,fc=y.default.Promise,dc=g.domUtils.isRadioButtonElement,hc=g.domUtils.getActiveElement,mc=g.domUtils.getTabIndexAttributeIntValue;function pc(t){return t===t.toLowerCase()?t.toUpperCase():t.toLowerCase()}function vc(t){for(var e=t.slice(),n=0;n<t.length;n++){var i=t[n];if("shift"===i.toLowerCase()){var o=t[n+1];if(!o)continue;g.KEY_MAPS.shiftMap[o]?t[n+1]=g.KEY_MAPS.shiftMap[o]:g.KEY_MAPS.reversedShiftMap[o]&&(e[n+1]=g.KEY_MAPS.reversedShiftMap[o])}!g.KEY_MAPS.shiftMap[i]||t[n-1]&&"shift"===t[n-1].toLowerCase()||(t[n]=g.KEY_MAPS.shiftMap[i],t.splice(n,0,"shift"),e.splice(n,0,"shift"),n++)}return{actualKeys:t,eventKeyProperties:e}}function gc(t){var e=hc(t||Dd),n=null;if(e&&g.domUtils.isIframeElement(e)&&ac.contentDocumentGetter.call(e))try{n=gc(ac.contentDocumentGetter.call(e))}catch(t){}return n||e}function yc(t,e,n){if(!dc(e))return t;if(!n&&!e.name&&!uc.isChrome)return[e];var i,o,r=(i=e,o=null,n?""===i.name||uc.isFirefox||(o=function(t){return!t.name||t===i||t.name!==i.name}):""!==i.name?o=function(t){return dc(t)&&t.name===i.name}:uc.isChrome&&(o=function(t){return dc(t)&&!t.name}),o);return r&&(t=g.arrayUtils.filter(t,r)),t}function Ec(t,e,n){var i,o,r,s,l,a,u,c,f=e?-1:1,d=g.domUtils.getTopSameDomainWindow(Md).document,h=(i=d,o=ac.documentActiveElementGetter.call(i),r=o&&mc(o),!(o&&r<0)),m=yc(m=g.domUtils.getFocusableElements(d,h),t,n),p=dc(t),v=g.arrayUtils.indexOf(m,t);return(e?0===v:v===m.length-1)?!e&&t.tabIndex<0?g.arrayUtils.find(m,function(t){return 0===t.tabIndex}):n||!p?Dd.body:m[m.length-1-v]:e&&-1===v?m[m.length-1]:(l=(s=m)[v+f],a=n,u=dc(l)&&l.name&&!l.checked,c=null,a&&u&&(c=g.arrayUtils.find(s,function(t){return dc(t)&&t.name===l.name&&t.checked})),c||l)}function bc(t,e,n){var i={};return"keyIdentifier"in KeyboardEvent.prototype&&(i.keyIdentifier=t?"":n),"key"in KeyboardEvent.prototype&&(i.key=e),i}var Sc={SPECIAL_KEYS:{capslock:"CapsLock",delete:"U+007F",end:"End",enter:"Enter",esc:"U+001B",home:"Home",ins:"Insert",pagedown:"PageDown",pageup:"PageUp",space:"U+0020",tab:"Tab",alt:"Alt",ctrl:"Control",meta:"Meta",shift:"Shift"},LETTERS:{a:"U+0041",b:"U+0042",c:"U+0043",d:"U+0044",e:"U+0045",f:"U+0046",g:"U+0047",h:"U+0048",i:"U+0049",j:"U+004A",k:"U+004B",l:"U+004C",m:"U+004D",n:"U+004E",o:"U+004F",p:"U+0050",q:"U+0051",r:"U+0052",s:"U+0053",t:"U+0054",u:"U+0055",v:"U+0056",w:"U+0057",x:"U+0058",y:"U+0059",z:"U+005A"},SYMBOLS:{0:"U+0030",1:"U+0031",2:"U+0032",3:"U+0033",4:"U+0034",5:"U+0035",6:"U+0036",7:"U+0037",8:"U+0038",9:"U+0039"," ":"U+0020","!":"U+0021","@":"U+0040","#":"U+0023",$:"U+0024","%":"U+0025","^":"U+005E","*":"U+002A","(":"U+0028",")":"U+0029",_:"U+005F","|":"U+007C","\\":"U+005C","/":"U+002F","?":"U+003F",".":"U+002E",",":"U+002C","<":"U+003C",">":"U+003E","[":"U+005B","]":"U+005D","{":"U+007B","}":"U+007D","§":"U+00A7","±":"U+00B1","'":"U+0027",'"':"U+0022",":":"U+003A",";":"U+003B","`":"U+0060","~":"U+007E"}};function _c(t){return lc(t)?Sc.LETTERS[t.toLowerCase()]:Sc.SYMBOLS[t]||Sc.SPECIAL_KEYS[t]||t}function wc(t){if(lc(t))return t.toUpperCase().charCodeAt(0);var e=g.KEY_MAPS.shiftMap[t]?g.KEY_MAPS.shiftMap[t].charCodeAt(0):t.charCodeAt(0);return g.KEY_MAPS.symbolCharCodeToKeyCode[e]||e}function Pc(t,e){var n,i=g.getSanitizedKey(t),o=1===t.length||"space"===t,r=(n=t,-1<g.KEY_MAPS.newLineKeys.indexOf(n)),s=g.KEY_MAPS.modifiers[i],l=g.KEY_MAPS.specialKeys[i];return e=e||t,{sanitizedKey:i,isChar:o,modifierKeyCode:s,specialKeyCode:l,isNewLine:r,isLetter:lc(t),keyIdentifierProperty:_c(e),keyProperty:g.KEY_MAPS.keyProperty[e]||e,keyCode:function(t,e,n,i,o){var r=null;return e&&"space"!==t?r=wc(n):i?r=i:o&&(r=o),r}(t,o,i,s,l)}}var xc=y.default.utils.browser,Ac=y.default.utils.extend,Cc=y.default.eventSandbox.eventSimulator,Tc=(Mc._isKeyActivatedInputElement=function(t){return g.domUtils.isInputElement(t)&&/button|submit|reset|radio|checkbox/.test(t.type)},Mc.prototype._type=function(t,e){var n,i=t!==this.storedActiveElement,o=!i,r=t,s=g.domUtils.isEditableElement(t),l=g.domUtils.isEditableElement(this.storedActiveElement);i&&(n=g.domUtils.isElementInIframe(t)===g.domUtils.isElementInIframe(this.storedActiveElement)||l,o=(!xc.isFirefox||l)&&(!xc.isWebKit||n)),o&&(i&&l&&s&&(r=this.storedActiveElement),sc(r,e))},Mc.prototype._addKeyPropertyToEventOptions=function(t){return Ac(t,bc("keypress"===t.type,this.keyProperty,this.keyIdentifierProperty)),t},Mc.prototype.down=function(t){this.storedActiveElement=gc(this.topSameDomainDocument),this.modifierKeyCode&&(t[this.sanitizedKey]=!0),t.shift&&this.isLetter&&(this.keyProperty=pc(this.keyProperty));var e={keyCode:this.keyCode,type:"keydown"};return this._addKeyPropertyToEventOptions(e),Cc.keydown(this.storedActiveElement,Ac(e,t))},Mc.prototype.press=function(t){if(!this.isChar&&!this.specialKeyCode)return!0;var e=gc(this.topSameDomainDocument),n=this.isChar?function(t,e){if("space"===t)return" ";if(e){if(lc(t))return pc(t);if(g.KEY_MAPS.reversedShiftMap[t])return g.KEY_MAPS.reversedShiftMap[t]}return t}(this.sanitizedKey,t.shift):null,i=this.specialKeyCode||n.charCodeAt(0),o=e!==this.storedActiveElement;if(xc.isWebKit&&o&&g.domUtils.isElementInIframe(e)!==g.domUtils.isElementInIframe(this.storedActiveElement))return!0;this.storedActiveElement=e;var r={keyCode:i,charCode:i,type:"keypress"};this._addKeyPropertyToEventOptions(r);var s=xc.isAndroid||Cc.keypress(e,Ac(r,t));if(!s)return s;e=gc(this.topSameDomainDocument),!n||t.ctrl||t.alt||this._type(e,n);var l=Mc._isKeyActivatedInputElement(e),a=g.domUtils.isButtonElement(e);return xc.isSafari&&0<=xc.compareVersions([xc.webkitVersion,"603.1.30"])||!l&&!a||"enter"!==this.sanitizedKey||e.click(),s},Mc.prototype.up=function(t){this.modifierKeyCode&&(t[this.sanitizedKey]=!1);var e={keyCode:this.keyCode,type:"keyup"};this._addKeyPropertyToEventOptions(e);var n=Cc.keyup(gc(this.topSameDomainDocument),Ac(e,t)),i=gc(this.topSameDomainDocument);return!xc.isSafari&&(!xc.isChrome||53<=xc.version)&&n&&"space"===this.sanitizedKey&&Mc._isKeyActivatedInputElement(i)&&i.click(),n},Object.defineProperty(Mc.prototype,"key",{get:function(){return this.sanitizedKey},enumerable:!1,configurable:!0}),Mc);function Mc(t,e){var n=Pc(t,e);Ac(this,n),this.topSameDomainDocument=g.domUtils.getTopSameDomainWindow(Md).document,this.storedActiveElement=null}var Dc,Uc={ctrlA:"ctrl+a",backspace:"backspace",delete:"delete",left:"left",right:"right",up:"up",down:"down",shiftLeft:"shift+left",shiftRight:"shift+right",shiftUp:"shift+up",shiftDown:"shift+down",shiftHome:"shift+home",shiftEnd:"shift+end",home:"home",end:"end",enter:"enter",tab:"tab",shiftTab:"shift+tab",esc:"esc"},Ic=y.default.Promise,kc=y.default.utils.browser,Oc=y.default.eventSandbox.eventSimulator,Nc=y.default.eventSandbox.elementEditingWatcher,Bc=E.default.textSelection,Fc=E.default.eventUtils,Lc=E.default.domUtils,Kc=o.default.selectElement,Vc=null,Rc=null;function Yc(){Rc=Vc=null,Fc.unbind(this,"blur",Yc,!0)}function Wc(t){var e,n,i,o;Lc.isTextAreaElement(t)&&(Vc!==t&&(Fc.bind(t,"blur",Yc,!0),Vc=t),e=t,n=Bc.hasInverseSelection(e),i=Lc.getTextAreaValue(e),o=n?Bc.getSelectionStart(e):Bc.getSelectionEnd(e),Rc=i&&o?Lc.getTextareaIndentInLine(e,o):0)}function Xc(t,e){var n,i,o,r,s,l,a=Lc.getTextAreaValue(t);a&&(n=Bc.getSelectionStart(t),i=Bc.getSelectionEnd(t),o=Bc.hasInverseSelection(t),s=(r=a.substring(0,o?n:i)).lastIndexOf("\n"),l=r.substring(0,s),null!==Rc&&Vc===t||Wc(t),s=l.lastIndexOf("\n"),qc(t,n,i,o,Math.min(s+1+Rc,l.length),e))}function Hc(t,e){var n,i,o,r,s,l,a,u,c,f,d=Lc.getTextAreaValue(t);d&&(n=Bc.getSelectionStart(t),i=Bc.getSelectionEnd(t),u=(r=(o=Bc.hasInverseSelection(t))?n:i)+(l=-1===(c=(s=d.substring(r)).indexOf("\n"))?s.length:c+1),f=-1===(c=(a=s.substring(l)).indexOf("\n"))?a.length:c,null!==Rc&&Vc===t||Wc(t),qc(t,n,i,o,u=Math.min(u+Rc,u+f),e))}function qc(t,e,n,i,o,r){var s=null,l=null,l=r?(s=e!==n&&i?n:e,o):s=o;Bc.select(t,s,l)}function Gc(t,e,n){Lc.isInputElement(t)&&"number"===t.type&&("-"===e.charAt(0)&&"."===e.charAt(1)&&(e=e.substring(1)),"."===e.charAt(e.length-1)&&(e=e.substring(0,e.length-1))),Lc.setElementValue(t,e),Bc.select(t,n,n),Oc.input(t)}function jc(t,e){var n,i,o,r,s,l,a,u;return Lc.isTextEditableElement(t)&&(n=Bc.getSelectionStart(t),i=Bc.getSelectionEnd(t),o=Bc.hasInverseSelection(t),s=null,s=(r=!Lc.isTextAreaElement(t)||Lc.getTextareaLineNumberByPosition(t,n)===Lc.getTextareaLineNumberByPosition(t,i))?o?i:n:o?n:i,a=-1===(l=Lc.getElementValue(t).substring(0,s).lastIndexOf("\n"))?0:l+1,u=null,r?(u=e?s:a,Bc.select(t,u,a)):o?Bc.select(t,i,a):Bc.select(t,n,a)),Ic.resolve()}function zc(t,e){var n,i,o,r,s,l,a,u,c;return Lc.isTextEditableElement(t)&&(n=Bc.getSelectionStart(t),i=Bc.getSelectionEnd(t),o=Bc.hasInverseSelection(t),s=null,u=s=(r=!Lc.isTextAreaElement(t)||Lc.getTextareaLineNumberByPosition(t,n)===Lc.getTextareaLineNumberByPosition(t,i))?o?i:n:o?n:i,c=null,u+=-1===(a=(l=Lc.getElementValue(t).substring(s)).indexOf("\n"))?l.length:a,r?(c=e?s:u,Bc.select(t,c,u)):o?Bc.select(t,i,u):Bc.select(t,n,u)),Ic.resolve()}function $c(t){return jc(t,!0)}function Qc(t){return zc(t,!0)}function Zc(t){return Lc.isRadioButtonElement(t)}function Jc(t,e){return tf(t,e,!1).then(function(t){t&&(t.checked=!0)})}function tf(t,e,n){return void 0===n&&(n=!0),t?(Lc.isSelectElement(t)&&Kc.collapseOptionList(),i=t,o=e,r=n,new fc(function(t){var e=Ec(i,o,r);e?cc.focus(e,function(){return t(e)}):t()}).then(function(t){return t&&Lc.isTextEditableInput(t)&&Bc.select(t),t})):Ic.resolve();var i,o,r}var ef,nf=((Dc={})[Uc.ctrlA]=function(t){return Lc.isEditableElement(t)&&Bc.select(t),Ic.resolve()},Dc[Uc.backspace]=function(t){var e,n,i;return Lc.isTextEditableElementAndEditingAllowed(t)&&(e=Bc.getSelectionStart(t),n=Bc.getSelectionEnd(t),i=Lc.getElementValue(t).replace(/\r\n/g,"\n"),n===e?0<e&&Gc(t,i.substring(0,e-1)+i.substring(n,i.length),e-1):Gc(t,i.substring(0,e)+i.substring(n,i.length),e)),Lc.isContentEditableElement(t)&&Bc.deleteSelectionContents(t),Ic.resolve()},Dc[Uc.delete]=function(t){var e,n,i;return Lc.isTextEditableElementAndEditingAllowed(t)&&(e=Bc.getSelectionStart(t),n=Bc.getSelectionEnd(t),i=Lc.getElementValue(t).replace(/\r\n/g,"\n"),n===e?e<i.length&&Gc(t,i.substring(0,e)+i.substring(n+1,i.length),e):Gc(t,i.substring(0,e)+i.substring(n,i.length),e)),Lc.isContentEditableElement(t)&&Bc.deleteSelectionContents(t),Ic.resolve()},Dc[Uc.left]=function(t){var e,n,i,o,r=null;return Lc.isSelectElement(t)&&Kc.switchOptionsByKeys(t,"left"),Zc(t)?Jc(t,!0):(Lc.isTextEditableElement(t)&&(e=(r=Bc.getSelectionStart(t)||0)===Bc.getSelectionEnd(t)?r-1:r,Bc.select(t,e,e),Wc(t)),Lc.isContentEditableElement(t)&&(r=Bc.getSelectionStart(t))!==Bc.getSelectionEnd(t)&&(n=Bc.getSelectionByElement(t),o={node:(i=Bc.hasInverseSelectionContentEditable(t))?n.focusNode:n.anchorNode,offset:i?n.focusOffset:n.anchorOffset},Bc.selectByNodesAndOffsets(o,o,!0)),Ic.resolve())},Dc[Uc.right]=function(t){var e,n,i,o,r=null,s=null;return Lc.isSelectElement(t)&&Kc.switchOptionsByKeys(t,"right"),Zc(t)?Jc(t,!1):(Lc.isTextEditableElement(t)&&(e=(r=Bc.getSelectionStart(t))===(s=Bc.getSelectionEnd(t))?s+1:s,r===Lc.getElementValue(t).length&&(e=r),Bc.select(t,e,e),Wc(t)),Lc.isContentEditableElement(t)&&(r=Bc.getSelectionStart(t))!==(s=Bc.getSelectionEnd(t))&&(n=Bc.getSelectionByElement(t),o={node:(i=Bc.hasInverseSelectionContentEditable(t))?n.anchorNode:n.focusNode,offset:i?n.anchorOffset:n.focusOffset},Bc.selectByNodesAndOffsets(o,o,!0)),Ic.resolve())},Dc[Uc.up]=function(t){return Lc.isSelectElement(t)&&Kc.switchOptionsByKeys(t,"up"),Zc(t)?Jc(t,!0):kc.isWebKit&&Lc.isInputElement(t)?jc(t):(Lc.isTextAreaElement(t)&&Xc(t,!1),Ic.resolve())},Dc[Uc.down]=function(t){return Lc.isSelectElement(t)&&Kc.switchOptionsByKeys(t,"down"),Zc(t)?Jc(t,!1):kc.isWebKit&&Lc.isInputElement(t)?zc(t):(Lc.isTextAreaElement(t)&&Hc(t,!1),Ic.resolve())},Dc[Uc.shiftLeft]=function(t){var e,n;return Lc.isTextEditableElement(t)&&((e=Bc.getSelectionStart(t))===(n=Bc.getSelectionEnd(t))||Bc.hasInverseSelection(t)?Bc.select(t,n,Math.max(e-1,0)):Bc.select(t,e,Math.max(n-1,0)),Wc(t)),Ic.resolve()},Dc[Uc.shiftRight]=function(t){var e,n,i;return Lc.isTextEditableElement(t)&&(e=Bc.getSelectionStart(t),n=Bc.getSelectionEnd(t),i=Lc.getElementValue(t).length,e!==n&&Bc.hasInverseSelection(t)?Bc.select(t,n,Math.min(e+1,i)):Bc.select(t,e,Math.min(n+1,i)),Wc(t)),Ic.resolve()},Dc[Uc.shiftUp]=function(t){return kc.isWebKit&&Lc.isInputElement(t)?$c(t):(Lc.isTextAreaElement(t)&&Xc(t,!0),Ic.resolve())},Dc[Uc.shiftDown]=function(t){return kc.isWebKit&&Lc.isInputElement(t)?Qc(t):(Lc.isTextAreaElement(t)&&Hc(t,!0),Ic.resolve())},Dc[Uc.shiftHome]=$c,Dc[Uc.shiftEnd]=Qc,Dc[Uc.home]=jc,Dc[Uc.end]=zc,Dc[Uc.enter]=function(t){var e,n,i,o,r,s;return Lc.isSelectElement(t)&&Kc.collapseOptionList(),Lc.isInputElement(t)?(Nc.processElementChanging(t),(e=Lc.getParents(t,"form")[0])&&function(t,e){var n=t.querySelectorAll("input, button"),i=null,o=null;for(o=0;o<n.length;o++)if(!i&&"submit"===n[o].type&&!n[o].disabled){i=n[o];break}if(i)Oc.click(i);else if(Lc.blocksImplicitSubmission(e)){for(var r=t.getElementsByTagName("input"),s=[],o=0;o<r.length;o++)Lc.blocksImplicitSubmission(r[o])&&s.push(r[o]);1===s.length&&s[0]===e&&e.validity.valid&&Oc.submit(t)&&t.submit()}}(e,t)):Lc.isTextAreaElement(t)?(n=Bc.getSelectionStart(t),o=(i=Lc.getTextAreaValue(t)).substring(0,n),r=i.substring(n),s=n+1,Gc(t,o+String.fromCharCode(10)+r,s)):t.tagName&&Lc.isAnchorElement(t)&&Oc.click(t),Ic.resolve()},Dc[Uc.tab]=function(t){return tf(t,!1)},Dc[Uc.shiftTab]=function(t){return tf(t,!0)},Dc[Uc.esc]=function(t){return Lc.isSelectElement(t)&&Kc.collapseOptionList(),Ic.resolve()},Dc),of=((ef={})[Uc.ctrlA]="selectAll",ef);function rf(r){var t=vc(g.getKeyArray(r)),e=t.actualKeys,s=t.eventKeyProperties;return g.arrayUtils.map(e,function(t,e){var n,i,o=(n=e,i=r.toLowerCase(),1===n&&of[i]?[of[i]]:[]);return m.utils.extend({key:t,commands:o},Pc(t,s[e]))})}function sf(t){var e,n;e=t.modifiers,n=m.utils.extend({},pl),e&&(e&ll.ctrl&&(n.ctrl=!0),e&ll.alt&&(n.alt=!0),e&ll.shift&&(n.shift=!0),e&ll.meta&&(n.meta=!0)),n.shift&&t.isLetter&&(t.keyProperty=pc(t.keyProperty),t.keyCode=wc(t.keyProperty))}var lf=y.default.Promise,af=y.default.eventSandbox.message,uf=y.default.nativeMethods,cf="automation|press|request",ff="automation|press|response";af.on(af.SERVICE_MSG_RECEIVED_EVENT,function(t){t.message.cmd===cf&&(y.default.on(y.default.EVENTS.beforeUnload,function(){return af.sendServiceMsg({cmd:ff},t.source)}),new df(t.message.keyCombinations,t.message.options).run().then(function(){return af.sendServiceMsg({cmd:ff},t.source)}))});var df=(hf._getKeyPressSimulators=function(t){var e=vc(g.getKeyArray(t)),n=e.actualKeys,i=e.eventKeyProperties;return g.arrayUtils.map(n,function(t,e){return new Tc(t,i[e])})},hf._getShortcuts=function(t){for(var e=g.getKeyArray(t.toLowerCase()),n=[],i=[],o=[],r=0;r<e.length;r++)for(i.push(e[r]),o=i.slice();o.length;){var s=o.join("+");nf[s]?(n.push(s),i=o=[]):o.shift()}return n},hf._getShortcutHandlers=function(t){for(var e,n,i,o=hf._getShortcuts(t.toLowerCase()),r={},s="",l=0;l<o.length;l++)e=o[l],n=t.indexOf(e),i=e.length,r[s+=t.substring(0,n+i)]=nf[e],t=t.substring(n+i);return r},hf.prototype._down=function(t){this.pressedKeyString+=(this.pressedKeyString?"+":"")+t.key;var e=!t.down(this.modifiersState);return lf.resolve(e)},hf.prototype._press=function(t,e){var n=this;if(e&&!this.isSelectElement)return g.delay(this.automationSettings.keyActionStepDelay);var i=this.shortcutHandlers[this.pressedKeyString],o=!1;return i&&"enter"!==t.key||(o=!t.press(this.modifiersState)),o&&!this.isSelectElement||!i?g.delay(this.automationSettings.keyActionStepDelay):i(gc(this.topSameDomainDocument)).then(function(){return g.delay(n.automationSettings.keyActionStepDelay)})},hf.prototype._up=function(t){return t.up(this.modifiersState),g.delay(this.automationSettings.keyActionStepDelay)},hf.prototype._runCombination=function(t){var n=this;this.modifiersState={ctrl:!1,alt:!1,shift:!1,meta:!1},this.isSelectElement=g.domUtils.isSelectElement(gc(this.topSameDomainDocument)),this.pressedKeyString="",this.shortcutHandlers=hf._getShortcutHandlers(t);var e=hf._getKeyPressSimulators(t);return g.promiseUtils.each(e,function(e){return n._down(e).then(function(t){return n._press(e,t)})}).then(function(){return g.arrayUtils.reverse(e),g.promiseUtils.each(e,function(t){return n._up(t)})})},hf.prototype._calculateCDPEventSequence=function(){for(var t=[],e=0,n=this.keyCombinations;e<n.length;e++){for(var i=rf(n[e]),o=0,r=0,s=i;r<s.length;r++)o|=gl((l=s[r]).key),l.modifiers=o,sf(l),t.push(Al.keyDown(l),Al.delay(this.automationSettings.keyActionStepDelay));for(var l,a=i.length-1;0<=a;a--)o&=~gl((l=i[a]).key),l.modifiers=o,t.push(Al.keyUp(l))}return t},hf.prototype.run=function(){var e=this,t=g.domUtils.getActiveElement(),n=g.domUtils.isIframeElement(t);if(!Ss(Md)&&n&&uf.contentWindowGetter.call(t)){var i={cmd:cf,keyCombinations:this.keyCombinations,options:this.options};return g.sendRequestToFrame(i,ff,uf.contentWindowGetter.call(t))}if(this.nativeAutomationInput){var o=this._calculateCDPEventSequence();return this.nativeAutomationInput.executeEventSequence(o)}return g.promiseUtils.each(this.keyCombinations,function(t){return e._runCombination(t).then(function(){return g.delay(e.automationSettings.keyActionStepDelay)})})},hf);function hf(t,e,n){this.keyCombinations=t,this.isSelectElement=!1,this.pressedKeyString="",this.modifiersState=null,this.shortcutHandlers=null,this.topSameDomainDocument=g.domUtils.getTopSameDomainWindow(Md).document,this.automationSettings=new Ao(e.speed),this.options=e,this.nativeAutomationInput=n?new Ml(n):null}var mf,pf=y.default.Promise,vf=y.default.utils.extend,gf=y.default.eventSandbox.eventSimulator,yf=E.default.domUtils,Ef=E.default.eventUtils,bf=E.default.delay,Sf=(x(_f,mf=Ol),_f.prototype._mousedown=function(t){var e=this;return cl.rightButtonDown().then(function(){return e.eventState.activeElementBeforeMouseDown=yf.getActiveElement(),e.eventState.simulateDefaultBehavior=gf.mousedown(t.element,t.options),e._focus(t)})},_f.prototype._focus=function(t){return!1===this.simulateDefaultBehavior?Uo():ea(yf.isContentEditableElement(this.element)?this.element:t.element,!0,this.caretPos).then(Uo)},_f.prototype._mouseup=function(e){var t=this;return cl.buttonUp().then(function(){return t._getElementForEvent(e)}).then(function(t){return gf.mouseup(t,e.options)})},_f.prototype._contextmenu=function(e){return this._getElementForEvent(e).then(function(t){gf.contextmenu(t,e.options),yf.isElementFocusable(t)||ia(t)})},_f.prototype.run=function(t){var o=this,r=null;return this._ensureElement(t).then(function(t){var e=t.element,n=t.clientPoint,i=t.devicePoint;return r={point:n,element:e,options:vf({clientX:n.x,clientY:n.y,screenX:i.x,screenY:i.y,button:Ef.BUTTON.right},o.modifiers)},pf.all([bf(o.automationSettings.mouseActionStepDelay),o._mousedown(r)])}).then(function(){return o._mouseup(r)}).then(function(){return o._contextmenu(r)})},_f);function _f(t,e){var n=mf.call(this,t,e,Md,cl)||this;return n.modifiers=e.modifiers,n.caretPos=e.caretPos,n.eventState={simulateDefaultBehavior:!0,activeElementBeforeMouseDown:null},n}var wf=y.default.utils.browser,Pf=E.default.domUtils,xf=E.default.positionUtils,Af=E.default.styleUtils,Cf=E.default.contentEditable,Tf=E.default.arrayUtils,Mf=["direction","font-family","font-size","font-size-adjust","font-variant","font-weight","font-style","letter-spacing","line-height","text-align","text-indent","text-transform","word-wrap","word-spacing","padding-top","padding-left","padding-right","padding-bottom","margin-top","margin-left","margin-right","margin-bottom","border-top-width","border-left-width","border-right-width","border-bottom-width"];function Df(t,e){var n,i,o,r,s,l=Af.getBordersWidth(t),a=xf.getOffsetPosition(t),u=t.scrollHeight||t.getBoundingClientRect().height,c=Math.ceil(e.left),f=Math.ceil(e.top),d=Math.floor(e.bottom);return Pf.isTextAreaElement(t)||(i=(n=xf.offsetToClientCoords({x:a.left,y:a.top})).x+l.left+1,o=n.y+l.top+1,r=n.y+l.top+l.bottom+u,s=n.y+l.top+u-1,c=Math.ceil(c<=n.x?i:e.left),f=Math.ceil(f<=n.y?o:e.top),d=Math.floor(r<=d?s:e.bottom)),{left:c,top:f,bottom:d}}function Uf(t){var e=Af.getElementScroll(Dd);return{left:t.left+e.left,top:t.top+e.top,bottom:t.bottom+e.top}}function If(t,e){var n=t.getBoundingClientRect(),i=function(e){var t,n,i,o=Dd.body,r=xf.getOffsetPosition(e),s=Af.getElementMargin(e),l=r.top-s.top,a=r.left-s.left,u=Dd.createElement("div"),c="white-space:pre-wrap;border-style:solid;";return"absolute"===Af.get(o,"position")&&(t=Af.getElementMargin(o),n=Af.get(o,"left"),i=Af.get(o,"top"),a-=t.left+(parseInt(n.replace("px",""),10)||0),l-=t.top+(parseInt(i.replace("px",""),10)||0)),Tf.forEach(Mf,function(t){c+="".concat(t,":").concat(Af.get(e,t),";")}),Af.set(u,{cssText:c,position:"absolute",left:a+"px",top:l+"px",width:e.scrollWidth+"px",height:e.scrollHeight+"px"}),y.default.nativeMethods.nodeTextContentSetter.call(u,Pf.getElementValue(e)+" "),o.appendChild(u),u}(t),o=null,r=t.getBoundingClientRect(),s=r.top-n.top,l=r.left-n.left,a=Pf.getElementValue(t).length;try{var u=Dd.createRange();u.setStart(y.default.nativeMethods.nodeFirstChildGetter.call(i),Math.min(e,a)),u.setEnd(y.default.nativeMethods.nodeFirstChildGetter.call(i),Math.min(e+1,a+1)),Pf.isTextAreaElement(t)&&(0!==(o=u.getBoundingClientRect()).width||0!==o.height)||(o=u.getClientRects()[0])}catch(t){o=null}return Pf.remove(i),o?{width:o.width,height:o.height,top:o.top-s,bottom:o.bottom-s,left:o.left-l,right:o.right-l}:null}function kf(t,e){var n,i,o,r,s,l,a=null;return(a=Pf.isContentEditableElement(t)?(o=t,r=e,s=Pf.findDocument(o).createRange(),l=Cf.calculateNodeAndOffsetByPosition(o,r),s.setStart(l.node,Math.min(l.offset,l.node.length)),s.setEnd(l.node,Math.min(l.offset,l.node.length)),s.getClientRects()[0]):"function"==typeof t.createTextRange?(n=e,(i=t.createTextRange()).collapse(!0),i.moveStart("character",n),i.moveEnd("character",n),i.collapse(!0),i.getBoundingClientRect()):If(t,e))?{x:(a=Uf(a=Df(t,a))).left,y:Math.floor(a.top+(a.bottom-a.top)/2)}:null}function Of(t,e){var n=Pf.isTextEditableElement(t),i=Pf.isContentEditableElement(t);return n&&0<Pf.getElementValue(t).length||i&&Cf.getContentEditableValue(t).length?kf(t,e):xf.findCenter(t)}function Nf(t,e,n){var i=Pf.findDocument(t).createRange();i.setStart(e,Math.min(n,e.length)),i.setEnd(e,Math.min(n,e.length));var o=i.getClientRects()[0];return o?{x:(o=Uf(Df(t,o))).left,y:Math.floor(o.top+(o.bottom-o.top)/2)}:null}var Bf,Ff=y.default.Promise,Lf=y.default.utils.browser,Kf=y.default.utils.featureDetection,Vf=y.default.eventSandbox.eventSimulator,Rf=y.default.eventSandbox.focusBlur,Yf=E.default.contentEditable,Wf=E.default.domUtils,Xf=E.default.positionUtils,Hf=E.default.eventUtils,qf=E.default.delay,Gf=(x(jf,Bf=Ol),jf.prototype._calculateEventArguments=function(){var e=this,n=Xf.offsetToClientCoords(this.clientPoint);return Wt(n).then(function(t){if(!t)throw new ci(null,{reason:Xf.getElOutsideBoundsReason(e.element)});return{element:t,options:{clientX:n.x,clientY:n.y}}})},jf.prototype._move=function(t){var e=this,n=t.element,i=t.offsetX,o=t.offsetY,r=t.speed,s=new Lr({offsetX:i,offsetY:o,speed:r},!1);return el.create(n,s,Md,cl).then(function(t){return t.run()}).then(function(){return qf(e.automationSettings.mouseActionStepDelay)})},jf.prototype._bindMousedownHandler=function(){var e=this,n=function(t){e.eventState.mousedownPrevented=t.defaultPrevented,Hf.preventDefault(t),Hf.unbind(e.element,"mousedown",n)};Hf.bind(this.element,"mousedown",n)},jf.prototype._calculateAbsoluteStartPoint=function(){throw new Error("Not implemented")},jf.prototype._calculateAbsoluteEndPoint=function(){throw new Error("Not implemented")},jf.prototype._moveToPoint=function(t){!function(t,e){if(Pf.isEditableElement(t)){var n=Pf.isTextAreaElement(t);if(!Pf.isInputElement(t)||!wf.isFirefox){var i=xf.getOffsetPosition(t),o=Af.getBordersWidth(t),r=Af.getElementScroll(t),s=e.x-i.left-o.left,l=e.y-i.top-o.top,a=null;if(n)return l<r.top&&(a=l),l>t.clientHeight+r.top&&(a=l-t.clientHeight),null!==a&&Af.setScrollTop(t,Math.round(a));s<r.left&&(a=s),s>t.clientWidth+r.left&&(a=s-t.clientWidth),null!==a&&Af.setScrollLeft(t,Math.round(a))}}}(this.element,t),this.clientPoint=function(t,e){var n=Pf.isTextEditableElement(t),i=Pf.isInputElement(t);if(!n&&!Pf.isContentEditableElement(t))return e;var o=xf.getOffsetPosition(t),r=Af.getBordersWidth(t),s=Af.getElementScroll(t),l=o.left+r.left+t.clientWidth;return i&&n&&wf.isFirefox?{x:Math.min(e.x,l),y:e.y}:{x:e.x-s.left,y:e.y-s.top}}(this.element,t);var e={element:Dd.documentElement,offsetX:this.clientPoint.x,offsetY:this.clientPoint.y,speed:this.speed};return this._move(e)},jf.prototype._mousedown=function(){var n=this;return cl.leftButtonDown().then(function(){return n._calculateEventArguments()}).then(function(t){n.eventArgs=t;var e=Lf.isWebKit&&Wf.isSelectElement(n.element);return e&&n._bindMousedownHandler(),n.eventState.simulateDefaultBehavior=Vf[n.downEvent](n.eventArgs.element,n.eventArgs.options),!1===n.eventState.simulateDefaultBehavior&&(n.eventState.simulateDefaultBehavior=e&&!n.eventState.mousedownPrevented),n._focus()})},jf.prototype._focus=function(){var n=this;return new Ff(function(t){var e=Wf.isContentEditableElement(n.element)?Yf.findContentEditableParent(n.element):n.element;Rf.focus(e,t,!1,!0)})},jf.prototype._setSelection=function(){throw new Error("Not implemented")},jf.prototype._mouseup=function(){var e=this;return cl.buttonUp().then(function(){return e._setSelection(),e._calculateEventArguments()}).then(function(t){e.eventArgs=t,Vf[e.upEvent](e.eventArgs.element,e.eventArgs.options)})},jf.prototype.run=function(){var t=this;return this.absoluteStartPoint=this._calculateAbsoluteStartPoint(),this.absoluteEndPoint=this._calculateAbsoluteEndPoint(),this._moveToPoint(this.absoluteStartPoint).then(function(){return t._mousedown()}).then(function(){return t._moveToPoint(t.absoluteEndPoint)}).then(function(){return t._mouseup()})},jf);function jf(t,e){var n=Bf.call(this,t,e,Md,cl)||this;return n.absoluteStartPoint=null,n.absoluteEndPoint=null,n.clientPoint=null,n.speed=e.speed,n.downEvent=Kf.isTouchDevice?"touchstart":"mousedown",n.upEvent=Kf.isTouchDevice?"touchend":"mouseup",n.eventArgs={options:null,element:null},n.eventState={mousedownPrevented:!1,simulateDefaultBehavior:!0},n}var zf,$f=E.default.textSelection,Qf=E.default.domUtils,Zf=E.default.positionUtils,Jf=(x(td,zf=Gf),td.prototype._calculateAbsoluteStartPoint=function(){return Of(this.element,this.startPos)||Zf.findCenter(this.element)},td.prototype._calculateAbsoluteEndPoint=function(){var t=Of(this.element,this.endPos);return t||(Qf.isContentEditableElement(this.element)?function(t,e,n){for(var i=n<e?1:-1,o=n,r=null;o!==e&&!(r=kf(t,o+=i)););return r=r||kf(t,e)||xf.findCenter(t)}(this.element,this.startPos,this.endPos):Zf.findCenter(this.element))},td.prototype._setSelection=function(){var t=Qf.isTextEditableElement(this.element),e=Qf.isContentEditableElement(this.element);(t||e)&&!1!==this.eventState.simulateDefaultBehavior&&$f.select(this.element,this.startPos,this.endPos)},td.prototype.run=function(t){var e=this;return this._ensureElement(t).then(function(){return zf.prototype.run.call(e)})},td);function td(t,e,n,i){var o=zf.call(this,t,i)||this;return o.startPos=e,o.endPos=n,o}var ed,nd=E.default.textSelection,id=E.default.contentEditable,od=E.default.positionUtils,rd=(x(sd,ed=Gf),sd.prototype._calculateAbsoluteStartPoint=function(){return Nf(this.element,this.startNode,this.startOffset)||od.findCenter(this.element)},sd.prototype._calculateAbsoluteEndPoint=function(){return Nf(this.element,this.endNode,this.endOffset)||od.findCenter(this.element)},sd.prototype._setSelection=function(){var t,e;!1!==this.eventState.simulateDefaultBehavior&&(t={node:this.startNode,offset:this.startOffset},e={node:this.endNode,offset:this.endOffset},nd.selectByNodesAndOffsets(t,e,!0))},sd);function sd(t,e,n){var i=ed.call(this,id.getNearestCommonAncestor(t,e),n)||this,o=id.getFirstVisiblePosition(t),r=id.getLastVisiblePosition(e),s={node:t,offset:o},l={node:e,offset:r},a=id.calculatePositionByNodeAndOffset(i.element,s);return id.calculatePositionByNodeAndOffset(i.element,l)<a&&(o=id.getLastVisiblePosition(t),r=id.getFirstVisiblePosition(e)),s=id.calculateNodeAndOffsetByPosition(t,o),l=id.calculateNodeAndOffsetByPosition(e,r),i.startNode=s.node,i.startOffset=s.offset,i.endNode=l.node,i.endOffset=l.offset,i}var ld=y.default.Promise,ad=y.default.utils.extend,ud=y.default.utils.browser,cd=y.default.eventSandbox.eventSimulator,fd=y.default.eventSandbox.elementEditingWatcher,dd=E.default.domUtils,hd=E.default.promiseUtils,md=E.default.contentEditable,pd=E.default.textSelection,vd=E.default.delay,gd=E.default.KEY_MAPS.specialKeys,yd=(Ed.findTextEditableChild=function(t){var e=null;if(!dd.isEditableElement(t))for(var n=t.querySelectorAll("*"),i=0;i<n.length;i++)if(dd.isTextEditableElementAndEditingAllowed(n[i])){e=n[i];break}return e},Ed.prototype._calculateEventArguments=function(t){var e=dd.getActiveElement(),n=dd.isContentEditableElement(this.element),i=this.eventArgs.element||this.element;n||e===i||(i=Ed.findTextEditableChild(e)||e);var o=ad({keyCode:t?this.currentCharCode:this.currentKeyCode},this.modifiers);return t&&(o.charCode=this.currentCharCode),ad(o,bc(t,this.currentKey,this.currentKeyIdentifier)),{element:i,options:o}},Ed.prototype._calculateTargetElement=function(){var t=dd.getActiveElement(),e=dd.isContentEditableElement(this.element);if(e){if(t!==md.findContentEditableParent(this.element))return void(this.eventState.skipType=!0)}else if(t!==this.element)return void(this.eventState.skipType=!0);this.element=e?this.element:t},Ed.prototype._click=function(t){var e,n=this,i=dd.getActiveElement(),o=dd.isTextEditableElementAndEditingAllowed(this.element),r=dd.isContentEditableElement(this.element);if(i===this.element)return o&&fd.watchElementEditing(this.element),(o||r)&&(e=pd.getSelectionStart(this.element),isNaN(parseInt(this.caretPos,10))||this.caretPos===e||pd.select(this.element,this.caretPos,this.caretPos)),ld.resolve();var s=Ft(this.element),l=s.offsetX,a=s.offsetY,u=new Nr({offsetX:this.elementChanged?l:this.offsetX,offsetY:this.elementChanged?a:this.offsetY,speed:this.speed,caretPos:this.caretPos,modifiers:this.modifiers});return new Fa(this.element,u,Md,cl).run(t).then(function(){return vd(n.automationSettings.mouseActionStepDelay)})},Ed.prototype._type=function(){var t=this;if(this.eventState.skipType)return ld.resolve();var e=dd.isContentEditableElement(this.element);if(this.replace&&(dd.isTextEditableElementAndEditingAllowed(this.element)?pd.select(this.element):e&&pd.deleteSelectionContents(this.element,!0)),this._canUseNativeAutomationInput()){if(this.paste)return this.nativeAutomationInput.executeInsertText(this.typingText);var n=this._calculateCDPEventSequence();return this.nativeAutomationInput.executeEventSequence(n)}return hd.whilst(function(){return!t._isTypingFinished()},function(){return t._typingStep()})},Ed.prototype._isTypingFinished=function(){return this.currentPos===this.typingText.length},Ed.prototype._getCurrentKey=function(t,e){return t===gd.enter?"Enter":e},Ed.prototype._calculateCDPEventSequence=function(){for(var t=[],e=0,n=this.typingText;e<n.length;e++){var i=n[e],o=wc(i),r=this._getCurrentKey(o,i),s=Pc(r),l=ad({key:r},s);t.push(Al.keyDown(l),Al.keyUp(l),Al.delay(this.automationSettings.keyActionStepDelay))}return t},Ed.prototype._canUseNativeAutomationInput=function(){return!!this.nativeAutomationInput&&!(!dd.isTextEditableElement(this.element)&&dd.isInputElement(this.element)||dd.isContentEditableElement(this.element))},Ed.prototype._performTypingStep=function(){return this._keydown(),this._keypress(),this._keyup()},Ed.prototype._typingStep=function(){var t=this.typingText.charAt(this.currentPos);return this.currentKeyCode=wc(t),this.currentCharCode=this.typingText.charCodeAt(this.currentPos),this.currentKey=this._getCurrentKey(this.currentKeyCode,t),this.currentKeyIdentifier=_c(this.currentKey),this.ignoreChangeEvent=dd.getElementValue(this.element)===fd.getElementSavedValue(this.element),this._performTypingStep()},Ed.prototype._keydown=function(){this.eventArgs=this._calculateEventArguments(),this.eventState.simulateKeypress=cd.keydown(this.eventArgs.element,this.eventArgs.options)},Ed.prototype._keypress=function(){!1!==this.eventState.simulateKeypress&&(this.eventArgs=this._calculateEventArguments(!0),this.eventState.simulateTypeChar=ud.isAndroid||cd.keypress(this.eventArgs.element,this.eventArgs.options))},Ed.prototype._keyup=function(){var t=this,e=this.eventArgs.element;this.eventArgs=this._calculateEventArguments();var n=dd.isTextEditableElement(this.element),i=dd.isContentEditableElement(this.element),o=this.paste||!n&&!i;return ld.resolve().then(function(){return o?t._typeAllText(e):t._typeChar(e)}).then(function(){cd.keyup(t.eventArgs.element,t.eventArgs.options),o?t.currentPos=t.typingText.length:t.currentPos++})},Ed.prototype._typeChar=function(t){if(!1===this.eventState.simulateKeypress||!1===this.eventState.simulateTypeChar)return this.ignoreChangeEvent&&fd.restartWatchingElementEditing(t),vd(this.automationSettings.keyActionStepDelay);var e=this.typingText.charAt(this.currentPos),n=/^\d$/.test(e),i=0===this.currentPos?null:this.typingText.charAt(this.currentPos-1);if(dd.isInputElement(t)&&"number"===t.type){var o=pd.getSelectionStart(t),r=dd.getInputValue(t).length,s=/^\d/.test(this.typingText);if(!n&&(s||!("."===e||"-"===e&&r)||0!==o))return vd(this.automationSettings.keyActionStepDelay);n&&("."===i||"-"===i&&!r)&&(e=i+e)}return sc(t,e,null),vd(this.automationSettings.keyActionStepDelay)},Ed.prototype._typeAllText=function(t){return sc(t,this.typingText,this.caretPos),vd(this.automationSettings.keyActionStepDelay)},Ed.prototype.run=function(t){var e=this;return this._click(t).then(function(){return e._calculateTargetElement()}).then(function(){return e._type()})},Ed);function Ed(t,e,n,i){this.element=Ed.findTextEditableChild(t)||t,this.typingText=e.toString(),this.modifiers=n.modifiers,this.caretPos=n.caretPos,this.replace=n.replace,this.paste=n.paste,this.offsetX=n.offsetX,this.offsetY=n.offsetY,this.speed=n.speed,this.automationSettings=new Ao(this.speed),this.elementChanged=t!==this.element,this.currentPos=0,this.currentKeyCode=null,this.currentCharCode=null,this.currentKey=null,this.currentKeyIdentifier=null,this.ignoreChangeEvent=!0,this.eventArgs={options:null,element:null},this.eventState={skipType:!1,simulateKeypress:!0,simulateTypeChar:!0},this.nativeAutomationInput=i?new Ml(i):null}var bd="required",Sd=(_d.prototype._handleRequiredInput=function(){var t=this,e=m.nativeMethods.hasAttribute.call(this.element,bd);e&&m.nativeMethods.removeAttribute.call(this.element,bd),m.eventSandbox.listeners.initElementListening(this.element.form,["submit"]),m.eventSandbox.listeners.addInternalEventAfterListener(this.element.form,["submit"],function(){e&&m.nativeMethods.setAttribute.call(t.element,bd,"true")})},_d.prototype.run=function(){var i=this;return m.doUpload(this.element,this.paths).then(function(t){if(t.length){var e=g.arrayUtils.map(t,function(t){return t.path}),n=g.arrayUtils.reduce(t,function(t,e){return t.concat(e.resolvedPaths)},[]);throw i.createError(e,n)}})},_d);function _d(t,e,n,i){this.element=t,this.paths=e,this.createError=n,i&&this.element.form&&this._handleRequiredInput()}var wd=E.default.domUtils,Pd=E.default.contentEditable,xd={};xd.DispatchEvent=_,xd.SetScroll=Ll,xd.ScrollIntoView=Rl,xd.Click=Fa,xd.SelectChildClick=su,xd.DblClick=hu,xd.DragToOffset=Fu,xd.DragToElement=Ru,xd.Hover=Xu,xd.Press=df,xd.RClick=Sf,xd.SelectText=Jf,xd.SelectEditableContent=rd,xd.Type=yd,xd.Upload=Sd,xd.MouseOptions=Ir,xd.ClickOptions=Nr,xd.TypeOptions=qr,xd.AutomationSettings=Ao,xd.getOffsetOptions=Lt,xd.calculateSelectTextArguments=function(t,e){void 0===e&&(e={});var n,i,o,r,s,l,a,u,c,f,d,h=wd.isTextEditableElement(t),m=h?0:Pd.getFirstVisiblePosition(t),p=h?wd.getElementValue(t).length:Pd.getLastVisiblePosition(t),v=e.startPos?Math.min(e.startPos,p):m,g=void 0===e.endPos||null===e.endPos?p:Math.min(e.endPos,p);return void 0!==e.offset?(g=0<=e.offset?Math.min(e.offset,g):(v=g,Math.max(0,g+e.offset)),{startPos:v,endPos:g}):void 0!==e.startLine?(n=t,i=e,o=wd.getTextAreaValue(n),r=o&&o.length?o.split("\n"):[],s=r.length-1,l=i.startLine?Math.min(i.startLine,s):0,a=r[l]?r[l].length:0,u=i.startPos?Math.min(i.startPos,a):0,c=void 0===i.endLine||null===i.endLine?s:Math.min(i.endLine,s),f=r[c]?r[c].length:0,d=void 0===i.endPos||null===i.endPos?f:Math.min(i.endPos,f),{startPos:wd.getTextareaPositionByLineAndOffset(n,l,0)+u,endPos:wd.getTextareaPositionByLineAndOffset(n,c,0)+d}):{startPos:v,endPos:g}},xd.cursor=cl,xd.getNextFocusableElement=Ec,xd.SHORTCUT_TYPE=Uc,xd.getSelectionCoordinatesByPosition=Of,xd.getElementFromPoint=Wt,xd.MoveAutomation=el;var Ad=y.default.nativeMethods,Cd=y.default.EVENTS.evalIframeScript;Ad.objectDefineProperty(Md,"%testCafeAutomation%",{configurable:!0,value:xd}),y.default.on(Cd,function(t){return Td(Ad.contentWindowGetter.call(t.iframe))})}(Md["%hammerhead%"],Md["%hammerhead%"].Promise,Md["%testCafeCore%"],Md["%testCafeUI%"])}(window);
1
+ window["%hammerhead%"].utils.removeInjectedScript(),function Td(Md){var Dd=Md.document;!function(m,t,g,e){function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var y=n(m),i=n(t),E=n(g),o=n(e),r=y.default.nativeMethods,s=/^((mouse\w+)|((dbl)?click)|(contextmenu))$/,l=/^((drag\w*)|(drop))$/,a=/^key\w+$/,u=/^(before)?input$/,c=/^(blur|(focus(in|out)?))$/,f=/^pointer\w+/,d={click:1,dblclick:2,mousedown:1,mouseup:1},h="MouseEvent",p="PointerEvent",v="KeyboardEvent",b="InputEvent",S="FocusEvent",_=(w.prototype.run=function(){var t=this.options,e=t.bubbles,n=t.cancelable,i=t.detail,o=(t.view,t.buttons),e=!1!==e,n=!1!==n,i=i||d[this.eventName],o=void 0===o?1:o;Object.assign(this.options,{bubbles:e,cancelable:n,detail:i,view:Md,buttons:o});var r,s=w._getEventCtorByEventType(this.eventName,this.options.eventConstructor);s&&(r=new s(this.eventName,this.options),this.element.dispatchEvent(r))},w._getEventCtorByEventType=function(t,e){if(e&&"function"==typeof w._getEventCtorFromWindow(e)){var n=w._getEventCtorFromNativeMethods(e);if(n&&"function"==typeof n)return n}return s.test(t)||l.test(t)?w._getEventCtorFromNativeMethods(h):f.test(t)?w._getEventCtorFromNativeMethods(p):a.test(t)?w._getEventCtorFromNativeMethods(v):u.test(t)?w._getEventCtorFromNativeMethods(b):c.test(t)?w._getEventCtorFromNativeMethods(S):w._getEventCtorFromNativeMethods("CustomEvent")},w._getEventCtorFromNativeMethods=function(t){return r["Window"+t]||w._getEventCtorFromWindow(t)},w._getEventCtorFromWindow=function(t){return Md[t]},w);function w(t,e,n){this.element=t,this.eventName=e,this.options=n}var P=function(t,e){return(P=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function x(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}P(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var A=function(){return(A=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function C(t,s,l,a){return new(l=l||i.default)(function(n,e){function i(t){try{r(a.next(t))}catch(t){e(t)}}function o(t){try{r(a.throw(t))}catch(t){e(t)}}function r(t){var e;t.done?n(t.value):((e=t.value)instanceof l?e:new l(function(t){t(e)})).then(i,o)}r((a=a.apply(t,s||[])).next())})}function T(n,i){var o,r,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=t(0),a.throw=t(1),a.return=t(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function t(e){return function(t){return function(e){if(o)throw new TypeError("Generator is already executing.");for(;a&&e[a=0]&&(l=0),l;)try{if(o=1,r&&(s=2&e[0]?r.return:e[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,e[1])).done)return s;switch(r=0,s&&(e=[2&e[0],s.value]),e[0]){case 0:case 1:s=e;break;case 4:return l.label++,{value:e[1],done:!1};case 5:l.label++,r=e[1],e=[0];continue;case 7:e=l.ops.pop(),l.trys.pop();continue;default:if(!(s=0<(s=l.trys).length&&s[s.length-1])&&(6===e[0]||2===e[0])){l=0;continue}if(3===e[0]&&(!s||e[1]>s[0]&&e[1]<s[3])){l.label=e[1];break}if(6===e[0]&&l.label<s[1]){l.label=s[1],s=e;break}if(s&&l.label<s[2]){l.label=s[2],l.ops.push(e);break}s[2]&&l.ops.pop(),l.trys.pop();continue}e=i.call(n,l)}catch(t){e=[6,t],r=0}finally{o=s=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}}var M=(D.create=function(t){return"left"in t?new D(t.left,t.top):"right"in t?new D(t.right,t.bottom):new D(t.x,t.y)},D.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},D.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},D.prototype.round=function(t){return void 0===t&&(t=Math.round),this.x=t(this.x),this.y=t(this.y),this},D.prototype.eql=function(t){return this.x===t.x&&this.y===t.y},D.prototype.mul=function(t){return this.x*=t,this.y*=t,this},D.prototype.distance=function(t){return Math.sqrt(Math.pow(this.x-t.x,2)+Math.pow(this.y-t.y,2))},D);function D(t,e){this.x=t,this.y=e}function U(t){var e="array"+t.charAt(0).toUpperCase()+t.slice(1),n=m.nativeMethods[e];return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return n.call.apply(n,t)}}U("filter"),U("map"),U("slice"),U("splice"),U("unshift"),U("forEach"),U("indexOf");var I=U("some");U("reverse"),U("reduce"),U("concat"),U("join"),U("every"),y.default.utils.browser;var k=y.default.nativeMethods;y.default.utils.style.get,y.default.utils.dom.getActiveElement;var O=y.default.utils.dom.findDocument,N=y.default.utils.dom.find;y.default.utils.dom.isElementInDocument;var B=y.default.utils.dom.isElementInIframe,F=y.default.utils.dom.getIframeByElement;y.default.utils.dom.isCrossDomainWindows,y.default.utils.dom.getSelectParent,y.default.utils.dom.getChildVisibleIndex,y.default.utils.dom.getSelectVisibleChildren;var L=y.default.utils.dom.isElementNode;y.default.utils.dom.isTextNode,y.default.utils.dom.isRenderedNode,y.default.utils.dom.isIframeElement,y.default.utils.dom.isInputElement,y.default.utils.dom.isButtonElement,y.default.utils.dom.isFileInput,y.default.utils.dom.isTextAreaElement,y.default.utils.dom.isAnchorElement;var K=y.default.utils.dom.isImgElement;y.default.utils.dom.isFormElement,y.default.utils.dom.isLabelElement,y.default.utils.dom.isSelectElement,y.default.utils.dom.isRadioButtonElement,y.default.utils.dom.isColorInputElement,y.default.utils.dom.isCheckboxElement,y.default.utils.dom.isOptionElement,y.default.utils.dom.isSVGElement;var V=y.default.utils.dom.isMapElement,R=y.default.utils.dom.isBodyElement,Y=y.default.utils.dom.isHtmlElement;y.default.utils.dom.isDocument,y.default.utils.dom.isTextEditableInput,y.default.utils.dom.isTextEditableElement,y.default.utils.dom.isTextEditableElementAndEditingAllowed,y.default.utils.dom.isContentEditableElement,y.default.utils.dom.isDomElement,y.default.utils.dom.isShadowUIElement,y.default.utils.dom.isShadowRoot,y.default.utils.dom.isElementFocusable,y.default.utils.dom.isHammerheadAttr,y.default.utils.dom.isElementReadOnly;var W=y.default.utils.dom.getScrollbarSize,X=y.default.utils.dom.getMapContainer,H=y.default.utils.dom.getTagName,q=y.default.utils.dom.closest,G=y.default.utils.dom.getParents,j=y.default.utils.dom.findParent;function z(t,e){return t.contains?t.contains(e):I(t,function(t){return t.contains(e)})}function $(t){var e=[];N(Dd,"*",function(t){"IFRAME"===t.tagName&&e.push(t),t.shadowRoot&&N(t.shadowRoot,"iframe",function(t){return e.push(t)})});for(var n=0;n<e.length;n++)if(k.contentWindowGetter.call(e[n])===t)return e[n];return null}function Q(t){return k.nodeTextContentGetter.call(t)}y.default.utils.dom.getTopSameDomainWindow,y.default.utils.dom.getParentExceptShadowRoot;var Z=(J.create=function(t){return new J(t.top,t.right,t.bottom,t.left)},J.prototype.add=function(t){return this.top+=t.top,this.right+=t.right,this.bottom+=t.bottom,this.left+=t.left,this},J.prototype.sub=function(t){return"top"in t&&(this.top-=t.top,this.left-=t.left),this.bottom-=t.bottom,this.right-=t.right,this},J.prototype.round=function(t,e){return void 0===t&&(t=Math.round),void 0===e&&(e=t),this.top=t(this.top),this.right=e(this.right),this.bottom=e(this.bottom),this.left=t(this.left),this},J.prototype.contains=function(t){return t.x>=this.left&&t.x<=this.right&&t.y>=this.top&&t.y<=this.bottom},J);function J(t,e,n,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=0),this.top=t,this.right=e,this.bottom=n,this.left=i}var tt=y.default.utils.style,et=y.default.utils.style.getBordersWidth;y.default.utils.style.getComputedStyle,y.default.utils.style.getElementMargin;var nt=y.default.utils.style.getElementPadding,it=y.default.utils.style.getElementScroll;y.default.utils.style.getOptionHeight,y.default.utils.style.getSelectElementSize,y.default.utils.style.isElementVisible,y.default.utils.style.isVisibleChild;var ot=y.default.utils.style.getWidth,rt=y.default.utils.style.getHeight,st=y.default.utils.style.getInnerWidth,lt=y.default.utils.style.getInnerHeight,at=y.default.utils.style.getScrollLeft,ut=y.default.utils.style.getScrollTop,ct=y.default.utils.style.setScrollLeft,ft=y.default.utils.style.setScrollTop,dt=y.default.utils.style.get,ht=y.default.utils.style.getBordersWidthFloat,mt=y.default.utils.style.getElementPaddingFloat;function pt(t){return L(t)&&"fixed"===tt.get(t,"position")}function vt(t){return L(t)&&"sticky"===tt.get(t,"position")}y.default.shadowUI,y.default.nativeMethods;var gt=function(t,e,n,i,o,r){this.width=t,this.height=e,this.left=n.x,this.top=n.y,this.right=n.x+t,this.bottom=n.y+e,this.border=i,this.scrollbar=r,this.scroll=o},yt={notElementOrTextNode:function(t){return"\n The ".concat(t," is neither a DOM element nor a text node.\n ")},elOutsideBounds:function(t,e){return"\n The ".concat(e," (").concat(t,") is located outside the the layout viewport.\n ")},elHasWidthOrHeightZero:function(t,e,n,i){return"\n The ".concat(e," (").concat(t,") is too small to be visible: ").concat(n,"px x ").concat(i,"px.\n ")},elHasDisplayNone:function(t,e){return"\n The ".concat(e," (").concat(t,") is invisible. \n The value of its 'display' property is 'none'.\n ")},parentHasDisplayNone:function(t,e,n){return"\n The ".concat(e," (").concat(t,") is invisible. \n It descends from an element that has the 'display: none' property (").concat(n,").\n ")},elHasVisibilityHidden:function(t,e){return"\n The ".concat(e," (").concat(t,") is invisible.\n The value of its 'visibility' property is 'hidden'.\n ")},parentHasVisibilityHidden:function(t,e,n){return"\n The ".concat(e," (").concat(t,") is invisible.\n It descends from an element that has the 'visibility: hidden' property (").concat(n,").\n ")},elHasVisibilityCollapse:function(t,e){return"\n The ".concat(e," (").concat(t,") is invisible.\n The value of its 'visibility' property is 'collapse'.\n ")},parentHasVisibilityCollapse:function(t,e,n){return"\n The ".concat(e," (").concat(t,") is invisible.\n It descends from an element that has the 'visibility: collapse' property (").concat(n,").\n ")},elNotRendered:function(t,e){return"\n The ".concat(e," (").concat(t,") has not been rendered.\n ")},optionNotVisible:function(t,e,n){return"\n The ".concat(e," (").concat(t,") is invisible. \n The parent element (").concat(n,") is collapsed, and its length is shorter than 2.\n ")},mapContainerNotVisible:function(t,e){return"\n The action target (".concat(t,") is invisible because ").concat(e,"\n ")}},Et=y.default.utils.html,bt=y.default.nativeMethods,St=10;function _t(t){if(!t)return"";var e,n,i,o=bt.cloneNode.call(t),r=Et.cleanUpHtml(bt.elementOuterHTMLGetter.call(o)),s=(e=bt.nodeTextContentGetter.call(t),n=St,void 0===i&&(i="..."),e.length<n?e:e.substring(0,n-i.length)+i),l=bt.elementChildrenGetter.call(t);return 0<bt.htmlCollectionLengthGetter.call(l)?r.replace("></",">...</"):s?r.replace("></",">".concat(s,"</")):r}var wt=y.default.utils.position.getElementRectangle,Pt=y.default.utils.position.getOffsetPosition,xt=y.default.utils.position.offsetToClientCoords;function At(t){var e,n,i,o,r=Y(t),s=r?t.getElementsByTagName("body")[0]:null,l=t.getBoundingClientRect(),a=Z.create(et(t)),u=it(t),c=B(t),f="BackCompat"===t.ownerDocument.compatMode,d=r?new M(0,0):M.create(l),h=l.height,m=l.width;r&&(m=s&&f?(h=s.clientHeight,s.clientWidth):(h=t.clientHeight,t.clientWidth)),!c||(e=F(t))&&(n=Pt(e),i=xt(M.create(n)),o=et(e),d.add(i).add(M.create(o)),r&&a.add(o));var p=!r&&st(t)!==t.clientWidth,v=!r&&lt(t)!==t.clientHeight,g={right:p?W():0,bottom:v?W():0};return new gt(m,h,d,a,u,g)}function Ct(t){var e=t.x,n=t.y,i=Dd.elementFromPoint,o=null;try{o=i.call(Dd,e,n)}catch(t){return null}for(null===o&&(o=i.call(Dd,e-1,n-1));o&&o.shadowRoot&&o.shadowRoot.elementFromPoint;){var r=o.shadowRoot.elementFromPoint(e,n);if(!r||o===r)break;o=r}return o}function Tt(t,e,n){var i=At(t),o=Math.max(t.scrollWidth,i.width),r=Math.max(t.scrollHeight,i.height),s=i.scrollbar.right+i.border.left+i.border.right+o,l=i.scrollbar.bottom+i.border.top+i.border.bottom+r;return(void 0===e||0<=e&&e<=s)&&(void 0===n||0<=n&&n<=l)}function Mt(t){var e=Pt(t),n=e.left,i=e.top,o=xt({x:n,y:i});return o.x=Math.round(o.x),o.y=Math.round(o.y),o}function Dt(n,e){return m.Promise.resolve(n===Dd.documentElement).then(function(t){if(t)return new M(0,0);var e=m.utils.browser.isFirefox?Math.ceil:Math.round;return m.Promise.resolve(Pt(n,e)).then(function(t){return M.create(t)})}).then(function(t){return t.add(e)})}var Ut=/auto|scroll|hidden/i;function It(t){var e,n=dt(t,"overflowX"),i=dt(t,"overflowY"),o=Ut.test(n),r=Ut.test(i),s=O(t).documentElement,l=t.scrollHeight;return(m.utils.browser.isChrome||m.utils.browser.isFirefox||m.utils.browser.isSafari)&&(e=t.getBoundingClientRect().top,l=l-s.getBoundingClientRect().top+e),(o||r)&&l>s.scrollHeight}function kt(t){if(R(t))return It(t);if(Y(t))return function(t){var e=dt(t,"overflowX"),n=dt(t,"overflowY");if("hidden"===e&&"hidden"===n)return!1;var i=t.scrollHeight>t.clientHeight,o=t.scrollWidth>t.clientWidth;if(i||o)return!0;var r=t.getElementsByTagName("body")[0];if(!r)return!1;if(It(r))return!1;var s=Math.min(t.clientWidth,r.clientWidth),l=Math.min(t.clientHeight,r.clientHeight);return r.scrollHeight>l||r.scrollWidth>s}(t);var e,n,i,o,r,s=(n=dt(e=t,"overflowX"),i=dt(e,"overflowY"),o=Ut.test(n),r=Ut.test(i),new M(o,r));if(!s.x&&!s.y)return!1;var l=s.y&&t.scrollHeight>t.clientHeight;return s.x&&t.scrollWidth>t.clientWidth||l}function Ot(i,o){return C(this,void 0,void 0,function(){var e,n;return T(this,function(t){switch(t.label){case 0:return[4,it(i)];case 1:return e=t.sent(),n=kt(i),!/html/i.test(i.tagName)&&n&&(o.x-=e.left,o.y-=e.top),[2,xt(o)]}})})}function Nt(t){if(!t)return null;var e,n,i=(e=Md.screenLeft||Md.screenX,n=Md.screenTop||Md.screenY,new M(e,n)),o=i.x,r=i.y,s=o+t.x,l=r+t.y;return new M(s,l)}function Bt(t){var e=t/2;return e<1?0:Math.round(e)}function Ft(t){var e=wt(t);return{offsetX:Bt(e.width),offsetY:Bt(e.height)}}function Lt(t,e,n){var i=Ft(t);if(e="number"==typeof e?Math.round(e):i.offsetX,n="number"==typeof n?Math.round(n):i.offsetY,0<e&&0<n)return{offsetX:e,offsetY:n};var o=At(t),r=Math.round(Math.max(t.scrollWidth,o.width)),s=Math.round(Math.max(t.scrollHeight,o.height)),l=o.scrollbar.right+o.border.left+o.border.right+r,a=o.scrollbar.bottom+o.border.top+o.border.bottom+s;return{offsetX:e<0?l+e:e,offsetY:n<0?a+n:n}}var Kt=E.default.positionUtils;function Vt(e,n){return void 0===n&&(n=!1),o.default.hide(n).then(function(){var t=Kt.getElementFromPoint(e);return o.default.show(n).then(function(){return t})})}function Rt(t,n){return m.Promise.resolve(Ct(t)).then(function(e){return m.Promise.resolve(z(n,e)).then(function(t){return t&&Q(e)}).then(function(t){return t||e&&e===n?e:null})})}function Yt(n,i){if(!i||!n||n===i)return n;if("tref"===H(i))return i;var e,o,t="area"===H(i)&&K(n);return m.utils.browser.isFirefox&&t?(e=n,o=i,m.Promise.resolve(q(o,"map")).then(function(t){return t&&t.name===e.useMap.substring(1)?o:e})):m.Promise.resolve(q(i,"a")).then(function(t){return!!t}).then(function(t){return!!t&&m.Promise.resolve(z(i,n)).then(function(t){return t&&Q(n)}).then(function(t){return!t&&Q(i)})}).then(function(t){return t?m.Promise.resolve(At(i)).then(function(e){return Rt({x:e.right-1,y:e.top+1},i).then(function(t){return t||Rt({x:e.left+1,y:e.bottom-1},i)}).then(function(t){return t||n})}):n})}function Wt(t,e,n){return Vt(t).then(function(t){return Yt(t,n)})}function Xt(t,e){this.code=t,this.isTestCafeError=!0,this.callsite=e||null}var Ht,qt,Gt,jt="E1",zt="E4",$t="E5",Qt="E9",Zt="E10",Jt="E11",te="E12",ee="E24",ne="E26",ie="E27",oe="E28",re="E29",se="E30",le="E31",ae="E32",ue="E33",ce="E34",fe="E35",de="E36",he="E37",me="E39",pe="E40",ve="E41",ge="E42",ye="E43",Ee="E44",be="E45",Se="E46",_e="E49",we="E50",Pe="E51",xe="E52",Ae="E57",Ce="E64",Te="E65",Me="E68",De="E69",Ue="E70",Ie="E71",ke="E72",Oe="E73",Ne="E74",Be="E76",Fe="E77",Le="E78",Ke="E82",Ve="E83",Re="E90",Ye="E91",We="E92",Xe="E93",He="E94",qe="E95",Ge="E97",je="E99",ze="E100",$e="E101",Qe="E102",Ze=(x(Je,Ht=Xt),Je);function Je(t,e,n){var i=Ht.call(this,t)||this;return i.optionName=e,i.actualValue=n,i}function tn(t,e){var n=qt.call(this,_e,e)||this;return n.instantiationCallsiteName=t,n}function en(t,e){var n=Gt.call(this,we,e)||this;return n.instantiationCallsiteName=t,n}x(tn,qt=Xt),x(en,Gt=Xt);var nn,on,rn,sn,ln,an,un,cn,fn=(x(dn,nn=Xt),dn);function dn(t,e,n){var i=void 0===e?{}:e,o=i.apiFnChain,r=i.apiFnIndex,s=i.reason,l=nn.call(this,t,n)||this;return l.apiFnChain=o,l.apiFnIndex=r,l.reason=s,l}function hn(t){return on.call(this,Pe,t)||this}function mn(t,e){return rn.call(this,xe,e,t)||this}function pn(t,e){var n=sn.call(this,jt)||this;return n.errStack=t,n.pageDestUrl=e,n}function vn(t,e,n){var i=ln.call(this,zt,n)||this;return i.errMsg=String(e),i.instantiationCallsiteName=t,i}function gn(t,e,n,i){var o=an.call(this,$t,i)||this;return o.errMsg=String(e),o.property=n,o.instantiationCallsiteName=t,o}function yn(t){var e=un.call(this,Ce)||this;return e.errMsg=String(t),e}function En(t,e){var n=cn.call(this,Te)||this;return n.errMsg=String(t),n.moduleName=e,n}x(hn,on=Xt),x(mn,rn=fn),x(pn,sn=Xt),x(vn,ln=Xt),x(gn,an=Xt),x(yn,un=Xt),x(En,cn=Xt);var bn,Sn=(x(_n,bn=Ze),_n);function _n(t,e){return bn.call(this,Qt,t,e)||this}var wn,Pn=(x(xn,wn=Ze),xn);function xn(t,e){return wn.call(this,Zt,t,e)||this}var An,Cn=(x(Tn,An=Ze),Tn);function Tn(t,e){return An.call(this,Jt,t,e)||this}var Mn,Dn=(x(Un,Mn=Ze),Un);function Un(t,e){return Mn.call(this,te,t,e)||this}var In,kn=(x(On,In=Ze),On);function On(t,e){return In.call(this,Re,t,e)||this}var Nn,Bn=(x(Fn,Nn=Ze),Fn);function Fn(t,e){return Nn.call(this,Ge,t,e)||this}var Ln,Kn=(x(Vn,Ln=Ze),Vn);function Vn(t,e){return Ln.call(this,Ye,t,e)||this}var Rn,Yn=(x(Wn,Rn=Ze),Wn);function Wn(t,e){return Rn.call(this,We,t,e)||this}var Xn,Hn=(x(qn,Xn=Ze),qn);function qn(t,e){return Xn.call(this,Xe,t,e)||this}var Gn,jn=(x(zn,Gn=Ze),zn);function zn(t,e){return Gn.call(this,He,t,e)||this}var $n,Qn=(x(Zn,$n=Ze),Zn);function Zn(t,e){return $n.call(this,qe,t,e)||this}var Jn,ti=(x(ei,Jn=Ze),ei);function ei(t,e){return Jn.call(this,je,t,e)||this}var ni,ii,oi=(x(ri,ni=Xt),ri);function ri(t,e,n){var i=ni.call(this,ze)||this;return i.objectName=t,i.propertyName=e,i.availableProperties=n,i}function si(t,e){return ii.call(this,ee,e,t)||this}x(si,ii=fn);var li,ai,ui,ci=(x(fi,li=fn),fi);function fi(t,e){return li.call(this,ne,e,t)||this}function di(t){var e=ai.call(this,ie)||this;return e.nodeDescription=t,e}function hi(t,e){var n=ui.call(this,oe,e)||this;return n.argumentName=t,n}x(di,ai=Xt),x(hi,ui=fn);var mi,pi,vi,gi,yi,Ei,bi,Si,_i,wi,Pi,xi,Ai,Ci,Ti,Mi,Di,Ui,Ii,ki,Oi,Ni,Bi,Fi,Li,Ki,Vi,Ri,Yi,Wi,Xi,Hi,qi=(x(Gi,mi=Xt),Gi);function Gi(t){return mi.call(this,$e,t)||this}function ji(t,e){var n=pi.call(this,re,e)||this;return n.argumentName=t,n}function zi(t,e){var n=vi.call(this,se)||this;return n.argumentName=t,n.nodeDescription=e,n}function $i(){return gi.call(this,le)||this}function Qi(){return yi.call(this,ae)||this}function Zi(t){var e=Ei.call(this,ue)||this;return e.argumentName=t,e}function Ji(){return bi.call(this,fe)||this}function to(t){var e=Si.call(this,de)||this;return e.argumentName=t,e}function eo(t,e){var n=_i.call(this,he)||this;return n.filePaths=t,n.scannedFilePaths=e,n}function no(){return wi.call(this,ce)||this}function io(t,e){var n=Pi.call(this,ve)||this;return n.properties=t?"scrollTargetY property":e?"scrollTargetX property":"scrollTargetX and scrollTargetY properties",n}function oo(t,e){var n=xi.call(this,Ae)||this;return t<=0?e<=0?(n.verb="are",n.dimensions="width and height"):(n.verb="is",n.dimensions="width"):(n.verb="is",n.dimensions="height"),n}function ro(t){return Ai.call(this,pe,t)||this}function so(){return Ci.call(this,me)||this}function lo(){return Ti.call(this,ge)||this}function ao(){return Mi.call(this,De)||this}function uo(){return Di.call(this,Me)||this}function co(){return Ui.call(this,Ue)||this}function fo(){return Ii.call(this,Ie)||this}function ho(){return ki.call(this,Oe)||this}function mo(){return Oi.call(this,Ke)||this}function po(t){var e=Ni.call(this,Le)||this;return e.errMsg=t,e}function vo(){return Bi.call(this,Ne)||this}function go(){return Fi.call(this,Be)||this}function yo(){return Li.call(this,Fe)||this}function Eo(){return Ki.call(this,ke)||this}function bo(){return Vi.call(this,Ve)||this}function So(){return Ri.call(this,ye)||this}function _o(){return Yi.call(this,Ee)||this}function wo(t,e){var n=Wi.call(this,be)||this;return n.dialogType=t,n.pageUrl=e,n}function Po(t,e,n){var i=Xi.call(this,Se)||this;return i.dialogType=t,i.errMsg=e,i.pageUrl=n,i}function xo(){return Hi.call(this,Qe)||this}x(ji,pi=fn),x(zi,vi=Xt),x($i,gi=Xt),x(Qi,yi=Xt),x(Zi,Ei=Xt),x(Ji,bi=Xt),x(to,Si=Xt),x(eo,_i=Xt),x(no,wi=Xt),x(io,Pi=Xt),x(oo,xi=Xt),x(ro,Ai=Xt),x(so,Ci=Xt),x(lo,Ti=Xt),x(ao,Mi=Xt),x(uo,Di=Xt),x(co,Ui=Xt),x(fo,Ii=Xt),x(ho,ki=Xt),x(mo,Oi=Xt),x(po,Ni=Xt),x(vo,Bi=Xt),x(go,Fi=Xt),x(yo,Li=Xt),x(Eo,Ki=Xt),x(bo,Vi=Xt),x(So,Ri=Xt),x(_o,Yi=Xt),x(wo,Wi=Xt),x(Po,Xi=Xt),x(xo,Hi=Xt);var Ao=(Object.defineProperty(Co.prototype,"mouseActionStepDelay",{get:function(){return 1===this._speedFactor?10:400*(1-this._speedFactor)},enumerable:!1,configurable:!0}),Object.defineProperty(Co.prototype,"keyActionStepDelay",{get:function(){return 1===this._speedFactor?10:200*(1-this._speedFactor)},enumerable:!1,configurable:!0}),Object.defineProperty(Co.prototype,"cursorSpeed",{get:function(){return Math.pow(400,this._speedFactor)/4},enumerable:!1,configurable:!0}),Object.defineProperty(Co.prototype,"draggingSpeed",{get:function(){return Math.pow(16,this._speedFactor)/4},enumerable:!1,configurable:!0}),Co);function Co(t){this._speedFactor=t||1}var To=y.default.Promise,Mo=y.default.nativeMethods;function Do(e){return new To(function(t){return Mo.setTimeout.call(Md,t,e)})}function Uo(){return Do(0)}var Io=Object.prototype.toString,ko=String.prototype.indexOf,Oo=String.prototype.endsWith||function(t,e){var n=Io.call(this);(void 0===e||e>n.length)&&(e=n.length),e-=t.length;var i=ko.call(n,t,e);return-1!==i&&i===e},No=Array.prototype.indexOf,Bo=Array.prototype.map,Fo=Array.prototype.sort,Lo=Array.prototype.filter,Ko=Array.prototype.concat,Vo="Command",Ro=(Yo.prototype.getAssignableProperties=function(){return[]},Yo.prototype.getAllAssignableProperties=function(){for(var t=Object.getPrototypeOf(this),e=[];t&&t.getAssignableProperties;)e=Ko.call(e,t.getAssignableProperties()),t=Object.getPrototypeOf(t);return e},Yo.prototype.getNonReportedProperties=function(){return[]},Yo.prototype.getReportedProperties=function(){var t=Bo.call(this.getAllAssignableProperties(),function(t){return t.name}),e=this.getNonReportedProperties();return Lo.call(t,function(t){return!(-1<No.call(e,t))})},Yo.prototype._assignFrom=function(t,e,n){if(void 0===n&&(n={}),t){e&&function(t,e){var n,i=e.constructor.name,o=Bo.call(e.getAllAssignableProperties(),function(t){return t.name}),r=Fo.call(e.getReportedProperties());for(n in t)if(!(-1<No.call(o,n)||n in e))throw new oi(i,n,r)}(t,this);for(var i,o,r=this.getAllAssignableProperties(),s=0;s<r.length;s++){var l=r[s],a=l.name,u=l.type,c=l.required,f=l.init,d=l.defaultValue;void 0!==d&&(this[a]=d);var h=t[a];void 0===h&&!c||(e&&u&&u((i=this.constructor.name,o=a,Oo.call(i,Vo)?o:"".concat(i,".").concat(o)),h),this[a]=f?f(a,h,n,e):h)}}},Yo);function Yo(){}function Wo(i){return function(t,e){var n=typeof e;if("number"!=n)throw new i(t,n);if(isNaN(e)||!isFinite(e)||e!==Math.floor(e))throw new i(t,e)}}var Xo,Ho,qo,Go,jo,zo,$o,Qo,Zo,Jo,tr,er,nr,ir=Wo(Sn),or=(Ho=Wo(Xo=Pn),function(t,e){if(Ho(t,e),e<0)throw new Xo(t,e)}),rr=(qo=Cn,function(t,e){var n=typeof e;if("boolean"!=n)throw new qo(t,n)}),sr=(Go=Dn,function(t,e){var n=typeof e;if("number"!=n)throw new Go(t,n);if(isNaN(e)||e<.01||1<e)throw new Go(t,e)}),lr=(jo=kn,function(t,e){var n=typeof e;if("string"!=n)throw new jo(t,n)}),ar=(zo=Bn,function(t,e){var n=typeof e;if("string"!=n&&!(e instanceof RegExp))throw new zo(t,n)}),ur=($o=Kn,function(t,e){if(!(e instanceof Date))throw new $o(t,e)}),cr=(Qo=Yn,function(t,e){if(isNaN(Number(e)))throw new Qo(t,typeof e)}),fr=(Zo=Hn,function(t,e){var n=typeof e;if("string"!=n&&!(e instanceof URL))throw new Zo(t,n)}),dr=(Jo=jn,function(t,e){var n=typeof e;if("object"!=n&&!(e instanceof URLSearchParams))throw new Jo(t,n)}),hr=(tr=Qn,function(t,e){var n=typeof e;if("object"!=n)throw new tr(t,n)}),mr=(er=ti,function(t,e){var n=typeof e;if("function"!=n)throw new er(t,n)}),pr=(x(vr,nr=Ro),vr.prototype.getAssignableProperties=function(){return[{name:"speed",type:sr}]},vr);function vr(t,e){var n=nr.call(this)||this;return n.speed=null,n._assignFrom(t,e),n}var gr,yr=(x(Er,gr=pr),Er.prototype.getAssignableProperties=function(){return[{name:"offsetX",type:ir},{name:"offsetY",type:ir},{name:"isDefaultOffset",type:rr}]},Er);function Er(t,e){var n=gr.call(this)||this;return n.offsetX=null,n.offsetY=null,n._assignFrom(t,e),n}var br,Sr=(x(_r,br=yr),_r.prototype.getAssignableProperties=function(){return[{name:"scrollToCenter",type:rr},{name:"skipParentFrames",type:rr}]},_r);function _r(t,e){var n=br.call(this)||this;return n.scrollToCenter=!1,n.skipParentFrames=!1,n._assignFrom(t,e),n}var wr,Pr,xr=(x(Ar,wr=Ro),Ar.prototype.getAssignableProperties=function(){return[{name:"left",type:ir,defaultValue:null},{name:"right",type:ir,defaultValue:null},{name:"top",type:ir,defaultValue:null},{name:"bottom",type:ir,defaultValue:null}]},Ar);function Ar(t,e){var n=wr.call(this)||this;return n._assignFrom(t,e),n}function Cr(t,e){var n=Pr.call(this)||this;return n.scrollTargetX=null,n.scrollTargetY=null,n.includeMargins=!1,n.includeBorders=!0,n.includePaddings=!0,n.crop={left:null,right:null,top:null,bottom:null},n._assignFrom(t,e),n}x(Cr,Pr=pr),Cr.prototype.getAssignableProperties=function(){return[{name:"scrollTargetX",type:ir},{name:"scrollTargetY",type:ir},{name:"crop",type:hr,init:ps},{name:"includeMargins",type:rr},{name:"includeBorders",type:rr},{name:"includePaddings",type:rr}]};var Tr,Mr=(x(Dr,Tr=Ro),Dr.prototype.getAssignableProperties=function(){return[{name:"ctrl",type:rr,defaultValue:!1},{name:"alt",type:rr,defaultValue:!1},{name:"shift",type:rr,defaultValue:!1},{name:"meta",type:rr,defaultValue:!1}]},Dr);function Dr(t,e){var n=Tr.call(this)||this;return n._assignFrom(t,e),n}var Ur,Ir=(x(kr,Ur=yr),kr.prototype.getAssignableProperties=function(){return[{name:"modifiers",type:hr,init:vs}]},kr);function kr(t,e){var n=Ur.call(this)||this;return n.modifiers={ctrl:!1,alt:!1,shift:!1,meta:!1},n._assignFrom(t,e),n}var Or,Nr=(x(Br,Or=Ir),Br.prototype.getAssignableProperties=function(){return[{name:"caretPos",type:or}]},Br);function Br(t,e){var n=Or.call(this)||this;return n.caretPos=null,n._assignFrom(t,e),n}var Fr,Lr=(x(Kr,Fr=Ir),Kr.prototype.getAssignableProperties=function(){return[{name:"speed"},{name:"minMovingTime"},{name:"holdLeftButton"},{name:"skipScrolling",type:rr},{name:"skipDefaultDragBehavior",type:rr}]},Kr);function Kr(t,e){var n=Fr.call(this)||this;return n.speed=null,n.minMovingTime=null,n.holdLeftButton=!1,n.skipScrolling=!1,n.skipDefaultDragBehavior=!1,n._assignFrom(t,e),n}var Vr,Rr,Yr,Wr,Xr,Hr,qr=(x(Gr,Vr=Nr),Gr.prototype.getAssignableProperties=function(){return[{name:"replace",type:rr},{name:"paste",type:rr},{name:"confidential",type:rr}]},Gr);function Gr(t,e){var n=Vr.call(this)||this;return n.replace=!1,n.paste=!1,n.confidential=void 0,n._assignFrom(t,e),n}function jr(t,e){var n=Rr.call(this,t,e)||this;return n.destinationOffsetX=null,n.destinationOffsetY=null,n._assignFrom(t,e),n}function zr(t,e){var n=Yr.call(this)||this;return n.portraitOrientation=!1,n._assignFrom(t,e),n}function $r(t,e){var n=Wr.call(this)||this;return n.timeout=void 0,n.allowUnawaitedPromise=!1,n._assignFrom(t,e),n}function Qr(t,e){var n=Xr.call(this)||this;return n.confidential=void 0,n._assignFrom(t,e),n}function Zr(t,e){var n=Hr.call(this)||this;return n._assignFrom(t,e),n}x(jr,Rr=Ir),jr.prototype.getAssignableProperties=function(){return[{name:"destinationOffsetX",type:ir},{name:"destinationOffsetY",type:ir}]},x(zr,Yr=Ro),zr.prototype.getAssignableProperties=function(){return[{name:"portraitOrientation",type:rr}]},x($r,Wr=Ro),$r.prototype.getAssignableProperties=function(){return[{name:"timeout",type:or},{name:"allowUnawaitedPromise",type:rr}]},x(Qr,Xr=pr),Qr.prototype.getAssignableProperties=function(){return[{name:"confidential",type:rr}]},x(Zr,Hr=Ro),Zr.prototype.getAssignableProperties=function(){return[{name:"name",type:lr},{name:"value",type:lr},{name:"domain",type:lr},{name:"path",type:lr},{name:"expires",type:ur},{name:"maxAge",type:cr},{name:"secure",type:rr},{name:"httpOnly",type:rr},{name:"sameSite",type:lr}]};var Jr,ts=(x(es,Jr=Ro),es.prototype.getAssignableProperties=function(){return[{name:"username",type:lr,required:!0},{name:"password",type:lr}]},es);function es(t,e){var n=Jr.call(this)||this;return n._assignFrom(t,e),n}var ns,is,os,rs,ss,ls=(x(as,ns=Ro),as.prototype.getAssignableProperties=function(){return[{name:"protocol",type:lr},{name:"host",type:lr,required:!0},{name:"port",type:cr,required:!0},{name:"auth",type:hr,init:hs}]},as);function as(t,e){var n=ns.call(this)||this;return n._assignFrom(t,e),n}function us(t,e){var n=is.call(this)||this;return n._assignFrom(t,e),n}function cs(t,e){var n=os.call(this)||this;return n._assignFrom(t,e),n}function fs(t,e){var n=rs.call(this)||this;return n._assignFrom(t,e),n}function ds(t,e){var n=ss.call(this)||this;return n._assignFrom(t,e),n}function hs(t,e,n,i){return void 0===i&&(i=!0),new ts(e,i)}function ms(t,e,n,i){return void 0===i&&(i=!0),new ls(e,i)}function ps(t,e,n,i){return void 0===i&&(i=!0),new xr(e,i)}function vs(t,e,n,i){return void 0===i&&(i=!0),new Mr(e,i)}x(us,is=Ro),us.prototype.getAssignableProperties=function(){return[{name:"url",type:fr},{name:"method",type:lr},{name:"headers",type:hr},{name:"params",type:dr},{name:"body"},{name:"timeout",type:cr},{name:"withCredentials",type:rr},{name:"auth",type:hr,init:hs},{name:"proxy",type:hr,init:ms},{name:"rawResponse",type:rr}]},x(cs,os=Ro),cs.prototype.getAssignableProperties=function(){return[{name:"credentials",type:cr}]},x(fs,rs=Ro),fs.prototype.getAssignableProperties=function(){return[{name:"stack",type:ar,required:!1},{name:"message",type:ar,required:!1},{name:"pageUrl",type:ar,required:!1}]},x(ds,ss=Ro),ds.prototype.getAssignableProperties=function(){return[{name:"fn",type:mr,required:!0},{name:"dependencies",type:hr,required:!1}]};var gs=null,ys=function(){return gs},Es=function(t){gs=t};y.default.Promise,y.default.nativeMethods,y.default.eventSandbox.listeners,y.default.utils.event.BUTTON;var bs=y.default.utils.event.BUTTONS_PARAMETER;function Ss(t){return t.top!==t}y.default.utils.event.DOM_EVENTS,y.default.utils.event.WHICH_PARAMETER,y.default.utils.event.preventDefault;var _s=y.default.Promise,ws=y.default.eventSandbox.message;function Ps(t,i,e){return new _s(function(n){ws.on(ws.SERVICE_MSG_RECEIVED_EVENT,function t(e){e.message.cmd===i&&(ws.off(ws.SERVICE_MSG_RECEIVED_EVENT,t),n(e.message))}),ws.sendServiceMsg(t,e)})}var xs=(As.prototype.on=function(t,e){this._eventsListeners[t]||(this._eventsListeners[t]=[]),this._eventsListeners[t].push(e)},As.prototype.once=function(n,i){var o=this;this.on(n,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return o.off(n,i),i.apply(void 0,t)})},As.prototype.off=function(t,e){var n=this._eventsListeners[t];n&&(this._eventsListeners[t]=m.nativeMethods.arrayFilter.call(n,function(t){return t!==e}))},As.prototype.offAll=function(t){t?this._eventsListeners[t]=[]:this._eventsListeners={}},As.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var i=this._eventsListeners[t];if(i)for(var o=0;o<i.length;o++)i[o].apply(this,e)},As);function As(){this._eventsListeners={}}var Cs=xs,Ts=m.eventSandbox.listeners;function Ms(){this.initialized=!1,this.stopPropagationFlag=!1,this.events=new Cs}var Ds=(Ms.prototype._internalListener=function(t,e,n,i,o){this.events.emit("scroll",t),this.stopPropagationFlag&&(i(),o())},Ms.prototype.init=function(){var n=this;this.initialized||(this.initialized=!0,Ts.initElementListening(Md,["scroll"]),Ts.addFirstInternalEventBeforeListener(Md,["scroll"],function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return n._internalListener.apply(n,t)}))},Ms.prototype.waitForScroll=function(t){var e=this,n=null,i=new m.Promise(function(t){n=t});return i.cancel=function(){return e.events.off("scroll",n)},this.initialized?this.handleScrollEvents(t,n):n(),i},Ms.prototype.handleScrollEvents=function(n,t){var e,i=this;this.events.once("scroll",t),(e=n)&&e.getRootNode&&O(e)!==e.getRootNode()&&(Ts.initElementListening(n,["scroll"]),Ts.addFirstInternalEventBeforeListener(n,["scroll"],function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];i._internalListener.apply(i,t),Ts.cancelElementListening(n)}))},Ms.prototype.stopPropagation=function(){this.stopPropagationFlag=!0},Ms.prototype.enablePropagation=function(){this.stopPropagationFlag=!1},new Ms),Us=(Is._isScrollValuesChanged=function(t,e){return at(t)!==e.left||ut(t)!==e.top},Is.prototype._setScroll=function(t,e){var n=this,i=e.left,o=e.top,r=Y(t)?O(t):t,s={left:at(r),top:ut(r)},i=Math.max(i,0),o=Math.max(o,0),l=Ds.waitForScroll(r);return ct(r,i),ft(r,o),Is._isScrollValuesChanged(r,s)?l=l.then(function(){n._scrollWasPerformed||(n._scrollWasPerformed=Is._isScrollValuesChanged(r,s))}):(l.cancel(),m.Promise.resolve())},Is.prototype._getScrollToPoint=function(t,e,n){var i=Math.floor(t.width/2),o=Math.floor(t.height/2),r=this._scrollToCenter?i:Math.min(n.left,i),s=this._scrollToCenter?o:Math.min(n.top,o),l=t.scroll,a=l.left,u=l.top,c=e.x>=a+t.width-r,f=e.x<=a+r,d=e.y>=u+t.height-s,h=e.y<=u+s;return c?a=e.x-t.width+r:f&&(a=e.x-r),d?u=e.y-t.height+s:h&&(u=e.y-s),{left:a,top:u}},Is.prototype._getScrollToFullChildView=function(t,e,n){var i,o,r,s,l,a,u={left:null,top:null},c=t.width>=e.width,f=t.height>=e.height,d=(i=e,o=t,Z.create({top:i.top-o.top,left:i.left-o.left,right:o.right-i.right,bottom:o.bottom-i.bottom}).sub(o.border).sub(o.scrollbar).round(Math.ceil,Math.floor));return c&&(r=t.width-e.width,s=Math.min(n.left,r),this._scrollToCenter&&(s=r/2),d.left<s?u.left=Math.round(t.scroll.left+d.left-s):d.right<s&&(u.left=Math.round(t.scroll.left+Math.min(d.left,-d.right)+s))),f&&(l=t.height-e.height,a=Math.min(n.top,l),this._scrollToCenter&&(a=l/2),d.top<a?u.top=Math.round(t.scroll.top+d.top-a):d.bottom<a&&(u.top=Math.round(t.scroll.top+Math.min(d.top,-d.bottom)+a))),u},Is._getChildPoint=function(t,e,n){return M.create(e).sub(M.create(t)).add(M.create(t.scroll)).add(M.create(e.border)).add(n)},Is.prototype._getScrollPosition=function(t,e,n,i){var o=Is._getChildPoint(t,e,n),r=this._getScrollToPoint(t,o,i),s=this._getScrollToFullChildView(t,e,i);return{left:Math.max(null===s.left?r.left:s.left,0),top:Math.max(null===s.top?r.top:s.top,0)}},Is._getChildPointAfterScroll=function(t,e,n,i){return M.create(e).add(M.create(t.scroll)).sub(M.create(n)).add(i)},Is.prototype._isChildFullyVisible=function(t,e,n){var i=Is._getChildPointAfterScroll(t,e,t.scroll,n),o=this._getScrollPosition(t,e,n,{left:0,top:0}),r=o.left,s=o.top;return!this._isTargetElementObscuredInPoint(i)&&r===t.scroll.left&&s===t.scroll.top},Is.prototype._scrollToChild=function(t,e,n){for(var i=At(t),o=At(e),r=st(Md),s=lt(Md),l=i.scroll,a=!this._isChildFullyVisible(i,o,n);a;){l=this._getScrollPosition(i,o,n,this._maxScrollMargin);var u=Is._getChildPointAfterScroll(i,o,l,n),c=this._isTargetElementObscuredInPoint(u);this._maxScrollMargin.left+=20,this._maxScrollMargin.left>=r&&(this._maxScrollMargin.left=50,this._maxScrollMargin.top+=20),a=c&&this._maxScrollMargin.top<s}return this._maxScrollMargin={left:50,top:50},this._setScroll(t,l)},Is.prototype._scrollElement=function(){if(!kt(this._element))return m.Promise.resolve();var t=At(this._element),e=this._getScrollToPoint(t,this._offsets,this._maxScrollMargin);return this._setScroll(this._element,e)},Is.prototype._scrollParents=function(){var t,e,n,i,o,r,s=this,l=(t=this._element,i=G(t),!B(t)||(e=F(t))&&(n=G(e),i.concat(n)),m.nativeMethods.arrayFilter.call(i,kt)),a=this._element,u=at(a),c=ut(a),f=M.create(this._offsets).sub(new M(u,c).round()),d=function(n,i){return C(this,void 0,void 0,function(){var e;return T(this,function(t){switch(t.label){case 0:e=0,t.label=1;case 1:return e<n?[4,i(e)]:[3,4];case 2:t.sent(),t.label=3;case 3:return e++,[3,1];case 4:return[2]}})})}(l.length,function(t){return s._scrollToChild(l[t],a,f).then(function(){o=At(a),r=At(l[t]),f.add(M.create(o)).sub(M.create(r)).add(M.create(r.border)),a=l[t]})}),h={scrollWasPerformed:this._scrollWasPerformed,offsetX:f.x,offsetY:f.y,maxScrollMargin:this._maxScrollMargin};return d.then(function(){if(!s._skipParentFrames&&Ss(Md))return h.cmd=Is.SCROLL_REQUEST_CMD,Ps(h,Is.SCROLL_RESPONSE_CMD,Md.parent)}).then(function(){return s._scrollWasPerformed})},Is._getPinnedElementAncestorOrSelf=function(t,e){return j(t,!0,e)},Is.prototype._isTargetElementObscuredInPointByElement=function(t,e){var n=Is._getPinnedElementAncestorOrSelf(t,e);return!!n&&!n.contains(this._element)},Is.prototype._isTargetElementObscuredInPoint=function(t){var e=Ct(t);return!!e&&(this._isTargetElementObscuredInPointByElement(e,pt)||this._isTargetElementObscuredInPointByElement(e,vt))},Is.prototype.run=function(){var t=this;return this._scrollElement().then(function(){return t._scrollParents()})},Is.SCROLL_REQUEST_CMD="automation|scroll|request",Is.SCROLL_RESPONSE_CMD="automation|scroll|response",Is);function Is(t,e,n){this._element=t,this._offsets=new M(e.offsetX,e.offsetY),this._scrollToCenter=!!e.scrollToCenter,this._skipParentFrames=!!e.skipParentFrames,this._maxScrollMargin=n||{left:50,top:50},this._scrollWasPerformed=!1}var ks=(Os.prototype.setup=function(){this.dragAndDropMode=!1,this.dropAllowed=!1},Os.prototype.leaveElement=function(){},Os.prototype.move=function(){},Os.prototype.enterElement=function(){},Os.prototype.dragAndDrop=function(){},Os.prototype.teardown=function(){},Os.prototype.run=function(t,e,n,i,o){var r=e&&g.domUtils.isElementInDocument(e),s=e&&g.domUtils.isElementInIframe(e)&&!g.domUtils.getIframeByElement(e);r&&!s||(e=null);var l=t!==e,a=l?g.domUtils.getCommonAncestor(t,e):null;this.setup(),l&&e&&this.leaveElement(t,e,a,n),l&&g.domUtils.isElementInDocument(t)&&this.enterElement(t,e,a,n),this.move(t,n),this.dragAndDrop(i,t,e,n,o),this.teardown(t,n,e);var u=this.dragAndDropMode,c=this.dropAllowed;return this.dragAndDropMode=!1,this.dropAllowed=!1,{dragAndDropMode:u,dropAllowed:c}},Os);function Os(t){var e=t.moveEvent;this.dragAndDropMode=!1,this.dropAllowed=!1,this.moveEvent=e}var Ns=y.default.eventSandbox.eventSimulator,Bs=y.default.utils.extend,Fs=y.default.nativeMethods,Ls=(Ks.leaveElement=function(t,e,n,i){Ns.mouseout(e,Bs({relatedTarget:t},i));for(var o=e;o&&o!==n;)Ns.mouseleave(o,Bs({relatedTarget:t},i)),o=Fs.nodeParentNodeGetter.call(o)},Ks.enterElement=function(t,e,n,i){Ns.mouseover(t,Bs({relatedTarget:e},i));for(var o=t,r=[];o&&o!==n;)r.push(o),o=g.domUtils.getParentExceptShadowRoot(o);for(var s=r.length-1;-1<s;s--)Ns.mouseenter(r[s],Bs({relatedTarget:e},i))},Ks.move=function(t,e,n){Ns[t](e,n)},Ks);function Ks(){}var Vs=(Rs.dragAndDrop=function(t,e,n,i){return Ns.drag(t,i),e!==n&&(g.domUtils.isElementInDocument(e)&&(i.relatedTarget=n,Ns.dragenter(e,i)),n&&(i.relatedTarget=e,Ns.dragleave(n,i))),!Ns.dragover(e,i)},Rs);function Rs(){}var Ys,Ws=y.default.eventSandbox.eventSimulator,Xs=(x(Hs,Ys=ks),Hs.prototype.leaveElement=function(t,e,n,i){Ls.leaveElement(t,e,n,i)},Hs.prototype.enterElement=function(t,e,n,i){Ls.enterElement(t,e,n,i)},Hs.prototype.move=function(t,e){this._needEmulateMoveEvent()&&Ls.move(this.moveEvent,t,e)},Hs.prototype.teardown=function(t,e,n){this._needEmulateMoveEvent()&&g.domUtils.isElementInDocument(t)&&t!==n&&Ws[this.moveEvent](t,e)},Hs.prototype._needEmulateMoveEvent=function(){return"touchmove"!==this.moveEvent||this.holdLeftButton},Hs);function Hs(t){var e=Ys.call(this,t)||this;return e.holdLeftButton=t.holdLeftButton,e}var qs,Gs=(x(js,qs=ks),js.prototype.setup=function(){qs.prototype.setup.call(this),this.dragAndDropMode=!0},js.prototype.dragAndDrop=function(t,e,n,i){this.dropAllowed=Vs.dragAndDrop(t,e,n,i)},js);function js(){return null!==qs&&qs.apply(this,arguments)||this}var zs,$s=y.default.eventSandbox.eventSimulator,Qs=(x(Zs,zs=ks),Zs.prototype.setup=function(){zs.prototype.setup.call(this),this.dragAndDropMode=!0},Zs.prototype.leaveElement=function(t,e,n,i){Ls.leaveElement(t,e,n,i)},Zs.prototype.move=function(t,e){Ls.move(this.moveEvent,t,e)},Zs.prototype.enterElement=function(t,e,n,i){Ls.enterElement(t,e,n,i)},Zs.prototype.dragAndDrop=function(t,e,n,i,o){var r=$s.dragstart(t,i);o.setReadOnlyMode(),r?this.dropAllowed=Vs.dragAndDrop(t,e,n,i):this.dragAndDropMode=!1},Zs.prototype.run=function(t,e,n,i,o){return zs.prototype.run.call(this,t,null,n,i,o)},Zs);function Zs(){return null!==zs&&zs.apply(this,arguments)||this}function Js(t,e,n){return new(t?e?Gs:Qs:Xs)(n)}function tl(a,u,c){return C(this,void 0,void 0,function(){var e,n,i,o,r,s,l;return T(this,function(t){switch(t.label){case 0:e=!0,n=M.create(a.startPoint),i=M.create(a.endPoint).round(Math.floor),o=M.create(a.startPoint).round(Math.floor),r=M.create(a.startPoint),s=u(),t.label=1;case 1:return o.eql(i)?[3,4]:(r=M.create(o),a.needMoveImmediately?o=i:e?(e=!1,o.add({x:0<a.distance.x?1:-1,y:0<a.distance.y?1:-1})):(l=Math.min((u()-s)/a.movingTime,1),o=M.create(a.distance).mul(l).add(n).round(Math.floor)),o.eql(r)?[3,3]:[4,c(o)]);case 2:t.sent(),t.label=3;case 3:return[3,1];case 4:return[2]}})})}var el=(nl.create=function(o,r,s,l,a){return void 0===a&&(a=null),C(this,void 0,m.Promise,function(){var e,n,i;return T(this,function(t){switch(t.label){case 0:return[4,nl.getTarget(o,s,new M(r.offsetX,r.offsetY))];case 1:return e=t.sent(),n=e.element,i=e.offset,[2,new nl(n,i,r,s,l,a)]}})})},nl.getTarget=function(e,n,i){return m.Promise.resolve(Tt(e,i.x,i.y)).then(function(t){return t?{element:e,offset:i}:m.Promise.all([Dt(e,i),n.document.documentElement]).then(function(t){var e=t[0];return{element:t[1],offset:e}})})},nl.prototype._getCursorSpeed=function(){return this.automationSettings.cursorSpeed},nl.prototype._getTargetClientPoint=function(){var o=this;return m.Promise.resolve(it(this.element)).then(function(i){return Y(o.element)?M.create(o.offset).sub(M.create(i)).round(Math.round):m.Promise.resolve(Mt(o.element)).then(function(t){var e=R(o.element),n=M.create(t).add(o.offset);return e||n.sub(M.create(i)),n.round(Math.floor)})})},nl.prototype._getEventSequenceOptions=function(t){var e=bs.noButton,n=Nt(t);return{eventOptions:{clientX:t.x,clientY:t.y,screenX:null==n?void 0:n.x,screenY:null==n?void 0:n.y,buttons:e,ctrl:this.modifiers.ctrl,alt:this.modifiers.alt,shift:this.modifiers.shift,meta:this.modifiers.meta},eventSequenceOptions:{moveEvent:this.moveEvent}}},nl.prototype._runEventSequence=function(t,e){var n=e.eventOptions,i=e.eventSequenceOptions;return Js(!1,this.firstMovingStepOccured,i).run(t,ys(),n,null,null)},nl.prototype._emulateEvents=function(t,e){var n=this._getEventSequenceOptions(e);this._runEventSequence(t,n),this.firstMovingStepOccured=!0,Es(t)},nl.prototype._movingStep=function(n){var i=this;return this.cursor.move(n).then(function(){return Vt(i.cursor.getPosition())}).then(function(t){var e=i._getCorrectedTopElement(t);return e?i._emulateEvents(e,n):null}).then(Uo)},nl.prototype._getCorrectedTopElement=function(t){return t},nl.prototype._move=function(l){return C(this,void 0,m.Promise,function(){var e,n,i,o,r,s=this;return T(this,function(t){switch(t.label){case 0:return e=this.cursor.getPosition(),n=M.create(l).sub(e),i=Math.max(Math.max(Math.abs(n.x),Math.abs(n.y))/this.cursorSpeed,this.minMovingTime),o={startPoint:e,endPoint:l,movingTime:i,distance:n,needMoveImmediately:this._needMoveCursorImmediately()},this.nativeAutomationInput?(r=[],[4,tl(o,m.nativeMethods.dateNow,function(i){return C(s,void 0,void 0,function(){var e,n;return T(this,function(t){switch(t.label){case 0:return[4,null===(n=this.nativeAutomationInput)||void 0===n?void 0:n.createMouseMoveEvent(i,this.modifiers)];case 1:return e=t.sent(),r.push(e),[2,Uo()]}})})})]):[3,4];case 1:return t.sent(),[4,this.nativeAutomationInput.executeEventSequence(r)];case 2:return t.sent(),[4,this.cursor.move(l)];case 3:return t.sent(),[3,6];case 4:return[4,tl(o,m.nativeMethods.dateNow,function(t){return s._movingStep(t)})];case 5:t.sent(),t.label=6;case 6:return[2]}})})},nl.prototype._needMoveCursorImmediately=function(){return this.touchMode},nl.prototype._scroll=function(){if(this.skipScrolling)return m.Promise.resolve(!1);var t=new Sr({offsetX:this.offset.x,offsetY:this.offset.y},!1);return new Us(this.element,t).run()},nl.prototype._moveToCurrentFrame=function(t,e){var n=this;if(this.cursor.isActive(this.window))return m.Promise.resolve();var i=this.cursor.getPosition(),o=i.x,r=i.y,s=this.cursor.getActiveWindow(this.window),c=null,l=null,f={cmd:"automation|move|request",startX:o,startY:r,endX:t.x,endY:t.y,modifiers:this.modifiers,speed:this.speed,nativeAutomationMove:e};return m.Promise.resolve().then(function(){if(s.parent===n.window)return m.Promise.resolve($(s)).then(function(t){return c=t,m.Promise.resolve((n=Pt(e=t),i=n.left,o=n.top,r=xt({x:i,y:o}),s=et(e),l=nt(e),a=r.x+s.left+l.left,u=r.y+s.top+l.top,new Z(u,a+ot(e),u+rt(e),a))).then(function(t){f.left=t.left,f.top=t.top,f.right=t.right,f.bottom=t.bottom});var e,n,i,o,r,s,l,a,u})}).then(function(){return Vt(n.cursor.getPosition())}).then(function(t){return l=t===c,s.parent===n.window&&(f.iframeUnderCursor=l),Ps(f,"automation|move|response",s)}).then(function(t){if(n.cursor.setActiveWindow(n.window),l||m.utils.dom.isIframeWindow(n.window))return n.cursor.move(t)})},nl.prototype.run=function(){var n=this;return this._scroll().then(function(){return m.Promise.all([n._getTargetClientPoint(),(t=n.window,new Z(0,ot(t),rt(t),0))]);var t}).then(function(t){var e=t[0];if(t[1].contains(e))return n._moveToCurrentFrame(e,!!n.nativeAutomationInput).then(function(){return n._move(e)})})},nl);function nl(t,e,n,i,o,r){void 0===r&&(r=null),this.touchMode=m.utils.featureDetection.isTouchDevice,this.moveEvent=this.touchMode?"touchmove":"mousemove",this.automationSettings=new Ao(n.speed),this.cursorSpeed=this._getCursorSpeed(),this.element=t,this.window=i,this.offset=e,this.cursor=o,this.minMovingTime=n.minMovingTime||0,this.modifiers=n.modifiers||{},this.skipScrolling=n.skipScrolling,this.skipDefaultDragBehavior=n.skipDefaultDragBehavior,this.speed=n.speed,this.nativeAutomationInput=r||null,this.firstMovingStepOccured=!1}var il=(ol.prototype._ensureActiveWindow=function(t){this._activeWindow!==t&&this._activeWindow!==t.parent&&this._activeWindow.parent!==t&&(this._activeWindow=t)},ol.prototype.isActive=function(t){return this._ensureActiveWindow(t),this._activeWindow===t},ol.prototype.setActiveWindow=function(t){this._activeWindow=t},ol.prototype.getActiveWindow=function(t){return this._ensureActiveWindow(t),this._activeWindow},ol.prototype.getPosition=function(){return new M(this._x,this._y)},ol.prototype.move=function(t){return this._x=t.x,this._y=t.y,this._ui.move(t)},ol.prototype.hide=function(){return this._ui.hide?this._ui.hide():m.Promise.resolve()},ol.prototype.show=function(){return this._ui.show?this._ui.show():m.Promise.resolve()},ol.prototype.leftButtonDown=function(){return this._ui.leftButtonDown()},ol.prototype.rightButtonDown=function(){return this._ui.rightButtonDown()},ol.prototype.buttonUp=function(){return this._ui.buttonUp()},ol);function ol(t,e){this._ui=e,this._x=-1,this._y=-1,this._activeWindow=t}var rl,sl,ll,al,ul=Ss(Md)?o.default.iframeCursorUI:o.default.cursorUI,cl=new il(Md.top,ul),fl=E.default.positionUtils,dl=E.default.domUtils,hl=E.default.eventUtils,ml="elementOverlapped";(sl=rl=rl||{})[sl.Mouse=0]="Mouse",sl[sl.Keyboard=1]="Keyboard",sl[sl.Touch=2]="Touch",sl[sl.Delay=3]="Delay",sl[sl.InsertText=4]="InsertText",(al=ll=ll||{})[al.alt=1]="alt",al[al.ctrl=2]="ctrl",al[al.meta=4]="meta";var pl={ctrl:!(al[al.shift=8]="shift"),alt:!1,shift:!1,meta:!1};function vl(t){var e=0;return t&&(t.ctrl&&(e|=ll.ctrl),t.alt&&(e|=ll.alt),t.shift&&(e|=ll.shift),t.meta&&(e|=ll.meta)),e}function gl(t){return ll[t]||0}var yl=y.default.utils,El=y.default.eventSandbox,bl=y.default.nativeMethods,Sl=El.message,_l={clickCount:1,force:.5},wl="native-automation|calculate-top-left-point|request",Pl="native-automation|calculate-top-left-point|response";function xl(){return C(this,void 0,void 0,function(){return T(this,function(t){switch(t.label){case 0:return Md===Md.parent?[3,2]:[4,Ps({cmd:wl},Pl,Md.parent)];case 1:return[2,t.sent().topLeftPoint];case 2:return[2,{x:0,y:0}]}})})}Sl.on(Sl.SERVICE_MSG_RECEIVED_EVENT,function(d){return C(void 0,void 0,void 0,function(){var r,s,l,a,u,c,f;return T(this,function(t){switch(t.label){case 0:return d.message.cmd!==wl?[3,2]:(r=d.source,[4,xl()]);case 1:s=t.sent(),l=s.x,a=s.y,u=$(r),n=(e=u).getBoundingClientRect(),i=ht(e),o=mt(e),c={x:n.left+i.left+o.left,y:n.top+i.top+o.top},f={cmd:Pl,topLeftPoint:{x:c.x+l,y:c.y+a}},Sl.sendServiceMsg(f,r),t.label=2;case 2:return[2]}var e,n,i,o})})});var Al=(Cl._isNonCharKeyModifier=function(t){var e=[ll.ctrl,ll.alt,ll.meta];return-1<bl.arrayIndexOf.call(e,t)},Cl._getKeyDownEventText=function(t){return t.isNewLine?"\r":1!==t.keyProperty.length||Cl._isNonCharKeyModifier(t.modifiers)?"":t.keyProperty},Cl.createKeyDownOptions=function(t){var e=Cl._getKeyDownEventText(t);return{type:e?"keyDown":"rawKeyDown",modifiers:t.modifiers||0,windowsVirtualKeyCode:t.keyCode,key:t.keyProperty,commands:t.commands,text:e}},Cl.createKeyUpOptions=function(t){return{type:"keyUp",modifiers:t.modifiers||0,key:t.keyProperty,windowsVirtualKeyCode:t.keyCode}},Cl.createMouseEventOptions=function(r,s){return C(this,void 0,void 0,function(){var n,i,o;return T(this,function(t){switch(t.label){case 0:return[4,xl()];case 1:return n=t.sent(),i=n.x,o=n.y,[2,yl.extend({x:s.options.clientX+i,y:s.options.clientY+o,modifiers:vl(s.options),button:(e=s.options).button?e.button:"left",type:r},_l)]}var e})})},Cl.createTouchEventOptions=function(o,r){return C(this,void 0,void 0,function(){var e,n,i;return T(this,function(t){switch(t.label){case 0:return[4,xl()];case 1:return e=t.sent(),n=e.x,i=e.y,[2,{modifiers:vl(r.options),touchPoints:[{x:r.options.clientX+n,y:r.options.clientY+i}],type:o}]}})})},Cl.delay=function(t){return{type:rl.Delay,options:{delay:t}}},Cl.keyDown=function(t){return{type:rl.Keyboard,options:Cl.createKeyDownOptions(t)}},Cl.keyUp=function(t){return{type:rl.Keyboard,options:Cl.createKeyUpOptions(t)}},Cl);function Cl(){}var Tl=y.default.utils.featureDetection.isTouchDevice,Ml=(Dl.prototype._executeTouchEvent=function(n,i){return C(this,void 0,void 0,function(){var e;return T(this,function(t){switch(t.label){case 0:return[4,Al.createTouchEventOptions(n,i)];case 1:return e=t.sent(),[2,this._dispatchEventFn.single(rl.Touch,e)]}})})},Dl.prototype._executeMouseEvent=function(n,i){return C(this,void 0,void 0,function(){var e;return T(this,function(t){switch(t.label){case 0:return[4,Al.createMouseEventOptions(n,i)];case 1:return e=t.sent(),[2,this._dispatchEventFn.single(rl.Mouse,e)]}})})},Dl.prototype.mouseDown=function(e){return C(this,void 0,void 0,function(){return T(this,function(t){return Tl?[2,this._executeTouchEvent("touchStart",e)]:[2,this._executeMouseEvent("mousePressed",e)]})})},Dl.prototype.mouseUp=function(e){return C(this,void 0,void 0,function(){return T(this,function(t){return Tl?[2,this._executeTouchEvent("touchEnd",e)]:[2,this._executeMouseEvent("mouseReleased",e)]})})},Dl.prototype.keyDown=function(t){var e=Al.createKeyDownOptions(t);return this._dispatchEventFn.single(rl.Keyboard,e)},Dl.prototype.keyUp=function(t){var e=Al.createKeyUpOptions(t);return this._dispatchEventFn.single(rl.Keyboard,e)},Dl.prototype.executeEventSequence=function(t){return this._dispatchEventFn.sequence(t)},Dl.prototype.executeInsertText=function(e){return C(this,void 0,void 0,function(){return T(this,function(t){return[2,this._dispatchEventFn.single(rl.InsertText,{text:e})]})})},Dl.prototype.createMouseMoveEvent=function(n,i){return C(this,void 0,void 0,function(){var e;return T(this,function(t){switch(t.label){case 0:return[4,Al.createMouseEventOptions("mouseMoved",{options:A({clientX:n.x,clientY:n.y,button:"none"},i)})];case 1:return e=t.sent(),[2,{type:rl.Mouse,options:e}]}})})},Dl);function Dl(t){this._dispatchEventFn=t}var Ul=(Il.create=function(t){var n=t.element,i=t.clientPoint,o=t.screenPoint,r=t.isTarget,s=t.inMoving;return C(this,void 0,void 0,function(){var e;return T(this,function(t){switch(t.label){case 0:return e=null,i?[4,Nt(i)]:[3,2];case 1:e=t.sent(),t.label=2;case 2:return[2,new Il({element:n,clientPoint:i,screenPoint:o,isTarget:r,inMoving:s,devicePoint:e})]}})})},Il);function Il(t){var e=t.element,n=void 0===e?null:e,i=t.clientPoint,o=void 0===i?null:i,r=t.screenPoint,s=void 0===r?null:r,l=t.isTarget,a=void 0!==l&&l,u=t.inMoving,c=void 0!==u&&u,f=t.devicePoint,d=void 0===f?null:f;this.element=n,this.clientPoint=o,this.screenPoint=s,this.devicePoint=d,this.isTarget=a,this.inMoving=c}var kl,Ol=(x(Nl,kl=xs),Nl.prototype._ensureWindowAndCursorForLegacyTests=function(t){t.window=t.window||Md,t.cursor=cl},Nl.prototype.canUseNativeAutomationEventSimulator=function(t){return!!this.nativeAutomationInput&&!!t&&"select"!==H(t)},Nl.prototype._getElementForEvent=function(n){return C(this,void 0,void 0,function(){var e;return T(this,function(t){return e=Tt(this.element,this.options.offsetX,this.options.offsetY)?this.element:null,[2,Wt(n.point,this.window,e)]})})},Nl.prototype._moveToElement=function(){return C(this,void 0,void 0,function(){var e,n=this;return T(this,function(t){switch(t.label){case 0:return e=new Lr(m.utils.extend({skipScrolling:!0},this.options),!1),[4,el.create(this.element,e,this.window,this.cursor,this.nativeAutomationInput)];case 1:return[2,t.sent().run().then(function(){return Do(n.automationSettings.mouseActionStepDelay)})]}})})},Nl.prototype._scrollToElement=function(){var e=this,n=!1,t=new Sr(this.options,!1);return new Us(this.element,t).run().then(function(t){return n=!!t,Do(e.automationSettings.mouseActionStepDelay)}).then(function(){return Wt(e.cursor.getPosition(),e.window)}).then(function(t){return function(s,l,a){return C(this,void 0,y.default.Promise,function(){var e,n,i,o,r;return T(this,function(t){switch(t.label){case 0:return s&&dl.contains(l,s)&&a?(e=ys(),n=dl.getCommonAncestor(s,e),[4,fl.getClientPosition(s)]):[2];case 1:return[4,Nt(i=t.sent())];case 2:return(o=t.sent())&&(r={clientX:i.x,clientY:i.y,screenX:o.x,screenY:o.y,ctrl:!1,alt:!1,shift:!1,meta:!1,buttons:hl.BUTTONS_PARAMETER.leftButton},Ls.leaveElement(s,e,n,r),Ls.enterElement(s,e,n,r),Es(s)),[2]}})})}(t,e.element,n)}).then(function(){return n})},Nl.prototype._getElementOffset=function(){var t=Lt(this.element),e=this.options,n=e.offsetX,i=e.offsetY,o=i||0===i?i:t.offsetY,r=n||0===n?n:t.offsetX;return M.create({x:r,y:o})},Nl.prototype._isTargetElement=function(n,i){return C(this,void 0,void 0,function(){var e;return T(this,function(t){switch(t.label){case 0:return(e=!i||n===i||n===this.element)||!n?[3,2]:[4,this._contains(this.element,n)];case 1:e=t.sent(),t.label=2;case 2:return[2,e]}})})},Nl.prototype._getCheckedPoints=function(t){for(var e=[t],n=t.x/2,i=t.y/2,o=2*t.x,r=2*t.y,s=i;s<r;s+=i)for(var l=n;l<o;l+=n)e.push(M.create({x:l,y:s}));return e},Nl.prototype._getAvailableOffset=function(r,s){return C(this,void 0,void 0,function(){var e,n,i,o;return T(this,function(t){switch(t.label){case 0:e=this._getCheckedPoints(s),i=n=null,o=0,t.label=1;case 1:return o<e.length?[4,Dt(this.element,e[o])]:[3,7];case 2:return n=t.sent(),[4,Ot(this.element,n)];case 3:return[4,Wt(t.sent(),this.window,r)];case 4:return i=t.sent(),[4,this._isTargetElement(i,r)];case 5:if(t.sent())return[2,e[o]];t.label=6;case 6:return o++,[3,1];case 7:return[2,null]}})})},Nl.prototype._wrapAction=function(m){return C(this,void 0,void 0,function(){var e,n,i,o,r,s,l,a,u,c,f,d,h;return T(this,function(t){switch(t.label){case 0:return e=this._getElementOffset(),[4,Tt(this.element,e.x,e.y)];case 1:return n=t.sent()?this.element:null,[4,Dt(this.element,e)];case 2:return i=t.sent(),[4,Mt(this.element)];case 3:return o=t.sent(),[4,m()];case 4:return t.sent(),this.options.isDefaultOffset?[4,this._getAvailableOffset(n,e)]:[3,6];case 5:r=t.sent(),e.x=(null==r?void 0:r.x)||e.x,e.y=(null==r?void 0:r.y)||e.y,this.options.offsetX=e.x,this.options.offsetY=e.y,t.label=6;case 6:return[4,Dt(this.element,e)];case 7:return s=t.sent(),[4,Mt(this.element)];case 8:return l=t.sent(),[4,Ot(this.element,s)];case 9:return[4,Wt(a=t.sent(),this.window,n)];case 10:return(u=t.sent())?[4,this._isTargetElement(u,n)]:[2,Ul.create({element:null,clientPoint:null,screenPoint:null,isTarget:!1,inMoving:!1})];case 11:return c=t.sent(),f=i.x!==s.x||i.y!==s.y,d=o.x!==l.x||o.y!==l.y,h=f&&d,[2,Ul.create({element:u,clientPoint:a,screenPoint:s,isTarget:c,inMoving:h})]}})})},Nl.prototype._checkElementState=function(t,e){if(!t.element)throw new ci(null,{reason:function t(e,n){void 0===n&&(n="action target");var i=_t(e);if(V(e)){var o=(t(X(q(e,"map")),"container")||"").replace(/.*The/,"its");return yt.mapContainerNotVisible(i,o)}return yt.elOutsideBounds(i,n)}(this.element)});if(e&&(!t.isTarget||t.inMoving))throw new qi;return t},Nl.prototype._ensureElement=function(o,e,n){var r=this;return void 0===e&&(e=!1),void 0===n&&(n=!1),this._wrapAction(function(){return r._scrollToElement()}).then(function(t){return r._checkElementState(t,o)}).then(function(t){return n?t:r._wrapAction(function(){return r._moveToElement()})}).then(function(t){return e||r._checkElementState(t,o),t}).then(function(t){var e,n,i=null==t?void 0:t.element;return r.emit(r.TARGET_ELEMENT_FOUND_EVENT,{element:i||null}),o||!i||t.isTarget||(e=_t(r.element),n=_t(i),r.emit(r.WARNING_EVENT,{type:ml,args:[e,n]})),{element:(null==t?void 0:t.element)||null,clientPoint:(null==t?void 0:t.clientPoint)||null,screenPoint:(null==t?void 0:t.screenPoint)||null,devicePoint:(null==t?void 0:t.devicePoint)||null}})},Nl.prototype._contains=function(o,r){return C(this,void 0,void 0,function(){var e,n,i;return T(this,function(t){switch(t.label){case 0:return[4,G(r)];case 1:for(e=t.sent(),n=0,i=e;n<i.length;n++)if(i[n]===o)return[2,!0];return[2,!1]}})})},Nl);function Nl(t,e,n,i,o){var r=kl.call(this)||this;return r.TARGET_ELEMENT_FOUND_EVENT="automation|target-element-found-event",r.WARNING_EVENT="automation|warning-event",r.element=t,r.options=e,r.automationSettings=new Ao(e.speed||1),r.window=n,r.cursor=i,r.nativeAutomationInput=o?new Ml(o):null,r._ensureWindowAndCursorForLegacyTests(r),r}var Bl,Fl=y.default.Promise,Ll=(x(Kl,Bl=Ol),Kl.prototype.run=function(t){var e=this,n=Fl.resolve();return this.element!==Dd.scrollingElement&&this.element!==Dd.documentElement&&(n=this._ensureElement(t,!0,!0)),n.then(function(){e.element.scrollLeft=e.scrollLeft,e.element.scrollTop=e.scrollTop})},Kl);function Kl(t,e,n){var i,o,r,s,l,a=e.x,u=e.y,c=e.position,f=e.byX,d=e.byY,h=Bl.call(this,t,n,Md,cl)||this;return c&&(o=t,r=c,s=Math.floor(o.scrollWidth/2-o.clientWidth/2),l=Math.floor(o.scrollHeight/2-o.clientHeight/2),a=(i={top:[s,0],right:[o.scrollWidth,l],bottom:[s,o.scrollHeight],left:[0,l],topRight:[o.scrollWidth,0],topLeft:[0,0],bottomRight:[o.scrollWidth,o.scrollHeight],bottomLeft:[0,o.scrollHeight],center:[s,l]}[r])[0],u=i[1]),h.scrollLeft="number"==typeof a?a:t.scrollLeft,h.scrollTop="number"==typeof u?u:t.scrollTop,f&&(h.scrollLeft+=f),d&&(h.scrollTop+=d),h}var Vl,Rl=(x(Yl,Vl=Ol),Yl.prototype.run=function(t){return this._ensureElement(t,!0,!0)},Yl);function Yl(t,e){return Vl.call(this,t,e,Md,cl)||this}var Wl=y.default.Promise,Xl=y.default.nativeMethods,Hl=y.default.utils.browser,ql=y.default.eventSandbox.focusBlur,Gl=E.default.contentEditable,jl=E.default.textSelection,zl=E.default.domUtils,$l=E.default.styleUtils,Ql=y.default.eventSandbox.message,Zl="automation|iframe|request",Jl="automation|iframe|response";function ta(t,e){var n,i,o=zl.isTextEditableElement(t),r=zl.isContentEditableElement(t);o||r?r&&isNaN(parseInt(e,10))?jl.setCursorToLastVisiblePosition(t):(n=isNaN(parseInt(e,10))?zl.getElementValue(t).length:e,jl.select(t,n,n)):(i=Gl.findContentEditableParent(t))&&jl.setCursorToLastVisiblePosition(Gl.findContentEditableParent(i))}function ea(v,g,y){var t=this;return new Wl(function(p){return C(t,void 0,void 0,function(){var n,i,o,r,s,l,a,u,c,f,d,h,m;return T(this,function(t){switch(t.label){case 0:return Ss(Md)?[4,Ps({cmd:Zl},Jl,Md.parent)]:[3,2];case 1:t.sent(),t.label=2;case 2:if(n=zl.getActiveElement(),i=zl.isTextEditableElement(v),o=zl.closest(v,"label[for]"),r=zl.isElementFocusable(v),s=!r&&o,l=zl.isContentEditableElement(v),a=l?Gl.findContentEditableParent(v):v,g&&Hl.isWebKit&&i&&jl.select(v,0,0),s)return g&&(e=o,zl.isElementFocusable(e)?ql.focus(e,E.default.noop,!1,!0):ia(e)),p(),[2];if(u=!g,c=!1,!r&&!l){if(f=zl.findDocument(a),d=Xl.documentActiveElementGetter.call(f),h=zl.isBodyElement(d),m=zl.isBodyElement(a)?a:zl.getFocusableParent(a),d&&!h&&zl.containsElement(d,a)||h&&zl.isBodyElement(m))return p(),[2];a=m||f.body,c=!0}return ql.focus(a,function(){!g||l||v===zl.getActiveElement()?(ta(v,y),g||zl.getActiveElement()===n?p():ql.focus(n,p,!0,!0)):p()},u,!0,!1,c),[2]}var e})})})}function na(t){var e=zl.closest(t,"label[for]"),n=e&&(e.control||Dd.getElementById(e.htmlFor));return n&&$l.isElementVisible(n)?n:null}function ia(t){var e=na(t);e&&zl.getActiveElement()!==e&&ql.focus(e,E.default.noop,!1,!0)}Ql.on(Ql.SERVICE_MSG_RECEIVED_EVENT,function(t){var e;t.message.cmd===Zl&&(e=zl.findIframeByWindow(t.source),ql.focus(e,function(){Ql.sendServiceMsg({cmd:Jl},t.source)},!1))});var oa=y.default.utils.browser,ra=y.default.eventSandbox.eventSimulator,sa=y.default.eventSandbox.listeners,la=y.default.nativeMethods,aa=E.default.domUtils,ua=E.default.styleUtils,ca=E.default.selectController,fa=o.default.selectElement,da=(ha.prototype.run=function(){this.eventState.clickElement&&ra.click(this.eventState.clickElement,this.eventArgs.options),aa.isElementFocusable(this.eventArgs.element)||ia(this.eventArgs.element)},ha);function ha(t,e){this.eventState=t,this.eventArgs=e}var ma,pa=(x(va,ma=da),va.prototype.run=function(){function t(t){n=la.eventTargetGetter.call(t)===e.input}var e=this,n=!1;sa.addInternalEventBeforeListener(Md,["focus"],t),ma.prototype.run.call(this),sa.removeInternalEventBeforeListener(Md,["focus"],t),aa.isElementFocusable(this.targetElement)&&!n&&this._ensureBoundElementFocusRaised()},va.prototype._ensureBoundElementFocusRaised=function(){ra.focus(this.input)},va);function va(t,e){var n=ma.call(this,t,e)||this;return n.targetElement=n.eventArgs.element,n.input=na(n.eventArgs.element),n}var ga,ya=(x(Ea,ga=da),Ea.prototype.run=function(){ga.prototype.run.call(this),this._toggleSelectOptionList()},Ea.prototype._toggleSelectOptionList=function(){var t=this.eventArgs.element;1===ua.getSelectElementSize(t)&&!1!==this.eventState.simulateDefaultBehavior&&(ca.isOptionListExpanded(t)?fa.collapseOptionList():fa.expandOptionList(t))},Ea);function Ea(t,e){return ga.call(this,t,e)||this}var ba,Sa=(x(_a,ba=da),_a.prototype.run=function(){return this.eventArgs.element},_a);function _a(t,e){return ba.call(this,t,e)||this}var wa,Pa=(x(xa,wa=pa),xa.prototype.run=function(){function t(){e=!0}var e=!1;sa.addInternalEventBeforeListener(Md,["change"],t),wa.prototype.run.call(this),sa.removeInternalEventBeforeListener(Md,["change"],t),!oa.isChrome||e||this.checkbox.disabled||this._isClickableElementInsideLabel(this.targetElement)||this._ensureCheckboxStateChanged()},xa.prototype._ensureCheckboxStateChanged=function(){this.checkbox.checked=!this.checkbox.checked,ra.change(this.checkbox)},xa.prototype._isClickableElementInsideLabel=function(t){var e=aa.isAnchorElement(t)&&t.getAttribute("href"),n=aa.isButtonElement(t);return e||n},xa);function xa(t,e){var n=wa.call(this,t,e)||this;return n.checkbox=n.input,n}var Aa=y.default.Promise,Ca=y.default.utils.browser,Ta=y.default.utils.featureDetection,Ma=y.default.eventSandbox.eventSimulator,Da=y.default.eventSandbox.listeners,Ua=E.default.domUtils,Ia=E.default.eventUtils,ka=E.default.arrayUtils,Oa=(Na.prototype.mousedown=function(t){var e=this;this.targetElementParentNodes=Ua.getParents(t.element),this.mouseDownElement=t.element,this._raiseTouchEvents(t);var n=Ua.getActiveElement();this.activeElementBeforeMouseDown=n;var i=Ca.isWebKit&&Ua.isSelectElement(this.mouseDownElement);return i&&this._bindMousedownHandler(),this._bindBlurHandler(n),this._isTouchEventWasCancelled()||(this.eventState.simulateDefaultBehavior=Ma.mousedown(t.element,t.options)),!1===this.eventState.simulateDefaultBehavior&&(this.eventState.simulateDefaultBehavior=i&&!this.eventState.mousedownPrevented),this._ensureActiveElementBlur(n).then(function(){return e._focus(t)})},Na.prototype.mouseup=function(t,e){var n,i,o,r,s;e.element=t,this.eventState.clickElement=(n=this.mouseDownElement,i=t,o=this.targetElementParentNodes,r=Ua.getParents(i),s=Ua.isTheSameNode(i,n),Ca.isFirefox?s?n:null:s?ka.equals(o,r)?n:null:n.contains(i)&&!Ua.isEditableFormElement(i)?n:i.contains(n)?i:ka.getCommonElement(r,o));var l={},a=function(t){l=t.timeStamp,Da.removeInternalEventBeforeListener(Md,["mouseup"],a)};return Da.addInternalEventBeforeListener(Md,["mouseup"],a),this._isTouchEventWasCancelled()||Ma.mouseup(t,e.options),e.options&&(e.options.timeStamp=l),this._click(e)},Na.prototype._click=function(u){return C(this,void 0,y.default.Promise,function(){var a;return T(this,function(t){var e,n,i,o,r,s,l;return e=this.eventState,i=na((n=u).element),o=aa.isSelectElement(n.element),r=aa.isOptionElement(n.element),s=aa.isLabelElement(n.element)&&i,l=i&&aa.isCheckboxElement(i),a=new(o?ya:r?Sa:l?Pa:s?pa:da)(e,n),this._isTouchEventWasCancelled()||a.run(),[2,u]})})},Na.prototype._isTouchEventWasCancelled=function(){return this.eventState.touchStartCancelled||this.eventState.touchEndCancelled},Na.prototype._bindMousedownHandler=function(){var e=this,n=function(t){e.eventState.mousedownPrevented=t.defaultPrevented,Ia.preventDefault(t),Ia.unbind(e.element,"mousedown",n)};Ia.bind(this.element,"mousedown",n)},Na.prototype._bindBlurHandler=function(t){var e=this,n=function(){e.eventState.blurRaised=!0,Ia.unbind(t,"blur",n,!0)};Ia.bind(t,"blur",n,!0)},Na.prototype._ensureActiveElementBlur=function(e){var n=this;return new Aa(function(t){Ua.getActiveElement()===e||n.eventState.blurRaised||Ma.blur(e),t()})},Na.prototype._focus=function(t){return!1===this.eventState.simulateDefaultBehavior?Aa.resolve():ea(Ua.isContentEditableElement(this.element)?this.element:t.element,!0,this.caretPos)},Na.prototype._raiseTouchEvents=function(t){Ta.isTouchDevice&&(this.eventState.touchStartCancelled=!Ma.touchstart(t.element,t.options),this.eventState.touchEndCancelled=!Ma.touchend(t.element,t.options))},Na);function Na(t,e){this.element=t,this.caretPos=e,this.targetElementParentNodes=[],this.activeElementBeforeMouseDown=null,this.mouseDownElement=null,this.eventState={mousedownPrevented:!1,blurRaised:!1,simulateDefaultBehavior:!0,clickElement:null,touchStartCancelled:!1,touchEndCancelled:!1}}var Ba,Fa=(x(La,Ba=Ol),La.prototype._mousedown=function(t){return this.canUseNativeAutomationEventSimulator(t.element)?this.nativeAutomationInput.mouseDown(t):this.strategy.mousedown(t)},La.prototype._mouseup=function(n,t){var i=this;return this.canUseNativeAutomationEventSimulator(t.element)?this.nativeAutomationInput.mouseUp(t).then(function(t){var e=i.options.caretPos;return"number"==typeof e&&ta(n,e),t}):this.strategy.mouseup(n,t)},La.prototype.run=function(t){var r,s=this;return this._ensureElement(t).then(function(t){var e=t.element,n=t.clientPoint,i=t.screenPoint,o=t.devicePoint;return r={point:n,screenPoint:i,element:e,options:m.utils.extend({clientX:null==n?void 0:n.x,clientY:null==n?void 0:n.y,screenX:null==o?void 0:o.x,screenY:null==o?void 0:o.y},s.modifiers)},m.Promise.all([Do(s.automationSettings.mouseActionStepDelay),s.cursor.leftButtonDown().then(function(){return s._mousedown(r)})])}).then(function(){return s.cursor.buttonUp()}).then(function(){return s._getElementForEvent(r)}).then(function(t){return t?s._mouseup(t,r):null})},La);function La(t,e,n,i,o){var r,s,l=Ba.call(this,t,e,n,i,o)||this;return l.modifiers=e.modifiers,l.strategy=(r=l.element,s=e.caretPos,new Oa(r,s)),l}function Ka(t,e,n){var i=function(t,e,n){if(e.y-t.y==0)return 0;var i=(e.x-t.x)/(e.y-t.y),o=t.y*(t.x-e.x)/(e.y-t.y)+t.x;return Math.round(i*n+o)}(t,e,n.top);return i&&i>=n.left&&i<=n.right?new M(i,n.top):null}function Va(t,e,n){var i=function(t,e,n){if(e.x===t.x)return 0;var i=(e.y-t.y)/(e.x-t.x),o=t.x*(t.y-e.y)/(e.x-t.x)+t.y;return Math.round(i*n+o)}(t,e,n.left);return i&&i>=n.top&&i<=n.bottom?new M(n.left,i):null}function Ra(t,e,n){for(var i=[],o=0,r=[{left:n.left,top:n.top,right:n.left,bottom:n.bottom,isHorizontal:!1},{left:n.right,top:n.top,right:n.right,bottom:n.bottom,isHorizontal:!1},{left:n.left,top:n.top,right:n.right,bottom:n.top,isHorizontal:!0},{left:n.left,top:n.bottom,right:n.right,bottom:n.bottom,isHorizontal:!0}];o<r.length;o++){var s=r[o],l=(s.isHorizontal?Ka:Va)(t,e,s);l&&i.push(l)}return i.length?1===i.length||i[0].distance(t)<i[1].distance(t)?i[0]:i[1]:null}var Ya=y.default.eventSandbox.eventSimulator,Wa=y.default.eventSandbox.message,Xa=E.default.positionUtils,Ha=E.default.domUtils,qa=E.default.styleUtils,Ga="automation|move|response";Wa.on(Wa.SERVICE_MSG_RECEIVED_EVENT,function(t){var e,n,i,o,r,s,l,a,u,c,f,d,h,m,p,v;"automation|move|request"===t.message.cmd&&(t.source.parent===Md?(e=Md["%testCafeDriverInstance%"],i=(n=t).message.nativeAutomationMove&&e.createDispatchNativeAutomationEventFunctions(),r=new M(n.message.endX,n.message.endY),s=n.source,l=Ha.findIframeByWindow(s),a=qa.getBordersWidth(l),u=qa.getElementPadding(l),c=Xa.getIframeClientCoordinates(l),f=Xa.getIframePointRelativeToParentFrame(r,s),d=cl.getPosition(),h=Xa.isInRectangle(d,c)?d:Ra(d,f,c),m={x:h.x-c.left,y:h.y-c.top},p=new Lr({modifiers:n.message.modifiers,offsetX:m.x+a.left+u.left,offsetY:m.y+a.top+u.top,speed:n.message.speed,skipScrolling:!0},!1),v={cmd:Ga,x:m.x,y:m.y},cl.getActiveWindow(Md)!==s?(o=null,i&&(o=new Ml(i)),el.create(l,p,Md,cl,o).then(function(t){return t.run()}).then(function(){cl.setActiveWindow(s),Wa.sendServiceMsg(v,s)})):Wa.sendServiceMsg(v,s)):(y.default.on(y.default.EVENTS.beforeUnload,function(){return Wa.sendServiceMsg({cmd:Ga},t.source)}),function(t){var e=t.source,n={left:t.message.left,right:t.message.right,top:t.message.top,bottom:t.message.bottom};if(!t.message.iframeUnderCursor){var i=t.message,o=i.startX,r=i.startY,s=o-n.left,l=r-n.top,a=ys();return a&&(Ya.mouseout(a,{clientX:s,clientY:l,relatedTarget:null}),Ya.mouseleave(a,{clientX:s,clientY:l,relatedTarget:null})),Wa.sendServiceMsg({cmd:Ga},e)}var u,c=cl.getPosition(),f=Ra(M.create(n).add(c),new M(t.message.endX,t.message.endY),n);f?(u=new Lr({modifiers:t.message.modifiers,offsetX:f.x-n.left,offsetY:f.y-n.top,speed:t.message.speed,skipScrolling:!0},!1),el.create(Dd.documentElement,u,Md,cl).then(function(t){return t.run()}).then(function(){var t={cmd:Ga,x:f.x,y:f.y};cl.setActiveWindow(e),Wa.sendServiceMsg(t,e)})):Wa.sendServiceMsg({cmd:Ga,x:n.left,y:n.top},e)}(t)))});var ja=y.default.Promise,za=y.default.utils.browser,$a=y.default.utils.featureDetection,Qa=y.default.eventSandbox.eventSimulator,Za=y.default.eventSandbox.focusBlur,Ja=y.default.nativeMethods,tu=E.default.domUtils,eu=E.default.styleUtils,nu=E.default.delay,iu=E.default.selectController,ou=o.default.selectElement,ru=$a.isTouchDevice?0:160,su=(lu.prototype._calculateEventArguments=function(){var t=this.optionListExpanded?iu.getEmulatedChildElement(this.element):this.element;return{options:this.modifiers,element:t}},lu.prototype._getMoveArguments=function(){var t,e,n=null,i=null,o=null;return o=this.optionListExpanded?(i=(t=Ft(n=iu.getEmulatedChildElement(this.element))).offsetX,t.offsetY):(n=Dd.documentElement,i=(e=ou.getSelectChildCenter(this.element)).x,e.y),{element:n,offsetX:i,offsetY:o,speed:this.speed}},lu.prototype._move=function(t){var e=this,n=t.element,i=t.offsetX,o=t.offsetY,r=t.speed,s=new Lr({offsetX:i,offsetY:o,speed:r,modifiers:this.modifiers},!1);return el.create(n,s,Md,cl).then(function(t){return t.run()}).then(function(){return nu(e.automationSettings.mouseActionStepDelay)})},lu.prototype._mousedown=function(){var t=this;return za.isFirefox?(Qa.mousedown(this.eventsArgs.element,this.eventsArgs.options),this.clickCausesChange&&(this.parentSelect.selectedIndex=this.childIndex),this._focus()):this._focus().then(function(){return nu(ru)}).then(function(){Qa.mousedown(t.eventsArgs.element,t.eventsArgs.options),t.clickCausesChange&&(t.parentSelect.selectedIndex=t.childIndex)})},lu.prototype._focus=function(){var e=this;return new ja(function(t){Za.focus(e.parentSelect,t,!1,!0)})},lu.prototype._mouseup=function(){Qa.mouseup(this.eventsArgs.element,this.eventsArgs.options);var t=za.isFirefox||za.isSafari||za.isChrome&&53<=za.version;return t&&this.clickCausesChange&&Qa.input(this.parentSelect),t&&this.clickCausesChange&&Qa.change(this.parentSelect),ja.resolve()},lu.prototype._click=function(){Qa.click(this.eventsArgs.element,this.eventsArgs.options)},lu.prototype.run=function(){var t=this;if(!this.parentSelect)return Qa.click(this.eventsArgs.element,this.eventsArgs.options),ja.resolve();this.optionListExpanded||ou.scrollOptionListByChild(this.element);var e=this._getMoveArguments();return this.eventsArgs=this._calculateEventArguments(),eu.getSelectElementSize(this.parentSelect)<=1?this._move(e).then(function(){return t._click()}):this._move(e).then(function(){return t._mousedown()}).then(function(){return t._mouseup()}).then(function(){return t._click()})},lu);function lu(t,e){var n,i,o,r,s;this.element=t,this.modifiers=e.modifiers,this.caretPos=e.caretPos,this.offsetX=e.offsetX,this.offsetY=e.offsetY,this.speed=e.speed,this.automationSettings=new Ao(e.speed),this.parentSelect=tu.getSelectParent(this.element),this.optionListExpanded=!!this.parentSelect&&iu.isOptionListExpanded(this.parentSelect),this.childIndex=null,this.clickCausesChange=!1,this.parentSelect&&(n=tu.isOptionElement(this.element),i=this.parentSelect.selectedIndex,this.childIndex=tu.getElementIndexInParent(this.parentSelect,this.element),o=Ja.nodeParentNodeGetter.call(this.element),r=tu.isOptionGroupElement(o)?o:null,s=this.element.disabled||r&&r.disabled,this.clickCausesChange=n&&!s&&this.childIndex!==i),this.eventsArgs={options:this.modifiers,element:this.element}}var au,uu=y.default.utils.featureDetection,cu=y.default.eventSandbox.eventSimulator,fu=E.default.delay,du=uu.isTouchDevice?0:160,hu=(x(mu,au=Ol),mu.prototype._firstClick=function(t){var e=this,n=new Nr(this.options);n.speed=1;var i=new Fa(this.element,n,Md,cl);return i.on(i.TARGET_ELEMENT_FOUND_EVENT,function(t){return e.emit(e.TARGET_ELEMENT_FOUND_EVENT,t)}),i.run(t).then(function(t){return fu(du).then(function(){return t})})},mu.prototype._secondClick=function(t){var e=this,n=new Nr({offsetX:t.screenPoint.x,offsetY:t.screenPoint.y,caretPos:this.caretPos,modifiers:this.modifiers,speed:1}),i=new Fa(Dd.documentElement,n,Md,cl);return i.run().then(function(t){return e.eventState.dblClickElement=i.strategy.eventState.clickElement,t})},mu.prototype._dblClick=function(t){this.eventState.dblClickElement&&cu.dblclick(this.eventState.dblClickElement,t.options)},mu.prototype.run=function(t){var e=this;return this._firstClick(t).then(function(t){return e._secondClick(t)}).then(function(t){return e._dblClick(t)})},mu);function mu(t,e){var n=au.call(this,t,e,Md,cl)||this;return n.modifiers=e.modifiers,n.caretPos=e.caretPos,n.speed=e.speed,n.automationSettings=new Ao(n.speed),n.offsetX=e.offsetX,n.offsetY=e.offsetY,n.eventArgs=null,n.eventState={dblClickElement:null},n}var pu,vu=function(){this.enabled=!1,this.dropAllowed=!1,this.element=null,this.dataTransfer=null,this.dataStore=null},gu=y.default.nativeMethods,yu=y.default.utils.featureDetection,Eu=y.default.utils.html,bu=y.default.utils.url,Su=y.default.eventSandbox.DataTransfer,_u=y.default.eventSandbox.DragDataStore,wu=E.default.eventUtils,Pu=E.default.domUtils,xu=(x(Au,pu=el),Au.create=function(o,r,s,l){return C(this,void 0,void 0,function(){var e,n,i;return T(this,function(t){switch(t.label){case 0:return[4,el.getTarget(o,s,new M(r.offsetX,r.offsetY))];case 1:return e=t.sent(),n=e.element,i=e.offset,[2,new Au(n,i,r,s,l)]}})})},Au.prototype._getCursorSpeed=function(){return this.automationSettings.draggingSpeed},Au.prototype._getEventSequenceOptions=function(t){var e=pu.prototype._getEventSequenceOptions.call(this,t),n=e.eventOptions,i=e.eventSequenceOptions;return n.dataTransfer=this.dragAndDropState.dataTransfer,n.buttons=wu.BUTTONS_PARAMETER.leftButton,i.holdLeftButton=!0,{eventOptions:n,eventSequenceOptions:i}},Au.prototype._getCorrectedTopElement=function(t){return this.touchMode?this.dragElement:t},Au.prototype._runEventSequence=function(t,e){var n=e.eventOptions,i=e.eventSequenceOptions,o=Js(this.dragAndDropState.enabled,this.firstMovingStepOccured,i).run(t,ys(),n,this.dragElement,this.dragAndDropState.dataStore),r=o.dragAndDropMode,s=o.dropAllowed;this.dragAndDropState.enabled=r,this.dragAndDropState.dropAllowed=s},Au.prototype._needMoveCursorImmediately=function(){return!1},Au.prototype.run=function(){var l=this;return Wt(this.cursor.getPosition()).then(function(t){l.dragElement=t;var e,n,i,o,r,s=function(t){for(var e=t;e;){if(e.draggable)return e;e=gu.nodeParentNodeGetter.call(e)}return null}(l.dragElement);return s&&yu.hasDataTransfer&&!l.skipDefaultDragBehavior&&(l.dragAndDropState.enabled=!0,l.dragElement=s,l.dragAndDropState.element=l.dragElement,l.dragAndDropState.dataStore=new _u,l.dragAndDropState.dataTransfer=new Su(l.dragAndDropState.dataStore),((e=Pu.isAnchorElement(l.dragElement))||Pu.isImgElement(l.dragElement))&&(n=e?"href":"src",o=(i=bu.parseProxyUrl(l.dragElement[n]))?i.destUrl:l.dragElement[n],r=Eu.cleanUpHtml(gu.elementOuterHTMLGetter.call(l.dragElement)),l.dragAndDropState.dataTransfer.setData("text/plain",o),l.dragAndDropState.dataTransfer.setData("text/uri-list",o),l.dragAndDropState.dataTransfer.setData("text/html",r))),pu.prototype.run.call(l).then(function(){return l.dragAndDropState})})},Au);function Au(t,e,n,i,o){var r=pu.call(this,t,e,n,i,o)||this;return r.dragElement=null,r.dragAndDropState=new vu,r}var Cu,Tu=y.default.Promise,Mu=y.default.utils.extend,Du=y.default.utils.featureDetection,Uu=y.default.eventSandbox.eventSimulator,Iu=y.default.eventSandbox.focusBlur,ku=(x(Ou,Cu=Ol),Ou.prototype._getEndPoint=function(){throw new Error("Not implemented")},Ou.prototype._mousedown=function(t){var e=this;return cl.leftButtonDown().then(function(){return e.simulateDefaultBehavior=Uu[e.downEvent](t.element,t.options),e._focus(t)})},Ou.prototype._focus=function(n){var i=this;return new Tu(function(t){var e=g.domUtils.isContentEditableElement(i.element)?g.contentEditable.findContentEditableParent(i.element):n.element;Iu.focus(e,t,!1,!0)})},Ou.prototype._getDestination=function(){throw new Error("Not implemented")},Ou.prototype._drag=function(){var r=this;return this._getDestination().then(function(t){var e=t.element,n=t.offsets,i=t.endPoint;r.endPoint=i;var o=new Lr({offsetX:n.offsetX,offsetY:n.offsetY,modifiers:r.modifiers,speed:r.speed,minMovingTime:25,skipDefaultDragBehavior:!1===r.simulateDefaultBehavior},!1);return xu.create(e,o,Md,cl)}).then(function(t){return t.run()}).then(function(t){return r.dragAndDropState=t,g.delay(r.automationSettings.mouseActionStepDelay)})},Ou.prototype._mouseup=function(o){var r=this;return cl.buttonUp().then(function(){var e=g.positionUtils.offsetToClientCoords(r.endPoint),n=null,i=Mu({clientX:e.x,clientY:e.y},r.modifiers);return Wt(e).then(function(t){return(n=t)?(r.dragAndDropState.enabled?(i.dataTransfer=r.dragAndDropState.dataTransfer,r.dragAndDropState.dropAllowed&&Uu.drop(n,i),Uu.dragend(r.dragAndDropState.element,i),r.dragAndDropState.dataStore.setProtectedMode()):Uu[r.upEvent](n,i),Wt(e)):n}).then(function(t){n&&t===n&&!r.dragAndDropState.enabled&&t===o&&Uu.click(n,i)})})},Ou.prototype.run=function(t){var i=this,o=null;return this._ensureElement(t).then(function(t){var e=t.element,n=t.clientPoint;return o={point:n,element:e,options:Mu({clientX:n.x,clientY:n.y},i.modifiers)},Tu.all([g.delay(i.automationSettings.mouseActionStepDelay),i._mousedown(o)])}).then(function(){return i._drag()}).then(function(){return i._mouseup(o.element)})},Ou);function Ou(t,e){var n=Cu.call(this,t,e,Md,cl)||this;return n.modifiers=e.modifiers,n.speed=e.speed,n.offsetX=e.offsetX,n.offsetY=e.offsetY,n.endPoint=null,n.simulateDefaultBehavior=!0,n.downEvent=Du.isTouchDevice?"touchstart":"mousedown",n.upEvent=Du.isTouchDevice?"touchend":"mouseup",n.dragAndDropState=null,n}var Nu,Bu=E.default.styleUtils,Fu=(x(Lu,Nu=ku),Lu.prototype._getDestination=function(){return C(this,void 0,void 0,function(){var e,n,i,o;return T(this,function(t){switch(t.label){case 0:return[4,Dt(this.element,{x:this.offsetX,y:this.offsetY})];case 1:return e=t.sent(),n=Bu.getWidth(Dd),i=Bu.getHeight(Dd),o={x:e.x+this.dragOffsetX,y:e.y+this.dragOffsetY},o={x:Math.min(Math.max(0,o.x),n),y:Math.min(Math.max(0,o.y),i)},[2,{element:Dd.documentElement,offsets:{offsetX:o.x,offsetY:o.y},endPoint:o}]}})})},Lu);function Lu(t,e,n,i){var o=Nu.call(this,t,i)||this;return o.dragOffsetX=e,o.dragOffsetY=n,o}var Ku,Vu=E.default.positionUtils,Ru=(x(Yu,Ku=ku),Yu.prototype._getDestination=function(){return C(this,void 0,void 0,function(){var e,n,i,o;return T(this,function(t){return e=this.destinationElement,n=Vu.getElementRectangle(e),i=Lt(e,this.destinationOffsetX,this.destinationOffsetY),o={x:n.left+i.offsetX,y:n.top+i.offsetY},[2,{element:e,offsets:i,endPoint:o}]})})},Yu);function Yu(t,e,n){var i=Ku.call(this,t,n)||this;return i.destinationElement=e,i.destinationOffsetX=n.destinationOffsetX,i.destinationOffsetY=n.destinationOffsetY,i}var Wu,Xu=(x(Hu,Wu=Ol),Hu.prototype.run=function(t){return this._ensureElement(t,!0)},Hu);function Hu(t,e,n){return Wu.call(this,t,e,Md,cl,n)||this}var qu=y.default.utils.browser,Gu=y.default.sandbox.event,ju=y.default.eventSandbox.eventSimulator,zu=y.default.eventSandbox.listeners,$u=y.default.nativeMethods,Qu=E.default.domUtils,Zu=E.default.contentEditable,Ju=E.default.textSelection,tc=/ /g;function ec(t){var e=Ju.getSelectionByElement(t),n=Ju.hasInverseSelectionContentEditable(t);return Ju.hasElementContainsSelection(t)?Zu.getSelection(t,e,n):{startPos:Zu.calculateNodeAndOffsetByPosition(t,0),endPos:Zu.calculateNodeAndOffsetByPosition(t,0)}}function nc(t){var e=t.startPos.node,n=t.startPos.offset,i=t.endPos.offset,o=Zu.getFirstNonWhitespaceSymbolIndex(e.nodeValue),r=Zu.getLastNonWhitespaceSymbolIndex(e.nodeValue);return n<o&&0!==n?(t.startPos.offset=o,t.endPos.offset=i+o-n):r<i&&i!==e.nodeValue.length&&(t.startPos.offset=e.nodeValue.length,t.endPos.offset=i+e.nodeValue.length-n),t}function ic(t,e,n){return!n||ju.beforeInput(t,e)}function oc(t,e){var n;function i(t){t.preventDefault(),n=!0}function o(t){"textInput"===t.type&&(n=!1)}qu.isSafari&&(zu.addInternalEventBeforeListener(Md,["textInput"],i),Gu.on(Gu.EVENT_PREVENTED_EVENT,o));var r=qu.isFirefox||ju.textInput(t,e)||n;return qu.isSafari&&(zu.removeInternalEventBeforeListener(Md,["textInput"],i),Gu.off(Gu.EVENT_PREVENTED_EVENT,o)),r}function rc(t,e){var n,i,o,r,s,l,a,u,c,f,d,h=ec(t),m=h.startPos.node,p=h.endPos.node,v=!0,g=!0,y=e;function E(){g=!1}e=e.replace(tc,String.fromCharCode(160)),m&&p&&Qu.isContentEditableElement(m)&&Qu.isContentEditableElement(p)&&(Qu.isTheSameNode(m,p)||(Ju.deleteSelectionContents(t),n=t,o=(i=h).startPos.node,r=$u.nodeParentNodeGetter.call(o)&&o.parentElement,!(qu.isChrome&&qu.version<58||qu.isSafari)&&r&&Qu.isElementContainsNode(n,o)||(i=ec(n),Ju.hasInverseSelectionContentEditable(n)&&(i={startPos:i.endPos,endPos:i.startPos})),i.endPos.offset=i.startPos.offset,m=(h=i).startPos.node),m&&Qu.isContentEditableElement(m)&&Qu.isRenderedNode(m)&&ic(t,e,qu.isChrome||qu.isFirefox)&&(v=oc(t,y),g=v,zu.addInternalEventBeforeListener(Md,["input"],E),(v=v&&ic(t,e,qu.isSafari))&&(Qu.isElementNode(m)?(s=m,l=e,c=Dd.createTextNode(l),f={node:c,offset:l.length},d=$u.nodeParentNodeGetter.call(s),"br"===Qu.getTagName(s)?d.insertBefore(c,s):0<a?(u=$u.nodeChildNodesGetter.call(s),s.insertBefore(c,u[a])):s.appendChild(c),Ju.selectByNodesAndOffsets(f,f)):function(t,e,n){var i=e.startPos.node;Qu.isElementContainsNode(t,i)||(i=(e=nc(ec(t))).startPos.node);var o=e.startPos.offset,r=e.endPos.offset,s=i.nodeValue,l={node:i,offset:o+n.length};i.nodeValue=s.substring(0,o)+n+s.substring(r,s.length),Ju.selectByNodesAndOffsets(l,l)}(t,nc(h),e)),Uo().then(function(){g&&ju.input(t,e),zu.removeInternalEventBeforeListener(Md,["input"],E)})))}function sc(t,e,n){var i,o,r,s,l,a,u,c,f,d,h,m,p;Qu.isContentEditableElement(t)&&rc(t,e),Qu.isElementReadOnly(t)||(Qu.isTextEditableElement(t)?(l=t,a=e,f=Qu.getElementValue(l),d=a.length,h=Ju.getSelectionStart(l),m=Ju.getSelectionEnd(l),p=Qu.isInputElement(l)&&"number"===l.type,ic(l,a,qu.isChrome||qu.isFirefox)&&oc(l,a)&&ic(l,a,qu.isSafari)&&((u=p?null:parseInt(l.maxLength,10))<0&&(u=null),c=f.substring(0,h)+a+f.substring(m,f.length),(null===u||isNaN(u)||c.length<=u)&&(p&&qu.isIOS&&"."===f[f.length-1]&&(h+=1),Qu.setElementValue(l,c),Ju.select(l,h+d,h+d)),ju.input(l,a))):Qu.isInputElement(t)&&(i=t,o=e,null!==(r=n)?(s=Qu.getElementValue(i),Qu.setElementValue(i,s.substr(0,r)+o+s.substr(r+o.length))):Qu.setElementValue(i,o),ju.change(i),ju.input(i,o)))}function lc(t){return 1===t.length&&("a"<=t&&t<="z"||"A"<=t&&t<="Z")}var ac=y.default.nativeMethods,uc=y.default.utils.browser,cc=y.default.eventSandbox.focusBlur,fc=y.default.Promise,dc=g.domUtils.isRadioButtonElement,hc=g.domUtils.getActiveElement,mc=g.domUtils.getTabIndexAttributeIntValue;function pc(t){return t===t.toLowerCase()?t.toUpperCase():t.toLowerCase()}function vc(t){for(var e=t.slice(),n=0;n<t.length;n++){var i=t[n];if("shift"===i.toLowerCase()){var o=t[n+1];if(!o)continue;g.KEY_MAPS.shiftMap[o]?t[n+1]=g.KEY_MAPS.shiftMap[o]:g.KEY_MAPS.reversedShiftMap[o]&&(e[n+1]=g.KEY_MAPS.reversedShiftMap[o])}!g.KEY_MAPS.shiftMap[i]||t[n-1]&&"shift"===t[n-1].toLowerCase()||(t[n]=g.KEY_MAPS.shiftMap[i],t.splice(n,0,"shift"),e.splice(n,0,"shift"),n++)}return{actualKeys:t,eventKeyProperties:e}}function gc(t){var e=hc(t||Dd),n=null;if(e&&g.domUtils.isIframeElement(e)&&ac.contentDocumentGetter.call(e))try{n=gc(ac.contentDocumentGetter.call(e))}catch(t){}return n||e}function yc(t,e,n){if(!dc(e))return t;if(!n&&!e.name&&!uc.isChrome)return[e];var i,o,r=(i=e,o=null,n?""===i.name||uc.isFirefox||(o=function(t){return!t.name||t===i||t.name!==i.name}):""!==i.name?o=function(t){return dc(t)&&t.name===i.name}:uc.isChrome&&(o=function(t){return dc(t)&&!t.name}),o);return r&&(t=g.arrayUtils.filter(t,r)),t}function Ec(t,e,n){var i,o,r,s,l,a,u,c,f=e?-1:1,d=g.domUtils.getTopSameDomainWindow(Md).document,h=(i=d,o=ac.documentActiveElementGetter.call(i),r=o&&mc(o),!(o&&r<0)),m=yc(m=g.domUtils.getFocusableElements(d,h),t,n),p=dc(t),v=g.arrayUtils.indexOf(m,t);return(e?0===v:v===m.length-1)?!e&&t.tabIndex<0?g.arrayUtils.find(m,function(t){return 0===t.tabIndex}):n||!p?Dd.body:m[m.length-1-v]:e&&-1===v?m[m.length-1]:(l=(s=m)[v+f],a=n,u=dc(l)&&l.name&&!l.checked,c=null,a&&u&&(c=g.arrayUtils.find(s,function(t){return dc(t)&&t.name===l.name&&t.checked})),c||l)}function bc(t,e,n){var i={};return"keyIdentifier"in KeyboardEvent.prototype&&(i.keyIdentifier=t?"":n),"key"in KeyboardEvent.prototype&&(i.key=e),i}var Sc={SPECIAL_KEYS:{capslock:"CapsLock",delete:"U+007F",end:"End",enter:"Enter",esc:"U+001B",home:"Home",ins:"Insert",pagedown:"PageDown",pageup:"PageUp",space:"U+0020",tab:"Tab",alt:"Alt",ctrl:"Control",meta:"Meta",shift:"Shift"},LETTERS:{a:"U+0041",b:"U+0042",c:"U+0043",d:"U+0044",e:"U+0045",f:"U+0046",g:"U+0047",h:"U+0048",i:"U+0049",j:"U+004A",k:"U+004B",l:"U+004C",m:"U+004D",n:"U+004E",o:"U+004F",p:"U+0050",q:"U+0051",r:"U+0052",s:"U+0053",t:"U+0054",u:"U+0055",v:"U+0056",w:"U+0057",x:"U+0058",y:"U+0059",z:"U+005A"},SYMBOLS:{0:"U+0030",1:"U+0031",2:"U+0032",3:"U+0033",4:"U+0034",5:"U+0035",6:"U+0036",7:"U+0037",8:"U+0038",9:"U+0039"," ":"U+0020","!":"U+0021","@":"U+0040","#":"U+0023",$:"U+0024","%":"U+0025","^":"U+005E","*":"U+002A","(":"U+0028",")":"U+0029",_:"U+005F","|":"U+007C","\\":"U+005C","/":"U+002F","?":"U+003F",".":"U+002E",",":"U+002C","<":"U+003C",">":"U+003E","[":"U+005B","]":"U+005D","{":"U+007B","}":"U+007D","§":"U+00A7","±":"U+00B1","'":"U+0027",'"':"U+0022",":":"U+003A",";":"U+003B","`":"U+0060","~":"U+007E"}};function _c(t){return lc(t)?Sc.LETTERS[t.toLowerCase()]:Sc.SYMBOLS[t]||Sc.SPECIAL_KEYS[t]||t}function wc(t){if(lc(t))return t.toUpperCase().charCodeAt(0);var e=g.KEY_MAPS.shiftMap[t]?g.KEY_MAPS.shiftMap[t].charCodeAt(0):t.charCodeAt(0);return g.KEY_MAPS.symbolCharCodeToKeyCode[e]||e}function Pc(t,e){var n,i=g.getSanitizedKey(t),o=1===t.length||"space"===t,r=(n=t,-1<g.KEY_MAPS.newLineKeys.indexOf(n)),s=g.KEY_MAPS.modifiers[i],l=g.KEY_MAPS.specialKeys[i];return e=e||t,{sanitizedKey:i,isChar:o,modifierKeyCode:s,specialKeyCode:l,isNewLine:r,isLetter:lc(t),keyIdentifierProperty:_c(e),keyProperty:g.KEY_MAPS.keyProperty[e]||e,keyCode:function(t,e,n,i,o){var r=null;return e&&"space"!==t?r=wc(n):i?r=i:o&&(r=o),r}(t,o,i,s,l)}}var xc=y.default.utils.browser,Ac=y.default.utils.extend,Cc=y.default.eventSandbox.eventSimulator,Tc=(Mc._isKeyActivatedInputElement=function(t){return g.domUtils.isInputElement(t)&&/button|submit|reset|radio|checkbox/.test(t.type)},Mc.prototype._type=function(t,e){var n,i=t!==this.storedActiveElement,o=!i,r=t,s=g.domUtils.isEditableElement(t),l=g.domUtils.isEditableElement(this.storedActiveElement);i&&(n=g.domUtils.isElementInIframe(t)===g.domUtils.isElementInIframe(this.storedActiveElement)||l,o=(!xc.isFirefox||l)&&(!xc.isWebKit||n)),o&&(i&&l&&s&&(r=this.storedActiveElement),sc(r,e))},Mc.prototype._addKeyPropertyToEventOptions=function(t){return Ac(t,bc("keypress"===t.type,this.keyProperty,this.keyIdentifierProperty)),t},Mc.prototype.down=function(t){this.storedActiveElement=gc(this.topSameDomainDocument),this.modifierKeyCode&&(t[this.sanitizedKey]=!0),t.shift&&this.isLetter&&(this.keyProperty=pc(this.keyProperty));var e={keyCode:this.keyCode,type:"keydown"};return this._addKeyPropertyToEventOptions(e),Cc.keydown(this.storedActiveElement,Ac(e,t))},Mc.prototype.press=function(t){if(!this.isChar&&!this.specialKeyCode)return!0;var e=gc(this.topSameDomainDocument),n=this.isChar?function(t,e){if("space"===t)return" ";if(e){if(lc(t))return pc(t);if(g.KEY_MAPS.reversedShiftMap[t])return g.KEY_MAPS.reversedShiftMap[t]}return t}(this.sanitizedKey,t.shift):null,i=this.specialKeyCode||n.charCodeAt(0),o=e!==this.storedActiveElement;if(xc.isWebKit&&o&&g.domUtils.isElementInIframe(e)!==g.domUtils.isElementInIframe(this.storedActiveElement))return!0;this.storedActiveElement=e;var r={keyCode:i,charCode:i,type:"keypress"};this._addKeyPropertyToEventOptions(r);var s=xc.isAndroid||Cc.keypress(e,Ac(r,t));if(!s)return s;e=gc(this.topSameDomainDocument),!n||t.ctrl||t.alt||this._type(e,n);var l=Mc._isKeyActivatedInputElement(e),a=g.domUtils.isButtonElement(e);return xc.isSafari&&0<=xc.compareVersions([xc.webkitVersion,"603.1.30"])||!l&&!a||"enter"!==this.sanitizedKey||e.click(),s},Mc.prototype.up=function(t){this.modifierKeyCode&&(t[this.sanitizedKey]=!1);var e={keyCode:this.keyCode,type:"keyup"};this._addKeyPropertyToEventOptions(e);var n=Cc.keyup(gc(this.topSameDomainDocument),Ac(e,t)),i=gc(this.topSameDomainDocument);return!xc.isSafari&&(!xc.isChrome||53<=xc.version)&&n&&"space"===this.sanitizedKey&&Mc._isKeyActivatedInputElement(i)&&i.click(),n},Object.defineProperty(Mc.prototype,"key",{get:function(){return this.sanitizedKey},enumerable:!1,configurable:!0}),Mc);function Mc(t,e){var n=Pc(t,e);Ac(this,n),this.topSameDomainDocument=g.domUtils.getTopSameDomainWindow(Md).document,this.storedActiveElement=null}var Dc,Uc={ctrlA:"ctrl+a",backspace:"backspace",delete:"delete",left:"left",right:"right",up:"up",down:"down",shiftLeft:"shift+left",shiftRight:"shift+right",shiftUp:"shift+up",shiftDown:"shift+down",shiftHome:"shift+home",shiftEnd:"shift+end",home:"home",end:"end",enter:"enter",tab:"tab",shiftTab:"shift+tab",esc:"esc"},Ic=y.default.Promise,kc=y.default.utils.browser,Oc=y.default.eventSandbox.eventSimulator,Nc=y.default.eventSandbox.elementEditingWatcher,Bc=E.default.textSelection,Fc=E.default.eventUtils,Lc=E.default.domUtils,Kc=o.default.selectElement,Vc=null,Rc=null;function Yc(){Rc=Vc=null,Fc.unbind(this,"blur",Yc,!0)}function Wc(t){var e,n,i,o;Lc.isTextAreaElement(t)&&(Vc!==t&&(Fc.bind(t,"blur",Yc,!0),Vc=t),e=t,n=Bc.hasInverseSelection(e),i=Lc.getTextAreaValue(e),o=n?Bc.getSelectionStart(e):Bc.getSelectionEnd(e),Rc=i&&o?Lc.getTextareaIndentInLine(e,o):0)}function Xc(t,e){var n,i,o,r,s,l,a=Lc.getTextAreaValue(t);a&&(n=Bc.getSelectionStart(t),i=Bc.getSelectionEnd(t),o=Bc.hasInverseSelection(t),s=(r=a.substring(0,o?n:i)).lastIndexOf("\n"),l=r.substring(0,s),null!==Rc&&Vc===t||Wc(t),s=l.lastIndexOf("\n"),qc(t,n,i,o,Math.min(s+1+Rc,l.length),e))}function Hc(t,e){var n,i,o,r,s,l,a,u,c,f,d=Lc.getTextAreaValue(t);d&&(n=Bc.getSelectionStart(t),i=Bc.getSelectionEnd(t),u=(r=(o=Bc.hasInverseSelection(t))?n:i)+(l=-1===(c=(s=d.substring(r)).indexOf("\n"))?s.length:c+1),f=-1===(c=(a=s.substring(l)).indexOf("\n"))?a.length:c,null!==Rc&&Vc===t||Wc(t),qc(t,n,i,o,u=Math.min(u+Rc,u+f),e))}function qc(t,e,n,i,o,r){var s=null,l=null,l=r?(s=e!==n&&i?n:e,o):s=o;Bc.select(t,s,l)}function Gc(t,e,n){Lc.isInputElement(t)&&"number"===t.type&&("-"===e.charAt(0)&&"."===e.charAt(1)&&(e=e.substring(1)),"."===e.charAt(e.length-1)&&(e=e.substring(0,e.length-1))),Lc.setElementValue(t,e),Bc.select(t,n,n),Oc.input(t)}function jc(t,e){var n,i,o,r,s,l,a,u;return Lc.isTextEditableElement(t)&&(n=Bc.getSelectionStart(t),i=Bc.getSelectionEnd(t),o=Bc.hasInverseSelection(t),s=null,s=(r=!Lc.isTextAreaElement(t)||Lc.getTextareaLineNumberByPosition(t,n)===Lc.getTextareaLineNumberByPosition(t,i))?o?i:n:o?n:i,a=-1===(l=Lc.getElementValue(t).substring(0,s).lastIndexOf("\n"))?0:l+1,u=null,r?(u=e?s:a,Bc.select(t,u,a)):o?Bc.select(t,i,a):Bc.select(t,n,a)),Ic.resolve()}function zc(t,e){var n,i,o,r,s,l,a,u,c;return Lc.isTextEditableElement(t)&&(n=Bc.getSelectionStart(t),i=Bc.getSelectionEnd(t),o=Bc.hasInverseSelection(t),s=null,u=s=(r=!Lc.isTextAreaElement(t)||Lc.getTextareaLineNumberByPosition(t,n)===Lc.getTextareaLineNumberByPosition(t,i))?o?i:n:o?n:i,c=null,u+=-1===(a=(l=Lc.getElementValue(t).substring(s)).indexOf("\n"))?l.length:a,r?(c=e?s:u,Bc.select(t,c,u)):o?Bc.select(t,i,u):Bc.select(t,n,u)),Ic.resolve()}function $c(t){return jc(t,!0)}function Qc(t){return zc(t,!0)}function Zc(t){return Lc.isRadioButtonElement(t)}function Jc(t,e){return tf(t,e,!1).then(function(t){t&&(t.checked=!0)})}function tf(t,e,n){return void 0===n&&(n=!0),t?(Lc.isSelectElement(t)&&Kc.collapseOptionList(),i=t,o=e,r=n,new fc(function(t){var e=Ec(i,o,r);e?cc.focus(e,function(){return t(e)}):t()}).then(function(t){return t&&Lc.isTextEditableInput(t)&&Bc.select(t),t})):Ic.resolve();var i,o,r}var ef,nf=((Dc={})[Uc.ctrlA]=function(t){return Lc.isEditableElement(t)&&Bc.select(t),Ic.resolve()},Dc[Uc.backspace]=function(t){var e,n,i;return Lc.isTextEditableElementAndEditingAllowed(t)&&(e=Bc.getSelectionStart(t),n=Bc.getSelectionEnd(t),i=Lc.getElementValue(t).replace(/\r\n/g,"\n"),n===e?0<e&&Gc(t,i.substring(0,e-1)+i.substring(n,i.length),e-1):Gc(t,i.substring(0,e)+i.substring(n,i.length),e)),Lc.isContentEditableElement(t)&&Bc.deleteSelectionContents(t),Ic.resolve()},Dc[Uc.delete]=function(t){var e,n,i;return Lc.isTextEditableElementAndEditingAllowed(t)&&(e=Bc.getSelectionStart(t),n=Bc.getSelectionEnd(t),i=Lc.getElementValue(t).replace(/\r\n/g,"\n"),n===e?e<i.length&&Gc(t,i.substring(0,e)+i.substring(n+1,i.length),e):Gc(t,i.substring(0,e)+i.substring(n,i.length),e)),Lc.isContentEditableElement(t)&&Bc.deleteSelectionContents(t),Ic.resolve()},Dc[Uc.left]=function(t){var e,n,i,o,r=null;return Lc.isSelectElement(t)&&Kc.switchOptionsByKeys(t,"left"),Zc(t)?Jc(t,!0):(Lc.isTextEditableElement(t)&&(e=(r=Bc.getSelectionStart(t)||0)===Bc.getSelectionEnd(t)?r-1:r,Bc.select(t,e,e),Wc(t)),Lc.isContentEditableElement(t)&&(r=Bc.getSelectionStart(t))!==Bc.getSelectionEnd(t)&&(n=Bc.getSelectionByElement(t),o={node:(i=Bc.hasInverseSelectionContentEditable(t))?n.focusNode:n.anchorNode,offset:i?n.focusOffset:n.anchorOffset},Bc.selectByNodesAndOffsets(o,o,!0)),Ic.resolve())},Dc[Uc.right]=function(t){var e,n,i,o,r=null,s=null;return Lc.isSelectElement(t)&&Kc.switchOptionsByKeys(t,"right"),Zc(t)?Jc(t,!1):(Lc.isTextEditableElement(t)&&(e=(r=Bc.getSelectionStart(t))===(s=Bc.getSelectionEnd(t))?s+1:s,r===Lc.getElementValue(t).length&&(e=r),Bc.select(t,e,e),Wc(t)),Lc.isContentEditableElement(t)&&(r=Bc.getSelectionStart(t))!==(s=Bc.getSelectionEnd(t))&&(n=Bc.getSelectionByElement(t),o={node:(i=Bc.hasInverseSelectionContentEditable(t))?n.anchorNode:n.focusNode,offset:i?n.anchorOffset:n.focusOffset},Bc.selectByNodesAndOffsets(o,o,!0)),Ic.resolve())},Dc[Uc.up]=function(t){return Lc.isSelectElement(t)&&Kc.switchOptionsByKeys(t,"up"),Zc(t)?Jc(t,!0):kc.isWebKit&&Lc.isInputElement(t)?jc(t):(Lc.isTextAreaElement(t)&&Xc(t,!1),Ic.resolve())},Dc[Uc.down]=function(t){return Lc.isSelectElement(t)&&Kc.switchOptionsByKeys(t,"down"),Zc(t)?Jc(t,!1):kc.isWebKit&&Lc.isInputElement(t)?zc(t):(Lc.isTextAreaElement(t)&&Hc(t,!1),Ic.resolve())},Dc[Uc.shiftLeft]=function(t){var e,n;return Lc.isTextEditableElement(t)&&((e=Bc.getSelectionStart(t))===(n=Bc.getSelectionEnd(t))||Bc.hasInverseSelection(t)?Bc.select(t,n,Math.max(e-1,0)):Bc.select(t,e,Math.max(n-1,0)),Wc(t)),Ic.resolve()},Dc[Uc.shiftRight]=function(t){var e,n,i;return Lc.isTextEditableElement(t)&&(e=Bc.getSelectionStart(t),n=Bc.getSelectionEnd(t),i=Lc.getElementValue(t).length,e!==n&&Bc.hasInverseSelection(t)?Bc.select(t,n,Math.min(e+1,i)):Bc.select(t,e,Math.min(n+1,i)),Wc(t)),Ic.resolve()},Dc[Uc.shiftUp]=function(t){return kc.isWebKit&&Lc.isInputElement(t)?$c(t):(Lc.isTextAreaElement(t)&&Xc(t,!0),Ic.resolve())},Dc[Uc.shiftDown]=function(t){return kc.isWebKit&&Lc.isInputElement(t)?Qc(t):(Lc.isTextAreaElement(t)&&Hc(t,!0),Ic.resolve())},Dc[Uc.shiftHome]=$c,Dc[Uc.shiftEnd]=Qc,Dc[Uc.home]=jc,Dc[Uc.end]=zc,Dc[Uc.enter]=function(t){var e,n,i,o,r,s;return Lc.isSelectElement(t)&&Kc.collapseOptionList(),Lc.isInputElement(t)?(Nc.processElementChanging(t),(e=Lc.getParents(t,"form")[0])&&function(t,e){var n=t.querySelectorAll("input, button"),i=null,o=null;for(o=0;o<n.length;o++)if(!i&&"submit"===n[o].type&&!n[o].disabled){i=n[o];break}if(i)Oc.click(i);else if(Lc.blocksImplicitSubmission(e)){for(var r=t.getElementsByTagName("input"),s=[],o=0;o<r.length;o++)Lc.blocksImplicitSubmission(r[o])&&s.push(r[o]);1===s.length&&s[0]===e&&e.validity.valid&&Oc.submit(t)&&t.submit()}}(e,t)):Lc.isTextAreaElement(t)?(n=Bc.getSelectionStart(t),o=(i=Lc.getTextAreaValue(t)).substring(0,n),r=i.substring(n),s=n+1,Gc(t,o+String.fromCharCode(10)+r,s)):t.tagName&&Lc.isAnchorElement(t)&&Oc.click(t),Ic.resolve()},Dc[Uc.tab]=function(t){return tf(t,!1)},Dc[Uc.shiftTab]=function(t){return tf(t,!0)},Dc[Uc.esc]=function(t){return Lc.isSelectElement(t)&&Kc.collapseOptionList(),Ic.resolve()},Dc),of=((ef={})[Uc.ctrlA]="selectAll",ef);function rf(r){var t=vc(g.getKeyArray(r)),e=t.actualKeys,s=t.eventKeyProperties;return g.arrayUtils.map(e,function(t,e){var n,i,o=(n=e,i=r.toLowerCase(),1===n&&of[i]?[of[i]]:[]);return m.utils.extend({key:t,commands:o},Pc(t,s[e]))})}function sf(t){var e,n;e=t.modifiers,n=m.utils.extend({},pl),e&&(e&ll.ctrl&&(n.ctrl=!0),e&ll.alt&&(n.alt=!0),e&ll.shift&&(n.shift=!0),e&ll.meta&&(n.meta=!0)),n.shift&&t.isLetter&&(t.keyProperty=pc(t.keyProperty),t.keyCode=wc(t.keyProperty))}var lf=y.default.Promise,af=y.default.eventSandbox.message,uf=y.default.nativeMethods,cf="automation|press|request",ff="automation|press|response";af.on(af.SERVICE_MSG_RECEIVED_EVENT,function(t){t.message.cmd===cf&&(y.default.on(y.default.EVENTS.beforeUnload,function(){return af.sendServiceMsg({cmd:ff},t.source)}),new df(t.message.keyCombinations,t.message.options).run().then(function(){return af.sendServiceMsg({cmd:ff},t.source)}))});var df=(hf._getKeyPressSimulators=function(t){var e=vc(g.getKeyArray(t)),n=e.actualKeys,i=e.eventKeyProperties;return g.arrayUtils.map(n,function(t,e){return new Tc(t,i[e])})},hf._getShortcuts=function(t){for(var e=g.getKeyArray(t.toLowerCase()),n=[],i=[],o=[],r=0;r<e.length;r++)for(i.push(e[r]),o=i.slice();o.length;){var s=o.join("+");nf[s]?(n.push(s),i=o=[]):o.shift()}return n},hf._getShortcutHandlers=function(t){for(var e,n,i,o=hf._getShortcuts(t.toLowerCase()),r={},s="",l=0;l<o.length;l++)e=o[l],n=t.indexOf(e),i=e.length,r[s+=t.substring(0,n+i)]=nf[e],t=t.substring(n+i);return r},hf.prototype._down=function(t){this.pressedKeyString+=(this.pressedKeyString?"+":"")+t.key;var e=!t.down(this.modifiersState);return lf.resolve(e)},hf.prototype._press=function(t,e){var n=this;if(e&&!this.isSelectElement)return g.delay(this.automationSettings.keyActionStepDelay);var i=this.shortcutHandlers[this.pressedKeyString],o=!1;return i&&"enter"!==t.key||(o=!t.press(this.modifiersState)),o&&!this.isSelectElement||!i?g.delay(this.automationSettings.keyActionStepDelay):i(gc(this.topSameDomainDocument)).then(function(){return g.delay(n.automationSettings.keyActionStepDelay)})},hf.prototype._up=function(t){return t.up(this.modifiersState),g.delay(this.automationSettings.keyActionStepDelay)},hf.prototype._runCombination=function(t){var n=this;this.modifiersState={ctrl:!1,alt:!1,shift:!1,meta:!1},this.isSelectElement=g.domUtils.isSelectElement(gc(this.topSameDomainDocument)),this.pressedKeyString="",this.shortcutHandlers=hf._getShortcutHandlers(t);var e=hf._getKeyPressSimulators(t);return g.promiseUtils.each(e,function(e){return n._down(e).then(function(t){return n._press(e,t)})}).then(function(){return g.arrayUtils.reverse(e),g.promiseUtils.each(e,function(t){return n._up(t)})})},hf.prototype._calculateCDPEventSequence=function(){for(var t=[],e=0,n=this.keyCombinations;e<n.length;e++){for(var i=rf(n[e]),o=0,r=0,s=i;r<s.length;r++)o|=gl((l=s[r]).key),l.modifiers=o,sf(l),t.push(Al.keyDown(l),Al.delay(this.automationSettings.keyActionStepDelay));for(var l,a=i.length-1;0<=a;a--)o&=~gl((l=i[a]).key),l.modifiers=o,t.push(Al.keyUp(l))}return t},hf.prototype.run=function(){var e=this,t=g.domUtils.getActiveElement(),n=g.domUtils.isIframeElement(t);if(!Ss(Md)&&n&&uf.contentWindowGetter.call(t)){var i={cmd:cf,keyCombinations:this.keyCombinations,options:this.options};return g.sendRequestToFrame(i,ff,uf.contentWindowGetter.call(t))}if(this.nativeAutomationInput){var o=this._calculateCDPEventSequence();return this.nativeAutomationInput.executeEventSequence(o)}return g.promiseUtils.each(this.keyCombinations,function(t){return e._runCombination(t).then(function(){return g.delay(e.automationSettings.keyActionStepDelay)})})},hf);function hf(t,e,n){this.keyCombinations=t,this.isSelectElement=!1,this.pressedKeyString="",this.modifiersState=null,this.shortcutHandlers=null,this.topSameDomainDocument=g.domUtils.getTopSameDomainWindow(Md).document,this.automationSettings=new Ao(e.speed),this.options=e,this.nativeAutomationInput=n?new Ml(n):null}var mf,pf=y.default.Promise,vf=y.default.utils.extend,gf=y.default.eventSandbox.eventSimulator,yf=E.default.domUtils,Ef=E.default.eventUtils,bf=E.default.delay,Sf=(x(_f,mf=Ol),_f.prototype._mousedown=function(t){var e=this;return cl.rightButtonDown().then(function(){return e.eventState.activeElementBeforeMouseDown=yf.getActiveElement(),e.eventState.simulateDefaultBehavior=gf.mousedown(t.element,t.options),e._focus(t)})},_f.prototype._focus=function(t){return!1===this.simulateDefaultBehavior?Uo():ea(yf.isContentEditableElement(this.element)?this.element:t.element,!0,this.caretPos).then(Uo)},_f.prototype._mouseup=function(e){var t=this;return cl.buttonUp().then(function(){return t._getElementForEvent(e)}).then(function(t){return gf.mouseup(t,e.options)})},_f.prototype._contextmenu=function(e){return this._getElementForEvent(e).then(function(t){gf.contextmenu(t,e.options),yf.isElementFocusable(t)||ia(t)})},_f.prototype.run=function(t){var o=this,r=null;return this._ensureElement(t).then(function(t){var e=t.element,n=t.clientPoint,i=t.devicePoint;return r={point:n,element:e,options:vf({clientX:n.x,clientY:n.y,screenX:i.x,screenY:i.y,button:Ef.BUTTON.right},o.modifiers)},pf.all([bf(o.automationSettings.mouseActionStepDelay),o._mousedown(r)])}).then(function(){return o._mouseup(r)}).then(function(){return o._contextmenu(r)})},_f);function _f(t,e){var n=mf.call(this,t,e,Md,cl)||this;return n.modifiers=e.modifiers,n.caretPos=e.caretPos,n.eventState={simulateDefaultBehavior:!0,activeElementBeforeMouseDown:null},n}var wf=y.default.utils.browser,Pf=E.default.domUtils,xf=E.default.positionUtils,Af=E.default.styleUtils,Cf=E.default.contentEditable,Tf=E.default.arrayUtils,Mf=["direction","font-family","font-size","font-size-adjust","font-variant","font-weight","font-style","letter-spacing","line-height","text-align","text-indent","text-transform","word-wrap","word-spacing","padding-top","padding-left","padding-right","padding-bottom","margin-top","margin-left","margin-right","margin-bottom","border-top-width","border-left-width","border-right-width","border-bottom-width"];function Df(t,e){var n,i,o,r,s,l=Af.getBordersWidth(t),a=xf.getOffsetPosition(t),u=t.scrollHeight||t.getBoundingClientRect().height,c=Math.ceil(e.left),f=Math.ceil(e.top),d=Math.floor(e.bottom);return Pf.isTextAreaElement(t)||(i=(n=xf.offsetToClientCoords({x:a.left,y:a.top})).x+l.left+1,o=n.y+l.top+1,r=n.y+l.top+l.bottom+u,s=n.y+l.top+u-1,c=Math.ceil(c<=n.x?i:e.left),f=Math.ceil(f<=n.y?o:e.top),d=Math.floor(r<=d?s:e.bottom)),{left:c,top:f,bottom:d}}function Uf(t){var e=Af.getElementScroll(Dd);return{left:t.left+e.left,top:t.top+e.top,bottom:t.bottom+e.top}}function If(t,e){var n=t.getBoundingClientRect(),i=function(e){var t,n,i,o=Dd.body,r=xf.getOffsetPosition(e),s=Af.getElementMargin(e),l=r.top-s.top,a=r.left-s.left,u=Dd.createElement("div"),c="white-space:pre-wrap;border-style:solid;";return"absolute"===Af.get(o,"position")&&(t=Af.getElementMargin(o),n=Af.get(o,"left"),i=Af.get(o,"top"),a-=t.left+(parseInt(n.replace("px",""),10)||0),l-=t.top+(parseInt(i.replace("px",""),10)||0)),Tf.forEach(Mf,function(t){c+="".concat(t,":").concat(Af.get(e,t),";")}),Af.set(u,{cssText:c,position:"absolute",left:a+"px",top:l+"px",width:e.scrollWidth+"px",height:e.scrollHeight+"px"}),y.default.nativeMethods.nodeTextContentSetter.call(u,Pf.getElementValue(e)+" "),o.appendChild(u),u}(t),o=null,r=t.getBoundingClientRect(),s=r.top-n.top,l=r.left-n.left,a=Pf.getElementValue(t).length;try{var u=Dd.createRange();u.setStart(y.default.nativeMethods.nodeFirstChildGetter.call(i),Math.min(e,a)),u.setEnd(y.default.nativeMethods.nodeFirstChildGetter.call(i),Math.min(e+1,a+1)),Pf.isTextAreaElement(t)&&(0!==(o=u.getBoundingClientRect()).width||0!==o.height)||(o=u.getClientRects()[0])}catch(t){o=null}return Pf.remove(i),o?{width:o.width,height:o.height,top:o.top-s,bottom:o.bottom-s,left:o.left-l,right:o.right-l}:null}function kf(t,e){var n,i,o,r,s,l,a=null;return(a=Pf.isContentEditableElement(t)?(o=t,r=e,s=Pf.findDocument(o).createRange(),l=Cf.calculateNodeAndOffsetByPosition(o,r),s.setStart(l.node,Math.min(l.offset,l.node.length)),s.setEnd(l.node,Math.min(l.offset,l.node.length)),s.getClientRects()[0]):"function"==typeof t.createTextRange?(n=e,(i=t.createTextRange()).collapse(!0),i.moveStart("character",n),i.moveEnd("character",n),i.collapse(!0),i.getBoundingClientRect()):If(t,e))?{x:(a=Uf(a=Df(t,a))).left,y:Math.floor(a.top+(a.bottom-a.top)/2)}:null}function Of(t,e){var n=Pf.isTextEditableElement(t),i=Pf.isContentEditableElement(t);return n&&0<Pf.getElementValue(t).length||i&&Cf.getContentEditableValue(t).length?kf(t,e):xf.findCenter(t)}function Nf(t,e,n){var i=Pf.findDocument(t).createRange();i.setStart(e,Math.min(n,e.length)),i.setEnd(e,Math.min(n,e.length));var o=i.getClientRects()[0];return o?{x:(o=Uf(Df(t,o))).left,y:Math.floor(o.top+(o.bottom-o.top)/2)}:null}var Bf,Ff=y.default.Promise,Lf=y.default.utils.browser,Kf=y.default.utils.featureDetection,Vf=y.default.eventSandbox.eventSimulator,Rf=y.default.eventSandbox.focusBlur,Yf=E.default.contentEditable,Wf=E.default.domUtils,Xf=E.default.positionUtils,Hf=E.default.eventUtils,qf=E.default.delay,Gf=(x(jf,Bf=Ol),jf.prototype._calculateEventArguments=function(){var e=this,n=Xf.offsetToClientCoords(this.clientPoint);return Wt(n).then(function(t){if(!t)throw new ci(null,{reason:Xf.getElOutsideBoundsReason(e.element)});return{element:t,options:{clientX:n.x,clientY:n.y}}})},jf.prototype._move=function(t){var e=this,n=t.element,i=t.offsetX,o=t.offsetY,r=t.speed,s=new Lr({offsetX:i,offsetY:o,speed:r},!1);return el.create(n,s,Md,cl).then(function(t){return t.run()}).then(function(){return qf(e.automationSettings.mouseActionStepDelay)})},jf.prototype._bindMousedownHandler=function(){var e=this,n=function(t){e.eventState.mousedownPrevented=t.defaultPrevented,Hf.preventDefault(t),Hf.unbind(e.element,"mousedown",n)};Hf.bind(this.element,"mousedown",n)},jf.prototype._calculateAbsoluteStartPoint=function(){throw new Error("Not implemented")},jf.prototype._calculateAbsoluteEndPoint=function(){throw new Error("Not implemented")},jf.prototype._moveToPoint=function(t){!function(t,e){if(Pf.isEditableElement(t)){var n=Pf.isTextAreaElement(t);if(!Pf.isInputElement(t)||!wf.isFirefox){var i=xf.getOffsetPosition(t),o=Af.getBordersWidth(t),r=Af.getElementScroll(t),s=e.x-i.left-o.left,l=e.y-i.top-o.top,a=null;if(n)return l<r.top&&(a=l),l>t.clientHeight+r.top&&(a=l-t.clientHeight),null!==a&&Af.setScrollTop(t,Math.round(a));s<r.left&&(a=s),s>t.clientWidth+r.left&&(a=s-t.clientWidth),null!==a&&Af.setScrollLeft(t,Math.round(a))}}}(this.element,t),this.clientPoint=function(t,e){var n=Pf.isTextEditableElement(t),i=Pf.isInputElement(t);if(!n&&!Pf.isContentEditableElement(t))return e;var o=xf.getOffsetPosition(t),r=Af.getBordersWidth(t),s=Af.getElementScroll(t),l=o.left+r.left+t.clientWidth;return i&&n&&wf.isFirefox?{x:Math.min(e.x,l),y:e.y}:{x:e.x-s.left,y:e.y-s.top}}(this.element,t);var e={element:Dd.documentElement,offsetX:this.clientPoint.x,offsetY:this.clientPoint.y,speed:this.speed};return this._move(e)},jf.prototype._mousedown=function(){var n=this;return cl.leftButtonDown().then(function(){return n._calculateEventArguments()}).then(function(t){n.eventArgs=t;var e=Lf.isWebKit&&Wf.isSelectElement(n.element);return e&&n._bindMousedownHandler(),n.eventState.simulateDefaultBehavior=Vf[n.downEvent](n.eventArgs.element,n.eventArgs.options),!1===n.eventState.simulateDefaultBehavior&&(n.eventState.simulateDefaultBehavior=e&&!n.eventState.mousedownPrevented),n._focus()})},jf.prototype._focus=function(){var n=this;return new Ff(function(t){var e=Wf.isContentEditableElement(n.element)?Yf.findContentEditableParent(n.element):n.element;Rf.focus(e,t,!1,!0)})},jf.prototype._setSelection=function(){throw new Error("Not implemented")},jf.prototype._mouseup=function(){var e=this;return cl.buttonUp().then(function(){return e._setSelection(),e._calculateEventArguments()}).then(function(t){e.eventArgs=t,Vf[e.upEvent](e.eventArgs.element,e.eventArgs.options)})},jf.prototype.run=function(){var t=this;return this.absoluteStartPoint=this._calculateAbsoluteStartPoint(),this.absoluteEndPoint=this._calculateAbsoluteEndPoint(),this._moveToPoint(this.absoluteStartPoint).then(function(){return t._mousedown()}).then(function(){return t._moveToPoint(t.absoluteEndPoint)}).then(function(){return t._mouseup()})},jf);function jf(t,e){var n=Bf.call(this,t,e,Md,cl)||this;return n.absoluteStartPoint=null,n.absoluteEndPoint=null,n.clientPoint=null,n.speed=e.speed,n.downEvent=Kf.isTouchDevice?"touchstart":"mousedown",n.upEvent=Kf.isTouchDevice?"touchend":"mouseup",n.eventArgs={options:null,element:null},n.eventState={mousedownPrevented:!1,simulateDefaultBehavior:!0},n}var zf,$f=E.default.textSelection,Qf=E.default.domUtils,Zf=E.default.positionUtils,Jf=(x(td,zf=Gf),td.prototype._calculateAbsoluteStartPoint=function(){return Of(this.element,this.startPos)||Zf.findCenter(this.element)},td.prototype._calculateAbsoluteEndPoint=function(){var t=Of(this.element,this.endPos);return t||(Qf.isContentEditableElement(this.element)?function(t,e,n){for(var i=n<e?1:-1,o=n,r=null;o!==e&&!(r=kf(t,o+=i)););return r=r||kf(t,e)||xf.findCenter(t)}(this.element,this.startPos,this.endPos):Zf.findCenter(this.element))},td.prototype._setSelection=function(){var t=Qf.isTextEditableElement(this.element),e=Qf.isContentEditableElement(this.element);(t||e)&&!1!==this.eventState.simulateDefaultBehavior&&$f.select(this.element,this.startPos,this.endPos)},td.prototype.run=function(t){var e=this;return this._ensureElement(t).then(function(){return zf.prototype.run.call(e)})},td);function td(t,e,n,i){var o=zf.call(this,t,i)||this;return o.startPos=e,o.endPos=n,o}var ed,nd=E.default.textSelection,id=E.default.contentEditable,od=E.default.positionUtils,rd=(x(sd,ed=Gf),sd.prototype._calculateAbsoluteStartPoint=function(){return Nf(this.element,this.startNode,this.startOffset)||od.findCenter(this.element)},sd.prototype._calculateAbsoluteEndPoint=function(){return Nf(this.element,this.endNode,this.endOffset)||od.findCenter(this.element)},sd.prototype._setSelection=function(){var t,e;!1!==this.eventState.simulateDefaultBehavior&&(t={node:this.startNode,offset:this.startOffset},e={node:this.endNode,offset:this.endOffset},nd.selectByNodesAndOffsets(t,e,!0))},sd);function sd(t,e,n){var i=ed.call(this,id.getNearestCommonAncestor(t,e),n)||this,o=id.getFirstVisiblePosition(t),r=id.getLastVisiblePosition(e),s={node:t,offset:o},l={node:e,offset:r},a=id.calculatePositionByNodeAndOffset(i.element,s);return id.calculatePositionByNodeAndOffset(i.element,l)<a&&(o=id.getLastVisiblePosition(t),r=id.getFirstVisiblePosition(e)),s=id.calculateNodeAndOffsetByPosition(t,o),l=id.calculateNodeAndOffsetByPosition(e,r),i.startNode=s.node,i.startOffset=s.offset,i.endNode=l.node,i.endOffset=l.offset,i}var ld=y.default.Promise,ad=y.default.utils.extend,ud=y.default.utils.browser,cd=y.default.eventSandbox.eventSimulator,fd=y.default.eventSandbox.elementEditingWatcher,dd=E.default.domUtils,hd=E.default.promiseUtils,md=E.default.contentEditable,pd=E.default.textSelection,vd=E.default.delay,gd=E.default.KEY_MAPS.specialKeys,yd=(Ed.findTextEditableChild=function(t){var e=null;if(!dd.isEditableElement(t))for(var n=t.querySelectorAll("*"),i=0;i<n.length;i++)if(dd.isTextEditableElementAndEditingAllowed(n[i])){e=n[i];break}return e},Ed.prototype._calculateEventArguments=function(t){var e=dd.getActiveElement(),n=dd.isContentEditableElement(this.element),i=this.eventArgs.element||this.element;n||e===i||(i=Ed.findTextEditableChild(e)||e);var o=ad({keyCode:t?this.currentCharCode:this.currentKeyCode},this.modifiers);return t&&(o.charCode=this.currentCharCode),ad(o,bc(t,this.currentKey,this.currentKeyIdentifier)),{element:i,options:o}},Ed.prototype._calculateTargetElement=function(){var t=dd.getActiveElement(),e=dd.isContentEditableElement(this.element);if(e){if(t!==md.findContentEditableParent(this.element))return void(this.eventState.skipType=!0)}else if(t!==this.element)return void(this.eventState.skipType=!0);this.element=e?this.element:t},Ed.prototype._click=function(t){var e,n=this,i=dd.getActiveElement(),o=dd.isTextEditableElementAndEditingAllowed(this.element),r=dd.isContentEditableElement(this.element);if(i===this.element)return o&&fd.watchElementEditing(this.element),(o||r)&&(e=pd.getSelectionStart(this.element),isNaN(parseInt(this.caretPos,10))||this.caretPos===e||pd.select(this.element,this.caretPos,this.caretPos)),ld.resolve();var s=Ft(this.element),l=s.offsetX,a=s.offsetY,u=new Nr({offsetX:this.elementChanged?l:this.offsetX,offsetY:this.elementChanged?a:this.offsetY,speed:this.speed,caretPos:this.caretPos,modifiers:this.modifiers});return new Fa(this.element,u,Md,cl).run(t).then(function(){return vd(n.automationSettings.mouseActionStepDelay)})},Ed.prototype._type=function(){var t=this;if(this.eventState.skipType)return ld.resolve();var e=dd.isContentEditableElement(this.element);if(this.replace&&(dd.isTextEditableElementAndEditingAllowed(this.element)?pd.select(this.element):e&&pd.deleteSelectionContents(this.element,!0)),this._canUseNativeAutomationInput()){if(this.paste)return this.nativeAutomationInput.executeInsertText(this.typingText);var n=this._calculateCDPEventSequence();return this.nativeAutomationInput.executeEventSequence(n)}return hd.whilst(function(){return!t._isTypingFinished()},function(){return t._typingStep()})},Ed.prototype._isTypingFinished=function(){return this.currentPos===this.typingText.length},Ed.prototype._getCurrentKey=function(t,e){return t===gd.enter?"Enter":e},Ed.prototype._calculateCDPEventSequence=function(){for(var t=[],e=0,n=this.typingText;e<n.length;e++){var i=n[e],o=wc(i),r=this._getCurrentKey(o,i),s=Pc(r),l=ad({key:r},s);t.push(Al.keyDown(l),Al.keyUp(l),Al.delay(this.automationSettings.keyActionStepDelay))}return t},Ed.prototype._canUseNativeAutomationInput=function(){return!!this.nativeAutomationInput&&!(!dd.isTextEditableElement(this.element)&&dd.isInputElement(this.element)||dd.isContentEditableElement(this.element))},Ed.prototype._performTypingStep=function(){return this._keydown(),this._keypress(),this._keyup()},Ed.prototype._typingStep=function(){var t=this.typingText.charAt(this.currentPos);return this.currentKeyCode=wc(t),this.currentCharCode=this.typingText.charCodeAt(this.currentPos),this.currentKey=this._getCurrentKey(this.currentKeyCode,t),this.currentKeyIdentifier=_c(this.currentKey),this.ignoreChangeEvent=dd.getElementValue(this.element)===fd.getElementSavedValue(this.element),this._performTypingStep()},Ed.prototype._keydown=function(){this.eventArgs=this._calculateEventArguments(),this.eventState.simulateKeypress=cd.keydown(this.eventArgs.element,this.eventArgs.options)},Ed.prototype._keypress=function(){!1!==this.eventState.simulateKeypress&&(this.eventArgs=this._calculateEventArguments(!0),this.eventState.simulateTypeChar=ud.isAndroid||cd.keypress(this.eventArgs.element,this.eventArgs.options))},Ed.prototype._keyup=function(){var t=this,e=this.eventArgs.element;this.eventArgs=this._calculateEventArguments();var n=dd.isTextEditableElement(this.element),i=dd.isContentEditableElement(this.element),o=this.paste||!n&&!i;return ld.resolve().then(function(){return o?t._typeAllText(e):t._typeChar(e)}).then(function(){cd.keyup(t.eventArgs.element,t.eventArgs.options),o?t.currentPos=t.typingText.length:t.currentPos++})},Ed.prototype._typeChar=function(t){if(!1===this.eventState.simulateKeypress||!1===this.eventState.simulateTypeChar)return this.ignoreChangeEvent&&fd.restartWatchingElementEditing(t),vd(this.automationSettings.keyActionStepDelay);var e=this.typingText.charAt(this.currentPos),n=/^\d$/.test(e),i=0===this.currentPos?null:this.typingText.charAt(this.currentPos-1);if(dd.isInputElement(t)&&"number"===t.type){var o=pd.getSelectionStart(t),r=dd.getInputValue(t).length,s=/^\d/.test(this.typingText);if(!n&&(s||!("."===e||"-"===e&&r)||0!==o))return vd(this.automationSettings.keyActionStepDelay);n&&("."===i||"-"===i&&!r)&&(e=i+e)}return sc(t,e,null),vd(this.automationSettings.keyActionStepDelay)},Ed.prototype._typeAllText=function(t){return sc(t,this.typingText,this.caretPos),vd(this.automationSettings.keyActionStepDelay)},Ed.prototype.run=function(t){var e=this;return this._click(t).then(function(){return e._calculateTargetElement()}).then(function(){return e._type()})},Ed);function Ed(t,e,n,i){this.element=Ed.findTextEditableChild(t)||t,this.typingText=e.toString(),this.modifiers=n.modifiers,this.caretPos=n.caretPos,this.replace=n.replace,this.paste=n.paste,this.offsetX=n.offsetX,this.offsetY=n.offsetY,this.speed=n.speed,this.automationSettings=new Ao(this.speed),this.elementChanged=t!==this.element,this.currentPos=0,this.currentKeyCode=null,this.currentCharCode=null,this.currentKey=null,this.currentKeyIdentifier=null,this.ignoreChangeEvent=!0,this.eventArgs={options:null,element:null},this.eventState={skipType:!1,simulateKeypress:!0,simulateTypeChar:!0},this.nativeAutomationInput=i?new Ml(i):null}var bd="required",Sd=(_d.prototype._handleRequiredInput=function(){var t=this,e=m.nativeMethods.hasAttribute.call(this.element,bd);e&&m.nativeMethods.removeAttribute.call(this.element,bd),m.eventSandbox.listeners.initElementListening(this.element.form,["submit"]),m.eventSandbox.listeners.addInternalEventAfterListener(this.element.form,["submit"],function(){e&&m.nativeMethods.setAttribute.call(t.element,bd,"true")})},_d.prototype.run=function(){var i=this;return m.doUpload(this.element,this.paths).then(function(t){if(t.length){var e=g.arrayUtils.map(t,function(t){return t.path}),n=g.arrayUtils.reduce(t,function(t,e){return t.concat(e.resolvedPaths)},[]);throw i.createError(e,n)}})},_d);function _d(t,e,n,i){this.element=t,this.paths=e,this.createError=n,i&&this.element.form&&this._handleRequiredInput()}var wd=E.default.domUtils,Pd=E.default.contentEditable,xd={};xd.DispatchEvent=_,xd.SetScroll=Ll,xd.ScrollIntoView=Rl,xd.Click=Fa,xd.SelectChildClick=su,xd.DblClick=hu,xd.DragToOffset=Fu,xd.DragToElement=Ru,xd.Hover=Xu,xd.Press=df,xd.RClick=Sf,xd.SelectText=Jf,xd.SelectEditableContent=rd,xd.Type=yd,xd.Upload=Sd,xd.MouseOptions=Ir,xd.ClickOptions=Nr,xd.TypeOptions=qr,xd.AutomationSettings=Ao,xd.getOffsetOptions=Lt,xd.calculateSelectTextArguments=function(t,e){void 0===e&&(e={});var n,i,o,r,s,l,a,u,c,f,d,h=wd.isTextEditableElement(t),m=h?0:Pd.getFirstVisiblePosition(t),p=h?wd.getElementValue(t).length:Pd.getLastVisiblePosition(t),v=e.startPos?Math.min(e.startPos,p):m,g=void 0===e.endPos||null===e.endPos?p:Math.min(e.endPos,p);return void 0!==e.offset?(g=0<=e.offset?Math.min(e.offset,g):(v=g,Math.max(0,g+e.offset)),{startPos:v,endPos:g}):void 0!==e.startLine?(n=t,i=e,o=wd.getTextAreaValue(n),r=o&&o.length?o.split("\n"):[],s=r.length-1,l=i.startLine?Math.min(i.startLine,s):0,a=r[l]?r[l].length:0,u=i.startPos?Math.min(i.startPos,a):0,c=void 0===i.endLine||null===i.endLine?s:Math.min(i.endLine,s),f=r[c]?r[c].length:0,d=void 0===i.endPos||null===i.endPos?f:Math.min(i.endPos,f),{startPos:wd.getTextareaPositionByLineAndOffset(n,l,0)+u,endPos:wd.getTextareaPositionByLineAndOffset(n,c,0)+d}):{startPos:v,endPos:g}},xd.cursor=cl,xd.getNextFocusableElement=Ec,xd.SHORTCUT_TYPE=Uc,xd.getSelectionCoordinatesByPosition=Of,xd.getElementFromPoint=Wt,xd.MoveAutomation=el;var Ad=y.default.nativeMethods,Cd=y.default.EVENTS.evalIframeScript;Ad.objectDefineProperty(Md,"%testCafeAutomation%",{configurable:!0,value:xd}),y.default.on(Cd,function(t){return Td(Ad.contentWindowGetter.call(t.iframe))})}(Md["%hammerhead%"],Md["%hammerhead%"].Promise,Md["%testCafeCore%"],Md["%testCafeUI%"])}(window);
@@ -2613,14 +2613,14 @@ window['%hammerhead%'].utils.removeInjectedScript();
2613
2613
  }
2614
2614
  //selection utils
2615
2615
  function getSelectedPositionInParentByOffset(node, offset) {
2616
- // NOTE: we get a child element by its offset index in the parent
2617
- if (isShadowUIElement(node))
2618
- return { node: node, offset: offset };
2619
2616
  var childNodes = hammerhead.nativeMethods.nodeChildNodesGetter.call(node);
2620
2617
  var childCount = getChildNodesLength(childNodes);
2621
2618
  var isSearchForLastChild = offset >= childCount;
2622
2619
  var currentNode = childNodes[offset];
2623
2620
  var currentOffset = 0;
2621
+ // NOTE: we get a child element by its offset index in the parent
2622
+ if (isShadowUIElement(node) || !currentNode)
2623
+ return { node: node, offset: offset };
2624
2624
  // NOTE: skip shadowUI elements
2625
2625
  if (isShadowUIElement(currentNode)) {
2626
2626
  if (childCount <= 1)
@@ -1 +1 @@
1
- window["%hammerhead%"].utils.removeInjectedScript(),function ei(ti){var ni=ti.document;!function(c,e){function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=t(c),d=t(e),n={alt:18,ctrl:17,meta:91,shift:16},r={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=","{":"[","}":"]",":":";",'"':"'","|":"\\","<":",",">":".","?":"/","±":"§"},i={backspace:8,capslock:20,delete:46,down:40,end:35,enter:13,esc:27,home:36,ins:45,left:37,pagedown:34,pageup:33,right:39,space:32,tab:9,up:38},a={left:"ArrowLeft",down:"ArrowDown",right:"ArrowRight",up:"ArrowUp",backspace:"Backspace",capslock:"CapsLock",delete:"Delete",end:"End",enter:"Enter",esc:"Escape",home:"Home",ins:"Insert",pagedown:"PageDown",pageup:"PageUp",space:" ",tab:"Tab",alt:"Alt",ctrl:"Control",meta:"Meta",shift:"Shift"};function l(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[e[t]]=t);return n}var s={modifiers:n,shiftMap:r,specialKeys:i,keyProperty:a,modifiersMap:{option:"alt"},symbolCharCodeToKeyCode:{96:192,91:219,93:221,92:220,59:186,39:222,44:188,45:o.default.utils.browser.isFirefox?173:189,46:190,47:191},symbolKeysCharCodes:{109:45,173:45,186:59,187:61,188:44,189:45,190:46,191:47,192:96,219:91,220:92,221:93,222:39,110:46,96:48,97:49,98:50,99:51,100:52,101:53,102:54,103:55,104:56,105:57,107:43,106:42,111:47},reversedModifiers:l(n),reversedShiftMap:l(r),reversedSpecialKeys:l(i),reversedKeyProperty:l(a),newLineKeys:["enter","\n","\r"]},u=o.default.Promise,f=o.default.nativeMethods;function h(t){return new u(function(e){return f.setTimeout.call(ti,e,t)})}var p=(m.prototype._startListening=function(){var t=this;this._emitter.onRequestSend(function(e){return t._onRequestSend(e)}),this._emitter.onRequestCompleted(function(e){return t._onRequestCompleted(e)}),this._emitter.onRequestError(function(e){return t._onRequestError(e)})},m.prototype._offListening=function(){this._emitter.offAll()},m.prototype._onRequestSend=function(e){this._collectingReqs&&this._requests.add(e)},m.prototype._onRequestCompleted=function(e){var t=this;h(this._delays.additionalRequestsCollection).then(function(){return t._onRequestFinished(e)})},m.prototype._onRequestFinished=function(e){this._requests.has(e)&&(this._requests.delete(e),this._collectingReqs||this._requests.size||!this._watchdog||this._finishWaiting())},m.prototype._onRequestError=function(e){this._onRequestFinished(e)},m.prototype._finishWaiting=function(){this._watchdog&&((0,c.nativeMethods.clearTimeout)(this._watchdog),this._watchdog=null),this._requests.clear(),this._offListening(),this._waitResolve()},m.prototype.wait=function(e){var n=this;return h(e?this._delays.pageInitialRequestsCollection:this._delays.requestsCollection).then(function(){return new c.Promise(function(e){var t;n._collectingReqs=!1,n._waitResolve=e,n._requests.size?(t=c.nativeMethods.setTimeout,n._watchdog=t(function(){return n._finishWaiting()},m.TIMEOUT)):n._finishWaiting()})})},m.TIMEOUT=3e3,m);function m(e,t){var n,o,r;void 0===t&&(t={}),this._delays={requestsCollection:null!==(n=t.requestsCollection)&&void 0!==n?n:50,additionalRequestsCollection:null!==(o=t.additionalRequestsCollection)&&void 0!==o?o:50,pageInitialRequestsCollection:null!==(r=t.pageInitialRequestsCollection)&&void 0!==r?r:50},this._emitter=e,this._waitResolve=null,this._watchdog=null,this._requests=new Set,this._collectingReqs=!0,this._startListening()}var g=function(e,t){return(g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function E(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}g(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function v(e,a,l,s){return new(l=l||d.default)(function(n,t){function o(e){try{i(s.next(e))}catch(e){t(e)}}function r(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?n(e.value):((t=e.value)instanceof l?t:new l(function(e){e(t)})).then(o,r)}i((s=s.apply(e,a||[])).next())})}function y(n,o){var r,i,a,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=e(0),s.throw=e(1),s.return=e(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function e(t){return function(e){return function(t){if(r)throw new TypeError("Generator is already executing.");for(;s&&t[s=0]&&(l=0),l;)try{if(r=1,i&&(a=2&t[0]?i.return:t[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,t[1])).done)return a;switch(i=0,a&&(t=[2&t[0],a.value]),t[0]){case 0:case 1:a=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,i=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(a=0<(a=l.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){l.label=t[1];break}if(6===t[0]&&l.label<a[1]){l.label=a[1],a=t;break}if(a&&l.label<a[2]){l.label=a[2],l.ops.push(t);break}a[2]&&l.ops.pop(),l.trys.pop();continue}t=o.call(n,l)}catch(e){t=[6,e],i=0}finally{r=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}}function b(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)!o&&r in t||((o=o||Array.prototype.slice.call(t,0,r))[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var C=(S.prototype.on=function(e,t){this._eventsListeners[e]||(this._eventsListeners[e]=[]),this._eventsListeners[e].push(t)},S.prototype.once=function(n,o){var r=this;this.on(n,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r.off(n,o),o.apply(void 0,e)})},S.prototype.off=function(e,t){var n=this._eventsListeners[e];n&&(this._eventsListeners[e]=c.nativeMethods.arrayFilter.call(n,function(e){return e!==t}))},S.prototype.offAll=function(e){e?this._eventsListeners[e]=[]:this._eventsListeners={}},S.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var o=this._eventsListeners[e];if(o)for(var r=0;r<o.length;r++)o[r].apply(this,t)},S);function S(){this._eventsListeners={}}var w,T="request-send",_="request-completed",I="request-error",P=(E(N,w=C),N.prototype._addHammerheadListener=function(e,t){o.default.on(e,t),this._hammerheadListenersInfo.push({evt:e,listener:t})},N.prototype.onRequestSend=function(e){this.on(T,e)},N.prototype.onRequestCompleted=function(e){this.on(_,e)},N.prototype.onRequestError=function(e){this.on(I,e)},N.prototype.offAll=function(){w.prototype.offAll.call(this);for(var e=0,t=this._hammerheadListenersInfo;e<t.length;e++){var n=t[e];o.default.off.call(o.default,n.evt,n.listener)}},N);function N(){var n=w.call(this)||this;return n._hammerheadListenersInfo=[],n._addHammerheadListener(o.default.EVENTS.beforeXhrSend,function(e){var t=e.xhr;return n.emit(T,t)}),n._addHammerheadListener(o.default.EVENTS.xhrCompleted,function(e){var t=e.xhr;return n.emit(_,t)}),n._addHammerheadListener(o.default.EVENTS.xhrError,function(e){var t=e.xhr;return n.emit(I,t)}),n._addHammerheadListener(o.default.EVENTS.fetchSent,function(e){n.emit(T,e),e.then(function(){return n.emit(_,e)},function(){return n.emit(I,e)})}),n}var R=(M.prototype._startListening=function(){var t=this;this._emitter.onScriptAdded(function(e){return t._onScriptElementAdded(e)}),this._emitter.onScriptLoadedOrFailed(function(e){return t._onScriptLoadedOrFailed(e)})},M.prototype._offListening=function(){this._emitter.offAll()},M.prototype._onScriptElementAdded=function(e){var t=this,n=(0,c.nativeMethods.setTimeout)(function(){return t._onScriptLoadedOrFailed(e,!0)},M.LOADING_TIMEOUT);this._scripts.set(e,n)},M.prototype._onScriptLoadedOrFailed=function(e,t){var n=this;void 0===t&&(t=!1),this._scripts.has(e)&&(t||(0,c.nativeMethods.clearTimeout)(this._scripts.get(e)),this._scripts.delete(e),this._scripts.size||h(25).then(function(){n._waitResolve&&!n._scripts.size&&n._finishWaiting()}))},M.prototype._finishWaiting=function(){this._watchdog&&((0,c.nativeMethods.clearTimeout)(this._watchdog),this._watchdog=null),this._scripts.clear(),this._offListening(),this._waitResolve(),this._waitResolve=null},M.prototype.wait=function(){var n=this;return new c.Promise(function(e){var t;n._waitResolve=e,n._scripts.size?(t=c.nativeMethods.setTimeout,n._watchdog=t(function(){return n._finishWaiting()},M.TIMEOUT)):n._finishWaiting()})},M.TIMEOUT=3e3,M.LOADING_TIMEOUT=2e3,M);function M(e){this._emitter=e,this._watchdog=null,this._waitResolve=null,this._scripts=new Map,this._startListening()}var O,x=o.default.nativeMethods,A="script-added",F="script-loaded-or-failed",L=(E(V,O=C),V.prototype._onScriptElementAdded=function(e){var t,n=this,o=x.scriptSrcGetter.call(e);void 0!==o&&""!==o&&(this.emit(A,e),t=function(){x.removeEventListener.call(e,"load",t),x.removeEventListener.call(e,"error",t),n.emit(F,e)},x.addEventListener.call(e,"load",t),x.addEventListener.call(e,"error",t))},V.prototype.onScriptAdded=function(e){this.on(A,e)},V.prototype.onScriptLoadedOrFailed=function(e){this.on(F,e)},V.prototype.offAll=function(){O.prototype.offAll.call(this),o.default.off(o.default.EVENTS.scriptElementAdded,this._onScriptElementAdded)},V);function V(){var n=O.call(this)||this;return n._scriptElementAddedListener=function(e){var t=e.el;return n._onScriptElementAdded(t)},o.default.on(o.default.EVENTS.scriptElementAdded,n._scriptElementAddedListener),n}function W(e){var t="array"+e.charAt(0).toUpperCase()+e.slice(1),n=c.nativeMethods[t];return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.call.apply(n,e)}}var H=W("filter"),D=W("map"),k=W("slice"),U=W("splice"),B=W("unshift"),q=W("forEach"),G=W("indexOf"),j=W("some"),z=W("reverse"),J=W("reduce"),K=W("concat"),Y=W("join"),X=W("every");function Q(e,t){return c.nativeMethods.arrayFind.call(e,t)}var $=Object.freeze({__proto__:null,filter:H,map:D,slice:k,splice:U,unshift:B,forEach:q,indexOf:G,some:j,reverse:z,reduce:J,concat:K,join:Y,every:X,isArray:function(e){return"[object Array]"===c.nativeMethods.objectToString.call(e)},from:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return c.nativeMethods.arrayFrom.apply(c.nativeMethods,b([e],t,!1))},find:Q,remove:function(e,t){var n=c.nativeMethods.arrayIndexOf.call(e,t);-1<n&&c.nativeMethods.arraySplice.call(e,n,1)},equals:function(e,t){if(e.length!==t.length)return!1;for(var n=0,o=e.length;n<o;n++)if(e[n]!==t[n])return!1;return!0},getCommonElement:function(e,t){for(var n=0;n<e.length;n++)for(var o=0;o<t.length;o++)if(e[n]===t[o])return e[n];return null}}),Z=o.default.utils.browser,ee=o.default.nativeMethods,te=o.default.utils.style.get,ne=o.default.utils.dom.getActiveElement,oe=o.default.utils.dom.findDocument,re=o.default.utils.dom.find,ie=o.default.utils.dom.isElementInDocument,ae=o.default.utils.dom.isElementInIframe,le=o.default.utils.dom.getIframeByElement,se=o.default.utils.dom.isCrossDomainWindows,ue=o.default.utils.dom.getSelectParent,ce=o.default.utils.dom.getChildVisibleIndex,de=o.default.utils.dom.getSelectVisibleChildren,fe=o.default.utils.dom.isElementNode,he=o.default.utils.dom.isTextNode,pe=o.default.utils.dom.isRenderedNode,me=o.default.utils.dom.isIframeElement,ge=o.default.utils.dom.isInputElement,Ee=o.default.utils.dom.isButtonElement,ve=o.default.utils.dom.isFileInput,ye=o.default.utils.dom.isTextAreaElement,be=o.default.utils.dom.isAnchorElement,Ce=o.default.utils.dom.isImgElement,Se=o.default.utils.dom.isFormElement,we=o.default.utils.dom.isLabelElement,Te=o.default.utils.dom.isSelectElement,_e=o.default.utils.dom.isRadioButtonElement,Ie=o.default.utils.dom.isColorInputElement,Pe=o.default.utils.dom.isCheckboxElement,Ne=o.default.utils.dom.isOptionElement,Re=o.default.utils.dom.isSVGElement,Me=o.default.utils.dom.isMapElement,Oe=o.default.utils.dom.isBodyElement,xe=o.default.utils.dom.isHtmlElement,Ae=o.default.utils.dom.isDocument,Fe=o.default.utils.dom.isTextEditableInput,Le=o.default.utils.dom.isTextEditableElement,Ve=o.default.utils.dom.isTextEditableElementAndEditingAllowed,We=o.default.utils.dom.isContentEditableElement,He=o.default.utils.dom.isDomElement,De=o.default.utils.dom.isShadowUIElement,ke=o.default.utils.dom.isShadowRoot,Ue=o.default.utils.dom.isElementFocusable,Be=o.default.utils.dom.isHammerheadAttr,qe=o.default.utils.dom.isElementReadOnly,Ge=o.default.utils.dom.getScrollbarSize,je=o.default.utils.dom.getMapContainer,ze=o.default.utils.dom.getTagName,Je=o.default.utils.dom.closest,Ke=o.default.utils.dom.getParents,Ye=o.default.utils.dom.findParent,Xe=o.default.utils.dom.getTopSameDomainWindow,Qe=o.default.utils.dom.getParentExceptShadowRoot;function $e(e,t){var n,o={el:n=e,skip:n.shadowRoot&&n.tabIndex<0,children:{}};if(e=e.shadowRoot||e,me(e)&&(e=ee.contentDocumentGetter.call(e)),e&&(e.nodeType===Node.DOCUMENT_FRAGMENT_NODE||e.nodeType===Node.DOCUMENT_NODE))for(var r=0,i=function(e){for(var t,n=e.querySelectorAll("*"),o=function(e){for(var t=[],n=0;n<e.length;n++)"none"===te(e[n],"display")&&t.push(e[n]);return t}(n),r=/^(input|button|select|textarea)$/,i=[],a=null,l=null,s=null,u=0;u<n.length;u++){a=n[u],l=ze(a),s=Ze(a),function(e,t,n){var o=null;return t.nodeType===Node.DOCUMENT_NODE&&(o=ee.documentActiveElementGetter.call(t)),e===o||!(e.disabled||"none"===te(e,"display")||"hidden"===te(e,"visibility")||Z.isAndroid&&Ne(e)||null!==n&&n<0)}(a,e,s)&&(t=a.getAttribute("contenteditable"),(r.test(l)||a.shadowRoot||me(a)||be(a)&&a.hasAttribute("href")||""===t||"true"===t||null!==s)&&i.push(a))}return H(i,function(e){return!et(o,e)})}(e);r<i.length;r++){var a=i[r],l=!t||a.tabIndex<=0?-1:a.tabIndex;o.children[l]=o.children[l]||[],o.children[l].push($e(a,t))}return o}function Ze(e){var t=ee.getAttribute.call(e,"tabindex");return null!==t&&(t=parseInt(t,10),t=isNaN(t)?null:t),t}function et(e,t){return e.contains?e.contains(t):j(e,function(e){return e.contains(t)})}function tt(e,t){if(ot(t,e))return!0;for(var n=ee.nodeChildNodesGetter.call(e),o=st(n),r=0;r<o;r++){var i=n[r];if(!De(i)&&tt(i,t))return!0}return!1}function nt(e,t){var n=e.querySelectorAll(ze(t));return G(n,t)}function ot(e,t){return e&&t&&e.isSameNode?e.isSameNode(t):e===t}function rt(t){var e=null;try{e=t.frameElement}catch(e){return!!t.top}return!(!Z.isFirefox&&!Z.isWebKit||t.top===t||e)||!(!e||!ee.contentDocumentGetter.call(e))}function it(e){return e.top===e}function at(e){var t=[];re(ni,"*",function(e){"IFRAME"===e.tagName&&t.push(e),e.shadowRoot&&re(e.shadowRoot,"iframe",function(e){return t.push(e)})});for(var n=0;n<t.length;n++)if(ee.contentWindowGetter.call(t[n])===e)return t[n];return null}function lt(e){return ee.htmlCollectionLengthGetter.call(e)}function st(e){return ee.nodeListLengthGetter.call(e)}function ut(e){return ee.inputValueGetter.call(e)}function ct(e){return ee.textAreaValueGetter.call(e)}function dt(e,t){return ee.inputValueSetter.call(e,t)}function ft(e,t){return ee.textAreaValueSetter.call(e,t)}function ht(e){return ge(e)?ut(e):ye(e)?ct(e):e.value}function pt(e){return e&&e.getRootNode&&oe(e)!==e.getRootNode()}var mt=Object.freeze({__proto__:null,getActiveElement:ne,findDocument:oe,find:re,isElementInDocument:ie,isElementInIframe:ae,getIframeByElement:le,isCrossDomainWindows:se,getSelectParent:ue,getChildVisibleIndex:ce,getSelectVisibleChildren:de,isElementNode:fe,isTextNode:he,isRenderedNode:pe,isIframeElement:me,isInputElement:ge,isButtonElement:Ee,isFileInput:ve,isTextAreaElement:ye,isAnchorElement:be,isImgElement:Ce,isFormElement:Se,isLabelElement:we,isSelectElement:Te,isRadioButtonElement:_e,isColorInputElement:Ie,isCheckboxElement:Pe,isOptionElement:Ne,isSVGElement:Re,isMapElement:Me,isBodyElement:Oe,isHtmlElement:xe,isDocument:Ae,isTextEditableInput:Fe,isTextEditableElement:Le,isTextEditableElementAndEditingAllowed:Ve,isContentEditableElement:We,isDomElement:He,isShadowUIElement:De,isShadowRoot:ke,isElementFocusable:Ue,isHammerheadAttr:Be,isElementReadOnly:qe,getScrollbarSize:Ge,getMapContainer:je,getTagName:ze,closest:Je,getParents:Ke,findParent:Ye,getTopSameDomainWindow:Xe,getParentExceptShadowRoot:Qe,getFocusableElements:function(e,t){return void 0===t&&(t=!1),function e(t){var n,o=[];for(n in t.skip||t.el.nodeType===Node.DOCUMENT_NODE||me(t.el)||o.push(t.el),t.children)for(var r=0,i=t.children[n];r<i.length;r++){var a=i[r];o.push.apply(o,e(a))}return o}($e(e,t))},getTabIndexAttributeIntValue:Ze,containsElement:et,getTextareaIndentInLine:function(e,t){var n=ct(e);if(!n)return 0;var o=n.substring(0,t);return t-(-1===o.lastIndexOf("\n")?0:o.lastIndexOf("\n")+1)},getTextareaLineNumberByPosition:function(e,t){for(var n=ct(e).split("\n"),o=0,r=0,i=0;o<=t;i++){if(t<=o+n[i].length){r=i;break}o+=n[i].length+1}return r},getTextareaPositionByLineAndOffset:function(e,t,n){for(var o=ct(e).split("\n"),r=0,i=0;i<t;i++)r+=o[i].length+1;return r+n},blocksImplicitSubmission:function(e){return(Z.isSafari?/^(text|password|color|date|time|datetime|datetime-local|email|month|number|search|tel|url|week|image)$/i:Z.isFirefox?/^(text|password|date|time|datetime|datetime-local|email|month|number|search|tel|url|week|image)$/i:/^(text|password|datetime|email|number|search|tel|url|image)$/i).test(e.type)},isEditableElement:function(e,t){return t?Ve(e)||We(e):Le(e)||We(e)},isElementContainsNode:tt,isOptionGroupElement:function(e){return"[object HTMLOptGroupElement]"===o.default.utils.dom.instanceToString(e)},getElementIndexInParent:nt,isTheSameNode:ot,getElementDescription:function(e){var t,n,o={id:"id",name:"name",class:"className"},r=[];for(t in r.push("<"),r.push(ze(e)),o)!o.hasOwnProperty(t)||(n=e[o[t]])&&r.push(" "+t+'="'+n+'"');return r.push(">"),r.join("")},getFocusableParent:function(e){for(var t=Ke(e),n=0;n<t.length;n++)if(Ue(t[n]))return t[n];return null},remove:function(e){e&&e.parentElement&&e.parentElement.removeChild(e)},isIFrameWindowInDOM:rt,isTopWindow:it,findIframeByWindow:at,isEditableFormElement:function(e){return Le(e)||Te(e)},getCommonAncestor:function(e,t){if(ot(e,t))return e;for(var n=[e].concat(Ke(e)),o=t;o;){if(-1<G(n,o))return o;o=ee.nodeParentNodeGetter.call(o)}return o},getChildrenLength:lt,getChildNodesLength:st,getInputValue:ut,getTextAreaValue:ct,setInputValue:dt,setTextAreaValue:ft,getElementValue:ht,setElementValue:function(e,t){return ge(e)?dt(e,t):ye(e)?ft(e,t):e.value=t},isShadowElement:pt,contains:function(t,e){return!(!t||!e)&&(t.contains?t.contains(e):!!Ye(e,!0,function(e){return e===t}))},isNodeEqual:function(e,t){return e===t},getNodeText:function(e){return ee.nodeTextContentGetter.call(e)},getImgMapName:function(e){return e.useMap.substring(1)},getDocumentElement:function(e){return e.document.documentElement},isDocumentElement:function(e){return e===ni.documentElement}}),gt=o.default.Promise,Et=o.default.nativeMethods,vt=o.default.eventSandbox.listeners,yt=o.default.utils.event.BUTTON,bt=o.default.utils.event.BUTTONS_PARAMETER,Ct=o.default.utils.event.DOM_EVENTS,St=o.default.utils.event.WHICH_PARAMETER,wt=o.default.utils.event.preventDefault;function Tt(e,t,n,o){Et.addEventListener.call(e,t,n,o)}function _t(e,t,n,o){Et.removeEventListener.call(e,t,n,o)}function It(){var n=[],e=!1;function t(){e||(ni.body?(e=!0,n.forEach(function(e){return e()})):Et.setTimeout.call(ti,t,1))}function o(){(rt(ti)||it(ti))&&(_t(ni,"DOMContentLoaded",o),t())}return"complete"===ni.readyState?Et.setTimeout.call(ti,o,1):Tt(ni,"DOMContentLoaded",o),{then:function(e){return t=e,new gt(function(e){return n.push(function(){return e(t())})});var t}}}var Pt,Nt,Rt=Object.freeze({__proto__:null,BUTTON:yt,BUTTONS_PARAMETER:bt,DOM_EVENTS:Ct,WHICH_PARAMETER:St,preventDefault:wt,bind:Tt,unbind:_t,documentReady:function(e){return void 0===e&&(e=0),It().then(function(){return vt.getEventListeners(ti,"load").length?gt.race([new gt(function(e){return Tt(ti,"load",e)}),h(e)]):null})}});(Nt=Pt=Pt||{}).ready="ready",Nt.readyForBrowserManipulation="ready-for-browser-manipulation",Nt.waitForFileDownload="wait-for-file-download";var Mt=Pt,Ot=o.default.Promise,xt=o.default.transport,At=500,Ft=!1,Lt=null,Vt=!1;function Wt(){Ft=!0}var Ht=Object.freeze({__proto__:null,init:function(){o.default.on(o.default.EVENTS.beforeUnload,Wt),Tt(ti,"unload",function(){Ft=!0})},watchForPageNavigationTriggers:function(){Lt=function(){Vt=!0},o.default.on(o.default.EVENTS.pageNavigationTriggered,Lt)},wait:function(e){void 0===e&&(e=!Lt||Vt?400:0),Lt&&(o.default.off(o.default.EVENTS.pageNavigationTriggered,Lt),Lt=null);var t=h(e).then(function(){if(Ft)return h(At).then(function(){return xt.queuedAsyncServiceMsg({cmd:Mt.waitForFileDownload})}).then(function(e){if(!e)return new Ot(function(){})}).then(function(){Ft=!1})}),n=h(15e3).then(function(){Ft=!1});return Ot.race([t,n])}}),Dt=C,kt=Object.freeze({__proto__:null,EventEmitter:Dt,inherit:function(e,t){function n(){}n.prototype=t.prototype,o.default.utils.extend(e.prototype,new n),(e.prototype.constructor=e).base=t.prototype}}),Ut=c.eventSandbox.listeners;function Bt(){this.initialized=!1,this.stopPropagationFlag=!1,this.events=new Dt}var qt=(Bt.prototype._internalListener=function(e,t,n,o,r){this.events.emit("scroll",e),this.stopPropagationFlag&&(o(),r())},Bt.prototype.init=function(){var n=this;this.initialized||(this.initialized=!0,Ut.initElementListening(ti,["scroll"]),Ut.addFirstInternalEventBeforeListener(ti,["scroll"],function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n._internalListener.apply(n,e)}))},Bt.prototype.waitForScroll=function(e){var t=this,n=null,o=new c.Promise(function(e){n=e});return o.cancel=function(){return t.events.off("scroll",n)},this.initialized?this.handleScrollEvents(e,n):n(),o},Bt.prototype.handleScrollEvents=function(n,e){var o=this;this.events.once("scroll",e),pt(n)&&(Ut.initElementListening(n,["scroll"]),Ut.addFirstInternalEventBeforeListener(n,["scroll"],function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];o._internalListener.apply(o,e),Ut.cancelElementListening(n)}))},Bt.prototype.stopPropagation=function(){this.stopPropagationFlag=!0},Bt.prototype.enablePropagation=function(){this.stopPropagationFlag=!1},new Bt),Gt=(jt.create=function(e){return new jt(e.top,e.right,e.bottom,e.left)},jt.prototype.add=function(e){return this.top+=e.top,this.right+=e.right,this.bottom+=e.bottom,this.left+=e.left,this},jt.prototype.sub=function(e){return"top"in e&&(this.top-=e.top,this.left-=e.left),this.bottom-=e.bottom,this.right-=e.right,this},jt.prototype.round=function(e,t){return void 0===e&&(e=Math.round),void 0===t&&(t=e),this.top=e(this.top),this.right=t(this.right),this.bottom=t(this.bottom),this.left=e(this.left),this},jt.prototype.contains=function(e){return e.x>=this.left&&e.x<=this.right&&e.y>=this.top&&e.y<=this.bottom},jt);function jt(e,t,n,o){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=0),void 0===o&&(o=0),this.top=e,this.right=t,this.bottom=n,this.left=o}var zt=o.default.utils.style,Jt=o.default.utils.style.getBordersWidth,Kt=o.default.utils.style.getComputedStyle,Yt=o.default.utils.style.getElementMargin,Xt=o.default.utils.style.getElementPadding,Qt=o.default.utils.style.getElementScroll,$t=o.default.utils.style.getOptionHeight,Zt=o.default.utils.style.getSelectElementSize,en=o.default.utils.style.isElementVisible,tn=o.default.utils.style.isVisibleChild,nn=o.default.utils.style.getWidth,on=o.default.utils.style.getHeight,rn=o.default.utils.style.getInnerWidth,an=o.default.utils.style.getInnerHeight,ln=o.default.utils.style.getScrollLeft,sn=o.default.utils.style.getScrollTop,un=o.default.utils.style.setScrollLeft,cn=o.default.utils.style.setScrollTop,dn=o.default.utils.style.get,fn=o.default.utils.style.getBordersWidthFloat,hn=o.default.utils.style.getElementPaddingFloat;function pn(e,t,n){for(var o in"string"==typeof t&&zt.set(e,t,n),t)t.hasOwnProperty(o)&&zt.set(e,o,t[o])}function mn(e,t,n){return e<t?n:e<n?t:Math.max(n,t)}function gn(e){return!!Ye(e,!0,function(e){return fe(e)&&"hidden"===zt.get(e,"visibility")})}function En(e){return!!Ye(e,!0,function(e){return fe(e)&&"none"===zt.get(e,"display")})}function vn(e){return!pe(e)||En(e)||gn(e)}function yn(e){return e&&!(e.offsetHeight<=0&&e.offsetWidth<=0)}function bn(e){return fe(e)&&"fixed"===zt.get(e,"position")}function Cn(e){return fe(e)&&"sticky"===zt.get(e,"position")}var Sn=Object.freeze({__proto__:null,getBordersWidth:Jt,getComputedStyle:Kt,getElementMargin:Yt,getElementPadding:Xt,getElementScroll:Qt,getOptionHeight:$t,getSelectElementSize:Zt,isElementVisible:en,isSelectVisibleChild:tn,getWidth:nn,getHeight:on,getInnerWidth:rn,getInnerHeight:an,getScrollLeft:ln,getScrollTop:sn,setScrollLeft:un,setScrollTop:cn,get:dn,getBordersWidthFloat:fn,getElementPaddingFloat:hn,set:pn,getViewportDimensions:function(){return{width:mn(ti.innerWidth,ni.documentElement.clientWidth,ni.body.clientWidth),height:mn(ti.innerHeight,ni.documentElement.clientHeight,ni.body.clientHeight)}},getWindowDimensions:function(e){return new Gt(0,nn(e),on(e),0)},isHiddenNode:gn,isNotDisplayedNode:En,isNotVisibleNode:vn,hasDimensions:yn,isFixedElement:bn,isStickyElement:Cn}),wn=c.utils.browser,Tn=c.eventSandbox.listeners,_n=["click","mousedown","mouseup","dblclick","contextmenu","mousemove","mouseover","mouseout","touchstart","touchmove","touchend","keydown","keypress","input","keyup","change","focus","blur","MSPointerDown","MSPointerMove","MSPointerOver","MSPointerOut","MSPointerUp","pointerdown","pointermove","pointerover","pointerout","pointerup"],In=123;function Pn(e,t,n,o,r){var i,a=c.nativeMethods.eventTargetGetter.call(e)||e.srcElement;if(!t&&!De(a)){if(/^key/.test(e.type)&&((i=e).shiftKey&&i.ctrlKey||(i.altKey||i.metaKey)&&wn.isMacPlatform||i.keyCode===In))return void r();if("blur"===e.type&&a!==ti&&a!==ti.document&&!yn(a))return;n()}}var Nn=(Rn.create=function(e){return"left"in e?new Rn(e.left,e.top):"right"in e?new Rn(e.right,e.bottom):new Rn(e.x,e.y)},Rn.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},Rn.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},Rn.prototype.round=function(e){return void 0===e&&(e=Math.round),this.x=e(this.x),this.y=e(this.y),this},Rn.prototype.eql=function(e){return this.x===e.x&&this.y===e.y},Rn.prototype.mul=function(e){return this.x*=e,this.y*=e,this},Rn.prototype.distance=function(e){return Math.sqrt(Math.pow(this.x-e.x,2)+Math.pow(this.y-e.y,2))},Rn);function Rn(e,t){this.x=e,this.y=t}var Mn=/auto|scroll|hidden/i;function On(e){var t,n=dn(e,"overflowX"),o=dn(e,"overflowY"),r=Mn.test(n),i=Mn.test(o),a=oe(e).documentElement,l=e.scrollHeight;return(c.utils.browser.isChrome||c.utils.browser.isFirefox||c.utils.browser.isSafari)&&(t=e.getBoundingClientRect().top,l=l-a.getBoundingClientRect().top+t),(r||i)&&l>a.scrollHeight}function xn(e){if(Oe(e))return On(e);if(xe(e))return function(e){var t=dn(e,"overflowX"),n=dn(e,"overflowY");if("hidden"===t&&"hidden"===n)return!1;var o=e.scrollHeight>e.clientHeight,r=e.scrollWidth>e.clientWidth;if(o||r)return!0;var i=e.getElementsByTagName("body")[0];if(!i)return!1;if(On(i))return!1;var a=Math.min(e.clientWidth,i.clientWidth),l=Math.min(e.clientHeight,i.clientHeight);return i.scrollHeight>l||i.scrollWidth>a}(e);var t,n,o,r,i,a=(n=dn(t=e,"overflowX"),o=dn(t,"overflowY"),r=Mn.test(n),i=Mn.test(o),new Nn(r,i));if(!a.x&&!a.y)return!1;var l=a.y&&e.scrollHeight>e.clientHeight;return a.x&&e.scrollWidth>e.clientWidth||l}function An(e){var t,n,o=Ke(e);return!ae(e)||(t=le(e))&&(n=Ke(t),o.concat(n)),c.nativeMethods.arrayFilter.call(o,xn)}var Fn=Object.freeze({__proto__:null,hasScroll:xn,getScrollableParents:An}),Ln=o.default.shadowUI,Vn=o.default.nativeMethods,Wn="disabled";function Hn(){this.currentEl=null,this.optionList=null,this.groups=[],this.options=[]}var Dn=(Hn.prototype._createOption=function(e,t){var n=ni.createElement("div"),o=e.disabled||"optgroup"===ze(e.parentElement)&&e.parentElement.disabled,r="option"===ze(e)?e.text:"";Vn.nodeTextContentSetter.call(n,r),t.appendChild(n),Ln.addClass(n,"tcOption"),o&&(Ln.addClass(n,Wn),pn(n,"color",dn(e,"color"))),this.options.push(n)},Hn.prototype._createGroup=function(e,t){var n=ni.createElement("div");Vn.nodeTextContentSetter.call(n,e.label||" "),t.appendChild(n),Ln.addClass(n,"tcOptionGroup"),e.disabled&&(Ln.addClass(n,Wn),pn(n,"color",dn(e,"color"))),this.createChildren(e.children,n),this.groups.push(n)},Hn.prototype.clear=function(){this.optionList=null,this.currentEl=null,this.options=[],this.groups=[]},Hn.prototype.createChildren=function(e,t){for(var n=lt(e),o=0;o<n;o++)Ne(e[o])?this._createOption(e[o],t):"optgroup"===ze(e[o])&&this._createGroup(e[o],t)},Hn.prototype.getEmulatedChildElement=function(e){var t="optgroup"===ze(e),n=nt(this.currentEl,e);return t?this.groups[n]:this.options[n]},Hn.prototype.isOptionListExpanded=function(e){return e?e===this.currentEl:!!this.currentEl},Hn.prototype.isOptionElementVisible=function(e){var t=ue(e);if(!t)return!0;var n=this.isOptionListExpanded(t),o=Zt(t);return n||1<o},new Hn),kn=function(e,t,n,o,r,i){this.width=e,this.height=t,this.left=n.x,this.top=n.y,this.right=n.x+e,this.bottom=n.y+t,this.border=o,this.scrollbar=i,this.scroll=r},Un={notElementOrTextNode:function(e){return"\n The ".concat(e," is neither a DOM element nor a text node.\n ")},elOutsideBounds:function(e,t){return"\n The ".concat(t," (").concat(e,") is located outside the the layout viewport.\n ")},elHasWidthOrHeightZero:function(e,t,n,o){return"\n The ".concat(t," (").concat(e,") is too small to be visible: ").concat(n,"px x ").concat(o,"px.\n ")},elHasDisplayNone:function(e,t){return"\n The ".concat(t," (").concat(e,") is invisible. \n The value of its 'display' property is 'none'.\n ")},parentHasDisplayNone:function(e,t,n){return"\n The ".concat(t," (").concat(e,") is invisible. \n It descends from an element that has the 'display: none' property (").concat(n,").\n ")},elHasVisibilityHidden:function(e,t){return"\n The ".concat(t," (").concat(e,") is invisible.\n The value of its 'visibility' property is 'hidden'.\n ")},parentHasVisibilityHidden:function(e,t,n){return"\n The ".concat(t," (").concat(e,") is invisible.\n It descends from an element that has the 'visibility: hidden' property (").concat(n,").\n ")},elHasVisibilityCollapse:function(e,t){return"\n The ".concat(t," (").concat(e,") is invisible.\n The value of its 'visibility' property is 'collapse'.\n ")},parentHasVisibilityCollapse:function(e,t,n){return"\n The ".concat(t," (").concat(e,") is invisible.\n It descends from an element that has the 'visibility: collapse' property (").concat(n,").\n ")},elNotRendered:function(e,t){return"\n The ".concat(t," (").concat(e,") has not been rendered.\n ")},optionNotVisible:function(e,t,n){return"\n The ".concat(t," (").concat(e,") is invisible. \n The parent element (").concat(n,") is collapsed, and its length is shorter than 2.\n ")},mapContainerNotVisible:function(e,t){return"\n The action target (".concat(e,") is invisible because ").concat(t,"\n ")}},Bn=o.default.utils.html,qn=o.default.nativeMethods,Gn=10;function jn(e){if(!e)return"";var t,n,o,r=qn.cloneNode.call(e),i=Bn.cleanUpHtml(qn.elementOuterHTMLGetter.call(r)),a=(t=qn.nodeTextContentGetter.call(e),n=Gn,void 0===o&&(o="..."),t.length<n?t:t.substring(0,n-o.length)+o),l=qn.elementChildrenGetter.call(e);return 0<qn.htmlCollectionLengthGetter.call(l)?i.replace("></",">...</"):a?i.replace("></",">".concat(a,"</")):i}var zn=o.default.utils.position.getElementRectangle,Jn=o.default.utils.position.getOffsetPosition,Kn=o.default.utils.position.offsetToClientCoords;function Yn(e){var t,n,o,r,i=xe(e),a=i?e.getElementsByTagName("body")[0]:null,l=e.getBoundingClientRect(),s=Gt.create(Jt(e)),u=Qt(e),c=ae(e),d="BackCompat"===e.ownerDocument.compatMode,f=i?new Nn(0,0):Nn.create(l),h=l.height,p=l.width;i&&(p=a&&d?(h=a.clientHeight,a.clientWidth):(h=e.clientHeight,e.clientWidth)),!c||(t=le(e))&&(n=Jn(t),o=Kn(Nn.create(n)),r=Jt(t),f.add(o).add(Nn.create(r)),i&&s.add(r));var m=!i&&rn(e)!==e.clientWidth,g=!i&&an(e)!==e.clientHeight,E={right:m?Ge():0,bottom:g?Ge():0};return new kn(p,h,f,s,u,E)}function Xn(e){var t=e.x,n=e.y,o=ni.elementFromPoint,r=null;try{r=o.call(ni,t,n)}catch(e){return null}for(null===r&&(r=o.call(ni,t-1,n-1));r&&r.shadowRoot&&r.shadowRoot.elementFromPoint;){var i=r.shadowRoot.elementFromPoint(t,n);if(!i||r===i)break;r=i}return r}function Qn(e,t){return Gt.create({top:e.top-t.top,left:e.left-t.left,right:t.right-e.right,bottom:t.bottom-e.bottom}).sub(t.border).sub(t.scrollbar).round(Math.ceil,Math.floor)}function $n(e){var t=/^touch/.test(e.type)&&e.targetTouches?e.targetTouches[0]||e.changedTouches[0]:e,n=0===t.pageX&&0===t.pageY,o=0!==t.clientX||0!==t.clientY;if((null===t.pageX||n&&o)&&null!==t.clientX){var r=oe(e.target||e.srcElement),i=r.documentElement,a=r.body;return new Nn(Math.round(t.clientX+(i&&i.scrollLeft||a&&a.scrollLeft||0)-(i.clientLeft||0)),Math.round(t.clientY+(i&&i.scrollTop||a&&a.scrollTop||0)-(i.clientTop||0)))}return new Nn(Math.round(t.pageX),Math.round(t.pageY))}function Zn(e){return!oo(e)}function eo(e){return"hidden"===dn(e,"visibility")}function to(e){return"collapse"===dn(e,"visibility")}function no(e){return"none"===dn(e,"display")}function oo(e){return!pt(e)&&(eo(e)||to(e)||no(e))}function ro(e){var t=zn(e);return 0===t.width||0===t.height}function io(e){return e.replace(/.*The/,"its")}var ao=Object.freeze({__proto__:null,getElementRectangle:zn,getOffsetPosition:Jn,offsetToClientCoords:Kn,getClientDimensions:Yn,getElementFromPoint:Xn,calcRelativePosition:Qn,getIframeClientCoordinates:function(e){var t=Jn(e),n=t.left,o=t.top,r=Kn({x:n,y:o}),i=Jt(e),a=Xt(e),l=r.x+i.left+a.left,s=r.y+i.top+a.top;return new Gt(s,l+nn(e),s+on(e),l)},containsOffset:function(e,t,n){var o=Yn(e),r=Math.max(e.scrollWidth,o.width),i=Math.max(e.scrollHeight,o.height),a=o.scrollbar.right+o.border.left+o.border.right+r,l=o.scrollbar.bottom+o.border.top+o.border.bottom+i;return(void 0===t||0<=t&&t<=a)&&(void 0===n||0<=n&&n<=l)},getEventAbsoluteCoordinates:function(e){var t,n,o,r=e.target||e.srcElement,i=$n(e),a=oe(r),l=0,s=0;return!ae(a.documentElement)||(t=le(a))&&(n=Jn(t),o=Jt(t),l=n.left+o.left,s=n.top+o.top),new Nn(i.x+l,i.y+s)},getEventPageCoordinates:$n,getIframePointRelativeToParentFrame:function(e,t){var n=at(t),o=Jn(n),r=Jt(n),i=Xt(n);return Kn({x:e.x+o.left+r.left+i.left,y:e.y+o.top+r.top+i.top})},findCenter:function(e){var t=zn(e);return new Nn(Math.round(t.left+t.width/2),Math.round(t.top+t.height/2))},getClientPosition:function(e){var t=Jn(e),n=t.left,o=t.top,r=Kn({x:n,y:o});return r.x=Math.round(r.x),r.y=Math.round(r.y),r},isInRectangle:function(e,t){var n=e.x,o=e.y;return n>=t.left&&n<=t.right&&o>=t.top&&o<=t.bottom},getWindowPosition:function(){var e=ti.screenLeft||ti.screenX,t=ti.screenTop||ti.screenY;return new Nn(e,t)},isIframeVisible:Zn,isElementVisible:function e(t){if(!He(t)&&!he(t))return!1;if(Ne(t)||"optgroup"===ze(t))return Dn.isOptionElementVisible(t);if(me(t))return Zn(t);if(Re(t))return!Ye(t,!0,oo)&&!ro(t);if(he(t))return!vn(t);if(!We(t)&&ro(t))return!1;if(Me(t)){var n=je(Je(t,"map"));return!!n&&e(n)}return yn(t)&&!oo(t)},getSubHiddenReason:io,getHiddenReason:function e(t,n){if(void 0===n&&(n="action target"),!t)return null;var o=he(t);if(!He(t)&&!o)return Un.notElementOrTextNode(n);var r=o?t.data:jn(t),i=t.offsetHeight,a=t.offsetWidth;if((Ne(t)||"optgroup"===ze(t))&&!Dn.isOptionElementVisible(t)){var l=jn(ue(t));return Un.optionNotVisible(r,n,l)}if(Me(t)){var s=io(e(je(Je(t,"map")),"container")||"");return Un.mapContainerNotVisible(r,s)}var u=Ye(t,!1,eo);if(u)return Un.parentHasVisibilityHidden(r,n,jn(u));var c=Ye(t,!1,to);if(c)return Un.parentHasVisibilityCollapse(r,n,jn(c));var d=Ye(t,!1,no);return d?Un.parentHasDisplayNone(r,n,jn(d)):eo(t)?Un.elHasVisibilityHidden(r,n):to(t)?Un.elHasVisibilityCollapse(r,n):no(t)?Un.elHasDisplayNone(r,n):he(t)&&!pe(t)?Un.elNotRendered(r,n):!We(t)&&ro(t)||!yn(t)?Un.elHasWidthOrHeightZero(r,n,a,i):null},getElOutsideBoundsReason:function e(t,n){void 0===n&&(n="action target");var o=jn(t);if(Me(t)){var r=io(e(je(Je(t,"map")),"container")||"");return Un.mapContainerNotVisible(o,r)}return Un.elOutsideBounds(o,n)}});function lo(n,o){return v(this,void 0,void 0,function(){var t;return y(this,function(e){switch(e.label){case 0:t=0,e.label=1;case 1:return t<n?[4,o(t)]:[3,4];case 2:e.sent(),e.label=3;case 3:return t++,[3,1];case 4:return[2]}})})}var so=Object.freeze({__proto__:null,whilst:function(t,n){return v(this,void 0,void 0,function(){return y(this,function(e){switch(e.label){case 0:return t()?[4,n()]:[3,2];case 1:return e.sent(),[3,0];case 2:return[2]}})})},times:lo,each:function(r,i){return v(this,void 0,void 0,function(){var t,n,o;return y(this,function(e){switch(e.label){case 0:t=0,n=r,e.label=1;case 1:return t<n.length?(o=n[t],[4,i(o)]):[3,4];case 2:e.sent(),e.label=3;case 3:return t++,[3,1];case 4:return[2]}})})}}),uo=o.default.Promise,co=o.default.eventSandbox.message;function fo(e,o,t){return new uo(function(n){co.on(co.SERVICE_MSG_RECEIVED_EVENT,function e(t){t.message.cmd===o&&(co.off(co.SERVICE_MSG_RECEIVED_EVENT,e),n(t.message))}),co.sendServiceMsg(e,t)})}var ho=(po._isScrollValuesChanged=function(e,t){return ln(e)!==t.left||sn(e)!==t.top},po.prototype._setScroll=function(e,t){var n=this,o=t.left,r=t.top,i=xe(e)?oe(e):e,a={left:ln(i),top:sn(i)},o=Math.max(o,0),r=Math.max(r,0),l=qt.waitForScroll(i);return un(i,o),cn(i,r),po._isScrollValuesChanged(i,a)?l=l.then(function(){n._scrollWasPerformed||(n._scrollWasPerformed=po._isScrollValuesChanged(i,a))}):(l.cancel(),c.Promise.resolve())},po.prototype._getScrollToPoint=function(e,t,n){var o=Math.floor(e.width/2),r=Math.floor(e.height/2),i=this._scrollToCenter?o:Math.min(n.left,o),a=this._scrollToCenter?r:Math.min(n.top,r),l=e.scroll,s=l.left,u=l.top,c=t.x>=s+e.width-i,d=t.x<=s+i,f=t.y>=u+e.height-a,h=t.y<=u+a;return c?s=t.x-e.width+i:d&&(s=t.x-i),f?u=t.y-e.height+a:h&&(u=t.y-a),{left:s,top:u}},po.prototype._getScrollToFullChildView=function(e,t,n){var o,r,i,a,l={left:null,top:null},s=e.width>=t.width,u=e.height>=t.height,c=Qn(t,e);return s&&(o=e.width-t.width,r=Math.min(n.left,o),this._scrollToCenter&&(r=o/2),c.left<r?l.left=Math.round(e.scroll.left+c.left-r):c.right<r&&(l.left=Math.round(e.scroll.left+Math.min(c.left,-c.right)+r))),u&&(i=e.height-t.height,a=Math.min(n.top,i),this._scrollToCenter&&(a=i/2),c.top<a?l.top=Math.round(e.scroll.top+c.top-a):c.bottom<a&&(l.top=Math.round(e.scroll.top+Math.min(c.top,-c.bottom)+a))),l},po._getChildPoint=function(e,t,n){return Nn.create(t).sub(Nn.create(e)).add(Nn.create(e.scroll)).add(Nn.create(t.border)).add(n)},po.prototype._getScrollPosition=function(e,t,n,o){var r=po._getChildPoint(e,t,n),i=this._getScrollToPoint(e,r,o),a=this._getScrollToFullChildView(e,t,o);return{left:Math.max(null===a.left?i.left:a.left,0),top:Math.max(null===a.top?i.top:a.top,0)}},po._getChildPointAfterScroll=function(e,t,n,o){return Nn.create(t).add(Nn.create(e.scroll)).sub(Nn.create(n)).add(o)},po.prototype._isChildFullyVisible=function(e,t,n){var o=po._getChildPointAfterScroll(e,t,e.scroll,n),r=this._getScrollPosition(e,t,n,{left:0,top:0}),i=r.left,a=r.top;return!this._isTargetElementObscuredInPoint(o)&&i===e.scroll.left&&a===e.scroll.top},po.prototype._scrollToChild=function(e,t,n){for(var o=Yn(e),r=Yn(t),i=rn(ti),a=an(ti),l=o.scroll,s=!this._isChildFullyVisible(o,r,n);s;){l=this._getScrollPosition(o,r,n,this._maxScrollMargin);var u=po._getChildPointAfterScroll(o,r,l,n),c=this._isTargetElementObscuredInPoint(u);this._maxScrollMargin.left+=20,this._maxScrollMargin.left>=i&&(this._maxScrollMargin.left=50,this._maxScrollMargin.top+=20),s=c&&this._maxScrollMargin.top<a}return this._maxScrollMargin={left:50,top:50},this._setScroll(e,l)},po.prototype._scrollElement=function(){if(!xn(this._element))return c.Promise.resolve();var e=Yn(this._element),t=this._getScrollToPoint(e,this._offsets,this._maxScrollMargin);return this._setScroll(this._element,t)},po.prototype._scrollParents=function(){var t,n,o=this,r=An(this._element),i=this._element,e=ln(i),a=sn(i),l=Nn.create(this._offsets).sub(new Nn(e,a).round()),s=lo(r.length,function(e){return o._scrollToChild(r[e],i,l).then(function(){t=Yn(i),n=Yn(r[e]),l.add(Nn.create(t)).sub(Nn.create(n)).add(Nn.create(n.border)),i=r[e]})}),u={scrollWasPerformed:this._scrollWasPerformed,offsetX:l.x,offsetY:l.y,maxScrollMargin:this._maxScrollMargin};return s.then(function(){var e;if(!o._skipParentFrames&&(e=ti).top!==e)return u.cmd=po.SCROLL_REQUEST_CMD,fo(u,po.SCROLL_RESPONSE_CMD,ti.parent)}).then(function(){return o._scrollWasPerformed})},po._getPinnedElementAncestorOrSelf=function(e,t){return Ye(e,!0,t)},po.prototype._isTargetElementObscuredInPointByElement=function(e,t){var n=po._getPinnedElementAncestorOrSelf(e,t);return!!n&&!n.contains(this._element)},po.prototype._isTargetElementObscuredInPoint=function(e){var t=Xn(e);return!!t&&(this._isTargetElementObscuredInPointByElement(t,bn)||this._isTargetElementObscuredInPointByElement(t,Cn))},po.prototype.run=function(){var e=this;return this._scrollElement().then(function(){return e._scrollParents()})},po.SCROLL_REQUEST_CMD="automation|scroll|request",po.SCROLL_RESPONSE_CMD="automation|scroll|response",po);function po(e,t,n){this._element=e,this._offsets=new Nn(t.offsetX,t.offsetY),this._scrollToCenter=!!t.scrollToCenter,this._skipParentFrames=!!t.skipParentFrames,this._maxScrollMargin=n||{left:50,top:50},this._scrollWasPerformed=!1}function mo(e){var t=c.nativeMethods.nodeChildNodesGetter.call(e);return!st(t)&&Ro(e)?e:Q(t,Ro)}function go(e){return Q(c.nativeMethods.nodeChildNodesGetter.call(e),function(e){return Ro(e)||!Mo(e)&&go(e)})}function Eo(e){return he(e)||fe(e)&&en(e)}function vo(e){var t=c.nativeMethods.nodeChildNodesGetter.call(e);return H(t,Eo)}function yo(e){var t=c.nativeMethods.nodeChildNodesGetter.call(e);return j(t,Eo)}function bo(e){var t=c.nativeMethods.nodeChildNodesGetter.call(e);return j(t,function(e){return Do(e,!0)})}function Co(e,t){var n,o;if(!De(e)&&!De(t)){var r=c.nativeMethods.nodeChildNodesGetter.call(t);return!ot(t,e)&&st(r)&&/div|p/.test(ze(t))&&(n=go(e))&&!ot(t,n)&&(o=To(n))&&!ot(t,o)&&mo(t)}}function So(e,t){var n,o,r,i=pe(t);if(!De(e)&&!De(t)){var a=c.nativeMethods.nodeChildNodesGetter.call(t);if(!ot(t,e)&&(i&&fe(t)&&st(a)&&!/div|p/.test(ze(t))||Ro(t)&&!ot(t,e)&&t.nodeValue.length)){if(i&&fe(t)){if(!(n=go(e))||ot(t,n))return;if(!(o=To(n))||ot(t,o))return}return(r=function(e){for(var t=null,n=e;!t&&(n=n.previousSibling);)if(!Mo(n)&&!No(n)){t=n;break}return t}(t))&&fe(r)&&/div|p/.test(ze(r))&&mo(r)}}}function wo(e,t){var n,o,r=c.nativeMethods.nodeChildNodesGetter.call(e),i=st(r),a=null,l=t?Ro:he;if(!i&&l(e))return e;for(var s=0;s<i;s++){if(n=r[s],o=fe(n)&&!We(n),l(n))return n;if(pe(n)&&yo(n)&&!o&&(a=wo(n,t)))return a}return a}function To(e){return wo(e,!0)}function _o(e,t){var n,o,r=c.nativeMethods.nodeChildNodesGetter.call(e),i=st(r),a=null;if(!i&&Ro(e))return e;for(var l=i-1;0<=l;l--){if(n=r[l],o=fe(n)&&!We(n),he(n)&&(!t||!No(n)))return n;if(pe(n)&&yo(n)&&!o&&(a=_o(n,!1)))return a}return a}function Io(e,t){if(!e||!e.length)return 0;for(var n=e.length,o=t||0,r=o;r<n&&(10===e.charCodeAt(r)||32===e.charCodeAt(r));r++)o++;return o}function Po(e){if(!e||!e.length)return 0;for(var t=e.length,n=t,o=t-1;0<=o&&(10===e.charCodeAt(o)||32===e.charCodeAt(o));o--)n--;return n}function No(e){if(!he(e))return!1;var t=e.nodeValue,n=Io(t),o=Po(t);return n===t.length&&0===o}function Ro(e){return he(e)&&!No(e)}function Mo(e){return!pe(e)||De(e)}function Oo(e){var t=e.getAttribute?e.getAttribute("contenteditable"):null;return""===t||"true"===t}function xo(e){var t=Ke(e);if(Oo(e)&&We(e))return e;var n=oe(e);return"on"===n.designMode?n.body:Q(t,function(e){return Oo(e)&&We(e)})}function Ao(e,t){if(ot(e,t))return ot(t,xo(e))?e:c.nativeMethods.nodeParentNodeGetter.call(e);var n=[],o=xo(e),r=null;if(!tt(o,t))return null;for(r=e;r!==o;r=c.nativeMethods.nodeParentNodeGetter.call(r))n.push(r);for(r=t;r!==o;r=c.nativeMethods.nodeParentNodeGetter.call(r))if(-1!==G(n,r))return r;return o}function Fo(e,t){if(De(e))return{node:e,offset:t};var n=c.nativeMethods.nodeChildNodesGetter.call(e),o=st(n),r=o<=t,i=n[t],a=0;if(De(i)){if(o<=1)return{node:e,offset:0};(r=o<=t-1)?i=n[o-2]:(i=n[t-1],a=0)}for(;!Mo(i)&&fe(i);){var l=vo(i);if(!l.length){a=0;break}i=l[r?l.length-1:0]}return 0===a||Mo(i)||(a=i.nodeValue?i.nodeValue.length:0),{node:i,offset:a}}function Lo(e,t,n){var o=n?t.focusNode:t.anchorNode,r=n?t.focusOffset:t.anchorOffset,i={node:o,offset:r};return(ot(e,o)||fe(o))&&bo(o)&&(i=Fo(o,r)),{node:i.node,offset:i.offset}}function Vo(e,t,n){var o=n?t.anchorNode:t.focusNode,r=n?t.anchorOffset:t.focusOffset,i={node:o,offset:r};return(ot(e,o)||fe(o))&&bo(o)&&(i=Fo(o,r)),{node:i.node,offset:i.offset}}function Wo(e,t,n){return Uo(e,Lo(e,t,n))}function Ho(e,t,n){return Uo(e,Vo(e,t,n))}function Do(e,t){if(vn(e))return!1;if(he(e))return!0;if(!fe(e))return!1;if(bo(e))return t;var n=c.nativeMethods.nodeParentNodeGetter.call(e),o=!We(n),r=vo(e),i=j(r,function(e){return"br"===ze(e)});return o||i}function ko(l,e){var s={node:null,offset:e};return function e(t){var n,o,r=c.nativeMethods.nodeChildNodesGetter.call(t),i=st(r);if(s.node)return s;if(Mo(t))return s;if(he(t)){if(s.offset<=t.nodeValue.length)return s.node=t,s;t.nodeValue.length&&(!s.node&&So(l,t)&&s.offset--,s.offset-=t.nodeValue.length)}else if(fe(t)){if(!Eo(t))return s;if(0===s.offset&&Do(t,!1))return s.node=t,s.offset=(n=t,o=0,Q(c.nativeMethods.nodeChildNodesGetter.call(n),function(e,t){return o=t,"br"===ze(e)})?o:0),s;(s.node||!Co(l,t)&&!So(l,t))&&(i||"br"!==ze(t))||s.offset--}for(var a=0;a<i;a++)s=e(r[a]);return s}(l)}function Uo(i,e){var a=e.node,l=e.offset,s=0,u=!1;return function e(t){var n=c.nativeMethods.nodeChildNodesGetter.call(t),o=st(n);if(u)return s;if(ot(a,t))return(Co(i,t)||So(i,t))&&s++,u=!0,s+l;if(Mo(t))return s;!o&&t.nodeValue&&t.nodeValue.length?(!u&&So(i,t)&&s++,s+=t.nodeValue.length):(!o&&fe(t)&&"br"===ze(t)||!u&&(Co(i,t)||So(i,t)))&&s++;for(var r=0;r<o;r++)s=e(n[r]);return s}(i)}function Bo(e){var t,n,o,r,i,a=he(e)?e:_o(e,!0);if(!a||(t=a,o=he(n=e)?n:wo(n,!1),r=t===o,i=t.nodeValue===String.fromCharCode(10),r&&i&&function(e,t){for(var n=["pre","pre-wrap","pre-line"];e!==t;)if(e=c.nativeMethods.nodeParentNodeGetter.call(e),-1<G(n,dn(e,"white-space")))return 1}(t,n)))return 0;var l=oe(e).createRange();return l.selectNodeContents(a),Uo(e,{node:a,offset:l.endOffset})}var qo=Object.freeze({__proto__:null,getFirstVisibleTextNode:To,getLastTextNode:_o,getFirstNonWhitespaceSymbolIndex:Io,getLastNonWhitespaceSymbolIndex:Po,isInvisibleTextNode:No,findContentEditableParent:xo,getNearestCommonAncestor:Ao,getSelection:function(e,t,n){return{startPos:Lo(e,t,n),endPos:Vo(e,t,n)}},getSelectionStartPosition:Wo,getSelectionEndPosition:Ho,calculateNodeAndOffsetByPosition:ko,calculatePositionByNodeAndOffset:Uo,getElementBySelection:function(e){var t=Ao(e.anchorNode,e.focusNode);return he(t)?t.parentElement:t},getFirstVisiblePosition:function(e){var t=he(e)?e:To(e),n=oe(e).createRange();return t?(n.selectNodeContents(t),Uo(e,{node:t,offset:n.startOffset})):0},getLastVisiblePosition:Bo,getContentEditableValue:function(e){return D(function e(t){var n=[],o=c.nativeMethods.nodeChildNodesGetter.call(t),r=st(o);Mo(t)||r||!he(t)||n.push(t);for(var i=0;i<r;i++)n=n.concat(e(o[i]));return n}(e),function(e){return e.nodeValue}).join("")}}),Go=o.default.utils.browser,jo=o.default.eventSandbox.selection,zo="backward",Jo="forward",Ko="none";function Yo(e,t,n,o){var r,i,a,l=null,s=null,u=!1;void 0!==t&&void 0!==n&&n<t&&(a=t,t=n,n=a,u=!0),void 0===t&&(s={node:(r=To(e))||e,offset:r&&r.nodeValue?Io(r.nodeValue):0}),void 0===n&&(l={node:(i=_o(e,!0))||e,offset:i&&i.nodeValue?Po(i.nodeValue):0}),s=s||ko(e,t),l=l||ko(e,n),s.node&&l.node&&(u?tr(l,s,o):tr(s,l,o))}function Xo(e){var t=e?oe(e):ni,n=t.getSelection(),o=null,r=!1;return n&&(n.isCollapsed||((o=t.createRange()).setStart(n.anchorNode,n.anchorOffset),o.setEnd(n.focusNode,n.focusOffset),r=o.collapsed,o.detach())),r}function Qo(e,t,n){var o=Uo(e,t);return Uo(e,n)<o}function $o(e){return We(e)?nr(e)?Wo(e,er(e),Xo(e)):0:jo.getSelection(e).start}function Zo(e){return We(e)?nr(e)?Ho(e,er(e),Xo(e)):0:jo.getSelection(e).end}function er(e){var t=oe(e);return t?t.getSelection():ti.getSelection()}function tr(e,t,n){var o=e.node,r=t.node,i=o.nodeValue?o.length:0,a=r.nodeValue?r.length:0,l=e.offset,s=t.offset;fe(o)&&l||(l=Math.min(i,e.offset)),fe(r)&&s||(s=Math.min(a,t.offset));var u=xo(o),c=Qo(u,e,t),d=er(u),f=oe(u).createRange();jo.wrapSetterSelection(u,function(){var e;d.removeAllRanges(),c?(f.setStart(o,l),f.setEnd(o,l),d.addRange(f),e=function(e,t){try{d.extend(e,t)}catch(e){return!1}return!0},(Go.isSafari||Go.isChrome&&Go.version<58)&&No(r)?e(r,Math.min(s,1))||e(r,0):e(r,s)):(f.setStart(o,l),f.setEnd(r,s),d.addRange(f))},n,!0)}function nr(e){var t=er(e);return!(!t.anchorNode||!t.focusNode)&&tt(e,t.anchorNode)&&tt(e,t.focusNode)}var or,rr,ir=Object.freeze({__proto__:null,hasInverseSelectionContentEditable:Xo,isInverseSelectionContentEditable:Qo,getSelectionStart:$o,getSelectionEnd:Zo,hasInverseSelection:function(e){return We(e)?Xo(e):(jo.getSelection(e).direction||Ko)===zo},getSelectionByElement:er,select:function(e,t,n){var o,r,i,a;We(e)?Yo(e,t,n,!0):(o=t||0,i=!1,a=null,(r=void 0===n?ht(e).length:n)<o&&(a=o,o=r,r=a,i=!0),jo.setSelection(e,o,r,i?zo:Jo),Ko=t===n?"none":i?zo:Jo)},selectByNodesAndOffsets:tr,deleteSelectionContents:function(e,t){var n,o,r,i,a,l,s,u,c,d,f,h,p=$o(e),m=Zo(e);t&&Yo(e),p!==m&&(n=er(e),o=n.anchorNode,r=n.focusNode,i=n.anchorOffset,a=n.focusOffset,l=Io(o.nodeValue),s=Po(o.nodeValue),u=Io(r.nodeValue),c=Po(r.nodeValue),f=d=null,he(o)&&(i<l&&0!==i?d=0:i!==o.nodeValue.length&&(No(o)&&0!==i||s<i)&&(d=o.nodeValue.length)),he(r)&&(a<u&&0!==a?f=0:a!==r.nodeValue.length&&(No(r)&&0!==a||c<a)&&(f=r.nodeValue.length)),Go.isWebKit&&(null!==d&&(o.nodeValue=0===d?o.nodeValue.substring(l):o.nodeValue.substring(0,s)),null!==f&&(r.nodeValue=0===f?r.nodeValue.substring(u):r.nodeValue.substring(0,c))),null===d&&null===f||tr({node:o,offset:d=null!==d?0===d?d:o.nodeValue.length:i},{node:r,offset:f=null!==f?0===f?f:r.nodeValue.length:a}),function(e){var t=er(e),n=t.rangeCount;if(n)for(var o=0;o<n;o++)t.getRangeAt(o).deleteContents()}(e),(h=er(e)).rangeCount&&!h.getRangeAt(0).collapsed&&h.getRangeAt(0).collapse(!0))},setCursorToLastVisiblePosition:function(e){var t=Bo(e);Yo(e,t,t)},hasElementContainsSelection:nr}),ar=o.default.Promise,lr=o.default.nativeMethods,sr={cannotCreateMultipleLiveModeRunners:"E1000",cannotRunLiveModeRunnerMultipleTimes:"E1001",browserDisconnected:"E1002",cannotRunAgainstDisconnectedBrowsers:"E1003",cannotEstablishBrowserConnection:"E1004",cannotFindBrowser:"E1005",browserProviderNotFound:"E1006",browserNotSet:"E1007",testFilesNotFound:"E1008",noTestsToRun:"E1009",cannotFindReporterForAlias:"E1010",multipleSameStreamReporters:"E1011",optionValueIsNotValidRegExp:"E1012",optionValueIsNotValidKeyValue:"E1013",invalidSpeedValue:"E1014",invalidConcurrencyFactor:"E1015",cannotDivideRemotesCountByConcurrency:"E1016",portsOptionRequiresTwoNumbers:"E1017",portIsNotFree:"E1018",invalidHostname:"E1019",cannotFindSpecifiedTestSource:"E1020",clientFunctionCodeIsNotAFunction:"E1021",selectorInitializedWithWrongType:"E1022",clientFunctionCannotResolveTestRun:"E1023",regeneratorInClientFunctionCode:"E1024",invalidClientFunctionTestRunBinding:"E1025",invalidValueType:"E1026",unsupportedUrlProtocol:"E1027",testControllerProxyCannotResolveTestRun:"E1028",timeLimitedPromiseTimeoutExpired:"E1029",noTestsToRunDueFiltering:"E1030",cannotSetVideoOptionsWithoutBaseVideoPathSpecified:"E1031",multipleAPIMethodCallForbidden:"E1032",invalidReporterOutput:"E1033",cannotReadSSLCertFile:"E1034",cannotPrepareTestsDueToError:"E1035",cannotParseRawFile:"E1036",testedAppFailedWithError:"E1037",unableToOpenBrowser:"E1038",requestHookConfigureAPIError:"E1039",forbiddenCharatersInScreenshotPath:"E1040",cannotFindFFMPEG:"E1041",compositeArgumentsError:"E1042",cannotFindTypescriptConfigurationFile:"E1043",clientScriptInitializerIsNotSpecified:"E1044",clientScriptBasePathIsNotSpecified:"E1045",clientScriptInitializerMultipleContentSources:"E1046",cannotLoadClientScriptFromPath:"E1047",clientScriptModuleEntryPointPathCalculationError:"E1048",methodIsNotAvailableForAnIPCHost:"E1049",tooLargeIPCPayload:"E1050",malformedIPCMessage:"E1051",unexpectedIPCHeadPacket:"E1052",unexpectedIPCBodyPacket:"E1053",unexpectedIPCTailPacket:"E1054",cannotRunLocalNonHeadlessBrowserWithoutDisplay:"E1057",uncaughtErrorInReporter:"E1058",roleInitializedWithRelativeUrl:"E1059",typeScriptCompilerLoadingError:"E1060",cannotCustomizeSpecifiedCompilers:"E1061",cannotEnableRetryTestPagesOption:"E1062",browserConnectionError:"E1063",testRunRequestInDisconnectedBrowser:"E1064",invalidQuarantineOption:"E1065",invalidQuarantineParametersRatio:"E1066",invalidAttemptLimitValue:"E1067",invalidSuccessThresholdValue:"E1068",cannotSetConcurrencyWithCDPPort:"E1069",cannotFindTestcafeConfigurationFile:"E1070",requestUrlInvalidValueError:"E1072",requestRuntimeError:"E1073",requestCannotResolveTestRun:"E1074",relativeBaseUrl:"E1075",invalidSkipJsErrorsOptionsObjectProperty:"E1076",invalidSkipJsErrorsCallbackWithOptionsProperty:"E1077",invalidCommandInJsonCompiler:"E1078",invalidCustomActionsOptionType:"E1079",invalidCustomActionType:"E1080",cannotImportESMInCommonsJS:"E1081",setNativeAutomationForUnsupportedBrowsers:"E1082",cannotReadConfigFile:"E1083",cannotParseConfigFile:"E1084",cannotRunLegacyTestsInNativeAutomationMode:"E1085",setUserProfileInNativeAutomation:"E1086"};(rr=or=or||{}).TooHighConcurrencyFactor="TooHighConcurrencyFactor",rr.UseBrowserInitOption="UseBrowserInitOption",rr.RestErrorCauses="RestErrorCauses";var ur,cr,dr,fr,hr,pr=or,mr=", ",gr='"';function Er(e,t){return"".concat(t).concat(e).concat(t)}function vr(e,t,n){void 0===t&&(t=mr),void 0===n&&(n=gr);var o=b([],e,!0);if(-1<t.indexOf("\n"))return o.map(function(e){return Er(e,n)}).join(t);if(1===o.length)return Er(o[0],n);if(2===o.length){var r=e[0],i=e[1];return"".concat(Er(r,n)," and ").concat(Er(i,n))}var a=o.pop(),l=o.map(function(e){return Er(e,n)}).join(t);return"".concat(l,", and ").concat(Er(a,n))}(cr=ur=ur||{}).message="message",cr.stack="stack",cr.pageUrl="pageUrl",(fr=dr=dr||{}).fn="fn",fr.dependencies="dependencies";var yr,br="https://testcafe.io/documentation/402639/reference/command-line-interface#file-pathglob-pattern",Cr="https://testcafe.io/documentation/402638/reference/configuration-file#filter",Sr="https://testcafe.io/documentation/402828/guides/concepts/browsers#test-in-headless-mode",wr="https://testcafe.io/documentation/404150/guides/advanced-guides/custom-test-actions",Tr=((hr={})[sr.cannotCreateMultipleLiveModeRunners]="Cannot launch multiple live mode instances of the TestCafe test runner.",hr[sr.cannotRunLiveModeRunnerMultipleTimes]="Cannot launch the same live mode instance of the TestCafe test runner multiple times.",hr[sr.browserDisconnected]="The {userAgent} browser disconnected. If you did not close the browser yourself, browser performance or network issues may be at fault.",hr[sr.cannotRunAgainstDisconnectedBrowsers]="The following browsers disconnected: {userAgents}. Cannot run further tests.",hr[sr.testRunRequestInDisconnectedBrowser]='"{browser}" disconnected during test execution.',hr[sr.cannotEstablishBrowserConnection]="Cannot establish one or more browser connections.",hr[sr.cannotFindBrowser]='Cannot find the browser. "{browser}" is neither a known browser alias, nor a path to an executable file.',hr[sr.browserProviderNotFound]='Cannot find the "{providerName}" browser provider.',hr[sr.browserNotSet]="You have not specified a browser.",hr[sr.testFilesNotFound]='Could not find test files at the following location: "{cwd}".\nCheck patterns for errors:\n\n{sourceList}\n\nor launch TestCafe from a different directory.\n'+"For more information on how to specify test locations, see ".concat(br,"."),hr[sr.noTestsToRun]="Source files do not contain valid 'fixture' and 'test' declarations.",hr[sr.noTestsToRunDueFiltering]="No tests match your filter.\n"+"See ".concat(Cr,"."),hr[sr.multipleSameStreamReporters]='Reporters cannot share output streams. The following reporters interfere with one another: "{reporters}".',hr[sr.optionValueIsNotValidRegExp]='The "{optionName}" option does not contain a valid regular expression.',hr[sr.optionValueIsNotValidKeyValue]='The "{optionName}" option does not contain a valid key-value pair.',hr[sr.invalidQuarantineOption]='The "{optionName}" option does not exist. Specify "attemptLimit" and "successThreshold" to configure quarantine mode.',hr[sr.invalidQuarantineParametersRatio]='The value of "attemptLimit" ({attemptLimit}) should be greater then the value of "successThreshold" ({successThreshold}).',hr[sr.invalidAttemptLimitValue]='The "{attemptLimit}" parameter only accepts values of {MIN_ATTEMPT_LIMIT} and up.',hr[sr.invalidSuccessThresholdValue]='The "{successThreshold}" parameter only accepts values of {MIN_SUCCESS_THRESHOLD} and up.',hr[sr.invalidSpeedValue]="Speed should be a number between 0.01 and 1.",hr[sr.invalidConcurrencyFactor]="The concurrency factor should be an integer greater than or equal to 1.",hr[sr.cannotDivideRemotesCountByConcurrency]="The number of remote browsers should be divisible by the concurrency factor.",hr[sr.cannotSetConcurrencyWithCDPPort]='The value of the "concurrency" option includes the CDP port.',hr[sr.portsOptionRequiresTwoNumbers]='The "--ports" option requires two arguments.',hr[sr.portIsNotFree]="Port {portNum} is occupied by another process.",hr[sr.invalidHostname]='Cannot resolve hostname "{hostname}".',hr[sr.cannotFindSpecifiedTestSource]='Cannot find a test file at "{path}".',hr[sr.clientFunctionCodeIsNotAFunction]="Cannot initialize a ClientFunction because {#instantiationCallsiteName} is {type}, and not a function.",hr[sr.selectorInitializedWithWrongType]="Cannot initialize a Selector because {#instantiationCallsiteName} is {type}, and not one of the following: a CSS selector string, a Selector object, a node snapshot, a function, or a Promise returned by a Selector.",hr[sr.clientFunctionCannotResolveTestRun]="{#instantiationCallsiteName} does not have test controller access. To execute {#instantiationCallsiteName} from a Node.js API callback, bind the test controller object to the function with the `.with({ boundTestRun: t })` method. Note that you cannot execute {#instantiationCallsiteName} outside test code.",hr[sr.requestCannotResolveTestRun]='"request" does not have test controller access.',hr[sr.regeneratorInClientFunctionCode]='{#instantiationCallsiteName} code, arguments or dependencies cannot contain generators or "async/await" syntax (use Promises instead).',hr[sr.invalidClientFunctionTestRunBinding]='Cannot resolve the "boundTestRun" option because its value is not a test controller.',hr[sr.invalidValueType]="{smthg} ({actual}) is not of expected type ({type}).",hr[sr.unsupportedUrlProtocol]='Invalid {what}: "{url}". TestCafe cannot execute the test because the {what} includes the {protocol} protocol. TestCafe supports the following protocols: http://, https:// and file://.',hr[sr.testControllerProxyCannotResolveTestRun]="The action does not have implicit test controller access. Reference the 't' object to gain it.",hr[sr.timeLimitedPromiseTimeoutExpired]="A Promise timed out.",hr[sr.cannotSetVideoOptionsWithoutBaseVideoPathSpecified]="You cannot manage advanced video parameters when the video recording capability is off. Specify the root storage folder for video content to enable video recording.",hr[sr.multipleAPIMethodCallForbidden]='You cannot call the "{methodName}" method more than once. Specify an array of parameters instead.',hr[sr.invalidReporterOutput]="Specify a file name or a writable stream as the reporter's output target.",hr[sr.cannotReadSSLCertFile]='Unable to read the file referenced by the "{option}" ssl option ("{path}"). Error details:\n\n{err}',hr[sr.cannotPrepareTestsDueToError]="Cannot prepare tests due to the following error:\n\n{errMessage}",hr[sr.cannotParseRawFile]='Cannot parse a raw test file at "{path}" due to the following error:\n\n{errMessage}',hr[sr.testedAppFailedWithError]="The web application failed with the following error:\n\n{errMessage}",hr[sr.unableToOpenBrowser]='Unable to open the "{alias}" browser due to the following error:\n\n{errMessage}',hr[sr.requestHookConfigureAPIError]="Attempt to configure a request hook resulted in the following error:\n\n{requestHookName}: {errMsg}",hr[sr.forbiddenCharatersInScreenshotPath]='There are forbidden characters in the "{screenshotPath}" {screenshotPathType}:\n {forbiddenCharsDescription}',hr[sr.cannotFindFFMPEG]="TestCafe cannot record videos because it cannot locate the FFmpeg executable. Try one of the following solutions:\n\n* add the path of the FFmpeg installation directory to the PATH environment variable,\n* specify the path of the FFmpeg executable in the FFMPEG_PATH environment variable or the ffmpegPath option,\n* install the @ffmpeg-installer/ffmpeg npm package.",hr[sr.cannotReadConfigFile]='Failed to read the "{path}" configuration file from disk. Error details:\n\n{err}',hr[sr.cannotParseConfigFile]='Failed to parse the "{path}" configuration file. The file contains invalid JSON syntax. \n\nError details:\n\n{err}',hr[sr.cannotFindReporterForAlias]='Failed to load the "{name}" reporter. Please check the parameter for errors. Error details:\n\n{err}',hr[sr.cannotFindTypescriptConfigurationFile]='"{filePath}" is not a valid TypeScript configuration file.',hr[sr.clientScriptInitializerIsNotSpecified]="Initialize your client script with one of the following: a JavaScript script, a JavaScript file path, or the name of a JavaScript module.",hr[sr.clientScriptBasePathIsNotSpecified]="Specify the base path for the client script file.",hr[sr.clientScriptInitializerMultipleContentSources]="Client scripts can only have one initializer: JavaScript code, a JavaScript file path, or the name of a JavaScript module.",hr[sr.cannotLoadClientScriptFromPath]="Cannot load a client script from {path}.\n{errorMessage}",hr[sr.clientScriptModuleEntryPointPathCalculationError]="A client script tried to load a JavaScript module that TestCafe cannot locate:\n\n{errorMessage}.",hr[sr.methodIsNotAvailableForAnIPCHost]="This method cannot be called on a service host.",hr[sr.tooLargeIPCPayload]="The specified payload is too large to form an IPC packet.",hr[sr.malformedIPCMessage]="Cannot process a malformed IPC message.",hr[sr.unexpectedIPCHeadPacket]="Cannot create an IPC message due to an unexpected IPC head packet.",hr[sr.unexpectedIPCBodyPacket]="Cannot create an IPC message due to an unexpected IPC body packet.",hr[sr.unexpectedIPCTailPacket]="Cannot create an IPC message due to an unexpected IPC tail packet.",hr[sr.cannotRunLocalNonHeadlessBrowserWithoutDisplay]="Your Linux installation does not have a graphic subsystem to run {browserAlias} with a GUI. You can launch the browser in headless mode. If you use a portable browser executable, specify the browser alias before the path instead of the 'path' prefix. "+"For more information, see ".concat(Sr),hr[sr.uncaughtErrorInReporter]='The "{methodName}" method of the "{reporterName}" reporter produced an uncaught error. Error details:\n{originalError}',hr[sr.roleInitializedWithRelativeUrl]='Your Role includes a relative login page URL, but the "baseUrl" option is not set.\nUse an absolute URL or add the baseUrl option to your configuration file or CLI launch string.',hr[sr.typeScriptCompilerLoadingError]="Cannot load the TypeScript compiler.\n{originErrorMessage}.",hr[sr.cannotCustomizeSpecifiedCompilers]="You cannot specify options for the {noncustomizableCompilerList} compiler{suffix}.",hr[sr.cannotEnableRetryTestPagesOption]="Cannot enable the 'retryTestPages' option. Apply one of the following two solutions:\n-- set the 'hostname' option to 'localhost'\n-- run TestCafe over HTTPS\n",hr[sr.browserConnectionError]="{originErrorMessage}\n{numOfNotOpenedConnection} of {numOfAllConnections} browser connections have not been established:\n{listOfNotOpenedConnections}\n\nHints:\n{listOfHints}",hr[pr.TooHighConcurrencyFactor]="The host machine may not be powerful enough to handle the specified concurrency factor ({concurrencyFactor}). Decrease the concurrency factor or allocate more computing resources to the host machine.",hr[pr.UseBrowserInitOption]="Increase the Browser Initialization Timeout if its value is too low (currently: {browserInitTimeoutMsg}). The timeout determines how long TestCafe waits for browsers to be ready.",hr[pr.RestErrorCauses]="The error can also be caused by network issues or remote device failure. Make sure that your network connection is stable and you can reach the remote device.",hr[sr.cannotFindTestcafeConfigurationFile]="Cannot locate a TestCafe configuration file at {filePath}. Either the file does not exist, or the path is invalid.",hr[sr.relativeBaseUrl]='The value of the baseUrl argument cannot be relative: "{baseUrl}"',hr[sr.requestUrlInvalidValueError]="The request url is invalid ({actualValue}).",hr[sr.requestRuntimeError]="The request was interrupted by an error:\n{message}",hr[sr.invalidSkipJsErrorsOptionsObjectProperty]='The "{optionName}" option does not exist. Use the following options to configure skipJsErrors: '.concat(vr(Object.keys(ur)),"."),hr[sr.invalidSkipJsErrorsCallbackWithOptionsProperty]='The "{optionName}" option does not exist. Use the following options to configure skipJsErrors callbacks: '.concat(vr(Object.keys(dr)),"."),hr[sr.invalidCommandInJsonCompiler]='TestCafe terminated the test run. The "{path}" file contains an unknown Chrome User Flow action "{action}". Remove the action to continue. Refer to the following article for the definitive list of supported Chrome User Flow actions: https://testcafe.io/documentation/403998/guides/experimental-capabilities/chrome-replay-support#supported-replay-actions',hr[sr.invalidCustomActionsOptionType]="The value of the customActions option does not belong to type Object. Refer to the following article for custom action setup instructions: ".concat(wr),hr[sr.invalidCustomActionType]='TestCafe cannot parse the "{actionName}" action, because the action definition is invalid. Format the definition in accordance with the custom actions guide: '.concat(wr),hr[sr.cannotImportESMInCommonsJS]="Cannot import the {esModule} ECMAScript module from {targetFile}. Use a dynamic import() statement or enable the --esm CLI flag.",hr[sr.setNativeAutomationForUnsupportedBrowsers]='The "{browser}" do not support the Native Automation mode. Use the "disable native automation" option to continue.',hr[sr.cannotRunLegacyTestsInNativeAutomationMode]="TestCafe cannot run legacy tests in Native Automation mode. Disable native automation to continue.",hr[sr.setUserProfileInNativeAutomation]='Cannot initialize the test run. When TestCafe uses native automation, it can only launch browsers with an empty user profile. Disable native automation, or remove the "userProfile" suffix from the following browser aliases: "{browsers}".',hr[sr.timeLimitedPromiseTimeoutExpired]),_r=(E(Ir,yr=Error),Ir);function Ir(){var e=yr.call(this,Tr)||this;return e.code=sr.timeLimitedPromiseTimeoutExpired,e}function Pr(e){var t=e.replace(/^\+/g,"plus").replace(/\+\+/g,"+plus").split("+");return D(t,function(e){return e.replace("plus","+")})}function Nr(e){var t=1===e.length||"space"===e?e:e.toLowerCase();return s.modifiersMap[t]&&(t=s.modifiersMap[t]),t}var Rr,Mr,Or=o.default.utils.trim,xr={run:"run",idle:"idle"};(Mr=Rr=Rr||{}).ok="ok",Mr.closing="closing";var Ar=Rr,Fr="file://",Lr=ni.location.href,Vr=ni.location.origin,Wr=Vr+"/service-worker.js",Hr=!1,Dr=null,kr=eval;function Ur(t){return new d.default(function(e){return setTimeout(e,t)})}function Br(e,r,t){var n=void 0===t?{}:t,o=n.method,i=void 0===o?"GET":o,a=n.data,l=void 0===a?null:a,s=n.parseResponse,u=void 0===s||s;return new d.default(function(t,n){var o=r();o.open(i,e,!0),o.onreadystatechange=function(){var e;4===o.readyState&&(200===o.status?((e=o.responseText||"")&&u&&(e=JSON.parse(o.responseText)),t(e)):n("disconnected"))},o.send(l)})}function qr(e){return Lr.toLowerCase()===e.toLowerCase()}function Gr(){Hr=!1}function jr(e,t){Br(t.openFileProtocolUrl,t.createXHR,{method:"POST",data:JSON.stringify({url:e.url})})}function zr(e,t){var n,o,r,i,a;Gr(),void 0===(a=e.url)&&(a=""),0===a.indexOf(Fr)?jr(e,t):(o=t,r=(n=e).url.indexOf("#"),i=-1!==r&&n.url.slice(0,r)===Lr.slice(0,r),ni.location=n.url,o.nativeAutomation&&i&&ni.location.reload())}function Jr(e){return(e.cmd===xr.run||e.cmd===xr.idle)&&!qr(e.url)}function Kr(e,r,t){var i=e.statusUrl,a=e.openFileProtocolUrl,n=void 0===t?{}:t,l=n.manualRedirect,s=n.nativeAutomation;return v(this,void 0,void 0,function(){var n,o;return y(this,function(e){switch(e.label){case 0:return[4,Br(i,r)];case 1:return n=e.sent(),(o=s?(t=n).cmd!==xr.idle||Jr(t):Jr(n))&&!l&&zr(n,{createXHR:r,openFileProtocolUrl:a,nativeAutomation:s}),[2,{command:n,redirecting:o}]}var t})})}var Yr=Object.freeze({__proto__:null,delay:Ur,sendXHR:Br,startHeartbeat:function(e,t){function n(){Br(e,t).then(function(e){e.code!==Ar.closing||qr(e.url)||(Gr(),ni.location=e.url)})}Dr=ti.setInterval(n,2e3),n()},stopHeartbeat:function(){ti.clearInterval(Dr)},startInitScriptExecution:function(e,t){Hr=!0,function e(t,n){Hr&&Br(t,n).then(function(e){return e.code?Br(t,n,{method:"POST",data:JSON.stringify(kr(e.code))}):null}).then(function(){ti.setTimeout(function(){return e(t,n)},1e3)})}(e,t)},stopInitScriptExecution:Gr,redirectUsingCdp:jr,redirect:zr,checkStatus:function(){for(var r,i=[],e=0;e<arguments.length;e++)i[e]=arguments[e];return v(this,void 0,void 0,function(){var t,n,o;return y(this,function(e){switch(e.label){case 0:n=t=null,o=0,e.label=1;case 1:return o<5?[4,function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return v(this,void 0,void 0,function(){var t;return y(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,Kr.apply(void 0,n)];case 1:return[2,e.sent()];case 2:return t=e.sent(),console.error(t),[2,{error:t}];case 3:return[2]}})})}.apply(void 0,i)]:[3,5];case 2:return r=e.sent(),t=r.error,n=function(e,t){var n={};for(r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}(r,["error"]),t?[4,Ur(1e3)]:[2,n];case 3:e.sent(),e.label=4;case 4:return o++,[3,1];case 5:throw t}})})},enableRetryingTestPages:function(){return v(this,void 0,void 0,function(){var t;return y(this,function(e){switch(e.label){case 0:if(!navigator.serviceWorker)return[2];e.label=1;case 1:return e.trys.push([1,4,,5]),[4,navigator.serviceWorker.register(Wr,{scope:Vr})];case 2:return e.sent(),[4,navigator.serviceWorker.ready];case 3:return e.sent(),[3,5];case 4:return t=e.sent(),console.error(t),[3,5];case 5:return[2]}})})},getActiveWindowId:function(e,t){return Br(e,t)},setActiveWindowId:function(e,t,n){return Br(e,t,{method:"POST",data:JSON.stringify({windowId:n})})},ensureWindowInNativeAutomation:function(e,t,n){return Br(e,t,{method:"POST",data:JSON.stringify({windowId:n})})},closeWindow:function(e,t,n){return Br(e,t,{method:"POST",data:JSON.stringify({windowId:n})})},dispatchNativeAutomationEvent:function(n,o,r,i){return v(this,void 0,void 0,function(){var t;return y(this,function(e){switch(e.label){case 0:return t=JSON.stringify({type:r,options:i}),[4,Br(n,o,{method:"POST",data:t})];case 1:return e.sent(),[2]}})})},dispatchNativeAutomationEventSequence:function(t,n,o){return v(this,void 0,void 0,function(){return y(this,function(e){switch(e.label){case 0:return[4,Br(t,n,{method:"POST",data:JSON.stringify(o)})];case 1:return e.sent(),[2]}})})},parseSelector:function(e,t,n){return Br(e,t,{method:"POST",data:JSON.stringify({selector:n})})}}),Xr={};Xr.RequestBarrier=p,Xr.ClientRequestEmitter=P,Xr.ScriptExecutionBarrier=R,Xr.ScriptExecutionEmitter=L,Xr.pageUnloadBarrier=Ht,Xr.preventRealEvents=function(){Tn.initElementListening(ti,_n),Tn.addFirstInternalEventBeforeListener(ti,_n,Pn),qt.init()},Xr.disableRealEventsPreventing=function(){Tn.removeInternalEventBeforeListener(ti,_n,Pn)},Xr.scrollController=qt,Xr.ScrollAutomation=ho,Xr.selectController=Dn,Xr.serviceUtils=kt,Xr.domUtils=mt,Xr.contentEditable=qo,Xr.positionUtils=ao,Xr.styleUtils=Sn,Xr.scrollUtils=Fn,Xr.eventUtils=Rt,Xr.arrayUtils=$,Xr.promiseUtils=so,Xr.textSelection=ir,Xr.waitFor=function(i,a,l){return new ar(function(e,t){var n,o,r=i();r?e(r):(n=lr.setInterval.call(ti,function(){(r=i())&&(lr.clearInterval.call(ti,n),lr.clearTimeout.call(ti,o),e(r))},a),o=lr.setTimeout.call(ti,function(){lr.clearInterval.call(ti,n),t()},l))})},Xr.delay=h,Xr.getTimeLimitedPromise=function(e,t){return c.Promise.race([e,h(t).then(function(){return c.Promise.reject(new _r)})])},Xr.noop=function(){},Xr.getKeyArray=Pr,Xr.getSanitizedKey=Nr,Xr.parseKeySequence=function(e){if("string"!=typeof e)return{error:!0};var t=(e=Or(e).replace(/\s+/g," ")).length,n=e.charAt(t-1),o=e.charAt(t-2);1<t&&"+"===n&&!/[+ ]/.test(o)&&(e=e.substring(0,e.length-1));var r=e.split(" ");return{combinations:r,error:j(r,function(e){var t=Pr(e);return j(t,function(e){var t=1===e.length||"space"===e,n=Nr(e),o=s.modifiers[n],r=s.specialKeys[n];return!(t||o||r)})}),keys:e}},Xr.sendRequestToFrame=fo,Xr.KEY_MAPS=s,Xr.browser=Yr,Xr.stringifyElement=jn,Xr.selectorTextFilter=function o(e,r,i,a){function t(e){for(var t=e.childNodes.length,n=0;n<t;n++)if(o(e.childNodes[n],r,i,a))return!0;return!1}function n(e){return a instanceof RegExp?a.test(e):a===e.trim()}if(1===e.nodeType)return n(e.innerText||e.textContent);if(9!==e.nodeType)return 11===e.nodeType?t(e):n(e.textContent);var l=e.querySelector("head"),s=e.querySelector("body");return t(l)||t(s)},Xr.selectorAttributeFilter=function(e,t,n,o,r){if(1!==e.nodeType)return!1;function i(e,t){return"string"==typeof t?t===e:t.test(e)}for(var a,l=e.attributes,s=0;s<l.length;s++)if(i((a=l[s]).nodeName,o)&&(!r||i(a.nodeValue,r)))return!0;return!1},Xr.TEST_RUN_ERRORS={uncaughtErrorOnPage:"E1",uncaughtErrorInTestCode:"E2",uncaughtNonErrorObjectInTestCode:"E3",uncaughtErrorInClientFunctionCode:"E4",uncaughtErrorInCustomDOMPropertyCode:"E5",unhandledPromiseRejection:"E6",uncaughtException:"E7",missingAwaitError:"E8",actionIntegerOptionError:"E9",actionPositiveIntegerOptionError:"E10",actionBooleanOptionError:"E11",actionSpeedOptionError:"E12",actionOptionsTypeError:"E14",actionBooleanArgumentError:"E15",actionStringArgumentError:"E16",actionNullableStringArgumentError:"E17",actionStringOrStringArrayArgumentError:"E18",actionStringArrayElementError:"E19",actionIntegerArgumentError:"E20",actionRoleArgumentError:"E21",actionPositiveIntegerArgumentError:"E22",actionSelectorError:"E23",actionElementNotFoundError:"E24",actionElementIsInvisibleError:"E26",actionSelectorMatchesWrongNodeTypeError:"E27",actionAdditionalElementNotFoundError:"E28",actionAdditionalElementIsInvisibleError:"E29",actionAdditionalSelectorMatchesWrongNodeTypeError:"E30",actionElementNonEditableError:"E31",actionElementNotTextAreaError:"E32",actionElementNonContentEditableError:"E33",actionElementIsNotFileInputError:"E34",actionRootContainerNotFoundError:"E35",actionIncorrectKeysError:"E36",actionCannotFindFileToUploadError:"E37",actionUnsupportedDeviceTypeError:"E38",actionIframeIsNotLoadedError:"E39",actionElementNotIframeError:"E40",actionInvalidScrollTargetError:"E41",currentIframeIsNotLoadedError:"E42",currentIframeNotFoundError:"E43",currentIframeIsInvisibleError:"E44",nativeDialogNotHandledError:"E45",uncaughtErrorInNativeDialogHandler:"E46",setTestSpeedArgumentError:"E47",setNativeDialogHandlerCodeWrongTypeError:"E48",clientFunctionExecutionInterruptionError:"E49",domNodeClientFunctionResultError:"E50",invalidSelectorResultError:"E51",cannotObtainInfoForElementSpecifiedBySelectorError:"E52",externalAssertionLibraryError:"E53",pageLoadError:"E54",windowDimensionsOverflowError:"E55",forbiddenCharactersInScreenshotPathError:"E56",invalidElementScreenshotDimensionsError:"E57",roleSwitchInRoleInitializerError:"E58",assertionExecutableArgumentError:"E59",assertionWithoutMethodCallError:"E60",assertionUnawaitedPromiseError:"E61",requestHookNotImplementedError:"E62",requestHookUnhandledError:"E63",uncaughtErrorInCustomClientScriptCode:"E64",uncaughtErrorInCustomClientScriptCodeLoadedFromModule:"E65",uncaughtErrorInCustomScript:"E66",uncaughtTestCafeErrorInCustomScript:"E67",childWindowIsNotLoadedError:"E68",childWindowNotFoundError:"E69",cannotSwitchToWindowError:"E70",closeChildWindowError:"E71",childWindowClosedBeforeSwitchingError:"E72",cannotCloseWindowWithChildrenError:"E73",targetWindowNotFoundError:"E74",parentWindowNotFoundError:"E76",previousWindowNotFoundError:"E77",switchToWindowPredicateError:"E78",actionFunctionArgumentError:"E79",multipleWindowsModeIsDisabledError:"E80",multipleWindowsModeIsNotSupportedInRemoteBrowserError:"E81",cannotCloseWindowWithoutParent:"E82",cannotRestoreChildWindowError:"E83",executionTimeoutExceeded:"E84",actionRequiredCookieArguments:"E85",actionCookieArgumentError:"E86",actionCookieArgumentsError:"E87",actionUrlCookieArgumentError:"E88",actionUrlsCookieArgumentError:"E89",actionStringOptionError:"E90",actionDateOptionError:"E91",actionNumberOptionError:"E92",actionUrlOptionError:"E93",actionUrlSearchParamsOptionError:"E94",actionObjectOptionError:"E95",actionUrlArgumentError:"E96",actionStringOrRegexOptionError:"E97",actionSkipJsErrorsArgumentError:"E98",actionFunctionOptionError:"E99",actionInvalidObjectPropertyError:"E100",actionElementIsNotTargetError:"E101",multipleWindowsModeIsNotSupportedInNativeAutomationError:"E102"},Xr.RUNTIME_ERRORS=sr;var Qr=o.default.nativeMethods,$r=o.default.EVENTS.evalIframeScript;Qr.objectDefineProperty(ti,"%testCafeCore%",{configurable:!0,value:Xr}),o.default.on($r,function(e){return ei(Qr.contentWindowGetter.call(e.iframe))});var Zr=o.default.eventSandbox.message;Zr.on(Zr.SERVICE_MSG_RECEIVED_EVENT,function(e){var t,n,o,r,i;e.message.cmd===ho.SCROLL_REQUEST_CMD&&(n=(t=e.message).offsetX,o=t.offsetY,r=t.maxScrollMargin,i=at(e.source),new ho(i,{offsetX:n,offsetY:o},r).run().then(function(){return Zr.sendServiceMsg({cmd:ho.SCROLL_RESPONSE_CMD},e.source)}))})}(ti["%hammerhead%"],ti["%hammerhead%"].Promise)}(window);
1
+ window["%hammerhead%"].utils.removeInjectedScript(),function ei(ti){var ni=ti.document;!function(c,e){function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=t(c),d=t(e),n={alt:18,ctrl:17,meta:91,shift:16},r={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=","{":"[","}":"]",":":";",'"':"'","|":"\\","<":",",">":".","?":"/","±":"§"},i={backspace:8,capslock:20,delete:46,down:40,end:35,enter:13,esc:27,home:36,ins:45,left:37,pagedown:34,pageup:33,right:39,space:32,tab:9,up:38},a={left:"ArrowLeft",down:"ArrowDown",right:"ArrowRight",up:"ArrowUp",backspace:"Backspace",capslock:"CapsLock",delete:"Delete",end:"End",enter:"Enter",esc:"Escape",home:"Home",ins:"Insert",pagedown:"PageDown",pageup:"PageUp",space:" ",tab:"Tab",alt:"Alt",ctrl:"Control",meta:"Meta",shift:"Shift"};function l(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[e[t]]=t);return n}var s={modifiers:n,shiftMap:r,specialKeys:i,keyProperty:a,modifiersMap:{option:"alt"},symbolCharCodeToKeyCode:{96:192,91:219,93:221,92:220,59:186,39:222,44:188,45:o.default.utils.browser.isFirefox?173:189,46:190,47:191},symbolKeysCharCodes:{109:45,173:45,186:59,187:61,188:44,189:45,190:46,191:47,192:96,219:91,220:92,221:93,222:39,110:46,96:48,97:49,98:50,99:51,100:52,101:53,102:54,103:55,104:56,105:57,107:43,106:42,111:47},reversedModifiers:l(n),reversedShiftMap:l(r),reversedSpecialKeys:l(i),reversedKeyProperty:l(a),newLineKeys:["enter","\n","\r"]},u=o.default.Promise,f=o.default.nativeMethods;function h(t){return new u(function(e){return f.setTimeout.call(ti,e,t)})}var p=(m.prototype._startListening=function(){var t=this;this._emitter.onRequestSend(function(e){return t._onRequestSend(e)}),this._emitter.onRequestCompleted(function(e){return t._onRequestCompleted(e)}),this._emitter.onRequestError(function(e){return t._onRequestError(e)})},m.prototype._offListening=function(){this._emitter.offAll()},m.prototype._onRequestSend=function(e){this._collectingReqs&&this._requests.add(e)},m.prototype._onRequestCompleted=function(e){var t=this;h(this._delays.additionalRequestsCollection).then(function(){return t._onRequestFinished(e)})},m.prototype._onRequestFinished=function(e){this._requests.has(e)&&(this._requests.delete(e),this._collectingReqs||this._requests.size||!this._watchdog||this._finishWaiting())},m.prototype._onRequestError=function(e){this._onRequestFinished(e)},m.prototype._finishWaiting=function(){this._watchdog&&((0,c.nativeMethods.clearTimeout)(this._watchdog),this._watchdog=null),this._requests.clear(),this._offListening(),this._waitResolve()},m.prototype.wait=function(e){var n=this;return h(e?this._delays.pageInitialRequestsCollection:this._delays.requestsCollection).then(function(){return new c.Promise(function(e){var t;n._collectingReqs=!1,n._waitResolve=e,n._requests.size?(t=c.nativeMethods.setTimeout,n._watchdog=t(function(){return n._finishWaiting()},m.TIMEOUT)):n._finishWaiting()})})},m.TIMEOUT=3e3,m);function m(e,t){var n,o,r;void 0===t&&(t={}),this._delays={requestsCollection:null!==(n=t.requestsCollection)&&void 0!==n?n:50,additionalRequestsCollection:null!==(o=t.additionalRequestsCollection)&&void 0!==o?o:50,pageInitialRequestsCollection:null!==(r=t.pageInitialRequestsCollection)&&void 0!==r?r:50},this._emitter=e,this._waitResolve=null,this._watchdog=null,this._requests=new Set,this._collectingReqs=!0,this._startListening()}var g=function(e,t){return(g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function E(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}g(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function v(e,a,l,s){return new(l=l||d.default)(function(n,t){function o(e){try{i(s.next(e))}catch(e){t(e)}}function r(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?n(e.value):((t=e.value)instanceof l?t:new l(function(e){e(t)})).then(o,r)}i((s=s.apply(e,a||[])).next())})}function y(n,o){var r,i,a,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=e(0),s.throw=e(1),s.return=e(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function e(t){return function(e){return function(t){if(r)throw new TypeError("Generator is already executing.");for(;s&&t[s=0]&&(l=0),l;)try{if(r=1,i&&(a=2&t[0]?i.return:t[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,t[1])).done)return a;switch(i=0,a&&(t=[2&t[0],a.value]),t[0]){case 0:case 1:a=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,i=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(a=0<(a=l.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){l.label=t[1];break}if(6===t[0]&&l.label<a[1]){l.label=a[1],a=t;break}if(a&&l.label<a[2]){l.label=a[2],l.ops.push(t);break}a[2]&&l.ops.pop(),l.trys.pop();continue}t=o.call(n,l)}catch(e){t=[6,e],i=0}finally{r=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}}function b(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)!o&&r in t||((o=o||Array.prototype.slice.call(t,0,r))[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var C=(S.prototype.on=function(e,t){this._eventsListeners[e]||(this._eventsListeners[e]=[]),this._eventsListeners[e].push(t)},S.prototype.once=function(n,o){var r=this;this.on(n,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r.off(n,o),o.apply(void 0,e)})},S.prototype.off=function(e,t){var n=this._eventsListeners[e];n&&(this._eventsListeners[e]=c.nativeMethods.arrayFilter.call(n,function(e){return e!==t}))},S.prototype.offAll=function(e){e?this._eventsListeners[e]=[]:this._eventsListeners={}},S.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var o=this._eventsListeners[e];if(o)for(var r=0;r<o.length;r++)o[r].apply(this,t)},S);function S(){this._eventsListeners={}}var w,T="request-send",_="request-completed",I="request-error",P=(E(N,w=C),N.prototype._addHammerheadListener=function(e,t){o.default.on(e,t),this._hammerheadListenersInfo.push({evt:e,listener:t})},N.prototype.onRequestSend=function(e){this.on(T,e)},N.prototype.onRequestCompleted=function(e){this.on(_,e)},N.prototype.onRequestError=function(e){this.on(I,e)},N.prototype.offAll=function(){w.prototype.offAll.call(this);for(var e=0,t=this._hammerheadListenersInfo;e<t.length;e++){var n=t[e];o.default.off.call(o.default,n.evt,n.listener)}},N);function N(){var n=w.call(this)||this;return n._hammerheadListenersInfo=[],n._addHammerheadListener(o.default.EVENTS.beforeXhrSend,function(e){var t=e.xhr;return n.emit(T,t)}),n._addHammerheadListener(o.default.EVENTS.xhrCompleted,function(e){var t=e.xhr;return n.emit(_,t)}),n._addHammerheadListener(o.default.EVENTS.xhrError,function(e){var t=e.xhr;return n.emit(I,t)}),n._addHammerheadListener(o.default.EVENTS.fetchSent,function(e){n.emit(T,e),e.then(function(){return n.emit(_,e)},function(){return n.emit(I,e)})}),n}var R=(M.prototype._startListening=function(){var t=this;this._emitter.onScriptAdded(function(e){return t._onScriptElementAdded(e)}),this._emitter.onScriptLoadedOrFailed(function(e){return t._onScriptLoadedOrFailed(e)})},M.prototype._offListening=function(){this._emitter.offAll()},M.prototype._onScriptElementAdded=function(e){var t=this,n=(0,c.nativeMethods.setTimeout)(function(){return t._onScriptLoadedOrFailed(e,!0)},M.LOADING_TIMEOUT);this._scripts.set(e,n)},M.prototype._onScriptLoadedOrFailed=function(e,t){var n=this;void 0===t&&(t=!1),this._scripts.has(e)&&(t||(0,c.nativeMethods.clearTimeout)(this._scripts.get(e)),this._scripts.delete(e),this._scripts.size||h(25).then(function(){n._waitResolve&&!n._scripts.size&&n._finishWaiting()}))},M.prototype._finishWaiting=function(){this._watchdog&&((0,c.nativeMethods.clearTimeout)(this._watchdog),this._watchdog=null),this._scripts.clear(),this._offListening(),this._waitResolve(),this._waitResolve=null},M.prototype.wait=function(){var n=this;return new c.Promise(function(e){var t;n._waitResolve=e,n._scripts.size?(t=c.nativeMethods.setTimeout,n._watchdog=t(function(){return n._finishWaiting()},M.TIMEOUT)):n._finishWaiting()})},M.TIMEOUT=3e3,M.LOADING_TIMEOUT=2e3,M);function M(e){this._emitter=e,this._watchdog=null,this._waitResolve=null,this._scripts=new Map,this._startListening()}var O,x=o.default.nativeMethods,A="script-added",F="script-loaded-or-failed",L=(E(V,O=C),V.prototype._onScriptElementAdded=function(e){var t,n=this,o=x.scriptSrcGetter.call(e);void 0!==o&&""!==o&&(this.emit(A,e),t=function(){x.removeEventListener.call(e,"load",t),x.removeEventListener.call(e,"error",t),n.emit(F,e)},x.addEventListener.call(e,"load",t),x.addEventListener.call(e,"error",t))},V.prototype.onScriptAdded=function(e){this.on(A,e)},V.prototype.onScriptLoadedOrFailed=function(e){this.on(F,e)},V.prototype.offAll=function(){O.prototype.offAll.call(this),o.default.off(o.default.EVENTS.scriptElementAdded,this._onScriptElementAdded)},V);function V(){var n=O.call(this)||this;return n._scriptElementAddedListener=function(e){var t=e.el;return n._onScriptElementAdded(t)},o.default.on(o.default.EVENTS.scriptElementAdded,n._scriptElementAddedListener),n}function W(e){var t="array"+e.charAt(0).toUpperCase()+e.slice(1),n=c.nativeMethods[t];return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.call.apply(n,e)}}var H=W("filter"),D=W("map"),k=W("slice"),U=W("splice"),B=W("unshift"),q=W("forEach"),G=W("indexOf"),j=W("some"),z=W("reverse"),J=W("reduce"),K=W("concat"),Y=W("join"),X=W("every");function Q(e,t){return c.nativeMethods.arrayFind.call(e,t)}var $=Object.freeze({__proto__:null,filter:H,map:D,slice:k,splice:U,unshift:B,forEach:q,indexOf:G,some:j,reverse:z,reduce:J,concat:K,join:Y,every:X,isArray:function(e){return"[object Array]"===c.nativeMethods.objectToString.call(e)},from:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return c.nativeMethods.arrayFrom.apply(c.nativeMethods,b([e],t,!1))},find:Q,remove:function(e,t){var n=c.nativeMethods.arrayIndexOf.call(e,t);-1<n&&c.nativeMethods.arraySplice.call(e,n,1)},equals:function(e,t){if(e.length!==t.length)return!1;for(var n=0,o=e.length;n<o;n++)if(e[n]!==t[n])return!1;return!0},getCommonElement:function(e,t){for(var n=0;n<e.length;n++)for(var o=0;o<t.length;o++)if(e[n]===t[o])return e[n];return null}}),Z=o.default.utils.browser,ee=o.default.nativeMethods,te=o.default.utils.style.get,ne=o.default.utils.dom.getActiveElement,oe=o.default.utils.dom.findDocument,re=o.default.utils.dom.find,ie=o.default.utils.dom.isElementInDocument,ae=o.default.utils.dom.isElementInIframe,le=o.default.utils.dom.getIframeByElement,se=o.default.utils.dom.isCrossDomainWindows,ue=o.default.utils.dom.getSelectParent,ce=o.default.utils.dom.getChildVisibleIndex,de=o.default.utils.dom.getSelectVisibleChildren,fe=o.default.utils.dom.isElementNode,he=o.default.utils.dom.isTextNode,pe=o.default.utils.dom.isRenderedNode,me=o.default.utils.dom.isIframeElement,ge=o.default.utils.dom.isInputElement,Ee=o.default.utils.dom.isButtonElement,ve=o.default.utils.dom.isFileInput,ye=o.default.utils.dom.isTextAreaElement,be=o.default.utils.dom.isAnchorElement,Ce=o.default.utils.dom.isImgElement,Se=o.default.utils.dom.isFormElement,we=o.default.utils.dom.isLabelElement,Te=o.default.utils.dom.isSelectElement,_e=o.default.utils.dom.isRadioButtonElement,Ie=o.default.utils.dom.isColorInputElement,Pe=o.default.utils.dom.isCheckboxElement,Ne=o.default.utils.dom.isOptionElement,Re=o.default.utils.dom.isSVGElement,Me=o.default.utils.dom.isMapElement,Oe=o.default.utils.dom.isBodyElement,xe=o.default.utils.dom.isHtmlElement,Ae=o.default.utils.dom.isDocument,Fe=o.default.utils.dom.isTextEditableInput,Le=o.default.utils.dom.isTextEditableElement,Ve=o.default.utils.dom.isTextEditableElementAndEditingAllowed,We=o.default.utils.dom.isContentEditableElement,He=o.default.utils.dom.isDomElement,De=o.default.utils.dom.isShadowUIElement,ke=o.default.utils.dom.isShadowRoot,Ue=o.default.utils.dom.isElementFocusable,Be=o.default.utils.dom.isHammerheadAttr,qe=o.default.utils.dom.isElementReadOnly,Ge=o.default.utils.dom.getScrollbarSize,je=o.default.utils.dom.getMapContainer,ze=o.default.utils.dom.getTagName,Je=o.default.utils.dom.closest,Ke=o.default.utils.dom.getParents,Ye=o.default.utils.dom.findParent,Xe=o.default.utils.dom.getTopSameDomainWindow,Qe=o.default.utils.dom.getParentExceptShadowRoot;function $e(e,t){var n,o={el:n=e,skip:n.shadowRoot&&n.tabIndex<0,children:{}};if(e=e.shadowRoot||e,me(e)&&(e=ee.contentDocumentGetter.call(e)),e&&(e.nodeType===Node.DOCUMENT_FRAGMENT_NODE||e.nodeType===Node.DOCUMENT_NODE))for(var r=0,i=function(e){for(var t,n=e.querySelectorAll("*"),o=function(e){for(var t=[],n=0;n<e.length;n++)"none"===te(e[n],"display")&&t.push(e[n]);return t}(n),r=/^(input|button|select|textarea)$/,i=[],a=null,l=null,s=null,u=0;u<n.length;u++){a=n[u],l=ze(a),s=Ze(a),function(e,t,n){var o=null;return t.nodeType===Node.DOCUMENT_NODE&&(o=ee.documentActiveElementGetter.call(t)),e===o||!(e.disabled||"none"===te(e,"display")||"hidden"===te(e,"visibility")||Z.isAndroid&&Ne(e)||null!==n&&n<0)}(a,e,s)&&(t=a.getAttribute("contenteditable"),(r.test(l)||a.shadowRoot||me(a)||be(a)&&a.hasAttribute("href")||""===t||"true"===t||null!==s)&&i.push(a))}return H(i,function(e){return!et(o,e)})}(e);r<i.length;r++){var a=i[r],l=!t||a.tabIndex<=0?-1:a.tabIndex;o.children[l]=o.children[l]||[],o.children[l].push($e(a,t))}return o}function Ze(e){var t=ee.getAttribute.call(e,"tabindex");return null!==t&&(t=parseInt(t,10),t=isNaN(t)?null:t),t}function et(e,t){return e.contains?e.contains(t):j(e,function(e){return e.contains(t)})}function tt(e,t){if(ot(t,e))return!0;for(var n=ee.nodeChildNodesGetter.call(e),o=st(n),r=0;r<o;r++){var i=n[r];if(!De(i)&&tt(i,t))return!0}return!1}function nt(e,t){var n=e.querySelectorAll(ze(t));return G(n,t)}function ot(e,t){return e&&t&&e.isSameNode?e.isSameNode(t):e===t}function rt(t){var e=null;try{e=t.frameElement}catch(e){return!!t.top}return!(!Z.isFirefox&&!Z.isWebKit||t.top===t||e)||!(!e||!ee.contentDocumentGetter.call(e))}function it(e){return e.top===e}function at(e){var t=[];re(ni,"*",function(e){"IFRAME"===e.tagName&&t.push(e),e.shadowRoot&&re(e.shadowRoot,"iframe",function(e){return t.push(e)})});for(var n=0;n<t.length;n++)if(ee.contentWindowGetter.call(t[n])===e)return t[n];return null}function lt(e){return ee.htmlCollectionLengthGetter.call(e)}function st(e){return ee.nodeListLengthGetter.call(e)}function ut(e){return ee.inputValueGetter.call(e)}function ct(e){return ee.textAreaValueGetter.call(e)}function dt(e,t){return ee.inputValueSetter.call(e,t)}function ft(e,t){return ee.textAreaValueSetter.call(e,t)}function ht(e){return ge(e)?ut(e):ye(e)?ct(e):e.value}function pt(e){return e&&e.getRootNode&&oe(e)!==e.getRootNode()}var mt=Object.freeze({__proto__:null,getActiveElement:ne,findDocument:oe,find:re,isElementInDocument:ie,isElementInIframe:ae,getIframeByElement:le,isCrossDomainWindows:se,getSelectParent:ue,getChildVisibleIndex:ce,getSelectVisibleChildren:de,isElementNode:fe,isTextNode:he,isRenderedNode:pe,isIframeElement:me,isInputElement:ge,isButtonElement:Ee,isFileInput:ve,isTextAreaElement:ye,isAnchorElement:be,isImgElement:Ce,isFormElement:Se,isLabelElement:we,isSelectElement:Te,isRadioButtonElement:_e,isColorInputElement:Ie,isCheckboxElement:Pe,isOptionElement:Ne,isSVGElement:Re,isMapElement:Me,isBodyElement:Oe,isHtmlElement:xe,isDocument:Ae,isTextEditableInput:Fe,isTextEditableElement:Le,isTextEditableElementAndEditingAllowed:Ve,isContentEditableElement:We,isDomElement:He,isShadowUIElement:De,isShadowRoot:ke,isElementFocusable:Ue,isHammerheadAttr:Be,isElementReadOnly:qe,getScrollbarSize:Ge,getMapContainer:je,getTagName:ze,closest:Je,getParents:Ke,findParent:Ye,getTopSameDomainWindow:Xe,getParentExceptShadowRoot:Qe,getFocusableElements:function(e,t){return void 0===t&&(t=!1),function e(t){var n,o=[];for(n in t.skip||t.el.nodeType===Node.DOCUMENT_NODE||me(t.el)||o.push(t.el),t.children)for(var r=0,i=t.children[n];r<i.length;r++){var a=i[r];o.push.apply(o,e(a))}return o}($e(e,t))},getTabIndexAttributeIntValue:Ze,containsElement:et,getTextareaIndentInLine:function(e,t){var n=ct(e);if(!n)return 0;var o=n.substring(0,t);return t-(-1===o.lastIndexOf("\n")?0:o.lastIndexOf("\n")+1)},getTextareaLineNumberByPosition:function(e,t){for(var n=ct(e).split("\n"),o=0,r=0,i=0;o<=t;i++){if(t<=o+n[i].length){r=i;break}o+=n[i].length+1}return r},getTextareaPositionByLineAndOffset:function(e,t,n){for(var o=ct(e).split("\n"),r=0,i=0;i<t;i++)r+=o[i].length+1;return r+n},blocksImplicitSubmission:function(e){return(Z.isSafari?/^(text|password|color|date|time|datetime|datetime-local|email|month|number|search|tel|url|week|image)$/i:Z.isFirefox?/^(text|password|date|time|datetime|datetime-local|email|month|number|search|tel|url|week|image)$/i:/^(text|password|datetime|email|number|search|tel|url|image)$/i).test(e.type)},isEditableElement:function(e,t){return t?Ve(e)||We(e):Le(e)||We(e)},isElementContainsNode:tt,isOptionGroupElement:function(e){return"[object HTMLOptGroupElement]"===o.default.utils.dom.instanceToString(e)},getElementIndexInParent:nt,isTheSameNode:ot,getElementDescription:function(e){var t,n,o={id:"id",name:"name",class:"className"},r=[];for(t in r.push("<"),r.push(ze(e)),o)!o.hasOwnProperty(t)||(n=e[o[t]])&&r.push(" "+t+'="'+n+'"');return r.push(">"),r.join("")},getFocusableParent:function(e){for(var t=Ke(e),n=0;n<t.length;n++)if(Ue(t[n]))return t[n];return null},remove:function(e){e&&e.parentElement&&e.parentElement.removeChild(e)},isIFrameWindowInDOM:rt,isTopWindow:it,findIframeByWindow:at,isEditableFormElement:function(e){return Le(e)||Te(e)},getCommonAncestor:function(e,t){if(ot(e,t))return e;for(var n=[e].concat(Ke(e)),o=t;o;){if(-1<G(n,o))return o;o=ee.nodeParentNodeGetter.call(o)}return o},getChildrenLength:lt,getChildNodesLength:st,getInputValue:ut,getTextAreaValue:ct,setInputValue:dt,setTextAreaValue:ft,getElementValue:ht,setElementValue:function(e,t){return ge(e)?dt(e,t):ye(e)?ft(e,t):e.value=t},isShadowElement:pt,contains:function(t,e){return!(!t||!e)&&(t.contains?t.contains(e):!!Ye(e,!0,function(e){return e===t}))},isNodeEqual:function(e,t){return e===t},getNodeText:function(e){return ee.nodeTextContentGetter.call(e)},getImgMapName:function(e){return e.useMap.substring(1)},getDocumentElement:function(e){return e.document.documentElement},isDocumentElement:function(e){return e===ni.documentElement}}),gt=o.default.Promise,Et=o.default.nativeMethods,vt=o.default.eventSandbox.listeners,yt=o.default.utils.event.BUTTON,bt=o.default.utils.event.BUTTONS_PARAMETER,Ct=o.default.utils.event.DOM_EVENTS,St=o.default.utils.event.WHICH_PARAMETER,wt=o.default.utils.event.preventDefault;function Tt(e,t,n,o){Et.addEventListener.call(e,t,n,o)}function _t(e,t,n,o){Et.removeEventListener.call(e,t,n,o)}function It(){var n=[],e=!1;function t(){e||(ni.body?(e=!0,n.forEach(function(e){return e()})):Et.setTimeout.call(ti,t,1))}function o(){(rt(ti)||it(ti))&&(_t(ni,"DOMContentLoaded",o),t())}return"complete"===ni.readyState?Et.setTimeout.call(ti,o,1):Tt(ni,"DOMContentLoaded",o),{then:function(e){return t=e,new gt(function(e){return n.push(function(){return e(t())})});var t}}}var Pt,Nt,Rt=Object.freeze({__proto__:null,BUTTON:yt,BUTTONS_PARAMETER:bt,DOM_EVENTS:Ct,WHICH_PARAMETER:St,preventDefault:wt,bind:Tt,unbind:_t,documentReady:function(e){return void 0===e&&(e=0),It().then(function(){return vt.getEventListeners(ti,"load").length?gt.race([new gt(function(e){return Tt(ti,"load",e)}),h(e)]):null})}});(Nt=Pt=Pt||{}).ready="ready",Nt.readyForBrowserManipulation="ready-for-browser-manipulation",Nt.waitForFileDownload="wait-for-file-download";var Mt=Pt,Ot=o.default.Promise,xt=o.default.transport,At=500,Ft=!1,Lt=null,Vt=!1;function Wt(){Ft=!0}var Ht=Object.freeze({__proto__:null,init:function(){o.default.on(o.default.EVENTS.beforeUnload,Wt),Tt(ti,"unload",function(){Ft=!0})},watchForPageNavigationTriggers:function(){Lt=function(){Vt=!0},o.default.on(o.default.EVENTS.pageNavigationTriggered,Lt)},wait:function(e){void 0===e&&(e=!Lt||Vt?400:0),Lt&&(o.default.off(o.default.EVENTS.pageNavigationTriggered,Lt),Lt=null);var t=h(e).then(function(){if(Ft)return h(At).then(function(){return xt.queuedAsyncServiceMsg({cmd:Mt.waitForFileDownload})}).then(function(e){if(!e)return new Ot(function(){})}).then(function(){Ft=!1})}),n=h(15e3).then(function(){Ft=!1});return Ot.race([t,n])}}),Dt=C,kt=Object.freeze({__proto__:null,EventEmitter:Dt,inherit:function(e,t){function n(){}n.prototype=t.prototype,o.default.utils.extend(e.prototype,new n),(e.prototype.constructor=e).base=t.prototype}}),Ut=c.eventSandbox.listeners;function Bt(){this.initialized=!1,this.stopPropagationFlag=!1,this.events=new Dt}var qt=(Bt.prototype._internalListener=function(e,t,n,o,r){this.events.emit("scroll",e),this.stopPropagationFlag&&(o(),r())},Bt.prototype.init=function(){var n=this;this.initialized||(this.initialized=!0,Ut.initElementListening(ti,["scroll"]),Ut.addFirstInternalEventBeforeListener(ti,["scroll"],function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n._internalListener.apply(n,e)}))},Bt.prototype.waitForScroll=function(e){var t=this,n=null,o=new c.Promise(function(e){n=e});return o.cancel=function(){return t.events.off("scroll",n)},this.initialized?this.handleScrollEvents(e,n):n(),o},Bt.prototype.handleScrollEvents=function(n,e){var o=this;this.events.once("scroll",e),pt(n)&&(Ut.initElementListening(n,["scroll"]),Ut.addFirstInternalEventBeforeListener(n,["scroll"],function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];o._internalListener.apply(o,e),Ut.cancelElementListening(n)}))},Bt.prototype.stopPropagation=function(){this.stopPropagationFlag=!0},Bt.prototype.enablePropagation=function(){this.stopPropagationFlag=!1},new Bt),Gt=(jt.create=function(e){return new jt(e.top,e.right,e.bottom,e.left)},jt.prototype.add=function(e){return this.top+=e.top,this.right+=e.right,this.bottom+=e.bottom,this.left+=e.left,this},jt.prototype.sub=function(e){return"top"in e&&(this.top-=e.top,this.left-=e.left),this.bottom-=e.bottom,this.right-=e.right,this},jt.prototype.round=function(e,t){return void 0===e&&(e=Math.round),void 0===t&&(t=e),this.top=e(this.top),this.right=t(this.right),this.bottom=t(this.bottom),this.left=e(this.left),this},jt.prototype.contains=function(e){return e.x>=this.left&&e.x<=this.right&&e.y>=this.top&&e.y<=this.bottom},jt);function jt(e,t,n,o){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=0),void 0===o&&(o=0),this.top=e,this.right=t,this.bottom=n,this.left=o}var zt=o.default.utils.style,Jt=o.default.utils.style.getBordersWidth,Kt=o.default.utils.style.getComputedStyle,Yt=o.default.utils.style.getElementMargin,Xt=o.default.utils.style.getElementPadding,Qt=o.default.utils.style.getElementScroll,$t=o.default.utils.style.getOptionHeight,Zt=o.default.utils.style.getSelectElementSize,en=o.default.utils.style.isElementVisible,tn=o.default.utils.style.isVisibleChild,nn=o.default.utils.style.getWidth,on=o.default.utils.style.getHeight,rn=o.default.utils.style.getInnerWidth,an=o.default.utils.style.getInnerHeight,ln=o.default.utils.style.getScrollLeft,sn=o.default.utils.style.getScrollTop,un=o.default.utils.style.setScrollLeft,cn=o.default.utils.style.setScrollTop,dn=o.default.utils.style.get,fn=o.default.utils.style.getBordersWidthFloat,hn=o.default.utils.style.getElementPaddingFloat;function pn(e,t,n){for(var o in"string"==typeof t&&zt.set(e,t,n),t)t.hasOwnProperty(o)&&zt.set(e,o,t[o])}function mn(e,t,n){return e<t?n:e<n?t:Math.max(n,t)}function gn(e){return!!Ye(e,!0,function(e){return fe(e)&&"hidden"===zt.get(e,"visibility")})}function En(e){return!!Ye(e,!0,function(e){return fe(e)&&"none"===zt.get(e,"display")})}function vn(e){return!pe(e)||En(e)||gn(e)}function yn(e){return e&&!(e.offsetHeight<=0&&e.offsetWidth<=0)}function bn(e){return fe(e)&&"fixed"===zt.get(e,"position")}function Cn(e){return fe(e)&&"sticky"===zt.get(e,"position")}var Sn=Object.freeze({__proto__:null,getBordersWidth:Jt,getComputedStyle:Kt,getElementMargin:Yt,getElementPadding:Xt,getElementScroll:Qt,getOptionHeight:$t,getSelectElementSize:Zt,isElementVisible:en,isSelectVisibleChild:tn,getWidth:nn,getHeight:on,getInnerWidth:rn,getInnerHeight:an,getScrollLeft:ln,getScrollTop:sn,setScrollLeft:un,setScrollTop:cn,get:dn,getBordersWidthFloat:fn,getElementPaddingFloat:hn,set:pn,getViewportDimensions:function(){return{width:mn(ti.innerWidth,ni.documentElement.clientWidth,ni.body.clientWidth),height:mn(ti.innerHeight,ni.documentElement.clientHeight,ni.body.clientHeight)}},getWindowDimensions:function(e){return new Gt(0,nn(e),on(e),0)},isHiddenNode:gn,isNotDisplayedNode:En,isNotVisibleNode:vn,hasDimensions:yn,isFixedElement:bn,isStickyElement:Cn}),wn=c.utils.browser,Tn=c.eventSandbox.listeners,_n=["click","mousedown","mouseup","dblclick","contextmenu","mousemove","mouseover","mouseout","touchstart","touchmove","touchend","keydown","keypress","input","keyup","change","focus","blur","MSPointerDown","MSPointerMove","MSPointerOver","MSPointerOut","MSPointerUp","pointerdown","pointermove","pointerover","pointerout","pointerup"],In=123;function Pn(e,t,n,o,r){var i,a=c.nativeMethods.eventTargetGetter.call(e)||e.srcElement;if(!t&&!De(a)){if(/^key/.test(e.type)&&((i=e).shiftKey&&i.ctrlKey||(i.altKey||i.metaKey)&&wn.isMacPlatform||i.keyCode===In))return void r();if("blur"===e.type&&a!==ti&&a!==ti.document&&!yn(a))return;n()}}var Nn=(Rn.create=function(e){return"left"in e?new Rn(e.left,e.top):"right"in e?new Rn(e.right,e.bottom):new Rn(e.x,e.y)},Rn.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},Rn.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},Rn.prototype.round=function(e){return void 0===e&&(e=Math.round),this.x=e(this.x),this.y=e(this.y),this},Rn.prototype.eql=function(e){return this.x===e.x&&this.y===e.y},Rn.prototype.mul=function(e){return this.x*=e,this.y*=e,this},Rn.prototype.distance=function(e){return Math.sqrt(Math.pow(this.x-e.x,2)+Math.pow(this.y-e.y,2))},Rn);function Rn(e,t){this.x=e,this.y=t}var Mn=/auto|scroll|hidden/i;function On(e){var t,n=dn(e,"overflowX"),o=dn(e,"overflowY"),r=Mn.test(n),i=Mn.test(o),a=oe(e).documentElement,l=e.scrollHeight;return(c.utils.browser.isChrome||c.utils.browser.isFirefox||c.utils.browser.isSafari)&&(t=e.getBoundingClientRect().top,l=l-a.getBoundingClientRect().top+t),(r||i)&&l>a.scrollHeight}function xn(e){if(Oe(e))return On(e);if(xe(e))return function(e){var t=dn(e,"overflowX"),n=dn(e,"overflowY");if("hidden"===t&&"hidden"===n)return!1;var o=e.scrollHeight>e.clientHeight,r=e.scrollWidth>e.clientWidth;if(o||r)return!0;var i=e.getElementsByTagName("body")[0];if(!i)return!1;if(On(i))return!1;var a=Math.min(e.clientWidth,i.clientWidth),l=Math.min(e.clientHeight,i.clientHeight);return i.scrollHeight>l||i.scrollWidth>a}(e);var t,n,o,r,i,a=(n=dn(t=e,"overflowX"),o=dn(t,"overflowY"),r=Mn.test(n),i=Mn.test(o),new Nn(r,i));if(!a.x&&!a.y)return!1;var l=a.y&&e.scrollHeight>e.clientHeight;return a.x&&e.scrollWidth>e.clientWidth||l}function An(e){var t,n,o=Ke(e);return!ae(e)||(t=le(e))&&(n=Ke(t),o.concat(n)),c.nativeMethods.arrayFilter.call(o,xn)}var Fn=Object.freeze({__proto__:null,hasScroll:xn,getScrollableParents:An}),Ln=o.default.shadowUI,Vn=o.default.nativeMethods,Wn="disabled";function Hn(){this.currentEl=null,this.optionList=null,this.groups=[],this.options=[]}var Dn=(Hn.prototype._createOption=function(e,t){var n=ni.createElement("div"),o=e.disabled||"optgroup"===ze(e.parentElement)&&e.parentElement.disabled,r="option"===ze(e)?e.text:"";Vn.nodeTextContentSetter.call(n,r),t.appendChild(n),Ln.addClass(n,"tcOption"),o&&(Ln.addClass(n,Wn),pn(n,"color",dn(e,"color"))),this.options.push(n)},Hn.prototype._createGroup=function(e,t){var n=ni.createElement("div");Vn.nodeTextContentSetter.call(n,e.label||" "),t.appendChild(n),Ln.addClass(n,"tcOptionGroup"),e.disabled&&(Ln.addClass(n,Wn),pn(n,"color",dn(e,"color"))),this.createChildren(e.children,n),this.groups.push(n)},Hn.prototype.clear=function(){this.optionList=null,this.currentEl=null,this.options=[],this.groups=[]},Hn.prototype.createChildren=function(e,t){for(var n=lt(e),o=0;o<n;o++)Ne(e[o])?this._createOption(e[o],t):"optgroup"===ze(e[o])&&this._createGroup(e[o],t)},Hn.prototype.getEmulatedChildElement=function(e){var t="optgroup"===ze(e),n=nt(this.currentEl,e);return t?this.groups[n]:this.options[n]},Hn.prototype.isOptionListExpanded=function(e){return e?e===this.currentEl:!!this.currentEl},Hn.prototype.isOptionElementVisible=function(e){var t=ue(e);if(!t)return!0;var n=this.isOptionListExpanded(t),o=Zt(t);return n||1<o},new Hn),kn=function(e,t,n,o,r,i){this.width=e,this.height=t,this.left=n.x,this.top=n.y,this.right=n.x+e,this.bottom=n.y+t,this.border=o,this.scrollbar=i,this.scroll=r},Un={notElementOrTextNode:function(e){return"\n The ".concat(e," is neither a DOM element nor a text node.\n ")},elOutsideBounds:function(e,t){return"\n The ".concat(t," (").concat(e,") is located outside the the layout viewport.\n ")},elHasWidthOrHeightZero:function(e,t,n,o){return"\n The ".concat(t," (").concat(e,") is too small to be visible: ").concat(n,"px x ").concat(o,"px.\n ")},elHasDisplayNone:function(e,t){return"\n The ".concat(t," (").concat(e,") is invisible. \n The value of its 'display' property is 'none'.\n ")},parentHasDisplayNone:function(e,t,n){return"\n The ".concat(t," (").concat(e,") is invisible. \n It descends from an element that has the 'display: none' property (").concat(n,").\n ")},elHasVisibilityHidden:function(e,t){return"\n The ".concat(t," (").concat(e,") is invisible.\n The value of its 'visibility' property is 'hidden'.\n ")},parentHasVisibilityHidden:function(e,t,n){return"\n The ".concat(t," (").concat(e,") is invisible.\n It descends from an element that has the 'visibility: hidden' property (").concat(n,").\n ")},elHasVisibilityCollapse:function(e,t){return"\n The ".concat(t," (").concat(e,") is invisible.\n The value of its 'visibility' property is 'collapse'.\n ")},parentHasVisibilityCollapse:function(e,t,n){return"\n The ".concat(t," (").concat(e,") is invisible.\n It descends from an element that has the 'visibility: collapse' property (").concat(n,").\n ")},elNotRendered:function(e,t){return"\n The ".concat(t," (").concat(e,") has not been rendered.\n ")},optionNotVisible:function(e,t,n){return"\n The ".concat(t," (").concat(e,") is invisible. \n The parent element (").concat(n,") is collapsed, and its length is shorter than 2.\n ")},mapContainerNotVisible:function(e,t){return"\n The action target (".concat(e,") is invisible because ").concat(t,"\n ")}},Bn=o.default.utils.html,qn=o.default.nativeMethods,Gn=10;function jn(e){if(!e)return"";var t,n,o,r=qn.cloneNode.call(e),i=Bn.cleanUpHtml(qn.elementOuterHTMLGetter.call(r)),a=(t=qn.nodeTextContentGetter.call(e),n=Gn,void 0===o&&(o="..."),t.length<n?t:t.substring(0,n-o.length)+o),l=qn.elementChildrenGetter.call(e);return 0<qn.htmlCollectionLengthGetter.call(l)?i.replace("></",">...</"):a?i.replace("></",">".concat(a,"</")):i}var zn=o.default.utils.position.getElementRectangle,Jn=o.default.utils.position.getOffsetPosition,Kn=o.default.utils.position.offsetToClientCoords;function Yn(e){var t,n,o,r,i=xe(e),a=i?e.getElementsByTagName("body")[0]:null,l=e.getBoundingClientRect(),s=Gt.create(Jt(e)),u=Qt(e),c=ae(e),d="BackCompat"===e.ownerDocument.compatMode,f=i?new Nn(0,0):Nn.create(l),h=l.height,p=l.width;i&&(p=a&&d?(h=a.clientHeight,a.clientWidth):(h=e.clientHeight,e.clientWidth)),!c||(t=le(e))&&(n=Jn(t),o=Kn(Nn.create(n)),r=Jt(t),f.add(o).add(Nn.create(r)),i&&s.add(r));var m=!i&&rn(e)!==e.clientWidth,g=!i&&an(e)!==e.clientHeight,E={right:m?Ge():0,bottom:g?Ge():0};return new kn(p,h,f,s,u,E)}function Xn(e){var t=e.x,n=e.y,o=ni.elementFromPoint,r=null;try{r=o.call(ni,t,n)}catch(e){return null}for(null===r&&(r=o.call(ni,t-1,n-1));r&&r.shadowRoot&&r.shadowRoot.elementFromPoint;){var i=r.shadowRoot.elementFromPoint(t,n);if(!i||r===i)break;r=i}return r}function Qn(e,t){return Gt.create({top:e.top-t.top,left:e.left-t.left,right:t.right-e.right,bottom:t.bottom-e.bottom}).sub(t.border).sub(t.scrollbar).round(Math.ceil,Math.floor)}function $n(e){var t=/^touch/.test(e.type)&&e.targetTouches?e.targetTouches[0]||e.changedTouches[0]:e,n=0===t.pageX&&0===t.pageY,o=0!==t.clientX||0!==t.clientY;if((null===t.pageX||n&&o)&&null!==t.clientX){var r=oe(e.target||e.srcElement),i=r.documentElement,a=r.body;return new Nn(Math.round(t.clientX+(i&&i.scrollLeft||a&&a.scrollLeft||0)-(i.clientLeft||0)),Math.round(t.clientY+(i&&i.scrollTop||a&&a.scrollTop||0)-(i.clientTop||0)))}return new Nn(Math.round(t.pageX),Math.round(t.pageY))}function Zn(e){return!oo(e)}function eo(e){return"hidden"===dn(e,"visibility")}function to(e){return"collapse"===dn(e,"visibility")}function no(e){return"none"===dn(e,"display")}function oo(e){return!pt(e)&&(eo(e)||to(e)||no(e))}function ro(e){var t=zn(e);return 0===t.width||0===t.height}function io(e){return e.replace(/.*The/,"its")}var ao=Object.freeze({__proto__:null,getElementRectangle:zn,getOffsetPosition:Jn,offsetToClientCoords:Kn,getClientDimensions:Yn,getElementFromPoint:Xn,calcRelativePosition:Qn,getIframeClientCoordinates:function(e){var t=Jn(e),n=t.left,o=t.top,r=Kn({x:n,y:o}),i=Jt(e),a=Xt(e),l=r.x+i.left+a.left,s=r.y+i.top+a.top;return new Gt(s,l+nn(e),s+on(e),l)},containsOffset:function(e,t,n){var o=Yn(e),r=Math.max(e.scrollWidth,o.width),i=Math.max(e.scrollHeight,o.height),a=o.scrollbar.right+o.border.left+o.border.right+r,l=o.scrollbar.bottom+o.border.top+o.border.bottom+i;return(void 0===t||0<=t&&t<=a)&&(void 0===n||0<=n&&n<=l)},getEventAbsoluteCoordinates:function(e){var t,n,o,r=e.target||e.srcElement,i=$n(e),a=oe(r),l=0,s=0;return!ae(a.documentElement)||(t=le(a))&&(n=Jn(t),o=Jt(t),l=n.left+o.left,s=n.top+o.top),new Nn(i.x+l,i.y+s)},getEventPageCoordinates:$n,getIframePointRelativeToParentFrame:function(e,t){var n=at(t),o=Jn(n),r=Jt(n),i=Xt(n);return Kn({x:e.x+o.left+r.left+i.left,y:e.y+o.top+r.top+i.top})},findCenter:function(e){var t=zn(e);return new Nn(Math.round(t.left+t.width/2),Math.round(t.top+t.height/2))},getClientPosition:function(e){var t=Jn(e),n=t.left,o=t.top,r=Kn({x:n,y:o});return r.x=Math.round(r.x),r.y=Math.round(r.y),r},isInRectangle:function(e,t){var n=e.x,o=e.y;return n>=t.left&&n<=t.right&&o>=t.top&&o<=t.bottom},getWindowPosition:function(){var e=ti.screenLeft||ti.screenX,t=ti.screenTop||ti.screenY;return new Nn(e,t)},isIframeVisible:Zn,isElementVisible:function e(t){if(!He(t)&&!he(t))return!1;if(Ne(t)||"optgroup"===ze(t))return Dn.isOptionElementVisible(t);if(me(t))return Zn(t);if(Re(t))return!Ye(t,!0,oo)&&!ro(t);if(he(t))return!vn(t);if(!We(t)&&ro(t))return!1;if(Me(t)){var n=je(Je(t,"map"));return!!n&&e(n)}return yn(t)&&!oo(t)},getSubHiddenReason:io,getHiddenReason:function e(t,n){if(void 0===n&&(n="action target"),!t)return null;var o=he(t);if(!He(t)&&!o)return Un.notElementOrTextNode(n);var r=o?t.data:jn(t),i=t.offsetHeight,a=t.offsetWidth;if((Ne(t)||"optgroup"===ze(t))&&!Dn.isOptionElementVisible(t)){var l=jn(ue(t));return Un.optionNotVisible(r,n,l)}if(Me(t)){var s=io(e(je(Je(t,"map")),"container")||"");return Un.mapContainerNotVisible(r,s)}var u=Ye(t,!1,eo);if(u)return Un.parentHasVisibilityHidden(r,n,jn(u));var c=Ye(t,!1,to);if(c)return Un.parentHasVisibilityCollapse(r,n,jn(c));var d=Ye(t,!1,no);return d?Un.parentHasDisplayNone(r,n,jn(d)):eo(t)?Un.elHasVisibilityHidden(r,n):to(t)?Un.elHasVisibilityCollapse(r,n):no(t)?Un.elHasDisplayNone(r,n):he(t)&&!pe(t)?Un.elNotRendered(r,n):!We(t)&&ro(t)||!yn(t)?Un.elHasWidthOrHeightZero(r,n,a,i):null},getElOutsideBoundsReason:function e(t,n){void 0===n&&(n="action target");var o=jn(t);if(Me(t)){var r=io(e(je(Je(t,"map")),"container")||"");return Un.mapContainerNotVisible(o,r)}return Un.elOutsideBounds(o,n)}});function lo(n,o){return v(this,void 0,void 0,function(){var t;return y(this,function(e){switch(e.label){case 0:t=0,e.label=1;case 1:return t<n?[4,o(t)]:[3,4];case 2:e.sent(),e.label=3;case 3:return t++,[3,1];case 4:return[2]}})})}var so=Object.freeze({__proto__:null,whilst:function(t,n){return v(this,void 0,void 0,function(){return y(this,function(e){switch(e.label){case 0:return t()?[4,n()]:[3,2];case 1:return e.sent(),[3,0];case 2:return[2]}})})},times:lo,each:function(r,i){return v(this,void 0,void 0,function(){var t,n,o;return y(this,function(e){switch(e.label){case 0:t=0,n=r,e.label=1;case 1:return t<n.length?(o=n[t],[4,i(o)]):[3,4];case 2:e.sent(),e.label=3;case 3:return t++,[3,1];case 4:return[2]}})})}}),uo=o.default.Promise,co=o.default.eventSandbox.message;function fo(e,o,t){return new uo(function(n){co.on(co.SERVICE_MSG_RECEIVED_EVENT,function e(t){t.message.cmd===o&&(co.off(co.SERVICE_MSG_RECEIVED_EVENT,e),n(t.message))}),co.sendServiceMsg(e,t)})}var ho=(po._isScrollValuesChanged=function(e,t){return ln(e)!==t.left||sn(e)!==t.top},po.prototype._setScroll=function(e,t){var n=this,o=t.left,r=t.top,i=xe(e)?oe(e):e,a={left:ln(i),top:sn(i)},o=Math.max(o,0),r=Math.max(r,0),l=qt.waitForScroll(i);return un(i,o),cn(i,r),po._isScrollValuesChanged(i,a)?l=l.then(function(){n._scrollWasPerformed||(n._scrollWasPerformed=po._isScrollValuesChanged(i,a))}):(l.cancel(),c.Promise.resolve())},po.prototype._getScrollToPoint=function(e,t,n){var o=Math.floor(e.width/2),r=Math.floor(e.height/2),i=this._scrollToCenter?o:Math.min(n.left,o),a=this._scrollToCenter?r:Math.min(n.top,r),l=e.scroll,s=l.left,u=l.top,c=t.x>=s+e.width-i,d=t.x<=s+i,f=t.y>=u+e.height-a,h=t.y<=u+a;return c?s=t.x-e.width+i:d&&(s=t.x-i),f?u=t.y-e.height+a:h&&(u=t.y-a),{left:s,top:u}},po.prototype._getScrollToFullChildView=function(e,t,n){var o,r,i,a,l={left:null,top:null},s=e.width>=t.width,u=e.height>=t.height,c=Qn(t,e);return s&&(o=e.width-t.width,r=Math.min(n.left,o),this._scrollToCenter&&(r=o/2),c.left<r?l.left=Math.round(e.scroll.left+c.left-r):c.right<r&&(l.left=Math.round(e.scroll.left+Math.min(c.left,-c.right)+r))),u&&(i=e.height-t.height,a=Math.min(n.top,i),this._scrollToCenter&&(a=i/2),c.top<a?l.top=Math.round(e.scroll.top+c.top-a):c.bottom<a&&(l.top=Math.round(e.scroll.top+Math.min(c.top,-c.bottom)+a))),l},po._getChildPoint=function(e,t,n){return Nn.create(t).sub(Nn.create(e)).add(Nn.create(e.scroll)).add(Nn.create(t.border)).add(n)},po.prototype._getScrollPosition=function(e,t,n,o){var r=po._getChildPoint(e,t,n),i=this._getScrollToPoint(e,r,o),a=this._getScrollToFullChildView(e,t,o);return{left:Math.max(null===a.left?i.left:a.left,0),top:Math.max(null===a.top?i.top:a.top,0)}},po._getChildPointAfterScroll=function(e,t,n,o){return Nn.create(t).add(Nn.create(e.scroll)).sub(Nn.create(n)).add(o)},po.prototype._isChildFullyVisible=function(e,t,n){var o=po._getChildPointAfterScroll(e,t,e.scroll,n),r=this._getScrollPosition(e,t,n,{left:0,top:0}),i=r.left,a=r.top;return!this._isTargetElementObscuredInPoint(o)&&i===e.scroll.left&&a===e.scroll.top},po.prototype._scrollToChild=function(e,t,n){for(var o=Yn(e),r=Yn(t),i=rn(ti),a=an(ti),l=o.scroll,s=!this._isChildFullyVisible(o,r,n);s;){l=this._getScrollPosition(o,r,n,this._maxScrollMargin);var u=po._getChildPointAfterScroll(o,r,l,n),c=this._isTargetElementObscuredInPoint(u);this._maxScrollMargin.left+=20,this._maxScrollMargin.left>=i&&(this._maxScrollMargin.left=50,this._maxScrollMargin.top+=20),s=c&&this._maxScrollMargin.top<a}return this._maxScrollMargin={left:50,top:50},this._setScroll(e,l)},po.prototype._scrollElement=function(){if(!xn(this._element))return c.Promise.resolve();var e=Yn(this._element),t=this._getScrollToPoint(e,this._offsets,this._maxScrollMargin);return this._setScroll(this._element,t)},po.prototype._scrollParents=function(){var t,n,o=this,r=An(this._element),i=this._element,e=ln(i),a=sn(i),l=Nn.create(this._offsets).sub(new Nn(e,a).round()),s=lo(r.length,function(e){return o._scrollToChild(r[e],i,l).then(function(){t=Yn(i),n=Yn(r[e]),l.add(Nn.create(t)).sub(Nn.create(n)).add(Nn.create(n.border)),i=r[e]})}),u={scrollWasPerformed:this._scrollWasPerformed,offsetX:l.x,offsetY:l.y,maxScrollMargin:this._maxScrollMargin};return s.then(function(){var e;if(!o._skipParentFrames&&(e=ti).top!==e)return u.cmd=po.SCROLL_REQUEST_CMD,fo(u,po.SCROLL_RESPONSE_CMD,ti.parent)}).then(function(){return o._scrollWasPerformed})},po._getPinnedElementAncestorOrSelf=function(e,t){return Ye(e,!0,t)},po.prototype._isTargetElementObscuredInPointByElement=function(e,t){var n=po._getPinnedElementAncestorOrSelf(e,t);return!!n&&!n.contains(this._element)},po.prototype._isTargetElementObscuredInPoint=function(e){var t=Xn(e);return!!t&&(this._isTargetElementObscuredInPointByElement(t,bn)||this._isTargetElementObscuredInPointByElement(t,Cn))},po.prototype.run=function(){var e=this;return this._scrollElement().then(function(){return e._scrollParents()})},po.SCROLL_REQUEST_CMD="automation|scroll|request",po.SCROLL_RESPONSE_CMD="automation|scroll|response",po);function po(e,t,n){this._element=e,this._offsets=new Nn(t.offsetX,t.offsetY),this._scrollToCenter=!!t.scrollToCenter,this._skipParentFrames=!!t.skipParentFrames,this._maxScrollMargin=n||{left:50,top:50},this._scrollWasPerformed=!1}function mo(e){var t=c.nativeMethods.nodeChildNodesGetter.call(e);return!st(t)&&Ro(e)?e:Q(t,Ro)}function go(e){return Q(c.nativeMethods.nodeChildNodesGetter.call(e),function(e){return Ro(e)||!Mo(e)&&go(e)})}function Eo(e){return he(e)||fe(e)&&en(e)}function vo(e){var t=c.nativeMethods.nodeChildNodesGetter.call(e);return H(t,Eo)}function yo(e){var t=c.nativeMethods.nodeChildNodesGetter.call(e);return j(t,Eo)}function bo(e){var t=c.nativeMethods.nodeChildNodesGetter.call(e);return j(t,function(e){return Do(e,!0)})}function Co(e,t){var n,o;if(!De(e)&&!De(t)){var r=c.nativeMethods.nodeChildNodesGetter.call(t);return!ot(t,e)&&st(r)&&/div|p/.test(ze(t))&&(n=go(e))&&!ot(t,n)&&(o=To(n))&&!ot(t,o)&&mo(t)}}function So(e,t){var n,o,r,i=pe(t);if(!De(e)&&!De(t)){var a=c.nativeMethods.nodeChildNodesGetter.call(t);if(!ot(t,e)&&(i&&fe(t)&&st(a)&&!/div|p/.test(ze(t))||Ro(t)&&!ot(t,e)&&t.nodeValue.length)){if(i&&fe(t)){if(!(n=go(e))||ot(t,n))return;if(!(o=To(n))||ot(t,o))return}return(r=function(e){for(var t=null,n=e;!t&&(n=n.previousSibling);)if(!Mo(n)&&!No(n)){t=n;break}return t}(t))&&fe(r)&&/div|p/.test(ze(r))&&mo(r)}}}function wo(e,t){var n,o,r=c.nativeMethods.nodeChildNodesGetter.call(e),i=st(r),a=null,l=t?Ro:he;if(!i&&l(e))return e;for(var s=0;s<i;s++){if(n=r[s],o=fe(n)&&!We(n),l(n))return n;if(pe(n)&&yo(n)&&!o&&(a=wo(n,t)))return a}return a}function To(e){return wo(e,!0)}function _o(e,t){var n,o,r=c.nativeMethods.nodeChildNodesGetter.call(e),i=st(r),a=null;if(!i&&Ro(e))return e;for(var l=i-1;0<=l;l--){if(n=r[l],o=fe(n)&&!We(n),he(n)&&(!t||!No(n)))return n;if(pe(n)&&yo(n)&&!o&&(a=_o(n,!1)))return a}return a}function Io(e,t){if(!e||!e.length)return 0;for(var n=e.length,o=t||0,r=o;r<n&&(10===e.charCodeAt(r)||32===e.charCodeAt(r));r++)o++;return o}function Po(e){if(!e||!e.length)return 0;for(var t=e.length,n=t,o=t-1;0<=o&&(10===e.charCodeAt(o)||32===e.charCodeAt(o));o--)n--;return n}function No(e){if(!he(e))return!1;var t=e.nodeValue,n=Io(t),o=Po(t);return n===t.length&&0===o}function Ro(e){return he(e)&&!No(e)}function Mo(e){return!pe(e)||De(e)}function Oo(e){var t=e.getAttribute?e.getAttribute("contenteditable"):null;return""===t||"true"===t}function xo(e){var t=Ke(e);if(Oo(e)&&We(e))return e;var n=oe(e);return"on"===n.designMode?n.body:Q(t,function(e){return Oo(e)&&We(e)})}function Ao(e,t){if(ot(e,t))return ot(t,xo(e))?e:c.nativeMethods.nodeParentNodeGetter.call(e);var n=[],o=xo(e),r=null;if(!tt(o,t))return null;for(r=e;r!==o;r=c.nativeMethods.nodeParentNodeGetter.call(r))n.push(r);for(r=t;r!==o;r=c.nativeMethods.nodeParentNodeGetter.call(r))if(-1!==G(n,r))return r;return o}function Fo(e,t){var n=c.nativeMethods.nodeChildNodesGetter.call(e),o=st(n),r=o<=t,i=n[t],a=0;if(De(e)||!i)return{node:e,offset:t};if(De(i)){if(o<=1)return{node:e,offset:0};(r=o<=t-1)?i=n[o-2]:(i=n[t-1],a=0)}for(;!Mo(i)&&fe(i);){var l=vo(i);if(!l.length){a=0;break}i=l[r?l.length-1:0]}return 0===a||Mo(i)||(a=i.nodeValue?i.nodeValue.length:0),{node:i,offset:a}}function Lo(e,t,n){var o=n?t.focusNode:t.anchorNode,r=n?t.focusOffset:t.anchorOffset,i={node:o,offset:r};return(ot(e,o)||fe(o))&&bo(o)&&(i=Fo(o,r)),{node:i.node,offset:i.offset}}function Vo(e,t,n){var o=n?t.anchorNode:t.focusNode,r=n?t.anchorOffset:t.focusOffset,i={node:o,offset:r};return(ot(e,o)||fe(o))&&bo(o)&&(i=Fo(o,r)),{node:i.node,offset:i.offset}}function Wo(e,t,n){return Uo(e,Lo(e,t,n))}function Ho(e,t,n){return Uo(e,Vo(e,t,n))}function Do(e,t){if(vn(e))return!1;if(he(e))return!0;if(!fe(e))return!1;if(bo(e))return t;var n=c.nativeMethods.nodeParentNodeGetter.call(e),o=!We(n),r=vo(e),i=j(r,function(e){return"br"===ze(e)});return o||i}function ko(l,e){var s={node:null,offset:e};return function e(t){var n,o,r=c.nativeMethods.nodeChildNodesGetter.call(t),i=st(r);if(s.node)return s;if(Mo(t))return s;if(he(t)){if(s.offset<=t.nodeValue.length)return s.node=t,s;t.nodeValue.length&&(!s.node&&So(l,t)&&s.offset--,s.offset-=t.nodeValue.length)}else if(fe(t)){if(!Eo(t))return s;if(0===s.offset&&Do(t,!1))return s.node=t,s.offset=(n=t,o=0,Q(c.nativeMethods.nodeChildNodesGetter.call(n),function(e,t){return o=t,"br"===ze(e)})?o:0),s;(s.node||!Co(l,t)&&!So(l,t))&&(i||"br"!==ze(t))||s.offset--}for(var a=0;a<i;a++)s=e(r[a]);return s}(l)}function Uo(i,e){var a=e.node,l=e.offset,s=0,u=!1;return function e(t){var n=c.nativeMethods.nodeChildNodesGetter.call(t),o=st(n);if(u)return s;if(ot(a,t))return(Co(i,t)||So(i,t))&&s++,u=!0,s+l;if(Mo(t))return s;!o&&t.nodeValue&&t.nodeValue.length?(!u&&So(i,t)&&s++,s+=t.nodeValue.length):(!o&&fe(t)&&"br"===ze(t)||!u&&(Co(i,t)||So(i,t)))&&s++;for(var r=0;r<o;r++)s=e(n[r]);return s}(i)}function Bo(e){var t,n,o,r,i,a=he(e)?e:_o(e,!0);if(!a||(t=a,o=he(n=e)?n:wo(n,!1),r=t===o,i=t.nodeValue===String.fromCharCode(10),r&&i&&function(e,t){for(var n=["pre","pre-wrap","pre-line"];e!==t;)if(e=c.nativeMethods.nodeParentNodeGetter.call(e),-1<G(n,dn(e,"white-space")))return 1}(t,n)))return 0;var l=oe(e).createRange();return l.selectNodeContents(a),Uo(e,{node:a,offset:l.endOffset})}var qo=Object.freeze({__proto__:null,getFirstVisibleTextNode:To,getLastTextNode:_o,getFirstNonWhitespaceSymbolIndex:Io,getLastNonWhitespaceSymbolIndex:Po,isInvisibleTextNode:No,findContentEditableParent:xo,getNearestCommonAncestor:Ao,getSelection:function(e,t,n){return{startPos:Lo(e,t,n),endPos:Vo(e,t,n)}},getSelectionStartPosition:Wo,getSelectionEndPosition:Ho,calculateNodeAndOffsetByPosition:ko,calculatePositionByNodeAndOffset:Uo,getElementBySelection:function(e){var t=Ao(e.anchorNode,e.focusNode);return he(t)?t.parentElement:t},getFirstVisiblePosition:function(e){var t=he(e)?e:To(e),n=oe(e).createRange();return t?(n.selectNodeContents(t),Uo(e,{node:t,offset:n.startOffset})):0},getLastVisiblePosition:Bo,getContentEditableValue:function(e){return D(function e(t){var n=[],o=c.nativeMethods.nodeChildNodesGetter.call(t),r=st(o);Mo(t)||r||!he(t)||n.push(t);for(var i=0;i<r;i++)n=n.concat(e(o[i]));return n}(e),function(e){return e.nodeValue}).join("")}}),Go=o.default.utils.browser,jo=o.default.eventSandbox.selection,zo="backward",Jo="forward",Ko="none";function Yo(e,t,n,o){var r,i,a,l=null,s=null,u=!1;void 0!==t&&void 0!==n&&n<t&&(a=t,t=n,n=a,u=!0),void 0===t&&(s={node:(r=To(e))||e,offset:r&&r.nodeValue?Io(r.nodeValue):0}),void 0===n&&(l={node:(i=_o(e,!0))||e,offset:i&&i.nodeValue?Po(i.nodeValue):0}),s=s||ko(e,t),l=l||ko(e,n),s.node&&l.node&&(u?tr(l,s,o):tr(s,l,o))}function Xo(e){var t=e?oe(e):ni,n=t.getSelection(),o=null,r=!1;return n&&(n.isCollapsed||((o=t.createRange()).setStart(n.anchorNode,n.anchorOffset),o.setEnd(n.focusNode,n.focusOffset),r=o.collapsed,o.detach())),r}function Qo(e,t,n){var o=Uo(e,t);return Uo(e,n)<o}function $o(e){return We(e)?nr(e)?Wo(e,er(e),Xo(e)):0:jo.getSelection(e).start}function Zo(e){return We(e)?nr(e)?Ho(e,er(e),Xo(e)):0:jo.getSelection(e).end}function er(e){var t=oe(e);return t?t.getSelection():ti.getSelection()}function tr(e,t,n){var o=e.node,r=t.node,i=o.nodeValue?o.length:0,a=r.nodeValue?r.length:0,l=e.offset,s=t.offset;fe(o)&&l||(l=Math.min(i,e.offset)),fe(r)&&s||(s=Math.min(a,t.offset));var u=xo(o),c=Qo(u,e,t),d=er(u),f=oe(u).createRange();jo.wrapSetterSelection(u,function(){var e;d.removeAllRanges(),c?(f.setStart(o,l),f.setEnd(o,l),d.addRange(f),e=function(e,t){try{d.extend(e,t)}catch(e){return!1}return!0},(Go.isSafari||Go.isChrome&&Go.version<58)&&No(r)?e(r,Math.min(s,1))||e(r,0):e(r,s)):(f.setStart(o,l),f.setEnd(r,s),d.addRange(f))},n,!0)}function nr(e){var t=er(e);return!(!t.anchorNode||!t.focusNode)&&tt(e,t.anchorNode)&&tt(e,t.focusNode)}var or,rr,ir=Object.freeze({__proto__:null,hasInverseSelectionContentEditable:Xo,isInverseSelectionContentEditable:Qo,getSelectionStart:$o,getSelectionEnd:Zo,hasInverseSelection:function(e){return We(e)?Xo(e):(jo.getSelection(e).direction||Ko)===zo},getSelectionByElement:er,select:function(e,t,n){var o,r,i,a;We(e)?Yo(e,t,n,!0):(o=t||0,i=!1,a=null,(r=void 0===n?ht(e).length:n)<o&&(a=o,o=r,r=a,i=!0),jo.setSelection(e,o,r,i?zo:Jo),Ko=t===n?"none":i?zo:Jo)},selectByNodesAndOffsets:tr,deleteSelectionContents:function(e,t){var n,o,r,i,a,l,s,u,c,d,f,h,p=$o(e),m=Zo(e);t&&Yo(e),p!==m&&(n=er(e),o=n.anchorNode,r=n.focusNode,i=n.anchorOffset,a=n.focusOffset,l=Io(o.nodeValue),s=Po(o.nodeValue),u=Io(r.nodeValue),c=Po(r.nodeValue),f=d=null,he(o)&&(i<l&&0!==i?d=0:i!==o.nodeValue.length&&(No(o)&&0!==i||s<i)&&(d=o.nodeValue.length)),he(r)&&(a<u&&0!==a?f=0:a!==r.nodeValue.length&&(No(r)&&0!==a||c<a)&&(f=r.nodeValue.length)),Go.isWebKit&&(null!==d&&(o.nodeValue=0===d?o.nodeValue.substring(l):o.nodeValue.substring(0,s)),null!==f&&(r.nodeValue=0===f?r.nodeValue.substring(u):r.nodeValue.substring(0,c))),null===d&&null===f||tr({node:o,offset:d=null!==d?0===d?d:o.nodeValue.length:i},{node:r,offset:f=null!==f?0===f?f:r.nodeValue.length:a}),function(e){var t=er(e),n=t.rangeCount;if(n)for(var o=0;o<n;o++)t.getRangeAt(o).deleteContents()}(e),(h=er(e)).rangeCount&&!h.getRangeAt(0).collapsed&&h.getRangeAt(0).collapse(!0))},setCursorToLastVisiblePosition:function(e){var t=Bo(e);Yo(e,t,t)},hasElementContainsSelection:nr}),ar=o.default.Promise,lr=o.default.nativeMethods,sr={cannotCreateMultipleLiveModeRunners:"E1000",cannotRunLiveModeRunnerMultipleTimes:"E1001",browserDisconnected:"E1002",cannotRunAgainstDisconnectedBrowsers:"E1003",cannotEstablishBrowserConnection:"E1004",cannotFindBrowser:"E1005",browserProviderNotFound:"E1006",browserNotSet:"E1007",testFilesNotFound:"E1008",noTestsToRun:"E1009",cannotFindReporterForAlias:"E1010",multipleSameStreamReporters:"E1011",optionValueIsNotValidRegExp:"E1012",optionValueIsNotValidKeyValue:"E1013",invalidSpeedValue:"E1014",invalidConcurrencyFactor:"E1015",cannotDivideRemotesCountByConcurrency:"E1016",portsOptionRequiresTwoNumbers:"E1017",portIsNotFree:"E1018",invalidHostname:"E1019",cannotFindSpecifiedTestSource:"E1020",clientFunctionCodeIsNotAFunction:"E1021",selectorInitializedWithWrongType:"E1022",clientFunctionCannotResolveTestRun:"E1023",regeneratorInClientFunctionCode:"E1024",invalidClientFunctionTestRunBinding:"E1025",invalidValueType:"E1026",unsupportedUrlProtocol:"E1027",testControllerProxyCannotResolveTestRun:"E1028",timeLimitedPromiseTimeoutExpired:"E1029",noTestsToRunDueFiltering:"E1030",cannotSetVideoOptionsWithoutBaseVideoPathSpecified:"E1031",multipleAPIMethodCallForbidden:"E1032",invalidReporterOutput:"E1033",cannotReadSSLCertFile:"E1034",cannotPrepareTestsDueToError:"E1035",cannotParseRawFile:"E1036",testedAppFailedWithError:"E1037",unableToOpenBrowser:"E1038",requestHookConfigureAPIError:"E1039",forbiddenCharatersInScreenshotPath:"E1040",cannotFindFFMPEG:"E1041",compositeArgumentsError:"E1042",cannotFindTypescriptConfigurationFile:"E1043",clientScriptInitializerIsNotSpecified:"E1044",clientScriptBasePathIsNotSpecified:"E1045",clientScriptInitializerMultipleContentSources:"E1046",cannotLoadClientScriptFromPath:"E1047",clientScriptModuleEntryPointPathCalculationError:"E1048",methodIsNotAvailableForAnIPCHost:"E1049",tooLargeIPCPayload:"E1050",malformedIPCMessage:"E1051",unexpectedIPCHeadPacket:"E1052",unexpectedIPCBodyPacket:"E1053",unexpectedIPCTailPacket:"E1054",cannotRunLocalNonHeadlessBrowserWithoutDisplay:"E1057",uncaughtErrorInReporter:"E1058",roleInitializedWithRelativeUrl:"E1059",typeScriptCompilerLoadingError:"E1060",cannotCustomizeSpecifiedCompilers:"E1061",cannotEnableRetryTestPagesOption:"E1062",browserConnectionError:"E1063",testRunRequestInDisconnectedBrowser:"E1064",invalidQuarantineOption:"E1065",invalidQuarantineParametersRatio:"E1066",invalidAttemptLimitValue:"E1067",invalidSuccessThresholdValue:"E1068",cannotSetConcurrencyWithCDPPort:"E1069",cannotFindTestcafeConfigurationFile:"E1070",requestUrlInvalidValueError:"E1072",requestRuntimeError:"E1073",requestCannotResolveTestRun:"E1074",relativeBaseUrl:"E1075",invalidSkipJsErrorsOptionsObjectProperty:"E1076",invalidSkipJsErrorsCallbackWithOptionsProperty:"E1077",invalidCommandInJsonCompiler:"E1078",invalidCustomActionsOptionType:"E1079",invalidCustomActionType:"E1080",cannotImportESMInCommonsJS:"E1081",setNativeAutomationForUnsupportedBrowsers:"E1082",cannotReadConfigFile:"E1083",cannotParseConfigFile:"E1084",cannotRunLegacyTestsInNativeAutomationMode:"E1085",setUserProfileInNativeAutomation:"E1086"};(rr=or=or||{}).TooHighConcurrencyFactor="TooHighConcurrencyFactor",rr.UseBrowserInitOption="UseBrowserInitOption",rr.RestErrorCauses="RestErrorCauses";var ur,cr,dr,fr,hr,pr=or,mr=", ",gr='"';function Er(e,t){return"".concat(t).concat(e).concat(t)}function vr(e,t,n){void 0===t&&(t=mr),void 0===n&&(n=gr);var o=b([],e,!0);if(-1<t.indexOf("\n"))return o.map(function(e){return Er(e,n)}).join(t);if(1===o.length)return Er(o[0],n);if(2===o.length){var r=e[0],i=e[1];return"".concat(Er(r,n)," and ").concat(Er(i,n))}var a=o.pop(),l=o.map(function(e){return Er(e,n)}).join(t);return"".concat(l,", and ").concat(Er(a,n))}(cr=ur=ur||{}).message="message",cr.stack="stack",cr.pageUrl="pageUrl",(fr=dr=dr||{}).fn="fn",fr.dependencies="dependencies";var yr,br="https://testcafe.io/documentation/402639/reference/command-line-interface#file-pathglob-pattern",Cr="https://testcafe.io/documentation/402638/reference/configuration-file#filter",Sr="https://testcafe.io/documentation/402828/guides/concepts/browsers#test-in-headless-mode",wr="https://testcafe.io/documentation/404150/guides/advanced-guides/custom-test-actions",Tr=((hr={})[sr.cannotCreateMultipleLiveModeRunners]="Cannot launch multiple live mode instances of the TestCafe test runner.",hr[sr.cannotRunLiveModeRunnerMultipleTimes]="Cannot launch the same live mode instance of the TestCafe test runner multiple times.",hr[sr.browserDisconnected]="The {userAgent} browser disconnected. If you did not close the browser yourself, browser performance or network issues may be at fault.",hr[sr.cannotRunAgainstDisconnectedBrowsers]="The following browsers disconnected: {userAgents}. Cannot run further tests.",hr[sr.testRunRequestInDisconnectedBrowser]='"{browser}" disconnected during test execution.',hr[sr.cannotEstablishBrowserConnection]="Cannot establish one or more browser connections.",hr[sr.cannotFindBrowser]='Cannot find the browser. "{browser}" is neither a known browser alias, nor a path to an executable file.',hr[sr.browserProviderNotFound]='Cannot find the "{providerName}" browser provider.',hr[sr.browserNotSet]="You have not specified a browser.",hr[sr.testFilesNotFound]='Could not find test files at the following location: "{cwd}".\nCheck patterns for errors:\n\n{sourceList}\n\nor launch TestCafe from a different directory.\n'+"For more information on how to specify test locations, see ".concat(br,"."),hr[sr.noTestsToRun]="Source files do not contain valid 'fixture' and 'test' declarations.",hr[sr.noTestsToRunDueFiltering]="No tests match your filter.\n"+"See ".concat(Cr,"."),hr[sr.multipleSameStreamReporters]='Reporters cannot share output streams. The following reporters interfere with one another: "{reporters}".',hr[sr.optionValueIsNotValidRegExp]='The "{optionName}" option does not contain a valid regular expression.',hr[sr.optionValueIsNotValidKeyValue]='The "{optionName}" option does not contain a valid key-value pair.',hr[sr.invalidQuarantineOption]='The "{optionName}" option does not exist. Specify "attemptLimit" and "successThreshold" to configure quarantine mode.',hr[sr.invalidQuarantineParametersRatio]='The value of "attemptLimit" ({attemptLimit}) should be greater then the value of "successThreshold" ({successThreshold}).',hr[sr.invalidAttemptLimitValue]='The "{attemptLimit}" parameter only accepts values of {MIN_ATTEMPT_LIMIT} and up.',hr[sr.invalidSuccessThresholdValue]='The "{successThreshold}" parameter only accepts values of {MIN_SUCCESS_THRESHOLD} and up.',hr[sr.invalidSpeedValue]="Speed should be a number between 0.01 and 1.",hr[sr.invalidConcurrencyFactor]="The concurrency factor should be an integer greater than or equal to 1.",hr[sr.cannotDivideRemotesCountByConcurrency]="The number of remote browsers should be divisible by the concurrency factor.",hr[sr.cannotSetConcurrencyWithCDPPort]='The value of the "concurrency" option includes the CDP port.',hr[sr.portsOptionRequiresTwoNumbers]='The "--ports" option requires two arguments.',hr[sr.portIsNotFree]="Port {portNum} is occupied by another process.",hr[sr.invalidHostname]='Cannot resolve hostname "{hostname}".',hr[sr.cannotFindSpecifiedTestSource]='Cannot find a test file at "{path}".',hr[sr.clientFunctionCodeIsNotAFunction]="Cannot initialize a ClientFunction because {#instantiationCallsiteName} is {type}, and not a function.",hr[sr.selectorInitializedWithWrongType]="Cannot initialize a Selector because {#instantiationCallsiteName} is {type}, and not one of the following: a CSS selector string, a Selector object, a node snapshot, a function, or a Promise returned by a Selector.",hr[sr.clientFunctionCannotResolveTestRun]="{#instantiationCallsiteName} does not have test controller access. To execute {#instantiationCallsiteName} from a Node.js API callback, bind the test controller object to the function with the `.with({ boundTestRun: t })` method. Note that you cannot execute {#instantiationCallsiteName} outside test code.",hr[sr.requestCannotResolveTestRun]='"request" does not have test controller access.',hr[sr.regeneratorInClientFunctionCode]='{#instantiationCallsiteName} code, arguments or dependencies cannot contain generators or "async/await" syntax (use Promises instead).',hr[sr.invalidClientFunctionTestRunBinding]='Cannot resolve the "boundTestRun" option because its value is not a test controller.',hr[sr.invalidValueType]="{smthg} ({actual}) is not of expected type ({type}).",hr[sr.unsupportedUrlProtocol]='Invalid {what}: "{url}". TestCafe cannot execute the test because the {what} includes the {protocol} protocol. TestCafe supports the following protocols: http://, https:// and file://.',hr[sr.testControllerProxyCannotResolveTestRun]="The action does not have implicit test controller access. Reference the 't' object to gain it.",hr[sr.timeLimitedPromiseTimeoutExpired]="A Promise timed out.",hr[sr.cannotSetVideoOptionsWithoutBaseVideoPathSpecified]="You cannot manage advanced video parameters when the video recording capability is off. Specify the root storage folder for video content to enable video recording.",hr[sr.multipleAPIMethodCallForbidden]='You cannot call the "{methodName}" method more than once. Specify an array of parameters instead.',hr[sr.invalidReporterOutput]="Specify a file name or a writable stream as the reporter's output target.",hr[sr.cannotReadSSLCertFile]='Unable to read the file referenced by the "{option}" ssl option ("{path}"). Error details:\n\n{err}',hr[sr.cannotPrepareTestsDueToError]="Cannot prepare tests due to the following error:\n\n{errMessage}",hr[sr.cannotParseRawFile]='Cannot parse a raw test file at "{path}" due to the following error:\n\n{errMessage}',hr[sr.testedAppFailedWithError]="The web application failed with the following error:\n\n{errMessage}",hr[sr.unableToOpenBrowser]='Unable to open the "{alias}" browser due to the following error:\n\n{errMessage}',hr[sr.requestHookConfigureAPIError]="Attempt to configure a request hook resulted in the following error:\n\n{requestHookName}: {errMsg}",hr[sr.forbiddenCharatersInScreenshotPath]='There are forbidden characters in the "{screenshotPath}" {screenshotPathType}:\n {forbiddenCharsDescription}',hr[sr.cannotFindFFMPEG]="TestCafe cannot record videos because it cannot locate the FFmpeg executable. Try one of the following solutions:\n\n* add the path of the FFmpeg installation directory to the PATH environment variable,\n* specify the path of the FFmpeg executable in the FFMPEG_PATH environment variable or the ffmpegPath option,\n* install the @ffmpeg-installer/ffmpeg npm package.",hr[sr.cannotReadConfigFile]='Failed to read the "{path}" configuration file from disk. Error details:\n\n{err}',hr[sr.cannotParseConfigFile]='Failed to parse the "{path}" configuration file. The file contains invalid JSON syntax. \n\nError details:\n\n{err}',hr[sr.cannotFindReporterForAlias]='Failed to load the "{name}" reporter. Please check the parameter for errors. Error details:\n\n{err}',hr[sr.cannotFindTypescriptConfigurationFile]='"{filePath}" is not a valid TypeScript configuration file.',hr[sr.clientScriptInitializerIsNotSpecified]="Initialize your client script with one of the following: a JavaScript script, a JavaScript file path, or the name of a JavaScript module.",hr[sr.clientScriptBasePathIsNotSpecified]="Specify the base path for the client script file.",hr[sr.clientScriptInitializerMultipleContentSources]="Client scripts can only have one initializer: JavaScript code, a JavaScript file path, or the name of a JavaScript module.",hr[sr.cannotLoadClientScriptFromPath]="Cannot load a client script from {path}.\n{errorMessage}",hr[sr.clientScriptModuleEntryPointPathCalculationError]="A client script tried to load a JavaScript module that TestCafe cannot locate:\n\n{errorMessage}.",hr[sr.methodIsNotAvailableForAnIPCHost]="This method cannot be called on a service host.",hr[sr.tooLargeIPCPayload]="The specified payload is too large to form an IPC packet.",hr[sr.malformedIPCMessage]="Cannot process a malformed IPC message.",hr[sr.unexpectedIPCHeadPacket]="Cannot create an IPC message due to an unexpected IPC head packet.",hr[sr.unexpectedIPCBodyPacket]="Cannot create an IPC message due to an unexpected IPC body packet.",hr[sr.unexpectedIPCTailPacket]="Cannot create an IPC message due to an unexpected IPC tail packet.",hr[sr.cannotRunLocalNonHeadlessBrowserWithoutDisplay]="Your Linux installation does not have a graphic subsystem to run {browserAlias} with a GUI. You can launch the browser in headless mode. If you use a portable browser executable, specify the browser alias before the path instead of the 'path' prefix. "+"For more information, see ".concat(Sr),hr[sr.uncaughtErrorInReporter]='The "{methodName}" method of the "{reporterName}" reporter produced an uncaught error. Error details:\n{originalError}',hr[sr.roleInitializedWithRelativeUrl]='Your Role includes a relative login page URL, but the "baseUrl" option is not set.\nUse an absolute URL or add the baseUrl option to your configuration file or CLI launch string.',hr[sr.typeScriptCompilerLoadingError]="Cannot load the TypeScript compiler.\n{originErrorMessage}.",hr[sr.cannotCustomizeSpecifiedCompilers]="You cannot specify options for the {noncustomizableCompilerList} compiler{suffix}.",hr[sr.cannotEnableRetryTestPagesOption]="Cannot enable the 'retryTestPages' option. Apply one of the following two solutions:\n-- set the 'hostname' option to 'localhost'\n-- run TestCafe over HTTPS\n",hr[sr.browserConnectionError]="{originErrorMessage}\n{numOfNotOpenedConnection} of {numOfAllConnections} browser connections have not been established:\n{listOfNotOpenedConnections}\n\nHints:\n{listOfHints}",hr[pr.TooHighConcurrencyFactor]="The host machine may not be powerful enough to handle the specified concurrency factor ({concurrencyFactor}). Decrease the concurrency factor or allocate more computing resources to the host machine.",hr[pr.UseBrowserInitOption]="Increase the Browser Initialization Timeout if its value is too low (currently: {browserInitTimeoutMsg}). The timeout determines how long TestCafe waits for browsers to be ready.",hr[pr.RestErrorCauses]="The error can also be caused by network issues or remote device failure. Make sure that your network connection is stable and you can reach the remote device.",hr[sr.cannotFindTestcafeConfigurationFile]="Cannot locate a TestCafe configuration file at {filePath}. Either the file does not exist, or the path is invalid.",hr[sr.relativeBaseUrl]='The value of the baseUrl argument cannot be relative: "{baseUrl}"',hr[sr.requestUrlInvalidValueError]="The request url is invalid ({actualValue}).",hr[sr.requestRuntimeError]="The request was interrupted by an error:\n{message}",hr[sr.invalidSkipJsErrorsOptionsObjectProperty]='The "{optionName}" option does not exist. Use the following options to configure skipJsErrors: '.concat(vr(Object.keys(ur)),"."),hr[sr.invalidSkipJsErrorsCallbackWithOptionsProperty]='The "{optionName}" option does not exist. Use the following options to configure skipJsErrors callbacks: '.concat(vr(Object.keys(dr)),"."),hr[sr.invalidCommandInJsonCompiler]='TestCafe terminated the test run. The "{path}" file contains an unknown Chrome User Flow action "{action}". Remove the action to continue. Refer to the following article for the definitive list of supported Chrome User Flow actions: https://testcafe.io/documentation/403998/guides/experimental-capabilities/chrome-replay-support#supported-replay-actions',hr[sr.invalidCustomActionsOptionType]="The value of the customActions option does not belong to type Object. Refer to the following article for custom action setup instructions: ".concat(wr),hr[sr.invalidCustomActionType]='TestCafe cannot parse the "{actionName}" action, because the action definition is invalid. Format the definition in accordance with the custom actions guide: '.concat(wr),hr[sr.cannotImportESMInCommonsJS]="Cannot import the {esModule} ECMAScript module from {targetFile}. Use a dynamic import() statement or enable the --esm CLI flag.",hr[sr.setNativeAutomationForUnsupportedBrowsers]='The "{browser}" do not support the Native Automation mode. Use the "disable native automation" option to continue.',hr[sr.cannotRunLegacyTestsInNativeAutomationMode]="TestCafe cannot run legacy tests in Native Automation mode. Disable native automation to continue.",hr[sr.setUserProfileInNativeAutomation]='Cannot initialize the test run. When TestCafe uses native automation, it can only launch browsers with an empty user profile. Disable native automation, or remove the "userProfile" suffix from the following browser aliases: "{browsers}".',hr[sr.timeLimitedPromiseTimeoutExpired]),_r=(E(Ir,yr=Error),Ir);function Ir(){var e=yr.call(this,Tr)||this;return e.code=sr.timeLimitedPromiseTimeoutExpired,e}function Pr(e){var t=e.replace(/^\+/g,"plus").replace(/\+\+/g,"+plus").split("+");return D(t,function(e){return e.replace("plus","+")})}function Nr(e){var t=1===e.length||"space"===e?e:e.toLowerCase();return s.modifiersMap[t]&&(t=s.modifiersMap[t]),t}var Rr,Mr,Or=o.default.utils.trim,xr={run:"run",idle:"idle"};(Mr=Rr=Rr||{}).ok="ok",Mr.closing="closing";var Ar=Rr,Fr="file://",Lr=ni.location.href,Vr=ni.location.origin,Wr=Vr+"/service-worker.js",Hr=!1,Dr=null,kr=eval;function Ur(t){return new d.default(function(e){return setTimeout(e,t)})}function Br(e,r,t){var n=void 0===t?{}:t,o=n.method,i=void 0===o?"GET":o,a=n.data,l=void 0===a?null:a,s=n.parseResponse,u=void 0===s||s;return new d.default(function(t,n){var o=r();o.open(i,e,!0),o.onreadystatechange=function(){var e;4===o.readyState&&(200===o.status?((e=o.responseText||"")&&u&&(e=JSON.parse(o.responseText)),t(e)):n("disconnected"))},o.send(l)})}function qr(e){return Lr.toLowerCase()===e.toLowerCase()}function Gr(){Hr=!1}function jr(e,t){Br(t.openFileProtocolUrl,t.createXHR,{method:"POST",data:JSON.stringify({url:e.url})})}function zr(e,t){var n,o,r,i,a;Gr(),void 0===(a=e.url)&&(a=""),0===a.indexOf(Fr)?jr(e,t):(o=t,r=(n=e).url.indexOf("#"),i=-1!==r&&n.url.slice(0,r)===Lr.slice(0,r),ni.location=n.url,o.nativeAutomation&&i&&ni.location.reload())}function Jr(e){return(e.cmd===xr.run||e.cmd===xr.idle)&&!qr(e.url)}function Kr(e,r,t){var i=e.statusUrl,a=e.openFileProtocolUrl,n=void 0===t?{}:t,l=n.manualRedirect,s=n.nativeAutomation;return v(this,void 0,void 0,function(){var n,o;return y(this,function(e){switch(e.label){case 0:return[4,Br(i,r)];case 1:return n=e.sent(),(o=s?(t=n).cmd!==xr.idle||Jr(t):Jr(n))&&!l&&zr(n,{createXHR:r,openFileProtocolUrl:a,nativeAutomation:s}),[2,{command:n,redirecting:o}]}var t})})}var Yr=Object.freeze({__proto__:null,delay:Ur,sendXHR:Br,startHeartbeat:function(e,t){function n(){Br(e,t).then(function(e){e.code!==Ar.closing||qr(e.url)||(Gr(),ni.location=e.url)})}Dr=ti.setInterval(n,2e3),n()},stopHeartbeat:function(){ti.clearInterval(Dr)},startInitScriptExecution:function(e,t){Hr=!0,function e(t,n){Hr&&Br(t,n).then(function(e){return e.code?Br(t,n,{method:"POST",data:JSON.stringify(kr(e.code))}):null}).then(function(){ti.setTimeout(function(){return e(t,n)},1e3)})}(e,t)},stopInitScriptExecution:Gr,redirectUsingCdp:jr,redirect:zr,checkStatus:function(){for(var r,i=[],e=0;e<arguments.length;e++)i[e]=arguments[e];return v(this,void 0,void 0,function(){var t,n,o;return y(this,function(e){switch(e.label){case 0:n=t=null,o=0,e.label=1;case 1:return o<5?[4,function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return v(this,void 0,void 0,function(){var t;return y(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,Kr.apply(void 0,n)];case 1:return[2,e.sent()];case 2:return t=e.sent(),console.error(t),[2,{error:t}];case 3:return[2]}})})}.apply(void 0,i)]:[3,5];case 2:return r=e.sent(),t=r.error,n=function(e,t){var n={};for(r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}(r,["error"]),t?[4,Ur(1e3)]:[2,n];case 3:e.sent(),e.label=4;case 4:return o++,[3,1];case 5:throw t}})})},enableRetryingTestPages:function(){return v(this,void 0,void 0,function(){var t;return y(this,function(e){switch(e.label){case 0:if(!navigator.serviceWorker)return[2];e.label=1;case 1:return e.trys.push([1,4,,5]),[4,navigator.serviceWorker.register(Wr,{scope:Vr})];case 2:return e.sent(),[4,navigator.serviceWorker.ready];case 3:return e.sent(),[3,5];case 4:return t=e.sent(),console.error(t),[3,5];case 5:return[2]}})})},getActiveWindowId:function(e,t){return Br(e,t)},setActiveWindowId:function(e,t,n){return Br(e,t,{method:"POST",data:JSON.stringify({windowId:n})})},ensureWindowInNativeAutomation:function(e,t,n){return Br(e,t,{method:"POST",data:JSON.stringify({windowId:n})})},closeWindow:function(e,t,n){return Br(e,t,{method:"POST",data:JSON.stringify({windowId:n})})},dispatchNativeAutomationEvent:function(n,o,r,i){return v(this,void 0,void 0,function(){var t;return y(this,function(e){switch(e.label){case 0:return t=JSON.stringify({type:r,options:i}),[4,Br(n,o,{method:"POST",data:t})];case 1:return e.sent(),[2]}})})},dispatchNativeAutomationEventSequence:function(t,n,o){return v(this,void 0,void 0,function(){return y(this,function(e){switch(e.label){case 0:return[4,Br(t,n,{method:"POST",data:JSON.stringify(o)})];case 1:return e.sent(),[2]}})})},parseSelector:function(e,t,n){return Br(e,t,{method:"POST",data:JSON.stringify({selector:n})})}}),Xr={};Xr.RequestBarrier=p,Xr.ClientRequestEmitter=P,Xr.ScriptExecutionBarrier=R,Xr.ScriptExecutionEmitter=L,Xr.pageUnloadBarrier=Ht,Xr.preventRealEvents=function(){Tn.initElementListening(ti,_n),Tn.addFirstInternalEventBeforeListener(ti,_n,Pn),qt.init()},Xr.disableRealEventsPreventing=function(){Tn.removeInternalEventBeforeListener(ti,_n,Pn)},Xr.scrollController=qt,Xr.ScrollAutomation=ho,Xr.selectController=Dn,Xr.serviceUtils=kt,Xr.domUtils=mt,Xr.contentEditable=qo,Xr.positionUtils=ao,Xr.styleUtils=Sn,Xr.scrollUtils=Fn,Xr.eventUtils=Rt,Xr.arrayUtils=$,Xr.promiseUtils=so,Xr.textSelection=ir,Xr.waitFor=function(i,a,l){return new ar(function(e,t){var n,o,r=i();r?e(r):(n=lr.setInterval.call(ti,function(){(r=i())&&(lr.clearInterval.call(ti,n),lr.clearTimeout.call(ti,o),e(r))},a),o=lr.setTimeout.call(ti,function(){lr.clearInterval.call(ti,n),t()},l))})},Xr.delay=h,Xr.getTimeLimitedPromise=function(e,t){return c.Promise.race([e,h(t).then(function(){return c.Promise.reject(new _r)})])},Xr.noop=function(){},Xr.getKeyArray=Pr,Xr.getSanitizedKey=Nr,Xr.parseKeySequence=function(e){if("string"!=typeof e)return{error:!0};var t=(e=Or(e).replace(/\s+/g," ")).length,n=e.charAt(t-1),o=e.charAt(t-2);1<t&&"+"===n&&!/[+ ]/.test(o)&&(e=e.substring(0,e.length-1));var r=e.split(" ");return{combinations:r,error:j(r,function(e){var t=Pr(e);return j(t,function(e){var t=1===e.length||"space"===e,n=Nr(e),o=s.modifiers[n],r=s.specialKeys[n];return!(t||o||r)})}),keys:e}},Xr.sendRequestToFrame=fo,Xr.KEY_MAPS=s,Xr.browser=Yr,Xr.stringifyElement=jn,Xr.selectorTextFilter=function o(e,r,i,a){function t(e){for(var t=e.childNodes.length,n=0;n<t;n++)if(o(e.childNodes[n],r,i,a))return!0;return!1}function n(e){return a instanceof RegExp?a.test(e):a===e.trim()}if(1===e.nodeType)return n(e.innerText||e.textContent);if(9!==e.nodeType)return 11===e.nodeType?t(e):n(e.textContent);var l=e.querySelector("head"),s=e.querySelector("body");return t(l)||t(s)},Xr.selectorAttributeFilter=function(e,t,n,o,r){if(1!==e.nodeType)return!1;function i(e,t){return"string"==typeof t?t===e:t.test(e)}for(var a,l=e.attributes,s=0;s<l.length;s++)if(i((a=l[s]).nodeName,o)&&(!r||i(a.nodeValue,r)))return!0;return!1},Xr.TEST_RUN_ERRORS={uncaughtErrorOnPage:"E1",uncaughtErrorInTestCode:"E2",uncaughtNonErrorObjectInTestCode:"E3",uncaughtErrorInClientFunctionCode:"E4",uncaughtErrorInCustomDOMPropertyCode:"E5",unhandledPromiseRejection:"E6",uncaughtException:"E7",missingAwaitError:"E8",actionIntegerOptionError:"E9",actionPositiveIntegerOptionError:"E10",actionBooleanOptionError:"E11",actionSpeedOptionError:"E12",actionOptionsTypeError:"E14",actionBooleanArgumentError:"E15",actionStringArgumentError:"E16",actionNullableStringArgumentError:"E17",actionStringOrStringArrayArgumentError:"E18",actionStringArrayElementError:"E19",actionIntegerArgumentError:"E20",actionRoleArgumentError:"E21",actionPositiveIntegerArgumentError:"E22",actionSelectorError:"E23",actionElementNotFoundError:"E24",actionElementIsInvisibleError:"E26",actionSelectorMatchesWrongNodeTypeError:"E27",actionAdditionalElementNotFoundError:"E28",actionAdditionalElementIsInvisibleError:"E29",actionAdditionalSelectorMatchesWrongNodeTypeError:"E30",actionElementNonEditableError:"E31",actionElementNotTextAreaError:"E32",actionElementNonContentEditableError:"E33",actionElementIsNotFileInputError:"E34",actionRootContainerNotFoundError:"E35",actionIncorrectKeysError:"E36",actionCannotFindFileToUploadError:"E37",actionUnsupportedDeviceTypeError:"E38",actionIframeIsNotLoadedError:"E39",actionElementNotIframeError:"E40",actionInvalidScrollTargetError:"E41",currentIframeIsNotLoadedError:"E42",currentIframeNotFoundError:"E43",currentIframeIsInvisibleError:"E44",nativeDialogNotHandledError:"E45",uncaughtErrorInNativeDialogHandler:"E46",setTestSpeedArgumentError:"E47",setNativeDialogHandlerCodeWrongTypeError:"E48",clientFunctionExecutionInterruptionError:"E49",domNodeClientFunctionResultError:"E50",invalidSelectorResultError:"E51",cannotObtainInfoForElementSpecifiedBySelectorError:"E52",externalAssertionLibraryError:"E53",pageLoadError:"E54",windowDimensionsOverflowError:"E55",forbiddenCharactersInScreenshotPathError:"E56",invalidElementScreenshotDimensionsError:"E57",roleSwitchInRoleInitializerError:"E58",assertionExecutableArgumentError:"E59",assertionWithoutMethodCallError:"E60",assertionUnawaitedPromiseError:"E61",requestHookNotImplementedError:"E62",requestHookUnhandledError:"E63",uncaughtErrorInCustomClientScriptCode:"E64",uncaughtErrorInCustomClientScriptCodeLoadedFromModule:"E65",uncaughtErrorInCustomScript:"E66",uncaughtTestCafeErrorInCustomScript:"E67",childWindowIsNotLoadedError:"E68",childWindowNotFoundError:"E69",cannotSwitchToWindowError:"E70",closeChildWindowError:"E71",childWindowClosedBeforeSwitchingError:"E72",cannotCloseWindowWithChildrenError:"E73",targetWindowNotFoundError:"E74",parentWindowNotFoundError:"E76",previousWindowNotFoundError:"E77",switchToWindowPredicateError:"E78",actionFunctionArgumentError:"E79",multipleWindowsModeIsDisabledError:"E80",multipleWindowsModeIsNotSupportedInRemoteBrowserError:"E81",cannotCloseWindowWithoutParent:"E82",cannotRestoreChildWindowError:"E83",executionTimeoutExceeded:"E84",actionRequiredCookieArguments:"E85",actionCookieArgumentError:"E86",actionCookieArgumentsError:"E87",actionUrlCookieArgumentError:"E88",actionUrlsCookieArgumentError:"E89",actionStringOptionError:"E90",actionDateOptionError:"E91",actionNumberOptionError:"E92",actionUrlOptionError:"E93",actionUrlSearchParamsOptionError:"E94",actionObjectOptionError:"E95",actionUrlArgumentError:"E96",actionStringOrRegexOptionError:"E97",actionSkipJsErrorsArgumentError:"E98",actionFunctionOptionError:"E99",actionInvalidObjectPropertyError:"E100",actionElementIsNotTargetError:"E101",multipleWindowsModeIsNotSupportedInNativeAutomationError:"E102"},Xr.RUNTIME_ERRORS=sr;var Qr=o.default.nativeMethods,$r=o.default.EVENTS.evalIframeScript;Qr.objectDefineProperty(ti,"%testCafeCore%",{configurable:!0,value:Xr}),o.default.on($r,function(e){return ei(Qr.contentWindowGetter.call(e.iframe))});var Zr=o.default.eventSandbox.message;Zr.on(Zr.SERVICE_MSG_RECEIVED_EVENT,function(e){var t,n,o,r,i;e.message.cmd===ho.SCROLL_REQUEST_CMD&&(n=(t=e.message).offsetX,o=t.offsetY,r=t.maxScrollMargin,i=at(e.source),new ho(i,{offsetX:n,offsetY:o},r).run().then(function(){return Zr.sendServiceMsg({cmd:ho.SCROLL_RESPONSE_CMD},e.source)}))})}(ti["%hammerhead%"],ti["%hammerhead%"].Promise)}(window);
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "testcafe",
3
3
  "description": "Automated browser testing for the modern web development stack.",
4
4
  "license": "MIT",
5
- "version": "3.7.0",
5
+ "version": "3.7.1-rc.1",
6
6
  "author": {
7
7
  "name": "Developer Express Inc.",
8
8
  "url": "https://www.devexpress.com/"
@@ -144,7 +144,7 @@
144
144
  "source-map-support": "^0.5.16",
145
145
  "strip-bom": "^2.0.0",
146
146
  "testcafe-browser-tools": "2.0.26",
147
- "testcafe-hammerhead": "31.7.3",
147
+ "testcafe-hammerhead": "31.7.4",
148
148
  "testcafe-legacy-api": "5.1.8",
149
149
  "testcafe-reporter-json": "^2.1.0",
150
150
  "testcafe-reporter-list": "^2.2.0",