{"version":3,"file":"index-BoenezD8.cjs","sources":["../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/utils/misc/isElementType.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/utils/misc/getWindow.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/utils/dataTransfer/Blob.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/utils/dataTransfer/FileList.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/utils/dataTransfer/DataTransfer.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/utils/dataTransfer/Clipboard.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/utils/focus/selector.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/utils/focus/isFocusable.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/utils/misc/cloneEvent.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/utils/misc/isDisabled.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/utils/focus/getActiveElement.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/utils/misc/findClosest.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/utils/edit/isContentEditable.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/utils/click/isClickableInput.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/utils/edit/isEditable.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/utils/focus/selection.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/event/selection/updateSelectionOnFocus.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/event/wrapEvent.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/event/focus.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/event/behavior/registry.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/event/behavior/click.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/document/UI.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/utils/edit/timeValue.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/utils/edit/maxLength.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/utils/focus/cursor.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/document/trackValue.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/event/selection/getTargetTypeAndSelection.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/event/selection/getInputRange.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/event/selection/setSelection.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/event/input.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/event/behavior/cut.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/document/getValueOrTextContent.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/utils/misc/isVisible.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/utils/focus/getTabDestination.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/event/selection/moveSelection.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/event/selection/selectAll.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/event/selection/setSelectionRange.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/event/radio.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/event/behavior/keydown.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/event/behavior/keypress.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/event/behavior/keyup.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/event/behavior/paste.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/event/eventMap.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/event/createEvent.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/event/dispatchEvent.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/document/patchFocus.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/document/interceptor.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/document/prepareDocument.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/utils/misc/getDocumentFromNode.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/utils/misc/level.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/utils/misc/wait.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/options.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/system/keyboard.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/keyboard/keyMap.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/pointer/keyMap.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/system/pointer/buttons.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/system/pointer/device.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/utils/misc/getTreeDiff.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/event/selection/resolveCaretPosition.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/event/selection/setSelectionPerMouse.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/event/selection/modifySelectionPerMouse.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/system/pointer/shared.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/system/pointer/mouse.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/utils/pointer/cssPointerEvents.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/system/pointer/pointer.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/system/pointer/index.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/system/index.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/convenience/click.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/convenience/hover.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/convenience/tab.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/utils/keyDef/readNextDescriptor.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/keyboard/parseKeyDef.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/keyboard/index.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/document/copySelection.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/clipboard/copy.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/clipboard/cut.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/clipboard/paste.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/pointer/parseKeyDef.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/pointer/index.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/utility/clear.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/utility/selectOptions.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/utility/type.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/utils/edit/setFiles.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/utility/upload.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/setup/api.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/setup/wrapAsync.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/setup/setup.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/setup/directApi.js","../node_modules/.pnpm/@testing-library+user-event@14.6.1_@testing-library+dom@10.4.1/node_modules/@testing-library/user-event/dist/esm/setup/index.js"],"sourcesContent":["function isElementType(element, tag, props) {\n    if (element.namespaceURI && element.namespaceURI !== 'http://www.w3.org/1999/xhtml') {\n        return false;\n    }\n    tag = Array.isArray(tag) ? tag : [\n        tag\n    ];\n    // tagName is uppercase in HTMLDocument and lowercase in XMLDocument\n    if (!tag.includes(element.tagName.toLowerCase())) {\n        return false;\n    }\n    if (props) {\n        return Object.entries(props).every(([k, v])=>element[k] === v);\n    }\n    return true;\n}\n\nexport { isElementType };\n","function getWindow(node) {\n    var _node_ownerDocument;\n    if (isDocument(node) && node.defaultView) {\n        return node.defaultView;\n    } else if ((_node_ownerDocument = node.ownerDocument) === null || _node_ownerDocument === undefined ? undefined : _node_ownerDocument.defaultView) {\n        return node.ownerDocument.defaultView;\n    }\n    throw new Error(`Could not determine window of node. Node was ${describe(node)}`);\n}\nfunction isDocument(node) {\n    return node.nodeType === 9;\n}\nfunction describe(val) {\n    return typeof val === 'function' ? `function ${val.name}` : val === null ? 'null' : String(val);\n}\n\nexport { getWindow };\n","// jsdom does not implement Blob.text()\nfunction readBlobText(blob, FileReader) {\n    return new Promise((res, rej)=>{\n        const fr = new FileReader();\n        fr.onerror = rej;\n        fr.onabort = rej;\n        fr.onload = ()=>{\n            res(String(fr.result));\n        };\n        fr.readAsText(blob);\n    });\n}\n\nexport { readBlobText };\n","// FileList can not be created per constructor.\nfunction createFileList(window, files) {\n    const list = {\n        ...files,\n        length: files.length,\n        item: (index)=>list[index],\n        [Symbol.iterator]: function* nextFile() {\n            for(let i = 0; i < list.length; i++){\n                yield list[i];\n            }\n        }\n    };\n    list.constructor = window.FileList;\n    // guard for environments without FileList\n    /* istanbul ignore else */ if (window.FileList) {\n        Object.setPrototypeOf(list, window.FileList.prototype);\n    }\n    Object.freeze(list);\n    return list;\n}\n\nexport { createFileList };\n","import { createFileList } from './FileList.js';\n\nfunction _define_property(obj, key, value) {\n    if (key in obj) {\n        Object.defineProperty(obj, key, {\n            value: value,\n            enumerable: true,\n            configurable: true,\n            writable: true\n        });\n    } else {\n        obj[key] = value;\n    }\n    return obj;\n}\n// DataTransfer is not implemented in jsdom.\n// DataTransfer with FileList is being created by the browser on certain events.\nclass DataTransferItemStub {\n    getAsFile() {\n        return this.file;\n    }\n    getAsString(callback) {\n        if (typeof this.data === 'string') {\n            callback(this.data);\n        }\n    }\n    /* istanbul ignore next */ webkitGetAsEntry() {\n        throw new Error('not implemented');\n    }\n    constructor(dataOrFile, type){\n        _define_property(this, \"kind\", undefined);\n        _define_property(this, \"type\", undefined);\n        _define_property(this, \"file\", null);\n        _define_property(this, \"data\", undefined);\n        if (typeof dataOrFile === 'string') {\n            this.kind = 'string';\n            this.type = String(type);\n            this.data = dataOrFile;\n        } else {\n            this.kind = 'file';\n            this.type = dataOrFile.type;\n            this.file = dataOrFile;\n        }\n    }\n}\nclass DataTransferItemListStub extends Array {\n    add(...args) {\n        const item = new DataTransferItemStub(args[0], args[1]);\n        this.push(item);\n        return item;\n    }\n    clear() {\n        this.splice(0, this.length);\n    }\n    remove(index) {\n        this.splice(index, 1);\n    }\n}\nfunction getTypeMatcher(type, exact) {\n    const [group, sub] = type.split('/');\n    const isGroup = !sub || sub === '*';\n    return (item)=>{\n        return exact ? item.type === (isGroup ? group : type) : isGroup ? item.type.startsWith(`${group}/`) : item.type === group;\n    };\n}\nfunction createDataTransferStub(window) {\n    return new class DataTransferStub {\n        getData(format) {\n            var _this_items_find;\n            const match = (_this_items_find = this.items.find(getTypeMatcher(format, true))) !== null && _this_items_find !== undefined ? _this_items_find : this.items.find(getTypeMatcher(format, false));\n            let text = '';\n            match === null || match === undefined ? undefined : match.getAsString((t)=>{\n                text = t;\n            });\n            return text;\n        }\n        setData(format, data) {\n            const matchIndex = this.items.findIndex(getTypeMatcher(format, true));\n            const item = new DataTransferItemStub(data, format);\n            if (matchIndex >= 0) {\n                this.items.splice(matchIndex, 1, item);\n            } else {\n                this.items.push(item);\n            }\n        }\n        clearData(format) {\n            if (format) {\n                const matchIndex = this.items.findIndex(getTypeMatcher(format, true));\n                if (matchIndex >= 0) {\n                    this.items.remove(matchIndex);\n                }\n            } else {\n                this.items.clear();\n            }\n        }\n        get types() {\n            const t = [];\n            if (this.files.length) {\n                t.push('Files');\n            }\n            this.items.forEach((i)=>t.push(i.type));\n            Object.freeze(t);\n            return t;\n        }\n        /* istanbul ignore next */ setDragImage() {}\n        constructor(){\n            _define_property(this, \"dropEffect\", 'none');\n            _define_property(this, \"effectAllowed\", 'uninitialized');\n            _define_property(this, \"items\", new DataTransferItemListStub());\n            _define_property(this, \"files\", createFileList(window, []));\n        }\n    }();\n}\nfunction createDataTransfer(window, files = []) {\n    // Use real DataTransfer if available\n    const dt = typeof window.DataTransfer === 'undefined' ? createDataTransferStub(window) : /* istanbul ignore next */ new window.DataTransfer();\n    Object.defineProperty(dt, 'files', {\n        get: ()=>createFileList(window, files)\n    });\n    return dt;\n}\nasync function getBlobFromDataTransferItem(window, item) {\n    if (item.kind === 'file') {\n        return item.getAsFile();\n    }\n    return new window.Blob([\n        await new Promise((r)=>item.getAsString(r))\n    ], {\n        type: item.type\n    });\n}\n\nexport { createDataTransfer, getBlobFromDataTransferItem };\n","import { getWindow } from '../misc/getWindow.js';\nimport { readBlobText } from './Blob.js';\nimport { createDataTransfer, getBlobFromDataTransferItem } from './DataTransfer.js';\n\n// Clipboard is not available in jsdom\nfunction _define_property(obj, key, value) {\n    if (key in obj) {\n        Object.defineProperty(obj, key, {\n            value: value,\n            enumerable: true,\n            configurable: true,\n            writable: true\n        });\n    } else {\n        obj[key] = value;\n    }\n    return obj;\n}\n// MDN lists string|Blob|Promise<Blob|string> as possible types in ClipboardItemData\n// lib.dom.d.ts lists only Promise<Blob|string>\n// https://developer.mozilla.org/en-US/docs/Web/API/ClipboardItem/ClipboardItem#syntax\nfunction createClipboardItem(window, ...blobs) {\n    const dataMap = Object.fromEntries(blobs.map((b)=>[\n            typeof b === 'string' ? 'text/plain' : b.type,\n            Promise.resolve(b)\n        ]));\n    // use real ClipboardItem if available\n    /* istanbul ignore if */ if (typeof window.ClipboardItem !== 'undefined') {\n        return new window.ClipboardItem(dataMap);\n    }\n    return new class ClipboardItem {\n        get types() {\n            return Array.from(Object.keys(this.data));\n        }\n        async getType(type) {\n            const value = await this.data[type];\n            if (!value) {\n                throw new Error(`${type} is not one of the available MIME types on this item.`);\n            }\n            return value instanceof window.Blob ? value : new window.Blob([\n                value\n            ], {\n                type\n            });\n        }\n        constructor(d){\n            _define_property(this, \"data\", undefined);\n            this.data = d;\n        }\n    }(dataMap);\n}\nconst ClipboardStubControl = Symbol('Manage ClipboardSub');\nfunction createClipboardStub(window, control) {\n    return Object.assign(new class Clipboard extends window.EventTarget {\n        async read() {\n            return Array.from(this.items);\n        }\n        async readText() {\n            let text = '';\n            for (const item of this.items){\n                const type = item.types.includes('text/plain') ? 'text/plain' : item.types.find((t)=>t.startsWith('text/'));\n                if (type) {\n                    text += await item.getType(type).then((b)=>readBlobText(b, window.FileReader));\n                }\n            }\n            return text;\n        }\n        async write(data) {\n            this.items = data;\n        }\n        async writeText(text) {\n            this.items = [\n                createClipboardItem(window, text)\n            ];\n        }\n        constructor(...args){\n            super(...args), _define_property(this, \"items\", []);\n        }\n    }(), {\n        [ClipboardStubControl]: control\n    });\n}\nfunction isClipboardStub(clipboard) {\n    return !!(clipboard === null || clipboard === undefined ? undefined : clipboard[ClipboardStubControl]);\n}\nfunction attachClipboardStubToView(window) {\n    if (isClipboardStub(window.navigator.clipboard)) {\n        return window.navigator.clipboard[ClipboardStubControl];\n    }\n    const realClipboard = Object.getOwnPropertyDescriptor(window.navigator, 'clipboard');\n    let stub;\n    const control = {\n        resetClipboardStub: ()=>{\n            stub = createClipboardStub(window, control);\n        },\n        detachClipboardStub: ()=>{\n            /* istanbul ignore if */ if (realClipboard) {\n                Object.defineProperty(window.navigator, 'clipboard', realClipboard);\n            } else {\n                Object.defineProperty(window.navigator, 'clipboard', {\n                    value: undefined,\n                    configurable: true\n                });\n            }\n        }\n    };\n    stub = createClipboardStub(window, control);\n    Object.defineProperty(window.navigator, 'clipboard', {\n        get: ()=>stub,\n        configurable: true\n    });\n    return stub[ClipboardStubControl];\n}\nfunction resetClipboardStubOnView(window) {\n    if (isClipboardStub(window.navigator.clipboard)) {\n        window.navigator.clipboard[ClipboardStubControl].resetClipboardStub();\n    }\n}\nfunction detachClipboardStubFromView(window) {\n    if (isClipboardStub(window.navigator.clipboard)) {\n        window.navigator.clipboard[ClipboardStubControl].detachClipboardStub();\n    }\n}\nasync function readDataTransferFromClipboard(document) {\n    const window = document.defaultView;\n    const clipboard = window === null || window === undefined ? undefined : window.navigator.clipboard;\n    const items = clipboard && await clipboard.read();\n    if (!items) {\n        throw new Error('The Clipboard API is unavailable.');\n    }\n    const dt = createDataTransfer(window);\n    for (const item of items){\n        for (const type of item.types){\n            dt.setData(type, await item.getType(type).then((b)=>readBlobText(b, window.FileReader)));\n        }\n    }\n    return dt;\n}\nasync function writeDataTransferToClipboard(document, clipboardData) {\n    const window = getWindow(document);\n    const clipboard = window.navigator.clipboard;\n    const items = [];\n    for(let i = 0; i < clipboardData.items.length; i++){\n        const dtItem = clipboardData.items[i];\n        const blob = await getBlobFromDataTransferItem(window, dtItem);\n        items.push(createClipboardItem(window, blob));\n    }\n    const written = clipboard && await clipboard.write(items).then(()=>true, // Can happen with other implementations that e.g. require permissions\n    /* istanbul ignore next */ ()=>false);\n    if (!written) {\n        throw new Error('The Clipboard API is unavailable.');\n    }\n}\nconst g = globalThis;\n/* istanbul ignore else */ if (typeof g.afterEach === 'function') {\n    g.afterEach(()=>resetClipboardStubOnView(globalThis.window));\n}\n/* istanbul ignore else */ if (typeof g.afterAll === 'function') {\n    g.afterAll(()=>detachClipboardStubFromView(globalThis.window));\n}\n\nexport { attachClipboardStubToView, createClipboardItem, detachClipboardStubFromView, readDataTransferFromClipboard, resetClipboardStubOnView, writeDataTransferToClipboard };\n","const FOCUSABLE_SELECTOR = [\n    'input:not([type=hidden]):not([disabled])',\n    'button:not([disabled])',\n    'select:not([disabled])',\n    'textarea:not([disabled])',\n    '[contenteditable=\"\"]',\n    '[contenteditable=\"true\"]',\n    'a[href]',\n    '[tabindex]:not([disabled])'\n].join(', ');\n\nexport { FOCUSABLE_SELECTOR };\n","import { FOCUSABLE_SELECTOR } from './selector.js';\n\nfunction isFocusable(element) {\n    return element.matches(FOCUSABLE_SELECTOR);\n}\n\nexport { isFocusable };\n","function cloneEvent(event) {\n    return new event.constructor(event.type, event);\n}\n\nexport { cloneEvent };\n","import { isElementType } from './isElementType.js';\n\n// This should probably just rely on the :disabled pseudo-class, but JSDOM doesn't implement it properly.\nfunction isDisabled(element) {\n    for(let el = element; el; el = el.parentElement){\n        if (isElementType(el, [\n            'button',\n            'input',\n            'select',\n            'textarea',\n            'optgroup',\n            'option'\n        ])) {\n            if (el.hasAttribute('disabled')) {\n                return true;\n            }\n        } else if (isElementType(el, 'fieldset')) {\n            var _el_querySelector;\n            if (el.hasAttribute('disabled') && !((_el_querySelector = el.querySelector(':scope > legend')) === null || _el_querySelector === undefined ? undefined : _el_querySelector.contains(element))) {\n                return true;\n            }\n        } else if (el.tagName.includes('-')) {\n            if (el.constructor.formAssociated && el.hasAttribute('disabled')) {\n                return true;\n            }\n        }\n    }\n    return false;\n}\n\nexport { isDisabled };\n","import { isDisabled } from '../misc/isDisabled.js';\n\nfunction getActiveElement(document) {\n    const activeElement = document.activeElement;\n    if (activeElement === null || activeElement === undefined ? undefined : activeElement.shadowRoot) {\n        return getActiveElement(activeElement.shadowRoot);\n    } else {\n        // Browser does not yield disabled elements as document.activeElement - jsdom does\n        if (isDisabled(activeElement)) {\n            return document.ownerDocument ? /* istanbul ignore next */ document.ownerDocument.body : document.body;\n        }\n        return activeElement;\n    }\n}\nfunction getActiveElementOrBody(document) {\n    var _getActiveElement;\n    return (_getActiveElement = getActiveElement(document)) !== null && _getActiveElement !== undefined ? _getActiveElement : /* istanbul ignore next */ document.body;\n}\n\nexport { getActiveElement, getActiveElementOrBody };\n","function findClosest(element, callback) {\n    let el = element;\n    do {\n        if (callback(el)) {\n            return el;\n        }\n        el = el.parentElement;\n    }while (el && el !== element.ownerDocument.body)\n    return undefined;\n}\n\nexport { findClosest };\n","//jsdom is not supporting isContentEditable\nfunction isContentEditable(element) {\n    return element.hasAttribute('contenteditable') && (element.getAttribute('contenteditable') == 'true' || element.getAttribute('contenteditable') == '');\n}\n/**\n * If a node is a contenteditable or inside one, return that element.\n */ function getContentEditable(node) {\n    const element = getElement(node);\n    return element && (element.closest('[contenteditable=\"\"]') || element.closest('[contenteditable=\"true\"]'));\n}\nfunction getElement(node) {\n    return node.nodeType === 1 ? node : node.parentElement;\n}\n\nexport { getContentEditable, isContentEditable };\n","import { isElementType } from '../misc/isElementType.js';\n\nvar clickableInputTypes = /*#__PURE__*/ function(clickableInputTypes) {\n    clickableInputTypes[\"button\"] = \"button\";\n    clickableInputTypes[\"color\"] = \"color\";\n    clickableInputTypes[\"file\"] = \"file\";\n    clickableInputTypes[\"image\"] = \"image\";\n    clickableInputTypes[\"reset\"] = \"reset\";\n    clickableInputTypes[\"submit\"] = \"submit\";\n    clickableInputTypes[\"checkbox\"] = \"checkbox\";\n    clickableInputTypes[\"radio\"] = \"radio\";\n    return clickableInputTypes;\n}(clickableInputTypes || {});\nfunction isClickableInput(element) {\n    return isElementType(element, 'button') || isElementType(element, 'input') && element.type in clickableInputTypes;\n}\n\nexport { isClickableInput };\n","import { isElementType } from '../misc/isElementType.js';\nimport { isContentEditable } from './isContentEditable.js';\n\nfunction isEditable(element) {\n    return isEditableInputOrTextArea(element) && !element.readOnly || isContentEditable(element);\n}\nvar editableInputTypes = /*#__PURE__*/ function(editableInputTypes) {\n    editableInputTypes[\"text\"] = \"text\";\n    editableInputTypes[\"date\"] = \"date\";\n    editableInputTypes[\"datetime-local\"] = \"datetime-local\";\n    editableInputTypes[\"email\"] = \"email\";\n    editableInputTypes[\"month\"] = \"month\";\n    editableInputTypes[\"number\"] = \"number\";\n    editableInputTypes[\"password\"] = \"password\";\n    editableInputTypes[\"search\"] = \"search\";\n    editableInputTypes[\"tel\"] = \"tel\";\n    editableInputTypes[\"time\"] = \"time\";\n    editableInputTypes[\"url\"] = \"url\";\n    editableInputTypes[\"week\"] = \"week\";\n    return editableInputTypes;\n}(editableInputTypes || {});\nfunction isEditableInputOrTextArea(element) {\n    return isElementType(element, 'textarea') || isElementType(element, 'input') && element.type in editableInputTypes;\n}\n\nexport { isEditable, isEditableInputOrTextArea };\n","import { isClickableInput } from '../click/isClickableInput.js';\nimport { isEditableInputOrTextArea } from '../edit/isEditable.js';\n\n/**\n * Determine if the element has its own selection implementation\n * and does not interact with the Document Selection API.\n */ function hasOwnSelection(node) {\n    return isElement(node) && isEditableInputOrTextArea(node);\n}\nfunction hasNoSelection(node) {\n    return isElement(node) && isClickableInput(node);\n}\nfunction isElement(node) {\n    return node.nodeType === 1;\n}\n\nexport { hasNoSelection, hasOwnSelection };\n","import '../../utils/dataTransfer/Clipboard.js';\nimport { getContentEditable } from '../../utils/edit/isContentEditable.js';\nimport { hasOwnSelection } from '../../utils/focus/selection.js';\n\n// The browser implementation seems to have changed.\n// When focus is inside <input type=\"text\"/>,\n// Chrome updates Selection to be collapsed at the position of the input element.\n// TODO: update implementation to match that of current browsers\n/**\n * Reset the Document Selection when moving focus into an element\n * with own selection implementation.\n */ function updateSelectionOnFocus(element) {\n    const selection = element.ownerDocument.getSelection();\n    /* istanbul ignore if */ if (!(selection === null || selection === undefined ? undefined : selection.focusNode)) {\n        return;\n    }\n    // If the focus moves inside an element with own selection implementation,\n    // the document selection will be this element.\n    // But if the focused element is inside a contenteditable,\n    // 1) a collapsed selection will be retained.\n    // 2) other selections will be replaced by a cursor\n    //  2.a) at the start of the first child if it is a text node\n    //  2.b) at the start of the contenteditable.\n    if (hasOwnSelection(element)) {\n        const contenteditable = getContentEditable(selection.focusNode);\n        if (contenteditable) {\n            if (!selection.isCollapsed) {\n                var _contenteditable_firstChild;\n                const focusNode = ((_contenteditable_firstChild = contenteditable.firstChild) === null || _contenteditable_firstChild === undefined ? undefined : _contenteditable_firstChild.nodeType) === 3 ? contenteditable.firstChild : contenteditable;\n                selection.setBaseAndExtent(focusNode, 0, focusNode, 0);\n            }\n        } else {\n            selection.setBaseAndExtent(element, 0, element, 0);\n        }\n    }\n}\n\nexport { updateSelectionOnFocus };\n","import { getConfig } from '@testing-library/dom';\n\nfunction wrapEvent(cb, _element) {\n    return getConfig().eventWrapper(cb);\n}\n\nexport { wrapEvent };\n","import '../utils/dataTransfer/Clipboard.js';\nimport { getActiveElement } from '../utils/focus/getActiveElement.js';\nimport { isFocusable } from '../utils/focus/isFocusable.js';\nimport { findClosest } from '../utils/misc/findClosest.js';\nimport { updateSelectionOnFocus } from './selection/updateSelectionOnFocus.js';\nimport { wrapEvent } from './wrapEvent.js';\n\n// Browsers do not dispatch FocusEvent if the document does not have focus.\n// TODO: simulate FocusEvent in browsers\n/**\n * Focus closest focusable element.\n */ function focusElement(element) {\n    const target = findClosest(element, isFocusable);\n    const activeElement = getActiveElement(element.ownerDocument);\n    if ((target !== null && target !== undefined ? target : element.ownerDocument.body) === activeElement) {\n        return;\n    } else if (target) {\n        wrapEvent(()=>target.focus());\n    } else {\n        wrapEvent(()=>activeElement === null || activeElement === undefined ? undefined : activeElement.blur());\n    }\n    updateSelectionOnFocus(target !== null && target !== undefined ? target : element.ownerDocument.body);\n}\nfunction blurElement(element) {\n    if (!isFocusable(element)) return;\n    const wasActive = getActiveElement(element.ownerDocument) === element;\n    if (!wasActive) return;\n    wrapEvent(()=>element.blur());\n}\n\nexport { blurElement, focusElement };\n","const behavior = {};\n\nexport { behavior };\n","import { isElementType } from '../../utils/misc/isElementType.js';\nimport '../../utils/dataTransfer/Clipboard.js';\nimport { getWindow } from '../../utils/misc/getWindow.js';\nimport { isFocusable } from '../../utils/focus/isFocusable.js';\nimport { cloneEvent } from '../../utils/misc/cloneEvent.js';\nimport { focusElement, blurElement } from '../focus.js';\nimport { behavior } from './registry.js';\n\nbehavior.click = (event, target, instance)=>{\n    const context = target.closest('button,input,label,select,textarea');\n    const control = context && isElementType(context, 'label') && context.control;\n    if (control && control !== target) {\n        return ()=>{\n            if (isFocusable(control)) {\n                focusElement(control);\n                instance.dispatchEvent(control, cloneEvent(event));\n            }\n        };\n    } else if (isElementType(target, 'input', {\n        type: 'file'\n    })) {\n        return ()=>{\n            // blur fires when the file selector pops up\n            blurElement(target);\n            target.dispatchEvent(new (getWindow(target)).Event('fileDialog'));\n            // focus fires after the file selector has been closed\n            focusElement(target);\n        };\n    }\n};\n","const UIValue = Symbol('Displayed value in UI');\nconst UISelection = Symbol('Displayed selection in UI');\nconst InitialValue = Symbol('Initial value to compare on blur');\nfunction isUIValue(value) {\n    return typeof value === 'object' && UIValue in value;\n}\nfunction isUISelectionStart(start) {\n    return !!start && typeof start === 'object' && UISelection in start;\n}\nfunction setUIValue(element, value) {\n    if (element[InitialValue] === undefined) {\n        element[InitialValue] = element.value;\n    }\n    element[UIValue] = value;\n    // eslint-disable-next-line no-new-wrappers\n    element.value = Object.assign(new String(value), {\n        [UIValue]: true\n    });\n}\nfunction getUIValue(element) {\n    return element[UIValue] === undefined ? element.value : String(element[UIValue]);\n}\n/** Flag the IDL value as clean. This does not change the value.*/ function setUIValueClean(element) {\n    element[UIValue] = undefined;\n}\nfunction clearInitialValue(element) {\n    element[InitialValue] = undefined;\n}\nfunction getInitialValue(element) {\n    return element[InitialValue];\n}\nfunction setUISelectionRaw(element, selection) {\n    element[UISelection] = selection;\n}\nfunction setUISelection(element, { focusOffset: focusOffsetParam, anchorOffset: anchorOffsetParam = focusOffsetParam }, mode = 'replace') {\n    const valueLength = getUIValue(element).length;\n    const sanitizeOffset = (o)=>Math.max(0, Math.min(valueLength, o));\n    const anchorOffset = mode === 'replace' || element[UISelection] === undefined ? sanitizeOffset(anchorOffsetParam) : element[UISelection].anchorOffset;\n    const focusOffset = sanitizeOffset(focusOffsetParam);\n    const startOffset = Math.min(anchorOffset, focusOffset);\n    const endOffset = Math.max(anchorOffset, focusOffset);\n    element[UISelection] = {\n        anchorOffset,\n        focusOffset\n    };\n    if (element.selectionStart === startOffset && element.selectionEnd === endOffset) {\n        return;\n    }\n    // eslint-disable-next-line no-new-wrappers\n    const startObj = Object.assign(new Number(startOffset), {\n        [UISelection]: true\n    });\n    try {\n        element.setSelectionRange(startObj, endOffset);\n    } catch  {\n    // DOMException for invalid state is expected when calling this\n    // on an element without support for setSelectionRange\n    }\n}\nfunction getUISelection(element) {\n    var _element_selectionStart, _element_selectionEnd, _element_UISelection;\n    const sel = (_element_UISelection = element[UISelection]) !== null && _element_UISelection !== undefined ? _element_UISelection : {\n        anchorOffset: (_element_selectionStart = element.selectionStart) !== null && _element_selectionStart !== undefined ? _element_selectionStart : 0,\n        focusOffset: (_element_selectionEnd = element.selectionEnd) !== null && _element_selectionEnd !== undefined ? _element_selectionEnd : 0\n    };\n    return {\n        ...sel,\n        startOffset: Math.min(sel.anchorOffset, sel.focusOffset),\n        endOffset: Math.max(sel.anchorOffset, sel.focusOffset)\n    };\n}\nfunction hasUISelection(element) {\n    return !!element[UISelection];\n}\n/** Flag the IDL selection as clean. This does not change the selection. */ function setUISelectionClean(element) {\n    element[UISelection] = undefined;\n}\n\nexport { clearInitialValue, getInitialValue, getUISelection, getUIValue, hasUISelection, isUISelectionStart, isUIValue, setUISelection, setUISelectionClean, setUISelectionRaw, setUIValue, setUIValueClean };\n","const parseInt = globalThis.parseInt;\nfunction buildTimeValue(value) {\n    const onlyDigitsValue = value.replace(/\\D/g, '');\n    if (onlyDigitsValue.length < 2) {\n        return value;\n    }\n    const firstDigit = parseInt(onlyDigitsValue[0], 10);\n    const secondDigit = parseInt(onlyDigitsValue[1], 10);\n    if (firstDigit >= 3 || firstDigit === 2 && secondDigit >= 4) {\n        let index;\n        if (firstDigit >= 3) {\n            index = 1;\n        } else {\n            index = 2;\n        }\n        return build(onlyDigitsValue, index);\n    }\n    if (value.length === 2) {\n        return value;\n    }\n    return build(onlyDigitsValue, 2);\n}\nfunction build(onlyDigitsValue, index) {\n    const hours = onlyDigitsValue.slice(0, index);\n    const validHours = Math.min(parseInt(hours, 10), 23);\n    const minuteCharacters = onlyDigitsValue.slice(index);\n    const parsedMinutes = parseInt(minuteCharacters, 10);\n    const validMinutes = Math.min(parsedMinutes, 59);\n    return `${validHours.toString().padStart(2, '0')}:${validMinutes.toString().padStart(2, '0')}`;\n}\nfunction isValidDateOrTimeValue(element, value) {\n    const clone = element.cloneNode();\n    clone.value = value;\n    return clone.value === value;\n}\n\nexport { buildTimeValue, isValidDateOrTimeValue };\n","import { isElementType } from '../misc/isElementType.js';\n\nvar maxLengthSupportedTypes = /*#__PURE__*/ function(maxLengthSupportedTypes) {\n    maxLengthSupportedTypes[\"email\"] = \"email\";\n    maxLengthSupportedTypes[\"password\"] = \"password\";\n    maxLengthSupportedTypes[\"search\"] = \"search\";\n    maxLengthSupportedTypes[\"telephone\"] = \"telephone\";\n    maxLengthSupportedTypes[\"text\"] = \"text\";\n    maxLengthSupportedTypes[\"url\"] = \"url\";\n    return maxLengthSupportedTypes;\n}(maxLengthSupportedTypes || {});\n// can't use .maxLength property because of a jsdom bug:\n// https://github.com/jsdom/jsdom/issues/2927\nfunction getMaxLength(element) {\n    var _element_getAttribute;\n    const attr = (_element_getAttribute = element.getAttribute('maxlength')) !== null && _element_getAttribute !== undefined ? _element_getAttribute : '';\n    return /^\\d+$/.test(attr) && Number(attr) >= 0 ? Number(attr) : undefined;\n}\nfunction supportsMaxLength(element) {\n    return isElementType(element, 'textarea') || isElementType(element, 'input') && element.type in maxLengthSupportedTypes;\n}\n\nexport { getMaxLength, supportsMaxLength };\n","import { isContentEditable } from '../edit/isContentEditable.js';\nimport { isElementType } from '../misc/isElementType.js';\n\nfunction getNextCursorPosition(node, offset, direction, inputType) {\n    // The behavior at text node zero offset is inconsistent.\n    // When walking backwards:\n    // Firefox always moves to zero offset and jumps over last offset.\n    // Chrome jumps over zero offset per default but over last offset when Shift is pressed.\n    // The cursor always moves to zero offset if the focus area (contenteditable or body) ends there.\n    // When walking forward both ignore zero offset.\n    // When walking over input elements the cursor moves before or after that element.\n    // When walking over line breaks the cursor moves inside any following text node.\n    if (isTextNode(node) && offset + direction >= 0 && offset + direction <= node.nodeValue.length) {\n        return {\n            node,\n            offset: offset + direction\n        };\n    }\n    const nextNode = getNextCharacterContentNode(node, offset, direction);\n    if (nextNode) {\n        if (isTextNode(nextNode)) {\n            return {\n                node: nextNode,\n                offset: direction > 0 ? Math.min(1, nextNode.nodeValue.length) : Math.max(nextNode.nodeValue.length - 1, 0)\n            };\n        } else if (isElementType(nextNode, 'br')) {\n            const nextPlusOne = getNextCharacterContentNode(nextNode, undefined, direction);\n            if (!nextPlusOne) {\n                // The behavior when there is no possible cursor position beyond the line break is inconsistent.\n                // In Chrome outside of contenteditable moving before a leading line break is possible.\n                // A leading line break can still be removed per deleteContentBackward.\n                // A trailing line break on the other hand is not removed by deleteContentForward.\n                if (direction < 0 && inputType === 'deleteContentBackward') {\n                    return {\n                        node: nextNode.parentNode,\n                        offset: getOffset(nextNode)\n                    };\n                }\n                return undefined;\n            } else if (isTextNode(nextPlusOne)) {\n                return {\n                    node: nextPlusOne,\n                    offset: direction > 0 ? 0 : nextPlusOne.nodeValue.length\n                };\n            } else if (direction < 0 && isElementType(nextPlusOne, 'br')) {\n                return {\n                    node: nextNode.parentNode,\n                    offset: getOffset(nextNode)\n                };\n            } else {\n                return {\n                    node: nextPlusOne.parentNode,\n                    offset: getOffset(nextPlusOne) + (direction > 0 ? 0 : 1)\n                };\n            }\n        } else {\n            return {\n                node: nextNode.parentNode,\n                offset: getOffset(nextNode) + (direction > 0 ? 1 : 0)\n            };\n        }\n    }\n}\nfunction getNextCharacterContentNode(node, offset, direction) {\n    const nextOffset = Number(offset) + (direction < 0 ? -1 : 0);\n    if (offset !== undefined && isElement(node) && nextOffset >= 0 && nextOffset < node.children.length) {\n        node = node.children[nextOffset];\n    }\n    return walkNodes(node, direction === 1 ? 'next' : 'previous', isTreatedAsCharacterContent);\n}\nfunction isTreatedAsCharacterContent(node) {\n    if (isTextNode(node)) {\n        return true;\n    }\n    if (isElement(node)) {\n        if (isElementType(node, [\n            'input',\n            'textarea'\n        ])) {\n            return node.type !== 'hidden';\n        } else if (isElementType(node, 'br')) {\n            return true;\n        }\n    }\n    return false;\n}\nfunction getOffset(node) {\n    let i = 0;\n    while(node.previousSibling){\n        i++;\n        node = node.previousSibling;\n    }\n    return i;\n}\nfunction isElement(node) {\n    return node.nodeType === 1;\n}\nfunction isTextNode(node) {\n    return node.nodeType === 3;\n}\nfunction walkNodes(node, direction, callback) {\n    for(;;){\n        var _node_ownerDocument;\n        const sibling = node[`${direction}Sibling`];\n        if (sibling) {\n            node = getDescendant(sibling, direction === 'next' ? 'first' : 'last');\n            if (callback(node)) {\n                return node;\n            }\n        } else if (node.parentNode && (!isElement(node.parentNode) || !isContentEditable(node.parentNode) && node.parentNode !== ((_node_ownerDocument = node.ownerDocument) === null || _node_ownerDocument === undefined ? undefined : _node_ownerDocument.body))) {\n            node = node.parentNode;\n        } else {\n            break;\n        }\n    }\n}\nfunction getDescendant(node, direction) {\n    while(node.hasChildNodes()){\n        node = node[`${direction}Child`];\n    }\n    return node;\n}\n\nexport { getNextCursorPosition };\n","import '../utils/dataTransfer/Clipboard.js';\nimport { getWindow } from '../utils/misc/getWindow.js';\nimport { setUIValueClean, setUISelection, hasUISelection } from './UI.js';\n\nconst TrackChanges = Symbol('Track programmatic changes for React workaround');\n// When the input event happens in the browser, React executes all event handlers\n// and if they change state of a controlled value, nothing happens.\n// But when we trigger the event handlers in test environment with React@17,\n// the changes are rolled back before the state update is applied.\n// This results in a reset cursor.\n// There might be a better way to work around if we figure out\n// why the batched update is executed differently in our test environment.\nfunction isReact17Element(element) {\n    return Object.getOwnPropertyNames(element).some((k)=>k.startsWith('__react')) && getWindow(element).REACT_VERSION === 17;\n}\nfunction startTrackValue(element) {\n    if (!isReact17Element(element)) {\n        return;\n    }\n    element[TrackChanges] = {\n        previousValue: String(element.value),\n        tracked: []\n    };\n}\nfunction trackOrSetValue(element, v) {\n    var _element_TrackChanges_tracked, _element_TrackChanges;\n    (_element_TrackChanges = element[TrackChanges]) === null || _element_TrackChanges === undefined ? undefined : (_element_TrackChanges_tracked = _element_TrackChanges.tracked) === null || _element_TrackChanges_tracked === undefined ? undefined : _element_TrackChanges_tracked.push(v);\n    if (!element[TrackChanges]) {\n        setUIValueClean(element);\n        setUISelection(element, {\n            focusOffset: v.length\n        });\n    }\n}\nfunction commitValueAfterInput(element, cursorOffset) {\n    var _changes_tracked;\n    const changes = element[TrackChanges];\n    element[TrackChanges] = undefined;\n    if (!(changes === null || changes === undefined ? undefined : (_changes_tracked = changes.tracked) === null || _changes_tracked === undefined ? undefined : _changes_tracked.length)) {\n        return;\n    }\n    const isJustReactStateUpdate = changes.tracked.length === 2 && changes.tracked[0] === changes.previousValue && changes.tracked[1] === element.value;\n    if (!isJustReactStateUpdate) {\n        setUIValueClean(element);\n    }\n    if (hasUISelection(element)) {\n        setUISelection(element, {\n            focusOffset: isJustReactStateUpdate ? cursorOffset : element.value.length\n        });\n    }\n}\n\nexport { commitValueAfterInput, startTrackValue, trackOrSetValue };\n","import { getUISelection } from '../../document/UI.js';\nimport '../../utils/dataTransfer/Clipboard.js';\nimport { getContentEditable } from '../../utils/edit/isContentEditable.js';\nimport { hasOwnSelection } from '../../utils/focus/selection.js';\n\n/**\n * Determine which selection logic and selection ranges to consider.\n */ function getTargetTypeAndSelection(node) {\n    const element = getElement(node);\n    if (element && hasOwnSelection(element)) {\n        return {\n            type: 'input',\n            selection: getUISelection(element)\n        };\n    }\n    const selection = element === null || element === undefined ? undefined : element.ownerDocument.getSelection();\n    // It is possible to extend a single-range selection into a contenteditable.\n    // This results in the range acting like a range outside of contenteditable.\n    const isCE = getContentEditable(node) && (selection === null || selection === undefined ? undefined : selection.anchorNode) && getContentEditable(selection.anchorNode);\n    return {\n        type: isCE ? 'contenteditable' : 'default',\n        selection\n    };\n}\nfunction getElement(node) {\n    return node.nodeType === 1 ? node : node.parentElement;\n}\n\nexport { getTargetTypeAndSelection };\n","import { getTargetTypeAndSelection } from './getTargetTypeAndSelection.js';\n\n/**\n * Get the range that would be overwritten by input.\n */ function getInputRange(focusNode) {\n    const typeAndSelection = getTargetTypeAndSelection(focusNode);\n    if (typeAndSelection.type === 'input') {\n        return typeAndSelection.selection;\n    } else if (typeAndSelection.type === 'contenteditable') {\n        var _typeAndSelection_selection;\n        // Multi-range on contenteditable edits the first selection instead of the last\n        return (_typeAndSelection_selection = typeAndSelection.selection) === null || _typeAndSelection_selection === undefined ? undefined : _typeAndSelection_selection.getRangeAt(0);\n    }\n}\n\nexport { getInputRange };\n","import { setUISelection } from '../../document/UI.js';\nimport '../../utils/dataTransfer/Clipboard.js';\nimport { getTargetTypeAndSelection } from './getTargetTypeAndSelection.js';\n\n/**\n * Set the selection\n */ function setSelection({ focusNode, focusOffset, anchorNode = focusNode, anchorOffset = focusOffset }) {\n    var _anchorNode_ownerDocument_getSelection, _anchorNode_ownerDocument;\n    const typeAndSelection = getTargetTypeAndSelection(focusNode);\n    if (typeAndSelection.type === 'input') {\n        return setUISelection(focusNode, {\n            anchorOffset,\n            focusOffset\n        });\n    }\n    (_anchorNode_ownerDocument = anchorNode.ownerDocument) === null || _anchorNode_ownerDocument === undefined ? undefined : (_anchorNode_ownerDocument_getSelection = _anchorNode_ownerDocument.getSelection()) === null || _anchorNode_ownerDocument_getSelection === undefined ? undefined : _anchorNode_ownerDocument_getSelection.setBaseAndExtent(anchorNode, anchorOffset, focusNode, focusOffset);\n}\n\nexport { setSelection };\n","import { setUIValue, clearInitialValue, getUIValue } from '../document/UI.js';\nimport { isElementType } from '../utils/misc/isElementType.js';\nimport '../utils/dataTransfer/Clipboard.js';\nimport { isValidDateOrTimeValue, buildTimeValue } from '../utils/edit/timeValue.js';\nimport { supportsMaxLength, getMaxLength } from '../utils/edit/maxLength.js';\nimport { getNextCursorPosition } from '../utils/focus/cursor.js';\nimport { commitValueAfterInput } from '../document/trackValue.js';\nimport { getInputRange } from './selection/getInputRange.js';\nimport { setSelection } from './selection/setSelection.js';\n\nfunction isDateOrTime(element) {\n    return isElementType(element, 'input') && [\n        'date',\n        'time'\n    ].includes(element.type);\n}\nfunction input(instance, element, data, inputType = 'insertText') {\n    const inputRange = getInputRange(element);\n    /* istanbul ignore if */ if (!inputRange) {\n        return;\n    }\n    // There is no `beforeinput` event on `date` and `time` input\n    if (!isDateOrTime(element)) {\n        const unprevented = instance.dispatchUIEvent(element, 'beforeinput', {\n            inputType,\n            data\n        });\n        if (!unprevented) {\n            return;\n        }\n    }\n    if ('startContainer' in inputRange) {\n        editContenteditable(instance, element, inputRange, data, inputType);\n    } else {\n        editInputElement(instance, element, inputRange, data, inputType);\n    }\n}\nfunction editContenteditable(instance, element, inputRange, data, inputType) {\n    let del = false;\n    if (!inputRange.collapsed) {\n        del = true;\n        inputRange.deleteContents();\n    } else if ([\n        'deleteContentBackward',\n        'deleteContentForward'\n    ].includes(inputType)) {\n        const nextPosition = getNextCursorPosition(inputRange.startContainer, inputRange.startOffset, inputType === 'deleteContentBackward' ? -1 : 1, inputType);\n        if (nextPosition) {\n            del = true;\n            const delRange = inputRange.cloneRange();\n            if (delRange.comparePoint(nextPosition.node, nextPosition.offset) < 0) {\n                delRange.setStart(nextPosition.node, nextPosition.offset);\n            } else {\n                delRange.setEnd(nextPosition.node, nextPosition.offset);\n            }\n            delRange.deleteContents();\n        }\n    }\n    if (data) {\n        if (inputRange.endContainer.nodeType === 3) {\n            const offset = inputRange.endOffset;\n            inputRange.endContainer.insertData(offset, data);\n            inputRange.setStart(inputRange.endContainer, offset + data.length);\n            inputRange.setEnd(inputRange.endContainer, offset + data.length);\n        } else {\n            const text = element.ownerDocument.createTextNode(data);\n            inputRange.insertNode(text);\n            inputRange.setStart(text, data.length);\n            inputRange.setEnd(text, data.length);\n        }\n    }\n    if (del || data) {\n        instance.dispatchUIEvent(element, 'input', {\n            inputType\n        });\n    }\n}\nfunction editInputElement(instance, element, inputRange, data, inputType) {\n    let dataToInsert = data;\n    if (supportsMaxLength(element)) {\n        const maxLength = getMaxLength(element);\n        if (maxLength !== undefined && data.length > 0) {\n            const spaceUntilMaxLength = maxLength - element.value.length;\n            if (spaceUntilMaxLength > 0) {\n                dataToInsert = data.substring(0, spaceUntilMaxLength);\n            } else {\n                return;\n            }\n        }\n    }\n    const { newValue, newOffset, oldValue } = calculateNewValue(dataToInsert, element, inputRange, inputType);\n    if (newValue === oldValue && newOffset === inputRange.startOffset && newOffset === inputRange.endOffset) {\n        return;\n    }\n    if (isElementType(element, 'input', {\n        type: 'number'\n    }) && !isValidNumberInput(newValue)) {\n        return;\n    }\n    setUIValue(element, newValue);\n    setSelection({\n        focusNode: element,\n        anchorOffset: newOffset,\n        focusOffset: newOffset\n    });\n    if (isDateOrTime(element)) {\n        if (isValidDateOrTimeValue(element, newValue)) {\n            commitInput(instance, element, newOffset, {});\n            instance.dispatchUIEvent(element, 'change');\n            clearInitialValue(element);\n        }\n    } else {\n        commitInput(instance, element, newOffset, {\n            data,\n            inputType\n        });\n    }\n}\nfunction calculateNewValue(inputData, node, { startOffset, endOffset }, inputType) {\n    const value = getUIValue(node);\n    const prologEnd = Math.max(0, startOffset === endOffset && inputType === 'deleteContentBackward' ? startOffset - 1 : startOffset);\n    const prolog = value.substring(0, prologEnd);\n    const epilogStart = Math.min(value.length, startOffset === endOffset && inputType === 'deleteContentForward' ? startOffset + 1 : endOffset);\n    const epilog = value.substring(epilogStart, value.length);\n    let newValue = `${prolog}${inputData}${epilog}`;\n    let newOffset = prologEnd + inputData.length;\n    if (isElementType(node, 'input', {\n        type: 'time'\n    })) {\n        const builtValue = buildTimeValue(newValue);\n        if (builtValue !== '' && isValidDateOrTimeValue(node, builtValue)) {\n            newValue = builtValue;\n            newOffset = builtValue.length;\n        }\n    }\n    return {\n        oldValue: value,\n        newValue,\n        newOffset\n    };\n}\nfunction commitInput(instance, element, newOffset, inputInit) {\n    instance.dispatchUIEvent(element, 'input', inputInit);\n    commitValueAfterInput(element, newOffset);\n}\nfunction isValidNumberInput(value) {\n    var _value_match, _value_match1;\n    // the browser allows some invalid input but not others\n    // it allows up to two '-' at any place before any 'e' or one directly following 'e'\n    // it allows one '.' at any place before e\n    const valueParts = value.split('e', 2);\n    return !(/[^\\d.\\-e]/.test(value) || Number((_value_match = value.match(/-/g)) === null || _value_match === undefined ? undefined : _value_match.length) > 2 || Number((_value_match1 = value.match(/\\./g)) === null || _value_match1 === undefined ? undefined : _value_match1.length) > 1 || valueParts[1] && !/^-?\\d*$/.test(valueParts[1]));\n}\n\nexport { input };\n","import '../../utils/dataTransfer/Clipboard.js';\nimport { isEditable } from '../../utils/edit/isEditable.js';\nimport { input } from '../input.js';\nimport { behavior } from './registry.js';\n\nbehavior.cut = (event, target, instance)=>{\n    return ()=>{\n        if (isEditable(target)) {\n            input(instance, target, '', 'deleteByCut');\n        }\n    };\n};\n","import '../utils/dataTransfer/Clipboard.js';\nimport { isContentEditable } from '../utils/edit/isContentEditable.js';\nimport { getUIValue } from './UI.js';\n\nfunction getValueOrTextContent(element) {\n    // istanbul ignore if\n    if (!element) {\n        return null;\n    }\n    if (isContentEditable(element)) {\n        return element.textContent;\n    }\n    return getUIValue(element);\n}\n\nexport { getValueOrTextContent };\n","import { getWindow } from './getWindow.js';\n\nfunction isVisible(element) {\n    const window = getWindow(element);\n    for(let el = element; el === null || el === undefined ? undefined : el.ownerDocument; el = el.parentElement){\n        const { display, visibility } = window.getComputedStyle(el);\n        if (display === 'none') {\n            return false;\n        }\n        if (visibility === 'hidden') {\n            return false;\n        }\n    }\n    return true;\n}\n\nexport { isVisible };\n","import { isDisabled } from '../misc/isDisabled.js';\nimport { isElementType } from '../misc/isElementType.js';\nimport { isVisible } from '../misc/isVisible.js';\nimport { FOCUSABLE_SELECTOR } from './selector.js';\n\nfunction getTabDestination(activeElement, shift) {\n    const document = activeElement.ownerDocument;\n    const focusableElements = document.querySelectorAll(FOCUSABLE_SELECTOR);\n    const enabledElements = Array.from(focusableElements).filter((el)=>el === activeElement || !(Number(el.getAttribute('tabindex')) < 0 || isDisabled(el)));\n    // tabindex has no effect if the active element has negative tabindex\n    if (Number(activeElement.getAttribute('tabindex')) >= 0) {\n        enabledElements.sort((a, b)=>{\n            const i = Number(a.getAttribute('tabindex'));\n            const j = Number(b.getAttribute('tabindex'));\n            if (i === j) {\n                return 0;\n            } else if (i === 0) {\n                return 1;\n            } else if (j === 0) {\n                return -1;\n            }\n            return i - j;\n        });\n    }\n    const checkedRadio = {};\n    let prunedElements = [\n        document.body\n    ];\n    const activeRadioGroup = isElementType(activeElement, 'input', {\n        type: 'radio'\n    }) ? activeElement.name : undefined;\n    enabledElements.forEach((currentElement)=>{\n        const el = currentElement;\n        // For radio groups keep only the active radio\n        // If there is no active radio, keep only the checked radio\n        // If there is no checked radio, treat like everything else\n        if (isElementType(el, 'input', {\n            type: 'radio'\n        }) && el.name) {\n            // If the active element is part of the group, add only that\n            if (el === activeElement) {\n                prunedElements.push(el);\n                return;\n            } else if (el.name === activeRadioGroup) {\n                return;\n            }\n            // If we stumble upon a checked radio, remove the others\n            if (el.checked) {\n                prunedElements = prunedElements.filter((e)=>!isElementType(e, 'input', {\n                        type: 'radio',\n                        name: el.name\n                    }));\n                prunedElements.push(el);\n                checkedRadio[el.name] = el;\n                return;\n            }\n            // If we already found the checked one, skip\n            if (typeof checkedRadio[el.name] !== 'undefined') {\n                return;\n            }\n        }\n        prunedElements.push(el);\n    });\n    for(let index = prunedElements.findIndex((el)=>el === activeElement);;){\n        index += shift ? -1 : 1;\n        // loop at overflow\n        if (index === prunedElements.length) {\n            index = 0;\n        } else if (index === -1) {\n            index = prunedElements.length - 1;\n        }\n        if (prunedElements[index] === activeElement || prunedElements[index] === document.body || isVisible(prunedElements[index])) {\n            return prunedElements[index];\n        }\n    }\n}\n\nexport { getTabDestination };\n","import { getUISelection } from '../../document/UI.js';\nimport '../../utils/dataTransfer/Clipboard.js';\nimport { getNextCursorPosition } from '../../utils/focus/cursor.js';\nimport { hasOwnSelection } from '../../utils/focus/selection.js';\nimport { setSelection } from './setSelection.js';\n\n/**\n * Move the selection\n */ function moveSelection(node, direction) {\n    // TODO: implement shift\n    if (hasOwnSelection(node)) {\n        const selection = getUISelection(node);\n        setSelection({\n            focusNode: node,\n            focusOffset: selection.startOffset === selection.endOffset ? selection.focusOffset + direction : direction < 0 ? selection.startOffset : selection.endOffset\n        });\n    } else {\n        const selection = node.ownerDocument.getSelection();\n        if (!(selection === null || selection === undefined ? undefined : selection.focusNode)) {\n            return;\n        }\n        if (selection.isCollapsed) {\n            const nextPosition = getNextCursorPosition(selection.focusNode, selection.focusOffset, direction);\n            if (nextPosition) {\n                setSelection({\n                    focusNode: nextPosition.node,\n                    focusOffset: nextPosition.offset\n                });\n            }\n        } else {\n            selection[direction < 0 ? 'collapseToStart' : 'collapseToEnd']();\n        }\n    }\n}\n\nexport { moveSelection };\n","import { getUIValue, getUISelection } from '../../document/UI.js';\nimport '../../utils/dataTransfer/Clipboard.js';\nimport { getContentEditable } from '../../utils/edit/isContentEditable.js';\nimport { hasOwnSelection } from '../../utils/focus/selection.js';\nimport { setSelection } from './setSelection.js';\n\n/**\n * Expand a selection like the browser does when pressing Ctrl+A.\n */ function selectAll(target) {\n    if (hasOwnSelection(target)) {\n        return setSelection({\n            focusNode: target,\n            anchorOffset: 0,\n            focusOffset: getUIValue(target).length\n        });\n    }\n    var _getContentEditable;\n    const focusNode = (_getContentEditable = getContentEditable(target)) !== null && _getContentEditable !== undefined ? _getContentEditable : target.ownerDocument.body;\n    setSelection({\n        focusNode,\n        anchorOffset: 0,\n        focusOffset: focusNode.childNodes.length\n    });\n}\nfunction isAllSelected(target) {\n    if (hasOwnSelection(target)) {\n        return getUISelection(target).startOffset === 0 && getUISelection(target).endOffset === getUIValue(target).length;\n    }\n    var _getContentEditable;\n    const focusNode = (_getContentEditable = getContentEditable(target)) !== null && _getContentEditable !== undefined ? _getContentEditable : target.ownerDocument.body;\n    const selection = target.ownerDocument.getSelection();\n    return (selection === null || selection === undefined ? undefined : selection.anchorNode) === focusNode && selection.focusNode === focusNode && selection.anchorOffset === 0 && selection.focusOffset === focusNode.childNodes.length;\n}\n\nexport { isAllSelected, selectAll };\n","import '../../utils/dataTransfer/Clipboard.js';\nimport { isContentEditable } from '../../utils/edit/isContentEditable.js';\nimport { hasOwnSelection } from '../../utils/focus/selection.js';\nimport { setSelection } from './setSelection.js';\n\n/**\n * Backward-compatible selection.\n *\n * Handles input elements and contenteditable if it only contains a single text node.\n */ function setSelectionRange(element, anchorOffset, focusOffset) {\n    var _element_firstChild;\n    if (hasOwnSelection(element)) {\n        return setSelection({\n            focusNode: element,\n            anchorOffset,\n            focusOffset\n        });\n    }\n    /* istanbul ignore else */ if (isContentEditable(element) && ((_element_firstChild = element.firstChild) === null || _element_firstChild === undefined ? undefined : _element_firstChild.nodeType) === 3) {\n        return setSelection({\n            focusNode: element.firstChild,\n            anchorOffset,\n            focusOffset\n        });\n    }\n    /* istanbul ignore next */ throw new Error('Not implemented. The result of this interaction is unreliable.');\n}\n\nexport { setSelectionRange };\n","import '../utils/dataTransfer/Clipboard.js';\nimport { isDisabled } from '../utils/misc/isDisabled.js';\nimport { getWindow } from '../utils/misc/getWindow.js';\nimport { focusElement } from './focus.js';\n\nfunction walkRadio(instance, el, direction) {\n    const window = getWindow(el);\n    const group = Array.from(el.ownerDocument.querySelectorAll(el.name ? `input[type=\"radio\"][name=\"${window.CSS.escape(el.name)}\"]` : `input[type=\"radio\"][name=\"\"], input[type=\"radio\"]:not([name])`));\n    for(let i = group.findIndex((e)=>e === el) + direction;; i += direction){\n        if (!group[i]) {\n            i = direction > 0 ? 0 : group.length - 1;\n        }\n        if (group[i] === el) {\n            return;\n        }\n        if (isDisabled(group[i])) {\n            continue;\n        }\n        focusElement(group[i]);\n        instance.dispatchUIEvent(group[i], 'click');\n        return;\n    }\n}\n\nexport { walkRadio };\n","import { getUIValue, setUISelection } from '../../document/UI.js';\nimport { getValueOrTextContent } from '../../document/getValueOrTextContent.js';\nimport { isElementType } from '../../utils/misc/isElementType.js';\nimport '../../utils/dataTransfer/Clipboard.js';\nimport { isContentEditable } from '../../utils/edit/isContentEditable.js';\nimport { isEditable } from '../../utils/edit/isEditable.js';\nimport { getTabDestination } from '../../utils/focus/getTabDestination.js';\nimport { hasOwnSelection } from '../../utils/focus/selection.js';\nimport { focusElement } from '../focus.js';\nimport { input } from '../input.js';\nimport { moveSelection } from '../selection/moveSelection.js';\nimport { selectAll } from '../selection/selectAll.js';\nimport { setSelectionRange } from '../selection/setSelectionRange.js';\nimport { walkRadio } from '../radio.js';\nimport { behavior } from './registry.js';\n\nbehavior.keydown = (event, target, instance)=>{\n    var _keydownBehavior_event_key;\n    var _keydownBehavior_event_key1;\n    return (_keydownBehavior_event_key1 = (_keydownBehavior_event_key = keydownBehavior[event.key]) === null || _keydownBehavior_event_key === undefined ? undefined : _keydownBehavior_event_key.call(keydownBehavior, event, target, instance)) !== null && _keydownBehavior_event_key1 !== undefined ? _keydownBehavior_event_key1 : combinationBehavior(event, target, instance);\n};\nconst keydownBehavior = {\n    ArrowDown: (event, target, instance)=>{\n        /* istanbul ignore else */ if (isElementType(target, 'input', {\n            type: 'radio'\n        })) {\n            return ()=>walkRadio(instance, target, 1);\n        }\n    },\n    ArrowLeft: (event, target, instance)=>{\n        if (isElementType(target, 'input', {\n            type: 'radio'\n        })) {\n            return ()=>walkRadio(instance, target, -1);\n        }\n        return ()=>moveSelection(target, -1);\n    },\n    ArrowRight: (event, target, instance)=>{\n        if (isElementType(target, 'input', {\n            type: 'radio'\n        })) {\n            return ()=>walkRadio(instance, target, 1);\n        }\n        return ()=>moveSelection(target, 1);\n    },\n    ArrowUp: (event, target, instance)=>{\n        /* istanbul ignore else */ if (isElementType(target, 'input', {\n            type: 'radio'\n        })) {\n            return ()=>walkRadio(instance, target, -1);\n        }\n    },\n    Backspace: (event, target, instance)=>{\n        if (isEditable(target)) {\n            return ()=>{\n                input(instance, target, '', 'deleteContentBackward');\n            };\n        }\n    },\n    Delete: (event, target, instance)=>{\n        if (isEditable(target)) {\n            return ()=>{\n                input(instance, target, '', 'deleteContentForward');\n            };\n        }\n    },\n    End: (event, target)=>{\n        if (isElementType(target, [\n            'input',\n            'textarea'\n        ]) || isContentEditable(target)) {\n            return ()=>{\n                var _getValueOrTextContent;\n                var _getValueOrTextContent_length;\n                const newPos = (_getValueOrTextContent_length = (_getValueOrTextContent = getValueOrTextContent(target)) === null || _getValueOrTextContent === undefined ? undefined : _getValueOrTextContent.length) !== null && _getValueOrTextContent_length !== undefined ? _getValueOrTextContent_length : /* istanbul ignore next */ 0;\n                setSelectionRange(target, newPos, newPos);\n            };\n        }\n    },\n    Home: (event, target)=>{\n        if (isElementType(target, [\n            'input',\n            'textarea'\n        ]) || isContentEditable(target)) {\n            return ()=>{\n                setSelectionRange(target, 0, 0);\n            };\n        }\n    },\n    PageDown: (event, target)=>{\n        if (isElementType(target, [\n            'input'\n        ])) {\n            return ()=>{\n                const newPos = getUIValue(target).length;\n                setSelectionRange(target, newPos, newPos);\n            };\n        }\n    },\n    PageUp: (event, target)=>{\n        if (isElementType(target, [\n            'input'\n        ])) {\n            return ()=>{\n                setSelectionRange(target, 0, 0);\n            };\n        }\n    },\n    Tab: (event, target, instance)=>{\n        return ()=>{\n            const dest = getTabDestination(target, instance.system.keyboard.modifiers.Shift);\n            focusElement(dest);\n            if (hasOwnSelection(dest)) {\n                setUISelection(dest, {\n                    anchorOffset: 0,\n                    focusOffset: dest.value.length\n                });\n            }\n        };\n    }\n};\nconst combinationBehavior = (event, target, instance)=>{\n    if (event.code === 'KeyA' && instance.system.keyboard.modifiers.Control) {\n        return ()=>selectAll(target);\n    }\n};\n","import { isElementType } from '../../utils/misc/isElementType.js';\nimport '../../utils/dataTransfer/Clipboard.js';\nimport { isContentEditable } from '../../utils/edit/isContentEditable.js';\nimport { isEditable } from '../../utils/edit/isEditable.js';\nimport { input } from '../input.js';\nimport { behavior } from './registry.js';\n\nbehavior.keypress = (event, target, instance)=>{\n    if (event.key === 'Enter') {\n        if (isElementType(target, 'button') || isElementType(target, 'input') && ClickInputOnEnter.includes(target.type) || isElementType(target, 'a') && Boolean(target.href)) {\n            return ()=>{\n                instance.dispatchUIEvent(target, 'click');\n            };\n        } else if (isElementType(target, 'input')) {\n            const form = target.form;\n            const submit = form === null || form === undefined ? undefined : form.querySelector('input[type=\"submit\"], button:not([type]), button[type=\"submit\"]');\n            if (submit) {\n                return ()=>instance.dispatchUIEvent(submit, 'click');\n            } else if (form && SubmitSingleInputOnEnter.includes(target.type) && form.querySelectorAll('input').length === 1) {\n                return ()=>instance.dispatchUIEvent(form, 'submit');\n            } else {\n                return;\n            }\n        }\n    }\n    if (isEditable(target)) {\n        const inputType = event.key === 'Enter' ? isContentEditable(target) && !instance.system.keyboard.modifiers.Shift ? 'insertParagraph' : 'insertLineBreak' : 'insertText';\n        const inputData = event.key === 'Enter' ? '\\n' : event.key;\n        return ()=>input(instance, target, inputData, inputType);\n    }\n};\nconst ClickInputOnEnter = [\n    'button',\n    'color',\n    'file',\n    'image',\n    'reset',\n    'submit'\n];\nconst SubmitSingleInputOnEnter = [\n    'email',\n    'month',\n    'password',\n    'search',\n    'tel',\n    'text',\n    'url',\n    'week'\n];\n","import { isClickableInput } from '../../utils/click/isClickableInput.js';\nimport '../../utils/dataTransfer/Clipboard.js';\nimport { behavior } from './registry.js';\n\nbehavior.keyup = (event, target, instance)=>{\n    var _keyupBehavior_event_key;\n    return (_keyupBehavior_event_key = keyupBehavior[event.key]) === null || _keyupBehavior_event_key === undefined ? undefined : _keyupBehavior_event_key.call(keyupBehavior, event, target, instance);\n};\nconst keyupBehavior = {\n    ' ': (event, target, instance)=>{\n        if (isClickableInput(target)) {\n            return ()=>instance.dispatchUIEvent(target, 'click');\n        }\n    }\n};\n","import '../../utils/dataTransfer/Clipboard.js';\nimport { isEditable } from '../../utils/edit/isEditable.js';\nimport { input } from '../input.js';\nimport { behavior } from './registry.js';\n\nbehavior.paste = (event, target, instance)=>{\n    if (isEditable(target)) {\n        return ()=>{\n            var _event_clipboardData;\n            const insertData = (_event_clipboardData = event.clipboardData) === null || _event_clipboardData === undefined ? undefined : _event_clipboardData.getData('text');\n            if (insertData) {\n                input(instance, target, insertData, 'insertFromPaste');\n            }\n        };\n    }\n};\n","const eventMap = {\n    auxclick: {\n        EventType: 'PointerEvent',\n        defaultInit: {\n            bubbles: true,\n            cancelable: true,\n            composed: true\n        }\n    },\n    beforeinput: {\n        EventType: 'InputEvent',\n        defaultInit: {\n            bubbles: true,\n            cancelable: true,\n            composed: true\n        }\n    },\n    blur: {\n        EventType: 'FocusEvent',\n        defaultInit: {\n            bubbles: false,\n            cancelable: false,\n            composed: true\n        }\n    },\n    click: {\n        EventType: 'PointerEvent',\n        defaultInit: {\n            bubbles: true,\n            cancelable: true,\n            composed: true\n        }\n    },\n    contextmenu: {\n        EventType: 'PointerEvent',\n        defaultInit: {\n            bubbles: true,\n            cancelable: true,\n            composed: true\n        }\n    },\n    copy: {\n        EventType: 'ClipboardEvent',\n        defaultInit: {\n            bubbles: true,\n            cancelable: true,\n            composed: true\n        }\n    },\n    change: {\n        EventType: 'Event',\n        defaultInit: {\n            bubbles: true,\n            cancelable: false\n        }\n    },\n    cut: {\n        EventType: 'ClipboardEvent',\n        defaultInit: {\n            bubbles: true,\n            cancelable: true,\n            composed: true\n        }\n    },\n    dblclick: {\n        EventType: 'MouseEvent',\n        defaultInit: {\n            bubbles: true,\n            cancelable: true,\n            composed: true\n        }\n    },\n    focus: {\n        EventType: 'FocusEvent',\n        defaultInit: {\n            bubbles: false,\n            cancelable: false,\n            composed: true\n        }\n    },\n    focusin: {\n        EventType: 'FocusEvent',\n        defaultInit: {\n            bubbles: true,\n            cancelable: false,\n            composed: true\n        }\n    },\n    focusout: {\n        EventType: 'FocusEvent',\n        defaultInit: {\n            bubbles: true,\n            cancelable: false,\n            composed: true\n        }\n    },\n    keydown: {\n        EventType: 'KeyboardEvent',\n        defaultInit: {\n            bubbles: true,\n            cancelable: true,\n            composed: true\n        }\n    },\n    keypress: {\n        EventType: 'KeyboardEvent',\n        defaultInit: {\n            bubbles: true,\n            cancelable: true,\n            composed: true\n        }\n    },\n    keyup: {\n        EventType: 'KeyboardEvent',\n        defaultInit: {\n            bubbles: true,\n            cancelable: true,\n            composed: true\n        }\n    },\n    paste: {\n        EventType: 'ClipboardEvent',\n        defaultInit: {\n            bubbles: true,\n            cancelable: true,\n            composed: true\n        }\n    },\n    input: {\n        EventType: 'InputEvent',\n        defaultInit: {\n            bubbles: true,\n            cancelable: false,\n            composed: true\n        }\n    },\n    mousedown: {\n        EventType: 'MouseEvent',\n        defaultInit: {\n            bubbles: true,\n            cancelable: true,\n            composed: true\n        }\n    },\n    mouseenter: {\n        EventType: 'MouseEvent',\n        defaultInit: {\n            bubbles: false,\n            cancelable: false,\n            composed: true\n        }\n    },\n    mouseleave: {\n        EventType: 'MouseEvent',\n        defaultInit: {\n            bubbles: false,\n            cancelable: false,\n            composed: true\n        }\n    },\n    mousemove: {\n        EventType: 'MouseEvent',\n        defaultInit: {\n            bubbles: true,\n            cancelable: true,\n            composed: true\n        }\n    },\n    mouseout: {\n        EventType: 'MouseEvent',\n        defaultInit: {\n            bubbles: true,\n            cancelable: true,\n            composed: true\n        }\n    },\n    mouseover: {\n        EventType: 'MouseEvent',\n        defaultInit: {\n            bubbles: true,\n            cancelable: true,\n            composed: true\n        }\n    },\n    mouseup: {\n        EventType: 'MouseEvent',\n        defaultInit: {\n            bubbles: true,\n            cancelable: true,\n            composed: true\n        }\n    },\n    pointerover: {\n        EventType: 'PointerEvent',\n        defaultInit: {\n            bubbles: true,\n            cancelable: true,\n            composed: true\n        }\n    },\n    pointerenter: {\n        EventType: 'PointerEvent',\n        defaultInit: {\n            bubbles: false,\n            cancelable: false\n        }\n    },\n    pointerdown: {\n        EventType: 'PointerEvent',\n        defaultInit: {\n            bubbles: true,\n            cancelable: true,\n            composed: true\n        }\n    },\n    pointermove: {\n        EventType: 'PointerEvent',\n        defaultInit: {\n            bubbles: true,\n            cancelable: true,\n            composed: true\n        }\n    },\n    pointerup: {\n        EventType: 'PointerEvent',\n        defaultInit: {\n            bubbles: true,\n            cancelable: true,\n            composed: true\n        }\n    },\n    pointercancel: {\n        EventType: 'PointerEvent',\n        defaultInit: {\n            bubbles: true,\n            cancelable: false,\n            composed: true\n        }\n    },\n    pointerout: {\n        EventType: 'PointerEvent',\n        defaultInit: {\n            bubbles: true,\n            cancelable: true,\n            composed: true\n        }\n    },\n    pointerleave: {\n        EventType: 'PointerEvent',\n        defaultInit: {\n            bubbles: false,\n            cancelable: false\n        }\n    },\n    submit: {\n        EventType: 'Event',\n        defaultInit: {\n            bubbles: true,\n            cancelable: true\n        }\n    }\n};\nfunction getEventClass(type) {\n    return eventMap[type].EventType;\n}\nconst mouseEvents = [\n    'MouseEvent',\n    'PointerEvent'\n];\nfunction isMouseEvent(type) {\n    return mouseEvents.includes(getEventClass(type));\n}\nfunction isKeyboardEvent(type) {\n    return getEventClass(type) === 'KeyboardEvent';\n}\n\nexport { eventMap, isKeyboardEvent, isMouseEvent };\n","import '../utils/dataTransfer/Clipboard.js';\nimport { getWindow } from '../utils/misc/getWindow.js';\nimport { eventMap } from './eventMap.js';\n\nconst eventInitializer = {\n    ClipboardEvent: [\n        initClipboardEvent\n    ],\n    Event: [],\n    FocusEvent: [\n        initUIEvent,\n        initFocusEvent\n    ],\n    InputEvent: [\n        initUIEvent,\n        initInputEvent\n    ],\n    MouseEvent: [\n        initUIEvent,\n        initUIEventModifiers,\n        initMouseEvent\n    ],\n    PointerEvent: [\n        initUIEvent,\n        initUIEventModifiers,\n        initMouseEvent,\n        initPointerEvent\n    ],\n    KeyboardEvent: [\n        initUIEvent,\n        initUIEventModifiers,\n        initKeyboardEvent\n    ]\n};\nfunction createEvent(type, target, init) {\n    const window = getWindow(target);\n    const { EventType, defaultInit } = eventMap[type];\n    const event = new (getEventConstructors(window))[EventType](type, defaultInit);\n    eventInitializer[EventType].forEach((f)=>f(event, init !== null && init !== undefined ? init : {}));\n    return event;\n}\n/* istanbul ignore next */ function getEventConstructors(window) {\n    var _window_Event;\n    /* eslint-disable @typescript-eslint/no-unnecessary-condition, @typescript-eslint/no-extraneous-class */ const Event = (_window_Event = window.Event) !== null && _window_Event !== undefined ? _window_Event : class Event {\n    };\n    var _window_AnimationEvent;\n    const AnimationEvent = (_window_AnimationEvent = window.AnimationEvent) !== null && _window_AnimationEvent !== undefined ? _window_AnimationEvent : class AnimationEvent extends Event {\n    };\n    var _window_ClipboardEvent;\n    const ClipboardEvent = (_window_ClipboardEvent = window.ClipboardEvent) !== null && _window_ClipboardEvent !== undefined ? _window_ClipboardEvent : class ClipboardEvent extends Event {\n    };\n    var _window_PopStateEvent;\n    const PopStateEvent = (_window_PopStateEvent = window.PopStateEvent) !== null && _window_PopStateEvent !== undefined ? _window_PopStateEvent : class PopStateEvent extends Event {\n    };\n    var _window_ProgressEvent;\n    const ProgressEvent = (_window_ProgressEvent = window.ProgressEvent) !== null && _window_ProgressEvent !== undefined ? _window_ProgressEvent : class ProgressEvent extends Event {\n    };\n    var _window_TransitionEvent;\n    const TransitionEvent = (_window_TransitionEvent = window.TransitionEvent) !== null && _window_TransitionEvent !== undefined ? _window_TransitionEvent : class TransitionEvent extends Event {\n    };\n    var _window_UIEvent;\n    const UIEvent = (_window_UIEvent = window.UIEvent) !== null && _window_UIEvent !== undefined ? _window_UIEvent : class UIEvent extends Event {\n    };\n    var _window_CompositionEvent;\n    const CompositionEvent = (_window_CompositionEvent = window.CompositionEvent) !== null && _window_CompositionEvent !== undefined ? _window_CompositionEvent : class CompositionEvent extends UIEvent {\n    };\n    var _window_FocusEvent;\n    const FocusEvent = (_window_FocusEvent = window.FocusEvent) !== null && _window_FocusEvent !== undefined ? _window_FocusEvent : class FocusEvent extends UIEvent {\n    };\n    var _window_InputEvent;\n    const InputEvent = (_window_InputEvent = window.InputEvent) !== null && _window_InputEvent !== undefined ? _window_InputEvent : class InputEvent extends UIEvent {\n    };\n    var _window_KeyboardEvent;\n    const KeyboardEvent = (_window_KeyboardEvent = window.KeyboardEvent) !== null && _window_KeyboardEvent !== undefined ? _window_KeyboardEvent : class KeyboardEvent extends UIEvent {\n    };\n    var _window_MouseEvent;\n    const MouseEvent = (_window_MouseEvent = window.MouseEvent) !== null && _window_MouseEvent !== undefined ? _window_MouseEvent : class MouseEvent extends UIEvent {\n    };\n    var _window_DragEvent;\n    const DragEvent = (_window_DragEvent = window.DragEvent) !== null && _window_DragEvent !== undefined ? _window_DragEvent : class DragEvent extends MouseEvent {\n    };\n    var _window_PointerEvent;\n    const PointerEvent = (_window_PointerEvent = window.PointerEvent) !== null && _window_PointerEvent !== undefined ? _window_PointerEvent : class PointerEvent extends MouseEvent {\n    };\n    var _window_TouchEvent;\n    const TouchEvent = (_window_TouchEvent = window.TouchEvent) !== null && _window_TouchEvent !== undefined ? _window_TouchEvent : class TouchEvent extends UIEvent {\n    };\n    /* eslint-enable @typescript-eslint/no-unnecessary-condition, @typescript-eslint/no-extraneous-class */ return {\n        Event,\n        AnimationEvent,\n        ClipboardEvent,\n        PopStateEvent,\n        ProgressEvent,\n        TransitionEvent,\n        UIEvent,\n        CompositionEvent,\n        FocusEvent,\n        InputEvent,\n        KeyboardEvent,\n        MouseEvent,\n        DragEvent,\n        PointerEvent,\n        TouchEvent\n    };\n}\nfunction assignProps(obj, props) {\n    for (const [key, value] of Object.entries(props)){\n        Object.defineProperty(obj, key, {\n            get: ()=>value !== null && value !== undefined ? value : null\n        });\n    }\n}\nfunction sanitizeNumber(n) {\n    return Number(n !== null && n !== undefined ? n : 0);\n}\nfunction initClipboardEvent(event, { clipboardData }) {\n    assignProps(event, {\n        clipboardData\n    });\n}\nfunction initFocusEvent(event, { relatedTarget }) {\n    assignProps(event, {\n        relatedTarget\n    });\n}\nfunction initInputEvent(event, { data, inputType, isComposing }) {\n    assignProps(event, {\n        data,\n        isComposing: Boolean(isComposing),\n        inputType: String(inputType)\n    });\n}\nfunction initUIEvent(event, { view, detail }) {\n    assignProps(event, {\n        view,\n        detail: sanitizeNumber(detail !== null && detail !== undefined ? detail : 0)\n    });\n}\nfunction initUIEventModifiers(event, { altKey, ctrlKey, metaKey, shiftKey, modifierAltGraph, modifierCapsLock, modifierFn, modifierFnLock, modifierNumLock, modifierScrollLock, modifierSymbol, modifierSymbolLock }) {\n    assignProps(event, {\n        altKey: Boolean(altKey),\n        ctrlKey: Boolean(ctrlKey),\n        metaKey: Boolean(metaKey),\n        shiftKey: Boolean(shiftKey),\n        getModifierState (k) {\n            return Boolean({\n                Alt: altKey,\n                AltGraph: modifierAltGraph,\n                CapsLock: modifierCapsLock,\n                Control: ctrlKey,\n                Fn: modifierFn,\n                FnLock: modifierFnLock,\n                Meta: metaKey,\n                NumLock: modifierNumLock,\n                ScrollLock: modifierScrollLock,\n                Shift: shiftKey,\n                Symbol: modifierSymbol,\n                SymbolLock: modifierSymbolLock\n            }[k]);\n        }\n    });\n}\nfunction initKeyboardEvent(event, { key, code, location, repeat, isComposing, charCode }) {\n    assignProps(event, {\n        key: String(key),\n        code: String(code),\n        location: sanitizeNumber(location),\n        repeat: Boolean(repeat),\n        isComposing: Boolean(isComposing),\n        charCode\n    });\n}\nfunction initMouseEvent(event, { x, y, screenX, screenY, clientX = x, clientY = y, button, buttons, relatedTarget, offsetX, offsetY, pageX, pageY }) {\n    assignProps(event, {\n        screenX: sanitizeNumber(screenX),\n        screenY: sanitizeNumber(screenY),\n        clientX: sanitizeNumber(clientX),\n        x: sanitizeNumber(clientX),\n        clientY: sanitizeNumber(clientY),\n        y: sanitizeNumber(clientY),\n        button: sanitizeNumber(button),\n        buttons: sanitizeNumber(buttons),\n        relatedTarget,\n        offsetX: sanitizeNumber(offsetX),\n        offsetY: sanitizeNumber(offsetY),\n        pageX: sanitizeNumber(pageX),\n        pageY: sanitizeNumber(pageY)\n    });\n}\nfunction initPointerEvent(event, { pointerId, width, height, pressure, tangentialPressure, tiltX, tiltY, twist, pointerType, isPrimary }) {\n    assignProps(event, {\n        pointerId: sanitizeNumber(pointerId),\n        width: sanitizeNumber(width !== null && width !== undefined ? width : 1),\n        height: sanitizeNumber(height !== null && height !== undefined ? height : 1),\n        pressure: sanitizeNumber(pressure),\n        tangentialPressure: sanitizeNumber(tangentialPressure),\n        tiltX: sanitizeNumber(tiltX),\n        tiltY: sanitizeNumber(tiltY),\n        twist: sanitizeNumber(twist),\n        pointerType: String(pointerType),\n        isPrimary: Boolean(isPrimary)\n    });\n}\n\nexport { createEvent };\n","import './behavior/click.js';\nimport './behavior/cut.js';\nimport './behavior/keydown.js';\nimport './behavior/keypress.js';\nimport './behavior/keyup.js';\nimport './behavior/paste.js';\nimport { behavior } from './behavior/registry.js';\nimport { wrapEvent } from './wrapEvent.js';\nimport { isMouseEvent, isKeyboardEvent } from './eventMap.js';\nimport { createEvent } from './createEvent.js';\n\nfunction dispatchUIEvent(target, type, init, preventDefault = false) {\n    if (isMouseEvent(type) || isKeyboardEvent(type)) {\n        init = {\n            ...init,\n            ...this.system.getUIEventModifiers()\n        };\n    }\n    const event = createEvent(type, target, init);\n    return dispatchEvent.call(this, target, event, preventDefault);\n}\nfunction dispatchEvent(target, event, preventDefault = false) {\n    var _behavior_type;\n    const type = event.type;\n    const behaviorImplementation = preventDefault ? ()=>{} : (_behavior_type = behavior[type]) === null || _behavior_type === undefined ? undefined : _behavior_type.call(behavior, event, target, this);\n    if (behaviorImplementation) {\n        event.preventDefault();\n        let defaultPrevented = false;\n        Object.defineProperty(event, 'defaultPrevented', {\n            get: ()=>defaultPrevented\n        });\n        Object.defineProperty(event, 'preventDefault', {\n            value: ()=>{\n                defaultPrevented = event.cancelable;\n            }\n        });\n        wrapEvent(()=>target.dispatchEvent(event));\n        if (!defaultPrevented) {\n            behaviorImplementation();\n        }\n        return !defaultPrevented;\n    }\n    return wrapEvent(()=>target.dispatchEvent(event));\n}\nfunction dispatchDOMEvent(target, type, init) {\n    const event = createEvent(type, target, init);\n    wrapEvent(()=>target.dispatchEvent(event));\n}\n\nexport { dispatchDOMEvent, dispatchEvent, dispatchUIEvent };\n","import { dispatchDOMEvent } from '../event/dispatchEvent.js';\nimport '../utils/dataTransfer/Clipboard.js';\nimport { getActiveElement } from '../utils/focus/getActiveElement.js';\nimport '@testing-library/dom';\n\nconst patched = Symbol('patched focus/blur methods');\nfunction patchFocus(HTMLElement) {\n    if (HTMLElement.prototype[patched]) {\n        return;\n    }\n    // eslint-disable-next-line @typescript-eslint/unbound-method\n    const { focus, blur } = HTMLElement.prototype;\n    Object.defineProperties(HTMLElement.prototype, {\n        focus: {\n            configurable: true,\n            get: ()=>patchedFocus\n        },\n        blur: {\n            configurable: true,\n            get: ()=>patchedBlur\n        },\n        [patched]: {\n            configurable: true,\n            get: ()=>({\n                    focus,\n                    blur\n                })\n        }\n    });\n    let activeCall;\n    function patchedFocus(options) {\n        if (this.ownerDocument.visibilityState !== 'hidden') {\n            return focus.call(this, options);\n        }\n        const blurred = getActiveTarget(this.ownerDocument);\n        if (blurred === this) {\n            return;\n        }\n        const thisCall = Symbol('focus call');\n        activeCall = thisCall;\n        if (blurred) {\n            blur.call(blurred);\n            dispatchDOMEvent(blurred, 'blur', {\n                relatedTarget: this\n            });\n            dispatchDOMEvent(blurred, 'focusout', {\n                relatedTarget: activeCall === thisCall ? this : null\n            });\n        }\n        if (activeCall === thisCall) {\n            focus.call(this, options);\n            dispatchDOMEvent(this, 'focus', {\n                relatedTarget: blurred\n            });\n        }\n        if (activeCall === thisCall) {\n            dispatchDOMEvent(this, 'focusin', {\n                relatedTarget: blurred\n            });\n        }\n    }\n    function patchedBlur() {\n        if (this.ownerDocument.visibilityState !== 'hidden') {\n            return blur.call(this);\n        }\n        const blurred = getActiveTarget(this.ownerDocument);\n        if (blurred !== this) {\n            return;\n        }\n        const thisCall = Symbol('blur call');\n        activeCall = thisCall;\n        blur.call(this);\n        dispatchDOMEvent(blurred, 'blur', {\n            relatedTarget: null\n        });\n        dispatchDOMEvent(blurred, 'focusout', {\n            relatedTarget: null\n        });\n    }\n}\nfunction getActiveTarget(document) {\n    const active = getActiveElement(document);\n    return (active === null || active === undefined ? undefined : active.tagName) === 'BODY' ? null : active;\n}\nfunction restoreFocus(HTMLElement) {\n    if (HTMLElement.prototype[patched]) {\n        const { focus, blur } = HTMLElement.prototype[patched];\n        Object.defineProperties(HTMLElement.prototype, {\n            focus: {\n                configurable: true,\n                get: ()=>focus\n            },\n            blur: {\n                configurable: true,\n                get: ()=>blur\n            }\n        });\n    }\n}\n\nexport { patchFocus, restoreFocus };\n","import { isElementType } from '../utils/misc/isElementType.js';\nimport '../utils/dataTransfer/Clipboard.js';\nimport { startTrackValue, trackOrSetValue } from './trackValue.js';\nimport { setUISelectionClean, setUISelectionRaw, getUIValue, setUIValueClean, isUIValue, isUISelectionStart } from './UI.js';\n\nconst Interceptor = Symbol('Interceptor for programmatical calls');\nfunction prepareInterceptor(element, propName, interceptorImpl) {\n    const prototypeDescriptor = Object.getOwnPropertyDescriptor(element.constructor.prototype, propName);\n    const objectDescriptor = Object.getOwnPropertyDescriptor(element, propName);\n    const target = (prototypeDescriptor === null || prototypeDescriptor === undefined ? undefined : prototypeDescriptor.set) ? 'set' : 'value';\n    /* istanbul ignore if */ if (typeof (prototypeDescriptor === null || prototypeDescriptor === undefined ? undefined : prototypeDescriptor[target]) !== 'function' || prototypeDescriptor[target][Interceptor]) {\n        throw new Error(`Element ${element.tagName} does not implement \"${String(propName)}\".`);\n    }\n    function intercept(...args) {\n        const { applyNative = false, realArgs, then } = interceptorImpl.call(this, ...args);\n        const realFunc = (!applyNative && objectDescriptor || prototypeDescriptor)[target];\n        if (target === 'set') {\n            realFunc.call(this, realArgs);\n        } else {\n            realFunc.call(this, ...realArgs);\n        }\n        then === null || then === undefined ? undefined : then();\n    }\n    intercept[Interceptor] = Interceptor;\n    Object.defineProperty(element, propName, {\n        ...objectDescriptor !== null && objectDescriptor !== undefined ? objectDescriptor : prototypeDescriptor,\n        [target]: intercept\n    });\n}\nfunction prepareValueInterceptor(element) {\n    prepareInterceptor(element, 'value', function interceptorImpl(v) {\n        const isUI = isUIValue(v);\n        if (isUI) {\n            startTrackValue(this);\n        }\n        return {\n            applyNative: !!isUI,\n            realArgs: sanitizeValue(this, v),\n            then: isUI ? undefined : ()=>trackOrSetValue(this, String(v))\n        };\n    });\n}\nfunction sanitizeValue(element, v) {\n    // Workaround for JSDOM\n    if (isElementType(element, 'input', {\n        type: 'number'\n    }) && String(v) !== '' && !Number.isNaN(Number(v))) {\n        // Setting value to \"1.\" results in `null` in JSDOM\n        return String(Number(v));\n    }\n    return String(v);\n}\nfunction prepareSelectionInterceptor(element) {\n    prepareInterceptor(element, 'setSelectionRange', function interceptorImpl(start, ...others) {\n        const isUI = isUISelectionStart(start);\n        return {\n            applyNative: !!isUI,\n            realArgs: [\n                Number(start),\n                ...others\n            ],\n            then: ()=>isUI ? undefined : setUISelectionClean(element)\n        };\n    });\n    prepareInterceptor(element, 'selectionStart', function interceptorImpl(v) {\n        return {\n            realArgs: v,\n            then: ()=>setUISelectionClean(element)\n        };\n    });\n    prepareInterceptor(element, 'selectionEnd', function interceptorImpl(v) {\n        return {\n            realArgs: v,\n            then: ()=>setUISelectionClean(element)\n        };\n    });\n    prepareInterceptor(element, 'select', function interceptorImpl() {\n        return {\n            realArgs: [],\n            then: ()=>setUISelectionRaw(element, {\n                    anchorOffset: 0,\n                    focusOffset: getUIValue(element).length\n                })\n        };\n    });\n}\nfunction prepareRangeTextInterceptor(element) {\n    prepareInterceptor(element, 'setRangeText', function interceptorImpl(...realArgs) {\n        return {\n            realArgs,\n            then: ()=>{\n                setUIValueClean(element);\n                setUISelectionClean(element);\n            }\n        };\n    });\n}\n\nexport { prepareInterceptor, prepareRangeTextInterceptor, prepareSelectionInterceptor, prepareValueInterceptor };\n","import { dispatchDOMEvent } from '../event/dispatchEvent.js';\nimport { isElementType } from '../utils/misc/isElementType.js';\nimport '../utils/dataTransfer/Clipboard.js';\nimport { getInitialValue, clearInitialValue } from './UI.js';\nimport '@testing-library/dom';\nimport { prepareValueInterceptor, prepareSelectionInterceptor, prepareRangeTextInterceptor } from './interceptor.js';\n\nconst isPrepared = Symbol('Node prepared with document state workarounds');\nfunction prepareDocument(document) {\n    if (document[isPrepared]) {\n        return;\n    }\n    document.addEventListener('focus', (e)=>{\n        const el = e.target;\n        prepareElement(el);\n    }, {\n        capture: true,\n        passive: true\n    });\n    // Our test environment defaults to `document.body` as `activeElement`.\n    // In other environments this might be `null` when preparing.\n    // istanbul ignore else\n    if (document.activeElement) {\n        prepareElement(document.activeElement);\n    }\n    document.addEventListener('blur', (e)=>{\n        const el = e.target;\n        const initialValue = getInitialValue(el);\n        if (initialValue !== undefined) {\n            if (el.value !== initialValue) {\n                dispatchDOMEvent(el, 'change');\n            }\n            clearInitialValue(el);\n        }\n    }, {\n        capture: true,\n        passive: true\n    });\n    document[isPrepared] = isPrepared;\n}\nfunction prepareElement(el) {\n    if (el[isPrepared]) {\n        return;\n    }\n    if (isElementType(el, [\n        'input',\n        'textarea'\n    ])) {\n        prepareValueInterceptor(el);\n        prepareSelectionInterceptor(el);\n        prepareRangeTextInterceptor(el);\n    }\n    el[isPrepared] = isPrepared;\n}\n\nexport { prepareDocument };\n","function getDocumentFromNode(el) {\n    return isDocument(el) ? el : el.ownerDocument;\n}\nfunction isDocument(node) {\n    return node.nodeType === 9;\n}\n\nexport { getDocumentFromNode };\n","var ApiLevel = /*#__PURE__*/ function(ApiLevel) {\n    ApiLevel[ApiLevel[\"Trigger\"] = 2] = \"Trigger\";\n    ApiLevel[ApiLevel[\"Call\"] = 1] = \"Call\";\n    return ApiLevel;\n}({});\nfunction setLevelRef(instance, level) {\n    instance.levelRefs[level] = {};\n}\nfunction getLevelRef(instance, level) {\n    return instance.levelRefs[level];\n}\n\nexport { ApiLevel, getLevelRef, setLevelRef };\n","function wait(config) {\n    const delay = config.delay;\n    if (typeof delay !== 'number') {\n        return;\n    }\n    return Promise.all([\n        new Promise((resolve)=>globalThis.setTimeout(()=>resolve(), delay)),\n        config.advanceTimers(delay)\n    ]);\n}\n\nexport { wait };\n","var PointerEventsCheckLevel = /*#__PURE__*/ function(PointerEventsCheckLevel) {\n    /**\n   * Check pointer events on every user interaction that triggers a bunch of events.\n   * E.g. once for releasing a mouse button even though this triggers `pointerup`, `mouseup`, `click`, etc...\n   */ PointerEventsCheckLevel[PointerEventsCheckLevel[\"EachTrigger\"] = 4] = \"EachTrigger\";\n    /** Check each target once per call to pointer (related) API */ PointerEventsCheckLevel[PointerEventsCheckLevel[\"EachApiCall\"] = 2] = \"EachApiCall\";\n    /** Check each event target once */ PointerEventsCheckLevel[PointerEventsCheckLevel[\"EachTarget\"] = 1] = \"EachTarget\";\n    /** No pointer events check */ PointerEventsCheckLevel[PointerEventsCheckLevel[\"Never\"] = 0] = \"Never\";\n    return PointerEventsCheckLevel;\n}({});\n\nexport { PointerEventsCheckLevel };\n","import '../utils/dataTransfer/Clipboard.js';\nimport { getActiveElementOrBody } from '../utils/focus/getActiveElement.js';\n\nfunction _define_property(obj, key, value) {\n    if (key in obj) {\n        Object.defineProperty(obj, key, {\n            value: value,\n            enumerable: true,\n            configurable: true,\n            writable: true\n        });\n    } else {\n        obj[key] = value;\n    }\n    return obj;\n}\nvar DOM_KEY_LOCATION = /*#__PURE__*/ function(DOM_KEY_LOCATION) {\n    DOM_KEY_LOCATION[DOM_KEY_LOCATION[\"STANDARD\"] = 0] = \"STANDARD\";\n    DOM_KEY_LOCATION[DOM_KEY_LOCATION[\"LEFT\"] = 1] = \"LEFT\";\n    DOM_KEY_LOCATION[DOM_KEY_LOCATION[\"RIGHT\"] = 2] = \"RIGHT\";\n    DOM_KEY_LOCATION[DOM_KEY_LOCATION[\"NUMPAD\"] = 3] = \"NUMPAD\";\n    return DOM_KEY_LOCATION;\n}({});\nconst modifierKeys = [\n    'Alt',\n    'AltGraph',\n    'Control',\n    'Fn',\n    'Meta',\n    'Shift',\n    'Symbol'\n];\nfunction isModifierKey(key) {\n    return modifierKeys.includes(key);\n}\nconst modifierLocks = [\n    'CapsLock',\n    'FnLock',\n    'NumLock',\n    'ScrollLock',\n    'SymbolLock'\n];\nfunction isModifierLock(key) {\n    return modifierLocks.includes(key);\n}\nclass KeyboardHost {\n    isKeyPressed(keyDef) {\n        return this.pressed.has(String(keyDef.code));\n    }\n    getPressedKeys() {\n        return this.pressed.values().map((p)=>p.keyDef);\n    }\n    /** Press a key */ async keydown(instance, keyDef) {\n        const key = String(keyDef.key);\n        const code = String(keyDef.code);\n        const target = getActiveElementOrBody(instance.config.document);\n        this.setKeydownTarget(target);\n        this.pressed.add(code, keyDef);\n        if (isModifierKey(key)) {\n            this.modifiers[key] = true;\n        }\n        const unprevented = instance.dispatchUIEvent(target, 'keydown', {\n            key,\n            code\n        });\n        if (isModifierLock(key) && !this.modifiers[key]) {\n            this.modifiers[key] = true;\n            this.modifierLockStart[key] = true;\n        }\n        if (unprevented) {\n            this.pressed.setUnprevented(code);\n        }\n        if (unprevented && this.hasKeyPress(key)) {\n            instance.dispatchUIEvent(getActiveElementOrBody(instance.config.document), 'keypress', {\n                key,\n                code,\n                charCode: keyDef.key === 'Enter' ? 13 : String(keyDef.key).charCodeAt(0)\n            });\n        }\n    }\n    /** Release a key */ async keyup(instance, keyDef) {\n        const key = String(keyDef.key);\n        const code = String(keyDef.code);\n        const unprevented = this.pressed.isUnprevented(code);\n        this.pressed.delete(code);\n        if (isModifierKey(key) && !this.pressed.values().find((p)=>p.keyDef.key === key)) {\n            this.modifiers[key] = false;\n        }\n        instance.dispatchUIEvent(getActiveElementOrBody(instance.config.document), 'keyup', {\n            key,\n            code\n        }, !unprevented);\n        if (isModifierLock(key) && this.modifiers[key]) {\n            if (this.modifierLockStart[key]) {\n                this.modifierLockStart[key] = false;\n            } else {\n                this.modifiers[key] = false;\n            }\n        }\n    }\n    setKeydownTarget(target) {\n        if (target !== this.lastKeydownTarget) {\n            this.carryChar = '';\n        }\n        this.lastKeydownTarget = target;\n    }\n    hasKeyPress(key) {\n        return (key.length === 1 || key === 'Enter') && !this.modifiers.Control && !this.modifiers.Alt;\n    }\n    constructor(system){\n        _define_property(this, \"system\", undefined);\n        _define_property(this, \"modifiers\", {\n            Alt: false,\n            AltGraph: false,\n            CapsLock: false,\n            Control: false,\n            Fn: false,\n            FnLock: false,\n            Meta: false,\n            NumLock: false,\n            ScrollLock: false,\n            Shift: false,\n            Symbol: false,\n            SymbolLock: false\n        });\n        _define_property(this, \"pressed\", new class {\n            add(code, keyDef) {\n                var _this_registry, _code;\n                var _;\n                (_ = (_this_registry = this.registry)[_code = code]) !== null && _ !== undefined ? _ : _this_registry[_code] = {\n                    keyDef,\n                    unpreventedDefault: false\n                };\n            }\n            has(code) {\n                return !!this.registry[code];\n            }\n            setUnprevented(code) {\n                const o = this.registry[code];\n                if (o) {\n                    o.unpreventedDefault = true;\n                }\n            }\n            isUnprevented(code) {\n                var _this_registry_code;\n                return !!((_this_registry_code = this.registry[code]) === null || _this_registry_code === undefined ? undefined : _this_registry_code.unpreventedDefault);\n            }\n            delete(code) {\n                // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n                delete this.registry[code];\n            }\n            values() {\n                return Object.values(this.registry);\n            }\n            constructor(){\n                _define_property(this, \"registry\", {});\n            }\n        }());\n        _define_property(this, \"carryChar\", '');\n        _define_property(this, \"lastKeydownTarget\", undefined);\n        _define_property(this, \"modifierLockStart\", {});\n        this.system = system;\n    }\n}\n\nexport { DOM_KEY_LOCATION, KeyboardHost };\n","import { DOM_KEY_LOCATION } from '../system/keyboard.js';\n\n/**\n * Mapping for a default US-104-QWERTY keyboard\n */ const defaultKeyMap = [\n    // alphanumeric block - writing system\n    ...'0123456789'.split('').map((c)=>({\n            code: `Digit${c}`,\n            key: c\n        })),\n    ...')!@#$%^&*('.split('').map((c, i)=>({\n            code: `Digit${i}`,\n            key: c,\n            shiftKey: true\n        })),\n    ...'abcdefghijklmnopqrstuvwxyz'.split('').map((c)=>({\n            code: `Key${c.toUpperCase()}`,\n            key: c\n        })),\n    ...'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.split('').map((c)=>({\n            code: `Key${c}`,\n            key: c,\n            shiftKey: true\n        })),\n    {\n        code: 'BracketLeft',\n        key: '['\n    },\n    {\n        code: 'BracketLeft',\n        key: '{',\n        shiftKey: true\n    },\n    {\n        code: 'BracketRight',\n        key: ']'\n    },\n    {\n        code: 'BracketRight',\n        key: '}',\n        shiftKey: true\n    },\n    // alphanumeric block - functional\n    {\n        code: 'Space',\n        key: ' '\n    },\n    {\n        code: 'AltLeft',\n        key: 'Alt',\n        location: DOM_KEY_LOCATION.LEFT\n    },\n    {\n        code: 'AltRight',\n        key: 'Alt',\n        location: DOM_KEY_LOCATION.RIGHT\n    },\n    {\n        code: 'ShiftLeft',\n        key: 'Shift',\n        location: DOM_KEY_LOCATION.LEFT\n    },\n    {\n        code: 'ShiftRight',\n        key: 'Shift',\n        location: DOM_KEY_LOCATION.RIGHT\n    },\n    {\n        code: 'ControlLeft',\n        key: 'Control',\n        location: DOM_KEY_LOCATION.LEFT\n    },\n    {\n        code: 'ControlRight',\n        key: 'Control',\n        location: DOM_KEY_LOCATION.RIGHT\n    },\n    {\n        code: 'MetaLeft',\n        key: 'Meta',\n        location: DOM_KEY_LOCATION.LEFT\n    },\n    {\n        code: 'MetaRight',\n        key: 'Meta',\n        location: DOM_KEY_LOCATION.RIGHT\n    },\n    {\n        code: 'OSLeft',\n        key: 'OS',\n        location: DOM_KEY_LOCATION.LEFT\n    },\n    {\n        code: 'OSRight',\n        key: 'OS',\n        location: DOM_KEY_LOCATION.RIGHT\n    },\n    {\n        code: 'ContextMenu',\n        key: 'ContextMenu'\n    },\n    {\n        code: 'Tab',\n        key: 'Tab'\n    },\n    {\n        code: 'CapsLock',\n        key: 'CapsLock'\n    },\n    {\n        code: 'Backspace',\n        key: 'Backspace'\n    },\n    {\n        code: 'Enter',\n        key: 'Enter'\n    },\n    // function\n    {\n        code: 'Escape',\n        key: 'Escape'\n    },\n    // arrows\n    {\n        code: 'ArrowUp',\n        key: 'ArrowUp'\n    },\n    {\n        code: 'ArrowDown',\n        key: 'ArrowDown'\n    },\n    {\n        code: 'ArrowLeft',\n        key: 'ArrowLeft'\n    },\n    {\n        code: 'ArrowRight',\n        key: 'ArrowRight'\n    },\n    // control pad\n    {\n        code: 'Home',\n        key: 'Home'\n    },\n    {\n        code: 'End',\n        key: 'End'\n    },\n    {\n        code: 'Delete',\n        key: 'Delete'\n    },\n    {\n        code: 'PageUp',\n        key: 'PageUp'\n    },\n    {\n        code: 'PageDown',\n        key: 'PageDown'\n    },\n    // Special keys that are not part of a default US-layout but included for specific behavior\n    {\n        code: 'Fn',\n        key: 'Fn'\n    },\n    {\n        code: 'Symbol',\n        key: 'Symbol'\n    },\n    {\n        code: 'AltRight',\n        key: 'AltGraph'\n    }\n];\n\nexport { defaultKeyMap };\n","const defaultKeyMap = [\n    {\n        name: 'MouseLeft',\n        pointerType: 'mouse',\n        button: 'primary'\n    },\n    {\n        name: 'MouseRight',\n        pointerType: 'mouse',\n        button: 'secondary'\n    },\n    {\n        name: 'MouseMiddle',\n        pointerType: 'mouse',\n        button: 'auxiliary'\n    },\n    {\n        name: 'TouchA',\n        pointerType: 'touch'\n    },\n    {\n        name: 'TouchB',\n        pointerType: 'touch'\n    },\n    {\n        name: 'TouchC',\n        pointerType: 'touch'\n    }\n];\n\nexport { defaultKeyMap };\n","function _define_property(obj, key, value) {\n    if (key in obj) {\n        Object.defineProperty(obj, key, {\n            value: value,\n            enumerable: true,\n            configurable: true,\n            writable: true\n        });\n    } else {\n        obj[key] = value;\n    }\n    return obj;\n}\nclass Buttons {\n    getButtons() {\n        let v = 0;\n        for (const button of Object.keys(this.pressed)){\n            // eslint-disable-next-line no-bitwise\n            v |= 2 ** Number(button);\n        }\n        return v;\n    }\n    down(keyDef) {\n        const button = getMouseButtonId(keyDef.button);\n        if (button in this.pressed) {\n            this.pressed[button].push(keyDef);\n            return undefined;\n        }\n        this.pressed[button] = [\n            keyDef\n        ];\n        return button;\n    }\n    up(keyDef) {\n        const button = getMouseButtonId(keyDef.button);\n        if (button in this.pressed) {\n            this.pressed[button] = this.pressed[button].filter((k)=>k.name !== keyDef.name);\n            if (this.pressed[button].length === 0) {\n                // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n                delete this.pressed[button];\n                return button;\n            }\n        }\n        return undefined;\n    }\n    constructor(){\n        _define_property(this, \"pressed\", {});\n    }\n}\nconst MouseButton = {\n    primary: 0,\n    secondary: 1,\n    auxiliary: 2,\n    back: 3,\n    X1: 3,\n    forward: 4,\n    X2: 4\n};\nfunction getMouseButtonId(button = 0) {\n    if (button in MouseButton) {\n        return MouseButton[button];\n    }\n    return Number(button);\n}\n// On the `MouseEvent.button` property auxiliary and secondary button are flipped compared to `MouseEvent.buttons`.\nconst MouseButtonFlip = {\n    1: 2,\n    2: 1\n};\nfunction getMouseEventButton(button) {\n    button = getMouseButtonId(button);\n    if (button in MouseButtonFlip) {\n        return MouseButtonFlip[button];\n    }\n    return button;\n}\n\nexport { Buttons, MouseButton, MouseButtonFlip, getMouseButtonId, getMouseEventButton };\n","function _define_property(obj, key, value) {\n    if (key in obj) {\n        Object.defineProperty(obj, key, {\n            value: value,\n            enumerable: true,\n            configurable: true,\n            writable: true\n        });\n    } else {\n        obj[key] = value;\n    }\n    return obj;\n}\nclass Device {\n    get countPressed() {\n        return this.pressedKeys.size;\n    }\n    isPressed(keyDef) {\n        return this.pressedKeys.has(keyDef.name);\n    }\n    addPressed(keyDef) {\n        return this.pressedKeys.add(keyDef.name);\n    }\n    removePressed(keyDef) {\n        return this.pressedKeys.delete(keyDef.name);\n    }\n    constructor(){\n        _define_property(this, \"pressedKeys\", new Set());\n    }\n}\n\nexport { Device };\n","function getTreeDiff(a, b) {\n    const treeA = [];\n    for(let el = a; el; el = el.parentElement){\n        treeA.push(el);\n    }\n    const treeB = [];\n    for(let el = b; el; el = el.parentElement){\n        treeB.push(el);\n    }\n    let i = 0;\n    for(;; i++){\n        if (i >= treeA.length || i >= treeB.length || treeA[treeA.length - 1 - i] !== treeB[treeB.length - 1 - i]) {\n            break;\n        }\n    }\n    return [\n        treeA.slice(0, treeA.length - i),\n        treeB.slice(0, treeB.length - i),\n        treeB.slice(treeB.length - i)\n    ];\n}\n\nexport { getTreeDiff };\n","import { getUIValue } from '../../document/UI.js';\nimport '../../utils/dataTransfer/Clipboard.js';\nimport { hasOwnSelection } from '../../utils/focus/selection.js';\n\nfunction resolveCaretPosition({ target, node, offset }) {\n    if (hasOwnSelection(target)) {\n        return {\n            node: target,\n            offset: offset !== null && offset !== undefined ? offset : getUIValue(target).length\n        };\n    } else if (node) {\n        return {\n            node,\n            offset: offset !== null && offset !== undefined ? offset : node.nodeType === 3 ? node.nodeValue.length : node.childNodes.length\n        };\n    }\n    return findNodeAtTextOffset(target, offset);\n}\nfunction findNodeAtTextOffset(node, offset, isRoot = true) {\n    // When clicking after the content the browser behavior can be complicated:\n    // 1. If there is textContent after the last element child,\n    // the cursor is moved there.\n    // 2. If there is textContent in the last element child,\n    // the browser moves the cursor to the last non-empty text node inside this element.\n    // 3. Otherwise the cursor is moved to the end of the target.\n    let i = offset === undefined ? node.childNodes.length - 1 : 0;\n    const step = offset === undefined ? -1 : 1;\n    while(offset === undefined ? i >= (isRoot ? Math.max(node.childNodes.length - 1, 0) : 0) : i <= node.childNodes.length){\n        if (offset && i === node.childNodes.length) {\n            throw new Error('The given offset is out of bounds.');\n        }\n        const c = node.childNodes.item(i);\n        const text = String(c.textContent);\n        if (text.length) {\n            if (offset !== undefined && text.length < offset) {\n                offset -= text.length;\n            } else if (c.nodeType === 1) {\n                return findNodeAtTextOffset(c, offset, false);\n            } else {\n                // The pre-commit hooks keeps changing this\n                // See https://github.com/kentcdodds/kcd-scripts/issues/218\n                /* istanbul ignore else */ // eslint-disable-next-line no-lonely-if\n                if (c.nodeType === 3) {\n                    return {\n                        node: c,\n                        offset: offset !== null && offset !== undefined ? offset : c.nodeValue.length\n                    };\n                }\n            }\n        }\n        i += step;\n    }\n    return {\n        node,\n        offset: node.childNodes.length\n    };\n}\n\nexport { resolveCaretPosition };\n","import { getUIValue, setUISelection } from '../../document/UI.js';\nimport '../../utils/dataTransfer/Clipboard.js';\nimport { hasNoSelection, hasOwnSelection } from '../../utils/focus/selection.js';\nimport { resolveCaretPosition } from './resolveCaretPosition.js';\n\nfunction setSelectionPerMouseDown({ document, target, clickCount, node, offset }) {\n    if (hasNoSelection(target)) {\n        return;\n    }\n    const targetHasOwnSelection = hasOwnSelection(target);\n    // On non-input elements the text selection per multiple click\n    // can extend beyond the target boundaries.\n    // The exact mechanism what is considered in the same line is unclear.\n    // Looks it might be every inline element.\n    // TODO: Check what might be considered part of the same line of text.\n    const text = String(targetHasOwnSelection ? getUIValue(target) : target.textContent);\n    const [start, end] = node ? // which elements might be considered in the same line of text.\n    // TODO: support expanding initial range on multiple clicks if node is given\n    [\n        offset,\n        offset\n    ] : getTextRange(text, offset, clickCount);\n    // TODO: implement modifying selection per shift/ctrl+mouse\n    if (targetHasOwnSelection) {\n        setUISelection(target, {\n            anchorOffset: start !== null && start !== undefined ? start : text.length,\n            focusOffset: end !== null && end !== undefined ? end : text.length\n        });\n        return {\n            node: target,\n            start: start !== null && start !== undefined ? start : 0,\n            end: end !== null && end !== undefined ? end : text.length\n        };\n    } else {\n        const { node: startNode, offset: startOffset } = resolveCaretPosition({\n            target,\n            node,\n            offset: start\n        });\n        const { node: endNode, offset: endOffset } = resolveCaretPosition({\n            target,\n            node,\n            offset: end\n        });\n        const range = target.ownerDocument.createRange();\n        try {\n            range.setStart(startNode, startOffset);\n            range.setEnd(endNode, endOffset);\n        } catch (e) {\n            throw new Error('The given offset is out of bounds.');\n        }\n        const selection = document.getSelection();\n        selection === null || selection === undefined ? undefined : selection.removeAllRanges();\n        selection === null || selection === undefined ? undefined : selection.addRange(range.cloneRange());\n        return range;\n    }\n}\nfunction getTextRange(text, pos, clickCount) {\n    if (clickCount % 3 === 1 || text.length === 0) {\n        return [\n            pos,\n            pos\n        ];\n    }\n    const textPos = pos !== null && pos !== undefined ? pos : text.length;\n    if (clickCount % 3 === 2) {\n        return [\n            textPos - text.substr(0, pos).match(/(\\w+|\\s+|\\W)?$/)[0].length,\n            pos === undefined ? pos : pos + text.substr(pos).match(/^(\\w+|\\s+|\\W)?/)[0].length\n        ];\n    }\n    // triple click\n    return [\n        textPos - text.substr(0, pos).match(/[^\\r\\n]*$/)[0].length,\n        pos === undefined ? pos : pos + text.substr(pos).match(/^[^\\r\\n]*/)[0].length\n    ];\n}\n\nexport { setSelectionPerMouseDown };\n","import { setUISelection } from '../../document/UI.js';\nimport '../../utils/dataTransfer/Clipboard.js';\nimport { resolveCaretPosition } from './resolveCaretPosition.js';\n\nfunction modifySelectionPerMouseMove(selectionRange, { document, target, node, offset }) {\n    const selectionFocus = resolveCaretPosition({\n        target,\n        node,\n        offset\n    });\n    if ('node' in selectionRange) {\n        // When the mouse is dragged outside of an input/textarea,\n        // the selection is extended to the beginning or end of the input\n        // depending on pointer position.\n        // TODO: extend selection according to pointer position\n        /* istanbul ignore else */ if (selectionFocus.node === selectionRange.node) {\n            const anchorOffset = selectionFocus.offset < selectionRange.start ? selectionRange.end : selectionRange.start;\n            const focusOffset = selectionFocus.offset > selectionRange.end || selectionFocus.offset < selectionRange.start ? selectionFocus.offset : selectionRange.end;\n            setUISelection(selectionRange.node, {\n                anchorOffset,\n                focusOffset\n            });\n        }\n    } else {\n        const range = selectionRange.cloneRange();\n        const cmp = range.comparePoint(selectionFocus.node, selectionFocus.offset);\n        if (cmp < 0) {\n            range.setStart(selectionFocus.node, selectionFocus.offset);\n        } else if (cmp > 0) {\n            range.setEnd(selectionFocus.node, selectionFocus.offset);\n        }\n        const selection = document.getSelection();\n        selection === null || selection === undefined ? undefined : selection.removeAllRanges();\n        selection === null || selection === undefined ? undefined : selection.addRange(range.cloneRange());\n    }\n}\n\nexport { modifySelectionPerMouseMove };\n","function isDifferentPointerPosition(positionA, positionB) {\n    var _positionA_coords, _positionB_coords, _positionA_coords1, _positionB_coords1, _positionA_coords2, _positionB_coords2, _positionA_coords3, _positionB_coords3, _positionA_coords4, _positionB_coords4, _positionA_coords5, _positionB_coords5, _positionA_coords6, _positionB_coords6, _positionA_coords7, _positionB_coords7, _positionA_coords8, _positionB_coords8, _positionA_coords9, _positionB_coords9, _positionA_caret, _positionB_caret, _positionA_caret1, _positionB_caret1;\n    return positionA.target !== positionB.target || ((_positionA_coords = positionA.coords) === null || _positionA_coords === undefined ? undefined : _positionA_coords.x) !== ((_positionB_coords = positionB.coords) === null || _positionB_coords === undefined ? undefined : _positionB_coords.x) || ((_positionA_coords1 = positionA.coords) === null || _positionA_coords1 === undefined ? undefined : _positionA_coords1.y) !== ((_positionB_coords1 = positionB.coords) === null || _positionB_coords1 === undefined ? undefined : _positionB_coords1.y) || ((_positionA_coords2 = positionA.coords) === null || _positionA_coords2 === undefined ? undefined : _positionA_coords2.clientX) !== ((_positionB_coords2 = positionB.coords) === null || _positionB_coords2 === undefined ? undefined : _positionB_coords2.clientX) || ((_positionA_coords3 = positionA.coords) === null || _positionA_coords3 === undefined ? undefined : _positionA_coords3.clientY) !== ((_positionB_coords3 = positionB.coords) === null || _positionB_coords3 === undefined ? undefined : _positionB_coords3.clientY) || ((_positionA_coords4 = positionA.coords) === null || _positionA_coords4 === undefined ? undefined : _positionA_coords4.offsetX) !== ((_positionB_coords4 = positionB.coords) === null || _positionB_coords4 === undefined ? undefined : _positionB_coords4.offsetX) || ((_positionA_coords5 = positionA.coords) === null || _positionA_coords5 === undefined ? undefined : _positionA_coords5.offsetY) !== ((_positionB_coords5 = positionB.coords) === null || _positionB_coords5 === undefined ? undefined : _positionB_coords5.offsetY) || ((_positionA_coords6 = positionA.coords) === null || _positionA_coords6 === undefined ? undefined : _positionA_coords6.pageX) !== ((_positionB_coords6 = positionB.coords) === null || _positionB_coords6 === undefined ? undefined : _positionB_coords6.pageX) || ((_positionA_coords7 = positionA.coords) === null || _positionA_coords7 === undefined ? undefined : _positionA_coords7.pageY) !== ((_positionB_coords7 = positionB.coords) === null || _positionB_coords7 === undefined ? undefined : _positionB_coords7.pageY) || ((_positionA_coords8 = positionA.coords) === null || _positionA_coords8 === undefined ? undefined : _positionA_coords8.screenX) !== ((_positionB_coords8 = positionB.coords) === null || _positionB_coords8 === undefined ? undefined : _positionB_coords8.screenX) || ((_positionA_coords9 = positionA.coords) === null || _positionA_coords9 === undefined ? undefined : _positionA_coords9.screenY) !== ((_positionB_coords9 = positionB.coords) === null || _positionB_coords9 === undefined ? undefined : _positionB_coords9.screenY) || ((_positionA_caret = positionA.caret) === null || _positionA_caret === undefined ? undefined : _positionA_caret.node) !== ((_positionB_caret = positionB.caret) === null || _positionB_caret === undefined ? undefined : _positionB_caret.node) || ((_positionA_caret1 = positionA.caret) === null || _positionA_caret1 === undefined ? undefined : _positionA_caret1.offset) !== ((_positionB_caret1 = positionB.caret) === null || _positionB_caret1 === undefined ? undefined : _positionB_caret1.offset);\n}\n\nexport { isDifferentPointerPosition };\n","import '../../event/behavior/click.js';\nimport '../../event/behavior/cut.js';\nimport '../../event/behavior/keydown.js';\nimport '../../event/behavior/keypress.js';\nimport '../../event/behavior/keyup.js';\nimport '../../event/behavior/paste.js';\nimport '@testing-library/dom';\nimport '../../utils/dataTransfer/Clipboard.js';\nimport { isDisabled } from '../../utils/misc/isDisabled.js';\nimport { getTreeDiff } from '../../utils/misc/getTreeDiff.js';\nimport { focusElement } from '../../event/focus.js';\nimport { setSelectionPerMouseDown } from '../../event/selection/setSelectionPerMouse.js';\nimport { modifySelectionPerMouseMove } from '../../event/selection/modifySelectionPerMouse.js';\nimport { getMouseEventButton, Buttons } from './buttons.js';\nimport { isDifferentPointerPosition } from './shared.js';\n\nfunction _define_property(obj, key, value) {\n    if (key in obj) {\n        Object.defineProperty(obj, key, {\n            value: value,\n            enumerable: true,\n            configurable: true,\n            writable: true\n        });\n    } else {\n        obj[key] = value;\n    }\n    return obj;\n}\n/**\n * This object is the single \"virtual\" mouse that might be controlled by multiple different pointer devices.\n */ class Mouse {\n    move(instance, position, /** Whether `preventDefault()` has been called on the `pointerdown` event */ isPrevented) {\n        const prevPosition = this.position;\n        const prevTarget = this.getTarget(instance);\n        this.position = position;\n        if (!isDifferentPointerPosition(prevPosition, position)) {\n            return;\n        }\n        const nextTarget = this.getTarget(instance);\n        const init = this.getEventInit('mousemove');\n        const [leave, enter] = getTreeDiff(prevTarget, nextTarget);\n        return {\n            leave: ()=>{\n                if (prevTarget !== nextTarget) {\n                    instance.dispatchUIEvent(prevTarget, 'mouseout', init);\n                    leave.forEach((el)=>instance.dispatchUIEvent(el, 'mouseleave', init));\n                }\n            },\n            enter: ()=>{\n                if (prevTarget !== nextTarget) {\n                    instance.dispatchUIEvent(nextTarget, 'mouseover', init);\n                    enter.forEach((el)=>instance.dispatchUIEvent(el, 'mouseenter', init));\n                }\n            },\n            move: ()=>{\n                if (isPrevented) {\n                    return;\n                }\n                instance.dispatchUIEvent(nextTarget, 'mousemove', init);\n                this.modifySelecting(instance);\n            }\n        };\n    }\n    down(instance, keyDef, /** Whether `preventDefault()` has been called on the `pointerdown` event */ isPrevented) {\n        const button = this.buttons.down(keyDef);\n        if (button === undefined) {\n            return;\n        }\n        const target = this.getTarget(instance);\n        this.buttonDownTarget[button] = target;\n        const init = this.getEventInit('mousedown', keyDef.button);\n        const disabled = isDisabled(target);\n        if (!isPrevented && (disabled || instance.dispatchUIEvent(target, 'mousedown', init))) {\n            this.startSelecting(instance, init.detail);\n            focusElement(target);\n        }\n        if (!disabled && getMouseEventButton(keyDef.button) === 2) {\n            instance.dispatchUIEvent(target, 'contextmenu', this.getEventInit('contextmenu', keyDef.button));\n        }\n    }\n    up(instance, keyDef, /** Whether `preventDefault()` has been called on the `pointerdown` event */ isPrevented) {\n        const button = this.buttons.up(keyDef);\n        if (button === undefined) {\n            return;\n        }\n        const target = this.getTarget(instance);\n        if (!isDisabled(target)) {\n            if (!isPrevented) {\n                const mouseUpInit = this.getEventInit('mouseup', keyDef.button);\n                instance.dispatchUIEvent(target, 'mouseup', mouseUpInit);\n                this.endSelecting();\n            }\n            const clickTarget = getTreeDiff(this.buttonDownTarget[button], target)[2][0];\n            if (clickTarget) {\n                const init = this.getEventInit('click', keyDef.button);\n                if (init.detail) {\n                    instance.dispatchUIEvent(clickTarget, init.button === 0 ? 'click' : 'auxclick', init);\n                    if (init.button === 0 && init.detail === 2) {\n                        instance.dispatchUIEvent(clickTarget, 'dblclick', {\n                            ...this.getEventInit('dblclick', keyDef.button),\n                            detail: init.detail\n                        });\n                    }\n                }\n            }\n        }\n    }\n    resetClickCount() {\n        this.clickCount.reset();\n    }\n    getEventInit(type, button) {\n        const init = {\n            ...this.position.coords\n        };\n        init.button = getMouseEventButton(button);\n        init.buttons = this.buttons.getButtons();\n        if (type === 'mousedown') {\n            init.detail = this.clickCount.getOnDown(init.button);\n        } else if (type === 'mouseup') {\n            init.detail = this.clickCount.getOnUp(init.button);\n        } else if (type === 'click' || type === 'auxclick') {\n            init.detail = this.clickCount.incOnClick(init.button);\n        }\n        return init;\n    }\n    getTarget(instance) {\n        var _this_position_target;\n        return (_this_position_target = this.position.target) !== null && _this_position_target !== undefined ? _this_position_target : instance.config.document.body;\n    }\n    startSelecting(instance, clickCount) {\n        var _this_position_caret, _this_position_caret1;\n        // TODO: support extending range (shift)\n        this.selecting = setSelectionPerMouseDown({\n            document: instance.config.document,\n            target: this.getTarget(instance),\n            node: (_this_position_caret = this.position.caret) === null || _this_position_caret === undefined ? undefined : _this_position_caret.node,\n            offset: (_this_position_caret1 = this.position.caret) === null || _this_position_caret1 === undefined ? undefined : _this_position_caret1.offset,\n            clickCount\n        });\n    }\n    modifySelecting(instance) {\n        var _this_position_caret, _this_position_caret1;\n        if (!this.selecting) {\n            return;\n        }\n        modifySelectionPerMouseMove(this.selecting, {\n            document: instance.config.document,\n            target: this.getTarget(instance),\n            node: (_this_position_caret = this.position.caret) === null || _this_position_caret === undefined ? undefined : _this_position_caret.node,\n            offset: (_this_position_caret1 = this.position.caret) === null || _this_position_caret1 === undefined ? undefined : _this_position_caret1.offset\n        });\n    }\n    endSelecting() {\n        this.selecting = undefined;\n    }\n    constructor(){\n        _define_property(this, \"position\", {});\n        _define_property(this, \"buttons\", new Buttons());\n        _define_property(this, \"selecting\", undefined);\n        _define_property(this, \"buttonDownTarget\", {});\n        // According to spec the `detail` on click events should be the number\n        // of *consecutive* clicks with a specific button.\n        // On `mousedown` and `mouseup` it should be this number increased by one.\n        // But the browsers don't implement it this way.\n        // If another button is pressed,\n        //   in Webkit: the `mouseup` on the previously pressed button has `detail: 0` and no `click`/`auxclick`.\n        //   in Gecko: the `mouseup` and click events have the same detail as the `mousedown`.\n        // If there is a delay while a button is pressed,\n        // the `mouseup` and `click` are normal, but a following `mousedown` starts a new click count.\n        // We'll follow the minimal implementation of Webkit.\n        _define_property(this, \"clickCount\", new class {\n            incOnClick(button) {\n                const current = this.down[button] === undefined ? undefined : Number(this.down[button]) + 1;\n                this.count = this.count[button] === undefined ? {} : {\n                    [button]: Number(this.count[button]) + 1\n                };\n                return current;\n            }\n            getOnDown(button) {\n                var _this_count_button;\n                this.down = {\n                    [button]: (_this_count_button = this.count[button]) !== null && _this_count_button !== undefined ? _this_count_button : 0\n                };\n                var _this_count_button1;\n                this.count = {\n                    [button]: (_this_count_button1 = this.count[button]) !== null && _this_count_button1 !== undefined ? _this_count_button1 : 0\n                };\n                return Number(this.count[button]) + 1;\n            }\n            getOnUp(button) {\n                return this.down[button] === undefined ? undefined : Number(this.down[button]) + 1;\n            }\n            reset() {\n                this.count = {};\n            }\n            constructor(){\n                _define_property(this, \"down\", {});\n                _define_property(this, \"count\", {});\n            }\n        }());\n    }\n}\n\nexport { Mouse };\n","import { PointerEventsCheckLevel } from '../../options.js';\nimport { getWindow } from '../misc/getWindow.js';\nimport { isElementType } from '../misc/isElementType.js';\nimport { ApiLevel, getLevelRef } from '../misc/level.js';\n\nfunction hasPointerEvents(instance, element) {\n    var _checkPointerEvents;\n    return ((_checkPointerEvents = checkPointerEvents(instance, element)) === null || _checkPointerEvents === undefined ? undefined : _checkPointerEvents.pointerEvents) !== 'none';\n}\nfunction closestPointerEventsDeclaration(element) {\n    const window = getWindow(element);\n    for(let el = element, tree = []; el === null || el === undefined ? undefined : el.ownerDocument; el = el.parentElement){\n        tree.push(el);\n        const pointerEvents = window.getComputedStyle(el).pointerEvents;\n        if (pointerEvents && ![\n            'inherit',\n            'unset'\n        ].includes(pointerEvents)) {\n            return {\n                pointerEvents,\n                tree\n            };\n        }\n    }\n    return undefined;\n}\nconst PointerEventsCheck = Symbol('Last check for pointer-events');\nfunction checkPointerEvents(instance, element) {\n    const lastCheck = element[PointerEventsCheck];\n    const needsCheck = instance.config.pointerEventsCheck !== PointerEventsCheckLevel.Never && (!lastCheck || hasBitFlag(instance.config.pointerEventsCheck, PointerEventsCheckLevel.EachApiCall) && lastCheck[ApiLevel.Call] !== getLevelRef(instance, ApiLevel.Call) || hasBitFlag(instance.config.pointerEventsCheck, PointerEventsCheckLevel.EachTrigger) && lastCheck[ApiLevel.Trigger] !== getLevelRef(instance, ApiLevel.Trigger));\n    if (!needsCheck) {\n        return lastCheck === null || lastCheck === undefined ? undefined : lastCheck.result;\n    }\n    const declaration = closestPointerEventsDeclaration(element);\n    element[PointerEventsCheck] = {\n        [ApiLevel.Call]: getLevelRef(instance, ApiLevel.Call),\n        [ApiLevel.Trigger]: getLevelRef(instance, ApiLevel.Trigger),\n        result: declaration\n    };\n    return declaration;\n}\nfunction assertPointerEvents(instance, element) {\n    const declaration = checkPointerEvents(instance, element);\n    if ((declaration === null || declaration === undefined ? undefined : declaration.pointerEvents) === 'none') {\n        throw new Error([\n            `Unable to perform pointer interaction as the element ${declaration.tree.length > 1 ? 'inherits' : 'has'} \\`pointer-events: none\\`:`,\n            '',\n            printTree(declaration.tree)\n        ].join('\\n'));\n    }\n}\nfunction printTree(tree) {\n    return tree.reverse().map((el, i)=>[\n            ''.padEnd(i),\n            el.tagName,\n            el.id && `#${el.id}`,\n            el.hasAttribute('data-testid') && `(testId=${el.getAttribute('data-testid')})`,\n            getLabelDescr(el),\n            tree.length > 1 && i === 0 && '  <-- This element declared `pointer-events: none`',\n            tree.length > 1 && i === tree.length - 1 && '  <-- Asserted pointer events here'\n        ].filter(Boolean).join('')).join('\\n');\n}\nfunction getLabelDescr(element) {\n    var _element_labels;\n    let label;\n    if (element.hasAttribute('aria-label')) {\n        label = element.getAttribute('aria-label');\n    } else if (element.hasAttribute('aria-labelledby')) {\n        var _element_ownerDocument_getElementById_textContent, _element_ownerDocument_getElementById;\n        label = (_element_ownerDocument_getElementById = element.ownerDocument.getElementById(element.getAttribute('aria-labelledby'))) === null || _element_ownerDocument_getElementById === undefined ? undefined : (_element_ownerDocument_getElementById_textContent = _element_ownerDocument_getElementById.textContent) === null || _element_ownerDocument_getElementById_textContent === undefined ? undefined : _element_ownerDocument_getElementById_textContent.trim();\n    } else if (isElementType(element, [\n        'button',\n        'input',\n        'meter',\n        'output',\n        'progress',\n        'select',\n        'textarea'\n    ]) && ((_element_labels = element.labels) === null || _element_labels === undefined ? undefined : _element_labels.length)) {\n        label = Array.from(element.labels).map((el)=>{\n            var _el_textContent;\n            return (_el_textContent = el.textContent) === null || _el_textContent === undefined ? undefined : _el_textContent.trim();\n        }).join('|');\n    } else if (isElementType(element, 'button')) {\n        var _element_textContent;\n        label = (_element_textContent = element.textContent) === null || _element_textContent === undefined ? undefined : _element_textContent.trim();\n    }\n    label = label === null || label === undefined ? undefined : label.replace(/\\n/g, '  ');\n    if (Number(label === null || label === undefined ? undefined : label.length) > 30) {\n        label = `${label === null || label === undefined ? undefined : label.substring(0, 29)}…`;\n    }\n    return label ? `(label=${label})` : '';\n}\n// With the eslint rule and prettier the bitwise operation isn't nice to read\nfunction hasBitFlag(conf, flag) {\n    // eslint-disable-next-line no-bitwise\n    return (conf & flag) > 0;\n}\n\nexport { assertPointerEvents, hasPointerEvents };\n","import '../../utils/dataTransfer/Clipboard.js';\nimport { getTreeDiff } from '../../utils/misc/getTreeDiff.js';\nimport { assertPointerEvents, hasPointerEvents } from '../../utils/pointer/cssPointerEvents.js';\nimport { isDifferentPointerPosition } from './shared.js';\nimport { getMouseEventButton } from './buttons.js';\n\nfunction _define_property(obj, key, value) {\n    if (key in obj) {\n        Object.defineProperty(obj, key, {\n            value: value,\n            enumerable: true,\n            configurable: true,\n            writable: true\n        });\n    } else {\n        obj[key] = value;\n    }\n    return obj;\n}\nclass Pointer {\n    init(instance) {\n        const target = this.getTarget(instance);\n        const [, enter] = getTreeDiff(null, target);\n        const init = this.getEventInit();\n        assertPointerEvents(instance, target);\n        instance.dispatchUIEvent(target, 'pointerover', init);\n        enter.forEach((el)=>instance.dispatchUIEvent(el, 'pointerenter', init));\n        return this;\n    }\n    move(instance, position) {\n        const prevPosition = this.position;\n        const prevTarget = this.getTarget(instance);\n        this.position = position;\n        if (!isDifferentPointerPosition(prevPosition, position)) {\n            return;\n        }\n        const nextTarget = this.getTarget(instance);\n        const init = this.getEventInit(-1);\n        const [leave, enter] = getTreeDiff(prevTarget, nextTarget);\n        return {\n            leave: ()=>{\n                if (hasPointerEvents(instance, prevTarget)) {\n                    if (prevTarget !== nextTarget) {\n                        instance.dispatchUIEvent(prevTarget, 'pointerout', init);\n                        leave.forEach((el)=>instance.dispatchUIEvent(el, 'pointerleave', init));\n                    }\n                }\n            },\n            enter: ()=>{\n                assertPointerEvents(instance, nextTarget);\n                if (prevTarget !== nextTarget) {\n                    instance.dispatchUIEvent(nextTarget, 'pointerover', init);\n                    enter.forEach((el)=>instance.dispatchUIEvent(el, 'pointerenter', init));\n                }\n            },\n            move: ()=>{\n                instance.dispatchUIEvent(nextTarget, 'pointermove', init);\n            }\n        };\n    }\n    down(instance, button = 0) {\n        if (this.isDown) {\n            return;\n        }\n        const target = this.getTarget(instance);\n        assertPointerEvents(instance, target);\n        this.isDown = true;\n        this.isPrevented = !instance.dispatchUIEvent(target, 'pointerdown', this.getEventInit(button));\n    }\n    up(instance, button = 0) {\n        if (!this.isDown) {\n            return;\n        }\n        const target = this.getTarget(instance);\n        assertPointerEvents(instance, target);\n        this.isPrevented = false;\n        this.isDown = false;\n        instance.dispatchUIEvent(target, 'pointerup', this.getEventInit(button));\n    }\n    release(instance) {\n        const target = this.getTarget(instance);\n        const [leave] = getTreeDiff(target, null);\n        const init = this.getEventInit();\n        // Currently there is no PointerEventsCheckLevel that would\n        // make this check not use the *asserted* cached value from `up`.\n        /* istanbul ignore else */ if (hasPointerEvents(instance, target)) {\n            instance.dispatchUIEvent(target, 'pointerout', init);\n            leave.forEach((el)=>instance.dispatchUIEvent(el, 'pointerleave', init));\n        }\n        this.isCancelled = true;\n    }\n    getTarget(instance) {\n        var _this_position_target;\n        return (_this_position_target = this.position.target) !== null && _this_position_target !== undefined ? _this_position_target : instance.config.document.body;\n    }\n    getEventInit(/**\n     * The `button` that caused the event.\n     *\n     * This should be `-1` if the event is not caused by a button or touch/pen contact,\n     * e.g. a moving pointer.\n     */ button) {\n        return {\n            ...this.position.coords,\n            pointerId: this.pointerId,\n            pointerType: this.pointerType,\n            isPrimary: this.isPrimary,\n            button: getMouseEventButton(button),\n            buttons: this.buttons.getButtons()\n        };\n    }\n    constructor({ pointerId, pointerType, isPrimary }, buttons){\n        _define_property(this, \"pointerId\", undefined);\n        _define_property(this, \"pointerType\", undefined);\n        _define_property(this, \"isPrimary\", undefined);\n        _define_property(this, \"buttons\", undefined);\n        _define_property(this, \"isMultitouch\", false);\n        _define_property(this, \"isCancelled\", false);\n        _define_property(this, \"isDown\", false);\n        _define_property(this, \"isPrevented\", false);\n        _define_property(this, \"position\", {});\n        this.pointerId = pointerId;\n        this.pointerType = pointerType;\n        this.isPrimary = isPrimary;\n        this.isMultitouch = !isPrimary;\n        this.buttons = buttons;\n    }\n}\n\nexport { Pointer };\n","import { Buttons } from './buttons.js';\nimport { Device } from './device.js';\nimport { Mouse } from './mouse.js';\nimport { Pointer } from './pointer.js';\n\nfunction _define_property(obj, key, value) {\n    if (key in obj) {\n        Object.defineProperty(obj, key, {\n            value: value,\n            enumerable: true,\n            configurable: true,\n            writable: true\n        });\n    } else {\n        obj[key] = value;\n    }\n    return obj;\n}\nclass PointerHost {\n    isKeyPressed(keyDef) {\n        return this.devices.get(keyDef.pointerType).isPressed(keyDef);\n    }\n    async press(instance, keyDef, position) {\n        this.devices.get(keyDef.pointerType).addPressed(keyDef);\n        this.buttons.down(keyDef);\n        const pointerName = this.getPointerName(keyDef);\n        const pointer = keyDef.pointerType === 'touch' ? this.pointers.new(pointerName, keyDef.pointerType, this.buttons) : this.pointers.get(pointerName);\n        // TODO: deprecate the following implicit setting of position\n        pointer.position = position;\n        if (pointer.pointerType !== 'touch') {\n            this.mouse.position = position;\n        }\n        if (pointer.pointerType === 'touch') {\n            pointer.init(instance);\n        }\n        pointer.down(instance, keyDef.button);\n        if (pointer.pointerType !== 'touch') {\n            this.mouse.down(instance, keyDef, pointer.isPrevented);\n        }\n    }\n    async move(instance, pointerName, position) {\n        const pointer = this.pointers.get(pointerName);\n        // In (some?) browsers this order of events can be observed.\n        // This interweaving of events is probably unnecessary.\n        // While the order of mouse (or pointer) events is defined per spec,\n        // the order in which they interweave/follow on a user interaction depends on the implementation.\n        const pointermove = pointer.move(instance, position);\n        const mousemove = pointer.pointerType === 'touch' ? undefined : this.mouse.move(instance, position, pointer.isPrevented);\n        pointermove === null || pointermove === undefined ? undefined : pointermove.leave();\n        mousemove === null || mousemove === undefined ? undefined : mousemove.leave();\n        pointermove === null || pointermove === undefined ? undefined : pointermove.enter();\n        mousemove === null || mousemove === undefined ? undefined : mousemove.enter();\n        pointermove === null || pointermove === undefined ? undefined : pointermove.move();\n        mousemove === null || mousemove === undefined ? undefined : mousemove.move();\n    }\n    async release(instance, keyDef, position) {\n        const device = this.devices.get(keyDef.pointerType);\n        device.removePressed(keyDef);\n        this.buttons.up(keyDef);\n        const pointer = this.pointers.get(this.getPointerName(keyDef));\n        const isPrevented = pointer.isPrevented;\n        // TODO: deprecate the following implicit setting of position\n        pointer.position = position;\n        if (pointer.pointerType !== 'touch') {\n            this.mouse.position = position;\n        }\n        if (device.countPressed === 0) {\n            pointer.up(instance, keyDef.button);\n        }\n        if (pointer.pointerType === 'touch') {\n            pointer.release(instance);\n        }\n        if (pointer.pointerType === 'touch' && !pointer.isMultitouch) {\n            const mousemove = this.mouse.move(instance, position, isPrevented);\n            mousemove === null || mousemove === undefined ? undefined : mousemove.leave();\n            mousemove === null || mousemove === undefined ? undefined : mousemove.enter();\n            mousemove === null || mousemove === undefined ? undefined : mousemove.move();\n            this.mouse.down(instance, keyDef, isPrevented);\n        }\n        if (!pointer.isMultitouch) {\n            const mousemove = this.mouse.move(instance, position, isPrevented);\n            mousemove === null || mousemove === undefined ? undefined : mousemove.leave();\n            mousemove === null || mousemove === undefined ? undefined : mousemove.enter();\n            mousemove === null || mousemove === undefined ? undefined : mousemove.move();\n            this.mouse.up(instance, keyDef, isPrevented);\n        }\n    }\n    getPointerName(keyDef) {\n        return keyDef.pointerType === 'touch' ? keyDef.name : keyDef.pointerType;\n    }\n    getPreviousPosition(pointerName) {\n        return this.pointers.has(pointerName) ? this.pointers.get(pointerName).position : undefined;\n    }\n    resetClickCount() {\n        this.mouse.resetClickCount();\n    }\n    getMouseTarget(instance) {\n        var _this_mouse_position_target;\n        return (_this_mouse_position_target = this.mouse.position.target) !== null && _this_mouse_position_target !== undefined ? _this_mouse_position_target : instance.config.document.body;\n    }\n    setMousePosition(position) {\n        this.mouse.position = position;\n        this.pointers.get('mouse').position = position;\n    }\n    constructor(system){\n        _define_property(this, \"system\", undefined);\n        _define_property(this, \"mouse\", undefined);\n        _define_property(this, \"buttons\", undefined);\n        _define_property(this, \"devices\", new class {\n            get(k) {\n                var _this_registry, _k;\n                var _;\n                return (_ = (_this_registry = this.registry)[_k = k]) !== null && _ !== undefined ? _ : _this_registry[_k] = new Device();\n            }\n            constructor(){\n                _define_property(this, \"registry\", {});\n            }\n        }());\n        _define_property(this, \"pointers\", new class {\n            new(pointerName, pointerType, buttons) {\n                const isPrimary = pointerType !== 'touch' || !Object.values(this.registry).some((p)=>p.pointerType === 'touch' && !p.isCancelled);\n                if (!isPrimary) {\n                    Object.values(this.registry).forEach((p)=>{\n                        if (p.pointerType === pointerType && !p.isCancelled) {\n                            p.isMultitouch = true;\n                        }\n                    });\n                }\n                this.registry[pointerName] = new Pointer({\n                    pointerId: this.nextId++,\n                    pointerType,\n                    isPrimary\n                }, buttons);\n                return this.registry[pointerName];\n            }\n            get(pointerName) {\n                if (!this.has(pointerName)) {\n                    throw new Error(`Trying to access pointer \"${pointerName}\" which does not exist.`);\n                }\n                return this.registry[pointerName];\n            }\n            has(pointerName) {\n                return pointerName in this.registry;\n            }\n            constructor(){\n                _define_property(this, \"registry\", {});\n                _define_property(this, \"nextId\", 1);\n            }\n        }());\n        this.system = system;\n        this.buttons = new Buttons();\n        this.mouse = new Mouse();\n        this.pointers.new('mouse', 'mouse', this.buttons);\n    }\n}\n\nexport { PointerHost };\n","import { KeyboardHost } from './keyboard.js';\nimport { PointerHost } from './pointer/index.js';\n\nfunction _define_property(obj, key, value) {\n    if (key in obj) {\n        Object.defineProperty(obj, key, {\n            value: value,\n            enumerable: true,\n            configurable: true,\n            writable: true\n        });\n    } else {\n        obj[key] = value;\n    }\n    return obj;\n}\n/**\n * @internal Do not create/alter this by yourself as this type might be subject to changes.\n */ class System {\n    getUIEventModifiers() {\n        return {\n            altKey: this.keyboard.modifiers.Alt,\n            ctrlKey: this.keyboard.modifiers.Control,\n            metaKey: this.keyboard.modifiers.Meta,\n            shiftKey: this.keyboard.modifiers.Shift,\n            modifierAltGraph: this.keyboard.modifiers.AltGraph,\n            modifierCapsLock: this.keyboard.modifiers.CapsLock,\n            modifierFn: this.keyboard.modifiers.Fn,\n            modifierFnLock: this.keyboard.modifiers.FnLock,\n            modifierNumLock: this.keyboard.modifiers.NumLock,\n            modifierScrollLock: this.keyboard.modifiers.ScrollLock,\n            modifierSymbol: this.keyboard.modifiers.Symbol,\n            modifierSymbolLock: this.keyboard.modifiers.SymbolLock\n        };\n    }\n    constructor(){\n        _define_property(this, \"keyboard\", new KeyboardHost(this));\n        _define_property(this, \"pointer\", new PointerHost(this));\n    }\n}\n\nexport { System };\n","async function click(element) {\n    const pointerIn = [];\n    if (!this.config.skipHover) {\n        pointerIn.push({\n            target: element\n        });\n    }\n    pointerIn.push({\n        keys: '[MouseLeft]',\n        target: element\n    });\n    return this.pointer(pointerIn);\n}\nasync function dblClick(element) {\n    return this.pointer([\n        {\n            target: element\n        },\n        '[MouseLeft][MouseLeft]'\n    ]);\n}\nasync function tripleClick(element) {\n    return this.pointer([\n        {\n            target: element\n        },\n        '[MouseLeft][MouseLeft][MouseLeft]'\n    ]);\n}\n\nexport { click, dblClick, tripleClick };\n","import '../utils/dataTransfer/Clipboard.js';\nimport { assertPointerEvents } from '../utils/pointer/cssPointerEvents.js';\n\nasync function hover(element) {\n    return this.pointer({\n        target: element\n    });\n}\nasync function unhover(element) {\n    assertPointerEvents(this, this.system.pointer.getMouseTarget(this));\n    return this.pointer({\n        target: element.ownerDocument.body\n    });\n}\n\nexport { hover, unhover };\n","async function tab({ shift } = {}) {\n    return this.keyboard(shift === true ? '{Shift>}{Tab}{/Shift}' : shift === false ? '[/ShiftLeft][/ShiftRight]{Tab}' : '{Tab}');\n}\n\nexport { tab };\n","var bracketDict = /*#__PURE__*/ function(bracketDict) {\n    bracketDict[\"{\"] = \"}\";\n    bracketDict[\"[\"] = \"]\";\n    return bracketDict;\n}(bracketDict || {});\n/**\n * Read the next key definition from user input\n *\n * Describe key per `{descriptor}` or `[descriptor]`.\n * Everything else will be interpreted as a single character as descriptor - e.g. `a`.\n * Brackets `{` and `[` can be escaped by doubling - e.g. `foo[[bar` translates to `foo[bar`.\n * A previously pressed key can be released per `{/descriptor}`.\n * Keeping the key pressed can be written as `{descriptor>}`.\n * When keeping the key pressed you can choose how long the key is pressed `{descriptor>3}`.\n * You can then release the key per `{descriptor>3/}` or keep it pressed and continue with the next key.\n */ function readNextDescriptor(text, context) {\n    let pos = 0;\n    const startBracket = text[pos] in bracketDict ? text[pos] : '';\n    pos += startBracket.length;\n    const isEscapedChar = new RegExp(`^\\\\${startBracket}{2}`).test(text);\n    const type = isEscapedChar ? '' : startBracket;\n    return {\n        type,\n        ...type === '' ? readPrintableChar(text, pos, context) : readTag(text, pos, type, context)\n    };\n}\nfunction readPrintableChar(text, pos, context) {\n    const descriptor = text[pos];\n    assertDescriptor(descriptor, text, pos, context);\n    pos += descriptor.length;\n    return {\n        consumedLength: pos,\n        descriptor,\n        releasePrevious: false,\n        releaseSelf: true,\n        repeat: 1\n    };\n}\nfunction readTag(text, pos, startBracket, context) {\n    var _text_slice_match, _text_slice_match1;\n    const releasePreviousModifier = text[pos] === '/' ? '/' : '';\n    pos += releasePreviousModifier.length;\n    const escapedDescriptor = startBracket === '{' && text[pos] === '\\\\';\n    pos += Number(escapedDescriptor);\n    const descriptor = escapedDescriptor ? text[pos] : (_text_slice_match = text.slice(pos).match(startBracket === '{' ? /^\\w+|^[^}>/]/ : /^\\w+/)) === null || _text_slice_match === undefined ? undefined : _text_slice_match[0];\n    assertDescriptor(descriptor, text, pos, context);\n    pos += descriptor.length;\n    var _text_slice_match_;\n    const repeatModifier = (_text_slice_match_ = (_text_slice_match1 = text.slice(pos).match(/^>\\d+/)) === null || _text_slice_match1 === undefined ? undefined : _text_slice_match1[0]) !== null && _text_slice_match_ !== undefined ? _text_slice_match_ : '';\n    pos += repeatModifier.length;\n    const releaseSelfModifier = text[pos] === '/' || !repeatModifier && text[pos] === '>' ? text[pos] : '';\n    pos += releaseSelfModifier.length;\n    const expectedEndBracket = bracketDict[startBracket];\n    const endBracket = text[pos] === expectedEndBracket ? expectedEndBracket : '';\n    if (!endBracket) {\n        throw new Error(getErrorMessage([\n            !repeatModifier && 'repeat modifier',\n            !releaseSelfModifier && 'release modifier',\n            `\"${expectedEndBracket}\"`\n        ].filter(Boolean).join(' or '), text[pos], text, context));\n    }\n    pos += endBracket.length;\n    return {\n        consumedLength: pos,\n        descriptor,\n        releasePrevious: !!releasePreviousModifier,\n        repeat: repeatModifier ? Math.max(Number(repeatModifier.substr(1)), 1) : 1,\n        releaseSelf: hasReleaseSelf(releaseSelfModifier, repeatModifier)\n    };\n}\nfunction assertDescriptor(descriptor, text, pos, context) {\n    if (!descriptor) {\n        throw new Error(getErrorMessage('key descriptor', text[pos], text, context));\n    }\n}\nfunction hasReleaseSelf(releaseSelfModifier, repeatModifier) {\n    if (releaseSelfModifier) {\n        return releaseSelfModifier === '/';\n    }\n    if (repeatModifier) {\n        return false;\n    }\n}\nfunction getErrorMessage(expected, found, text, context) {\n    return `Expected ${expected} but found \"${found !== null && found !== undefined ? found : ''}\" in \"${text}\"\n    See ${context === 'pointer' ? `https://testing-library.com/docs/user-event/pointer#pressing-a-button-or-touching-the-screen` : `https://testing-library.com/docs/user-event/keyboard`}\n    for more information about how userEvent parses your input.`;\n}\n\nexport { readNextDescriptor };\n","import '../utils/dataTransfer/Clipboard.js';\nimport { readNextDescriptor } from '../utils/keyDef/readNextDescriptor.js';\n\n/**\n * Parse key definitions per `keyboardMap`\n *\n * Keys can be referenced by `{key}` or `{special}` as well as physical locations per `[code]`.\n * Everything else will be interpreted as a typed character - e.g. `a`.\n * Brackets `{` and `[` can be escaped by doubling - e.g. `foo[[bar` translates to `foo[bar`.\n * Keeping the key pressed can be written as `{key>}`.\n * When keeping the key pressed you can choose how long (how many keydown and keypress) the key is pressed `{key>3}`.\n * You can then release the key per `{key>3/}` or keep it pressed and continue with the next key.\n */ function parseKeyDef(keyboardMap, text) {\n    const defs = [];\n    do {\n        const { type, descriptor, consumedLength, releasePrevious, releaseSelf = true, repeat } = readNextDescriptor(text, 'keyboard');\n        var _keyboardMap_find;\n        const keyDef = (_keyboardMap_find = keyboardMap.find((def)=>{\n            if (type === '[') {\n                var _def_code;\n                return ((_def_code = def.code) === null || _def_code === undefined ? undefined : _def_code.toLowerCase()) === descriptor.toLowerCase();\n            } else if (type === '{') {\n                var _def_key;\n                return ((_def_key = def.key) === null || _def_key === undefined ? undefined : _def_key.toLowerCase()) === descriptor.toLowerCase();\n            }\n            return def.key === descriptor;\n        })) !== null && _keyboardMap_find !== undefined ? _keyboardMap_find : {\n            key: 'Unknown',\n            code: 'Unknown',\n            [type === '[' ? 'code' : 'key']: descriptor\n        };\n        defs.push({\n            keyDef,\n            releasePrevious,\n            releaseSelf,\n            repeat\n        });\n        text = text.slice(consumedLength);\n    }while (text)\n    return defs;\n}\n\nexport { parseKeyDef };\n","import '../utils/dataTransfer/Clipboard.js';\nimport { wait } from '../utils/misc/wait.js';\nimport { parseKeyDef } from './parseKeyDef.js';\n\nasync function keyboard(text) {\n    const actions = parseKeyDef(this.config.keyboardMap, text);\n    for(let i = 0; i < actions.length; i++){\n        await wait(this.config);\n        await keyboardAction(this, actions[i]);\n    }\n}\nasync function keyboardAction(instance, { keyDef, releasePrevious, releaseSelf, repeat }) {\n    const { system } = instance;\n    // Release the key automatically if it was pressed before.\n    if (system.keyboard.isKeyPressed(keyDef)) {\n        await system.keyboard.keyup(instance, keyDef);\n    }\n    if (!releasePrevious) {\n        for(let i = 1; i <= repeat; i++){\n            await system.keyboard.keydown(instance, keyDef);\n            if (i < repeat) {\n                await wait(instance.config);\n            }\n        }\n        // Release the key only on the last iteration on `state.repeatKey`.\n        if (releaseSelf) {\n            await system.keyboard.keyup(instance, keyDef);\n        }\n    }\n}\nasync function releaseAllKeys(instance) {\n    for (const k of instance.system.keyboard.getPressedKeys()){\n        await instance.system.keyboard.keyup(instance, k);\n    }\n}\n\nexport { keyboard, releaseAllKeys };\n","import { createDataTransfer } from '../utils/dataTransfer/DataTransfer.js';\nimport '../utils/dataTransfer/Clipboard.js';\nimport { getWindow } from '../utils/misc/getWindow.js';\nimport { hasOwnSelection } from '../utils/focus/selection.js';\nimport { getUISelection, getUIValue } from './UI.js';\n\nfunction copySelection(target) {\n    const data = hasOwnSelection(target) ? {\n        'text/plain': readSelectedValueFromInput(target)\n    } : {\n        'text/plain': String(target.ownerDocument.getSelection())\n    };\n    const dt = createDataTransfer(getWindow(target));\n    for(const type in data){\n        if (data[type]) {\n            dt.setData(type, data[type]);\n        }\n    }\n    return dt;\n}\nfunction readSelectedValueFromInput(target) {\n    const sel = getUISelection(target);\n    const val = getUIValue(target);\n    return val.substring(sel.startOffset, sel.endOffset);\n}\n\nexport { copySelection };\n","import { writeDataTransferToClipboard } from '../utils/dataTransfer/Clipboard.js';\nimport { copySelection } from '../document/copySelection.js';\n\nasync function copy() {\n    const doc = this.config.document;\n    var _doc_activeElement;\n    const target = (_doc_activeElement = doc.activeElement) !== null && _doc_activeElement !== undefined ? _doc_activeElement : /* istanbul ignore next */ doc.body;\n    const clipboardData = copySelection(target);\n    if (clipboardData.items.length === 0) {\n        return;\n    }\n    if (this.dispatchUIEvent(target, 'copy', {\n        clipboardData\n    }) && this.config.writeToClipboard) {\n        await writeDataTransferToClipboard(doc, clipboardData);\n    }\n    return clipboardData;\n}\n\nexport { copy };\n","import { writeDataTransferToClipboard } from '../utils/dataTransfer/Clipboard.js';\nimport { copySelection } from '../document/copySelection.js';\n\nasync function cut() {\n    const doc = this.config.document;\n    var _doc_activeElement;\n    const target = (_doc_activeElement = doc.activeElement) !== null && _doc_activeElement !== undefined ? _doc_activeElement : /* istanbul ignore next */ doc.body;\n    const clipboardData = copySelection(target);\n    if (clipboardData.items.length === 0) {\n        return;\n    }\n    if (this.dispatchUIEvent(target, 'cut', {\n        clipboardData\n    }) && this.config.writeToClipboard) {\n        await writeDataTransferToClipboard(target.ownerDocument, clipboardData);\n    }\n    return clipboardData;\n}\n\nexport { cut };\n","import { createDataTransfer } from '../utils/dataTransfer/DataTransfer.js';\nimport { readDataTransferFromClipboard } from '../utils/dataTransfer/Clipboard.js';\nimport { getWindow } from '../utils/misc/getWindow.js';\n\nasync function paste(clipboardData) {\n    const doc = this.config.document;\n    var _doc_activeElement;\n    const target = (_doc_activeElement = doc.activeElement) !== null && _doc_activeElement !== undefined ? _doc_activeElement : /* istanbul ignore next */ doc.body;\n    var _ref;\n    const dataTransfer = (_ref = typeof clipboardData === 'string' ? getClipboardDataFromString(doc, clipboardData) : clipboardData) !== null && _ref !== undefined ? _ref : await readDataTransferFromClipboard(doc).catch(()=>{\n        throw new Error('`userEvent.paste()` without `clipboardData` requires the `ClipboardAPI` to be available.');\n    });\n    this.dispatchUIEvent(target, 'paste', {\n        clipboardData: dataTransfer\n    });\n}\nfunction getClipboardDataFromString(doc, text) {\n    const dt = createDataTransfer(getWindow(doc));\n    dt.setData('text', text);\n    return dt;\n}\n\nexport { paste };\n","import '../utils/dataTransfer/Clipboard.js';\nimport { readNextDescriptor } from '../utils/keyDef/readNextDescriptor.js';\n\nfunction parseKeyDef(pointerMap, keys) {\n    const defs = [];\n    do {\n        const { descriptor, consumedLength, releasePrevious, releaseSelf = true } = readNextDescriptor(keys, 'pointer');\n        const keyDef = pointerMap.find((p)=>p.name === descriptor);\n        if (keyDef) {\n            defs.push({\n                keyDef,\n                releasePrevious,\n                releaseSelf\n            });\n        }\n        keys = keys.slice(consumedLength);\n    }while (keys)\n    return defs;\n}\n\nexport { parseKeyDef };\n","import '../utils/dataTransfer/Clipboard.js';\nimport { setLevelRef, ApiLevel } from '../utils/misc/level.js';\nimport { wait } from '../utils/misc/wait.js';\nimport { parseKeyDef } from './parseKeyDef.js';\n\nasync function pointer(input) {\n    const { pointerMap } = this.config;\n    const actions = [];\n    (Array.isArray(input) ? input : [\n        input\n    ]).forEach((actionInput)=>{\n        if (typeof actionInput === 'string') {\n            actions.push(...parseKeyDef(pointerMap, actionInput));\n        } else if ('keys' in actionInput) {\n            actions.push(...parseKeyDef(pointerMap, actionInput.keys).map((i)=>({\n                    ...actionInput,\n                    ...i\n                })));\n        } else {\n            actions.push(actionInput);\n        }\n    });\n    for(let i = 0; i < actions.length; i++){\n        await wait(this.config);\n        await pointerAction(this, actions[i]);\n    }\n    this.system.pointer.resetClickCount();\n}\nasync function pointerAction(instance, action) {\n    var _previousPosition_caret, _previousPosition_caret1;\n    const pointerName = 'pointerName' in action && action.pointerName ? action.pointerName : 'keyDef' in action ? instance.system.pointer.getPointerName(action.keyDef) : 'mouse';\n    const previousPosition = instance.system.pointer.getPreviousPosition(pointerName);\n    var _action_target, _action_coords, _action_node, _action_offset;\n    const position = {\n        target: (_action_target = action.target) !== null && _action_target !== undefined ? _action_target : getPrevTarget(instance, previousPosition),\n        coords: (_action_coords = action.coords) !== null && _action_coords !== undefined ? _action_coords : previousPosition === null || previousPosition === undefined ? undefined : previousPosition.coords,\n        caret: {\n            node: (_action_node = action.node) !== null && _action_node !== undefined ? _action_node : hasCaretPosition(action) ? undefined : previousPosition === null || previousPosition === undefined ? undefined : (_previousPosition_caret = previousPosition.caret) === null || _previousPosition_caret === undefined ? undefined : _previousPosition_caret.node,\n            offset: (_action_offset = action.offset) !== null && _action_offset !== undefined ? _action_offset : hasCaretPosition(action) ? undefined : previousPosition === null || previousPosition === undefined ? undefined : (_previousPosition_caret1 = previousPosition.caret) === null || _previousPosition_caret1 === undefined ? undefined : _previousPosition_caret1.offset\n        }\n    };\n    if ('keyDef' in action) {\n        if (instance.system.pointer.isKeyPressed(action.keyDef)) {\n            setLevelRef(instance, ApiLevel.Trigger);\n            await instance.system.pointer.release(instance, action.keyDef, position);\n        }\n        if (!action.releasePrevious) {\n            setLevelRef(instance, ApiLevel.Trigger);\n            await instance.system.pointer.press(instance, action.keyDef, position);\n            if (action.releaseSelf) {\n                setLevelRef(instance, ApiLevel.Trigger);\n                await instance.system.pointer.release(instance, action.keyDef, position);\n            }\n        }\n    } else {\n        setLevelRef(instance, ApiLevel.Trigger);\n        await instance.system.pointer.move(instance, pointerName, position);\n    }\n}\nfunction hasCaretPosition(action) {\n    var _action_target, _ref;\n    return !!((_ref = (_action_target = action.target) !== null && _action_target !== undefined ? _action_target : action.node) !== null && _ref !== undefined ? _ref : action.offset !== undefined);\n}\nfunction getPrevTarget(instance, position) {\n    if (!position) {\n        throw new Error('This pointer has no previous position. Provide a target property!');\n    }\n    var _position_target;\n    return (_position_target = position.target) !== null && _position_target !== undefined ? _position_target : instance.config.document.body;\n}\n\nexport { pointer };\n","import '../event/behavior/click.js';\nimport '../event/behavior/cut.js';\nimport '../event/behavior/keydown.js';\nimport '../event/behavior/keypress.js';\nimport '../event/behavior/keyup.js';\nimport '../event/behavior/paste.js';\nimport '@testing-library/dom';\nimport '../utils/dataTransfer/Clipboard.js';\nimport { isEditable } from '../utils/edit/isEditable.js';\nimport { isDisabled } from '../utils/misc/isDisabled.js';\nimport { focusElement } from '../event/focus.js';\nimport { input } from '../event/input.js';\nimport { selectAll, isAllSelected } from '../event/selection/selectAll.js';\n\nasync function clear(element) {\n    if (!isEditable(element) || isDisabled(element)) {\n        throw new Error('clear()` is only supported on editable elements.');\n    }\n    focusElement(element);\n    if (element.ownerDocument.activeElement !== element) {\n        throw new Error('The element to be cleared could not be focused.');\n    }\n    selectAll(element);\n    if (!isAllSelected(element)) {\n        throw new Error('The element content to be cleared could not be selected.');\n    }\n    input(this, element, '', 'deleteContentBackward');\n}\n\nexport { clear };\n","import { getConfig } from '@testing-library/dom';\nimport { isElementType } from '../utils/misc/isElementType.js';\nimport '../utils/dataTransfer/Clipboard.js';\nimport { isDisabled } from '../utils/misc/isDisabled.js';\nimport { wait } from '../utils/misc/wait.js';\nimport { hasPointerEvents } from '../utils/pointer/cssPointerEvents.js';\nimport '../event/behavior/click.js';\nimport '../event/behavior/cut.js';\nimport '../event/behavior/keydown.js';\nimport '../event/behavior/keypress.js';\nimport '../event/behavior/keyup.js';\nimport '../event/behavior/paste.js';\nimport { focusElement } from '../event/focus.js';\n\nasync function selectOptions(select, values) {\n    return selectOptionsBase.call(this, true, select, values);\n}\nasync function deselectOptions(select, values) {\n    return selectOptionsBase.call(this, false, select, values);\n}\nasync function selectOptionsBase(newValue, select, values) {\n    if (!newValue && !select.multiple) {\n        throw getConfig().getElementError(`Unable to deselect an option in a non-multiple select. Use selectOptions to change the selection instead.`, select);\n    }\n    const valArray = Array.isArray(values) ? values : [\n        values\n    ];\n    const allOptions = Array.from(select.querySelectorAll('option, [role=\"option\"]'));\n    const selectedOptions = valArray.map((val)=>{\n        if (typeof val !== 'string' && allOptions.includes(val)) {\n            return val;\n        } else {\n            const matchingOption = allOptions.find((o)=>o.value === val || o.innerHTML === val);\n            if (matchingOption) {\n                return matchingOption;\n            } else {\n                throw getConfig().getElementError(`Value \"${String(val)}\" not found in options`, select);\n            }\n        }\n    }).filter((option)=>!isDisabled(option));\n    if (isDisabled(select) || !selectedOptions.length) return;\n    const selectOption = (option)=>{\n        option.selected = newValue;\n        this.dispatchUIEvent(select, 'input', {\n            bubbles: true,\n            cancelable: false,\n            composed: true\n        });\n        this.dispatchUIEvent(select, 'change');\n    };\n    if (isElementType(select, 'select')) {\n        if (select.multiple) {\n            for (const option of selectedOptions){\n                const withPointerEvents = this.config.pointerEventsCheck === 0 ? true : hasPointerEvents(this, option);\n                // events fired for multiple select are weird. Can't use hover...\n                if (withPointerEvents) {\n                    this.dispatchUIEvent(option, 'pointerover');\n                    this.dispatchUIEvent(select, 'pointerenter');\n                    this.dispatchUIEvent(option, 'mouseover');\n                    this.dispatchUIEvent(select, 'mouseenter');\n                    this.dispatchUIEvent(option, 'pointermove');\n                    this.dispatchUIEvent(option, 'mousemove');\n                    this.dispatchUIEvent(option, 'pointerdown');\n                    this.dispatchUIEvent(option, 'mousedown');\n                }\n                focusElement(select);\n                if (withPointerEvents) {\n                    this.dispatchUIEvent(option, 'pointerup');\n                    this.dispatchUIEvent(option, 'mouseup');\n                }\n                selectOption(option);\n                if (withPointerEvents) {\n                    this.dispatchUIEvent(option, 'click');\n                }\n                await wait(this.config);\n            }\n        } else if (selectedOptions.length === 1) {\n            const withPointerEvents = this.config.pointerEventsCheck === 0 ? true : hasPointerEvents(this, select);\n            // the click to open the select options\n            if (withPointerEvents) {\n                await this.click(select);\n            } else {\n                focusElement(select);\n            }\n            selectOption(selectedOptions[0]);\n            if (withPointerEvents) {\n                // the browser triggers another click event on the select for the click on the option\n                // this second click has no 'down' phase\n                this.dispatchUIEvent(select, 'pointerover');\n                this.dispatchUIEvent(select, 'pointerenter');\n                this.dispatchUIEvent(select, 'mouseover');\n                this.dispatchUIEvent(select, 'mouseenter');\n                this.dispatchUIEvent(select, 'pointerup');\n                this.dispatchUIEvent(select, 'mouseup');\n                this.dispatchUIEvent(select, 'click');\n            }\n            await wait(this.config);\n        } else {\n            throw getConfig().getElementError(`Cannot select multiple options on a non-multiple select`, select);\n        }\n    } else if (select.getAttribute('role') === 'listbox') {\n        for (const option of selectedOptions){\n            await this.click(option);\n            await this.unhover(option);\n        }\n    } else {\n        throw getConfig().getElementError(`Cannot select options on elements that are neither select nor listbox elements`, select);\n    }\n}\n\nexport { deselectOptions, selectOptions };\n","import { releaseAllKeys } from '../keyboard/index.js';\nimport '../utils/dataTransfer/Clipboard.js';\nimport { setSelectionRange } from '../event/selection/setSelectionRange.js';\n\nasync function type(element, text, { skipClick = this.config.skipClick, skipAutoClose = this.config.skipAutoClose, initialSelectionStart, initialSelectionEnd } = {}) {\n    // TODO: properly type guard\n    // we use this workaround for now to prevent changing behavior\n    if (element.disabled) return;\n    if (!skipClick) {\n        await this.click(element);\n    }\n    if (initialSelectionStart !== undefined) {\n        setSelectionRange(element, initialSelectionStart, initialSelectionEnd !== null && initialSelectionEnd !== undefined ? initialSelectionEnd : initialSelectionStart);\n    }\n    await this.keyboard(text);\n    if (!skipAutoClose) {\n        await releaseAllKeys(this);\n    }\n}\n\nexport { type };\n","// It is not possible to create a real FileList programmatically.\n// Therefore assigning `files` property with a programmatically created FileList results in an error.\n// Just assigning the property (as per fireEvent) breaks the interweaving with the `value` property.\nconst fakeFiles = Symbol('files and value properties are mocked');\nfunction restoreProperty(obj, prop, descriptor) {\n    if (descriptor) {\n        Object.defineProperty(obj, prop, descriptor);\n    } else {\n        // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n        delete obj[prop];\n    }\n}\nfunction setFiles(el, files) {\n    var _el_fakeFiles;\n    (_el_fakeFiles = el[fakeFiles]) === null || _el_fakeFiles === undefined ? undefined : _el_fakeFiles.restore();\n    const typeDescr = Object.getOwnPropertyDescriptor(el, 'type');\n    const valueDescr = Object.getOwnPropertyDescriptor(el, 'value');\n    const filesDescr = Object.getOwnPropertyDescriptor(el, 'files');\n    function restore() {\n        restoreProperty(el, 'type', typeDescr);\n        restoreProperty(el, 'value', valueDescr);\n        restoreProperty(el, 'files', filesDescr);\n    }\n    el[fakeFiles] = {\n        restore\n    };\n    Object.defineProperties(el, {\n        files: {\n            configurable: true,\n            get: ()=>files\n        },\n        value: {\n            configurable: true,\n            get: ()=>files.length ? `C:\\\\fakepath\\\\${files[0].name}` : '',\n            set (v) {\n                if (v === '') {\n                    restore();\n                } else {\n                    var _valueDescr_set;\n                    valueDescr === null || valueDescr === undefined ? undefined : (_valueDescr_set = valueDescr.set) === null || _valueDescr_set === undefined ? undefined : _valueDescr_set.call(el, v);\n                }\n            }\n        },\n        type: {\n            configurable: true,\n            get: ()=>'file',\n            set (v) {\n                if (v !== 'file') {\n                    restore();\n                    el.type = v;\n                }\n            }\n        }\n    });\n}\n\nexport { setFiles };\n","import { isElementType } from '../utils/misc/isElementType.js';\nimport { createFileList } from '../utils/dataTransfer/FileList.js';\nimport '../utils/dataTransfer/Clipboard.js';\nimport { setFiles } from '../utils/edit/setFiles.js';\nimport { isDisabled } from '../utils/misc/isDisabled.js';\nimport { getWindow } from '../utils/misc/getWindow.js';\n\nasync function upload(element, fileOrFiles) {\n    const input = isElementType(element, 'label') ? element.control : element;\n    if (!input || !isElementType(input, 'input', {\n        type: 'file'\n    })) {\n        throw new TypeError(`The ${input === element ? 'given' : 'associated'} ${input === null || input === undefined ? undefined : input.tagName} element does not accept file uploads`);\n    }\n    if (isDisabled(element)) return;\n    const files = (Array.isArray(fileOrFiles) ? fileOrFiles : [\n        fileOrFiles\n    ]).filter((file)=>!this.config.applyAccept || isAcceptableFile(file, input.accept)).slice(0, input.multiple ? undefined : 1);\n    const fileDialog = ()=>{\n        var _input_files;\n        // do not fire an input event if the file selection does not change\n        if (files.length === ((_input_files = input.files) === null || _input_files === undefined ? undefined : _input_files.length) && files.every((f, i)=>{\n            var _input_files;\n            return f === ((_input_files = input.files) === null || _input_files === undefined ? undefined : _input_files.item(i));\n        })) {\n            return;\n        }\n        setFiles(input, createFileList(getWindow(element), files));\n        this.dispatchUIEvent(input, 'input');\n        this.dispatchUIEvent(input, 'change');\n    };\n    input.addEventListener('fileDialog', fileDialog);\n    await this.click(element);\n    input.removeEventListener('fileDialog', fileDialog);\n}\n// When matching files, browsers ignore case and consider jpeg/jpg interchangeable.\nfunction normalize(nameOrType) {\n    return nameOrType.toLowerCase().replace(/(\\.|\\/)jpg\\b/g, '$1jpeg');\n}\nfunction isAcceptableFile(file, accept) {\n    if (!accept) {\n        return true;\n    }\n    const wildcards = [\n        'audio/*',\n        'image/*',\n        'video/*'\n    ];\n    return normalize(accept).trim().split(/\\s*,\\s*/).some((acceptToken)=>{\n        // tokens starting with a dot represent a file extension\n        if (acceptToken.startsWith('.')) {\n            return normalize(file.name).endsWith(acceptToken);\n        } else if (wildcards.includes(acceptToken)) {\n            return normalize(file.type).startsWith(acceptToken.replace('*', ''));\n        }\n        return normalize(file.type) === acceptToken;\n    });\n}\n\nexport { upload };\n","import { click, dblClick, tripleClick } from '../convenience/click.js';\nimport { hover, unhover } from '../convenience/hover.js';\nimport { tab } from '../convenience/tab.js';\nimport { keyboard } from '../keyboard/index.js';\nimport { copy } from '../clipboard/copy.js';\nimport { cut } from '../clipboard/cut.js';\nimport { paste } from '../clipboard/paste.js';\nimport { pointer } from '../pointer/index.js';\nimport { clear } from '../utility/clear.js';\nimport { deselectOptions, selectOptions } from '../utility/selectOptions.js';\nimport { type } from '../utility/type.js';\nimport { upload } from '../utility/upload.js';\n\nconst userEventApi = {\n    click,\n    dblClick,\n    tripleClick,\n    hover,\n    unhover,\n    tab,\n    keyboard,\n    copy,\n    cut,\n    paste,\n    pointer,\n    clear,\n    deselectOptions,\n    selectOptions,\n    type,\n    upload\n};\n\nexport { userEventApi };\n","import { getConfig } from '@testing-library/dom';\n\n/**\n * Wrap an internal Promise\n */ function wrapAsync(implementation) {\n    return getConfig().asyncWrapper(implementation);\n}\n\nexport { wrapAsync };\n","import { patchFocus } from '../document/patchFocus.js';\nimport { prepareDocument } from '../document/prepareDocument.js';\nimport { dispatchEvent, dispatchUIEvent } from '../event/dispatchEvent.js';\nimport { attachClipboardStubToView } from '../utils/dataTransfer/Clipboard.js';\nimport { getWindow } from '../utils/misc/getWindow.js';\nimport { getDocumentFromNode } from '../utils/misc/getDocumentFromNode.js';\nimport { setLevelRef, ApiLevel } from '../utils/misc/level.js';\nimport { wait } from '../utils/misc/wait.js';\nimport { PointerEventsCheckLevel } from '../options.js';\nimport '@testing-library/dom';\nimport { defaultKeyMap } from '../keyboard/keyMap.js';\nimport { defaultKeyMap as defaultKeyMap$1 } from '../pointer/keyMap.js';\nimport { System } from '../system/index.js';\nimport { userEventApi } from './api.js';\nimport { wrapAsync } from './wrapAsync.js';\n\n/**\n * Default options applied when API is called per `userEvent.anyApi()`\n */ const defaultOptionsDirect = {\n    applyAccept: true,\n    autoModify: true,\n    delay: 0,\n    document: globalThis.document,\n    keyboardMap: defaultKeyMap,\n    pointerMap: defaultKeyMap$1,\n    pointerEventsCheck: PointerEventsCheckLevel.EachApiCall,\n    skipAutoClose: false,\n    skipClick: false,\n    skipHover: false,\n    writeToClipboard: false,\n    advanceTimers: ()=>Promise.resolve()\n};\n/**\n * Default options applied when API is called per `userEvent().anyApi()`\n */ const defaultOptionsSetup = {\n    ...defaultOptionsDirect,\n    writeToClipboard: true\n};\nfunction createConfig(options = {}, defaults = defaultOptionsSetup, node) {\n    const document = getDocument(options, node, defaults);\n    return {\n        ...defaults,\n        ...options,\n        document\n    };\n}\n/**\n * Start a \"session\" with userEvent.\n * All APIs returned by this function share an input device state and a default configuration.\n */ function setupMain(options = {}) {\n    const config = createConfig(options);\n    prepareDocument(config.document);\n    patchFocus(getWindow(config.document).HTMLElement);\n    var _config_document_defaultView;\n    const view = (_config_document_defaultView = config.document.defaultView) !== null && _config_document_defaultView !== undefined ? _config_document_defaultView : /* istanbul ignore next */ globalThis.window;\n    attachClipboardStubToView(view);\n    return createInstance(config).api;\n}\n/**\n * Setup in direct call per `userEvent.anyApi()`\n */ function setupDirect({ keyboardState, pointerState, ...options } = {}, node) {\n    const config = createConfig(options, defaultOptionsDirect, node);\n    prepareDocument(config.document);\n    patchFocus(getWindow(config.document).HTMLElement);\n    var _ref;\n    const system = (_ref = pointerState !== null && pointerState !== undefined ? pointerState : keyboardState) !== null && _ref !== undefined ? _ref : new System();\n    return {\n        api: createInstance(config, system).api,\n        system\n    };\n}\n/**\n * Create a set of callbacks with different default settings but the same state.\n */ function setupSub(options) {\n    return createInstance({\n        ...this.config,\n        ...options\n    }, this.system).api;\n}\nfunction wrapAndBindImpl(instance, impl) {\n    function method(...args) {\n        setLevelRef(instance, ApiLevel.Call);\n        return wrapAsync(()=>impl.apply(instance, args).then(async (ret)=>{\n                await wait(instance.config);\n                return ret;\n            }));\n    }\n    Object.defineProperty(method, 'name', {\n        get: ()=>impl.name\n    });\n    return method;\n}\nfunction createInstance(config, system = new System()) {\n    const instance = {};\n    Object.assign(instance, {\n        config,\n        dispatchEvent: dispatchEvent.bind(instance),\n        dispatchUIEvent: dispatchUIEvent.bind(instance),\n        system,\n        levelRefs: {},\n        ...userEventApi\n    });\n    return {\n        instance,\n        api: {\n            ...Object.fromEntries(Object.entries(userEventApi).map(([name, api])=>[\n                    name,\n                    wrapAndBindImpl(instance, api)\n                ])),\n            setup: setupSub.bind(instance)\n        }\n    };\n}\nfunction getDocument(options, node, defaults) {\n    var _options_document, _ref;\n    return (_ref = (_options_document = options.document) !== null && _options_document !== undefined ? _options_document : node && getDocumentFromNode(node)) !== null && _ref !== undefined ? _ref : defaults.document;\n}\n\nexport { createConfig, createInstance, setupDirect, setupMain, setupSub };\n","import { setupDirect } from './setup.js';\n\nfunction clear(element) {\n    return setupDirect().api.clear(element);\n}\nfunction click(element, options = {}) {\n    return setupDirect(options, element).api.click(element);\n}\nfunction copy(options = {}) {\n    return setupDirect(options).api.copy();\n}\nfunction cut(options = {}) {\n    return setupDirect(options).api.cut();\n}\nfunction dblClick(element, options = {}) {\n    return setupDirect(options).api.dblClick(element);\n}\nfunction deselectOptions(select, values, options = {}) {\n    return setupDirect(options).api.deselectOptions(select, values);\n}\nfunction hover(element, options = {}) {\n    return setupDirect(options).api.hover(element);\n}\nasync function keyboard(text, options = {}) {\n    const { api, system } = setupDirect(options);\n    return api.keyboard(text).then(()=>system);\n}\nasync function pointer(input, options = {}) {\n    const { api, system } = setupDirect(options);\n    return api.pointer(input).then(()=>system);\n}\nfunction paste(clipboardData, options) {\n    return setupDirect(options).api.paste(clipboardData);\n}\nfunction selectOptions(select, values, options = {}) {\n    return setupDirect(options).api.selectOptions(select, values);\n}\nfunction tripleClick(element, options = {}) {\n    return setupDirect(options).api.tripleClick(element);\n}\nfunction type(element, text, options = {}) {\n    return setupDirect(options, element).api.type(element, text, options);\n}\nfunction unhover(element, options = {}) {\n    const { api, system } = setupDirect(options);\n    system.pointer.setMousePosition({\n        target: element\n    });\n    return api.unhover(element);\n}\nfunction upload(element, fileOrFiles, options = {}) {\n    return setupDirect(options).api.upload(element, fileOrFiles);\n}\nfunction tab(options = {}) {\n    return setupDirect().api.tab(options);\n}\n\nexport { clear, click, copy, cut, dblClick, deselectOptions, hover, keyboard, paste, pointer, selectOptions, tab, tripleClick, type, unhover, upload };\n","import { setupMain } from './setup.js';\nimport * as directApi from './directApi.js';\n\nconst userEvent = {\n    ...directApi,\n    setup: setupMain\n};\n\nexport { userEvent };\n"],"names":["isElementType","element","tag","props","k","v","getWindow","node","_node_ownerDocument","isDocument","describe","val","readBlobText","blob","FileReader","res","rej","fr","createFileList","window","files","list","index","i","_define_property","obj","key","value","DataTransferItemStub","callback","dataOrFile","type","DataTransferItemListStub","args","item","getTypeMatcher","exact","group","sub","isGroup","createDataTransferStub","format","_this_items_find","match","text","t","data","matchIndex","createDataTransfer","dt","getBlobFromDataTransferItem","r","createClipboardItem","blobs","dataMap","b","d","ClipboardStubControl","createClipboardStub","control","isClipboardStub","clipboard","attachClipboardStubToView","realClipboard","stub","resetClipboardStubOnView","detachClipboardStubFromView","readDataTransferFromClipboard","document","items","writeDataTransferToClipboard","clipboardData","dtItem","g","FOCUSABLE_SELECTOR","isFocusable","cloneEvent","event","isDisabled","el","_el_querySelector","getActiveElement","activeElement","getActiveElementOrBody","_getActiveElement","findClosest","isContentEditable","getContentEditable","getElement","clickableInputTypes","isClickableInput","isEditable","isEditableInputOrTextArea","editableInputTypes","hasOwnSelection","isElement","hasNoSelection","updateSelectionOnFocus","selection","contenteditable","_contenteditable_firstChild","focusNode","wrapEvent","cb","_element","getConfig","focusElement","target","blurElement","behavior","instance","context","UIValue","UISelection","InitialValue","isUIValue","isUISelectionStart","start","setUIValue","getUIValue","setUIValueClean","clearInitialValue","getInitialValue","setUISelectionRaw","setUISelection","focusOffsetParam","anchorOffsetParam","mode","valueLength","sanitizeOffset","o","anchorOffset","focusOffset","startOffset","endOffset","startObj","getUISelection","_element_selectionStart","_element_selectionEnd","_element_UISelection","sel","hasUISelection","setUISelectionClean","parseInt","buildTimeValue","onlyDigitsValue","firstDigit","secondDigit","build","hours","validHours","minuteCharacters","parsedMinutes","validMinutes","isValidDateOrTimeValue","clone","maxLengthSupportedTypes","getMaxLength","_element_getAttribute","attr","supportsMaxLength","getNextCursorPosition","offset","direction","inputType","isTextNode","nextNode","getNextCharacterContentNode","nextPlusOne","getOffset","nextOffset","walkNodes","isTreatedAsCharacterContent","sibling","getDescendant","TrackChanges","isReact17Element","startTrackValue","trackOrSetValue","_element_TrackChanges_tracked","_element_TrackChanges","commitValueAfterInput","cursorOffset","_changes_tracked","changes","isJustReactStateUpdate","getTargetTypeAndSelection","getInputRange","typeAndSelection","_typeAndSelection_selection","setSelection","anchorNode","_anchorNode_ownerDocument_getSelection","_anchorNode_ownerDocument","isDateOrTime","input","inputRange","editContenteditable","editInputElement","del","nextPosition","delRange","dataToInsert","maxLength","spaceUntilMaxLength","newValue","newOffset","oldValue","calculateNewValue","isValidNumberInput","commitInput","inputData","prologEnd","prolog","epilogStart","epilog","builtValue","inputInit","_value_match","_value_match1","valueParts","getValueOrTextContent","isVisible","display","visibility","getTabDestination","shift","focusableElements","enabledElements","a","j","checkedRadio","prunedElements","activeRadioGroup","currentElement","e","moveSelection","selectAll","_getContentEditable","isAllSelected","setSelectionRange","_element_firstChild","walkRadio","_keydownBehavior_event_key","_keydownBehavior_event_key1","keydownBehavior","combinationBehavior","_getValueOrTextContent","_getValueOrTextContent_length","newPos","dest","ClickInputOnEnter","form","submit","SubmitSingleInputOnEnter","_keyupBehavior_event_key","keyupBehavior","_event_clipboardData","insertData","eventMap","getEventClass","mouseEvents","isMouseEvent","isKeyboardEvent","eventInitializer","initClipboardEvent","initUIEvent","initFocusEvent","initInputEvent","initUIEventModifiers","initMouseEvent","initPointerEvent","initKeyboardEvent","createEvent","init","EventType","defaultInit","getEventConstructors","f","_window_Event","Event","_window_AnimationEvent","AnimationEvent","_window_ClipboardEvent","ClipboardEvent","_window_PopStateEvent","PopStateEvent","_window_ProgressEvent","ProgressEvent","_window_TransitionEvent","TransitionEvent","_window_UIEvent","UIEvent","_window_CompositionEvent","CompositionEvent","_window_FocusEvent","FocusEvent","_window_InputEvent","InputEvent","_window_KeyboardEvent","KeyboardEvent","_window_MouseEvent","MouseEvent","_window_DragEvent","DragEvent","_window_PointerEvent","PointerEvent","_window_TouchEvent","TouchEvent","assignProps","sanitizeNumber","n","relatedTarget","isComposing","view","detail","altKey","ctrlKey","metaKey","shiftKey","modifierAltGraph","modifierCapsLock","modifierFn","modifierFnLock","modifierNumLock","modifierScrollLock","modifierSymbol","modifierSymbolLock","code","location","repeat","charCode","x","y","screenX","screenY","clientX","clientY","button","buttons","offsetX","offsetY","pageX","pageY","pointerId","width","height","pressure","tangentialPressure","tiltX","tiltY","twist","pointerType","isPrimary","dispatchUIEvent","preventDefault","dispatchEvent","_behavior_type","behaviorImplementation","defaultPrevented","dispatchDOMEvent","patched","patchFocus","HTMLElement","focus","blur","patchedFocus","patchedBlur","activeCall","options","blurred","getActiveTarget","thisCall","active","Interceptor","prepareInterceptor","propName","interceptorImpl","prototypeDescriptor","objectDescriptor","intercept","applyNative","realArgs","then","realFunc","prepareValueInterceptor","isUI","sanitizeValue","prepareSelectionInterceptor","others","prepareRangeTextInterceptor","isPrepared","prepareDocument","prepareElement","initialValue","getDocumentFromNode","ApiLevel","setLevelRef","level","getLevelRef","wait","config","delay","resolve","PointerEventsCheckLevel","DOM_KEY_LOCATION","modifierKeys","isModifierKey","modifierLocks","isModifierLock","KeyboardHost","keyDef","p","unprevented","system","_this_registry","_code","_","_this_registry_code","defaultKeyMap","c","Buttons","getMouseButtonId","MouseButton","MouseButtonFlip","getMouseEventButton","Device","getTreeDiff","treeA","treeB","resolveCaretPosition","findNodeAtTextOffset","isRoot","step","setSelectionPerMouseDown","clickCount","targetHasOwnSelection","end","getTextRange","startNode","endNode","range","pos","textPos","modifySelectionPerMouseMove","selectionRange","selectionFocus","cmp","isDifferentPointerPosition","positionA","positionB","_positionA_coords","_positionB_coords","_positionA_coords1","_positionB_coords1","_positionA_coords2","_positionB_coords2","_positionA_coords3","_positionB_coords3","_positionA_coords4","_positionB_coords4","_positionA_coords5","_positionB_coords5","_positionA_coords6","_positionB_coords6","_positionA_coords7","_positionB_coords7","_positionA_coords8","_positionB_coords8","_positionA_coords9","_positionB_coords9","_positionA_caret","_positionB_caret","_positionA_caret1","_positionB_caret1","Mouse","position","isPrevented","prevPosition","prevTarget","nextTarget","leave","enter","disabled","mouseUpInit","clickTarget","_this_position_target","_this_position_caret","_this_position_caret1","current","_this_count_button","_this_count_button1","hasPointerEvents","_checkPointerEvents","checkPointerEvents","closestPointerEventsDeclaration","tree","pointerEvents","PointerEventsCheck","lastCheck","hasBitFlag","declaration","assertPointerEvents","printTree","getLabelDescr","_element_labels","label","_element_ownerDocument_getElementById_textContent","_element_ownerDocument_getElementById","_el_textContent","_element_textContent","conf","flag","Pointer","PointerHost","pointerName","pointer","pointermove","mousemove","device","_this_mouse_position_target","_k","System","click","pointerIn","dblClick","tripleClick","hover","unhover","tab","bracketDict","readNextDescriptor","startBracket","readPrintableChar","readTag","descriptor","assertDescriptor","_text_slice_match","_text_slice_match1","releasePreviousModifier","escapedDescriptor","_text_slice_match_","repeatModifier","releaseSelfModifier","expectedEndBracket","endBracket","getErrorMessage","hasReleaseSelf","expected","found","parseKeyDef","keyboardMap","defs","consumedLength","releasePrevious","releaseSelf","_keyboardMap_find","def","_def_code","_def_key","keyboard","actions","keyboardAction","releaseAllKeys","copySelection","readSelectedValueFromInput","copy","doc","_doc_activeElement","cut","paste","_ref","dataTransfer","getClipboardDataFromString","pointerMap","keys","actionInput","pointerAction","action","_previousPosition_caret","_previousPosition_caret1","previousPosition","_action_target","_action_coords","_action_node","_action_offset","getPrevTarget","hasCaretPosition","_position_target","clear","selectOptions","select","values","selectOptionsBase","deselectOptions","valArray","allOptions","selectedOptions","matchingOption","option","selectOption","withPointerEvents","skipClick","skipAutoClose","initialSelectionStart","initialSelectionEnd","fakeFiles","restoreProperty","prop","setFiles","_el_fakeFiles","typeDescr","valueDescr","filesDescr","restore","_valueDescr_set","upload","fileOrFiles","file","isAcceptableFile","fileDialog","_input_files","normalize","nameOrType","accept","wildcards","acceptToken","userEventApi","wrapAsync","implementation","defaultOptionsDirect","defaultKeyMap$1","defaultOptionsSetup","createConfig","defaults","getDocument","setupMain","_config_document_defaultView","createInstance","setupDirect","keyboardState","pointerState","setupSub","wrapAndBindImpl","impl","method","ret","name","api","_options_document","userEvent","directApi"],"mappings":"yDAAA,SAASA,EAAcC,EAASC,EAAKC,EAAO,CAQxC,OAPIF,EAAQ,cAAgBA,EAAQ,eAAiB,iCAGrDC,EAAM,MAAM,QAAQA,CAAG,EAAIA,EAAM,CAC7BA,CACR,EAEQ,CAACA,EAAI,SAASD,EAAQ,QAAQ,YAAW,CAAE,GACpC,GAEPE,EACO,OAAO,QAAQA,CAAK,EAAE,MAAM,CAAC,CAACC,EAAGC,CAAC,IAAIJ,EAAQG,CAAC,IAAMC,CAAC,EAE1D,EACX,CCfA,SAASC,EAAUC,EAAM,CACrB,IAAIC,EACJ,GAAIC,GAAWF,CAAI,GAAKA,EAAK,YACzB,OAAOA,EAAK,YACT,GAAK,GAAAC,EAAsBD,EAAK,iBAAmB,MAAQC,IAAwB,SAAwBA,EAAoB,YAClI,OAAOD,EAAK,cAAc,YAE9B,MAAM,IAAI,MAAM,gDAAgDG,GAASH,CAAI,CAAC,EAAE,CACpF,CACA,SAASE,GAAWF,EAAM,CACtB,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,QAAS,GACT,WAAY,GACZ,SAAU,EACtB,CACA,EACI,KAAM,CACF,UAAW,aACX,YAAa,CACT,QAAS,GACT,WAAY,GACZ,SAAU,EACtB,CACA,EACI,MAAO,CACH,UAAW,eACX,YAAa,CACT,QAAS,GACT,WAAY,GACZ,SAAU,EACtB,CACA,EACI,YAAa,CACT,UAAW,eACX,YAAa,CACT,QAAS,GACT,WAAY,GACZ,SAAU,EACtB,CACA,EACI,KAAM,CACF,UAAW,iBACX,YAAa,CACT,QAAS,GACT,WAAY,GACZ,SAAU,EACtB,CACA,EACI,OAAQ,CACJ,UAAW,QACX,YAAa,CACT,QAAS,GACT,WAAY,EACxB,CACA,EACI,IAAK,CACD,UAAW,iBACX,YAAa,CACT,QAAS,GACT,WAAY,GACZ,SAAU,EACtB,CACA,EACI,SAAU,CACN,UAAW,aACX,YAAa,CACT,QAAS,GACT,WAAY,GACZ,SAAU,EACtB,CACA,EACI,MAAO,CACH,UAAW,aACX,YAAa,CACT,QAAS,GACT,WAAY,GACZ,SAAU,EACtB,CACA,EACI,QAAS,CACL,UAAW,aACX,YAAa,CACT,QAAS,GACT,WAAY,GACZ,SAAU,EACtB,CACA,EACI,SAAU,CACN,UAAW,aACX,YAAa,CACT,QAAS,GACT,WAAY,GACZ,SAAU,EACtB,CACA,EACI,QAAS,CACL,UAAW,gBACX,YAAa,CACT,QAAS,GACT,WAAY,GACZ,SAAU,EACtB,CACA,EACI,SAAU,CACN,UAAW,gBACX,YAAa,CACT,QAAS,GACT,WAAY,GACZ,SAAU,EACtB,CACA,EACI,MAAO,CACH,UAAW,gBACX,YAAa,CACT,QAAS,GACT,WAAY,GACZ,SAAU,EACtB,CACA,EACI,MAAO,CACH,UAAW,iBACX,YAAa,CACT,QAAS,GACT,WAAY,GACZ,SAAU,EACtB,CACA,EACI,MAAO,CACH,UAAW,aACX,YAAa,CACT,QAAS,GACT,WAAY,GACZ,SAAU,EACtB,CACA,EACI,UAAW,CACP,UAAW,aACX,YAAa,CACT,QAAS,GACT,WAAY,GACZ,SAAU,EACtB,CACA,EACI,WAAY,CACR,UAAW,aACX,YAAa,CACT,QAAS,GACT,WAAY,GACZ,SAAU,EACtB,CACA,EACI,WAAY,CACR,UAAW,aACX,YAAa,CACT,QAAS,GACT,WAAY,GACZ,SAAU,EACtB,CACA,EACI,UAAW,CACP,UAAW,aACX,YAAa,CACT,QAAS,GACT,WAAY,GACZ,SAAU,EACtB,CACA,EACI,SAAU,CACN,UAAW,aACX,YAAa,CACT,QAAS,GACT,WAAY,GACZ,SAAU,EACtB,CACA,EACI,UAAW,CACP,UAAW,aACX,YAAa,CACT,QAAS,GACT,WAAY,GACZ,SAAU,EACtB,CACA,EACI,QAAS,CACL,UAAW,aACX,YAAa,CACT,QAAS,GACT,WAAY,GACZ,SAAU,EACtB,CACA,EACI,YAAa,CACT,UAAW,eACX,YAAa,CACT,QAAS,GACT,WAAY,GACZ,SAAU,EACtB,CACA,EACI,aAAc,CACV,UAAW,eACX,YAAa,CACT,QAAS,GACT,WAAY,EACxB,CACA,EACI,YAAa,CACT,UAAW,eACX,YAAa,CACT,QAAS,GACT,WAAY,GACZ,SAAU,EACtB,CACA,EACI,YAAa,CACT,UAAW,eACX,YAAa,CACT,QAAS,GACT,WAAY,GACZ,SAAU,EACtB,CACA,EACI,UAAW,CACP,UAAW,eACX,YAAa,CACT,QAAS,GACT,WAAY,GACZ,SAAU,EACtB,CACA,EACI,cAAe,CACX,UAAW,eACX,YAAa,CACT,QAAS,GACT,WAAY,GACZ,SAAU,EACtB,CACA,EACI,WAAY,CACR,UAAW,eACX,YAAa,CACT,QAAS,GACT,WAAY,GACZ,SAAU,EACtB,CACA,EACI,aAAc,CACV,UAAW,eACX,YAAa,CACT,QAAS,GACT,WAAY,EACxB,CACA,EACI,OAAQ,CACJ,UAAW,QACX,YAAa,CACT,QAAS,GACT,WAAY,EACxB,CACA,CACA,EACA,SAASC,GAAcrO,EAAM,CACzB,OAAOoO,GAASpO,CAAI,EAAE,SAC1B,C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ACL,SAAUA,EAAiB,KACnC,EACI,CACI,KAAM,cACN,IAAK,UACL,SAAUA,EAAiB,IACnC,EACI,CACI,KAAM,eACN,IAAK,UACL,SAAUA,EAAiB,KACnC,EACI,CACI,KAAM,WACN,IAAK,OACL,SAAUA,EAAiB,IACnC,EACI,CACI,KAAM,YACN,IAAK,OACL,SAAUA,EAAiB,KACnC,EACI,CACI,KAAM,SACN,IAAK,KACL,SAAUA,EAAiB,IACnC,EACI,CACI,KAAM,UACN,IAAK,KACL,SAAUA,EAAiB,KACnC,EACI,CACI,KAAM,cACN,IAAK,aACb,EACI,CACI,KAAM,MACN,IAAK,KACb,EACI,CACI,KAAM,WACN,IAAK,UACb,EACI,CACI,KAAM,YACN,IAAK,WACb,EACI,CACI,KAAM,QACN,IAAK,OACb,EAEI,CACI,KAAM,SACN,IAAK,QACb,EAEI,CACI,KAAM,UACN,IAAK,SACb,EACI,CACI,KAAM,YACN,IAAK,WACb,EACI,CACI,KAAM,YACN,IAAK,WACb,EACI,CACI,KAAM,aACN,IAAK,YACb,EAEI,CACI,KAAM,OACN,IAAK,MACb,EACI,CACI,KAAM,MACN,IAAK,KACb,EACI,CACI,KAAM,SACN,IAAK,QACb,EACI,CACI,KAAM,SACN,IAAK,QACb,EACI,CACI,KAAM,WACN,IAAK,UACb,EAEI,CACI,KAAM,KACN,IAAK,IACb,EACI,CACI,KAAM,SACN,IAAK,QACb,EACI,CACI,KAAM,WACN,IAAK,UACb,CACA,EC7KMc,GAAgB,CAClB,CACI,KAAM,YACN,YAAa,QACb,OAAQ,SAChB,EACI,CACI,KAAM,aACN,YAAa,QACb,OAAQ,WAChB,EACI,CACI,KAAM,cACN,YAAa,QACb,OAAQ,WAChB,EACI,CACI,KAAM,SACN,YAAa,OACrB,EACI,CACI,KAAM,SACN,YAAa,OACrB,EACI,CACI,KAAM,SACN,YAAa,OACrB,CACA,EC5BA,SAAS3Y,GAAiBC,EAAKC,EAAKC,EAAO,CACvC,OAAID,KAAOD,EACP,OA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AO8Q,EAAY9Q,CAAO,EAAE,IAAI,MAAM1S,CAAa,CACvD,CACA,SAASugB,GAAcC,EAAQC,EAAQ/N,EAAU,CAAA,EAAI,CACjD,OAAO8Q,EAAY9Q,CAAO,EAAE,IAAI,cAAc8N,EAAQC,CAAM,CAChE,CACA,SAASlE,GAAY7gB,EAASgX,EAAU,GAAI,CACxC,OAAO8Q,EAAY9Q,CAAO,EAAE,IAAI,YAAYhX,CAAO,CACvD,CACA,SAAS8B,GAAK9B,EAAS2C,EAAMqU,EAAU,CAAA,EAAI,CACvC,OAAO8Q,EAAY9Q,EAAShX,CAAO,EAAE,IAAI,KAAKA,EAAS2C,EAAMqU,CAAO,CACxE,CACA,SAAS+J,GAAQ/gB,EAASgX,EAAU,GAAI,CACpC,KAAM,CAAE,IAAAuR,EAAK,OAAA1O,GAAWiO,EAAY9Q,CAAO,EAC3C,OAAA6C,EAAO,QAAQ,iBAAiB,CAC5B,OAAQ7Z,CAChB,CAAK,EACMuoB,EAAI,QAAQvoB,CAAO,CAC9B,CACA,SAASumB,GAAOvmB,EAASwmB,EAAaxP,EAAU,CAAA,EAAI,CAChD,OAAO8Q,EAAY9Q,CAAO,EAAE,IAAI,OAAOhX,EAASwmB,CAAW,CAC/D,CACA,SAASxF,GAAIhK,EAAU,GAAI,CACvB,OAAO8Q,EAAW,EAAG,IAAI,IAAI9Q,CAAO,CACxC,kRCpDMyR,GAAY,CACd,GAAGC,GACH,MAAOf,EACX","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88]}