vendor: 5,260 bytes, lines 1-2
1/*! a11y-dialog 8.1.0 â © Kitty Giraudel */ 2!function (e, t) { "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).A11yDialog = t() }(this, (function () { "use strict"; const e = ":not([inert]):not([inert] *)", t = ':not([tabindex^="-"])', i = ":not(:disabled)"; var s = [`a[href]${e}${t}`, `area[href]${e}${t}`, `input:not([type="hidden"]):not([type="radio"])${e}${t}${i}`, `input[type="radio"]${e}${t}${i}`, `select${e}${t}${i}`, `textarea${e}${t}${i}`, `button${e}${t}${i}`, `details${e} > summary:first-of-type${t}`, `iframe${e}${t}`, `audio[controls]${e}${t}`, `video[controls]${e}${t}`, `[contenteditable]${e}${t}`, `[tabindex]${e}${t}`]; function n(e) { (e.querySelector("[autofocus]") || e).focus() } function o(e, t) { if (t && l(e)) return e; if (function (e) { return (!e.shadowRoot || "-1" !== e.getAttribute("tabindex")) && !e.matches(":disabled,[hidden],[inert]") }(e)) if (e.shadowRoot) { let i = r(e.shadowRoot, t); for (; i;) { const e = o(i, t); if (e) return e; i = d(i, t) } } else if ("slot" === e.localName) { const i = e.assignedElements({ flatten: !0 }); t || i.reverse(); for (const e of i) { const i = o(e, t); if (i) return i } } else { let i = r(e, t); for (; i;) { const e = o(i, t); if (e) return e; i = d(i, t) } } return !t && l(e) ? e : null } function r(e, t) { return t ? e.firstElementChild : e.lastElementChild } function d(e, t) { return t ? e.nextElementSibling : e.previousElementSibling } const l = e => !e.shadowRoot?.delegatesFocus && (e.matches(s.join(",")) && !(e => !(!e.matches("details:not([open]) *") || e.matches("details>summary:first-of-type")) || !(e.offsetWidth || e.offsetHeight || e.getClientRects().length))(e)); function h(e = document) { const t = e.activeElement; return t ? t.shadowRoot ? h(t.shadowRoot) || document.activeElement : t : null } function a(e, t) { const [i, s] = function (e) { const t = o(e, !0); return [t, t ? o(e, !1) || t : null] }(e); if (!i) return t.preventDefault(); const n = h(); t.shiftKey && n === i ? (s.focus(), t.preventDefault()) : t.shiftKey || n !== s || (i.focus(), t.preventDefault()) } const u = "data-a11y-dialog"; class c { $el; id; previouslyFocused; shown; constructor(e) { this.$el = e, this.id = this.$el.getAttribute(u) || this.$el.id, this.previouslyFocused = null, this.shown = !1, this.maintainFocus = this.maintainFocus.bind(this), this.bindKeypress = this.bindKeypress.bind(this), this.handleTriggerClicks = this.handleTriggerClicks.bind(this), this.show = this.show.bind(this), this.hide = this.hide.bind(this), this.$el.setAttribute("aria-hidden", "true"), this.$el.setAttribute("aria-modal", "true"), this.$el.setAttribute("tabindex", "-1"), this.$el.hasAttribute("role") || this.$el.setAttribute("role", "dialog"), document.addEventListener("click", this.handleTriggerClicks, !0) } destroy() { return this.fire("destroy").defaultPrevented || (this.hide(), document.removeEventListener("click", this.handleTriggerClicks, !0), this.$el.replaceWith(this.$el.cloneNode(!0))), this } show(e) { if (this.shown) return this; return this.fire("show", e).defaultPrevented || (this.shown = !0, this.$el.removeAttribute("aria-hidden"), this.previouslyFocused = h(), "BODY" === this.previouslyFocused?.tagName && e?.target && (this.previouslyFocused = e.target), "focus" === e?.type ? this.maintainFocus(e) : n(this.$el), document.body.addEventListener("focus", this.maintainFocus, !0), this.$el.addEventListener("keydown", this.bindKeypress, !0)), this } hide(e) { if (!this.shown) return this; return this.fire("hide", e).defaultPrevented || (this.shown = !1, this.$el.setAttribute("aria-hidden", "true"), this.previouslyFocused?.focus?.(), document.body.removeEventListener("focus", this.maintainFocus, !0), this.$el.removeEventListener("keydown", this.bindKeypress, !0)), this } on(e, t, i) { return this.$el.addEventListener(e, t, i), this } off(e, t, i) { return this.$el.removeEventListener(e, t, i), this } fire(e, t) { const i = new CustomEvent(e, { detail: t, cancelable: !0 }); return this.$el.dispatchEvent(i), i } handleTriggerClicks(e) { const t = e.composedPath()[0]; t.closest(`[${u}-show="${this.id}"]`) && this.show(e), (t.closest(`[${u}-hide="${this.id}"]`) || t.closest(`[${u}-hide]`) && t.closest('[aria-modal="true"]') === this.$el) && this.hide(e) } bindKeypress(e) { if (t = '[aria-modal="true"]', function e(i) { return i && i !== document && i !== window ? (i.assignedSlot && (i = i.assignedSlot), i.closest(t) || e(i.getRootNode().host)) : null }(h()) !== this.$el) return; var t; let i = !1; try { i = !!this.$el.querySelector('[popover]:not([popover="manual"]):popover-open') } catch { } "Escape" !== e.key || "alertdialog" === this.$el.getAttribute("role") || i || (e.preventDefault(), this.hide(e)), "Tab" === e.key && a(this.$el, e) } maintainFocus(e) { e.target.closest(`[aria-modal="true"], [${u}-ignore-focus-trap]`) || n(this.$el) } } function f() { for (const e of document.querySelectorAll("[data-a11y-dialog]")) new c(e) } return "undefined" != typeof document && ("loading" === document.readyState ? document.addEventListener("DOMContentLoaded", f) : f()), c }));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.