@ctrl/dom 0.1.4 → 0.1.5

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 (59) hide show
  1. package/dist/aria/_chunks/roles-list-BXCvPLJT.cjs +4 -0
  2. package/dist/aria/_chunks/roles-list-rVVxaIPs.js +4 -0
  3. package/dist/aria/index.cjs +1 -232
  4. package/dist/aria/index.js +1 -198
  5. package/dist/aria/internal.cjs +1 -69
  6. package/dist/aria/internal.js +1 -30
  7. package/dist/cli/_chunks/report-z52LF7nA.js +12 -0
  8. package/dist/cli/_chunks/rolldown-runtime-H3fMLYWS.js +1 -0
  9. package/dist/cli/ctrl-dom.js +2 -181
  10. package/dist/cli/jest-reporter.js +2 -54
  11. package/dist/cli/vitest-reporter.js +2 -81
  12. package/dist/dom/_chunks/src-sZY6a2LC.js +49 -0
  13. package/dist/dom/index.js +1 -3
  14. package/dist/dom/internal.js +1 -434
  15. package/dist/dom/types/window/clock.d.ts +2 -2
  16. package/dist/jest-dom/_chunks/matchers-CGTk9GX9.cjs +31 -0
  17. package/dist/jest-dom/_chunks/matchers-Chf0yHoo.js +31 -0
  18. package/dist/jest-dom/index.cjs +1 -5
  19. package/dist/jest-dom/index.js +1 -6
  20. package/dist/jest-dom/jest-globals.cjs +1 -6
  21. package/dist/jest-dom/jest-globals.js +1 -7
  22. package/dist/jest-dom/matchers.cjs +1 -53
  23. package/dist/jest-dom/matchers.js +1 -3
  24. package/dist/jest-dom/vitest.cjs +1 -6
  25. package/dist/jest-dom/vitest.js +1 -7
  26. package/dist/react/_chunks/pure-CCeTO5Mk.js +1 -0
  27. package/dist/react/_chunks/pure-DQzwul4s.cjs +1 -0
  28. package/dist/react/dont-cleanup-after-each.cjs +1 -3
  29. package/dist/react/dont-cleanup-after-each.js +1 -4
  30. package/dist/react/index.cjs +1 -47
  31. package/dist/react/index.js +1 -35
  32. package/dist/react/pure.cjs +1 -17
  33. package/dist/react/pure.js +1 -5
  34. package/dist/register/index.js +1 -11
  35. package/dist/register/pure.js +1 -147
  36. package/dist/testing-library/_chunks/aria-snapshot-diff-80G4meO2.cjs +14 -0
  37. package/dist/testing-library/_chunks/aria-snapshot-diff-B1L8s_sM.js +14 -0
  38. package/dist/testing-library/agent.cjs +10 -720
  39. package/dist/testing-library/agent.js +10 -712
  40. package/dist/testing-library/index.cjs +19 -2459
  41. package/dist/testing-library/index.js +19 -2380
  42. package/dist/user-event/index.cjs +33 -3924
  43. package/dist/user-event/index.js +33 -3899
  44. package/dist/user-event/types/ctrl-dom.d.ts +1 -1
  45. package/dist/vitest-environment/_chunks/rolldown-runtime-BhWHdk3m.js +1 -0
  46. package/dist/vitest-environment/failure-snapshot.js +1 -42
  47. package/dist/vitest-environment/index.js +1 -185
  48. package/dist/vitest-environment/plugin.js +1 -90
  49. package/package.json +1 -1
  50. package/dist/aria/_chunks/roles-list-CYZF-l9K.js +0 -1503
  51. package/dist/aria/_chunks/roles-list-D4WCyRO_.cjs +0 -1754
  52. package/dist/cli/_chunks/report-DdncYfuJ.js +0 -93
  53. package/dist/dom/_chunks/src-Cp3oLry4.js +0 -47610
  54. package/dist/jest-dom/_chunks/matchers-CDnnXUfG.js +0 -2211
  55. package/dist/jest-dom/_chunks/matchers-D988Ducb.cjs +0 -2516
  56. package/dist/react/_chunks/pure-DZ97z2oT.cjs +0 -498
  57. package/dist/react/_chunks/pure-PtE2hivW.js +0 -420
  58. package/dist/testing-library/_chunks/aria-snapshot-diff-D7PzpXew.cjs +0 -1170
  59. package/dist/testing-library/_chunks/aria-snapshot-diff-Q8Wj33K0.js +0 -985
package/dist/dom/index.js CHANGED
@@ -1,3 +1 @@
1
- import { $a as CharacterData, $i as ValidityState, $o as EventTarget, $t as HTMLMediaElement, A as FileReader, Aa as DOMMatrix, Ai as CSSSupportsRule, An as HTMLObjectElement, As as FocusEvent, At as SVGScriptElement, B as HTMLOutputElement, Bn as HTMLTableColElement, Bs as WheelEvent, Bt as SVGTitleElement, Ci as CSSPropertyRule, Cn as HTMLLIElement, Cr as AbstractRange, Cs as StorageEvent, Ct as SVGPathElement, D as DataTransferItemList, Di as CSSStartingStyleRule, Dn as HTMLMetaElement, Ds as ClipboardEvent, Dt as SVGRadialGradientElement, E as DataTransferItem, Ei as CSSScopeRule, En as HTMLMenuElement, Es as TransitionEvent, Et as SVGPolylineElement, F as FormData, Fa as DOMRectList, Fn as HTMLQuoteElement, Fs as TextEvent, Ft as SVGTSpanElement, G as HTMLButtonElement, Ga as DOMTokenList, Gn as HTMLTrackElement, Gt as HTMLStyleElement, H as HTMLFieldSetElement, Hn as HTMLTableRowElement, Ht as SVGViewElement, Ia as DOMRectReadOnly, In as HTMLSourceElement, Is as Touch, It as SVGTextContentElement, J as Option, Ji as CSSStyleDeclaration, Jn as Image, Jt as HTMLTemplateElement, K as HTMLOptGroupElement, Ka as ShadowRoot, Kn as HTMLUListElement, Kt as HTMLTitleElement, L as HTMLFormElement, Ln as HTMLSpanElement, Lr as getComputedStyle, Ls as TouchEvent, Lt as SVGTextElement, M as XMLHttpRequestEventTarget, Ma as DOMPoint, Mi as StyleSheet, Mn as HTMLParamElement, Ms as KeyboardEvent, Mt as SVGStyleElement, N as XMLHttpRequestUpload, Na as DOMPointReadOnly, Ni as StyleSheetList, Nn as HTMLPictureElement, No as MutationRecord, Ns as MouseEvent, Nt as SVGSwitchElement, O as IntersectionObserver, Oi as CSSStyleRule, On as HTMLModElement, Or as CommandEvent, Os as CompositionEvent, Ot as SVGRectElement, P as installGlobals, Pa as DOMRect, Pn as HTMLPreElement, Po as NodeList, Ps as PointerEvent, Pt as SVGSymbolElement, Q as HTMLInputElement, Qa as CDATASection, Qt as HTMLAudioElement, R as HTMLDataListElement, Rn as HTMLTableCaptionElement, Rs as TouchList, Rt as SVGTextPathElement, Si as CSSPageRule, Sn as HTMLImageElement, Sr as TreeWalker, Ss as PromiseRejectionEvent, St as SVGMetadataElement, T as DataTransfer, Ta as Element, Ti as CSSRuleList, Tn as HTMLMarqueeElement, Tr as StaticRange, Ts as ToggleEvent, Tt as SVGPolygonElement, U as HTMLLegendElement, Ua as Attr, Un as HTMLTableSectionElement, Us as Event, Ut as HTMLLinkElement, V as HTMLProgressElement, Va as NamedNodeMap, Vn as HTMLTableElement, Vt as SVGUseElement, W as HTMLLabelElement, Wa as DOMStringMap, Wn as HTMLTimeElement, Wt as HTMLScriptElement, X as HTMLSelectElement, Xa as DocumentType, Xn as ElementInternals, Xt as HTMLDialogElement, Yn as CustomStateSet, Yt as HTMLDetailsElement, Z as HTMLTextAreaElement, Za as DocumentFragment, Zn as HTMLElement, Zt as Audio, _i as CSSLayerBlockRule, _n as HTMLHRElement, _r as XMLDocument, _s as HashChangeEvent, _t as SVGImageElement, ai as MediaQueryList, an as HTMLBRElement, ar as Storage, at as SVGCircleElement, bi as CSSNamespaceRule, bn as HTMLHtmlElement, br as NodeFilter, bs as PopStateEvent, bt as SVGMarkerElement, ci as MediaQueryListEvent, cn as HTMLCanvasElement, cr as Clipboard, cs as currentWindow, ct as SVGDescElement, di as CSSContainerRule, dn as HTMLDirectoryElement, dr as History, ds as AnimationEvent, dt as SVGFilterElement, ea as HTMLFormControlsCollection, en as HTMLVideoElement, eo as Comment, et as FileList, fi as CSSFontFaceRule, fn as HTMLDivElement, fr as Location, fs as BeforeUnloadEvent, ft as SVGForeignObjectElement, gi as CSSKeyframesRule, gn as HTMLFrameSetElement, gr as Document, gs as FormDataEvent, gt as SVGGraphicsElement, hi as CSSKeyframeRule, hn as HTMLFrameElement, hr as DOMImplementation, hs as ErrorEvent, ht as SVGGradientElement, in as HTMLAreaElement, it as SVGAnimatedString, j as XMLHttpRequest, ja as DOMMatrixReadOnly, ji as MediaList, jn as HTMLParagraphElement, js as InputEvent, jt as SVGStopElement, k as ResizeObserver, ki as CSSStyleSheet, kn as HTMLOListElement, ks as DragEvent, kt as SVGSVGElement, ln as HTMLDListElement, lr as ClipboardItem, ls as currentWindowOrNull, lt as SVGElement, mi as CSSImportRule, mn as HTMLFontElement, mr as XMLSerializer, ms as CustomEvent, mt as SVGGeometryElement, na as RadioNodeList, nn as TimeRanges, no as Text, nr as createWindow, nt as MathMLElement, on as HTMLBaseElement, or as Screen, ot as SVGClipPathElement, pi as CSSGroupingRule, pn as HTMLEmbedElement, pr as DOMParser, ps as CloseEvent, pt as SVGGElement, q as HTMLOptionElement, qn as HTMLUnknownElement, qt as HTMLSlotElement, rn as HTMLAnchorElement, ro as HTMLCollection, rt as SVGAElement, sn as HTMLBodyElement, sr as VisualViewport, ss as currentDocument, st as SVGDefsElement, t as CSS, ta as HTMLOptionsCollection, tn as MediaError, to as ProcessingInstruction, tr as Window, ui as CSSConditionRule, un as HTMLDataElement, uo as Node, ur as Navigator, us as setCurrentWindow, ut as SVGEllipseElement, vi as CSSLayerStatementRule, vn as HTMLHeadElement, vs as MessageEvent, vt as SVGLineElement, w as MutationObserver, wi as CSSRule, wn as HTMLMapElement, wr as Range, ws as SubmitEvent, wt as SVGPatternElement, xi as CSSNestedDeclarations, xn as HTMLIFrameElement, xr as NodeIterator, xs as ProgressEvent, xt as SVGMaskElement, ya as CustomElementRegistry, yi as CSSMediaRule, yn as HTMLHeadingElement, yr as Selection, ys as PageTransitionEvent, yt as SVGLinearGradientElement, z as HTMLMeterElement, zn as HTMLTableCellElement, zs as UIEvent, zt as SVGTextPositioningElement } from "./_chunks/src-Cp3oLry4.js";
2
-
3
- export { AbstractRange, AnimationEvent, Attr, Audio, BeforeUnloadEvent, CDATASection, CSS, CSSConditionRule, CSSContainerRule, CSSFontFaceRule, CSSGroupingRule, CSSImportRule, CSSKeyframeRule, CSSKeyframesRule, CSSLayerBlockRule, CSSLayerStatementRule, CSSMediaRule, CSSNamespaceRule, CSSNestedDeclarations, CSSPageRule, CSSPropertyRule, CSSRule, CSSRuleList, CSSScopeRule, CSSStartingStyleRule, CSSStyleDeclaration, CSSStyleRule, CSSStyleSheet, CSSSupportsRule, CharacterData, Clipboard, ClipboardEvent, ClipboardItem, CloseEvent, CommandEvent, Comment, CompositionEvent, CustomElementRegistry, CustomEvent, CustomStateSet, DOMImplementation, DOMMatrix, DOMMatrixReadOnly, DOMParser, DOMPoint, DOMPointReadOnly, DOMRect, DOMRectList, DOMRectReadOnly, DOMStringMap, DOMTokenList, DataTransfer, DataTransferItem, DataTransferItemList, Document, Document as HTMLDocument, DocumentFragment, DocumentType, DragEvent, Element, ElementInternals, ErrorEvent, Event, EventTarget, FileList, FileReader, FocusEvent, FormData, FormDataEvent, HTMLAnchorElement, HTMLAreaElement, HTMLAudioElement, HTMLBRElement, HTMLBaseElement, HTMLBodyElement, HTMLButtonElement, HTMLCanvasElement, HTMLCollection, HTMLDListElement, HTMLDataElement, HTMLDataListElement, HTMLDetailsElement, HTMLDialogElement, HTMLDirectoryElement, HTMLDivElement, HTMLElement, HTMLEmbedElement, HTMLFieldSetElement, HTMLFontElement, HTMLFormControlsCollection, HTMLFormElement, HTMLFrameElement, HTMLFrameSetElement, HTMLHRElement, HTMLHeadElement, HTMLHeadingElement, HTMLHtmlElement, HTMLIFrameElement, HTMLImageElement, HTMLInputElement, HTMLLIElement, HTMLLabelElement, HTMLLegendElement, HTMLLinkElement, HTMLMapElement, HTMLMarqueeElement, HTMLMediaElement, HTMLMenuElement, HTMLMetaElement, HTMLMeterElement, HTMLModElement, HTMLOListElement, HTMLObjectElement, HTMLOptGroupElement, HTMLOptionElement, HTMLOptionsCollection, HTMLOutputElement, HTMLParagraphElement, HTMLParamElement, HTMLPictureElement, HTMLPreElement, HTMLProgressElement, HTMLQuoteElement, HTMLScriptElement, HTMLSelectElement, HTMLSlotElement, HTMLSourceElement, HTMLSpanElement, HTMLStyleElement, HTMLTableCaptionElement, HTMLTableCellElement, HTMLTableColElement, HTMLTableElement, HTMLTableRowElement, HTMLTableSectionElement, HTMLTemplateElement, HTMLTextAreaElement, HTMLTimeElement, HTMLTitleElement, HTMLTrackElement, HTMLUListElement, HTMLUnknownElement, HTMLVideoElement, HashChangeEvent, History, Image, InputEvent, IntersectionObserver, KeyboardEvent, Location, MathMLElement, MediaError, MediaList, MediaQueryList, MediaQueryListEvent, MessageEvent, MouseEvent, MutationObserver, MutationRecord, NamedNodeMap, Navigator, Node, NodeFilter, NodeIterator, NodeList, Option, PageTransitionEvent, PointerEvent, PopStateEvent, ProcessingInstruction, ProgressEvent, PromiseRejectionEvent, RadioNodeList, Range, ResizeObserver, SVGAElement, SVGAnimatedString, SVGCircleElement, SVGClipPathElement, SVGDefsElement, SVGDescElement, SVGElement, SVGEllipseElement, SVGFilterElement, SVGForeignObjectElement, SVGGElement, SVGGeometryElement, SVGGradientElement, SVGGraphicsElement, SVGImageElement, SVGLineElement, SVGLinearGradientElement, SVGMarkerElement, SVGMaskElement, SVGMetadataElement, SVGPathElement, SVGPatternElement, SVGPolygonElement, SVGPolylineElement, SVGRadialGradientElement, SVGRectElement, SVGSVGElement, SVGScriptElement, SVGStopElement, SVGStyleElement, SVGSwitchElement, SVGSymbolElement, SVGTSpanElement, SVGTextContentElement, SVGTextElement, SVGTextPathElement, SVGTextPositioningElement, SVGTitleElement, SVGUseElement, SVGViewElement, Screen, Selection, ShadowRoot, StaticRange, Storage, StorageEvent, StyleSheet, StyleSheetList, SubmitEvent, Text, TextEvent, TimeRanges, ToggleEvent, Touch, TouchEvent, TouchList, TransitionEvent, TreeWalker, UIEvent, ValidityState, VisualViewport, WheelEvent, Window, XMLDocument, XMLHttpRequest, XMLHttpRequestEventTarget, XMLHttpRequestUpload, XMLSerializer, createWindow, currentDocument, currentWindow, currentWindowOrNull, getComputedStyle, installGlobals, setCurrentWindow };
1
+ export{Cr as AbstractRange,ds as AnimationEvent,Ua as Attr,Zt as Audio,fs as BeforeUnloadEvent,Qa as CDATASection,t as CSS,ui as CSSConditionRule,di as CSSContainerRule,fi as CSSFontFaceRule,pi as CSSGroupingRule,mi as CSSImportRule,hi as CSSKeyframeRule,gi as CSSKeyframesRule,_i as CSSLayerBlockRule,vi as CSSLayerStatementRule,yi as CSSMediaRule,bi as CSSNamespaceRule,xi as CSSNestedDeclarations,Si as CSSPageRule,Ci as CSSPropertyRule,wi as CSSRule,Ti as CSSRuleList,Ei as CSSScopeRule,Di as CSSStartingStyleRule,Ji as CSSStyleDeclaration,Oi as CSSStyleRule,ki as CSSStyleSheet,Ai as CSSSupportsRule,$a as CharacterData,cr as Clipboard,Ds as ClipboardEvent,lr as ClipboardItem,ps as CloseEvent,Or as CommandEvent,eo as Comment,Os as CompositionEvent,ya as CustomElementRegistry,ms as CustomEvent,Yn as CustomStateSet,hr as DOMImplementation,Aa as DOMMatrix,ja as DOMMatrixReadOnly,pr as DOMParser,Ma as DOMPoint,Na as DOMPointReadOnly,Pa as DOMRect,Fa as DOMRectList,Ia as DOMRectReadOnly,Wa as DOMStringMap,Ga as DOMTokenList,T as DataTransfer,E as DataTransferItem,D as DataTransferItemList,gr as Document,gr as HTMLDocument,Za as DocumentFragment,Xa as DocumentType,ks as DragEvent,Ta as Element,Xn as ElementInternals,hs as ErrorEvent,Us as Event,$o as EventTarget,et as FileList,A as FileReader,As as FocusEvent,F as FormData,gs as FormDataEvent,rn as HTMLAnchorElement,in as HTMLAreaElement,Qt as HTMLAudioElement,an as HTMLBRElement,on as HTMLBaseElement,sn as HTMLBodyElement,G as HTMLButtonElement,cn as HTMLCanvasElement,ro as HTMLCollection,ln as HTMLDListElement,un as HTMLDataElement,R as HTMLDataListElement,Yt as HTMLDetailsElement,Xt as HTMLDialogElement,dn as HTMLDirectoryElement,fn as HTMLDivElement,Zn as HTMLElement,pn as HTMLEmbedElement,H as HTMLFieldSetElement,mn as HTMLFontElement,ea as HTMLFormControlsCollection,L as HTMLFormElement,hn as HTMLFrameElement,gn as HTMLFrameSetElement,_n as HTMLHRElement,vn as HTMLHeadElement,yn as HTMLHeadingElement,bn as HTMLHtmlElement,xn as HTMLIFrameElement,Sn as HTMLImageElement,Q as HTMLInputElement,Cn as HTMLLIElement,W as HTMLLabelElement,U as HTMLLegendElement,Ut as HTMLLinkElement,wn as HTMLMapElement,Tn as HTMLMarqueeElement,$t as HTMLMediaElement,En as HTMLMenuElement,Dn as HTMLMetaElement,z as HTMLMeterElement,On as HTMLModElement,kn as HTMLOListElement,An as HTMLObjectElement,K as HTMLOptGroupElement,q as HTMLOptionElement,ta as HTMLOptionsCollection,B as HTMLOutputElement,jn as HTMLParagraphElement,Mn as HTMLParamElement,Nn as HTMLPictureElement,Pn as HTMLPreElement,V as HTMLProgressElement,Fn as HTMLQuoteElement,Wt as HTMLScriptElement,X as HTMLSelectElement,qt as HTMLSlotElement,In as HTMLSourceElement,Ln as HTMLSpanElement,Gt as HTMLStyleElement,Rn as HTMLTableCaptionElement,zn as HTMLTableCellElement,Bn as HTMLTableColElement,Vn as HTMLTableElement,Hn as HTMLTableRowElement,Un as HTMLTableSectionElement,Jt as HTMLTemplateElement,Z as HTMLTextAreaElement,Wn as HTMLTimeElement,Kt as HTMLTitleElement,Gn as HTMLTrackElement,Kn as HTMLUListElement,qn as HTMLUnknownElement,en as HTMLVideoElement,_s as HashChangeEvent,dr as History,Jn as Image,js as InputEvent,O as IntersectionObserver,Ms as KeyboardEvent,fr as Location,nt as MathMLElement,tn as MediaError,ji as MediaList,ai as MediaQueryList,ci as MediaQueryListEvent,vs as MessageEvent,Ns as MouseEvent,w as MutationObserver,No as MutationRecord,Va as NamedNodeMap,ur as Navigator,uo as Node,br as NodeFilter,xr as NodeIterator,Po as NodeList,J as Option,ys as PageTransitionEvent,Ps as PointerEvent,bs as PopStateEvent,to as ProcessingInstruction,xs as ProgressEvent,Ss as PromiseRejectionEvent,na as RadioNodeList,wr as Range,k as ResizeObserver,rt as SVGAElement,it as SVGAnimatedString,at as SVGCircleElement,ot as SVGClipPathElement,st as SVGDefsElement,ct as SVGDescElement,lt as SVGElement,ut as SVGEllipseElement,dt as SVGFilterElement,ft as SVGForeignObjectElement,pt as SVGGElement,mt as SVGGeometryElement,ht as SVGGradientElement,gt as SVGGraphicsElement,_t as SVGImageElement,vt as SVGLineElement,yt as SVGLinearGradientElement,bt as SVGMarkerElement,xt as SVGMaskElement,St as SVGMetadataElement,Ct as SVGPathElement,wt as SVGPatternElement,Tt as SVGPolygonElement,Et as SVGPolylineElement,Dt as SVGRadialGradientElement,Ot as SVGRectElement,kt as SVGSVGElement,At as SVGScriptElement,jt as SVGStopElement,Mt as SVGStyleElement,Nt as SVGSwitchElement,Pt as SVGSymbolElement,Ft as SVGTSpanElement,It as SVGTextContentElement,Lt as SVGTextElement,Rt as SVGTextPathElement,zt as SVGTextPositioningElement,Bt as SVGTitleElement,Vt as SVGUseElement,Ht as SVGViewElement,or as Screen,yr as Selection,Ka as ShadowRoot,Tr as StaticRange,ar as Storage,Cs as StorageEvent,Mi as StyleSheet,Ni as StyleSheetList,ws as SubmitEvent,no as Text,Fs as TextEvent,nn as TimeRanges,Ts as ToggleEvent,Is as Touch,Ls as TouchEvent,Rs as TouchList,Es as TransitionEvent,Sr as TreeWalker,zs as UIEvent,$i as ValidityState,sr as VisualViewport,Bs as WheelEvent,tr as Window,_r as XMLDocument,j as XMLHttpRequest,M as XMLHttpRequestEventTarget,N as XMLHttpRequestUpload,mr as XMLSerializer,nr as createWindow,ss as currentDocument,cs as currentWindow,ls as currentWindowOrNull,Lr as getComputedStyle,P as installGlobals,us as setCurrentWindow}from"./_chunks/src-sZY6a2LC.js";
@@ -1,434 +1 @@
1
- import { $ as sanitizeValue, $c as $elements, $d as DOCUMENT_NODE, $l as $mode, $n as attrAssociatedElements, $r as createOwnerSheet, $s as $badInput, $u as $shadowRoot, Ac as $css, Ad as $whatToShow, Af as XLINK_NS, Al as $indeterminate, Ao as setAttribute, Ar as defaultButton, Au as $rects, Ba as validateAndExtract, Bc as $delegatesFocus, Bd as VirtualTimeout, Bi as fireSyntheticPointerEvent, Bl as $keyText, Bo as firstElementChild, Br as computedVisibility, Bu as $scrollX, C as optionSelected, Ca as installEventHandlers, Cc as $constructingEntryList, Cd as $userEdited, Cf as F_SHADOW_ROOT, Cl as $href, Co as asciiLowercase, Cu as $queries, Da as getElementsByClassName, Dc as $controlsVersion, Dd as $version, Df as PROCESSING_INSTRUCTION_NODE, Dl as $ids, Do as hasAttr, Dr as nodeLength, Du as $readyState, Ea as attachShadowRoot, Ec as $controlsDoc, Ed as $value, Ef as NOTATION_NODE, El as $idleId, Eo as getAttribute, Er as compareBoundaryPoints, Eu as $readonly, Fc as $data, Fd as $x, Fi as parseMediaQueryList, Fl as $innerHeight, Fo as ensureIndexGetters, Fr as styleElementRemoved, Fu as $running, Gc as $dirtyValue, Gd as installClock, Gi as deferredCompatMembers, Gl as $listeners, Go as nextElementSibling, Gr as isVisibilityHidden, Gs as setTrusted, Gu as $selStart, Ha as attrNode, Hc as $devicePixelRatio, Hd as clockSkipped, Hi as COMPAT_PROFILES, Hl as $labels, Ho as isInclusiveAncestor, Hr as hasAuthorStyles, Hs as removeAllEventListeners, Hu as $selDir, I as installedWindowMethods, Ic as $dataset, Id as $xhr, Ii as NodeCache, Il as $innerWidth, Io as indexGetterTable, Ir as styleElementUpdated, Iu as $runningFrame, Ja as serializeNode, Jc as $doc, Jd as virtualPerformance, Jl as $lockedForReset, Jo as previousElementSibling, Jr as pseudoContent, Js as $active, Ju as $selection, Kc as $disabled, Kd as skipIdleTime, Ki as hiddenGlobals, Kl as $localStorage, Ko as nextInTree, Kr as pointerEvents, Ks as $_proto__, Ku as $selectedOptions, La as isValidDoctypeName, Lc as $declarative, Ld as $y, Li as nodeCache, Ll as $is2D, Lo as derivedCache, Lr as getComputedStyle, Lu as $sc, Mc as $customElements, Md as $width, Mf as XML_NS, Ml as $indexed, Mo as notifyMutationObservers, Mr as isSubmitButton, Mu as $result, Nc as $customValidity, Nd as $window, Nl as $inflight, Nr as setNotImplementedHandler, Nu as $root, Oa as getElementsByTagName, Oc as $cookieJar, Od as $visualViewport, Of as SVG_NS, Ol as $impl, Oo as isAsciiWhitespace, Ou as $record, Pc as $cx, Pd as $writeBuffer, Pi as matchMediaText, Pl as $info, Po as NodeList, Pr as isEditable$1, Pu as $rules, Qc as $el, Qd as DOCUMENT_FRAGMENT_NODE, Qi as isFACE, Ql as $mediaQueryLists, Qn as attrAssociatedElement, Qo as NodeImpl, Qr as createLinkSheet, Qs as $availableToElementInternals, Qu as $settled, Ra as isValidElementLocalName, Rc as $defaultNamespace, Rd as $z, Ri as dispatchTrusted, Rl as $isHTML, Ro as peekDerivedCache, Rr as computedDisplay, Ru as $screen, S as isValid, Sa as getEventHandler, Sc as $constructed, Sd as $userActivation, Sf as F_MO_REGISTERED, Sl as $host, So as tagName, Su as $pseudo, Tc as $controlsCache, Td as $validity, Tf as MATHML_NS, Tl as $idleCallbacks, To as classTokens, Tu as $rawValue, Uc as $dirtiness, Ud as clockStats, Ui as DEFAULT_COMPAT, Ul as $layerName, Uo as lastElementChild, Ur as isDisplayNone, Uu as $selEnd, Vc as $derived, Vd as clockNow, Vi as COMPAT, Vl as $kind, Vo as indexOf, Vr as currentStyleVersion, Vs as hasListeners, Vu as $scrollY, Wc as $dirtyChecked, Wd as foreignImmediatesPending, Wi as compatExposes, Wl as $list, Wo as nextElementInTree, Wr as isDisplayNoneInclusive, Ws as EventState, Wu as $selSet, Xc as $ec, Xd as CDATA_SECTION_NODE, Xi as parseDeclBlock, Xl as $matches, Xo as treeRoot, Xr as uaDisplay, Xs as $attr, Xu as $serializable, Y as optionSelect, Ya as parseFragment, Yc as $dropEffect, Yd as ATTRIBUTE_NODE, Yi as DeclBlock, Yl as $m, Yo as previousInTree, Yr as setComputedColorMode, Ys as $assocGen, Yu as $selector, Zc as $effectAllowed, Zd as COMMENT_NODE, Zi as faceState, Zl as $media, Zo as AttrRecord, Zr as adoptedStyleSheetsOf, Zs as $attributes, Zu as $sessionStorage, _ as isPlaceholderShown, _a as supportsSelectionType, _c as $closed, _d as $uiValue, _f as F_CUSTOM, _l as $globalObject, _o as assignedSlot, _u as $preCheckedRadio, a as inputIndeterminate, aa as isActuallyDisabled, ac as $byCtor, ad as $states, af as DOCUMENT_POSITION_PRECEDING, al as $fill, ao as withNamedProperties, as as reportException, au as $onchange, b as isRequired, ba as GLOBAL_EVENT_HANDLER_EVENTS, bc as $compiledFor, bd as $uri, bf as F_HAS_STYLE_ATTR, bl as $history, bo as T, bu as $prelude, c as isDefault, ca as isResettable, cc as $callback, cd as $supportsText, cf as ENTITY_NODE, cl as $focused, co as querySelector, cu as $ownerNode, d as isInRange, da as labelsFor, dc as $childNodes, dd as $targets, df as F_ATTR_HOOK, dl as $frameCallbacks, do as inspectNode, du as $parentRule, ec as $baseFor, ed as $shed, ef as DOCUMENT_POSITION_CONTAINED_BY, ei as registerOwnerSheet, el as $entries, er as hasExplicitAttrElements, es as dispatch, eu as $name, f as isIndeterminate, fa as INPUT_TYPE_NAMES, fc as $childWindows, fd as $tasks, ff as F_CE_CUSTOM, fl as $frameElement, fo as replaceData, fu as $parentWindow, g as isOutOfRange, ga as isTextualType, gc as $clonable, gd as $types, gf as F_CONNECT_HOOK, gl as $generation, go as assignedNodes, gu as $preChecked, h as isOptional, ha as isNumericType, hc as $clipboard, hd as $type, hf as F_CONNECTED, hl as $frameTime, ho as assignedElements, hu as $preApplied, i as inputChecked, ia as formOwner, ic as $block, id as $so, if as DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, ii as unregisterOwnerSheet, il as $files, io as ensureCollectionIndexGetters, ir as trackGlobalTimers, is as setAssignedSlotLookup, iu as $nodes, jc as $current, jd as $whenDefined, jf as XMLNS_NS, jl as $index, jo as splitOnAsciiWhitespace, jr as implicitSubmission, ju as $reference, ka as getElementsByTagNameNS, kc as $cookies, kd as $w, kf as TEXT_NODE, kl as $implementation, ko as removeAttribute, kr as constructEntryList, ku as $records, l as isDisabled, la as isSubmittable, lc as $checked, ld as $systemId, lf as ENTITY_REFERENCE_NODE, li as windowHooks, ll as $form, lo as querySelectorAll, lu as $ownerRule, m as isMutable, ma as inputTypeFromAttr, mc as $classList, md as $title, mf as F_CHILD_LIST, ml as $frameTask, mo as assignManually, mu as $pointerBeforeReference, n as controlValue, nc as $baseURL, nd as $sheets, nf as DOCUMENT_POSITION_DISCONNECTED, ni as setAdoptedStyleSheets, nl as $error, ns as nodeGetTheParent, nu as $namespaces, o as isAutofilled, oa as isLabelable, oc as $byName, od as $style, of as DOCUMENT_TYPE_NODE, oi as evaluateMediaQueryList, ol as $filter, oo as closest, os as setUncaughtExceptionHandler, ou as $options, p as isInvalid, pa as inputType, pc as $children, pd as $timers, pf as F_CHILDREN_HOOK, pl as $frameId, po as splitText, pu as $pastNames, qa as serializeChildren, qc as $disallowModification, qd as virtualDate, qi as resolveCompat, ql as $location, qo as nextSkippingChildren, qr as pointerEventsNone, qs as $aboutBase, qu as $selectedness, r as hasReadonlyAttribute, ra as listOfOptions, rc as $baseVersion, rd as $slotAssignment, rf as DOCUMENT_POSITION_FOLLOWING, ri as styleSheetsOf, rl as $file, ro as HTMLCollection, rr as windowInterfaces, rs as retarget, ru as $navigator, s as isChecked, sa as isListed, sc as $cache, sd as $styleVersion, sf as ELEMENT_NODE, si as mediaEnvironment, sl as $firingSubmissionEvents, so as matches, su as $owner, tc as $baseOverride, td as $sheet, tf as DOCUMENT_POSITION_CONTAINS, ti as removeOwnerSheet, tl as $eo, tr as Window, ts as getCurrentEvent, tt as createFileList, tu as $names, u as isEnabled, ua as labeledControl, uc as $checkedSet, ud as $target, uf as F_ADOPT_HOOK, ul as $forms, uu as $parent, v as isReadOnly, va as valueMode, vc as $coll, vd as $updating, vf as F_FACE, vl as $hasTransients, vo as findFlattenedSlottables, vr as createEvent, vu as $preIndeterminate, wa as setEventHandler, wc as $contentType, wd as $userValidity, wf as HTML_NS, wl as $id, wo as attr, wu as $ranges, x as isTextControl, xa as WINDOW_EVENT_HANDLER_EVENTS, xc as $condition, xd as $url, xf as F_HTML, xl as $home, xo as tagId, xu as $presentationStyle, y as isReadWrite, yc as $compiled, yd as $updatingSelectedContent, yf as F_HAS_SHADOW, yl as $height, yo as findSlot, yu as $prefix, za as isValidNamespacePrefix, zc as $defaultValueOverride, zd as VirtualClock, zi as fireAnEvent, zl as $items, zo as childAt, zr as computedValue, zu as $scrollRestoration } from "./_chunks/src-Cp3oLry4.js";
2
- import { constants, createContext, runInContext } from "node:vm";
3
- import * as diagnosticsChannel from "node:diagnostics_channel";
4
-
5
- // src/window/isolation.ts
6
- let baseline = null;
7
- function targets() {
8
- const out = /* @__PURE__ */ new Set();
9
- const interfaces = windowInterfaces();
10
- for (const name in interfaces) {
11
- const value = interfaces[name];
12
- if (value === null || typeof value !== "object" && typeof value !== "function") continue;
13
- out.add(value);
14
- const proto = value.prototype;
15
- if (typeof value === "function" && proto !== null && typeof proto === "object") out.add(proto);
16
- }
17
- out.add(Window.prototype);
18
- return [...out];
19
- }
20
- function snapshot(target) {
21
- const map = /* @__PURE__ */ new Map();
22
- for (const key of Reflect.ownKeys(target)) map.set(key, Object.getOwnPropertyDescriptor(target, key));
23
- return map;
24
- }
25
- /** The objects in the baseline (interface objects and their prototypes). */
26
- let guarded = null;
27
- /** Record the pristine interface state (first call wins; later calls are no-ops). */
28
- function captureInterfaceBaseline() {
29
- if (baseline !== null) return;
30
- baseline = /* @__PURE__ */ new Map();
31
- guarded = /* @__PURE__ */ new WeakSet();
32
- for (const t of targets()) {
33
- baseline.set(t, snapshot(t));
34
- guarded.add(t);
35
- }
36
- ownObjectCreateMaps();
37
- }
38
- /** A realm that lives as long as the process (see ownObjectCreateMaps). */
39
- let mapOwner = null;
40
- /**
41
- * V8 caches the map `Object.create(proto)` builds on `proto`, with the calling realm's `Object`
42
- * as its constructor, and reuses it from every realm. For prototypes every test file shares — the
43
- * interface prototypes, and the outer realm's Object.prototype, which every `module.exports` Jest
44
- * makes inherits from and bundlers' CommonJS interop (`__toESM`) hands to Object.create — the
45
- * first test file to call it would own the map, and the objects each later file makes with it
46
- * would keep that file's realm (window, document, module graph) alive for the rest of the worker.
47
- * So a small permanent realm makes them first. Again after each restore: changing a prototype can
48
- * replace its map, and the cache with it.
49
- */
50
- function ownObjectCreateMaps() {
51
- if (baseline === null) return;
52
- const owner = mapOwner ??= runInContext("(prototypes) => prototypes.map((p) => Object.create(p))", createContext(constants.DONT_CONTEXTIFY));
53
- const prototypes = [Object.prototype];
54
- for (const target of baseline.keys()) if (typeof target !== "function") prototypes.push(target);
55
- owner(prototypes);
56
- }
57
- /** `desc` with `configurable: true` when it would define a non-configurable property. */
58
- function configurableDescriptor(desc) {
59
- return desc !== null && typeof desc === "object" && desc.configurable !== true ? {
60
- ...desc,
61
- configurable: true
62
- } : desc;
63
- }
64
- /**
65
- * Make properties a test file defines on interface objects and prototypes configurable, so
66
- * `restoreInterfaces()` can undo them. `Object.defineProperty`/`defineProperties` default to
67
- * non-configurable: shadow-dom-testing-library adds `ShadowRoot.prototype.outerHTML` that way,
68
- * the getter outlived its file, and the next file in the worker crashed reading
69
- * `ShadowRoot.prototype.outerHTML` (it calls the getter on the prototype). Patches `realm`'s own
70
- * `Object.defineProperty`, `Object.defineProperties` and `Reflect.defineProperty` (a test file's
71
- * vm global has its own intrinsics; @ctrl/dom's code in the outer realm is unaffected). Call after
72
- * `captureInterfaceBaseline()`. docs/deviations.md.
73
- */
74
- function guardInterfaceDefinitions(realm) {
75
- const set = guarded;
76
- if (set === null) return;
77
- const O = realm.Object;
78
- const R = realm.Reflect;
79
- const defineProperty = O.defineProperty;
80
- const defineProperties = O.defineProperties;
81
- const reflectDefineProperty = R.defineProperty;
82
- const wrappers = {
83
- defineProperty(o, key, desc) {
84
- return defineProperty(o, key, set.has(o) ? configurableDescriptor(desc) : desc);
85
- },
86
- defineProperties(o, props) {
87
- if (!set.has(o) || props === null || typeof props !== "object") return defineProperties(o, props);
88
- const coerced = {};
89
- for (const key of Reflect.ownKeys(props)) if (Object.getOwnPropertyDescriptor(props, key)?.enumerable) coerced[key] = configurableDescriptor(props[key]);
90
- return defineProperties(o, coerced);
91
- },
92
- reflectDefineProperty(o, key, desc) {
93
- return reflectDefineProperty(o, key, set.has(o) ? configurableDescriptor(desc) : desc);
94
- }
95
- };
96
- Object.defineProperty(wrappers.reflectDefineProperty, "name", { value: "defineProperty" });
97
- Object.defineProperty(O, "defineProperty", {
98
- value: wrappers.defineProperty,
99
- writable: true,
100
- configurable: true,
101
- enumerable: false
102
- });
103
- Object.defineProperty(O, "defineProperties", {
104
- value: wrappers.defineProperties,
105
- writable: true,
106
- configurable: true,
107
- enumerable: false
108
- });
109
- Object.defineProperty(R, "defineProperty", {
110
- value: wrappers.reflectDefineProperty,
111
- writable: true,
112
- configurable: true,
113
- enumerable: false
114
- });
115
- }
116
- /** https://tc39.es/ecma262/#array-index (canonical numeric strings below 2^32 - 1). */
117
- function isArrayIndex(key) {
118
- if (typeof key !== "string" || key === "" || key.length > 10) return false;
119
- const n = Number(key);
120
- return n >>> 0 === n && n !== 4294967295 && String(n) === key;
121
- }
122
- function sameDescriptor(a, b) {
123
- return a.value === b.value && a.get === b.get && a.set === b.set && a.writable === b.writable && a.enumerable === b.enumerable && a.configurable === b.configurable;
124
- }
125
- /** Undo every change made to interface objects/prototypes since the baseline. Returns how many properties were restored. */
126
- function restoreInterfaces() {
127
- if (baseline === null) return 0;
128
- let restored = 0;
129
- for (const [target, original] of baseline) {
130
- const keys = Reflect.ownKeys(target);
131
- for (const key of keys) {
132
- if (original.has(key) || isArrayIndex(key)) continue;
133
- if (Reflect.deleteProperty(target, key)) restored++;
134
- }
135
- for (const [key, desc] of original) {
136
- if (isArrayIndex(key)) continue;
137
- const current = Object.getOwnPropertyDescriptor(target, key);
138
- if (current !== void 0 && sameDescriptor(current, desc)) continue;
139
- try {
140
- Object.defineProperty(target, key, desc);
141
- restored++;
142
- } catch {}
143
- }
144
- }
145
- ownObjectCreateMaps();
146
- return restored;
147
- }
148
-
149
- // src/trace.ts
150
- const SPAN_CHANNEL = "ctrl-dom:span";
151
- const channel = typeof diagnosticsChannel.tracingChannel === "function" ? diagnosticsChannel.tracingChannel(SPAN_CHANNEL) : null;
152
- /** The tracing channel, for subscribers. Null where the runtime has none. */
153
- function spanChannel() {
154
- return channel;
155
- }
156
- /** Whether a span would be recorded: check this before formatting a description. */
157
- function tracing() {
158
- return channel !== null && channel.hasSubscribers;
159
- }
160
- /** Run `fn` as a span. Call only when `tracing()` is true. */
161
- function traceSync(op, description, fn) {
162
- const span = {
163
- op,
164
- description,
165
- data: {},
166
- async: false
167
- };
168
- const skipped = clockSkipped();
169
- return channel.traceSync((s) => {
170
- try {
171
- return fn(s);
172
- } finally {
173
- recordSkipped(s, skipped);
174
- }
175
- }, span, void 0, span);
176
- }
177
- /** Run promise-returning `fn` as a span that ends when the promise settles. Call only when `tracing()` is true. */
178
- function tracePromise(op, description, fn) {
179
- const span = {
180
- op,
181
- description,
182
- data: {},
183
- async: true
184
- };
185
- const skipped = clockSkipped();
186
- return channel.tracePromise((s) => fn(s).finally(() => recordSkipped(s, skipped)), span, void 0, span);
187
- }
188
- /** How much idle time the virtual clock skipped while the span ran (a findBy's timeout, a debounce). */
189
- function recordSkipped(span, before) {
190
- const skipped = clockSkipped() - before;
191
- if (skipped > 0) span.data["clock.skipped_ms"] = Math.round(skipped);
192
- }
193
- const MAX_DESCRIPTION = 160;
194
- /** `name(arg, arg, ...)` with each argument short and readable, for a span description. */
195
- function describeCall(name, args) {
196
- let out = `${name}(`;
197
- for (let i = 0; i < args.length; i++) {
198
- if (args[i] === void 0 && i === args.length - 1) break;
199
- out += (i > 0 ? ", " : "") + describeValue(args[i], 0);
200
- if (out.length > MAX_DESCRIPTION) return `${out.slice(0, 159)}…)`;
201
- }
202
- return `${out})`;
203
- }
204
- function describeValue(value, depth) {
205
- if (typeof value === "string") return JSON.stringify(value.length > 40 ? `${value.slice(0, 39)}…` : value);
206
- if (typeof value === "function") return value.name ? `${value.name}()` : "fn";
207
- if (value instanceof RegExp) return String(value);
208
- if (value === null || typeof value !== "object") return String(value);
209
- if (value[$impl] !== void 0) return describeNode(value);
210
- if (Array.isArray(value)) return depth > 0 ? "[…]" : `[${value.slice(0, 3).map((v) => describeValue(v, depth + 1)).join(", ")}${value.length > 3 ? ", …" : ""}]`;
211
- if (depth > 0) return "{…}";
212
- const entries = Object.entries(value).slice(0, 4);
213
- if (entries.length === 0) return "{}";
214
- return `{ ${entries.map(([k, v]) => `${k}: ${describeValue(v, depth + 1)}`).join(", ")} }`;
215
- }
216
- let nodeDescriber = null;
217
- /**
218
- * Lets a higher layer name elements in span descriptions: @ctrl/dom/aria registers role and accessible
219
- * name (`button "Save"`), the way queries find them. Called only while tracing.
220
- */
221
- function setNodeDescriber(describer) {
222
- nodeDescriber = describer;
223
- }
224
- /** An element as a span description shows it: `button "Save"` (see setNodeDescriber), else `<input "Email">`. */
225
- function describeNode(node) {
226
- const n = node;
227
- if (n.nodeType === 9) return "document";
228
- if (n.nodeType !== 1 || typeof n.localName !== "string") return n.nodeType === 3 ? "#text" : "node";
229
- if (nodeDescriber !== null) try {
230
- const described = nodeDescriber(node);
231
- if (described) return described;
232
- } catch {}
233
- if (n.localName === "body" || n.localName === "html") return `<${n.localName}>`;
234
- const label = n.getAttribute?.("aria-label") || n.textContent?.trim().replace(/\s+/g, " ") || n.getAttribute?.("placeholder") || n.getAttribute?.("name") || "";
235
- return label === "" ? `<${n.localName}>` : `<${n.localName} ${quote(label)}>`;
236
- }
237
- /** A short JSON string: names and labels in descriptions stay under ~40 characters. */
238
- function quote(text) {
239
- return JSON.stringify(text.length > 40 ? `${text.slice(0, 39)}…` : text);
240
- }
241
- const FAILURE_CHANNEL = "sentry-tests:failure";
242
- let failureSnapshot = null;
243
- /**
244
- * Lets a higher layer describe the page of a failed test: @ctrl/dom/testing-library registers its
245
- * accessibility snapshot. Called only when a test fails with @ctrl/sentry-tests reporting.
246
- */
247
- function setFailureSnapshot(snapshot) {
248
- failureSnapshot = snapshot;
249
- }
250
- /**
251
- * While an environment runs, add the page's accessibility snapshot and the virtual clock to the
252
- * failures @ctrl/sentry-tests reports from it (only those of `getDocument()`'s document: another
253
- * environment's subscriber may be listening in the same process). Returns the unsubscribe.
254
- */
255
- function subscribeTestFailures(getDocument) {
256
- const failures = diagnosticsChannel.channel(FAILURE_CHANNEL);
257
- const onFailure = (message) => {
258
- const m = message;
259
- const document = getDocument();
260
- if (document == null || m.document !== document) return;
261
- const clock = clockStats();
262
- if (clock !== null) m.contexts.clock = {
263
- skipped_ms: Math.round(clock.skippedMs),
264
- pending_timers: clock.pendingTimers
265
- };
266
- if (failureSnapshot === null || document.body == null) return;
267
- try {
268
- m.attachments.push({
269
- filename: "accessibility-snapshot.txt",
270
- contentType: "text/plain",
271
- data: failureSnapshot(document.body)
272
- });
273
- } catch {}
274
- };
275
- failures.subscribe(onFailure);
276
- return () => failures.unsubscribe(onFailure);
277
- }
278
-
279
- // src/html/forms/ui.ts
280
- function implOf(el) {
281
- return el[$impl] ?? el;
282
- }
283
- /** Input types a user types characters into (text-like, email, number, date/time fields). */
284
- function isTypingType(type) {
285
- return isTextualType(type) || type === 12 || type >= 7 && type <= 11;
286
- }
287
- /** Whether the user can edit the element's value by typing (mutable text control or editing host). */
288
- function isEditable(el) {
289
- const impl = implOf(el);
290
- if (impl.tag === T.input) return isTypingType(inputType(impl)) && isMutable(impl);
291
- if (impl.tag === T.textarea) return isMutable(impl);
292
- return isEditable$1(impl);
293
- }
294
- /** Whether the selection APIs (selectionStart, setSelectionRange, ...) work on the element. */
295
- function supportsSelection(el) {
296
- const impl = implOf(el);
297
- if (impl.tag === T.textarea) return true;
298
- return impl.tag === T.input && supportsSelectionType(inputType(impl));
299
- }
300
- /** Whether the element has a UI value/selection (input in value mode or textarea). */
301
- function hasUIValue(el) {
302
- const impl = implOf(el);
303
- if (impl.tag === T.textarea) return true;
304
- return impl.tag === T.input && valueMode(inputType(impl)) === 0;
305
- }
306
- /** The value as the user sees it (raw typed text), falling back to `.value`. */
307
- function getUIValue(el) {
308
- const impl = implOf(el);
309
- if (impl.tag === T.input) {
310
- const input = impl.node;
311
- return input[$uiValue] ?? input.value;
312
- }
313
- if (impl.tag === T.textarea) return impl.node.value;
314
- return "";
315
- }
316
- /**
317
- * Set the value as a user edit: sanitizes like the browser, marks the value dirty and
318
- * "last changed by a user edit" (tooLong/tooShort apply), records badInput when the typed text
319
- * cannot be represented (e.g. "1e" in a number field). Does not fire events.
320
- */
321
- function setUIValue(el, value) {
322
- const impl = implOf(el);
323
- if (impl.tag === T.input) {
324
- const input = impl.node;
325
- const type = inputType(impl);
326
- if (valueMode(type) !== 0) return;
327
- const sanitized = sanitizeValue(type, value, impl);
328
- impl.doc[$version]++;
329
- input[$value] = sanitized;
330
- input[$dirtyValue] = true;
331
- input[$userEdited] = true;
332
- input[$uiValue] = sanitized === value ? null : value;
333
- input[$badInput] = sanitized === "" && value !== "" && type !== 5 && !isTextualType(type);
334
- const len = value.length;
335
- if (input[$selStart] > len) input[$selStart] = len;
336
- if (input[$selEnd] > len) input[$selEnd] = len;
337
- return;
338
- }
339
- if (impl.tag === T.textarea) {
340
- const ta = impl.node;
341
- impl.doc[$version]++;
342
- ta[$rawValue] = value;
343
- ta[$dirtyValue] = true;
344
- ta[$userEdited] = true;
345
- }
346
- }
347
- /** Forget the UI value (the next getUIValue returns `.value`). */
348
- function clearUIValue(el) {
349
- const impl = implOf(el);
350
- if (impl.tag === T.input) {
351
- const input = impl.node;
352
- input[$uiValue] = null;
353
- input[$badInput] = false;
354
- }
355
- }
356
- /** The caret/selection inside an input or textarea (works for every value-mode input type). */
357
- function getUISelection(el) {
358
- const host = implOf(el).node;
359
- const len = getUIValue(el).length;
360
- return {
361
- start: Math.min(host[$selStart], len),
362
- end: Math.min(host[$selEnd], len),
363
- direction: host[$selDir]
364
- };
365
- }
366
- /** Set the caret/selection as the user would (no exceptions for email/number inputs). */
367
- function setUISelection(el, start, end = start, direction = "none") {
368
- const impl = implOf(el);
369
- if (impl.tag !== T.input && impl.tag !== T.textarea) return;
370
- const host = impl.node;
371
- const len = getUIValue(el).length;
372
- let s = Math.max(0, Math.min(start, end));
373
- let e = Math.max(start, end);
374
- if (e > len) e = len;
375
- if (s > e) s = e;
376
- host[$selStart] = s;
377
- host[$selEnd] = e;
378
- host[$selDir] = direction;
379
- }
380
- /** Replace a file input's selected files as the file picker would (no events). */
381
- function setFilesFromUI(el, files) {
382
- const impl = implOf(el);
383
- if (impl.tag !== T.input || inputType(impl) !== 17) return;
384
- impl.doc[$version]++;
385
- impl.node[$files] = createFileList(files);
386
- }
387
- /** Set an option's selectedness as the user would (dirty; single selects deselect the rest). */
388
- function setOptionSelectedFromUI(option, selected) {
389
- const impl = implOf(option);
390
- if (impl.tag !== T.option) return;
391
- const o = impl.node;
392
- o._setSelectedness(selected);
393
- o[$dirtiness] = true;
394
- const select = optionSelect(impl);
395
- if (select !== null) {
396
- const s = select.node;
397
- if (selected) s._deselectOthers(impl);
398
- s._updateSelectedContent();
399
- }
400
- }
401
- /** Set a checkbox/radio's checkedness as the user would (dirty; radio groups stay exclusive). */
402
- function setCheckedFromUI(el, checked) {
403
- const impl = implOf(el);
404
- if (impl.tag !== T.input) return;
405
- impl.node._setCheckedness(checked, true);
406
- }
407
-
408
- // src/internal.ts
409
- const OWN_GET_COMPUTED_STYLE = Window.prototype.getComputedStyle;
410
- let memoView = null;
411
- let memoFn = null;
412
- let memoResult = null;
413
- /**
414
- * The user-replaced `getComputedStyle` of `node`'s window (`ownerDocument.defaultView`), bound
415
- * to that window, or null when it is @ctrl/dom's own (the prototype method, or the bound copy
416
- * installGlobals put on a host global) or there is no window / no function.
417
- */
418
- function getComputedStyleOverride(node) {
419
- const view = node.doc.defaultView;
420
- if (view === null || view === void 0) return null;
421
- const fn = view.getComputedStyle;
422
- if (fn === OWN_GET_COMPUTED_STYLE || typeof fn !== "function" || installedWindowMethods.has(fn)) return null;
423
- if (memoFn?.deref() === fn && memoView?.deref() === view) {
424
- const memo = memoResult.deref();
425
- if (memo !== void 0) return memo;
426
- }
427
- const result = fn.bind(view);
428
- memoView = new WeakRef(view);
429
- memoFn = new WeakRef(fn);
430
- memoResult = new WeakRef(result);
431
- return result;
432
- }
433
-
434
- export { $_proto__, $aboutBase, $active, $assocGen, $attr, $attributes, $availableToElementInternals, $badInput, $baseFor, $baseOverride, $baseURL, $baseVersion, $block, $byCtor, $byName, $cache, $callback, $checked, $checkedSet, $childNodes, $childWindows, $children, $classList, $clipboard, $clonable, $closed, $coll, $compiled, $compiledFor, $condition, $constructed, $constructingEntryList, $contentType, $controlsCache, $controlsDoc, $controlsVersion, $cookieJar, $cookies, $css, $current, $customElements, $customValidity, $cx, $data, $dataset, $declarative, $defaultNamespace, $defaultValueOverride, $delegatesFocus, $derived, $devicePixelRatio, $dirtiness, $dirtyChecked, $dirtyValue, $disabled, $disallowModification, $doc, $dropEffect, $ec, $effectAllowed, $el, $elements, $entries, $eo, $error, $file, $files, $fill, $filter, $firingSubmissionEvents, $focused, $form, $forms, $frameCallbacks, $frameElement, $frameId, $frameTask, $frameTime, $generation, $globalObject, $hasTransients, $height, $history, $home, $host, $href, $id, $idleCallbacks, $idleId, $ids, $impl, $implementation, $indeterminate, $index, $indexed, $inflight, $info, $innerHeight, $innerWidth, $is2D, $isHTML, $items, $keyText, $kind, $labels, $layerName, $list, $listeners, $localStorage, $location, $lockedForReset, $m, $matches, $media, $mediaQueryLists, $mode, $name, $names, $namespaces, $navigator, $nodes, $onchange, $options, $owner, $ownerNode, $ownerRule, $parent, $parentRule, $parentWindow, $pastNames, $pointerBeforeReference, $preApplied, $preChecked, $preCheckedRadio, $preIndeterminate, $prefix, $prelude, $presentationStyle, $pseudo, $queries, $ranges, $rawValue, $readonly, $readyState, $record, $records, $rects, $reference, $result, $root, $rules, $running, $runningFrame, $sc, $screen, $scrollRestoration, $scrollX, $scrollY, $selDir, $selEnd, $selSet, $selStart, $selectedOptions, $selectedness, $selection, $selector, $serializable, $sessionStorage, $settled, $shadowRoot, $shed, $sheet, $sheets, $slotAssignment, $so, $states, $style, $styleVersion, $supportsText, $systemId, $target, $targets, $tasks, $timers, $title, $type, $types, $uiValue, $updating, $updatingSelectedContent, $uri, $url, $userActivation, $userEdited, $userValidity, $validity, $value, $version, $visualViewport, $w, $whatToShow, $whenDefined, $width, $window, $writeBuffer, $x, $xhr, $y, $z, ATTRIBUTE_NODE, AttrRecord, CDATA_SECTION_NODE, COMMENT_NODE, COMPAT, COMPAT_PROFILES, DEFAULT_COMPAT, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, DeclBlock, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, EventState, FAILURE_CHANNEL, F_ADOPT_HOOK, F_ATTR_HOOK, F_CE_CUSTOM, F_CHILDREN_HOOK, F_CHILD_LIST, F_CONNECTED, F_CONNECT_HOOK, F_CUSTOM, F_FACE, F_HAS_SHADOW, F_HAS_STYLE_ATTR, F_HTML, F_MO_REGISTERED, F_SHADOW_ROOT, GLOBAL_EVENT_HANDLER_EVENTS, HTMLCollection, HTML_NS, INPUT_TYPE_NAMES, MATHML_NS, NOTATION_NODE, NodeCache, NodeImpl, NodeList, PROCESSING_INSTRUCTION_NODE, SPAN_CHANNEL, SVG_NS, T, TEXT_NODE, VirtualClock, VirtualTimeout, WINDOW_EVENT_HANDLER_EVENTS, XLINK_NS, XMLNS_NS, XML_NS, adoptedStyleSheetsOf, asciiLowercase, assignManually, assignedElements, assignedNodes, assignedSlot, attachShadowRoot, attr, attrAssociatedElement, attrAssociatedElements, attrNode, captureInterfaceBaseline, childAt, classTokens, clearUIValue, clockNow, clockStats, closest, compareBoundaryPoints, compatExposes, computedDisplay, computedValue, computedVisibility, constructEntryList, controlValue, createEvent, createFileList, createLinkSheet, currentStyleVersion, defaultButton, deferredCompatMembers, derivedCache, describeCall, describeNode, dispatch, dispatchTrusted, ensureCollectionIndexGetters, ensureIndexGetters, evaluateMediaQueryList, faceState, findFlattenedSlottables, findSlot, fireAnEvent, fireSyntheticPointerEvent, firstElementChild, foreignImmediatesPending, formOwner, getAttribute, getComputedStyle, getComputedStyleOverride, getCurrentEvent, getElementsByClassName, getElementsByTagName, getElementsByTagNameNS, getEventHandler, getUISelection, getUIValue, guardInterfaceDefinitions, hasAttr, hasAuthorStyles, hasExplicitAttrElements, hasListeners, hasReadonlyAttribute, hasUIValue, hiddenGlobals, implicitSubmission, indexGetterTable, indexOf, inputChecked, inputIndeterminate, inputType, inputTypeFromAttr, inspectNode, installClock, installEventHandlers, isActuallyDisabled, isAsciiWhitespace, isAutofilled, isChecked, isDefault, isDisabled, isDisplayNone, isDisplayNoneInclusive, isEditable as isEditableControl, isEnabled, isFACE, isInRange, isInclusiveAncestor, isIndeterminate, isInvalid, isLabelable, isListed, isMutable, isNumericType, isOptional, isOutOfRange, isPlaceholderShown, isReadOnly, isReadWrite, isRequired, isResettable, isSubmitButton, isSubmittable, isTextControl, isTextualType, isValid, isValidDoctypeName, isValidElementLocalName, isValidNamespacePrefix, isVisibilityHidden, labeledControl, labelsFor, lastElementChild, listOfOptions, matchMediaText, matches, mediaEnvironment, nextElementInTree, nextElementSibling, nextInTree, nextSkippingChildren, nodeCache, nodeGetTheParent, nodeLength, notifyMutationObservers, optionSelected, parseDeclBlock, parseFragment, parseMediaQueryList, peekDerivedCache, pointerEvents, pointerEventsNone, previousElementSibling, previousInTree, pseudoContent, querySelector, querySelectorAll, quote, registerOwnerSheet, removeAllEventListeners, removeAttribute, removeOwnerSheet, replaceData, reportException, resolveCompat, restoreInterfaces, retarget, serializeChildren, serializeNode, setAdoptedStyleSheets, setAssignedSlotLookup, setAttribute, setCheckedFromUI, setComputedColorMode, setEventHandler, setFailureSnapshot, setFilesFromUI, setNodeDescriber, setNotImplementedHandler, setOptionSelectedFromUI, setTrusted, setUISelection, setUIValue, setUncaughtExceptionHandler, skipIdleTime, spanChannel, splitOnAsciiWhitespace, splitText, styleElementRemoved, createOwnerSheet as styleElementSheet, styleElementUpdated, styleSheetsOf, subscribeTestFailures, supportsSelection, supportsSelectionType, tagId, tagName, tracePromise, traceSync, tracing, trackGlobalTimers, treeRoot, uaDisplay, unregisterOwnerSheet, validateAndExtract, valueMode, virtualDate, virtualPerformance, windowHooks, windowInterfaces, withNamedProperties };
1
+ import{$ as e,$c as t,$d as n,$l as r,$n as i,$r as a,$s as o,$u as s,Ac as c,Ad as ee,Af as te,Al as ne,Ao as l,Ar as re,Au as ie,Ba as ae,Bc as oe,Bd as se,Bi as ce,Bl as le,Bo as ue,Br as de,Bu as fe,C as pe,Ca as me,Cc as he,Cd as u,Cf as ge,Cl as _e,Co as ve,Cu as ye,Da as be,Dc as xe,Dd as d,Df as Se,Dl as Ce,Do as we,Dr as Te,Du as Ee,Ea as De,Ec as Oe,Ed as f,Ef as ke,El as Ae,Eo as je,Er as p,Eu as m,Fc as h,Fd as g,Fi as _,Fl as v,Fo as y,Fr as b,Fu as x,Gc as S,Gd as Me,Gi as Ne,Gl as Pe,Go as Fe,Gr as Ie,Gs as Le,Gu as C,Ha as Re,Hc as ze,Hd as w,Hi as Be,Hl as Ve,Ho as He,Hr as Ue,Hs as We,Hu as T,I as Ge,Ic as Ke,Id as qe,Ii as Je,Il as Ye,Io as Xe,Ir as Ze,Iu as Qe,Ja as $e,Jc as et,Jd as tt,Jl as nt,Jo as rt,Jr as it,Js as at,Ju as ot,Kc as st,Kd as ct,Ki as lt,Kl as ut,Ko as dt,Kr as ft,Ks as pt,Ku as mt,La as ht,Lc as gt,Ld as _t,Li as vt,Ll as yt,Lo as bt,Lr as xt,Lu as St,Mc as Ct,Md as wt,Mf as Tt,Ml as Et,Mo as Dt,Mr as Ot,Mu as kt,Nc as At,Nd as jt,Nl as Mt,Nr as Nt,Nu as Pt,Oa as Ft,Oc as It,Od as Lt,Of as Rt,Ol as E,Oo as zt,Ou as Bt,Pc as Vt,Pd as Ht,Pi as Ut,Pl as Wt,Po as Gt,Pr as Kt,Pu as qt,Qc as Jt,Qd as Yt,Qi as Xt,Ql as Zt,Qn as Qt,Qo as $t,Qr as en,Qs as tn,Qu as nn,Ra as rn,Rc as an,Rd as on,Ri as sn,Rl as cn,Ro as ln,Rr as un,Ru as dn,S as fn,Sa as pn,Sc as mn,Sd as hn,Sf as gn,Sl as _n,So as vn,Su as yn,Tc as bn,Td as xn,Tf as Sn,Tl as Cn,To as wn,Tu as D,Uc as O,Ud as k,Ui as Tn,Ul as En,Uo as Dn,Ur as On,Uu as A,Vc as kn,Vd as An,Vi as jn,Vl as Mn,Vo as Nn,Vr as Pn,Vs as Fn,Vu as In,Wc as Ln,Wd as Rn,Wi as zn,Wl as Bn,Wo as Vn,Wr as Hn,Ws as Un,Wu as Wn,Xc as Gn,Xd as Kn,Xi as qn,Xl as Jn,Xo as Yn,Xr as Xn,Xs as Zn,Xu as Qn,Y as $n,Ya as er,Yc as tr,Yd as nr,Yi as rr,Yl as ir,Yo as ar,Yr as or,Ys as sr,Yu as cr,Zc as lr,Zd as ur,Zi as dr,Zl as fr,Zo as pr,Zr as mr,Zs as hr,Zu as gr,_ as _r,_a as j,_c as vr,_d as M,_f as yr,_l as br,_o as xr,_u as Sr,a as Cr,aa as wr,ac as Tr,ad as Er,af as Dr,al as Or,ao as kr,as as Ar,au as jr,b as Mr,ba as Nr,bc as Pr,bd as Fr,bf as Ir,bl as Lr,bo as N,bu as Rr,c as zr,ca as Br,cc as Vr,cd as Hr,cf as Ur,cl as Wr,co as Gr,cu as Kr,d as qr,da as Jr,dc as Yr,dd as Xr,df as Zr,dl as Qr,do as $r,du as ei,ec as ti,ed as ni,ef as P,ei as ri,el as ii,er as ai,es as oi,eu as si,f as ci,fa as li,fc as ui,fd as di,ff as fi,fl as pi,fo as mi,fu as hi,g as gi,ga as F,gc as _i,gd as vi,gf as yi,gl as bi,go as xi,gu as Si,h as Ci,ha as wi,hc as Ti,hd as Ei,hf as Di,hl as Oi,ho as ki,hu as Ai,i as ji,ia as Mi,ic as Ni,id as Pi,if as Fi,ii as Ii,il as I,io as Li,ir as Ri,is as zi,iu as Bi,jc as Vi,jd as Hi,jf as Ui,jl as Wi,jo as Gi,jr as Ki,ju as qi,ka as Ji,kc as Yi,kd as Xi,kf as Zi,kl as Qi,ko as $i,kr as ea,ku as ta,l as na,la as ra,lc as ia,ld as aa,lf as oa,li as sa,ll as ca,lo as la,lu as ua,m as L,ma as da,mc as fa,md as pa,mf as ma,ml as ha,mo as ga,mu as _a,n as va,nc as ya,nd as ba,nf as xa,ni as Sa,nl as Ca,ns as wa,nu as Ta,o as Ea,oa as Da,oc as Oa,od as ka,of as Aa,oi as ja,ol as Ma,oo as Na,os as Pa,ou as Fa,p as Ia,pa as R,pc as La,pd as Ra,pf as za,pl as Ba,po as Va,pu as Ha,qa as Ua,qc as Wa,qd as Ga,qi as Ka,ql as qa,qo as Ja,qr as Ya,qs as Xa,qu as Za,r as Qa,ra as $a,rc as eo,rd as to,rf as no,ri as ro,rl as io,ro as ao,rr as z,rs as oo,ru as so,s as co,sa as lo,sc as uo,sd as fo,sf as po,si as mo,sl as ho,so as go,su as _o,tc as vo,td as yo,tf as bo,ti as xo,tl as So,tr as B,ts as Co,tt as V,tu as wo,u as To,ua as Eo,uc as Do,ud as Oo,uf as ko,ul as Ao,uu as jo,v as Mo,va as H,vc as No,vd as Po,vf as Fo,vl as Io,vo as Lo,vr as Ro,vu as zo,wa as Bo,wc as Vo,wd as Ho,wf as Uo,wl as Wo,wo as Go,wu as Ko,x as qo,xa as Jo,xc as Yo,xd as Xo,xf as Zo,xl as Qo,xo as $o,xu as es,y as ts,yc as ns,yd as rs,yf as is,yl as as,yo as os,yu as ss,za as cs,zc as ls,zd as us,zi as ds,zl as fs,zo as ps,zr as ms,zu as hs}from"./_chunks/src-sZY6a2LC.js";import{constants as gs,createContext as _s,runInContext as vs}from"node:vm";import*as U from"node:diagnostics_channel";let W=null;function targets(){let e=/* @__PURE__ */ new Set,t=z();for(let n in t){let r=t[n];if(r===null||typeof r!=`object`&&typeof r!=`function`)continue;e.add(r);let i=r.prototype;typeof r==`function`&&typeof i==`object`&&i&&e.add(i)}return e.add(B.prototype),[...e]}function snapshot(e){let t=/* @__PURE__ */ new Map;for(let n of Reflect.ownKeys(e))t.set(n,Object.getOwnPropertyDescriptor(e,n));return t}let G=null;function captureInterfaceBaseline(){if(W===null){W=/* @__PURE__ */ new Map,G=/* @__PURE__ */ new WeakSet;for(let e of targets())W.set(e,snapshot(e)),G.add(e);ownObjectCreateMaps()}}let ys=null;function ownObjectCreateMaps(){if(W===null)return;let e=ys??=vs(`(prototypes) => prototypes.map((p) => Object.create(p))`,_s(gs.DONT_CONTEXTIFY)),t=[Object.prototype];for(let e of W.keys())typeof e!=`function`&&t.push(e);e(t)}function configurableDescriptor(e){return typeof e==`object`&&e&&e.configurable!==!0?{...e,configurable:!0}:e}function guardInterfaceDefinitions(e){let t=G;if(t===null)return;let n=e.Object,r=e.Reflect,i=n.defineProperty,a=n.defineProperties,o=r.defineProperty,s={defineProperty(e,n,r){return i(e,n,t.has(e)?configurableDescriptor(r):r)},defineProperties(e,n){if(!t.has(e)||typeof n!=`object`||!n)return a(e,n);let r={};for(let e of Reflect.ownKeys(n))Object.getOwnPropertyDescriptor(n,e)?.enumerable&&(r[e]=configurableDescriptor(n[e]));return a(e,r)},reflectDefineProperty(e,n,r){return o(e,n,t.has(e)?configurableDescriptor(r):r)}};Object.defineProperty(s.reflectDefineProperty,"name",{value:`defineProperty`}),Object.defineProperty(n,"defineProperty",{value:s.defineProperty,writable:!0,configurable:!0,enumerable:!1}),Object.defineProperty(n,"defineProperties",{value:s.defineProperties,writable:!0,configurable:!0,enumerable:!1}),Object.defineProperty(r,"defineProperty",{value:s.reflectDefineProperty,writable:!0,configurable:!0,enumerable:!1})}function isArrayIndex(e){if(typeof e!=`string`||e===``||e.length>10)return!1;let t=Number(e);return t>>>0===t&&t!==4294967295&&String(t)===e}function sameDescriptor(e,t){return e.value===t.value&&e.get===t.get&&e.set===t.set&&e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable}function restoreInterfaces(){if(W===null)return 0;let e=0;for(let[t,n]of W){let r=Reflect.ownKeys(t);for(let i of r)n.has(i)||isArrayIndex(i)||Reflect.deleteProperty(t,i)&&e++;for(let[r,i]of n){if(isArrayIndex(r))continue;let n=Object.getOwnPropertyDescriptor(t,r);if(!(n!==void 0&&sameDescriptor(n,i)))try{Object.defineProperty(t,r,i),e++}catch{}}}return ownObjectCreateMaps(),e}const K=`ctrl-dom:span`,q=typeof U.tracingChannel==`function`?U.tracingChannel(K):null;function spanChannel(){return q}function tracing(){return q!==null&&q.hasSubscribers}function traceSync(e,t,n){let r={op:e,description:t,data:{},async:!1},i=w();return q.traceSync(e=>{try{return n(e)}finally{recordSkipped(e,i)}},r,void 0,r)}function tracePromise(e,t,n){let r={op:e,description:t,data:{},async:!0},i=w();return q.tracePromise(e=>n(e).finally(()=>recordSkipped(e,i)),r,void 0,r)}function recordSkipped(e,t){let n=w()-t;n>0&&(e.data[`clock.skipped_ms`]=Math.round(n))}function describeCall(e,t){let n=`${e}(`;for(let e=0;e<t.length&&(t[e]!==void 0||e!==t.length-1);e++)if(n+=(e>0?`, `:``)+describeValue(t[e],0),n.length>160)return`${n.slice(0,159)}…)`;return`${n})`}function describeValue(e,t){if(typeof e==`string`)return JSON.stringify(e.length>40?`${e.slice(0,39)}…`:e);if(typeof e==`function`)return e.name?`${e.name}()`:`fn`;if(e instanceof RegExp||typeof e!=`object`||!e)return String(e);if(e[E]!==void 0)return describeNode(e);if(Array.isArray(e))return t>0?`[…]`:`[${e.slice(0,3).map(e=>describeValue(e,t+1)).join(`, `)}${e.length>3?`, …`:``}]`;if(t>0)return`{…}`;let n=Object.entries(e).slice(0,4);return n.length===0?`{}`:`{ ${n.map(([e,n])=>`${e}: ${describeValue(n,t+1)}`).join(`, `)} }`}let J=null;function setNodeDescriber(e){J=e}function describeNode(e){let t=e;if(t.nodeType===9)return`document`;if(t.nodeType!==1||typeof t.localName!=`string`)return t.nodeType===3?`#text`:`node`;if(J!==null)try{let t=J(e);if(t)return t}catch{}if(t.localName===`body`||t.localName===`html`)return`<${t.localName}>`;let n=t.getAttribute?.(`aria-label`)||t.textContent?.trim().replace(/\s+/g,` `)||t.getAttribute?.(`placeholder`)||t.getAttribute?.(`name`)||``;return n===``?`<${t.localName}>`:`<${t.localName} ${quote(n)}>`}function quote(e){return JSON.stringify(e.length>40?`${e.slice(0,39)}…`:e)}const Y=`sentry-tests:failure`;let X=null;function setFailureSnapshot(e){X=e}function subscribeTestFailures(e){let t=U.channel(Y),onFailure=t=>{let n=t,r=e();if(r==null||n.document!==r)return;let i=k();if(i!==null&&(n.contexts.clock={skipped_ms:Math.round(i.skippedMs),pending_timers:i.pendingTimers}),X!==null&&r.body!=null)try{n.attachments.push({filename:`accessibility-snapshot.txt`,contentType:`text/plain`,data:X(r.body)})}catch{}};return t.subscribe(onFailure),()=>t.unsubscribe(onFailure)}function implOf(e){return e[E]??e}function isTypingType(e){return F(e)||e===12||e>=7&&e<=11}function isEditable(e){let t=implOf(e);return t.tag===N.input?isTypingType(R(t))&&L(t):t.tag===N.textarea?L(t):Kt(t)}function supportsSelection(e){let t=implOf(e);return t.tag===N.textarea||t.tag===N.input&&j(R(t))}function hasUIValue(e){let t=implOf(e);return t.tag===N.textarea||t.tag===N.input&&H(R(t))===0}function getUIValue(e){let t=implOf(e);if(t.tag===N.input){let e=t.node;return e[M]??e.value}return t.tag===N.textarea?t.node.value:``}function setUIValue(t,n){let r=implOf(t);if(r.tag===N.input){let t=r.node,i=R(r);if(H(i)!==0)return;let a=e(i,n,r);r.doc[d]++,t[f]=a,t[S]=!0,t[u]=!0,t[M]=a===n?null:n,t[o]=a===``&&n!==``&&i!==5&&!F(i);let s=n.length;t[C]>s&&(t[C]=s),t[A]>s&&(t[A]=s)}else if(r.tag===N.textarea){let e=r.node;r.doc[d]++,e[D]=n,e[S]=!0,e[u]=!0}}function clearUIValue(e){let t=implOf(e);if(t.tag===N.input){let e=t.node;e[M]=null,e[o]=!1}}function getUISelection(e){let t=implOf(e).node,n=getUIValue(e).length;return{start:Math.min(t[C],n),end:Math.min(t[A],n),direction:t[T]}}function setUISelection(e,t,n=t,r=`none`){let i=implOf(e);if(i.tag!==N.input&&i.tag!==N.textarea)return;let a=i.node,o=getUIValue(e).length,s=Math.max(0,Math.min(t,n)),c=Math.max(t,n);c>o&&(c=o),s>c&&(s=c),a[C]=s,a[A]=c,a[T]=r}function setFilesFromUI(e,t){let n=implOf(e);n.tag===N.input&&R(n)===17&&(n.doc[d]++,n.node[I]=V(t))}function setOptionSelectedFromUI(e,t){let n=implOf(e);if(n.tag!==N.option)return;let r=n.node;r._setSelectedness(t),r[O]=!0;let i=$n(n);if(i!==null){let e=i.node;t&&e._deselectOthers(n),e._updateSelectedContent()}}function setCheckedFromUI(e,t){let n=implOf(e);n.tag===N.input&&n.node._setCheckedness(t,!0)}const bs=B.prototype.getComputedStyle;let Z=null,Q=null,$=null;function getComputedStyleOverride(e){let t=e.doc.defaultView;if(t==null)return null;let n=t.getComputedStyle;if(n===bs||typeof n!=`function`||Ge.has(n))return null;if(Q?.deref()===n&&Z?.deref()===t){let e=$.deref();if(e!==void 0)return e}let r=n.bind(t);return Z=new WeakRef(t),Q=new WeakRef(n),$=new WeakRef(r),r}export{pt as $_proto__,Xa as $aboutBase,at as $active,sr as $assocGen,Zn as $attr,hr as $attributes,tn as $availableToElementInternals,o as $badInput,ti as $baseFor,vo as $baseOverride,ya as $baseURL,eo as $baseVersion,Ni as $block,Tr as $byCtor,Oa as $byName,uo as $cache,Vr as $callback,ia as $checked,Do as $checkedSet,Yr as $childNodes,ui as $childWindows,La as $children,fa as $classList,Ti as $clipboard,_i as $clonable,vr as $closed,No as $coll,ns as $compiled,Pr as $compiledFor,Yo as $condition,mn as $constructed,he as $constructingEntryList,Vo as $contentType,bn as $controlsCache,Oe as $controlsDoc,xe as $controlsVersion,It as $cookieJar,Yi as $cookies,c as $css,Vi as $current,Ct as $customElements,At as $customValidity,Vt as $cx,h as $data,Ke as $dataset,gt as $declarative,an as $defaultNamespace,ls as $defaultValueOverride,oe as $delegatesFocus,kn as $derived,ze as $devicePixelRatio,O as $dirtiness,Ln as $dirtyChecked,S as $dirtyValue,st as $disabled,Wa as $disallowModification,et as $doc,tr as $dropEffect,Gn as $ec,lr as $effectAllowed,Jt as $el,t as $elements,ii as $entries,So as $eo,Ca as $error,io as $file,I as $files,Or as $fill,Ma as $filter,ho as $firingSubmissionEvents,Wr as $focused,ca as $form,Ao as $forms,Qr as $frameCallbacks,pi as $frameElement,Ba as $frameId,ha as $frameTask,Oi as $frameTime,bi as $generation,br as $globalObject,Io as $hasTransients,as as $height,Lr as $history,Qo as $home,_n as $host,_e as $href,Wo as $id,Cn as $idleCallbacks,Ae as $idleId,Ce as $ids,E as $impl,Qi as $implementation,ne as $indeterminate,Wi as $index,Et as $indexed,Mt as $inflight,Wt as $info,v as $innerHeight,Ye as $innerWidth,yt as $is2D,cn as $isHTML,fs as $items,le as $keyText,Mn as $kind,Ve as $labels,En as $layerName,Bn as $list,Pe as $listeners,ut as $localStorage,qa as $location,nt as $lockedForReset,ir as $m,Jn as $matches,fr as $media,Zt as $mediaQueryLists,r as $mode,si as $name,wo as $names,Ta as $namespaces,so as $navigator,Bi as $nodes,jr as $onchange,Fa as $options,_o as $owner,Kr as $ownerNode,ua as $ownerRule,jo as $parent,ei as $parentRule,hi as $parentWindow,Ha as $pastNames,_a as $pointerBeforeReference,Ai as $preApplied,Si as $preChecked,Sr as $preCheckedRadio,zo as $preIndeterminate,ss as $prefix,Rr as $prelude,es as $presentationStyle,yn as $pseudo,ye as $queries,Ko as $ranges,D as $rawValue,m as $readonly,Ee as $readyState,Bt as $record,ta as $records,ie as $rects,qi as $reference,kt as $result,Pt as $root,qt as $rules,x as $running,Qe as $runningFrame,St as $sc,dn as $screen,hs as $scrollRestoration,fe as $scrollX,In as $scrollY,T as $selDir,A as $selEnd,Wn as $selSet,C as $selStart,mt as $selectedOptions,Za as $selectedness,ot as $selection,cr as $selector,Qn as $serializable,gr as $sessionStorage,nn as $settled,s as $shadowRoot,ni as $shed,yo as $sheet,ba as $sheets,to as $slotAssignment,Pi as $so,Er as $states,ka as $style,fo as $styleVersion,Hr as $supportsText,aa as $systemId,Oo as $target,Xr as $targets,di as $tasks,Ra as $timers,pa as $title,Ei as $type,vi as $types,M as $uiValue,Po as $updating,rs as $updatingSelectedContent,Fr as $uri,Xo as $url,hn as $userActivation,u as $userEdited,Ho as $userValidity,xn as $validity,f as $value,d as $version,Lt as $visualViewport,Xi as $w,ee as $whatToShow,Hi as $whenDefined,wt as $width,jt as $window,Ht as $writeBuffer,g as $x,qe as $xhr,_t as $y,on as $z,nr as ATTRIBUTE_NODE,pr as AttrRecord,Kn as CDATA_SECTION_NODE,ur as COMMENT_NODE,jn as COMPAT,Be as COMPAT_PROFILES,Tn as DEFAULT_COMPAT,Yt as DOCUMENT_FRAGMENT_NODE,n as DOCUMENT_NODE,P as DOCUMENT_POSITION_CONTAINED_BY,bo as DOCUMENT_POSITION_CONTAINS,xa as DOCUMENT_POSITION_DISCONNECTED,no as DOCUMENT_POSITION_FOLLOWING,Fi as DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC,Dr as DOCUMENT_POSITION_PRECEDING,Aa as DOCUMENT_TYPE_NODE,rr as DeclBlock,po as ELEMENT_NODE,Ur as ENTITY_NODE,oa as ENTITY_REFERENCE_NODE,Un as EventState,Y as FAILURE_CHANNEL,ko as F_ADOPT_HOOK,Zr as F_ATTR_HOOK,fi as F_CE_CUSTOM,za as F_CHILDREN_HOOK,ma as F_CHILD_LIST,Di as F_CONNECTED,yi as F_CONNECT_HOOK,yr as F_CUSTOM,Fo as F_FACE,is as F_HAS_SHADOW,Ir as F_HAS_STYLE_ATTR,Zo as F_HTML,gn as F_MO_REGISTERED,ge as F_SHADOW_ROOT,Nr as GLOBAL_EVENT_HANDLER_EVENTS,ao as HTMLCollection,Uo as HTML_NS,li as INPUT_TYPE_NAMES,Sn as MATHML_NS,ke as NOTATION_NODE,Je as NodeCache,$t as NodeImpl,Gt as NodeList,Se as PROCESSING_INSTRUCTION_NODE,K as SPAN_CHANNEL,Rt as SVG_NS,N as T,Zi as TEXT_NODE,us as VirtualClock,se as VirtualTimeout,Jo as WINDOW_EVENT_HANDLER_EVENTS,te as XLINK_NS,Ui as XMLNS_NS,Tt as XML_NS,mr as adoptedStyleSheetsOf,ve as asciiLowercase,ga as assignManually,ki as assignedElements,xi as assignedNodes,xr as assignedSlot,De as attachShadowRoot,Go as attr,Qt as attrAssociatedElement,i as attrAssociatedElements,Re as attrNode,captureInterfaceBaseline,ps as childAt,wn as classTokens,clearUIValue,An as clockNow,k as clockStats,Na as closest,p as compareBoundaryPoints,zn as compatExposes,un as computedDisplay,ms as computedValue,de as computedVisibility,ea as constructEntryList,va as controlValue,Ro as createEvent,V as createFileList,en as createLinkSheet,Pn as currentStyleVersion,re as defaultButton,Ne as deferredCompatMembers,bt as derivedCache,describeCall,describeNode,oi as dispatch,sn as dispatchTrusted,Li as ensureCollectionIndexGetters,y as ensureIndexGetters,ja as evaluateMediaQueryList,dr as faceState,Lo as findFlattenedSlottables,os as findSlot,ds as fireAnEvent,ce as fireSyntheticPointerEvent,ue as firstElementChild,Rn as foreignImmediatesPending,Mi as formOwner,je as getAttribute,xt as getComputedStyle,getComputedStyleOverride,Co as getCurrentEvent,be as getElementsByClassName,Ft as getElementsByTagName,Ji as getElementsByTagNameNS,pn as getEventHandler,getUISelection,getUIValue,guardInterfaceDefinitions,we as hasAttr,Ue as hasAuthorStyles,ai as hasExplicitAttrElements,Fn as hasListeners,Qa as hasReadonlyAttribute,hasUIValue,lt as hiddenGlobals,Ki as implicitSubmission,Xe as indexGetterTable,Nn as indexOf,ji as inputChecked,Cr as inputIndeterminate,R as inputType,da as inputTypeFromAttr,$r as inspectNode,Me as installClock,me as installEventHandlers,wr as isActuallyDisabled,zt as isAsciiWhitespace,Ea as isAutofilled,co as isChecked,zr as isDefault,na as isDisabled,On as isDisplayNone,Hn as isDisplayNoneInclusive,isEditable as isEditableControl,To as isEnabled,Xt as isFACE,qr as isInRange,He as isInclusiveAncestor,ci as isIndeterminate,Ia as isInvalid,Da as isLabelable,lo as isListed,L as isMutable,wi as isNumericType,Ci as isOptional,gi as isOutOfRange,_r as isPlaceholderShown,Mo as isReadOnly,ts as isReadWrite,Mr as isRequired,Br as isResettable,Ot as isSubmitButton,ra as isSubmittable,qo as isTextControl,F as isTextualType,fn as isValid,ht as isValidDoctypeName,rn as isValidElementLocalName,cs as isValidNamespacePrefix,Ie as isVisibilityHidden,Eo as labeledControl,Jr as labelsFor,Dn as lastElementChild,$a as listOfOptions,Ut as matchMediaText,go as matches,mo as mediaEnvironment,Vn as nextElementInTree,Fe as nextElementSibling,dt as nextInTree,Ja as nextSkippingChildren,vt as nodeCache,wa as nodeGetTheParent,Te as nodeLength,Dt as notifyMutationObservers,pe as optionSelected,qn as parseDeclBlock,er as parseFragment,_ as parseMediaQueryList,ln as peekDerivedCache,ft as pointerEvents,Ya as pointerEventsNone,rt as previousElementSibling,ar as previousInTree,it as pseudoContent,Gr as querySelector,la as querySelectorAll,quote,ri as registerOwnerSheet,We as removeAllEventListeners,$i as removeAttribute,xo as removeOwnerSheet,mi as replaceData,Ar as reportException,Ka as resolveCompat,restoreInterfaces,oo as retarget,Ua as serializeChildren,$e as serializeNode,Sa as setAdoptedStyleSheets,zi as setAssignedSlotLookup,l as setAttribute,setCheckedFromUI,or as setComputedColorMode,Bo as setEventHandler,setFailureSnapshot,setFilesFromUI,setNodeDescriber,Nt as setNotImplementedHandler,setOptionSelectedFromUI,Le as setTrusted,setUISelection,setUIValue,Pa as setUncaughtExceptionHandler,ct as skipIdleTime,spanChannel,Gi as splitOnAsciiWhitespace,Va as splitText,b as styleElementRemoved,a as styleElementSheet,Ze as styleElementUpdated,ro as styleSheetsOf,subscribeTestFailures,supportsSelection,j as supportsSelectionType,$o as tagId,vn as tagName,tracePromise,traceSync,tracing,Ri as trackGlobalTimers,Yn as treeRoot,Xn as uaDisplay,Ii as unregisterOwnerSheet,ae as validateAndExtract,H as valueMode,Ga as virtualDate,tt as virtualPerformance,sa as windowHooks,z as windowInterfaces,kr as withNamedProperties};
@@ -149,9 +149,9 @@ export declare function skipIdleTime(ms: number): boolean;
149
149
  /**
150
150
  * Whether immediates other than the active clock's own are queued: work that still has to run
151
151
  * before the event loop goes idle, such as React's scheduler continuing a render that ran past its
152
- * 5 ms slice. Without a clock every queued immediate counts; null when the host cannot tell.
152
+ * 5 ms slice. Without a clock every queued immediate counts.
153
153
  */
154
- export declare function foreignImmediatesPending(): boolean | null;
154
+ export declare function foreignImmediatesPending(): boolean;
155
155
  /** Milliseconds the active clock has skipped (0 without one): what a traced span reads at start and end. */
156
156
  export declare function clockSkipped(): number;
157
157
  /** The active clock's skipped time and pending timers (for test observability), or null without one. */