export declare const SNAPSHOT_SCRIPT = "(function () {\n var MAX = 150;\n var refs = [];\n window.__intenticRefs = refs;\n\n function visible(el) {\n var rect = el.getBoundingClientRect();\n if (rect.width <= 0 || rect.height <= 0) return false;\n var style = window.getComputedStyle(el);\n return style.visibility !== 'hidden' && style.display !== 'none' && style.opacity !== '0';\n }\n\n function roleOf(el) {\n var explicit = el.getAttribute('role');\n if (explicit) return explicit;\n var tag = el.tagName.toLowerCase();\n if (tag === 'a') return 'link';\n if (tag === 'button') return 'button';\n if (tag === 'select') return 'combobox';\n if (tag === 'textarea') return 'textbox';\n if (/^h[1-6]$/.test(tag)) return 'heading';\n if (tag === 'input') {\n var type = (el.getAttribute('type') || 'text').toLowerCase();\n if (type === 'submit' || type === 'button' || type === 'reset') return 'button';\n if (type === 'checkbox') return 'checkbox';\n if (type === 'radio') return 'radio';\n if (type === 'file') return 'file';\n return 'textbox';\n }\n if (el.isContentEditable) return 'textbox';\n return 'element';\n }\n\n function nameOf(el) {\n var candidates = [\n el.getAttribute('aria-label'),\n el.getAttribute('alt'),\n el.getAttribute('placeholder'),\n el.getAttribute('title'),\n el.getAttribute('name'),\n (el.innerText || '').trim(),\n el.value\n ];\n for (var i = 0; i < candidates.length; i++) {\n var candidate = candidates[i];\n if (typeof candidate === 'string' && candidate.trim() !== '') {\n return candidate.trim().replace(/\\s+/g, ' ').slice(0, 120);\n }\n }\n return '';\n }\n\n var selector = 'a[href], button, input, textarea, select, summary, [role], [onclick], [contenteditable=\"\"], [contenteditable=\"true\"], h1, h2, h3';\n var found = document.querySelectorAll(selector);\n var elements = [];\n for (var i = 0; i < found.length && elements.length < MAX; i++) {\n var el = found[i];\n if (!visible(el)) continue;\n var role = roleOf(el);\n var name = nameOf(el);\n // A nameless non-input is something a caller could never ask for by name, so it is noise.\n if (name === '' && role !== 'textbox' && role !== 'checkbox' && role !== 'file') continue;\n var ref = 'e' + refs.length;\n refs.push(el);\n var entry = { ref: ref, role: role, name: name };\n if (typeof el.value === 'string' && el.value !== '' && role !== 'button') entry.value = el.value.slice(0, 120);\n if (role === 'checkbox' || role === 'radio') entry.value = el.checked ? 'checked' : 'unchecked';\n elements.push(entry);\n }\n return {\n url: location.href,\n title: document.title,\n truncated: found.length > 0 && elements.length >= MAX,\n elements: elements\n };\n})()"; //# sourceMappingURL=snapshot.d.ts.map