@agimon-ai/browse-tool 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/LICENSE +52 -0
  2. package/README.md +375 -0
  3. package/dist/cli.cjs +674 -0
  4. package/dist/cli.d.cts +1 -0
  5. package/dist/cli.d.mts +2 -0
  6. package/dist/cli.mjs +434 -0
  7. package/dist/cli.mjs.map +1 -0
  8. package/dist/extension/background.js +7248 -0
  9. package/dist/extension/background.js.map +1 -0
  10. package/dist/extension/content.js +446 -0
  11. package/dist/extension/content.js.map +1 -0
  12. package/dist/extension/manifest.json +36 -0
  13. package/dist/extension/offscreen.html +9 -0
  14. package/dist/extension/offscreen.js +137 -0
  15. package/dist/extension/offscreen.js.map +1 -0
  16. package/dist/extension/popup.html +195 -0
  17. package/dist/extension/popup.js +132 -0
  18. package/dist/extension/popup.js.map +1 -0
  19. package/dist/index.cjs +1 -0
  20. package/dist/index.d.cts +309 -0
  21. package/dist/index.d.cts.map +1 -0
  22. package/dist/index.d.mts +310 -0
  23. package/dist/index.d.mts.map +1 -0
  24. package/dist/index.mjs +2 -0
  25. package/dist/index.mjs.map +1 -0
  26. package/dist/playwright-test-BwI7HgW7.mjs +253 -0
  27. package/dist/playwright-test-BwI7HgW7.mjs.map +1 -0
  28. package/dist/playwright-test-CnsuVfC9.cjs +252 -0
  29. package/dist/stdio-BP3yiSxK.mjs +9 -0
  30. package/dist/stdio-BP3yiSxK.mjs.map +1 -0
  31. package/dist/stdio-ynNFGBY4.cjs +9 -0
  32. package/dist/stubs/playwright-test.cjs +1 -0
  33. package/dist/stubs/playwright-test.d.cts +111 -0
  34. package/dist/stubs/playwright-test.d.cts.map +1 -0
  35. package/dist/stubs/playwright-test.d.mts +111 -0
  36. package/dist/stubs/playwright-test.d.mts.map +1 -0
  37. package/dist/stubs/playwright-test.mjs +1 -0
  38. package/package.json +77 -0
@@ -0,0 +1,252 @@
1
+ const e=require(`./stdio-ynNFGBY4.cjs`);let t=require(`node:module`);const n=Symbol.for(`__locatorProxyBrand__`);var r=class e{[n]=!0;constructor(e,t){this.page=e,this.steps=t}getByRole(t,n){return new e(this.page,[...this.steps,{type:`role`,role:t,options:n}])}getByText(t,n){return new e(this.page,[...this.steps,{type:`text`,text:t,options:n}])}getByLabel(t,n){return new e(this.page,[...this.steps,{type:`label`,text:t,options:n}])}getByPlaceholder(t,n){return new e(this.page,[...this.steps,{type:`placeholder`,text:t,options:n}])}getByTestId(t){return new e(this.page,[...this.steps,{type:`testId`,testId:t}])}locator(t){return new e(this.page,[...this.steps,{type:`css`,selector:t}])}filter(t){return new e(this.page,[...this.steps,{type:`filter`,options:t}])}first(){return new e(this.page,[...this.steps,{type:`first`}])}last(){return this.nth(-1)}nth(t){return new e(this.page,[...this.steps,{type:`nth`,index:t}])}async click(e){let t=await this.resolveAndMark(e?.timeout);await this.page.click(t)}async fill(e,t){let n=await this.resolveAndMark(t?.timeout);await this.page.fill(n,e)}async type(e,t){let n=await this.resolveAndMark(t?.timeout);await this.page.type(n,e,{delay:t?.delay})}async press(e){let t=await this.resolveAndMark();await this.page.click(t),await this.page.press(e)}async hover(e){let t=await this.resolveAndMark(e?.timeout);await this.page.hover(t)}async selectOption(e){let t=await this.resolveAndMark();await this.page.selectOption(t,e)}async check(){let e=await this.resolveAndMark();await this.page.click(e)}async uncheck(){let e=await this.resolveAndMark();await this.page.click(e)}async isVisible(){let e=this.buildResolveScript(`isVisible`);return await this.page.evaluate(e)??!1}async isHidden(){return!await this.isVisible()}async isEnabled(){return!await this.evaluateProperty(`disabled`)}async isDisabled(){return!!await this.evaluateProperty(`disabled`)}async isChecked(){return!!await this.evaluateProperty(`checked`)}async evaluateProperty(e){let t=this.buildResolveScript(`getProperty`,e);return this.page.evaluate(t)}async textContent(){let e=this.buildResolveScript(`textContent`);return this.page.evaluate(e)}async innerText(){let e=this.buildResolveScript(`innerText`);return await this.page.evaluate(e)??``}async inputValue(){let e=this.buildResolveScript(`inputValue`);return await this.page.evaluate(e)??``}async count(){let e=this.buildResolveScript(`count`);return await this.page.evaluate(e)??0}async waitFor(e){let t=e?.timeout??5e3,n=e?.state??`visible`,r=Date.now();for(;Date.now()-r<t;){if(n===`visible`&&await this.isVisible()||n===`hidden`&&!await this.isVisible()||n===`attached`&&await this.count()>0||n===`detached`&&await this.count()===0)return;await new Promise(e=>setTimeout(e,100))}throw Error(`Locator waitFor("${n}") timed out after ${t}ms`)}async resolveAndMark(e){let t=e??5e3,n=Date.now(),r=`pw-${Date.now()}-${Math.random().toString(36).slice(2,8)}`;for(;Date.now()-n<t;){let e=this.buildResolveScript(`mark`,r);if(await this.page.evaluate(e))return`[data-pw-proxy="${r}"]`;await new Promise(e=>setTimeout(e,100))}throw Error(`Locator could not resolve element within ${t}ms. Steps: ${this.describeSteps()}`)}describeSteps(){return this.steps.map(e=>{switch(e.type){case`role`:return`getByRole("${e.role}"${e.options?.name?`, { name: "${String(e.options.name)}" }`:``})`;case`text`:return`getByText("${String(e.text)}")`;case`label`:return`getByLabel("${String(e.text)}")`;case`placeholder`:return`getByPlaceholder("${String(e.text)}")`;case`testId`:return`getByTestId("${e.testId}")`;case`css`:return`locator("${e.selector}")`;case`filter`:return`filter(...)`;case`first`:return`first()`;case`nth`:return`nth(${e.index})`}}).join(`.`)}serializeSteps(){return this.steps.map(e=>{if(e.type===`text`||e.type===`label`||e.type===`placeholder`)return{...e,text:e.text instanceof RegExp?{__regex__:e.text.source,flags:e.text.flags}:e.text};if(e.type===`role`&&e.options?.name instanceof RegExp)return{...e,options:{...e.options,name:{__regex__:e.options.name.source,flags:e.options.name.flags}}};if(e.type===`filter`){let t={};return e.options.hasText&&(t.hasText=e.options.hasText instanceof RegExp?{__regex__:e.options.hasText.source,flags:e.options.hasText.flags}:e.options.hasText),e.options.has&&(t.hasSteps=e.options.has.serializeSteps()),{type:`filter`,options:t}}return e})}buildResolveScript(e,t){return`(function() {
2
+ var steps = ${JSON.stringify(this.serializeSteps())};
3
+ var action = "${e}";
4
+ var extra = ${t===void 0?`null`:JSON.stringify(t)};
5
+
6
+ function toRegex(v) {
7
+ if (v && typeof v === 'object' && v.__regex__) return new RegExp(v.__regex__, v.flags || '');
8
+ return null;
9
+ }
10
+
11
+ function matchText(actual, expected, exact) {
12
+ if (!actual) return false;
13
+ var regex = toRegex(expected);
14
+ if (regex) return regex.test(actual);
15
+ if (exact) return actual === expected;
16
+ return actual.toLowerCase().indexOf(expected.toLowerCase()) !== -1;
17
+ }
18
+
19
+ var ROLE_MAP = {
20
+ heading: 'h1,h2,h3,h4,h5,h6,[role="heading"]',
21
+ link: 'a[href],[role="link"]',
22
+ button: 'button,input[type="button"],input[type="submit"],input[type="reset"],[role="button"]',
23
+ textbox: 'input:not([type]),input[type="text"],input[type="email"],input[type="password"],input[type="search"],input[type="tel"],input[type="url"],input[type="number"],textarea,[role="textbox"]',
24
+ checkbox: 'input[type="checkbox"],[role="checkbox"]',
25
+ radio: 'input[type="radio"],[role="radio"]',
26
+ combobox: 'select,[role="combobox"],[role="listbox"]',
27
+ navigation: 'nav,[role="navigation"]',
28
+ main: 'main,[role="main"]',
29
+ banner: 'header,[role="banner"]',
30
+ contentinfo: 'footer,[role="contentinfo"]',
31
+ region: 'section[aria-label],section[aria-labelledby],[role="region"]',
32
+ list: 'ul,ol,[role="list"]',
33
+ listitem: 'li,[role="listitem"]',
34
+ img: 'img,[role="img"]',
35
+ dialog: 'dialog,[role="dialog"],[role="alertdialog"]',
36
+ tab: '[role="tab"]',
37
+ tablist: '[role="tablist"]',
38
+ tabpanel: '[role="tabpanel"]',
39
+ cell: 'td,[role="cell"]',
40
+ row: 'tr,[role="row"]',
41
+ table: 'table,[role="table"],[role="grid"]',
42
+ menuitem: '[role="menuitem"]',
43
+ menu: '[role="menu"],[role="menubar"]',
44
+ switch: '[role="switch"]',
45
+ alert: '[role="alert"]',
46
+ status: '[role="status"]',
47
+ progressbar: 'progress,[role="progressbar"]',
48
+ spinbutton: 'input[type="number"],[role="spinbutton"]',
49
+ slider: 'input[type="range"],[role="slider"]',
50
+ separator: 'hr,[role="separator"]',
51
+ tooltip: '[role="tooltip"]',
52
+ tree: '[role="tree"]',
53
+ treeitem: '[role="treeitem"]',
54
+ group: 'fieldset,[role="group"]',
55
+ article: 'article,[role="article"]',
56
+ complementary: 'aside,[role="complementary"]',
57
+ form: 'form,[role="form"]',
58
+ search: '[role="search"]'
59
+ };
60
+
61
+ function getAccessibleName(el) {
62
+ if (el.getAttribute('aria-label')) return el.getAttribute('aria-label');
63
+ var labelledBy = el.getAttribute('aria-labelledby');
64
+ if (labelledBy) {
65
+ var labelEl = document.getElementById(labelledBy);
66
+ if (labelEl) return labelEl.textContent.trim();
67
+ }
68
+ if (el.id) {
69
+ var labels = document.querySelectorAll('label[for="' + el.id + '"]');
70
+ if (labels.length > 0) return labels[0].textContent.trim();
71
+ }
72
+ var parentLabel = el.closest('label');
73
+ if (parentLabel) {
74
+ var clone = parentLabel.cloneNode(true);
75
+ var inputs = clone.querySelectorAll('input,select,textarea');
76
+ inputs.forEach(function(inp) { inp.remove(); });
77
+ var t = clone.textContent.trim();
78
+ if (t) return t;
79
+ }
80
+ if (el.placeholder) return el.placeholder;
81
+ if (el.title) return el.title;
82
+ if (el.alt) return el.alt;
83
+ return (el.textContent || '').trim();
84
+ }
85
+
86
+ function resolveSteps(candidates, stepsToResolve) {
87
+ for (var i = 0; i < stepsToResolve.length; i++) {
88
+ var step = stepsToResolve[i];
89
+
90
+ if (step.type === 'role') {
91
+ var sel = ROLE_MAP[step.role] || '[role="' + step.role + '"]';
92
+ var matching = [];
93
+ for (var c = 0; c < candidates.length; c++) {
94
+ var children = candidates[c].querySelectorAll(sel);
95
+ for (var j = 0; j < children.length; j++) matching.push(children[j]);
96
+ if (candidates[c].matches && candidates[c].matches(sel)) matching.push(candidates[c]);
97
+ }
98
+ if (step.options && step.options.name != null) {
99
+ var name = step.options.name;
100
+ var exact = step.options.exact || false;
101
+ matching = matching.filter(function(el) {
102
+ return matchText(getAccessibleName(el), name, exact);
103
+ });
104
+ }
105
+ candidates = matching;
106
+
107
+ } else if (step.type === 'text') {
108
+ var textFiltered = [];
109
+ for (var ci = 0; ci < candidates.length; ci++) {
110
+ var allEls = candidates[ci].querySelectorAll('*');
111
+ for (var ji = 0; ji < allEls.length; ji++) {
112
+ if (matchText(allEls[ji].textContent, step.text, step.options && step.options.exact)) {
113
+ textFiltered.push(allEls[ji]);
114
+ }
115
+ }
116
+ if (matchText(candidates[ci].textContent, step.text, step.options && step.options.exact)) {
117
+ textFiltered.push(candidates[ci]);
118
+ }
119
+ }
120
+ candidates = textFiltered;
121
+
122
+ } else if (step.type === 'label') {
123
+ var labeled = [];
124
+ var allLabels = document.querySelectorAll('label');
125
+ for (var li = 0; li < allLabels.length; li++) {
126
+ var labelText = allLabels[li].textContent.trim();
127
+ if (matchText(labelText, step.text, step.options && step.options.exact)) {
128
+ var forAttr = allLabels[li].getAttribute('for');
129
+ if (forAttr) {
130
+ var target = document.getElementById(forAttr);
131
+ if (target) labeled.push(target);
132
+ }
133
+ var inner = allLabels[li].querySelectorAll('input,select,textarea');
134
+ for (var ki = 0; ki < inner.length; ki++) labeled.push(inner[ki]);
135
+ }
136
+ }
137
+ var byAria = document.querySelectorAll('[aria-label]');
138
+ for (var ai = 0; ai < byAria.length; ai++) {
139
+ if (matchText(byAria[ai].getAttribute('aria-label'), step.text, step.options && step.options.exact)) {
140
+ labeled.push(byAria[ai]);
141
+ }
142
+ }
143
+ candidates = labeled;
144
+
145
+ } else if (step.type === 'placeholder') {
146
+ var phMatches = [];
147
+ for (var pi = 0; pi < candidates.length; pi++) {
148
+ var phInputs = candidates[pi].querySelectorAll('[placeholder]');
149
+ for (var pj = 0; pj < phInputs.length; pj++) {
150
+ if (matchText(phInputs[pj].placeholder, step.text, step.options && step.options.exact)) {
151
+ phMatches.push(phInputs[pj]);
152
+ }
153
+ }
154
+ if (candidates[pi].placeholder && matchText(candidates[pi].placeholder, step.text, step.options && step.options.exact)) {
155
+ phMatches.push(candidates[pi]);
156
+ }
157
+ }
158
+ candidates = phMatches;
159
+
160
+ } else if (step.type === 'testId') {
161
+ var tidMatches = [];
162
+ for (var ti = 0; ti < candidates.length; ti++) {
163
+ var tidFound = candidates[ti].querySelectorAll('[data-testid="' + step.testId + '"]');
164
+ for (var tj = 0; tj < tidFound.length; tj++) tidMatches.push(tidFound[tj]);
165
+ if (candidates[ti].getAttribute && candidates[ti].getAttribute('data-testid') === step.testId) {
166
+ tidMatches.push(candidates[ti]);
167
+ }
168
+ }
169
+ candidates = tidMatches;
170
+
171
+ } else if (step.type === 'css') {
172
+ var cssMatches = [];
173
+ for (var si = 0; si < candidates.length; si++) {
174
+ var cssFound = candidates[si].querySelectorAll(step.selector);
175
+ for (var sj = 0; sj < cssFound.length; sj++) cssMatches.push(cssFound[sj]);
176
+ }
177
+ candidates = cssMatches;
178
+
179
+ } else if (step.type === 'filter') {
180
+ if (step.options.hasText) {
181
+ candidates = candidates.filter(function(el) {
182
+ return matchText(el.textContent, step.options.hasText, false);
183
+ });
184
+ }
185
+ if (step.options.hasSteps) {
186
+ candidates = candidates.filter(function(el) {
187
+ var sub = resolveSteps([el], step.options.hasSteps);
188
+ return sub.length > 0;
189
+ });
190
+ }
191
+
192
+ } else if (step.type === 'first') {
193
+ candidates = candidates.length > 0 ? [candidates[0]] : [];
194
+
195
+ } else if (step.type === 'nth') {
196
+ var idx = step.index;
197
+ if (idx < 0) idx = candidates.length + idx;
198
+ candidates = (idx >= 0 && idx < candidates.length) ? [candidates[idx]] : [];
199
+ }
200
+
201
+ candidates = candidates.filter(function(el, elIdx, arr) {
202
+ return arr.indexOf(el) === elIdx;
203
+ });
204
+ }
205
+ return candidates;
206
+ }
207
+
208
+ var candidates = resolveSteps([document], steps);
209
+
210
+ if (action === 'count') return candidates.length;
211
+
212
+ if (action === 'isVisible') {
213
+ if (candidates.length === 0) return false;
214
+ var el = candidates[0];
215
+ var rect = el.getBoundingClientRect();
216
+ var style = window.getComputedStyle(el);
217
+ return rect.width > 0 && rect.height > 0 && style.visibility !== 'hidden' && style.display !== 'none';
218
+ }
219
+
220
+ if (candidates.length === 0) {
221
+ if (action === 'textContent') return null;
222
+ if (action === 'innerText') return '';
223
+ if (action === 'inputValue') return '';
224
+ if (action === 'getProperty') return null;
225
+ return false;
226
+ }
227
+
228
+ var target = candidates[0];
229
+
230
+ if (action === 'mark') {
231
+ target.setAttribute('data-pw-proxy', extra);
232
+ return true;
233
+ }
234
+
235
+ if (action === 'getProperty') {
236
+ return target[extra];
237
+ }
238
+
239
+ if (action === 'textContent') {
240
+ return target.textContent;
241
+ }
242
+
243
+ if (action === 'innerText') {
244
+ return target.innerText || target.textContent || '';
245
+ }
246
+
247
+ if (action === 'inputValue') {
248
+ return target.value || '';
249
+ }
250
+
251
+ return null;
252
+ })()`}};const i=Symbol.for(`__pageProxyBrand__`),a=100,o=5e3;async function s(e,t,n=5e3){let r=Date.now();for(;Date.now()-r<n;){if(await e())return;await new Promise(e=>setTimeout(e,100))}throw Error(t)}function c(e,t){return e==null?!1:t instanceof RegExp?t.test(e):e===t}function l(e,t){return e==null?!1:t instanceof RegExp?t.test(e):e.includes(t)}function u(e,t){let n=e=>t?!e:e;return{async toBeVisible(r){await s(async()=>n(await e.isVisible()),t?`Expected element to not be visible`:`Expected element to be visible`,r?.timeout)},async toBeHidden(r){await s(async()=>n(!await e.isVisible()),t?`Expected element to not be hidden`:`Expected element to be hidden`,r?.timeout)},async toBeDisabled(r){await s(async()=>n(!!await e.evaluateProperty(`disabled`)),t?`Expected element to not be disabled`:`Expected element to be disabled`,r?.timeout)},async toBeEnabled(r){await s(async()=>n(!await e.evaluateProperty(`disabled`)),t?`Expected element to not be enabled`:`Expected element to be enabled`,r?.timeout)},async toBeChecked(r){await s(async()=>n(!!await e.evaluateProperty(`checked`)),t?`Expected element to not be checked`:`Expected element to be checked`,r?.timeout)},async toHaveValue(r,i){await s(async()=>n(c(await e.evaluateProperty(`value`),r)),t?`Expected element to not have value "${String(r)}"`:`Expected element to have value "${String(r)}"`,i?.timeout)},async toHaveText(r,i){await s(async()=>n(c((await e.textContent())?.trim()??null,r)),t?`Expected element to not have text "${String(r)}"`:`Expected element to have text "${String(r)}"`,i?.timeout)},async toContainText(r,i){await s(async()=>n(l(await e.textContent(),r)),t?`Expected element to not contain text "${String(r)}"`:`Expected element to contain text "${String(r)}"`,i?.timeout)},async toHaveCount(r,i){await s(async()=>n(await e.count()===r),t?`Expected element count to not be ${r}`:`Expected element count to be ${r}`,i?.timeout)},get not(){return u(e,!t)}}}function d(e,t){let n=e=>t?!e:e;return{async toHaveURL(r,i){await s(async()=>n(c(await e.currentUrlAsync(),r)),t?`Expected page to not have URL "${String(r)}"`:`Expected page to have URL "${String(r)}"`,i?.timeout)},async toHaveTitle(r,i){await s(async()=>n(c(await e.title(),r)),t?`Expected page to not have title "${String(r)}"`:`Expected page to have title "${String(r)}"`,i?.timeout)},get not(){return d(e,!t)}}}function f(e){let t=e;if(t[n])return u(e,!1);if(t[i])return d(e,!1);throw Error(`createExtensionExpect called with unsupported target`)}function p(){try{return(0,t.createRequire)(require(`url`).pathToFileURL(__filename).href).resolve(`playwright/test`),require(`url`).pathToFileURL(__filename).href}catch{return typeof __PLAYWRIGHT_MCP_STUB_PATH__==`string`?`file://${__PLAYWRIGHT_MCP_STUB_PATH__}`:require(`url`).pathToFileURL(__filename).href}}const m=process,h=m.__pw_initiator__;m.__pw_initiator__=void 0;const{expect:g}=(0,t.createRequire)(p())(`playwright/test`);m.__pw_initiator__=h;var _=class{currentSpecPath=``;rootDescribe;currentDescribe;constructor(){this.rootDescribe=this.createDescribeBlock(``,null),this.currentDescribe=this.rootDescribe}createDescribeBlock(e,t){return{title:e,tests:[],beforeEachHooks:[],afterEachHooks:[],children:[],parent:t}}setSpecPath(e){this.currentSpecPath=e}reset(){this.currentSpecPath=``,this.rootDescribe=this.createDescribeBlock(``,null),this.currentDescribe=this.rootDescribe}addTest(e,t,n=!1,r=!1){let i={title:e,fn:t,fullTitle:this.getFullTitle(e),only:n,skip:r};return this.currentDescribe.tests.push(i),i}enterDescribe(e){let t=this.createDescribeBlock(e,this.currentDescribe);this.currentDescribe.children.push(t),this.currentDescribe=t}exitDescribe(){this.currentDescribe.parent&&(this.currentDescribe=this.currentDescribe.parent)}addBeforeEach(e){this.currentDescribe.beforeEachHooks.push(e)}addAfterEach(e){this.currentDescribe.afterEachHooks.push(e)}getFullTitle(e){let t=[],n=this.currentDescribe;for(;n;)n.title&&t.unshift(n.title),n=n.parent;return t.push(e),t.join(` > `)}flattenTests(e,t,n){let r=[],i=[...t,...e.beforeEachHooks],a=[...e.afterEachHooks,...n];for(let t of e.tests)r.push({title:t.title,fullTitle:t.fullTitle,fn:async e=>{for(let t of i)await t(e);await t.fn(e);for(let t of a)await t(e)},only:t.only,skip:t.skip});for(let t of e.children)r.push(...this.flattenTests(t,i,a));return r}retrieveAndReset(){let e=this.flattenTests(this.rootDescribe,[],[]),t={specPath:this.currentSpecPath,root:this.rootDescribe,allTests:e,testCount:e.length};return this.reset(),t}peek(){let e=this.flattenTests(this.rootDescribe,[],[]);return{specPath:this.currentSpecPath,root:this.rootDescribe,allTests:e,testCount:e.length}}};const v=`__playwrightMcpTestCollector__`,y=globalThis;y[v]||(y[v]=new _);const b=y[v];function x(e){let t=new Map;for(let[n,r]of Object.entries(e))typeof r==`function`?t.set(n,r):Array.isArray(r)&&r.length===2&&typeof r[1]==`function`&&t.set(n,r[1]);return t}function S(e){if(e.size===0)return e=>e;let t=[...e.entries()];return e=>async n=>{let r={...n};async function i(n){if(n>=t.length){await e(r);return}let[a,o]=t[n];await o(r,async e=>{r[a]=e,await i(n+1)})}await i(0)}}function C(e){let t=S(e);function n(e,n){b.addTest(e,t(n))}return n.only=function(e,n){b.addTest(e,t(n),!0,!1)},n.skip=function(e,n){b.addTest(e,t(n),!1,!0)},n.describe=function(e,t){b.enterDescribe(e),t(),b.exitDescribe()},n.beforeEach=function(e){b.addBeforeEach(t(e))},n.afterEach=function(e){b.addAfterEach(t(e))},n.extend=function(t){return C(new Map([...e,...x(t)]))},n}function w(e,t){b.addTest(e,t)}function T(e,t){b.addTest(e,t,!0,!1)}function E(e,t){b.addTest(e,t,!1,!0)}function D(e,t){b.enterDescribe(e),t(),b.exitDescribe()}function O(e){b.addBeforeEach(e)}function k(e){b.addAfterEach(e)}w.describe=D,w.beforeEach=O,w.afterEach=k,w.only=T,w.skip=E,w.extend=function(e){return C(x(e))};function A(e){b.reset(),b.setSpecPath(e)}function j(){return b.retrieveAndReset()}function M(){return b.peek()}function N(){b.reset()}const P=(e=>{let t=e;return t?.[n]||t?.[i]?f(e):g(e)});Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return N}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return M}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return j}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return P}});