PageSourceSearch

https://montegeneroso.ch/themes/custom/fmg/assets/js/bootstrap/dom/selector-engine.js?tkfnsv

js montegeneroso.ch collected 2026-10-02 04:14:43 UTC 2,700 bytes, 86 lines download raw bytes

vendor: 2,700 bytes, lines 1-86
1/*!
2  * Bootstrap selector-engine.js v5.2.3 (https://getbootstrap.com/)
3  * Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
4  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
5  */
6(function (global, factory) {
7  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('../util/index')) :
8  typeof define === 'function' && define.amd ? define(['../util/index'], factory) :
9  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.SelectorEngine = factory(global.Index));
10})(this, (function (index) { 'use strict';
11
12  /**
13   * --------------------------------------------------------------------------
14   * Bootstrap (v5.2.3): dom/selector-engine.js
15   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
16   * --------------------------------------------------------------------------
17   */
18  /**
19   * Constants
20   */
21
22  const SelectorEngine = {
23    find(selector, element = document.documentElement) {
24      return [].concat(...Element.prototype.querySelectorAll.call(element, selector));
25    },
26
27    findOne(selector, element = document.documentElement) {
28      return Element.prototype.querySelector.call(element, selector);
29    },
30
31    children(element, selector) {
32      return [].concat(...element.children).filter(child => child.matches(selector));
33    },
34
35    parents(element, selector) {
36      const parents = [];
37      let ancestor = element.parentNode.closest(selector);
38
39      while (ancestor) {
40        parents.push(ancestor);
41        ancestor = ancestor.parentNode.closest(selector);
42      }
43
44      return parents;
45    },
46
47    prev(element, selector) {
48      let previous = element.previousElementSibling;
49
50      while (previous) {
51        if (previous.matches(selector)) {
52          return [previous];
53        }
54
55        previous = previous.previousElementSibling;
56      }
57
58      return [];
59    },
60
61    // TODO: this is now unused; remove later along with prev()
62    next(element, selector) {
63      let next = element.nextElementSibling;
64
65      while (next) {
66        if (next.matches(selector)) {
67          return [next];
68        }
69
70        next = next.nextElementSibling;
71      }
72
73      return [];
74    },
75
76    focusableChildren(element) {
77      const focusables = ['a', 'button', 'input', 'textarea', 'select', 'details', '[tabindex]', '[contenteditable="true"]'].map(selector => `${selector}:not([tabindex^="-"])`).join(',');
78      return this.find(focusables, element).filter(el => !index.isDisabled(el) && index.isVisible(el));
79    }
80
81  };
82
83  return SelectorEngine;
84
85}));
86//# sourceMappingURL=selector-engine.js.map

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.