@enricai/barnacle 1.12.82 → 1.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/ats-field-vocabulary.d.ts.map +1 -1
- package/dist/lib/ats-field-vocabulary.js +86 -3
- package/dist/lib/ats-field-vocabulary.js.map +1 -1
- package/dist/lib/llm/judges/verify-step-advanced.d.ts +1 -1
- package/dist/lib/llm/judges/verify-step-advanced.d.ts.map +1 -1
- package/dist/lib/llm/judges/verify-step-advanced.js +3 -2
- package/dist/lib/llm/judges/verify-step-advanced.js.map +1 -1
- package/dist/lib/llm/judges/verify-submit.d.ts +2 -2
- package/dist/lib/llm/judges/verify-submit.d.ts.map +1 -1
- package/dist/lib/llm/judges/verify-submit.js +17 -5
- package/dist/lib/llm/judges/verify-submit.js.map +1 -1
- package/dist/lib/logging.d.ts +14 -4
- package/dist/lib/logging.d.ts.map +1 -1
- package/dist/lib/logging.js +34 -25
- package/dist/lib/logging.js.map +1 -1
- package/dist/lib/random.d.ts +7 -3
- package/dist/lib/random.d.ts.map +1 -1
- package/dist/lib/random.js +27 -4
- package/dist/lib/random.js.map +1 -1
- package/dist/scraper/click-settle.d.ts +16 -7
- package/dist/scraper/click-settle.d.ts.map +1 -1
- package/dist/scraper/click-settle.js +31 -24
- package/dist/scraper/click-settle.js.map +1 -1
- package/dist/scraper/deep-locator-actuate.d.ts.map +1 -1
- package/dist/scraper/deep-locator-actuate.js +17 -1
- package/dist/scraper/deep-locator-actuate.js.map +1 -1
- package/dist/scraper/deep-locator-fake.js +1 -1
- package/dist/scraper/deep-locator-fake.js.map +1 -1
- package/dist/scraper/flow-runner.d.ts +139 -8
- package/dist/scraper/flow-runner.d.ts.map +1 -1
- package/dist/scraper/flow-runner.js +710 -316
- package/dist/scraper/flow-runner.js.map +1 -1
- package/dist/scraper/phantom-click.d.ts +45 -1
- package/dist/scraper/phantom-click.d.ts.map +1 -1
- package/dist/scraper/phantom-click.js +114 -10
- package/dist/scraper/phantom-click.js.map +1 -1
- package/dist/scraper/runtime-capture-store.d.ts +38 -0
- package/dist/scraper/runtime-capture-store.d.ts.map +1 -0
- package/dist/scraper/runtime-capture-store.js +103 -0
- package/dist/scraper/runtime-capture-store.js.map +1 -0
- package/dist/scraper/segmented-date-spinbutton.d.ts +13 -0
- package/dist/scraper/segmented-date-spinbutton.d.ts.map +1 -0
- package/dist/scraper/segmented-date-spinbutton.js +71 -0
- package/dist/scraper/segmented-date-spinbutton.js.map +1 -0
- package/dist/scripts/recon-browser.d.ts +0 -8
- package/dist/scripts/recon-browser.d.ts.map +1 -1
- package/dist/scripts/recon-browser.js +102 -50
- package/dist/scripts/recon-browser.js.map +1 -1
- package/dist/scripts/recon-generate.d.ts +11 -0
- package/dist/scripts/recon-generate.d.ts.map +1 -1
- package/dist/scripts/recon-generate.js +180 -53
- package/dist/scripts/recon-generate.js.map +1 -1
- package/package.json +1 -1
|
@@ -13,7 +13,19 @@ export interface PhantomClickSnapshot {
|
|
|
13
13
|
bodyHtmlLength: number;
|
|
14
14
|
/** `<len>:<first-200-chars>` of visible text, as in flow-runner's StepSnapshot. */
|
|
15
15
|
visibleTextSignature?: string;
|
|
16
|
+
/** Bounded whitespace-normalised excerpt of the visible text (see flow-runner's StepSnapshot). */
|
|
17
|
+
visibleText?: string;
|
|
18
|
+
/** Digest of the whole normalised visible text, so a change beyond the head or excerpt is still seen. */
|
|
19
|
+
visibleTextDigest?: string;
|
|
20
|
+
/**
|
|
21
|
+
* True when this snapshot was re-read after a settle round and the visible
|
|
22
|
+
* text held still across it, so a header flip that has not been followed by
|
|
23
|
+
* a body swap is the page's final state rather than a transition in flight.
|
|
24
|
+
*/
|
|
25
|
+
settled?: boolean;
|
|
16
26
|
}
|
|
27
|
+
/** The visible-text slice of a snapshot, for callers that judge a page advance from text alone. */
|
|
28
|
+
export type VisibleTextState = Pick<PhantomClickSnapshot, "visibleTextSignature" | "visibleText" | "visibleTextDigest">;
|
|
17
29
|
export interface PhantomClickAttempt {
|
|
18
30
|
/** Stagehand's own verdict for the attempt — did it believe it acted? */
|
|
19
31
|
actResultSuccess: boolean | null;
|
|
@@ -44,11 +56,17 @@ export interface PhantomClickAttempt {
|
|
|
44
56
|
/**
|
|
45
57
|
* True when a submit-shaped step is NOT the flow's final submit (e.g. an
|
|
46
58
|
* account-creation transition in a wizard). Such a step is credited when
|
|
47
|
-
* {@link
|
|
59
|
+
* {@link hasSettledPageAdvanced} holds even with no network/URL/title signal.
|
|
48
60
|
* Implies `isSubmitShapedStep`: a mid-flow submit is submit-shaped by
|
|
49
61
|
* definition, so callers need not set both for it to be held to submit rules.
|
|
50
62
|
*/
|
|
51
63
|
isMidFlowSubmitStep?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Step-start snapshot used ONLY for the mid-flow advance judgement, so a late
|
|
66
|
+
* re-render an earlier attempt already absorbed into `pre` is still credited.
|
|
67
|
+
* Network/byte deltas keep coming from `pre`. Defaults to `pre`.
|
|
68
|
+
*/
|
|
69
|
+
advanceBaseline?: PhantomClickSnapshot;
|
|
52
70
|
/**
|
|
53
71
|
* Mirrors flow-runner's own `isPlausibleStepDestination` gate on its
|
|
54
72
|
* `urlChanged`/`retryUrlChanged` signals: false when the post-URL landed
|
|
@@ -122,6 +140,12 @@ export declare const PAGE_ADVANCE_MIN_TEXT_LENGTH_RATIO = 0.3;
|
|
|
122
140
|
export declare const PAGE_ADVANCE_MIN_RELATIVE_TEXT_LENGTH_DELTA = 30;
|
|
123
141
|
/** Word-set similarity below which the visible-text head counts as replaced. */
|
|
124
142
|
export declare const PAGE_ADVANCE_MAX_HEAD_SIMILARITY = 0.5;
|
|
143
|
+
/**
|
|
144
|
+
* Reports whether the visible text differs at all between two snapshots, using
|
|
145
|
+
* the whole-text digest when both carry one so a change beyond the 200-char
|
|
146
|
+
* signature head is not missed. Falls back to the signature alone.
|
|
147
|
+
*/
|
|
148
|
+
export declare function hasVisibleTextChanged(pre: PhantomClickSnapshot, post: PhantomClickSnapshot): boolean;
|
|
125
149
|
/**
|
|
126
150
|
* Decides whether the page demonstrably advanced (a wizard step swapped
|
|
127
151
|
* content) from pre/post snapshots alone, so a network-free, URL-stable
|
|
@@ -139,6 +163,25 @@ export declare function hasPageAdvanced(pre: PhantomClickSnapshot, post: Phantom
|
|
|
139
163
|
* body usually re-renders after it, so only replaced copy counts as settled.
|
|
140
164
|
*/
|
|
141
165
|
export declare function hasPageBodySwapped(pre: PhantomClickSnapshot, post: PhantomClickSnapshot): boolean;
|
|
166
|
+
/**
|
|
167
|
+
* Decides whether a mid-flow submit's page advanced, judged on the settled
|
|
168
|
+
* page: a replaced body always counts, and a replaced header counts once the
|
|
169
|
+
* text has held still across a settle round, because by then nothing is left
|
|
170
|
+
* to re-render. Before that point a header-only flip stays unfinished, since
|
|
171
|
+
* the body usually re-renders after it. A page with no visible-text change
|
|
172
|
+
* never counts, so a no-op click keeps its give-up.
|
|
173
|
+
*/
|
|
174
|
+
export declare function hasSettledPageAdvanced(pre: PhantomClickSnapshot, post: PhantomClickSnapshot): boolean;
|
|
175
|
+
type SettledTextState = VisibleTextState & {
|
|
176
|
+
settled?: boolean;
|
|
177
|
+
};
|
|
178
|
+
/**
|
|
179
|
+
* Shared step-start vs settled-read rule for non-final submit-shaped steps,
|
|
180
|
+
* whose SPA wizards swap content without a URL change. Built only on
|
|
181
|
+
* {@link hasSettledPageAdvanced}; a final step is never credited here because
|
|
182
|
+
* its completion is owned by the submit-destination judge.
|
|
183
|
+
*/
|
|
184
|
+
export declare function hasSubmitStepDomAdvanced(isFinalStep: boolean, pre: string | SettledTextState | undefined, live: string | SettledTextState | undefined): boolean;
|
|
142
185
|
/**
|
|
143
186
|
* Classifies one cascade attempt as `phantom` (Stagehand claimed success but
|
|
144
187
|
* pre/post shows zero network, zero URL change, and only trivial DOM
|
|
@@ -148,4 +191,5 @@ export declare function hasPageBodySwapped(pre: PhantomClickSnapshot, post: Phan
|
|
|
148
191
|
* techniques on the same no-op.
|
|
149
192
|
*/
|
|
150
193
|
export declare function classifyPhantomClick(attempt: PhantomClickAttempt): PhantomClickVerdict;
|
|
194
|
+
export {};
|
|
151
195
|
//# sourceMappingURL=phantom-click.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"phantom-click.d.ts","sourceRoot":"","sources":["../../src/scraper/phantom-click.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,qFAAqF;AACrF,MAAM,WAAW,oBAAoB;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,wCAAwC;IACxC,cAAc,EAAE,MAAM,CAAC;IACvB,mFAAmF;IACnF,oBAAoB,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"phantom-click.d.ts","sourceRoot":"","sources":["../../src/scraper/phantom-click.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,qFAAqF;AACrF,MAAM,WAAW,oBAAoB;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,wCAAwC;IACxC,cAAc,EAAE,MAAM,CAAC;IACvB,mFAAmF;IACnF,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,kGAAkG;IAClG,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yGAAyG;IACzG,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,mGAAmG;AACnG,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,oBAAoB,EACpB,sBAAsB,GAAG,aAAa,GAAG,mBAAmB,CAC7D,CAAC;AAEF,MAAM,WAAW,mBAAmB;IAClC,yEAAyE;IACzE,gBAAgB,EAAE,OAAO,GAAG,IAAI,CAAC;IACjC,GAAG,EAAE,oBAAoB,CAAC;IAC1B,IAAI,EAAE,oBAAoB,CAAC;IAC3B;;;;;;;;;;OAUG;IACH,mBAAmB,CAAC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AoB,GAAG,OAAO,CAE9F;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,oBAAoB,EAAE,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAEjG;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,oBAAoB,EACzB,IAAI,EAAE,oBAAoB,GACzB,OAAO,CAET;AAED,KAAK,gBAAgB,GAAG,gBAAgB,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAEjE;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,WAAW,EAAE,OAAO,EACpB,GAAG,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS,EAC1C,IAAI,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS,GAC1C,OAAO,CAST;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,mBAAmB,GAAG,mBAAmB,CA2BtF"}
|
|
@@ -11,8 +11,11 @@ exports.PAGE_ADVANCE_MAX_HEAD_SIMILARITY = exports.PAGE_ADVANCE_MIN_RELATIVE_TEX
|
|
|
11
11
|
exports.hasOriginOrPathChanged = hasOriginOrPathChanged;
|
|
12
12
|
exports.splitIntoActionClauses = splitIntoActionClauses;
|
|
13
13
|
exports.isPlausibleStepDestination = isPlausibleStepDestination;
|
|
14
|
+
exports.hasVisibleTextChanged = hasVisibleTextChanged;
|
|
14
15
|
exports.hasPageAdvanced = hasPageAdvanced;
|
|
15
16
|
exports.hasPageBodySwapped = hasPageBodySwapped;
|
|
17
|
+
exports.hasSettledPageAdvanced = hasSettledPageAdvanced;
|
|
18
|
+
exports.hasSubmitStepDomAdvanced = hasSubmitStepDomAdvanced;
|
|
16
19
|
exports.classifyPhantomClick = classifyPhantomClick;
|
|
17
20
|
function originAndPathOf(url) {
|
|
18
21
|
try {
|
|
@@ -206,17 +209,59 @@ function isHeadSwapped(pre, post) {
|
|
|
206
209
|
const leading = leadingHeadWord(post);
|
|
207
210
|
return leading !== undefined && !preWords.has(leading);
|
|
208
211
|
}
|
|
212
|
+
const KIND_RANK = { none: 0, header: 1, body: 2 };
|
|
213
|
+
/** Head length the signature keeps; the excerpt tail starts past it. */
|
|
214
|
+
const SIGNATURE_HEAD_CHARS = 200;
|
|
215
|
+
function wordsOf(text) {
|
|
216
|
+
return new Set(text
|
|
217
|
+
.toLowerCase()
|
|
218
|
+
.split(/\W+/)
|
|
219
|
+
.filter((w) => w !== ""));
|
|
220
|
+
}
|
|
221
|
+
function wordSetSimilarity(preWords, postWords) {
|
|
222
|
+
const union = new Set([...preWords, ...postWords]);
|
|
223
|
+
if (union.size === 0)
|
|
224
|
+
return 1;
|
|
225
|
+
return [...preWords].filter((w) => postWords.has(w)).length / union.size;
|
|
226
|
+
}
|
|
227
|
+
function swappedWordCounts(preWords, postWords) {
|
|
228
|
+
return {
|
|
229
|
+
dropped: [...preWords].filter((w) => !postWords.has(w)).length,
|
|
230
|
+
added: [...postWords].filter((w) => !preWords.has(w)).length,
|
|
231
|
+
};
|
|
232
|
+
}
|
|
209
233
|
/**
|
|
210
|
-
* Reads
|
|
211
|
-
*
|
|
212
|
-
*
|
|
213
|
-
*
|
|
214
|
-
*
|
|
234
|
+
* Reads the movement of the page's whole visible text rather than its 200-char
|
|
235
|
+
* head: a wizard body that re-renders under unchanged chrome (long nav, same
|
|
236
|
+
* header, same length) leaves the signature untouched, so the excerpt's words
|
|
237
|
+
* decide whether the copy itself was replaced. `body` only when the replaced
|
|
238
|
+
* words sit in the text past the head, so a head-only flip stays `header`.
|
|
215
239
|
*/
|
|
216
|
-
function
|
|
217
|
-
const
|
|
218
|
-
const
|
|
219
|
-
if (
|
|
240
|
+
function fullTextAdvanceKind(pre, post) {
|
|
241
|
+
const preText = pre.visibleText;
|
|
242
|
+
const postText = post.visibleText;
|
|
243
|
+
if (!preText || !postText || preText === postText)
|
|
244
|
+
return "none";
|
|
245
|
+
const preWords = wordsOf(preText);
|
|
246
|
+
const postWords = wordsOf(postText);
|
|
247
|
+
const similarity = wordSetSimilarity(preWords, postWords);
|
|
248
|
+
if (similarity === 1)
|
|
249
|
+
return "none";
|
|
250
|
+
if (similarity < exports.PAGE_ADVANCE_MAX_HEAD_SIMILARITY)
|
|
251
|
+
return "body";
|
|
252
|
+
const { dropped, added } = swappedWordCounts(wordsOf(preText.slice(SIGNATURE_HEAD_CHARS)), wordsOf(postText.slice(SIGNATURE_HEAD_CHARS)));
|
|
253
|
+
if (dropped >= PAGE_ADVANCE_MIN_SWAPPED_HEAD_WORDS &&
|
|
254
|
+
added >= PAGE_ADVANCE_MIN_SWAPPED_HEAD_WORDS) {
|
|
255
|
+
return "body";
|
|
256
|
+
}
|
|
257
|
+
const headSwap = swappedWordCounts(wordsOf(preText.slice(0, SIGNATURE_HEAD_CHARS)), wordsOf(postText.slice(0, SIGNATURE_HEAD_CHARS)));
|
|
258
|
+
return headSwap.dropped >= PAGE_ADVANCE_MIN_SWAPPED_HEAD_WORDS &&
|
|
259
|
+
headSwap.added >= PAGE_ADVANCE_MIN_SWAPPED_HEAD_WORDS
|
|
260
|
+
? "header"
|
|
261
|
+
: "none";
|
|
262
|
+
}
|
|
263
|
+
function signatureAdvanceKind(preSig, postSig) {
|
|
264
|
+
if (preSig === postSig)
|
|
220
265
|
return "none";
|
|
221
266
|
const preLen = textLengthOf(preSig);
|
|
222
267
|
const postLen = textLengthOf(postSig);
|
|
@@ -239,6 +284,37 @@ function pageAdvanceKind(pre, post) {
|
|
|
239
284
|
// its header and body copy within the 200-char head.
|
|
240
285
|
return isHeadSwapped(preSig, postSig) ? "header" : "none";
|
|
241
286
|
}
|
|
287
|
+
/**
|
|
288
|
+
* Reports whether the visible text differs at all between two snapshots, using
|
|
289
|
+
* the whole-text digest when both carry one so a change beyond the 200-char
|
|
290
|
+
* signature head is not missed. Falls back to the signature alone.
|
|
291
|
+
*/
|
|
292
|
+
function hasVisibleTextChanged(pre, post) {
|
|
293
|
+
if (pre.visibleTextSignature !== post.visibleTextSignature)
|
|
294
|
+
return true;
|
|
295
|
+
return (!!pre.visibleTextDigest &&
|
|
296
|
+
!!post.visibleTextDigest &&
|
|
297
|
+
pre.visibleTextDigest !== post.visibleTextDigest);
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* Reads how far the visible text moved: `body` when the copy itself was
|
|
301
|
+
* replaced (a large or relative length change, or a head whose words were
|
|
302
|
+
* mostly swapped, or replaced words past the head), `header` when only a
|
|
303
|
+
* header-sized slice moved over shared chrome, `none` otherwise. The split lets
|
|
304
|
+
* a settle tell a finished transition from a header that flipped before its
|
|
305
|
+
* body re-rendered.
|
|
306
|
+
*/
|
|
307
|
+
function pageAdvanceKind(pre, post) {
|
|
308
|
+
const preSig = pre.visibleTextSignature;
|
|
309
|
+
const postSig = post.visibleTextSignature;
|
|
310
|
+
if (preSig === undefined || postSig === undefined)
|
|
311
|
+
return "none";
|
|
312
|
+
if (!hasVisibleTextChanged(pre, post))
|
|
313
|
+
return "none";
|
|
314
|
+
const fromSignature = signatureAdvanceKind(preSig, postSig);
|
|
315
|
+
const fromFullText = fullTextAdvanceKind(pre, post);
|
|
316
|
+
return KIND_RANK[fromFullText] > KIND_RANK[fromSignature] ? fromFullText : fromSignature;
|
|
317
|
+
}
|
|
242
318
|
/**
|
|
243
319
|
* Decides whether the page demonstrably advanced (a wizard step swapped
|
|
244
320
|
* content) from pre/post snapshots alone, so a network-free, URL-stable
|
|
@@ -260,6 +336,34 @@ function hasPageAdvanced(pre, post) {
|
|
|
260
336
|
function hasPageBodySwapped(pre, post) {
|
|
261
337
|
return pageAdvanceKind(pre, post) === "body";
|
|
262
338
|
}
|
|
339
|
+
/**
|
|
340
|
+
* Decides whether a mid-flow submit's page advanced, judged on the settled
|
|
341
|
+
* page: a replaced body always counts, and a replaced header counts once the
|
|
342
|
+
* text has held still across a settle round, because by then nothing is left
|
|
343
|
+
* to re-render. Before that point a header-only flip stays unfinished, since
|
|
344
|
+
* the body usually re-renders after it. A page with no visible-text change
|
|
345
|
+
* never counts, so a no-op click keeps its give-up.
|
|
346
|
+
*/
|
|
347
|
+
function hasSettledPageAdvanced(pre, post) {
|
|
348
|
+
return hasPageBodySwapped(pre, post) || (post.settled === true && hasPageAdvanced(pre, post));
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* Shared step-start vs settled-read rule for non-final submit-shaped steps,
|
|
352
|
+
* whose SPA wizards swap content without a URL change. Built only on
|
|
353
|
+
* {@link hasSettledPageAdvanced}; a final step is never credited here because
|
|
354
|
+
* its completion is owned by the submit-destination judge.
|
|
355
|
+
*/
|
|
356
|
+
function hasSubmitStepDomAdvanced(isFinalStep, pre, live) {
|
|
357
|
+
if (isFinalStep)
|
|
358
|
+
return false;
|
|
359
|
+
const asSnapshot = (text) => ({
|
|
360
|
+
networkCount: 0,
|
|
361
|
+
url: "",
|
|
362
|
+
bodyHtmlLength: 0,
|
|
363
|
+
...(typeof text === "string" ? { visibleTextSignature: text } : text),
|
|
364
|
+
});
|
|
365
|
+
return hasSettledPageAdvanced(asSnapshot(pre), asSnapshot(live));
|
|
366
|
+
}
|
|
263
367
|
/**
|
|
264
368
|
* Classifies one cascade attempt as `phantom` (Stagehand claimed success but
|
|
265
369
|
* pre/post shows zero network, zero URL change, and only trivial DOM
|
|
@@ -283,7 +387,7 @@ function classifyPhantomClick(attempt) {
|
|
|
283
387
|
const elementStateChanged = !submitShaped && attempt.elementStateChanged === true;
|
|
284
388
|
// A submit-shaped step likewise ignores a mere DOM-byte reflow.
|
|
285
389
|
const bytesChangedSignificantly = !submitShaped && Math.abs(bytesDelta) >= exports.TRIVIAL_DOM_DELTA_BYTES;
|
|
286
|
-
const midFlowAdvanced = midFlowSubmit &&
|
|
390
|
+
const midFlowAdvanced = midFlowSubmit && hasSettledPageAdvanced(attempt.advanceBaseline ?? attempt.pre, attempt.post);
|
|
287
391
|
const hasEffect = networkDelta !== 0 ||
|
|
288
392
|
urlChanged ||
|
|
289
393
|
elementStateChanged ||
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,IAAI,aAAa,CAAC;IAC1E,yEAAyE;IACzE,0EAA0E;IAC1E,MAAM,mBAAmB,GAAG,CAAC,YAAY,IAAI,OAAO,CAAC,mBAAmB,KAAK,IAAI,CAAC;IAClF,gEAAgE;IAChE,MAAM,yBAAyB,GAC7B,CAAC,YAAY,IAAI,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,QAAA,uBAAuB,CAAC;IAEnE,MAAM,eAAe,GACnB,aAAa,IAAI,sBAAsB,CAAC,OAAO,CAAC,eAAe,IAAI,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAEhG,MAAM,SAAS,GACb,YAAY,KAAK,CAAC;QAClB,UAAU;QACV,mBAAmB;QACnB,yBAAyB;QACzB,eAAe,CAAC;IAClB,OAAO,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC;AAC7C,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { Capture } from "../scripts/recon-shared";
|
|
2
|
+
/** Upper bound on captures held per run so a long-lived session cannot grow without limit. */
|
|
3
|
+
export declare const RUNTIME_CAPTURE_LIMIT = 200;
|
|
4
|
+
/** Handle to a run's in-memory captures, passed explicitly so writes never depend on the async context. */
|
|
5
|
+
export interface RuntimeCaptureStore {
|
|
6
|
+
dir: string;
|
|
7
|
+
captures: Map<string, Capture>;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Runs `fn` with a private in-memory capture store so runtime flows can feed
|
|
11
|
+
* the same window detectors recon uses without touching disk. The store handle
|
|
12
|
+
* is passed to `fn` and registered by its dir marker until the run settles, so
|
|
13
|
+
* captures delivered from any async context land in the right run's store.
|
|
14
|
+
*/
|
|
15
|
+
export declare function withRuntimeCaptureStore<T>(fn: (store: RuntimeCaptureStore) => T): T;
|
|
16
|
+
/**
|
|
17
|
+
* Records a capture into `store`. GET response bodies are dropped — they are
|
|
18
|
+
* static assets and prefetches, not action signals — and the oldest entries
|
|
19
|
+
* are evicted past {@link RUNTIME_CAPTURE_LIMIT}.
|
|
20
|
+
*/
|
|
21
|
+
export declare function recordRuntimeCapture(store: RuntimeCaptureStore, filename: string, capture: Capture): void;
|
|
22
|
+
/**
|
|
23
|
+
* The directory capture readers should scan by default: the in-scope runtime
|
|
24
|
+
* store's marker, else the recon run's on-disk graphql dir.
|
|
25
|
+
*/
|
|
26
|
+
export declare function defaultCapturesDir(): string;
|
|
27
|
+
/**
|
|
28
|
+
* Lists raw capture filenames in `dir` (excluding `.decoded.json` sidecars),
|
|
29
|
+
* from memory when `dir` is a live runtime store, else from disk. Returns []
|
|
30
|
+
* when the dir is unreadable.
|
|
31
|
+
*/
|
|
32
|
+
export declare function listCaptureFiles(dir: string): string[];
|
|
33
|
+
/**
|
|
34
|
+
* Shared capture reader so detectors behave identically whether captures live
|
|
35
|
+
* in memory (runtime) or on disk (recon). Returns null when absent or unparseable.
|
|
36
|
+
*/
|
|
37
|
+
export declare function readCaptureFile(dir: string, filename: string): Capture | null;
|
|
38
|
+
//# sourceMappingURL=runtime-capture-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-capture-store.d.ts","sourceRoot":"","sources":["../../src/scraper/runtime-capture-store.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAGtD,8FAA8F;AAC9F,eAAO,MAAM,qBAAqB,MAAM,CAAC;AAIzC,2GAA2G;AAC3G,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC;AAKD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,CAAC,GAAG,CAAC,CAqBnF;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,mBAAmB,EAC1B,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,OAAO,GACf,IAAI,CAUN;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C;AAMD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAQtD;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,CAQ7E"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RUNTIME_CAPTURE_LIMIT = void 0;
|
|
4
|
+
exports.withRuntimeCaptureStore = withRuntimeCaptureStore;
|
|
5
|
+
exports.recordRuntimeCapture = recordRuntimeCapture;
|
|
6
|
+
exports.defaultCapturesDir = defaultCapturesDir;
|
|
7
|
+
exports.listCaptureFiles = listCaptureFiles;
|
|
8
|
+
exports.readCaptureFile = readCaptureFile;
|
|
9
|
+
const node_async_hooks_1 = require("node:async_hooks");
|
|
10
|
+
const node_crypto_1 = require("node:crypto");
|
|
11
|
+
const node_fs_1 = require("node:fs");
|
|
12
|
+
const node_path_1 = require("node:path");
|
|
13
|
+
const recon_shared_1 = require("../scripts/recon-shared");
|
|
14
|
+
/** Upper bound on captures held per run so a long-lived session cannot grow without limit. */
|
|
15
|
+
exports.RUNTIME_CAPTURE_LIMIT = 200;
|
|
16
|
+
const MEMORY_DIR_PREFIX = "memory:";
|
|
17
|
+
const storage = new node_async_hooks_1.AsyncLocalStorage();
|
|
18
|
+
const registry = new Map();
|
|
19
|
+
/**
|
|
20
|
+
* Runs `fn` with a private in-memory capture store so runtime flows can feed
|
|
21
|
+
* the same window detectors recon uses without touching disk. The store handle
|
|
22
|
+
* is passed to `fn` and registered by its dir marker until the run settles, so
|
|
23
|
+
* captures delivered from any async context land in the right run's store.
|
|
24
|
+
*/
|
|
25
|
+
function withRuntimeCaptureStore(fn) {
|
|
26
|
+
const store = {
|
|
27
|
+
dir: `${MEMORY_DIR_PREFIX}${(0, node_crypto_1.randomUUID)()}`,
|
|
28
|
+
captures: new Map(),
|
|
29
|
+
};
|
|
30
|
+
registry.set(store.dir, store);
|
|
31
|
+
const release = () => {
|
|
32
|
+
registry.delete(store.dir);
|
|
33
|
+
};
|
|
34
|
+
try {
|
|
35
|
+
const result = storage.run(store, () => fn(store));
|
|
36
|
+
if (result instanceof Promise) {
|
|
37
|
+
result.then(release, release);
|
|
38
|
+
return result;
|
|
39
|
+
}
|
|
40
|
+
release();
|
|
41
|
+
return result;
|
|
42
|
+
}
|
|
43
|
+
catch (err) {
|
|
44
|
+
release();
|
|
45
|
+
throw err;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Records a capture into `store`. GET response bodies are dropped — they are
|
|
50
|
+
* static assets and prefetches, not action signals — and the oldest entries
|
|
51
|
+
* are evicted past {@link RUNTIME_CAPTURE_LIMIT}.
|
|
52
|
+
*/
|
|
53
|
+
function recordRuntimeCapture(store, filename, capture) {
|
|
54
|
+
store.captures.set(filename, capture.method === "GET" ? { ...capture, responseBody: null } : capture);
|
|
55
|
+
while (store.captures.size > exports.RUNTIME_CAPTURE_LIMIT) {
|
|
56
|
+
const oldest = store.captures.keys().next().value;
|
|
57
|
+
if (oldest === undefined)
|
|
58
|
+
return;
|
|
59
|
+
store.captures.delete(oldest);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* The directory capture readers should scan by default: the in-scope runtime
|
|
64
|
+
* store's marker, else the recon run's on-disk graphql dir.
|
|
65
|
+
*/
|
|
66
|
+
function defaultCapturesDir() {
|
|
67
|
+
return storage.getStore()?.dir ?? (0, recon_shared_1.resolveReconRunDir)().graphqlDir;
|
|
68
|
+
}
|
|
69
|
+
function storeFor(dir) {
|
|
70
|
+
return registry.get(dir) ?? null;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Lists raw capture filenames in `dir` (excluding `.decoded.json` sidecars),
|
|
74
|
+
* from memory when `dir` is a live runtime store, else from disk. Returns []
|
|
75
|
+
* when the dir is unreadable.
|
|
76
|
+
*/
|
|
77
|
+
function listCaptureFiles(dir) {
|
|
78
|
+
const store = storeFor(dir);
|
|
79
|
+
if (store)
|
|
80
|
+
return [...store.captures.keys()];
|
|
81
|
+
try {
|
|
82
|
+
return (0, node_fs_1.readdirSync)(dir).filter((f) => f.endsWith(".json") && !f.endsWith(".decoded.json"));
|
|
83
|
+
}
|
|
84
|
+
catch {
|
|
85
|
+
return [];
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Shared capture reader so detectors behave identically whether captures live
|
|
90
|
+
* in memory (runtime) or on disk (recon). Returns null when absent or unparseable.
|
|
91
|
+
*/
|
|
92
|
+
function readCaptureFile(dir, filename) {
|
|
93
|
+
const store = storeFor(dir);
|
|
94
|
+
if (store)
|
|
95
|
+
return store.captures.get(filename) ?? null;
|
|
96
|
+
try {
|
|
97
|
+
return JSON.parse((0, node_fs_1.readFileSync)((0, node_path_1.join)(dir, filename), "utf8"));
|
|
98
|
+
}
|
|
99
|
+
catch {
|
|
100
|
+
return null;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=runtime-capture-store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-capture-store.js","sourceRoot":"","sources":["../../src/scraper/runtime-capture-store.ts"],"names":[],"mappings":";;;;;;;;AAAA,uDAAqD;AACrD,6CAAyC;AACzC,qCAAoD;AACpD,yCAAiC;AAEjC,yDAA4D;AAE5D,8FAA8F;AACjF,QAAA,qBAAqB,GAAG,GAAG,CAAC;AAEzC,MAAM,iBAAiB,GAAG,SAAS,CAAC;AAQpC,MAAM,OAAO,GAAG,IAAI,oCAAiB,EAAuB,CAAC;AAC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M,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* In-page helpers shared by the date-segment enumeration and the fill
|
|
3
|
+
* readback so "is this spinbutton one segment of a multi-segment widget" has a
|
|
4
|
+
* single definition; defines `spins`, `ownerOf` and `isDateSegment`.
|
|
5
|
+
*/
|
|
6
|
+
export declare const SEGMENT_OWNER_JS = "\n const hiddenAttr = (node) => node.hasAttribute(\"hidden\") || node.getAttribute(\"aria-hidden\") === \"true\";\n const styleOf = (node) => {\n try { return typeof getComputedStyle === \"function\" ? getComputedStyle(node) : window.getComputedStyle(node); } catch { return null; }\n };\n const isHidden = (el) => {\n for (let node = el; node && node.nodeType === 1; node = node.parentElement) {\n if (hiddenAttr(node)) return true;\n const style = styleOf(node);\n if (style && (style.display === \"none\" || style.visibility === \"hidden\")) return true;\n }\n return false;\n };\n const spins = Array.from(document.querySelectorAll(\"input[role='spinbutton']\")).filter((el) => !isHidden(el));\n const norm = (s) => (s || \"\").replace(/\\s+/g, \" \").trim();\n const idText = (ids) => (ids || \"\").split(/\\s+/).map((id) => {\n const ref = id ? document.getElementById(id) : null;\n return ref ? norm(ref.textContent) : \"\";\n }).join(\" \");\n const legendOf = (node) => {\n const legend = node.tagName === \"FIELDSET\" ? node.querySelector(\":scope > legend\") : null;\n return legend ? norm(legend.textContent) : \"\";\n };\n const namedBy = (node) => [legendOf(node), norm(node.getAttribute(\"aria-label\")), idText(node.getAttribute(\"aria-labelledby\"))].filter(Boolean).join(\" \");\n const tiedToSpin = (l) => l.querySelector(\"input,[role='spinbutton']\") || (l.getAttribute(\"for\") && spins.some((sp) => sp.id === l.getAttribute(\"for\")));\n const hasCaption = (node) => namedBy(node) !== \"\" || Array.from(node.querySelectorAll(\"label,legend\")).some((l) => !tiedToSpin(l));\n const captionOwnerOf = (el) => {\n const explicit = el.closest(\"fieldset,[role='group']\");\n if (explicit) return explicit;\n for (let node = el.parentElement; node && node !== document.body; node = node.parentElement) {\n if (hasCaption(node)) return node;\n }\n return null;\n };\n const bareSpins = spins.filter((sp) => !captionOwnerOf(sp));\n const hasOtherControl = (node) => Array.from(node.querySelectorAll(\"input,select,textarea\")).some((c) => !spins.includes(c) && c.type !== \"hidden\");\n // Segments that each sit in their own uncaptioned wrapper share no\n // fieldset/caption, so the nearest ancestor holding several bare spinbuttons\n // (and no other form control) is the widget they belong to.\n const bareOwnerOf = (el) => {\n for (let node = el.parentElement; node && node !== document.body; node = node.parentElement) {\n if (hasOtherControl(node)) break;\n if (bareSpins.filter((sp) => node.contains(sp)).length > 1) return node;\n }\n return el.parentElement;\n };\n const ownerOf = (el) => captionOwnerOf(el) || bareOwnerOf(el);\n const isDateSegment = (el) => {\n if (!el.getAttribute || el.getAttribute(\"role\") !== \"spinbutton\" || !spins.includes(el)) return false;\n const box = ownerOf(el);\n return spins.filter((sp) => ownerOf(sp) === box).length > 1;\n };\n";
|
|
7
|
+
/**
|
|
8
|
+
* Expression evaluated with `this` as a resolved element; lets actuation code
|
|
9
|
+
* decide before writing whether the element is one segment of a multi-segment
|
|
10
|
+
* date widget, using the same detector the enumeration and readback use.
|
|
11
|
+
*/
|
|
12
|
+
export declare const IS_DATE_SEGMENT_EXPR = "(function () {\n \n const hiddenAttr = (node) => node.hasAttribute(\"hidden\") || node.getAttribute(\"aria-hidden\") === \"true\";\n const styleOf = (node) => {\n try { return typeof getComputedStyle === \"function\" ? getComputedStyle(node) : window.getComputedStyle(node); } catch { return null; }\n };\n const isHidden = (el) => {\n for (let node = el; node && node.nodeType === 1; node = node.parentElement) {\n if (hiddenAttr(node)) return true;\n const style = styleOf(node);\n if (style && (style.display === \"none\" || style.visibility === \"hidden\")) return true;\n }\n return false;\n };\n const spins = Array.from(document.querySelectorAll(\"input[role='spinbutton']\")).filter((el) => !isHidden(el));\n const norm = (s) => (s || \"\").replace(/\\s+/g, \" \").trim();\n const idText = (ids) => (ids || \"\").split(/\\s+/).map((id) => {\n const ref = id ? document.getElementById(id) : null;\n return ref ? norm(ref.textContent) : \"\";\n }).join(\" \");\n const legendOf = (node) => {\n const legend = node.tagName === \"FIELDSET\" ? node.querySelector(\":scope > legend\") : null;\n return legend ? norm(legend.textContent) : \"\";\n };\n const namedBy = (node) => [legendOf(node), norm(node.getAttribute(\"aria-label\")), idText(node.getAttribute(\"aria-labelledby\"))].filter(Boolean).join(\" \");\n const tiedToSpin = (l) => l.querySelector(\"input,[role='spinbutton']\") || (l.getAttribute(\"for\") && spins.some((sp) => sp.id === l.getAttribute(\"for\")));\n const hasCaption = (node) => namedBy(node) !== \"\" || Array.from(node.querySelectorAll(\"label,legend\")).some((l) => !tiedToSpin(l));\n const captionOwnerOf = (el) => {\n const explicit = el.closest(\"fieldset,[role='group']\");\n if (explicit) return explicit;\n for (let node = el.parentElement; node && node !== document.body; node = node.parentElement) {\n if (hasCaption(node)) return node;\n }\n return null;\n };\n const bareSpins = spins.filter((sp) => !captionOwnerOf(sp));\n const hasOtherControl = (node) => Array.from(node.querySelectorAll(\"input,select,textarea\")).some((c) => !spins.includes(c) && c.type !== \"hidden\");\n // Segments that each sit in their own uncaptioned wrapper share no\n // fieldset/caption, so the nearest ancestor holding several bare spinbuttons\n // (and no other form control) is the widget they belong to.\n const bareOwnerOf = (el) => {\n for (let node = el.parentElement; node && node !== document.body; node = node.parentElement) {\n if (hasOtherControl(node)) break;\n if (bareSpins.filter((sp) => node.contains(sp)).length > 1) return node;\n }\n return el.parentElement;\n };\n const ownerOf = (el) => captionOwnerOf(el) || bareOwnerOf(el);\n const isDateSegment = (el) => {\n if (!el.getAttribute || el.getAttribute(\"role\") !== \"spinbutton\" || !spins.includes(el)) return false;\n const box = ownerOf(el);\n return spins.filter((sp) => ownerOf(sp) === box).length > 1;\n };\n\n return isDateSegment(this);\n})";
|
|
13
|
+
//# sourceMappingURL=segmented-date-spinbutton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"segmented-date-spinbutton.d.ts","sourceRoot":"","sources":["../../src/scraper/segmented-date-spinbutton.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,o8FAoD5B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,y/FAG9B,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IS_DATE_SEGMENT_EXPR = exports.SEGMENT_OWNER_JS = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* In-page helpers shared by the date-segment enumeration and the fill
|
|
6
|
+
* readback so "is this spinbutton one segment of a multi-segment widget" has a
|
|
7
|
+
* single definition; defines `spins`, `ownerOf` and `isDateSegment`.
|
|
8
|
+
*/
|
|
9
|
+
exports.SEGMENT_OWNER_JS = `
|
|
10
|
+
const hiddenAttr = (node) => node.hasAttribute("hidden") || node.getAttribute("aria-hidden") === "true";
|
|
11
|
+
const styleOf = (node) => {
|
|
12
|
+
try { return typeof getComputedStyle === "function" ? getComputedStyle(node) : window.getComputedStyle(node); } catch { return null; }
|
|
13
|
+
};
|
|
14
|
+
const isHidden = (el) => {
|
|
15
|
+
for (let node = el; node && node.nodeType === 1; node = node.parentElement) {
|
|
16
|
+
if (hiddenAttr(node)) return true;
|
|
17
|
+
const style = styleOf(node);
|
|
18
|
+
if (style && (style.display === "none" || style.visibility === "hidden")) return true;
|
|
19
|
+
}
|
|
20
|
+
return false;
|
|
21
|
+
};
|
|
22
|
+
const spins = Array.from(document.querySelectorAll("input[role='spinbutton']")).filter((el) => !isHidden(el));
|
|
23
|
+
const norm = (s) => (s || "").replace(/\\s+/g, " ").trim();
|
|
24
|
+
const idText = (ids) => (ids || "").split(/\\s+/).map((id) => {
|
|
25
|
+
const ref = id ? document.getElementById(id) : null;
|
|
26
|
+
return ref ? norm(ref.textContent) : "";
|
|
27
|
+
}).join(" ");
|
|
28
|
+
const legendOf = (node) => {
|
|
29
|
+
const legend = node.tagName === "FIELDSET" ? node.querySelector(":scope > legend") : null;
|
|
30
|
+
return legend ? norm(legend.textContent) : "";
|
|
31
|
+
};
|
|
32
|
+
const namedBy = (node) => [legendOf(node), norm(node.getAttribute("aria-label")), idText(node.getAttribute("aria-labelledby"))].filter(Boolean).join(" ");
|
|
33
|
+
const tiedToSpin = (l) => l.querySelector("input,[role='spinbutton']") || (l.getAttribute("for") && spins.some((sp) => sp.id === l.getAttribute("for")));
|
|
34
|
+
const hasCaption = (node) => namedBy(node) !== "" || Array.from(node.querySelectorAll("label,legend")).some((l) => !tiedToSpin(l));
|
|
35
|
+
const captionOwnerOf = (el) => {
|
|
36
|
+
const explicit = el.closest("fieldset,[role='group']");
|
|
37
|
+
if (explicit) return explicit;
|
|
38
|
+
for (let node = el.parentElement; node && node !== document.body; node = node.parentElement) {
|
|
39
|
+
if (hasCaption(node)) return node;
|
|
40
|
+
}
|
|
41
|
+
return null;
|
|
42
|
+
};
|
|
43
|
+
const bareSpins = spins.filter((sp) => !captionOwnerOf(sp));
|
|
44
|
+
const hasOtherControl = (node) => Array.from(node.querySelectorAll("input,select,textarea")).some((c) => !spins.includes(c) && c.type !== "hidden");
|
|
45
|
+
// Segments that each sit in their own uncaptioned wrapper share no
|
|
46
|
+
// fieldset/caption, so the nearest ancestor holding several bare spinbuttons
|
|
47
|
+
// (and no other form control) is the widget they belong to.
|
|
48
|
+
const bareOwnerOf = (el) => {
|
|
49
|
+
for (let node = el.parentElement; node && node !== document.body; node = node.parentElement) {
|
|
50
|
+
if (hasOtherControl(node)) break;
|
|
51
|
+
if (bareSpins.filter((sp) => node.contains(sp)).length > 1) return node;
|
|
52
|
+
}
|
|
53
|
+
return el.parentElement;
|
|
54
|
+
};
|
|
55
|
+
const ownerOf = (el) => captionOwnerOf(el) || bareOwnerOf(el);
|
|
56
|
+
const isDateSegment = (el) => {
|
|
57
|
+
if (!el.getAttribute || el.getAttribute("role") !== "spinbutton" || !spins.includes(el)) return false;
|
|
58
|
+
const box = ownerOf(el);
|
|
59
|
+
return spins.filter((sp) => ownerOf(sp) === box).length > 1;
|
|
60
|
+
};
|
|
61
|
+
`;
|
|
62
|
+
/**
|
|
63
|
+
* Expression evaluated with `this` as a resolved element; lets actuation code
|
|
64
|
+
* decide before writing whether the element is one segment of a multi-segment
|
|
65
|
+
* date widget, using the same detector the enumeration and readback use.
|
|
66
|
+
*/
|
|
67
|
+
exports.IS_DATE_SEGMENT_EXPR = `(function () {
|
|
68
|
+
${exports.SEGMENT_OWNER_JS}
|
|
69
|
+
return isDateSegment(this);
|
|
70
|
+
})`;
|
|
71
|
+
//# sourceMappingURL=segmented-date-spinbutton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"segmented-date-spinbutton.js","sourceRoot":"","sources":["../../src/scraper/segmented-date-spinbutton.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACU,QAAA,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoD/B,CAAC;AAEF;;;;GAIG;AACU,QAAA,oBAAoB,GAAG;IAChC,QAAA,gBAAgB;;GAEjB,CAAC"}
|
|
@@ -490,14 +490,6 @@ export declare function decideReplanNoProgress(newSteps: readonly NormalizedStep
|
|
|
490
490
|
* is ambiguous.
|
|
491
491
|
*/
|
|
492
492
|
export declare function hasPageAlreadyAdvancedPastStep(stepStartUrl: string, currentUrl: string, stepInstruction: string): boolean;
|
|
493
|
-
/**
|
|
494
|
-
* DOM-advance counterpart of {@link hasPageAlreadyAdvancedPastStep} for
|
|
495
|
-
* non-final submit-shaped steps, whose SPA wizards swap content without a URL
|
|
496
|
-
* change. Reuses the shared {@link hasPageAdvanced} judgement over the
|
|
497
|
-
* step-start and live visible-text signatures; a final step is never credited
|
|
498
|
-
* here because its completion is owned by the submit-destination judge.
|
|
499
|
-
*/
|
|
500
|
-
export declare function hasSubmitStepDomAdvanced(isFinalStep: boolean, preVisibleTextSignature: string | undefined, liveVisibleTextSignature: string | undefined): boolean;
|
|
501
493
|
/**
|
|
502
494
|
* Detect a replan that proposes a Sign-In/Log-In recovery bridge after the
|
|
503
495
|
* completed-steps history already shows an account-creation/registration step.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recon-browser.d.ts","sourceRoot":"","sources":["../../src/scripts/recon-browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAKH,OAAO,KAAK,SAAS,MAAM,mBAAmB,CAAC;AAE/C,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAGnF,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"recon-browser.d.ts","sourceRoot":"","sources":["../../src/scripts/recon-browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAKH,OAAO,KAAK,SAAS,MAAM,mBAAmB,CAAC;AAE/C,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAGnF,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AA6B3B,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,SAAS,EAGd,KAAK,eAAe,EAKpB,KAAK,mBAAmB,EAsBzB,MAAM,uBAAuB,CAAC;AAa/B,OAAO,EAAwB,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAI5E,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,wCAAwC,CAAC;AAQjG,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAM9C,UAAU,WAAW;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,cAAc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