diff --git a/dist/autoComplete.js b/dist/autoComplete.js index 4f93431..6c4ad30 100644 --- a/dist/autoComplete.js +++ b/dist/autoComplete.js @@ -4,621 +4,883 @@ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.autoComplete = factory()); })(this, (function () { 'use strict'; - function _arrayLikeToArray(r, a) { - (null == a || a > r.length) && (a = r.length); - for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; - return n; - } - function _arrayWithoutHoles(r) { - if (Array.isArray(r)) return _arrayLikeToArray(r); - } - function _createForOfIteratorHelper(r, e) { - var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; - if (!t) { - if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e) { - t && (r = t); - var n = 0, - F = function () {}; - return { - s: F, - n: function () { - return n >= r.length ? { - done: !0 - } : { - done: !1, - value: r[n++] - }; - }, - e: function (r) { - throw r; - }, - f: F - }; - } - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - var o, - a = !0, - u = !1; - return { - s: function () { - t = t.call(r); - }, - n: function () { - var r = t.next(); - return a = r.done, r; - }, - e: function (r) { - u = !0, o = r; - }, - f: function () { - try { - a || null == t.return || t.return(); - } finally { - if (u) throw o; - } - } - }; - } - function _defineProperty(e, r, t) { - return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { - value: t, - enumerable: !0, - configurable: !0, - writable: !0 - }) : e[r] = t, e; - } - function _iterableToArray(r) { - if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); - } - function _nonIterableSpread() { - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - function ownKeys(e, r) { - var t = Object.keys(e); - if (Object.getOwnPropertySymbols) { - var o = Object.getOwnPropertySymbols(e); - r && (o = o.filter(function (r) { - return Object.getOwnPropertyDescriptor(e, r).enumerable; - })), t.push.apply(t, o); - } - return t; - } - function _objectSpread2(e) { - for (var r = 1; r < arguments.length; r++) { - var t = null != arguments[r] ? arguments[r] : {}; - r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { - _defineProperty(e, r, t[r]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { - Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); - }); - } - return e; - } - function _toConsumableArray(r) { - return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); - } - function _toPrimitive(t, r) { - if ("object" != typeof t || !t) return t; - var e = t[Symbol.toPrimitive]; - if (void 0 !== e) { - var i = e.call(t, r || "default"); - if ("object" != typeof i) return i; - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return ("string" === r ? String : Number)(t); - } - function _toPropertyKey(t) { - var i = _toPrimitive(t, "string"); - return "symbol" == typeof i ? i : i + ""; - } - function _typeof(o) { - "@babel/helpers - typeof"; - - return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { - return typeof o; - } : function (o) { - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; - }, _typeof(o); - } - function _unsupportedIterableToArray(r, a) { - if (r) { - if ("string" == typeof r) return _arrayLikeToArray(r, a); - var t = {}.toString.call(r).slice(8, -1); - return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; - } + /** + * DOM Element selector + * + * @param {String|HTMLElement} element - html tag | html element + * + * @returns {HTMLElement} - selected html element + */ function _extends$3() { + _extends$3 = Object.assign || function(target) { + for(var i = 1; i < arguments.length; i++){ + var source = arguments[i]; + for(var key in source){ + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + return _extends$3.apply(this, arguments); } - - var select$1 = function select(element) { - return typeof element === "string" ? document.querySelector(element) : element(); - }; - var create = function create(tag, options) { - var el = typeof tag === "string" ? document.createElement(tag) : tag; - for (var key in options) { - var val = options[key]; - if (key === "inside") { - val.append(el); - } else if (key === "dest") { - select$1(val[0]).insertAdjacentElement(val[1], el); - } else if (key === "around") { - var ref = val; - ref.parentNode.insertBefore(el, ref); - el.append(ref); - if (ref.getAttribute("autofocus") != null) ref.focus(); - } else if (key in el) { - el[key] = val; - } else { - el.setAttribute(key, val); + const select$1 = (element)=>typeof element === "string" ? document.querySelector(element) : element(); + /** + * Create new element or Edit existing element + * + * @param {String|HTMLElement} tag - html tag | html element + * @param {Object} options - of the html element + * + * @returns {HTMLElement} - created html element + */ const create = (tag, options)=>{ + const el = typeof tag === "string" ? document.createElement(tag) : tag; + for(const key in options){ + const val = options[key]; + if (key === "inside") { + val.append(el); + } else if (key === "dest") { + select$1(val[0]).insertAdjacentElement(val[1], el); + } else if (key === "around") { + const ref = val; + ref.parentNode.insertBefore(el, ref); + el.append(ref); + if (ref.getAttribute("autofocus") != null) ref.focus(); + } else if (key in el) { + el[key] = val; + } else { + el.setAttribute(key, val); + } } - } - return el; - }; - var getQuery = function getQuery(field) { - return field instanceof HTMLInputElement || field instanceof HTMLTextAreaElement ? field.value : field.innerHTML; - }; - var format = function format(value, diacritics) { - value = String(value).toLowerCase(); - return diacritics ? value.normalize("NFD").replace(/[\u0300-\u036f]/g, "").normalize("NFC") : value; + return el; }; - var debounce = function debounce(callback, duration) { - var timer; - return function () { - clearTimeout(timer); - timer = setTimeout(function () { - return callback(); - }, duration); - }; + /** + * Get the "input" query value + * + * @param {Element} field - input or textarea element + * + * @returns {String} - Raw query value as a string + */ const getQuery = (field)=>field instanceof HTMLInputElement || field instanceof HTMLTextAreaElement ? field.value : field.innerHTML; + /** + * Format input value + * + * @param {String} value - user's raw search query value + * @param {Object} diacritics - formatting on/off + * + * @returns {String} - Raw "input" value as a string + */ const format = (value, diacritics)=>{ + value = String(value).toLowerCase(); + return diacritics ? value.normalize("NFD").replace(/[\u0300-\u036f]/g, "").normalize("NFC") : value; }; - var checkTrigger = function checkTrigger(query, condition, threshold) { - return condition ? condition(query) : query.length >= threshold; - }; - var mark = function mark(value, cls) { - return create("mark", _objectSpread2({ - innerHTML: value - }, typeof cls === "string" && { - "class": cls - })).outerHTML; + /** + * Debouncer + * + * @param {Function} callback - Callback function + * @param {Number} duration - Delay time value + * + * @returns {Function} - Debouncer function + */ const debounce = (callback, duration)=>{ + let timer; + return ()=>{ + clearTimeout(timer); + timer = setTimeout(()=>callback(), duration); + }; }; + /** + * Trigger condition validator + * + * @param {String} query - User's manipulated search query value + * @param {Function} condition - trigger condition rule + * @param {Number} threshold - of query length to trigger + * + * @returns {Boolean} - For autoComplete.js to run or not + */ const checkTrigger = (query, condition, threshold)=>condition ? condition(query) : query.length >= threshold; + /** + * Highlight matching characters + * + * @param {String} value - user's raw search query value + * @param {String} cls - of highlighted character + * + * @returns {HTMLElement} - newly create html element + */ const mark = (value, cls)=>create("mark", _extends$3({ + innerHTML: value + }, typeof cls === "string" && { + class: cls + })).outerHTML; - var configure = (function (ctx) { - var name = ctx.name, - options = ctx.options, - resultsList = ctx.resultsList, - resultItem = ctx.resultItem; - for (var option in options) { - if (_typeof(options[option]) === "object") { - if (!ctx[option]) ctx[option] = {}; - for (var subOption in options[option]) { - ctx[option][subOption] = options[option][subOption]; - } - } else { - ctx[option] = options[option]; + /** + * Configuring options stage + * + * @param {Object} ctx - autoComplete.js configuration options + */ var configure = ((ctx)=>{ + const { name, options, resultsList, resultItem } = ctx; + // Populate Configuration options + for(const option in options){ + if (typeof options[option] === "object") { + if (!ctx[option]) ctx[option] = {}; + for(const subOption in options[option]){ + ctx[option][subOption] = options[option][subOption]; + } + } else { + ctx[option] = options[option]; + } } - } - ctx.selector = ctx.selector || "#" + name; - resultsList.destination = resultsList.destination || ctx.selector; - resultsList.id = resultsList.id || name + "_list_" + ctx.id; - resultItem.id = resultItem.id || name + "_result"; - ctx.input = select$1(ctx.selector); + // Dynamic Config Options + ctx.selector = ctx.selector || "#" + name; + resultsList.destination = resultsList.destination || ctx.selector; + resultsList.id = resultsList.id || name + "_list_" + ctx.id; + resultItem.id = resultItem.id || name + "_result"; + // Assign the "input" html element + ctx.input = select$1(ctx.selector); }); - var eventEmitter = (function (name, ctx) { - ctx.input.dispatchEvent(new CustomEvent(name, { - bubbles: true, - detail: ctx.feedback, - cancelable: true - })); + /** + * Event emitter/dispatcher + * + * @param {String} name - Name of fired event + * @param {Object} ctx - autoComplete.js context + */ var eventEmitter = ((name, ctx)=>{ + // Dispatch event on "input" + ctx.input.dispatchEvent(new CustomEvent(name, { + bubbles: true, + detail: ctx.feedback, + cancelable: true + })); }); - var search = (function (query, record, options) { - var _ref = options || {}, - mode = _ref.mode, - diacritics = _ref.diacritics, - highlight = _ref.highlight; - var nRecord = format(record, diacritics); - record = String(record); - query = format(query, diacritics); - if (mode === "loose") { - query = query.replace(/ /g, ""); - var qLength = query.length; - var cursor = 0; - var match = Array.from(record).map(function (character, index) { - if (cursor < qLength && nRecord[index] === query[cursor]) { - character = highlight ? mark(character, highlight) : character; - cursor++; - } - return character; - }).join(""); - if (cursor === qLength) return match; - } else { - var _match = nRecord.indexOf(query); - if (~_match) { - query = record.substring(_match, _match + query.length); - _match = highlight ? record.replace(query, mark(query, highlight)) : record; - return _match; + /** + * Find matching characters in record + * + * @param {String} query - Search query value + * @param {String} record - Data record string + * @param {Object} options - Search Engine configuration options + * + * @returns {String} - Matching data record + */ var search = ((query, record, options)=>{ + const { mode, diacritics, highlight } = options || {}; + const nRecord = format(record, diacritics); + record = String(record); + query = format(query, diacritics); + if (mode === "loose") { + // Query string with no spaces + query = query.replace(/ /g, ""); + const qLength = query.length; + // Query character cursor position based on match + let cursor = 0; + // Matching characters + const match = Array.from(record).map((character, index)=>{ + // Matching case + if (cursor < qLength && nRecord[index] === query[cursor]) { + // Highlight matching character if active + character = highlight ? mark(character, highlight) : character; + // Move cursor position + cursor++; + } + return character; + }).join(""); + // If record is fully scanned + if (cursor === qLength) return match; + } else { + // Get starting index of matching characters + let match = nRecord.indexOf(query); + // Strict mode + if (~match) { + // Extract matching characters from record + query = record.substring(match, match + query.length); + // Highlight matching characters if active + match = highlight ? record.replace(query, mark(query, highlight)) : record; + return match; + } } - } }); - var getData = function getData(ctx, query) { - return new Promise(function ($return, $error) { - var data; - data = ctx.data; - if (data.cache && data.store) return $return(); - return new Promise(function ($return, $error) { - if (typeof data.src === "function") { - return new Promise(function ($return, $error) { - if (data.src.constructor.name === "AsyncFunction") { - return data.src(query).then($return, $error); - } - return $return(data.src(query)); - }).then($return, $error); - } - return $return(data.src); - }).then(function ($await_7) { - try { - ctx.feedback = data.store = $await_7; - eventEmitter("response", ctx); - return $return(); - } catch ($boundEx) { - return $error($boundEx); - } - }, $error); - }); - }; - var findMatches = function findMatches(query, ctx) { - var data = ctx.data, - searchEngine = ctx.searchEngine; - var matches = []; - data.store.forEach(function (value, index) { - var find = function find(key) { - var record = key ? value[key] : value; - var match = typeof searchEngine === "function" ? searchEngine(query, record) : search(query, record, { - mode: searchEngine, - diacritics: ctx.diacritics, - highlight: ctx.resultItem.highlight - }); - if (!match) return; - var result = { - match: match, - value: value - }; - if (key) result.key = key; - matches.push(result); - }; - if (data.keys) { - var _iterator = _createForOfIteratorHelper(data.keys), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var key = _step.value; - find(key); - } - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } + function asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + if (info.done) { + resolve(value); } else { - find(); + Promise.resolve(value).then(_next, _throw); } - }); - if (data.filter) matches = data.filter(matches); - var results = matches.slice(0, ctx.resultsList.maxResults); - ctx.feedback = { - query: query, - matches: matches, - results: results - }; - eventEmitter("results", ctx); + } + function _async_to_generator$2(fn) { + return function() { + var self = this, args = arguments; + return new Promise(function(resolve, reject) { + var gen = fn.apply(self, args); + function _next(value) { + asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, "next", value); + } + function _throw(err) { + asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, "throw", err); + } + _next(undefined); + }); + }; + } + /** + * Get data from source + * + * @param {Object} ctx - autoComplete.js context + */ const getData = (ctx, query)=>_async_to_generator$2(function*() { + const { data } = ctx; + if (data.cache && data.store) return; + ctx.feedback = data.store = typeof data.src === "function" ? yield data.src(query) : data.src; + /** + * @emit {response} event on data request + **/ eventEmitter("response", ctx); + })(); + /** + * Find matches to "query" + * + * @param {String} query - User's search query string + * @param {Object} ctx - autoComplete.js context + */ const findMatches = (query, ctx)=>{ + const { data, searchEngine } = ctx; + let matches = []; + // Find matches from data source + data.store.forEach((value, index)=>{ + const find = (key)=>{ + const record = key ? value[key] : value; + const match = typeof searchEngine === "function" ? searchEngine(query, record) : search(query, record, { + mode: searchEngine, + diacritics: ctx.diacritics, + highlight: ctx.resultItem.highlight + }); + if (!match) return; + let result = { + match, + value + }; + if (key) result.key = key; + matches.push(result); + }; + if (data.keys) { + for (const key of data.keys){ + find(key); + } + } else { + find(); + } + }); + // Find results matching to the query + if (data.filter) matches = data.filter(matches); + const results = matches.slice(0, ctx.resultsList.maxResults); + // Prepare data feedback object + ctx.feedback = { + query, + matches, + results + }; + /** + * @emit {results} event on search response with matches + **/ eventEmitter("results", ctx); }; - var Expand = "aria-expanded"; - var Active = "aria-activedescendant"; - var Selected = "aria-selected"; - var feedback = function feedback(ctx, index) { - ctx.feedback.selection = _objectSpread2({ - index: index - }, ctx.feedback.results[index]); + function _extends$2() { + _extends$2 = Object.assign || function(target) { + for(var i = 1; i < arguments.length; i++){ + var source = arguments[i]; + for(var key in source){ + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + return _extends$2.apply(this, arguments); + } + // String holders + const Expand = "aria-expanded"; + const Active = "aria-activedescendant"; + const Selected = "aria-selected"; + /** + * Data feedback object constructor + * + * @param {Object} ctx - autoComplete.js context + * @param {Number} index - of the selected result item + */ const feedback = (ctx, index)=>{ + ctx.feedback.selection = _extends$2({ + index + }, ctx.feedback.results[index]); }; - var render = function render(ctx) { - var resultsList = ctx.resultsList, - list = ctx.list, - resultItem = ctx.resultItem, - feedback = ctx.feedback; - var matches = feedback.matches, - results = feedback.results; - ctx.cursor = -1; - list.innerHTML = ""; - if (matches.length || resultsList.noResults) { - var fragment = new DocumentFragment(); - results.forEach(function (result, index) { - var element = create(resultItem.tag, _objectSpread2({ - id: "".concat(resultItem.id, "_").concat(index), - role: "option", - innerHTML: result.match, - inside: fragment - }, resultItem["class"] && { - "class": resultItem["class"] - })); - if (resultItem.element) resultItem.element(element, result); - }); - list.append(fragment); - if (resultsList.element) resultsList.element(list, feedback); - open(ctx); - } else { - close(ctx); - } + /** + * Render list of matching results + * + * @param {Object} ctx - autoComplete.js context + */ const render = (ctx)=>{ + const { resultsList, list, resultItem, feedback } = ctx; + const { matches, results } = feedback; + // Reset cursor + ctx.cursor = -1; + // Clear list + list.innerHTML = ""; + if (matches.length || resultsList.noResults) { + const fragment = new DocumentFragment(); + // Generate results elements + results.forEach((result, index)=>{ + // Create new list item + const element = create(resultItem.tag, _extends$2({ + id: `${resultItem.id}_${index}`, + role: "option", + innerHTML: result.match, + inside: fragment + }, resultItem.class && { + class: resultItem.class + })); + // If custom content is active pass params + if (resultItem.element) resultItem.element(element, result); + }); + // Add fragment of result items to DOM list + list.append(fragment); + // Run custom container function if active + if (resultsList.element) resultsList.element(list, feedback); + open(ctx); + } else { + // Check if there are NO results + close(ctx); + } }; - var open = function open(ctx) { - if (ctx.isOpen) return; - (ctx.wrapper || ctx.input).setAttribute(Expand, true); - ctx.list.removeAttribute("hidden"); - ctx.isOpen = true; - eventEmitter("open", ctx); + /** + * Open closed list + * + * @param {Object} ctx - autoComplete.js context + */ const open = (ctx)=>{ + if (ctx.isOpen) return; + // Set expanded attribute on the parent to true + (ctx.wrapper || ctx.input).setAttribute(Expand, true); + // Remove hidden attribute from list + ctx.list.removeAttribute("hidden"); + // Set list to opened + ctx.isOpen = true; + /** + * @emit {open} event after results list is opened + **/ eventEmitter("open", ctx); }; - var close = function close(ctx) { - if (!ctx.isOpen) return; - (ctx.wrapper || ctx.input).setAttribute(Expand, false); - ctx.input.setAttribute(Active, ""); - ctx.list.setAttribute("hidden", ""); - ctx.isOpen = false; - eventEmitter("close", ctx); + /** + * Close opened list + * + * @param {Object} ctx - autoComplete.js context + */ const close = (ctx)=>{ + if (!ctx.isOpen) return; + // Set expanded attribute on the parent to false + (ctx.wrapper || ctx.input).setAttribute(Expand, false); + // Add input active descendant attribute + ctx.input.setAttribute(Active, ""); + // Add hidden attribute from list + ctx.list.setAttribute("hidden", ""); + // Set list to closed + ctx.isOpen = false; + /** + * @emit {close} event after "resultsList" is closed + **/ eventEmitter("close", ctx); }; - var goTo = function goTo(index, ctx) { - var resultItem = ctx.resultItem; - var results = ctx.list.getElementsByTagName(resultItem.tag); - var cls = resultItem.selected ? resultItem.selected.split(" ") : false; - if (ctx.isOpen && results.length) { - var _results$index$classL; - var state = ctx.cursor; - if (index >= results.length) index = 0; - if (index < 0) index = results.length - 1; - ctx.cursor = index; - if (state > -1) { - var _results$state$classL; - results[state].removeAttribute(Selected); - if (cls) (_results$state$classL = results[state].classList).remove.apply(_results$state$classL, _toConsumableArray(cls)); + /** + * Go to result item by index + * + * @param {Number} index - of the selected result item + * @param {Object} ctx - autoComplete.js context + */ const goTo = (index, ctx)=>{ + const { resultItem } = ctx; + // List of result items + const results = ctx.list.getElementsByTagName(resultItem.tag); + // Selected result item Classes + const cls = resultItem.selected ? resultItem.selected.split(" ") : false; + if (ctx.isOpen && results.length) { + // Previous cursor state + const state = ctx.cursor; + // Reset cursor to first item if exceeding end of list + if (index >= results.length) index = 0; + // Move cursor to the last item if exceeding beginning of list + if (index < 0) index = results.length - 1; + // Current cursor position + ctx.cursor = index; + if (state > -1) { + // Remove "aria-selected" attribute from the item + results[state].removeAttribute(Selected); + // Remove "selected" class from the item + if (cls) results[state].classList.remove(...cls); + } + // Set "aria-selected" value to true + results[index].setAttribute(Selected, true); + // Add "selected" class to the selected item + if (cls) results[index].classList.add(...cls); + // Set "aria-activedescendant" value to the selected item + ctx.input.setAttribute(Active, results[ctx.cursor].id); + // Scroll to selection + ctx.list.scrollTop = results[index].offsetTop - ctx.list.clientHeight + results[index].clientHeight + 5; + // Prepare Selection data feedback object + ctx.feedback.cursor = ctx.cursor; + feedback(ctx, index); + /** + * @emit {navigate} event on results list navigation + **/ eventEmitter("navigate", ctx); } - results[index].setAttribute(Selected, true); - if (cls) (_results$index$classL = results[index].classList).add.apply(_results$index$classL, _toConsumableArray(cls)); - ctx.input.setAttribute(Active, results[ctx.cursor].id); - ctx.list.scrollTop = results[index].offsetTop - ctx.list.clientHeight + results[index].clientHeight + 5; - ctx.feedback.cursor = ctx.cursor; - feedback(ctx, index); - eventEmitter("navigate", ctx); - } }; - var next = function next(ctx) { - goTo(ctx.cursor + 1, ctx); + /** + * Go to next result item + * + * @param {Object} ctx - autoComplete.js context + */ const next = (ctx)=>{ + goTo(ctx.cursor + 1, ctx); }; - var previous = function previous(ctx) { - goTo(ctx.cursor - 1, ctx); + /** + * Go to previous result item + * + * @param {Object} ctx - autoComplete.js context + */ const previous = (ctx)=>{ + goTo(ctx.cursor - 1, ctx); }; - var select = function select(ctx, event, index) { - index = index >= 0 ? index : ctx.cursor; - if (index < 0) return; - ctx.feedback.event = event; - feedback(ctx, index); - eventEmitter("selection", ctx); - close(ctx); + /** + * Select result item with given index or current cursor + * + * @param {Object} ctx - autoComplete.js context + * @param {Object} event - of selection + * @param {Number} index - of the selected result item + */ const select = (ctx, event, index)=>{ + // Check if cursor within list range + index = index >= 0 ? index : ctx.cursor; + // Prevent empty selection + if (index < 0) return; + // Prepare Selection data feedback object + ctx.feedback.event = event; + feedback(ctx, index); + /** + * @emit {selection} event on result item selection + **/ eventEmitter("selection", ctx); + close(ctx); }; - var click = function click(event, ctx) { - var itemTag = ctx.resultItem.tag.toUpperCase(); - var items = Array.from(ctx.list.querySelectorAll(itemTag)); - var item = event.target.closest(itemTag); - if (item && item.nodeName === itemTag) { - select(ctx, event, items.indexOf(item)); - } + /** + * Click selection handler + * + * @param {Object} event - "Click" event object + * @param {Object} ctx - autoComplete.js context + */ const click = (event, ctx)=>{ + const itemTag = ctx.resultItem.tag.toUpperCase(); + const items = Array.from(ctx.list.querySelectorAll(itemTag)); + const item = event.target.closest(itemTag); + // Check if clicked item is a "result" item + if (item && item.nodeName === itemTag) { + select(ctx, event, items.indexOf(item)); + } }; - var navigate = function navigate(event, ctx) { - switch (event.keyCode) { - case 40: - case 38: - event.preventDefault(); - event.keyCode === 40 ? next(ctx) : previous(ctx); - break; - case 13: - if (!ctx.submit) event.preventDefault(); - if (ctx.cursor >= 0) select(ctx, event); - break; - case 9: - if (ctx.resultsList.tabSelect && ctx.cursor >= 0) select(ctx, event); - break; - case 27: - ctx.input.value = ""; - eventEmitter('clear', ctx); - close(ctx); - break; - } + /** + * List navigation handler + * + * @param {Object} event - "keydown" press event Object + * @param {Object} ctx - autoComplete.js context + */ const navigate = (event, ctx)=>{ + // Check pressed key + switch(event.keyCode){ + // Down/Up arrow + case 40: + case 38: + event.preventDefault(); + // Move cursor based on pressed key + event.keyCode === 40 ? next(ctx) : previous(ctx); + break; + // Enter + case 13: + if (!ctx.submit) event.preventDefault(); + // If cursor moved + if (ctx.cursor >= 0) select(ctx, event); + break; + // Tab + case 9: + // Select on Tab if enabled + if (ctx.resultsList.tabSelect && ctx.cursor >= 0) select(ctx, event); + break; + // Esc + case 27: + // Clear "input" value + ctx.input.value = ""; + /** + * @emit {clear} event on input clear + **/ eventEmitter('clear', ctx); + close(ctx); + break; + } }; - function start (ctx, q) { - var _this = this; - return new Promise(function ($return, $error) { - var queryVal, condition; - queryVal = q || getQuery(ctx.input); - queryVal = ctx.query ? ctx.query(queryVal) : queryVal; - condition = checkTrigger(queryVal, ctx.trigger, ctx.threshold); - if (condition) { - return getData(ctx, queryVal).then(function ($await_2) { - try { - if (ctx.feedback instanceof Error) return $return(); - findMatches(queryVal, ctx); - if (ctx.resultsList) render(ctx); - return $If_1.call(_this); - } catch ($boundEx) { - return $error($boundEx); - } - }, $error); - } else { - close(ctx); - return $If_1.call(_this); + function asyncGeneratorStep$1(gen, resolve, reject, _next, _throw, key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; } - function $If_1() { - return $return(); + if (info.done) { + resolve(value); + } else { + Promise.resolve(value).then(_next, _throw); } - }); + } + function _async_to_generator$1(fn) { + return function() { + var self = this, args = arguments; + return new Promise(function(resolve, reject) { + var gen = fn.apply(self, args); + function _next(value) { + asyncGeneratorStep$1(gen, resolve, reject, _next, _throw, "next", value); + } + function _throw(err) { + asyncGeneratorStep$1(gen, resolve, reject, _next, _throw, "throw", err); + } + _next(undefined); + }); + }; + } + /** + * Start stage + * + * @param {Object} ctx - autoComplete.js context + * @param {String} q - API search query value + */ function start(ctx, q) { + return _async_to_generator$1(function*() { + // Get "input" query value + let queryVal = q || getQuery(ctx.input); + queryVal = ctx.query ? ctx.query(queryVal) : queryVal; + // Get trigger decision + const condition = checkTrigger(queryVal, ctx.trigger, ctx.threshold); + // Validate trigger condition + if (condition) { + // Get from source + yield getData(ctx, queryVal); + // Check if data fetch failed + if (ctx.feedback instanceof Error) return; + // Find matching results to the query + findMatches(queryVal, ctx); + // Render "resultsList" + if (ctx.resultsList) render(ctx); + } else { + // Close open list + close(ctx); + } + })(); } - var eventsManager = function eventsManager(events, callback) { - for (var element in events) { - for (var event in events[element]) { - callback(element, event); + function _extends$1() { + _extends$1 = Object.assign || function(target) { + for(var i = 1; i < arguments.length; i++){ + var source = arguments[i]; + for(var key in source){ + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + return _extends$1.apply(this, arguments); + } + /** + * Manage all given events + * + * @param {Object} events - List of events + * @param {Function} callback - Callback function + */ const eventsManager = (events, callback)=>{ + for(const element in events){ + for(const event in events[element]){ + callback(element, event); + } } - } }; - var addEvents = function addEvents(ctx) { - var events = ctx.events; - var run = debounce(function () { - return start(ctx); - }, ctx.debounce); - var publicEvents = ctx.events = _objectSpread2({ - input: _objectSpread2({}, events && events.input) - }, ctx.resultsList && { - list: events ? _objectSpread2({}, events.list) : {} - }); - var privateEvents = { - input: { - input: function input() { - run(); - }, - keydown: function keydown(event) { - navigate(event, ctx); - }, - blur: function blur() { - close(ctx); - } - }, - list: { - mousedown: function mousedown(event) { - event.preventDefault(); - }, - click: function click$1(event) { - click(event, ctx); - } - } - }; - eventsManager(privateEvents, function (element, event) { - if (!ctx.resultsList && event !== "input") return; - if (publicEvents[element][event]) return; - publicEvents[element][event] = privateEvents[element][event]; - }); - eventsManager(publicEvents, function (element, event) { - ctx[element].addEventListener(event, publicEvents[element][event]); - }); + /** + * Attach all events listeners + * + * @param {Object} ctx - autoComplete.js context + */ const addEvents = (ctx)=>{ + const { events } = ctx; + const run = debounce(()=>start(ctx), ctx.debounce); + // Public events listeners list + const publicEvents = ctx.events = _extends$1({ + input: _extends$1({}, events && events.input) + }, ctx.resultsList && { + list: events ? _extends$1({}, events.list) : {} + }); + // Private events listeners list + const privateEvents = { + input: { + input () { + run(); + }, + keydown (event) { + navigate(event, ctx); + }, + blur () { + close(ctx); + } + }, + list: { + mousedown (event) { + event.preventDefault(); + }, + click (event) { + click(event, ctx); + } + } + }; + // Populate all private events into public events list + eventsManager(privateEvents, (element, event)=>{ + // Do NOT populate any events except "input" If "resultsList" disabled + if (!ctx.resultsList && event !== "input") return; + // Do NOT overwrite public events + if (publicEvents[element][event]) return; + // Populate public events + publicEvents[element][event] = privateEvents[element][event]; + }); + // Attach all public events + eventsManager(publicEvents, (element, event)=>{ + ctx[element].addEventListener(event, publicEvents[element][event]); + }); }; - var removeEvents = function removeEvents(ctx) { - eventsManager(ctx.events, function (element, event) { - ctx[element].removeEventListener(event, ctx.events[element][event]); - }); + /** + * Remove all attached public events listeners + * + * @param {Object} ctx - autoComplete.js context + */ const removeEvents = (ctx)=>{ + eventsManager(ctx.events, (element, event)=>{ + ctx[element].removeEventListener(event, ctx.events[element][event]); + }); }; - function init (ctx) { - var _this = this; - return new Promise(function ($return, $error) { - var placeHolder, resultsList, parentAttrs; - placeHolder = ctx.placeHolder; - resultsList = ctx.resultsList; - parentAttrs = { - role: "combobox", - "aria-owns": resultsList.id, - "aria-haspopup": true, - "aria-expanded": false - }; - create(ctx.input, _objectSpread2(_objectSpread2({ - "aria-controls": resultsList.id, - "aria-autocomplete": "both" - }, placeHolder && { - placeholder: placeHolder - }), !ctx.wrapper && _objectSpread2({}, parentAttrs))); - if (ctx.wrapper) ctx.wrapper = create("div", _objectSpread2({ - around: ctx.input, - "class": ctx.name + "_wrapper" - }, parentAttrs)); - if (resultsList) ctx.list = create(resultsList.tag, _objectSpread2({ - dest: [resultsList.destination, resultsList.position], - id: resultsList.id, - role: "listbox", - hidden: "hidden" - }, resultsList["class"] && { - "class": resultsList["class"] - })); - addEvents(ctx); - if (ctx.data.cache) { - return getData(ctx).then(function ($await_2) { - try { - return $If_1.call(_this); - } catch ($boundEx) { - return $error($boundEx); - } - }, $error); + function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; } - function $If_1() { - eventEmitter("init", ctx); - return $return(); + if (info.done) { + resolve(value); + } else { + Promise.resolve(value).then(_next, _throw); } - return $If_1.call(_this); - }); + } + function _async_to_generator(fn) { + return function() { + var self = this, args = arguments; + return new Promise(function(resolve, reject) { + var gen = fn.apply(self, args); + function _next(value) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); + } + function _throw(err) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); + } + _next(undefined); + }); + }; + } + function _extends() { + _extends = Object.assign || function(target) { + for(var i = 1; i < arguments.length; i++){ + var source = arguments[i]; + for(var key in source){ + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + return _extends.apply(this, arguments); + } + /** + * Initialization stage + * + * @param {Object} ctx - autoComplete.js context + */ function init(ctx) { + return _async_to_generator(function*() { + const { placeHolder, resultsList } = ctx; + const parentAttrs = { + role: "combobox", + "aria-owns": resultsList.id, + "aria-haspopup": true, + "aria-expanded": false + }; + // Set "input" attributes + create(ctx.input, _extends({ + "aria-controls": resultsList.id, + "aria-autocomplete": "both" + }, placeHolder && { + placeholder: placeHolder + }, !ctx.wrapper && _extends({}, parentAttrs))); + // Create wrapper element + if (ctx.wrapper) ctx.wrapper = create("div", _extends({ + around: ctx.input, + class: ctx.name + "_wrapper" + }, parentAttrs)); + if (resultsList) // Create new list element + ctx.list = create(resultsList.tag, _extends({ + dest: [ + resultsList.destination, + resultsList.position + ], + id: resultsList.id, + role: "listbox", + hidden: "hidden" + }, resultsList.class && { + class: resultsList.class + })); + // Attach Events listeners + addEvents(ctx); + // Get the data from store + if (ctx.data.cache) yield getData(ctx); + /** + * @emit {init} event on Initialization + **/ eventEmitter("init", ctx); + })(); } - function extend (autoComplete) { - var prototype = autoComplete.prototype; - prototype.init = function () { - init(this); - }; - prototype.start = function (query) { - start(this, query); - }; - prototype.unInit = function () { - if (this.wrapper) { - var parentNode = this.wrapper.parentNode; - parentNode.insertBefore(this.input, this.wrapper); - parentNode.removeChild(this.wrapper); - } - removeEvents(this); - }; - prototype.open = function () { - open(this); - }; - prototype.close = function () { - close(this); - }; - prototype.goTo = function (index) { - goTo(index, this); - }; - prototype.next = function () { - next(this); - }; - prototype.previous = function () { - previous(this); - }; - prototype.select = function (index) { - select(this, null, index); - }; - prototype.search = function (query, record, options) { - return search(query, record, options); - }; + /** + * autoComplete.js API extension + * + * @param {Object} autoComplete - autoComplete.js object instance + */ function extend(autoComplete) { + const { prototype } = autoComplete; + // Initialize autoComplete.js engine + prototype.init = function() { + init(this); + }; + /** + * Start autoComplete.js engine + * + * @param {String} query - Search query value + * + */ prototype.start = function(query) { + start(this, query); + }; + // Un-Initialize autoComplete.js engine + prototype.unInit = function() { + if (this.wrapper) { + const parentNode = this.wrapper.parentNode; + parentNode.insertBefore(this.input, this.wrapper); + parentNode.removeChild(this.wrapper); + } + removeEvents(this); + }; + // Open closed list + prototype.open = function() { + open(this); + }; + // Close opened list + prototype.close = function() { + close(this); + }; + /** + * Go to result item by index + * + * @param {Number} index - of the selected result item + * + */ prototype.goTo = function(index) { + goTo(index, this); + }; + // Go to next result item + prototype.next = function() { + next(this); + }; + // Go to previous result item + prototype.previous = function() { + previous(this); + }; + /** + * Select result item with given index or current cursor + * + * @param {Number} index - of the selected result item + * + */ prototype.select = function(index) { + select(this, null, index); + }; + /** + * autoComplete.js Search Engine + * Find matching characters in record + * + * @param {String} query - Search query value + * @param {String} record - Data record string + * @param {Object} options - Search Engine configuration options + * + * @returns {String} - Matching data record + */ prototype.search = function(query, record, options) { + return search(query, record, options); + }; } - function autoComplete(config) { - this.options = config; - this.id = autoComplete.instances = (autoComplete.instances || 0) + 1; - this.name = "autoComplete"; - this.wrapper = 1; - this.threshold = 1; - this.debounce = 0; - this.resultsList = { - position: "afterend", - tag: "ul", - maxResults: 5 - }; - this.resultItem = { - tag: "li" - }; - configure(this); - extend.call(this, autoComplete); - init(this); + /** + * @class autoComplete + * @classdesc Creates a new instance of autoComplete.js with the given configuration. + * + * @see {@link https://tarekraafat.github.io/autoComplete.js/#/configuration} for more information on configuration options. + * @example const autoCompleteJS = new autoComplete({config}); + * + * @param {Object} config - Configuration options. + * @param {Number|String} [config.id] - Auto assigned instance unique identifier. + * @param {String} [config.name=autoComplete] - Prepended to all created DOM element class names. + * @param {(String|Function)} [config.selector=#autoComplete] - Must point to or return the relevant input field or element that autoComplete.js should act upon. + * @param {Object} config.data - Data source. + * @param {(String[]|Object[]|Function)} config.data.src - Values to search or an async or immediate function that returns an array of values to search. + * @param {String[]} [config.data.keys] - Only used if config.data.src is an array of objects. Specifies which keys in the objects autoComplete.js should search. + * @param {Boolean} [config.data.cache=false] - If true, autoComplete.js fetches all config.data.src when initialized and never again. + * @param {Function} [config.data.filter] - Used to filter and sort matching returns from config.data.src before showing them to the user. Signature: (Array), is given all the results from config.data.src that matches the query. + * @param {Function} [config.trigger] - Return true if you want autoComplete.js to start. Signature: (event, query). Default trigger function returns true if input field is *NOT* empty *and* greater than or equal to config.threshold. + * @param {Function} [config.query] - For manipulating the input value before running the search, for example if you want to remove spaces or anything else. Signature: (string), must return string, is given the raw input value. + * @param {String} [config.placeHolder] - Placeholder to set on the input element. For example "Search...". + * @param {Number} [config.threshold=1] - Minimum number of characters required in the input before triggering autocompletion. + * @param {Number} [config.debounce=0] - Delay in milliseconds after input for autocompletion to start. + * @param {Boolean} [config.wrapper=true] - Wraps the input element in a div for a11y purposes, adding some ARIA attributes. + * @param {(String|Function)} [config.searchEngine=strict] - "strict" checks if the given query is contained within the data, "loose" returns every result where every character in the query is present in the data in any order and location. Signature: (query: string, record: any), given the manipulated query input and each data.src array entry or for each entry[config.data.keys]. + * @param {Boolean} [config.diacritics=false] - Enable to normalize query and data values using String.normalize and by removing u0300 through u036f. See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize}. + * @param {(Object|Boolean)} [config.resultsList] - false to disable result list rendering. + * @param {String} [config.resultsList.tag=ul] - HTML tag to use for rendering the result container. + * @param {String} [config.resultsList.id=autoComplete_list_index] - ID given to the result container. + * @param {String} [config.resultsList.class] - Class names to give to the result container. + * @param {(String|Function)} [config.resultsList.destination=#autoComplete] - Selector that points to where you want to insert the result elements. Defaults to config.selector. Signature: (). + * @param {String} [config.resultsList.position=afterend] - Position relative to config.selector where to insert the results list. See {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/insertAdjacentElement#parameters}. + * @param {Function} [config.resultsList.element] - Invoked before showing the results list. Allows manipulation of the DOM before it is added to the document. Signature: (list: HTMLElement, data: { query, matches, results }), where list is the container element. + * @param {Number} [config.resultsList.maxResults=5] - Maximum number of results to render. + * @param {Boolean} [config.resultsList.tabSelect=false] - Makes the Tab key select the entry navigated to using the keyboard, just like Enter. + * @param {Boolean} [config.resultsList.noResults=false] - If enabled the results list will render when there are zero matches. For example if you want to show a custom message or help to the user in config.resultsList.element. + * @param {Object} [config.resultItem] - Customize each rendered autocompletion result. + * @param {String} [config.resultItem.tag=li] - HTML tag to use for rendering each result. + * @param {String} [config.resultItem.id=autoComplete_result_index] - Prefix to use for the ID of each result element. _ and a number from 0 to maxResults is appended, so the final ID is for example "autoComplete_result_0" to "autoComplete_result_10". + * @param {String} [config.resultItem.class] - Class names to give to each result element. + * @param {Function} [config.resultItem.element] - Invoked before showing the results list. Allows manipulation of the DOM before it is added to the document. Signature: (item: HTMLElement, data: { match, value, [key] }). + * @param {(Boolean|String)} [config.resultItem.highlight=false] - Enable to highlight matching characters using HTMLMarkElement, or a string of CSS classes to add to any generated mark elements. + * @param {String} [config.resultItem.selected] - CSS classes to add and remove from result items the user navigates to using the keyboard. + * @param {Boolean} [config.submit=false] - If enabled pressing enter will not prevent default behavior. + * @param {Object} [config.events] - Allows adding custom or overriding internal event handling. + * @param {Object} [config.events.input] - Maps event names to event handlers for the input element. Each key must be a valid event name, see {@link https://developer.mozilla.org/en-US/docs/Web/Events}, and each value must be an event handler function. Default handlers are keydown and blur. + * @param {Object} [config.events.list] - Same as config.events.input, but for the result list container element. Default handlers are mousedown and click. + */ function autoComplete(config) { + // User's Configuration options + this.options = config; + // Default Configuration options + this.id = autoComplete.instances = (autoComplete.instances || 0) + 1; + this.name = "autoComplete"; + this.wrapper = 1; + this.threshold = 1; + this.debounce = 0; + this.resultsList = { + position: "afterend", + tag: "ul", + maxResults: 5 + }; + this.resultItem = { + tag: "li" + }; + // Set all Configuration options + configure(this); + // Stage API methods + extend.call(this, autoComplete); + // Initialize autoComplete.js + init(this); } return autoComplete; diff --git a/dist/autoComplete.js.gz b/dist/autoComplete.js.gz index 77f6565..bbf0e99 100644 Binary files a/dist/autoComplete.js.gz and b/dist/autoComplete.js.gz differ diff --git a/dist/autoComplete.min.js b/dist/autoComplete.min.js index a5091a1..2ca7a1d 100644 --- a/dist/autoComplete.min.js +++ b/dist/autoComplete.min.js @@ -1 +1,31 @@ -var t,e;t=this,e=function(){"use strict";function t(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,u=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return u=t.done,t},e:function(t){a=!0,o=t},f:function(){try{u||null==n.return||n.return()}finally{if(a)throw o}}}}(n.keys);try{for(l.s();!(c=l.n()).done;)a(c.value)}catch(t){l.e(t)}finally{l.f()}}else a()})),n.filter&&(i=n.filter(i));var o=i.slice(0,e.resultsList.maxResults);e.feedback={query:t,matches:i,results:o},f("results",e)},m="aria-expanded",v="aria-activedescendant",y="aria-selected",b=function(t,e){t.feedback.selection=r({index:e},t.feedback.results[e])},g=function(t){t.isOpen||((t.wrapper||t.input).setAttribute(m,!0),t.list.removeAttribute("hidden"),t.isOpen=!0,f("open",t))},w=function(t){t.isOpen&&((t.wrapper||t.input).setAttribute(m,!1),t.input.setAttribute(v,""),t.list.setAttribute("hidden",""),t.isOpen=!1,f("close",t))},O=function(t,e){var n=e.resultItem,r=e.list.getElementsByTagName(n.tag),o=!!n.selected&&n.selected.split(" ");if(e.isOpen&&r.length){var s,u,a=e.cursor;t>=r.length&&(t=0),t<0&&(t=r.length-1),e.cursor=t,a>-1&&(r[a].removeAttribute(y),o&&(u=r[a].classList).remove.apply(u,i(o))),r[t].setAttribute(y,!0),o&&(s=r[t].classList).add.apply(s,i(o)),e.input.setAttribute(v,r[e.cursor].id),e.list.scrollTop=r[t].offsetTop-e.list.clientHeight+r[t].clientHeight+5,e.feedback.cursor=e.cursor,b(e,t),f("navigate",e)}},A=function(t){O(t.cursor+1,t)},S=function(t){O(t.cursor-1,t)},j=function(t,e,n){(n=n>=0?n:t.cursor)<0||(t.feedback.event=e,b(t,n),f("selection",t),w(t))};function k(t,e){var n=this;return new Promise((function(i,o){var s,u;return s=e||((u=t.input)instanceof HTMLInputElement||u instanceof HTMLTextAreaElement?u.value:u.innerHTML),function(t,e,n){return e?e(t):t.length>=n}(s=t.query?t.query(s):s,t.trigger,t.threshold)?d(t,s).then((function(e){try{return t.feedback instanceof Error?i():(h(s,t),t.resultsList&&function(t){var e=t.resultsList,n=t.list,i=t.resultItem,o=t.feedback,s=o.matches,u=o.results;if(t.cursor=-1,n.innerHTML="",s.length||e.noResults){var c=new DocumentFragment;u.forEach((function(t,e){var n=a(i.tag,r({id:"".concat(i.id,"_").concat(e),role:"option",innerHTML:t.match,inside:c},i.class&&{class:i.class}));i.element&&i.element(n,t)})),n.append(c),e.element&&e.element(n,o),g(t)}else w(t)}(t),c.call(n))}catch(t){return o(t)}}),o):(w(t),c.call(n));function c(){return i()}}))}var L=function(t,e){for(var n in t)for(var r in t[n])e(n,r)},T=function(t){var e,n,i,o=t.events,s=(e=function(){return k(t)},n=t.debounce,function(){clearTimeout(i),i=setTimeout((function(){return e()}),n)}),u=t.events=r({input:r({},o&&o.input)},t.resultsList&&{list:o?r({},o.list):{}}),a={input:{input:function(){s()},keydown:function(e){!function(t,e){switch(t.keyCode){case 40:case 38:t.preventDefault(),40===t.keyCode?A(e):S(e);break;case 13:e.submit||t.preventDefault(),e.cursor>=0&&j(e,t);break;case 9:e.resultsList.tabSelect&&e.cursor>=0&&j(e,t);break;case 27:e.input.value="",f("clear",e),w(e)}}(e,t)},blur:function(){w(t)}},list:{mousedown:function(t){t.preventDefault()},click:function(e){!function(t,e){var n=e.resultItem.tag.toUpperCase(),r=Array.from(e.list.querySelectorAll(n)),i=t.target.closest(n);i&&i.nodeName===n&&j(e,t,r.indexOf(i))}(e,t)}}};L(a,(function(e,n){(t.resultsList||"input"===n)&&(u[e][n]||(u[e][n]=a[e][n]))})),L(u,(function(e,n){t[e].addEventListener(n,u[e][n])}))};function E(t){var e=this;return new Promise((function(n,i){var o,s,u;if(o=t.placeHolder,u={role:"combobox","aria-owns":(s=t.resultsList).id,"aria-haspopup":!0,"aria-expanded":!1},a(t.input,r(r({"aria-controls":s.id,"aria-autocomplete":"both"},o&&{placeholder:o}),!t.wrapper&&r({},u))),t.wrapper&&(t.wrapper=a("div",r({around:t.input,class:t.name+"_wrapper"},u))),s&&(t.list=a(s.tag,r({dest:[s.destination,s.position],id:s.id,role:"listbox",hidden:"hidden"},s.class&&{class:s.class}))),T(t),t.data.cache)return d(t).then((function(t){try{return c.call(e)}catch(t){return i(t)}}),i);function c(){return f("init",t),n()}return c.call(e)}))}function P(t){var e=t.prototype;e.init=function(){E(this)},e.start=function(t){k(this,t)},e.unInit=function(){if(this.wrapper){var t=this.wrapper.parentNode;t.insertBefore(this.input,this.wrapper),t.removeChild(this.wrapper)}var e;L((e=this).events,(function(t,n){e[t].removeEventListener(n,e.events[t][n])}))},e.open=function(){g(this)},e.close=function(){w(this)},e.goTo=function(t){O(t,this)},e.next=function(){A(this)},e.previous=function(){S(this)},e.select=function(t){j(this,null,t)},e.search=function(t,e,n){return p(t,e,n)}}return function t(e){this.options=e,this.id=t.instances=(t.instances||0)+1,this.name="autoComplete",this.wrapper=1,this.threshold=1,this.debounce=0,this.resultsList={position:"afterend",tag:"ul",maxResults:5},this.resultItem={tag:"li"},function(t){var e=t.name,n=t.options,r=t.resultsList,i=t.resultItem;for(var s in n)if("object"===o(n[s]))for(var a in t[s]||(t[s]={}),n[s])t[s][a]=n[s][a];else t[s]=n[s];t.selector=t.selector||"#"+e,r.destination=r.destination||t.selector,r.id=r.id||e+"_list_"+t.id,i.id=i.id||e+"_result",t.input=u(t.selector)}(this),P.call(this,t),E(this)}},"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).autoComplete=e(); +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.autoComplete = factory()); +})(this, (function () { 'use strict'; + + function _extends$3(){_extends$3=Object.assign||function(target){for(var i=1;itypeof element==="string"?document.querySelector(element):element();const create=(tag,options)=>{const el=typeof tag==="string"?document.createElement(tag):tag;for(const key in options){const val=options[key];if(key==="inside"){val.append(el);}else if(key==="dest"){select$1(val[0]).insertAdjacentElement(val[1],el);}else if(key==="around"){const ref=val;ref.parentNode.insertBefore(el,ref);el.append(ref);if(ref.getAttribute("autofocus")!=null)ref.focus();}else if(key in el){el[key]=val;}else {el.setAttribute(key,val);}}return el};const getQuery=field=>field instanceof HTMLInputElement||field instanceof HTMLTextAreaElement?field.value:field.innerHTML;const format=(value,diacritics)=>{value=String(value).toLowerCase();return diacritics?value.normalize("NFD").replace(/[\u0300-\u036f]/g,"").normalize("NFC"):value};const debounce=(callback,duration)=>{let timer;return ()=>{clearTimeout(timer);timer=setTimeout(()=>callback(),duration);}};const checkTrigger=(query,condition,threshold)=>condition?condition(query):query.length>=threshold;const mark=(value,cls)=>create("mark",_extends$3({innerHTML:value},typeof cls==="string"&&{class:cls})).outerHTML; + + var configure = (ctx=>{const{name,options,resultsList,resultItem}=ctx;for(const option in options){if(typeof options[option]==="object"){if(!ctx[option])ctx[option]={};for(const subOption in options[option]){ctx[option][subOption]=options[option][subOption];}}else {ctx[option]=options[option];}}ctx.selector=ctx.selector||"#"+name;resultsList.destination=resultsList.destination||ctx.selector;resultsList.id=resultsList.id||name+"_list_"+ctx.id;resultItem.id=resultItem.id||name+"_result";ctx.input=select$1(ctx.selector);}); + + var eventEmitter = ((name,ctx)=>{ctx.input.dispatchEvent(new CustomEvent(name,{bubbles:true,detail:ctx.feedback,cancelable:true}));}); + + var search = ((query,record,options)=>{const{mode,diacritics,highlight}=options||{};const nRecord=format(record,diacritics);record=String(record);query=format(query,diacritics);if(mode==="loose"){query=query.replace(/ /g,"");const qLength=query.length;let cursor=0;const match=Array.from(record).map((character,index)=>{if(cursor_async_to_generator$2(function*(){const{data}=ctx;if(data.cache&&data.store)return;ctx.feedback=data.store=typeof data.src==="function"?yield data.src(query):data.src;eventEmitter("response",ctx);})();const findMatches=(query,ctx)=>{const{data,searchEngine}=ctx;let matches=[];data.store.forEach((value,index)=>{const find=key=>{const record=key?value[key]:value;const match=typeof searchEngine==="function"?searchEngine(query,record):search(query,record,{mode:searchEngine,diacritics:ctx.diacritics,highlight:ctx.resultItem.highlight});if(!match)return;let result={match,value};if(key)result.key=key;matches.push(result);};if(data.keys){for(const key of data.keys){find(key);}}else {find();}});if(data.filter)matches=data.filter(matches);const results=matches.slice(0,ctx.resultsList.maxResults);ctx.feedback={query,matches,results};eventEmitter("results",ctx);}; + + function _extends$2(){_extends$2=Object.assign||function(target){for(var i=1;i{ctx.feedback.selection=_extends$2({index},ctx.feedback.results[index]);};const render=ctx=>{const{resultsList,list,resultItem,feedback}=ctx;const{matches,results}=feedback;ctx.cursor=-1;list.innerHTML="";if(matches.length||resultsList.noResults){const fragment=new DocumentFragment;results.forEach((result,index)=>{const element=create(resultItem.tag,_extends$2({id:`${resultItem.id}_${index}`,role:"option",innerHTML:result.match,inside:fragment},resultItem.class&&{class:resultItem.class}));if(resultItem.element)resultItem.element(element,result);});list.append(fragment);if(resultsList.element)resultsList.element(list,feedback);open(ctx);}else {close(ctx);}};const open=ctx=>{if(ctx.isOpen)return;(ctx.wrapper||ctx.input).setAttribute(Expand,true);ctx.list.removeAttribute("hidden");ctx.isOpen=true;eventEmitter("open",ctx);};const close=ctx=>{if(!ctx.isOpen)return;(ctx.wrapper||ctx.input).setAttribute(Expand,false);ctx.input.setAttribute(Active,"");ctx.list.setAttribute("hidden","");ctx.isOpen=false;eventEmitter("close",ctx);};const goTo=(index,ctx)=>{const{resultItem}=ctx;const results=ctx.list.getElementsByTagName(resultItem.tag);const cls=resultItem.selected?resultItem.selected.split(" "):false;if(ctx.isOpen&&results.length){const state=ctx.cursor;if(index>=results.length)index=0;if(index<0)index=results.length-1;ctx.cursor=index;if(state>-1){results[state].removeAttribute(Selected);if(cls)results[state].classList.remove(...cls);}results[index].setAttribute(Selected,true);if(cls)results[index].classList.add(...cls);ctx.input.setAttribute(Active,results[ctx.cursor].id);ctx.list.scrollTop=results[index].offsetTop-ctx.list.clientHeight+results[index].clientHeight+5;ctx.feedback.cursor=ctx.cursor;feedback(ctx,index);eventEmitter("navigate",ctx);}};const next=ctx=>{goTo(ctx.cursor+1,ctx);};const previous=ctx=>{goTo(ctx.cursor-1,ctx);};const select=(ctx,event,index)=>{index=index>=0?index:ctx.cursor;if(index<0)return;ctx.feedback.event=event;feedback(ctx,index);eventEmitter("selection",ctx);close(ctx);};const click=(event,ctx)=>{const itemTag=ctx.resultItem.tag.toUpperCase();const items=Array.from(ctx.list.querySelectorAll(itemTag));const item=event.target.closest(itemTag);if(item&&item.nodeName===itemTag){select(ctx,event,items.indexOf(item));}};const navigate=(event,ctx)=>{switch(event.keyCode){case 40:case 38:event.preventDefault();event.keyCode===40?next(ctx):previous(ctx);break;case 13:if(!ctx.submit)event.preventDefault();if(ctx.cursor>=0)select(ctx,event);break;case 9:if(ctx.resultsList.tabSelect&&ctx.cursor>=0)select(ctx,event);break;case 27:ctx.input.value="";eventEmitter("clear",ctx);close(ctx);break}}; + + function asyncGeneratorStep$1(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return}if(info.done){resolve(value);}else {Promise.resolve(value).then(_next,_throw);}}function _async_to_generator$1(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep$1(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep$1(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);})}}function start(ctx,q){return _async_to_generator$1(function*(){let queryVal=q||getQuery(ctx.input);queryVal=ctx.query?ctx.query(queryVal):queryVal;const condition=checkTrigger(queryVal,ctx.trigger,ctx.threshold);if(condition){yield getData(ctx,queryVal);if(ctx.feedback instanceof Error)return;findMatches(queryVal,ctx);if(ctx.resultsList)render(ctx);}else {close(ctx);}})()} + + function _extends$1(){_extends$1=Object.assign||function(target){for(var i=1;i{for(const element in events){for(const event in events[element]){callback(element,event);}}};const addEvents=ctx=>{const{events}=ctx;const run=debounce(()=>start(ctx),ctx.debounce);const publicEvents=ctx.events=_extends$1({input:_extends$1({},events&&events.input)},ctx.resultsList&&{list:events?_extends$1({},events.list):{}});const privateEvents={input:{input(){run();},keydown(event){navigate(event,ctx);},blur(){close(ctx);}},list:{mousedown(event){event.preventDefault();},click(event){click(event,ctx);}}};eventsManager(privateEvents,(element,event)=>{if(!ctx.resultsList&&event!=="input")return;if(publicEvents[element][event])return;publicEvents[element][event]=privateEvents[element][event];});eventsManager(publicEvents,(element,event)=>{ctx[element].addEventListener(event,publicEvents[element][event]);});};const removeEvents=ctx=>{eventsManager(ctx.events,(element,event)=>{ctx[element].removeEventListener(event,ctx.events[element][event]);});}; + + function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return}if(info.done){resolve(value);}else {Promise.resolve(value).then(_next,_throw);}}function _async_to_generator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);})}}function _extends(){_extends=Object.assign||function(target){for(var i=1;i r.length) && (a = r.length); - for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; - return n; - } - function _arrayWithoutHoles(r) { - if (Array.isArray(r)) return _arrayLikeToArray(r); - } - function _createForOfIteratorHelper(r, e) { - var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; - if (!t) { - if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e) { - t && (r = t); - var n = 0, - F = function () {}; - return { - s: F, - n: function () { - return n >= r.length ? { - done: !0 - } : { - done: !1, - value: r[n++] - }; - }, - e: function (r) { - throw r; - }, - f: F - }; - } - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - var o, - a = !0, - u = !1; - return { - s: function () { - t = t.call(r); - }, - n: function () { - var r = t.next(); - return a = r.done, r; - }, - e: function (r) { - u = !0, o = r; - }, - f: function () { - try { - a || null == t.return || t.return(); - } finally { - if (u) throw o; - } - } - }; - } - function _defineProperty(e, r, t) { - return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { - value: t, - enumerable: !0, - configurable: !0, - writable: !0 - }) : e[r] = t, e; - } - function _iterableToArray(r) { - if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); - } - function _nonIterableSpread() { - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - function ownKeys(e, r) { - var t = Object.keys(e); - if (Object.getOwnPropertySymbols) { - var o = Object.getOwnPropertySymbols(e); - r && (o = o.filter(function (r) { - return Object.getOwnPropertyDescriptor(e, r).enumerable; - })), t.push.apply(t, o); - } - return t; - } - function _objectSpread2(e) { - for (var r = 1; r < arguments.length; r++) { - var t = null != arguments[r] ? arguments[r] : {}; - r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { - _defineProperty(e, r, t[r]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { - Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); - }); - } - return e; - } - function _toConsumableArray(r) { - return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); - } - function _toPrimitive(t, r) { - if ("object" != typeof t || !t) return t; - var e = t[Symbol.toPrimitive]; - if (void 0 !== e) { - var i = e.call(t, r || "default"); - if ("object" != typeof i) return i; - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return ("string" === r ? String : Number)(t); - } - function _toPropertyKey(t) { - var i = _toPrimitive(t, "string"); - return "symbol" == typeof i ? i : i + ""; - } - function _typeof(o) { - "@babel/helpers - typeof"; - - return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { - return typeof o; - } : function (o) { - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; - }, _typeof(o); - } - function _unsupportedIterableToArray(r, a) { - if (r) { - if ("string" == typeof r) return _arrayLikeToArray(r, a); - var t = {}.toString.call(r).slice(8, -1); - return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; - } + /** + * DOM Element selector + * + * @param {String|HTMLElement} element - html tag | html element + * + * @returns {HTMLElement} - selected html element + */ function _extends$3() { + _extends$3 = Object.assign || function(target) { + for(var i = 1; i < arguments.length; i++){ + var source = arguments[i]; + for(var key in source){ + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + return _extends$3.apply(this, arguments); } - - var select$1 = function select(element) { - return typeof element === "string" ? document.querySelector(element) : element(); - }; - var create = function create(tag, options) { - var el = typeof tag === "string" ? document.createElement(tag) : tag; - for (var key in options) { - var val = options[key]; - if (key === "inside") { - val.append(el); - } else if (key === "dest") { - select$1(val[0]).insertAdjacentElement(val[1], el); - } else if (key === "around") { - var ref = val; - ref.parentNode.insertBefore(el, ref); - el.append(ref); - if (ref.getAttribute("autofocus") != null) ref.focus(); - } else if (key in el) { - el[key] = val; - } else { - el.setAttribute(key, val); + const select$1 = (element)=>typeof element === "string" ? document.querySelector(element) : element(); + /** + * Create new element or Edit existing element + * + * @param {String|HTMLElement} tag - html tag | html element + * @param {Object} options - of the html element + * + * @returns {HTMLElement} - created html element + */ const create = (tag, options)=>{ + const el = typeof tag === "string" ? document.createElement(tag) : tag; + for(const key in options){ + const val = options[key]; + if (key === "inside") { + val.append(el); + } else if (key === "dest") { + select$1(val[0]).insertAdjacentElement(val[1], el); + } else if (key === "around") { + const ref = val; + ref.parentNode.insertBefore(el, ref); + el.append(ref); + if (ref.getAttribute("autofocus") != null) ref.focus(); + } else if (key in el) { + el[key] = val; + } else { + el.setAttribute(key, val); + } } - } - return el; - }; - var getQuery = function getQuery(field) { - return field instanceof HTMLInputElement || field instanceof HTMLTextAreaElement ? field.value : field.innerHTML; - }; - var format = function format(value, diacritics) { - value = String(value).toLowerCase(); - return diacritics ? value.normalize("NFD").replace(/[\u0300-\u036f]/g, "").normalize("NFC") : value; + return el; }; - var debounce = function debounce(callback, duration) { - var timer; - return function () { - clearTimeout(timer); - timer = setTimeout(function () { - return callback(); - }, duration); - }; + /** + * Get the "input" query value + * + * @param {Element} field - input or textarea element + * + * @returns {String} - Raw query value as a string + */ const getQuery = (field)=>field instanceof HTMLInputElement || field instanceof HTMLTextAreaElement ? field.value : field.innerHTML; + /** + * Format input value + * + * @param {String} value - user's raw search query value + * @param {Object} diacritics - formatting on/off + * + * @returns {String} - Raw "input" value as a string + */ const format = (value, diacritics)=>{ + value = String(value).toLowerCase(); + return diacritics ? value.normalize("NFD").replace(/[\u0300-\u036f]/g, "").normalize("NFC") : value; }; - var checkTrigger = function checkTrigger(query, condition, threshold) { - return condition ? condition(query) : query.length >= threshold; - }; - var mark = function mark(value, cls) { - return create("mark", _objectSpread2({ - innerHTML: value - }, typeof cls === "string" && { - "class": cls - })).outerHTML; + /** + * Debouncer + * + * @param {Function} callback - Callback function + * @param {Number} duration - Delay time value + * + * @returns {Function} - Debouncer function + */ const debounce = (callback, duration)=>{ + let timer; + return ()=>{ + clearTimeout(timer); + timer = setTimeout(()=>callback(), duration); + }; }; + /** + * Trigger condition validator + * + * @param {String} query - User's manipulated search query value + * @param {Function} condition - trigger condition rule + * @param {Number} threshold - of query length to trigger + * + * @returns {Boolean} - For autoComplete.js to run or not + */ const checkTrigger = (query, condition, threshold)=>condition ? condition(query) : query.length >= threshold; + /** + * Highlight matching characters + * + * @param {String} value - user's raw search query value + * @param {String} cls - of highlighted character + * + * @returns {HTMLElement} - newly create html element + */ const mark = (value, cls)=>create("mark", _extends$3({ + innerHTML: value + }, typeof cls === "string" && { + class: cls + })).outerHTML; - var configure = (function (ctx) { - var name = ctx.name, - options = ctx.options, - resultsList = ctx.resultsList, - resultItem = ctx.resultItem; - for (var option in options) { - if (_typeof(options[option]) === "object") { - if (!ctx[option]) ctx[option] = {}; - for (var subOption in options[option]) { - ctx[option][subOption] = options[option][subOption]; - } - } else { - ctx[option] = options[option]; + /** + * Configuring options stage + * + * @param {Object} ctx - autoComplete.js configuration options + */ var configure = ((ctx)=>{ + const { name, options, resultsList, resultItem } = ctx; + // Populate Configuration options + for(const option in options){ + if (typeof options[option] === "object") { + if (!ctx[option]) ctx[option] = {}; + for(const subOption in options[option]){ + ctx[option][subOption] = options[option][subOption]; + } + } else { + ctx[option] = options[option]; + } } - } - ctx.selector = ctx.selector || "#" + name; - resultsList.destination = resultsList.destination || ctx.selector; - resultsList.id = resultsList.id || name + "_list_" + ctx.id; - resultItem.id = resultItem.id || name + "_result"; - ctx.input = select$1(ctx.selector); + // Dynamic Config Options + ctx.selector = ctx.selector || "#" + name; + resultsList.destination = resultsList.destination || ctx.selector; + resultsList.id = resultsList.id || name + "_list_" + ctx.id; + resultItem.id = resultItem.id || name + "_result"; + // Assign the "input" html element + ctx.input = select$1(ctx.selector); }); - var eventEmitter = (function (name, ctx) { - ctx.input.dispatchEvent(new CustomEvent(name, { - bubbles: true, - detail: ctx.feedback, - cancelable: true - })); + /** + * Event emitter/dispatcher + * + * @param {String} name - Name of fired event + * @param {Object} ctx - autoComplete.js context + */ var eventEmitter = ((name, ctx)=>{ + // Dispatch event on "input" + ctx.input.dispatchEvent(new CustomEvent(name, { + bubbles: true, + detail: ctx.feedback, + cancelable: true + })); }); - var search = (function (query, record, options) { - var _ref = options || {}, - mode = _ref.mode, - diacritics = _ref.diacritics, - highlight = _ref.highlight; - var nRecord = format(record, diacritics); - record = String(record); - query = format(query, diacritics); - if (mode === "loose") { - query = query.replace(/ /g, ""); - var qLength = query.length; - var cursor = 0; - var match = Array.from(record).map(function (character, index) { - if (cursor < qLength && nRecord[index] === query[cursor]) { - character = highlight ? mark(character, highlight) : character; - cursor++; - } - return character; - }).join(""); - if (cursor === qLength) return match; - } else { - var _match = nRecord.indexOf(query); - if (~_match) { - query = record.substring(_match, _match + query.length); - _match = highlight ? record.replace(query, mark(query, highlight)) : record; - return _match; + /** + * Find matching characters in record + * + * @param {String} query - Search query value + * @param {String} record - Data record string + * @param {Object} options - Search Engine configuration options + * + * @returns {String} - Matching data record + */ var search = ((query, record, options)=>{ + const { mode, diacritics, highlight } = options || {}; + const nRecord = format(record, diacritics); + record = String(record); + query = format(query, diacritics); + if (mode === "loose") { + // Query string with no spaces + query = query.replace(/ /g, ""); + const qLength = query.length; + // Query character cursor position based on match + let cursor = 0; + // Matching characters + const match = Array.from(record).map((character, index)=>{ + // Matching case + if (cursor < qLength && nRecord[index] === query[cursor]) { + // Highlight matching character if active + character = highlight ? mark(character, highlight) : character; + // Move cursor position + cursor++; + } + return character; + }).join(""); + // If record is fully scanned + if (cursor === qLength) return match; + } else { + // Get starting index of matching characters + let match = nRecord.indexOf(query); + // Strict mode + if (~match) { + // Extract matching characters from record + query = record.substring(match, match + query.length); + // Highlight matching characters if active + match = highlight ? record.replace(query, mark(query, highlight)) : record; + return match; + } } - } }); - var getData = function getData(ctx, query) { - return new Promise(function ($return, $error) { - var data; - data = ctx.data; - if (data.cache && data.store) return $return(); - return new Promise(function ($return, $error) { - if (typeof data.src === "function") { - return new Promise(function ($return, $error) { - if (data.src.constructor.name === "AsyncFunction") { - return data.src(query).then($return, $error); - } - return $return(data.src(query)); - }).then($return, $error); - } - return $return(data.src); - }).then(function ($await_7) { - try { - ctx.feedback = data.store = $await_7; - eventEmitter("response", ctx); - return $return(); - } catch ($boundEx) { - return $error($boundEx); - } - }, $error); - }); - }; - var findMatches = function findMatches(query, ctx) { - var data = ctx.data, - searchEngine = ctx.searchEngine; - var matches = []; - data.store.forEach(function (value, index) { - var find = function find(key) { - var record = key ? value[key] : value; - var match = typeof searchEngine === "function" ? searchEngine(query, record) : search(query, record, { - mode: searchEngine, - diacritics: ctx.diacritics, - highlight: ctx.resultItem.highlight - }); - if (!match) return; - var result = { - match: match, - value: value - }; - if (key) result.key = key; - matches.push(result); - }; - if (data.keys) { - var _iterator = _createForOfIteratorHelper(data.keys), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var key = _step.value; - find(key); - } - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } + function asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + if (info.done) { + resolve(value); } else { - find(); + Promise.resolve(value).then(_next, _throw); } - }); - if (data.filter) matches = data.filter(matches); - var results = matches.slice(0, ctx.resultsList.maxResults); - ctx.feedback = { - query: query, - matches: matches, - results: results - }; - eventEmitter("results", ctx); + } + function _async_to_generator$2(fn) { + return function() { + var self = this, args = arguments; + return new Promise(function(resolve, reject) { + var gen = fn.apply(self, args); + function _next(value) { + asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, "next", value); + } + function _throw(err) { + asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, "throw", err); + } + _next(undefined); + }); + }; + } + /** + * Get data from source + * + * @param {Object} ctx - autoComplete.js context + */ const getData = (ctx, query)=>_async_to_generator$2(function*() { + const { data } = ctx; + if (data.cache && data.store) return; + ctx.feedback = data.store = typeof data.src === "function" ? yield data.src(query) : data.src; + /** + * @emit {response} event on data request + **/ eventEmitter("response", ctx); + })(); + /** + * Find matches to "query" + * + * @param {String} query - User's search query string + * @param {Object} ctx - autoComplete.js context + */ const findMatches = (query, ctx)=>{ + const { data, searchEngine } = ctx; + let matches = []; + // Find matches from data source + data.store.forEach((value, index)=>{ + const find = (key)=>{ + const record = key ? value[key] : value; + const match = typeof searchEngine === "function" ? searchEngine(query, record) : search(query, record, { + mode: searchEngine, + diacritics: ctx.diacritics, + highlight: ctx.resultItem.highlight + }); + if (!match) return; + let result = { + match, + value + }; + if (key) result.key = key; + matches.push(result); + }; + if (data.keys) { + for (const key of data.keys){ + find(key); + } + } else { + find(); + } + }); + // Find results matching to the query + if (data.filter) matches = data.filter(matches); + const results = matches.slice(0, ctx.resultsList.maxResults); + // Prepare data feedback object + ctx.feedback = { + query, + matches, + results + }; + /** + * @emit {results} event on search response with matches + **/ eventEmitter("results", ctx); }; - var Expand = "aria-expanded"; - var Active = "aria-activedescendant"; - var Selected = "aria-selected"; - var feedback = function feedback(ctx, index) { - ctx.feedback.selection = _objectSpread2({ - index: index - }, ctx.feedback.results[index]); + function _extends$2() { + _extends$2 = Object.assign || function(target) { + for(var i = 1; i < arguments.length; i++){ + var source = arguments[i]; + for(var key in source){ + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + return _extends$2.apply(this, arguments); + } + // String holders + const Expand = "aria-expanded"; + const Active = "aria-activedescendant"; + const Selected = "aria-selected"; + /** + * Data feedback object constructor + * + * @param {Object} ctx - autoComplete.js context + * @param {Number} index - of the selected result item + */ const feedback = (ctx, index)=>{ + ctx.feedback.selection = _extends$2({ + index + }, ctx.feedback.results[index]); }; - var render = function render(ctx) { - var resultsList = ctx.resultsList, - list = ctx.list, - resultItem = ctx.resultItem, - feedback = ctx.feedback; - var matches = feedback.matches, - results = feedback.results; - ctx.cursor = -1; - list.innerHTML = ""; - if (matches.length || resultsList.noResults) { - var fragment = new DocumentFragment(); - results.forEach(function (result, index) { - var element = create(resultItem.tag, _objectSpread2({ - id: "".concat(resultItem.id, "_").concat(index), - role: "option", - innerHTML: result.match, - inside: fragment - }, resultItem["class"] && { - "class": resultItem["class"] - })); - if (resultItem.element) resultItem.element(element, result); - }); - list.append(fragment); - if (resultsList.element) resultsList.element(list, feedback); - open(ctx); - } else { - close(ctx); - } + /** + * Render list of matching results + * + * @param {Object} ctx - autoComplete.js context + */ const render = (ctx)=>{ + const { resultsList, list, resultItem, feedback } = ctx; + const { matches, results } = feedback; + // Reset cursor + ctx.cursor = -1; + // Clear list + list.innerHTML = ""; + if (matches.length || resultsList.noResults) { + const fragment = new DocumentFragment(); + // Generate results elements + results.forEach((result, index)=>{ + // Create new list item + const element = create(resultItem.tag, _extends$2({ + id: `${resultItem.id}_${index}`, + role: "option", + innerHTML: result.match, + inside: fragment + }, resultItem.class && { + class: resultItem.class + })); + // If custom content is active pass params + if (resultItem.element) resultItem.element(element, result); + }); + // Add fragment of result items to DOM list + list.append(fragment); + // Run custom container function if active + if (resultsList.element) resultsList.element(list, feedback); + open(ctx); + } else { + // Check if there are NO results + close(ctx); + } }; - var open = function open(ctx) { - if (ctx.isOpen) return; - (ctx.wrapper || ctx.input).setAttribute(Expand, true); - ctx.list.removeAttribute("hidden"); - ctx.isOpen = true; - eventEmitter("open", ctx); + /** + * Open closed list + * + * @param {Object} ctx - autoComplete.js context + */ const open = (ctx)=>{ + if (ctx.isOpen) return; + // Set expanded attribute on the parent to true + (ctx.wrapper || ctx.input).setAttribute(Expand, true); + // Remove hidden attribute from list + ctx.list.removeAttribute("hidden"); + // Set list to opened + ctx.isOpen = true; + /** + * @emit {open} event after results list is opened + **/ eventEmitter("open", ctx); }; - var close = function close(ctx) { - if (!ctx.isOpen) return; - (ctx.wrapper || ctx.input).setAttribute(Expand, false); - ctx.input.setAttribute(Active, ""); - ctx.list.setAttribute("hidden", ""); - ctx.isOpen = false; - eventEmitter("close", ctx); + /** + * Close opened list + * + * @param {Object} ctx - autoComplete.js context + */ const close = (ctx)=>{ + if (!ctx.isOpen) return; + // Set expanded attribute on the parent to false + (ctx.wrapper || ctx.input).setAttribute(Expand, false); + // Add input active descendant attribute + ctx.input.setAttribute(Active, ""); + // Add hidden attribute from list + ctx.list.setAttribute("hidden", ""); + // Set list to closed + ctx.isOpen = false; + /** + * @emit {close} event after "resultsList" is closed + **/ eventEmitter("close", ctx); }; - var goTo = function goTo(index, ctx) { - var resultItem = ctx.resultItem; - var results = ctx.list.getElementsByTagName(resultItem.tag); - var cls = resultItem.selected ? resultItem.selected.split(" ") : false; - if (ctx.isOpen && results.length) { - var _results$index$classL; - var state = ctx.cursor; - if (index >= results.length) index = 0; - if (index < 0) index = results.length - 1; - ctx.cursor = index; - if (state > -1) { - var _results$state$classL; - results[state].removeAttribute(Selected); - if (cls) (_results$state$classL = results[state].classList).remove.apply(_results$state$classL, _toConsumableArray(cls)); + /** + * Go to result item by index + * + * @param {Number} index - of the selected result item + * @param {Object} ctx - autoComplete.js context + */ const goTo = (index, ctx)=>{ + const { resultItem } = ctx; + // List of result items + const results = ctx.list.getElementsByTagName(resultItem.tag); + // Selected result item Classes + const cls = resultItem.selected ? resultItem.selected.split(" ") : false; + if (ctx.isOpen && results.length) { + // Previous cursor state + const state = ctx.cursor; + // Reset cursor to first item if exceeding end of list + if (index >= results.length) index = 0; + // Move cursor to the last item if exceeding beginning of list + if (index < 0) index = results.length - 1; + // Current cursor position + ctx.cursor = index; + if (state > -1) { + // Remove "aria-selected" attribute from the item + results[state].removeAttribute(Selected); + // Remove "selected" class from the item + if (cls) results[state].classList.remove(...cls); + } + // Set "aria-selected" value to true + results[index].setAttribute(Selected, true); + // Add "selected" class to the selected item + if (cls) results[index].classList.add(...cls); + // Set "aria-activedescendant" value to the selected item + ctx.input.setAttribute(Active, results[ctx.cursor].id); + // Scroll to selection + ctx.list.scrollTop = results[index].offsetTop - ctx.list.clientHeight + results[index].clientHeight + 5; + // Prepare Selection data feedback object + ctx.feedback.cursor = ctx.cursor; + feedback(ctx, index); + /** + * @emit {navigate} event on results list navigation + **/ eventEmitter("navigate", ctx); } - results[index].setAttribute(Selected, true); - if (cls) (_results$index$classL = results[index].classList).add.apply(_results$index$classL, _toConsumableArray(cls)); - ctx.input.setAttribute(Active, results[ctx.cursor].id); - ctx.list.scrollTop = results[index].offsetTop - ctx.list.clientHeight + results[index].clientHeight + 5; - ctx.feedback.cursor = ctx.cursor; - feedback(ctx, index); - eventEmitter("navigate", ctx); - } }; - var next = function next(ctx) { - goTo(ctx.cursor + 1, ctx); + /** + * Go to next result item + * + * @param {Object} ctx - autoComplete.js context + */ const next = (ctx)=>{ + goTo(ctx.cursor + 1, ctx); }; - var previous = function previous(ctx) { - goTo(ctx.cursor - 1, ctx); + /** + * Go to previous result item + * + * @param {Object} ctx - autoComplete.js context + */ const previous = (ctx)=>{ + goTo(ctx.cursor - 1, ctx); }; - var select = function select(ctx, event, index) { - index = index >= 0 ? index : ctx.cursor; - if (index < 0) return; - ctx.feedback.event = event; - feedback(ctx, index); - eventEmitter("selection", ctx); - close(ctx); + /** + * Select result item with given index or current cursor + * + * @param {Object} ctx - autoComplete.js context + * @param {Object} event - of selection + * @param {Number} index - of the selected result item + */ const select = (ctx, event, index)=>{ + // Check if cursor within list range + index = index >= 0 ? index : ctx.cursor; + // Prevent empty selection + if (index < 0) return; + // Prepare Selection data feedback object + ctx.feedback.event = event; + feedback(ctx, index); + /** + * @emit {selection} event on result item selection + **/ eventEmitter("selection", ctx); + close(ctx); }; - var click = function click(event, ctx) { - var itemTag = ctx.resultItem.tag.toUpperCase(); - var items = Array.from(ctx.list.querySelectorAll(itemTag)); - var item = event.target.closest(itemTag); - if (item && item.nodeName === itemTag) { - select(ctx, event, items.indexOf(item)); - } + /** + * Click selection handler + * + * @param {Object} event - "Click" event object + * @param {Object} ctx - autoComplete.js context + */ const click = (event, ctx)=>{ + const itemTag = ctx.resultItem.tag.toUpperCase(); + const items = Array.from(ctx.list.querySelectorAll(itemTag)); + const item = event.target.closest(itemTag); + // Check if clicked item is a "result" item + if (item && item.nodeName === itemTag) { + select(ctx, event, items.indexOf(item)); + } }; - var navigate = function navigate(event, ctx) { - switch (event.keyCode) { - case 40: - case 38: - event.preventDefault(); - event.keyCode === 40 ? next(ctx) : previous(ctx); - break; - case 13: - if (!ctx.submit) event.preventDefault(); - if (ctx.cursor >= 0) select(ctx, event); - break; - case 9: - if (ctx.resultsList.tabSelect && ctx.cursor >= 0) select(ctx, event); - break; - case 27: - ctx.input.value = ""; - eventEmitter('clear', ctx); - close(ctx); - break; - } + /** + * List navigation handler + * + * @param {Object} event - "keydown" press event Object + * @param {Object} ctx - autoComplete.js context + */ const navigate = (event, ctx)=>{ + // Check pressed key + switch(event.keyCode){ + // Down/Up arrow + case 40: + case 38: + event.preventDefault(); + // Move cursor based on pressed key + event.keyCode === 40 ? next(ctx) : previous(ctx); + break; + // Enter + case 13: + if (!ctx.submit) event.preventDefault(); + // If cursor moved + if (ctx.cursor >= 0) select(ctx, event); + break; + // Tab + case 9: + // Select on Tab if enabled + if (ctx.resultsList.tabSelect && ctx.cursor >= 0) select(ctx, event); + break; + // Esc + case 27: + // Clear "input" value + ctx.input.value = ""; + /** + * @emit {clear} event on input clear + **/ eventEmitter('clear', ctx); + close(ctx); + break; + } }; - function start (ctx, q) { - var _this = this; - return new Promise(function ($return, $error) { - var queryVal, condition; - queryVal = q || getQuery(ctx.input); - queryVal = ctx.query ? ctx.query(queryVal) : queryVal; - condition = checkTrigger(queryVal, ctx.trigger, ctx.threshold); - if (condition) { - return getData(ctx, queryVal).then(function ($await_2) { - try { - if (ctx.feedback instanceof Error) return $return(); - findMatches(queryVal, ctx); - if (ctx.resultsList) render(ctx); - return $If_1.call(_this); - } catch ($boundEx) { - return $error($boundEx); - } - }, $error); - } else { - close(ctx); - return $If_1.call(_this); + function asyncGeneratorStep$1(gen, resolve, reject, _next, _throw, key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; } - function $If_1() { - return $return(); + if (info.done) { + resolve(value); + } else { + Promise.resolve(value).then(_next, _throw); } - }); + } + function _async_to_generator$1(fn) { + return function() { + var self = this, args = arguments; + return new Promise(function(resolve, reject) { + var gen = fn.apply(self, args); + function _next(value) { + asyncGeneratorStep$1(gen, resolve, reject, _next, _throw, "next", value); + } + function _throw(err) { + asyncGeneratorStep$1(gen, resolve, reject, _next, _throw, "throw", err); + } + _next(undefined); + }); + }; + } + /** + * Start stage + * + * @param {Object} ctx - autoComplete.js context + * @param {String} q - API search query value + */ function start(ctx, q) { + return _async_to_generator$1(function*() { + // Get "input" query value + let queryVal = q || getQuery(ctx.input); + queryVal = ctx.query ? ctx.query(queryVal) : queryVal; + // Get trigger decision + const condition = checkTrigger(queryVal, ctx.trigger, ctx.threshold); + // Validate trigger condition + if (condition) { + // Get from source + yield getData(ctx, queryVal); + // Check if data fetch failed + if (ctx.feedback instanceof Error) return; + // Find matching results to the query + findMatches(queryVal, ctx); + // Render "resultsList" + if (ctx.resultsList) render(ctx); + } else { + // Close open list + close(ctx); + } + })(); } - var eventsManager = function eventsManager(events, callback) { - for (var element in events) { - for (var event in events[element]) { - callback(element, event); + function _extends$1() { + _extends$1 = Object.assign || function(target) { + for(var i = 1; i < arguments.length; i++){ + var source = arguments[i]; + for(var key in source){ + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + return _extends$1.apply(this, arguments); + } + /** + * Manage all given events + * + * @param {Object} events - List of events + * @param {Function} callback - Callback function + */ const eventsManager = (events, callback)=>{ + for(const element in events){ + for(const event in events[element]){ + callback(element, event); + } } - } }; - var addEvents = function addEvents(ctx) { - var events = ctx.events; - var run = debounce(function () { - return start(ctx); - }, ctx.debounce); - var publicEvents = ctx.events = _objectSpread2({ - input: _objectSpread2({}, events && events.input) - }, ctx.resultsList && { - list: events ? _objectSpread2({}, events.list) : {} - }); - var privateEvents = { - input: { - input: function input() { - run(); - }, - keydown: function keydown(event) { - navigate(event, ctx); - }, - blur: function blur() { - close(ctx); - } - }, - list: { - mousedown: function mousedown(event) { - event.preventDefault(); - }, - click: function click$1(event) { - click(event, ctx); - } - } - }; - eventsManager(privateEvents, function (element, event) { - if (!ctx.resultsList && event !== "input") return; - if (publicEvents[element][event]) return; - publicEvents[element][event] = privateEvents[element][event]; - }); - eventsManager(publicEvents, function (element, event) { - ctx[element].addEventListener(event, publicEvents[element][event]); - }); + /** + * Attach all events listeners + * + * @param {Object} ctx - autoComplete.js context + */ const addEvents = (ctx)=>{ + const { events } = ctx; + const run = debounce(()=>start(ctx), ctx.debounce); + // Public events listeners list + const publicEvents = ctx.events = _extends$1({ + input: _extends$1({}, events && events.input) + }, ctx.resultsList && { + list: events ? _extends$1({}, events.list) : {} + }); + // Private events listeners list + const privateEvents = { + input: { + input () { + run(); + }, + keydown (event) { + navigate(event, ctx); + }, + blur () { + close(ctx); + } + }, + list: { + mousedown (event) { + event.preventDefault(); + }, + click (event) { + click(event, ctx); + } + } + }; + // Populate all private events into public events list + eventsManager(privateEvents, (element, event)=>{ + // Do NOT populate any events except "input" If "resultsList" disabled + if (!ctx.resultsList && event !== "input") return; + // Do NOT overwrite public events + if (publicEvents[element][event]) return; + // Populate public events + publicEvents[element][event] = privateEvents[element][event]; + }); + // Attach all public events + eventsManager(publicEvents, (element, event)=>{ + ctx[element].addEventListener(event, publicEvents[element][event]); + }); }; - var removeEvents = function removeEvents(ctx) { - eventsManager(ctx.events, function (element, event) { - ctx[element].removeEventListener(event, ctx.events[element][event]); - }); + /** + * Remove all attached public events listeners + * + * @param {Object} ctx - autoComplete.js context + */ const removeEvents = (ctx)=>{ + eventsManager(ctx.events, (element, event)=>{ + ctx[element].removeEventListener(event, ctx.events[element][event]); + }); }; - function init (ctx) { - var _this = this; - return new Promise(function ($return, $error) { - var placeHolder, resultsList, parentAttrs; - placeHolder = ctx.placeHolder; - resultsList = ctx.resultsList; - parentAttrs = { - role: "combobox", - "aria-owns": resultsList.id, - "aria-haspopup": true, - "aria-expanded": false - }; - create(ctx.input, _objectSpread2(_objectSpread2({ - "aria-controls": resultsList.id, - "aria-autocomplete": "both" - }, placeHolder && { - placeholder: placeHolder - }), !ctx.wrapper && _objectSpread2({}, parentAttrs))); - if (ctx.wrapper) ctx.wrapper = create("div", _objectSpread2({ - around: ctx.input, - "class": ctx.name + "_wrapper" - }, parentAttrs)); - if (resultsList) ctx.list = create(resultsList.tag, _objectSpread2({ - dest: [resultsList.destination, resultsList.position], - id: resultsList.id, - role: "listbox", - hidden: "hidden" - }, resultsList["class"] && { - "class": resultsList["class"] - })); - addEvents(ctx); - if (ctx.data.cache) { - return getData(ctx).then(function ($await_2) { - try { - return $If_1.call(_this); - } catch ($boundEx) { - return $error($boundEx); - } - }, $error); + function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; } - function $If_1() { - eventEmitter("init", ctx); - return $return(); + if (info.done) { + resolve(value); + } else { + Promise.resolve(value).then(_next, _throw); } - return $If_1.call(_this); - }); + } + function _async_to_generator(fn) { + return function() { + var self = this, args = arguments; + return new Promise(function(resolve, reject) { + var gen = fn.apply(self, args); + function _next(value) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); + } + function _throw(err) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); + } + _next(undefined); + }); + }; + } + function _extends() { + _extends = Object.assign || function(target) { + for(var i = 1; i < arguments.length; i++){ + var source = arguments[i]; + for(var key in source){ + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + return _extends.apply(this, arguments); + } + /** + * Initialization stage + * + * @param {Object} ctx - autoComplete.js context + */ function init(ctx) { + return _async_to_generator(function*() { + const { placeHolder, resultsList } = ctx; + const parentAttrs = { + role: "combobox", + "aria-owns": resultsList.id, + "aria-haspopup": true, + "aria-expanded": false + }; + // Set "input" attributes + create(ctx.input, _extends({ + "aria-controls": resultsList.id, + "aria-autocomplete": "both" + }, placeHolder && { + placeholder: placeHolder + }, !ctx.wrapper && _extends({}, parentAttrs))); + // Create wrapper element + if (ctx.wrapper) ctx.wrapper = create("div", _extends({ + around: ctx.input, + class: ctx.name + "_wrapper" + }, parentAttrs)); + if (resultsList) // Create new list element + ctx.list = create(resultsList.tag, _extends({ + dest: [ + resultsList.destination, + resultsList.position + ], + id: resultsList.id, + role: "listbox", + hidden: "hidden" + }, resultsList.class && { + class: resultsList.class + })); + // Attach Events listeners + addEvents(ctx); + // Get the data from store + if (ctx.data.cache) yield getData(ctx); + /** + * @emit {init} event on Initialization + **/ eventEmitter("init", ctx); + })(); } - function extend (autoComplete) { - var prototype = autoComplete.prototype; - prototype.init = function () { - init(this); - }; - prototype.start = function (query) { - start(this, query); - }; - prototype.unInit = function () { - if (this.wrapper) { - var parentNode = this.wrapper.parentNode; - parentNode.insertBefore(this.input, this.wrapper); - parentNode.removeChild(this.wrapper); - } - removeEvents(this); - }; - prototype.open = function () { - open(this); - }; - prototype.close = function () { - close(this); - }; - prototype.goTo = function (index) { - goTo(index, this); - }; - prototype.next = function () { - next(this); - }; - prototype.previous = function () { - previous(this); - }; - prototype.select = function (index) { - select(this, null, index); - }; - prototype.search = function (query, record, options) { - return search(query, record, options); - }; + /** + * autoComplete.js API extension + * + * @param {Object} autoComplete - autoComplete.js object instance + */ function extend(autoComplete) { + const { prototype } = autoComplete; + // Initialize autoComplete.js engine + prototype.init = function() { + init(this); + }; + /** + * Start autoComplete.js engine + * + * @param {String} query - Search query value + * + */ prototype.start = function(query) { + start(this, query); + }; + // Un-Initialize autoComplete.js engine + prototype.unInit = function() { + if (this.wrapper) { + const parentNode = this.wrapper.parentNode; + parentNode.insertBefore(this.input, this.wrapper); + parentNode.removeChild(this.wrapper); + } + removeEvents(this); + }; + // Open closed list + prototype.open = function() { + open(this); + }; + // Close opened list + prototype.close = function() { + close(this); + }; + /** + * Go to result item by index + * + * @param {Number} index - of the selected result item + * + */ prototype.goTo = function(index) { + goTo(index, this); + }; + // Go to next result item + prototype.next = function() { + next(this); + }; + // Go to previous result item + prototype.previous = function() { + previous(this); + }; + /** + * Select result item with given index or current cursor + * + * @param {Number} index - of the selected result item + * + */ prototype.select = function(index) { + select(this, null, index); + }; + /** + * autoComplete.js Search Engine + * Find matching characters in record + * + * @param {String} query - Search query value + * @param {String} record - Data record string + * @param {Object} options - Search Engine configuration options + * + * @returns {String} - Matching data record + */ prototype.search = function(query, record, options) { + return search(query, record, options); + }; } - function autoComplete(config) { - this.options = config; - this.id = autoComplete.instances = (autoComplete.instances || 0) + 1; - this.name = "autoComplete"; - this.wrapper = 1; - this.threshold = 1; - this.debounce = 0; - this.resultsList = { - position: "afterend", - tag: "ul", - maxResults: 5 - }; - this.resultItem = { - tag: "li" - }; - configure(this); - extend.call(this, autoComplete); - init(this); + /** + * @class autoComplete + * @classdesc Creates a new instance of autoComplete.js with the given configuration. + * + * @see {@link https://tarekraafat.github.io/autoComplete.js/#/configuration} for more information on configuration options. + * @example const autoCompleteJS = new autoComplete({config}); + * + * @param {Object} config - Configuration options. + * @param {Number|String} [config.id] - Auto assigned instance unique identifier. + * @param {String} [config.name=autoComplete] - Prepended to all created DOM element class names. + * @param {(String|Function)} [config.selector=#autoComplete] - Must point to or return the relevant input field or element that autoComplete.js should act upon. + * @param {Object} config.data - Data source. + * @param {(String[]|Object[]|Function)} config.data.src - Values to search or an async or immediate function that returns an array of values to search. + * @param {String[]} [config.data.keys] - Only used if config.data.src is an array of objects. Specifies which keys in the objects autoComplete.js should search. + * @param {Boolean} [config.data.cache=false] - If true, autoComplete.js fetches all config.data.src when initialized and never again. + * @param {Function} [config.data.filter] - Used to filter and sort matching returns from config.data.src before showing them to the user. Signature: (Array), is given all the results from config.data.src that matches the query. + * @param {Function} [config.trigger] - Return true if you want autoComplete.js to start. Signature: (event, query). Default trigger function returns true if input field is *NOT* empty *and* greater than or equal to config.threshold. + * @param {Function} [config.query] - For manipulating the input value before running the search, for example if you want to remove spaces or anything else. Signature: (string), must return string, is given the raw input value. + * @param {String} [config.placeHolder] - Placeholder to set on the input element. For example "Search...". + * @param {Number} [config.threshold=1] - Minimum number of characters required in the input before triggering autocompletion. + * @param {Number} [config.debounce=0] - Delay in milliseconds after input for autocompletion to start. + * @param {Boolean} [config.wrapper=true] - Wraps the input element in a div for a11y purposes, adding some ARIA attributes. + * @param {(String|Function)} [config.searchEngine=strict] - "strict" checks if the given query is contained within the data, "loose" returns every result where every character in the query is present in the data in any order and location. Signature: (query: string, record: any), given the manipulated query input and each data.src array entry or for each entry[config.data.keys]. + * @param {Boolean} [config.diacritics=false] - Enable to normalize query and data values using String.normalize and by removing u0300 through u036f. See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize}. + * @param {(Object|Boolean)} [config.resultsList] - false to disable result list rendering. + * @param {String} [config.resultsList.tag=ul] - HTML tag to use for rendering the result container. + * @param {String} [config.resultsList.id=autoComplete_list_index] - ID given to the result container. + * @param {String} [config.resultsList.class] - Class names to give to the result container. + * @param {(String|Function)} [config.resultsList.destination=#autoComplete] - Selector that points to where you want to insert the result elements. Defaults to config.selector. Signature: (). + * @param {String} [config.resultsList.position=afterend] - Position relative to config.selector where to insert the results list. See {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/insertAdjacentElement#parameters}. + * @param {Function} [config.resultsList.element] - Invoked before showing the results list. Allows manipulation of the DOM before it is added to the document. Signature: (list: HTMLElement, data: { query, matches, results }), where list is the container element. + * @param {Number} [config.resultsList.maxResults=5] - Maximum number of results to render. + * @param {Boolean} [config.resultsList.tabSelect=false] - Makes the Tab key select the entry navigated to using the keyboard, just like Enter. + * @param {Boolean} [config.resultsList.noResults=false] - If enabled the results list will render when there are zero matches. For example if you want to show a custom message or help to the user in config.resultsList.element. + * @param {Object} [config.resultItem] - Customize each rendered autocompletion result. + * @param {String} [config.resultItem.tag=li] - HTML tag to use for rendering each result. + * @param {String} [config.resultItem.id=autoComplete_result_index] - Prefix to use for the ID of each result element. _ and a number from 0 to maxResults is appended, so the final ID is for example "autoComplete_result_0" to "autoComplete_result_10". + * @param {String} [config.resultItem.class] - Class names to give to each result element. + * @param {Function} [config.resultItem.element] - Invoked before showing the results list. Allows manipulation of the DOM before it is added to the document. Signature: (item: HTMLElement, data: { match, value, [key] }). + * @param {(Boolean|String)} [config.resultItem.highlight=false] - Enable to highlight matching characters using HTMLMarkElement, or a string of CSS classes to add to any generated mark elements. + * @param {String} [config.resultItem.selected] - CSS classes to add and remove from result items the user navigates to using the keyboard. + * @param {Boolean} [config.submit=false] - If enabled pressing enter will not prevent default behavior. + * @param {Object} [config.events] - Allows adding custom or overriding internal event handling. + * @param {Object} [config.events.input] - Maps event names to event handlers for the input element. Each key must be a valid event name, see {@link https://developer.mozilla.org/en-US/docs/Web/Events}, and each value must be an event handler function. Default handlers are keydown and blur. + * @param {Object} [config.events.list] - Same as config.events.input, but for the result list container element. Default handlers are mousedown and click. + */ function autoComplete(config) { + // User's Configuration options + this.options = config; + // Default Configuration options + this.id = autoComplete.instances = (autoComplete.instances || 0) + 1; + this.name = "autoComplete"; + this.wrapper = 1; + this.threshold = 1; + this.debounce = 0; + this.resultsList = { + position: "afterend", + tag: "ul", + maxResults: 5 + }; + this.resultItem = { + tag: "li" + }; + // Set all Configuration options + configure(this); + // Stage API methods + extend.call(this, autoComplete); + // Initialize autoComplete.js + init(this); } return autoComplete; diff --git a/docs/demo/js/autoComplete.js.gz b/docs/demo/js/autoComplete.js.gz index 77f6565..bbf0e99 100644 Binary files a/docs/demo/js/autoComplete.js.gz and b/docs/demo/js/autoComplete.js.gz differ diff --git a/docs/demo/js/autoComplete.min.js b/docs/demo/js/autoComplete.min.js index a5091a1..2ca7a1d 100644 --- a/docs/demo/js/autoComplete.min.js +++ b/docs/demo/js/autoComplete.min.js @@ -1 +1,31 @@ -var t,e;t=this,e=function(){"use strict";function t(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,u=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return u=t.done,t},e:function(t){a=!0,o=t},f:function(){try{u||null==n.return||n.return()}finally{if(a)throw o}}}}(n.keys);try{for(l.s();!(c=l.n()).done;)a(c.value)}catch(t){l.e(t)}finally{l.f()}}else a()})),n.filter&&(i=n.filter(i));var o=i.slice(0,e.resultsList.maxResults);e.feedback={query:t,matches:i,results:o},f("results",e)},m="aria-expanded",v="aria-activedescendant",y="aria-selected",b=function(t,e){t.feedback.selection=r({index:e},t.feedback.results[e])},g=function(t){t.isOpen||((t.wrapper||t.input).setAttribute(m,!0),t.list.removeAttribute("hidden"),t.isOpen=!0,f("open",t))},w=function(t){t.isOpen&&((t.wrapper||t.input).setAttribute(m,!1),t.input.setAttribute(v,""),t.list.setAttribute("hidden",""),t.isOpen=!1,f("close",t))},O=function(t,e){var n=e.resultItem,r=e.list.getElementsByTagName(n.tag),o=!!n.selected&&n.selected.split(" ");if(e.isOpen&&r.length){var s,u,a=e.cursor;t>=r.length&&(t=0),t<0&&(t=r.length-1),e.cursor=t,a>-1&&(r[a].removeAttribute(y),o&&(u=r[a].classList).remove.apply(u,i(o))),r[t].setAttribute(y,!0),o&&(s=r[t].classList).add.apply(s,i(o)),e.input.setAttribute(v,r[e.cursor].id),e.list.scrollTop=r[t].offsetTop-e.list.clientHeight+r[t].clientHeight+5,e.feedback.cursor=e.cursor,b(e,t),f("navigate",e)}},A=function(t){O(t.cursor+1,t)},S=function(t){O(t.cursor-1,t)},j=function(t,e,n){(n=n>=0?n:t.cursor)<0||(t.feedback.event=e,b(t,n),f("selection",t),w(t))};function k(t,e){var n=this;return new Promise((function(i,o){var s,u;return s=e||((u=t.input)instanceof HTMLInputElement||u instanceof HTMLTextAreaElement?u.value:u.innerHTML),function(t,e,n){return e?e(t):t.length>=n}(s=t.query?t.query(s):s,t.trigger,t.threshold)?d(t,s).then((function(e){try{return t.feedback instanceof Error?i():(h(s,t),t.resultsList&&function(t){var e=t.resultsList,n=t.list,i=t.resultItem,o=t.feedback,s=o.matches,u=o.results;if(t.cursor=-1,n.innerHTML="",s.length||e.noResults){var c=new DocumentFragment;u.forEach((function(t,e){var n=a(i.tag,r({id:"".concat(i.id,"_").concat(e),role:"option",innerHTML:t.match,inside:c},i.class&&{class:i.class}));i.element&&i.element(n,t)})),n.append(c),e.element&&e.element(n,o),g(t)}else w(t)}(t),c.call(n))}catch(t){return o(t)}}),o):(w(t),c.call(n));function c(){return i()}}))}var L=function(t,e){for(var n in t)for(var r in t[n])e(n,r)},T=function(t){var e,n,i,o=t.events,s=(e=function(){return k(t)},n=t.debounce,function(){clearTimeout(i),i=setTimeout((function(){return e()}),n)}),u=t.events=r({input:r({},o&&o.input)},t.resultsList&&{list:o?r({},o.list):{}}),a={input:{input:function(){s()},keydown:function(e){!function(t,e){switch(t.keyCode){case 40:case 38:t.preventDefault(),40===t.keyCode?A(e):S(e);break;case 13:e.submit||t.preventDefault(),e.cursor>=0&&j(e,t);break;case 9:e.resultsList.tabSelect&&e.cursor>=0&&j(e,t);break;case 27:e.input.value="",f("clear",e),w(e)}}(e,t)},blur:function(){w(t)}},list:{mousedown:function(t){t.preventDefault()},click:function(e){!function(t,e){var n=e.resultItem.tag.toUpperCase(),r=Array.from(e.list.querySelectorAll(n)),i=t.target.closest(n);i&&i.nodeName===n&&j(e,t,r.indexOf(i))}(e,t)}}};L(a,(function(e,n){(t.resultsList||"input"===n)&&(u[e][n]||(u[e][n]=a[e][n]))})),L(u,(function(e,n){t[e].addEventListener(n,u[e][n])}))};function E(t){var e=this;return new Promise((function(n,i){var o,s,u;if(o=t.placeHolder,u={role:"combobox","aria-owns":(s=t.resultsList).id,"aria-haspopup":!0,"aria-expanded":!1},a(t.input,r(r({"aria-controls":s.id,"aria-autocomplete":"both"},o&&{placeholder:o}),!t.wrapper&&r({},u))),t.wrapper&&(t.wrapper=a("div",r({around:t.input,class:t.name+"_wrapper"},u))),s&&(t.list=a(s.tag,r({dest:[s.destination,s.position],id:s.id,role:"listbox",hidden:"hidden"},s.class&&{class:s.class}))),T(t),t.data.cache)return d(t).then((function(t){try{return c.call(e)}catch(t){return i(t)}}),i);function c(){return f("init",t),n()}return c.call(e)}))}function P(t){var e=t.prototype;e.init=function(){E(this)},e.start=function(t){k(this,t)},e.unInit=function(){if(this.wrapper){var t=this.wrapper.parentNode;t.insertBefore(this.input,this.wrapper),t.removeChild(this.wrapper)}var e;L((e=this).events,(function(t,n){e[t].removeEventListener(n,e.events[t][n])}))},e.open=function(){g(this)},e.close=function(){w(this)},e.goTo=function(t){O(t,this)},e.next=function(){A(this)},e.previous=function(){S(this)},e.select=function(t){j(this,null,t)},e.search=function(t,e,n){return p(t,e,n)}}return function t(e){this.options=e,this.id=t.instances=(t.instances||0)+1,this.name="autoComplete",this.wrapper=1,this.threshold=1,this.debounce=0,this.resultsList={position:"afterend",tag:"ul",maxResults:5},this.resultItem={tag:"li"},function(t){var e=t.name,n=t.options,r=t.resultsList,i=t.resultItem;for(var s in n)if("object"===o(n[s]))for(var a in t[s]||(t[s]={}),n[s])t[s][a]=n[s][a];else t[s]=n[s];t.selector=t.selector||"#"+e,r.destination=r.destination||t.selector,r.id=r.id||e+"_list_"+t.id,i.id=i.id||e+"_result",t.input=u(t.selector)}(this),P.call(this,t),E(this)}},"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).autoComplete=e(); +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.autoComplete = factory()); +})(this, (function () { 'use strict'; + + function _extends$3(){_extends$3=Object.assign||function(target){for(var i=1;itypeof element==="string"?document.querySelector(element):element();const create=(tag,options)=>{const el=typeof tag==="string"?document.createElement(tag):tag;for(const key in options){const val=options[key];if(key==="inside"){val.append(el);}else if(key==="dest"){select$1(val[0]).insertAdjacentElement(val[1],el);}else if(key==="around"){const ref=val;ref.parentNode.insertBefore(el,ref);el.append(ref);if(ref.getAttribute("autofocus")!=null)ref.focus();}else if(key in el){el[key]=val;}else {el.setAttribute(key,val);}}return el};const getQuery=field=>field instanceof HTMLInputElement||field instanceof HTMLTextAreaElement?field.value:field.innerHTML;const format=(value,diacritics)=>{value=String(value).toLowerCase();return diacritics?value.normalize("NFD").replace(/[\u0300-\u036f]/g,"").normalize("NFC"):value};const debounce=(callback,duration)=>{let timer;return ()=>{clearTimeout(timer);timer=setTimeout(()=>callback(),duration);}};const checkTrigger=(query,condition,threshold)=>condition?condition(query):query.length>=threshold;const mark=(value,cls)=>create("mark",_extends$3({innerHTML:value},typeof cls==="string"&&{class:cls})).outerHTML; + + var configure = (ctx=>{const{name,options,resultsList,resultItem}=ctx;for(const option in options){if(typeof options[option]==="object"){if(!ctx[option])ctx[option]={};for(const subOption in options[option]){ctx[option][subOption]=options[option][subOption];}}else {ctx[option]=options[option];}}ctx.selector=ctx.selector||"#"+name;resultsList.destination=resultsList.destination||ctx.selector;resultsList.id=resultsList.id||name+"_list_"+ctx.id;resultItem.id=resultItem.id||name+"_result";ctx.input=select$1(ctx.selector);}); + + var eventEmitter = ((name,ctx)=>{ctx.input.dispatchEvent(new CustomEvent(name,{bubbles:true,detail:ctx.feedback,cancelable:true}));}); + + var search = ((query,record,options)=>{const{mode,diacritics,highlight}=options||{};const nRecord=format(record,diacritics);record=String(record);query=format(query,diacritics);if(mode==="loose"){query=query.replace(/ /g,"");const qLength=query.length;let cursor=0;const match=Array.from(record).map((character,index)=>{if(cursor_async_to_generator$2(function*(){const{data}=ctx;if(data.cache&&data.store)return;ctx.feedback=data.store=typeof data.src==="function"?yield data.src(query):data.src;eventEmitter("response",ctx);})();const findMatches=(query,ctx)=>{const{data,searchEngine}=ctx;let matches=[];data.store.forEach((value,index)=>{const find=key=>{const record=key?value[key]:value;const match=typeof searchEngine==="function"?searchEngine(query,record):search(query,record,{mode:searchEngine,diacritics:ctx.diacritics,highlight:ctx.resultItem.highlight});if(!match)return;let result={match,value};if(key)result.key=key;matches.push(result);};if(data.keys){for(const key of data.keys){find(key);}}else {find();}});if(data.filter)matches=data.filter(matches);const results=matches.slice(0,ctx.resultsList.maxResults);ctx.feedback={query,matches,results};eventEmitter("results",ctx);}; + + function _extends$2(){_extends$2=Object.assign||function(target){for(var i=1;i{ctx.feedback.selection=_extends$2({index},ctx.feedback.results[index]);};const render=ctx=>{const{resultsList,list,resultItem,feedback}=ctx;const{matches,results}=feedback;ctx.cursor=-1;list.innerHTML="";if(matches.length||resultsList.noResults){const fragment=new DocumentFragment;results.forEach((result,index)=>{const element=create(resultItem.tag,_extends$2({id:`${resultItem.id}_${index}`,role:"option",innerHTML:result.match,inside:fragment},resultItem.class&&{class:resultItem.class}));if(resultItem.element)resultItem.element(element,result);});list.append(fragment);if(resultsList.element)resultsList.element(list,feedback);open(ctx);}else {close(ctx);}};const open=ctx=>{if(ctx.isOpen)return;(ctx.wrapper||ctx.input).setAttribute(Expand,true);ctx.list.removeAttribute("hidden");ctx.isOpen=true;eventEmitter("open",ctx);};const close=ctx=>{if(!ctx.isOpen)return;(ctx.wrapper||ctx.input).setAttribute(Expand,false);ctx.input.setAttribute(Active,"");ctx.list.setAttribute("hidden","");ctx.isOpen=false;eventEmitter("close",ctx);};const goTo=(index,ctx)=>{const{resultItem}=ctx;const results=ctx.list.getElementsByTagName(resultItem.tag);const cls=resultItem.selected?resultItem.selected.split(" "):false;if(ctx.isOpen&&results.length){const state=ctx.cursor;if(index>=results.length)index=0;if(index<0)index=results.length-1;ctx.cursor=index;if(state>-1){results[state].removeAttribute(Selected);if(cls)results[state].classList.remove(...cls);}results[index].setAttribute(Selected,true);if(cls)results[index].classList.add(...cls);ctx.input.setAttribute(Active,results[ctx.cursor].id);ctx.list.scrollTop=results[index].offsetTop-ctx.list.clientHeight+results[index].clientHeight+5;ctx.feedback.cursor=ctx.cursor;feedback(ctx,index);eventEmitter("navigate",ctx);}};const next=ctx=>{goTo(ctx.cursor+1,ctx);};const previous=ctx=>{goTo(ctx.cursor-1,ctx);};const select=(ctx,event,index)=>{index=index>=0?index:ctx.cursor;if(index<0)return;ctx.feedback.event=event;feedback(ctx,index);eventEmitter("selection",ctx);close(ctx);};const click=(event,ctx)=>{const itemTag=ctx.resultItem.tag.toUpperCase();const items=Array.from(ctx.list.querySelectorAll(itemTag));const item=event.target.closest(itemTag);if(item&&item.nodeName===itemTag){select(ctx,event,items.indexOf(item));}};const navigate=(event,ctx)=>{switch(event.keyCode){case 40:case 38:event.preventDefault();event.keyCode===40?next(ctx):previous(ctx);break;case 13:if(!ctx.submit)event.preventDefault();if(ctx.cursor>=0)select(ctx,event);break;case 9:if(ctx.resultsList.tabSelect&&ctx.cursor>=0)select(ctx,event);break;case 27:ctx.input.value="";eventEmitter("clear",ctx);close(ctx);break}}; + + function asyncGeneratorStep$1(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return}if(info.done){resolve(value);}else {Promise.resolve(value).then(_next,_throw);}}function _async_to_generator$1(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep$1(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep$1(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);})}}function start(ctx,q){return _async_to_generator$1(function*(){let queryVal=q||getQuery(ctx.input);queryVal=ctx.query?ctx.query(queryVal):queryVal;const condition=checkTrigger(queryVal,ctx.trigger,ctx.threshold);if(condition){yield getData(ctx,queryVal);if(ctx.feedback instanceof Error)return;findMatches(queryVal,ctx);if(ctx.resultsList)render(ctx);}else {close(ctx);}})()} + + function _extends$1(){_extends$1=Object.assign||function(target){for(var i=1;i{for(const element in events){for(const event in events[element]){callback(element,event);}}};const addEvents=ctx=>{const{events}=ctx;const run=debounce(()=>start(ctx),ctx.debounce);const publicEvents=ctx.events=_extends$1({input:_extends$1({},events&&events.input)},ctx.resultsList&&{list:events?_extends$1({},events.list):{}});const privateEvents={input:{input(){run();},keydown(event){navigate(event,ctx);},blur(){close(ctx);}},list:{mousedown(event){event.preventDefault();},click(event){click(event,ctx);}}};eventsManager(privateEvents,(element,event)=>{if(!ctx.resultsList&&event!=="input")return;if(publicEvents[element][event])return;publicEvents[element][event]=privateEvents[element][event];});eventsManager(publicEvents,(element,event)=>{ctx[element].addEventListener(event,publicEvents[element][event]);});};const removeEvents=ctx=>{eventsManager(ctx.events,(element,event)=>{ctx[element].removeEventListener(event,ctx.events[element][event]);});}; + + function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return}if(info.done){resolve(value);}else {Promise.resolve(value).then(_next,_throw);}}function _async_to_generator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);})}}function _extends(){_extends=Object.assign||function(target){for(var i=1;i=6.0.0" - } - }, - "node_modules/@babel/code-frame": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.25.7.tgz", - "integrity": "sha512-0xZJFNE5XMpENsgfHYTw8FbX4kv53mFLn2i3XPoq69LyhYSCBJtitaHx9QnsVTrsogI4Z3+HtEfZ2/GFPOtf5g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/highlight": "^7.25.7", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/compat-data": { - "version": "7.25.8", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.25.8.tgz", - "integrity": "sha512-ZsysZyXY4Tlx+Q53XdnOFmqwfB9QDTHYxaZYajWRoBLuLEAwI2UIbtxOjWh/cFaa9IKUlcB+DDuoskLuKu56JA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/core": { - "version": "7.25.8", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.25.8.tgz", - "integrity": "sha512-Oixnb+DzmRT30qu9d3tJSQkxuygWm32DFykT4bRoORPa9hZ/L4KhVB/XiRm6KG+roIEM7DBQlmg27kw2HZkdZg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.25.7", - "@babel/generator": "^7.25.7", - "@babel/helper-compilation-targets": "^7.25.7", - "@babel/helper-module-transforms": "^7.25.7", - "@babel/helpers": "^7.25.7", - "@babel/parser": "^7.25.8", - "@babel/template": "^7.25.7", - "@babel/traverse": "^7.25.7", - "@babel/types": "^7.25.8", - "convert-source-map": "^2.0.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.3", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/@babel/generator": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.25.7.tgz", - "integrity": "sha512-5Dqpl5fyV9pIAD62yK9P7fcA768uVPUyrQmqpqstHWgMma4feF1x/oFysBCVZLY5wJ2GkMUCdsNDnGZrPoR6rA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.25.7", - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25", - "jsesc": "^3.0.2" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-annotate-as-pure": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.25.7.tgz", - "integrity": "sha512-4xwU8StnqnlIhhioZf1tqnVWeQ9pvH/ujS8hRfw/WOza+/a+1qv69BWNy+oY231maTCWgKWhfBU7kDpsds6zAA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.25.7.tgz", - "integrity": "sha512-12xfNeKNH7jubQNm7PAkzlLwEmCs1tfuX3UjIw6vP6QXi+leKh6+LyC/+Ed4EIQermwd58wsyh070yjDHFlNGg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/traverse": "^7.25.7", - "@babel/types": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.7.tgz", - "integrity": "sha512-DniTEax0sv6isaw6qSQSfV4gVRNtw2rte8HHM45t9ZR0xILaufBRNkpMifCRiAPyvL4ACD6v0gfCwCmtOQaV4A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/compat-data": "^7.25.7", - "@babel/helper-validator-option": "^7.25.7", - "browserslist": "^4.24.0", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.25.7.tgz", - "integrity": "sha512-bD4WQhbkx80mAyj/WCm4ZHcF4rDxkoLFO6ph8/5/mQ3z4vAzltQXAmbc7GvVJx5H+lk5Mi5EmbTeox5nMGCsbw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.25.7", - "@babel/helper-member-expression-to-functions": "^7.25.7", - "@babel/helper-optimise-call-expression": "^7.25.7", - "@babel/helper-replace-supers": "^7.25.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.25.7", - "@babel/traverse": "^7.25.7", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-create-regexp-features-plugin": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.25.7.tgz", - "integrity": "sha512-byHhumTj/X47wJ6C6eLpK7wW/WBEcnUeb7D0FNc/jFQnQVw7DOso3Zz5u9x/zLrFVkHa89ZGDbkAa1D54NdrCQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.25.7", - "regexpu-core": "^6.1.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-define-polyfill-provider": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.2.tgz", - "integrity": "sha512-LV76g+C502biUK6AyZ3LK10vDpDyCzZnhZFXkH1L75zHPj68+qc8Zfpx2th+gzwA2MzyK+1g/3EPl62yFnVttQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-compilation-targets": "^7.22.6", - "@babel/helper-plugin-utils": "^7.22.5", - "debug": "^4.1.1", - "lodash.debounce": "^4.0.8", - "resolve": "^1.14.2" - }, - "peerDependencies": { - "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" - } - }, - "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.25.7.tgz", - "integrity": "sha512-O31Ssjd5K6lPbTX9AAYpSKrZmLeagt9uwschJd+Ixo6QiRyfpvgtVQp8qrDR9UNFjZ8+DO34ZkdrN+BnPXemeA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/traverse": "^7.25.7", - "@babel/types": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-imports": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.7.tgz", - "integrity": "sha512-o0xCgpNmRohmnoWKQ0Ij8IdddjyBFE4T2kagL/x6M3+4zUgc+4qTOUBoNe4XxDskt1HPKO007ZPiMgLDq2s7Kw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/traverse": "^7.25.7", - "@babel/types": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.25.7.tgz", - "integrity": "sha512-k/6f8dKG3yDz/qCwSM+RKovjMix563SLxQFo0UhRNo239SP6n9u5/eLtKD6EAjwta2JHJ49CsD8pms2HdNiMMQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-module-imports": "^7.25.7", - "@babel/helper-simple-access": "^7.25.7", - "@babel/helper-validator-identifier": "^7.25.7", - "@babel/traverse": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-optimise-call-expression": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.25.7.tgz", - "integrity": "sha512-VAwcwuYhv/AT+Vfr28c9y6SHzTan1ryqrydSTFGjU0uDJHw3uZ+PduI8plCLkRsDnqK2DMEDmwrOQRsK/Ykjng==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-plugin-utils": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.25.7.tgz", - "integrity": "sha512-eaPZai0PiqCi09pPs3pAFfl/zYgGaE6IdXtYvmf0qlcDTd3WCtO7JWCcRd64e0EQrcYgiHibEZnOGsSY4QSgaw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-remap-async-to-generator": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.25.7.tgz", - "integrity": "sha512-kRGE89hLnPfcz6fTrlNU+uhgcwv0mBE4Gv3P9Ke9kLVJYpi4AMVVEElXvB5CabrPZW4nCM8P8UyyjrzCM0O2sw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.25.7", - "@babel/helper-wrap-function": "^7.25.7", - "@babel/traverse": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-replace-supers": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.25.7.tgz", - "integrity": "sha512-iy8JhqlUW9PtZkd4pHM96v6BdJ66Ba9yWSE4z0W4TvSZwLBPkyDsiIU3ENe4SmrzRBs76F7rQXTy1lYC49n6Lw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-member-expression-to-functions": "^7.25.7", - "@babel/helper-optimise-call-expression": "^7.25.7", - "@babel/traverse": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-simple-access": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.25.7.tgz", - "integrity": "sha512-FPGAkJmyoChQeM+ruBGIDyrT2tKfZJO8NcxdC+CWNJi7N8/rZpSxK7yvBJ5O/nF1gfu5KzN7VKG3YVSLFfRSxQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/traverse": "^7.25.7", - "@babel/types": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.25.7.tgz", - "integrity": "sha512-pPbNbchZBkPMD50K0p3JGcFMNLVUCuU/ABybm/PGNj4JiHrpmNyqqCphBk4i19xXtNV0JhldQJJtbSW5aUvbyA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/traverse": "^7.25.7", - "@babel/types": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-string-parser": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.7.tgz", - "integrity": "sha512-CbkjYdsJNHFk8uqpEkpCvRs3YRp9tY6FmFY7wLMSYuGYkrdUi7r2lc4/wqsvlHoMznX3WJ9IP8giGPq68T/Y6g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.7.tgz", - "integrity": "sha512-AM6TzwYqGChO45oiuPqwL2t20/HdMC1rTPAesnBCgPCSF1x3oN9MVUwQV2iyz4xqWrctwK5RNC8LV22kaQCNYg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-option": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.7.tgz", - "integrity": "sha512-ytbPLsm+GjArDYXJ8Ydr1c/KJuutjF2besPNbIZnZ6MKUxi/uTA22t2ymmA4WFjZFpjiAMO0xuuJPqK2nvDVfQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-wrap-function": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.25.7.tgz", - "integrity": "sha512-MA0roW3JF2bD1ptAaJnvcabsVlNQShUaThyJbCDD4bCp8NEgiFvpoqRI2YS22hHlc2thjO/fTg2ShLMC3jygAg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.25.7", - "@babel/traverse": "^7.25.7", - "@babel/types": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.25.7.tgz", - "integrity": "sha512-Sv6pASx7Esm38KQpF/U/OXLwPPrdGHNKoeblRxgZRLXnAtnkEe4ptJPDtAZM7fBLadbc1Q07kQpSiGQ0Jg6tRA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.25.7", - "@babel/types": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.25.7.tgz", - "integrity": "sha512-iYyACpW3iW8Fw+ZybQK+drQre+ns/tKpXbNESfrhNnPLIklLbXr7MYJ6gPEd0iETGLOK+SxMjVvKb/ffmk+FEw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.25.7", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/parser": { - "version": "7.25.8", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.8.tgz", - "integrity": "sha512-HcttkxzdPucv3nNFmfOOMfFf64KgdJVqm1KaCm25dPGMLElo9nsLvXeJECQg8UzPuBGLyTSA0ZzqCtDSzKTEoQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.25.8" - }, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/plugin-bugfix-firefox-class-in-computed-class-key": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.25.7.tgz", - "integrity": "sha512-UV9Lg53zyebzD1DwQoT9mzkEKa922LNUp5YkTJ6Uta0RbyXaQNUgcvSt7qIu1PpPzVb6rd10OVNTzkyBGeVmxQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/traverse": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/plugin-bugfix-safari-class-field-initializer-scope": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-class-field-initializer-scope/-/plugin-bugfix-safari-class-field-initializer-scope-7.25.7.tgz", - "integrity": "sha512-GDDWeVLNxRIkQTnJn2pDOM1pkCgYdSqPeT1a9vh9yIqu2uzzgw1zcqEb+IJOhy+dTBMlNdThrDIksr2o09qrrQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.25.7.tgz", - "integrity": "sha512-wxyWg2RYaSUYgmd9MR0FyRGyeOMQE/Uzr1wzd/g5cf5bwi9A4v6HFdDm7y1MgDtod/fLOSTZY6jDgV0xU9d5bA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.25.7.tgz", - "integrity": "sha512-Xwg6tZpLxc4iQjorYsyGMyfJE7nP5MV8t/Ka58BgiA7Jw0fRqQNcANlLfdJ/yvBt9z9LD2We+BEkT7vLqZRWng==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.25.7", - "@babel/plugin-transform-optional-chaining": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.13.0" - } - }, - "node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.25.7.tgz", - "integrity": "sha512-UVATLMidXrnH+GMUIuxq55nejlj02HP7F5ETyBONzP6G87fPBogG4CH6kxrSrdIuAjdwNO9VzyaYsrZPscWUrw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/traverse": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/plugin-proposal-private-property-in-object": { - "version": "7.21.0-placeholder-for-preset-env.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz", - "integrity": "sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-import-assertions": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.25.7.tgz", - "integrity": "sha512-ZvZQRmME0zfJnDQnVBKYzHxXT7lYBB3Revz1GuS7oLXWMgqUPX4G+DDbT30ICClht9WKV34QVrZhSw6WdklwZQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-import-attributes": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.25.7.tgz", - "integrity": "sha512-AqVo+dguCgmpi/3mYBdu9lkngOBlQ2w2vnNpa6gfiCxQZLzV4ZbhsXitJ2Yblkoe1VQwtHSaNmIaGll/26YWRw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-unicode-sets-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-unicode-sets-regex/-/plugin-syntax-unicode-sets-regex-7.18.6.tgz", - "integrity": "sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/plugin-transform-arrow-functions": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.25.7.tgz", - "integrity": "sha512-EJN2mKxDwfOUCPxMO6MUI58RN3ganiRAG/MS/S3HfB6QFNjroAMelQo/gybyYq97WerCBAZoyrAoW8Tzdq2jWg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-async-generator-functions": { - "version": "7.25.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.25.8.tgz", - "integrity": "sha512-9ypqkozyzpG+HxlH4o4gdctalFGIjjdufzo7I2XPda0iBnZ6a+FO0rIEQcdSPXp02CkvGsII1exJhmROPQd5oA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/helper-remap-async-to-generator": "^7.25.7", - "@babel/traverse": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-async-to-generator": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.25.7.tgz", - "integrity": "sha512-ZUCjAavsh5CESCmi/xCpX1qcCaAglzs/7tmuvoFnJgA1dM7gQplsguljoTg+Ru8WENpX89cQyAtWoaE0I3X3Pg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-module-imports": "^7.25.7", - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/helper-remap-async-to-generator": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-block-scoped-functions": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.25.7.tgz", - "integrity": "sha512-xHttvIM9fvqW+0a3tZlYcZYSBpSWzGBFIt/sYG3tcdSzBB8ZeVgz2gBP7Df+sM0N1850jrviYSSeUuc+135dmQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-block-scoping": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.25.7.tgz", - "integrity": "sha512-ZEPJSkVZaeTFG/m2PARwLZQ+OG0vFIhPlKHK/JdIMy8DbRJ/htz6LRrTFtdzxi9EHmcwbNPAKDnadpNSIW+Aow==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-class-properties": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.25.7.tgz", - "integrity": "sha512-mhyfEW4gufjIqYFo9krXHJ3ElbFLIze5IDp+wQTxoPd+mwFb1NxatNAwmv8Q8Iuxv7Zc+q8EkiMQwc9IhyGf4g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.25.7", - "@babel/helper-plugin-utils": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-class-static-block": { - "version": "7.25.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.25.8.tgz", - "integrity": "sha512-e82gl3TCorath6YLf9xUwFehVvjvfqFhdOo4+0iVIVju+6XOi5XHkqB3P2AXnSwoeTX0HBoXq5gJFtvotJzFnQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.25.7", - "@babel/helper-plugin-utils": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.12.0" - } - }, - "node_modules/@babel/plugin-transform-classes": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.25.7.tgz", - "integrity": "sha512-9j9rnl+YCQY0IGoeipXvnk3niWicIB6kCsWRGLwX241qSXpbA4MKxtp/EdvFxsc4zI5vqfLxzOd0twIJ7I99zg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.25.7", - "@babel/helper-compilation-targets": "^7.25.7", - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/helper-replace-supers": "^7.25.7", - "@babel/traverse": "^7.25.7", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-computed-properties": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.25.7.tgz", - "integrity": "sha512-QIv+imtM+EtNxg/XBKL3hiWjgdLjMOmZ+XzQwSgmBfKbfxUjBzGgVPklUuE55eq5/uVoh8gg3dqlrwR/jw3ZeA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/template": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-destructuring": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.25.7.tgz", - "integrity": "sha512-xKcfLTlJYUczdaM1+epcdh1UGewJqr9zATgrNHcLBcV2QmfvPPEixo/sK/syql9cEmbr7ulu5HMFG5vbbt/sEA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-dotall-regex": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.25.7.tgz", - "integrity": "sha512-kXzXMMRzAtJdDEgQBLF4oaiT6ZCU3oWHgpARnTKDAqPkDJ+bs3NrZb310YYevR5QlRo3Kn7dzzIdHbZm1VzJdQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.25.7", - "@babel/helper-plugin-utils": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-duplicate-keys": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.25.7.tgz", - "integrity": "sha512-by+v2CjoL3aMnWDOyCIg+yxU9KXSRa9tN6MbqggH5xvymmr9p4AMjYkNlQy4brMceBnUyHZ9G8RnpvT8wP7Cfg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-duplicate-named-capturing-groups-regex": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-named-capturing-groups-regex/-/plugin-transform-duplicate-named-capturing-groups-regex-7.25.7.tgz", - "integrity": "sha512-HvS6JF66xSS5rNKXLqkk7L9c/jZ/cdIVIcoPVrnl8IsVpLggTjXs8OWekbLHs/VtYDDh5WXnQyeE3PPUGm22MA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.25.7", - "@babel/helper-plugin-utils": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/plugin-transform-dynamic-import": { - "version": "7.25.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.25.8.tgz", - "integrity": "sha512-gznWY+mr4ZQL/EWPcbBQUP3BXS5FwZp8RUOw06BaRn8tQLzN4XLIxXejpHN9Qo8x8jjBmAAKp6FoS51AgkSA/A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-exponentiation-operator": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.25.7.tgz", - "integrity": "sha512-yjqtpstPfZ0h/y40fAXRv2snciYr0OAoMXY/0ClC7tm4C/nG5NJKmIItlaYlLbIVAWNfrYuy9dq1bE0SbX0PEg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.25.7", - "@babel/helper-plugin-utils": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-export-namespace-from": { - "version": "7.25.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.25.8.tgz", - "integrity": "sha512-sPtYrduWINTQTW7FtOy99VCTWp4H23UX7vYcut7S4CIMEXU+54zKX9uCoGkLsWXteyaMXzVHgzWbLfQ1w4GZgw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-for-of": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.25.7.tgz", - "integrity": "sha512-n/TaiBGJxYFWvpJDfsxSj9lEEE44BFM1EPGz4KEiTipTgkoFVVcCmzAL3qA7fdQU96dpo4gGf5HBx/KnDvqiHw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-function-name": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.25.7.tgz", - "integrity": "sha512-5MCTNcjCMxQ63Tdu9rxyN6cAWurqfrDZ76qvVPrGYdBxIj+EawuuxTu/+dgJlhK5eRz3v1gLwp6XwS8XaX2NiQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-compilation-targets": "^7.25.7", - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/traverse": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-json-strings": { - "version": "7.25.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.25.8.tgz", - "integrity": "sha512-4OMNv7eHTmJ2YXs3tvxAfa/I43di+VcF+M4Wt66c88EAED1RoGaf1D64cL5FkRpNL+Vx9Hds84lksWvd/wMIdA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-literals": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.25.7.tgz", - "integrity": "sha512-fwzkLrSu2fESR/cm4t6vqd7ebNIopz2QHGtjoU+dswQo/P6lwAG04Q98lliE3jkz/XqnbGFLnUcE0q0CVUf92w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-logical-assignment-operators": { - "version": "7.25.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.25.8.tgz", - "integrity": "sha512-f5W0AhSbbI+yY6VakT04jmxdxz+WsID0neG7+kQZbCOjuyJNdL5Nn4WIBm4hRpKnUcO9lP0eipUhFN12JpoH8g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-member-expression-literals": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.25.7.tgz", - "integrity": "sha512-Std3kXwpXfRV0QtQy5JJcRpkqP8/wG4XL7hSKZmGlxPlDqmpXtEPRmhF7ztnlTCtUN3eXRUJp+sBEZjaIBVYaw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-modules-amd": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.25.7.tgz", - "integrity": "sha512-CgselSGCGzjQvKzghCvDTxKHP3iooenLpJDO842ehn5D2G5fJB222ptnDwQho0WjEvg7zyoxb9P+wiYxiJX5yA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-module-transforms": "^7.25.7", - "@babel/helper-plugin-utils": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-modules-commonjs": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.25.7.tgz", - "integrity": "sha512-L9Gcahi0kKFYXvweO6n0wc3ZG1ChpSFdgG+eV1WYZ3/dGbJK7vvk91FgGgak8YwRgrCuihF8tE/Xg07EkL5COg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-module-transforms": "^7.25.7", - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/helper-simple-access": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-modules-systemjs": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.25.7.tgz", - "integrity": "sha512-t9jZIvBmOXJsiuyOwhrIGs8dVcD6jDyg2icw1VL4A/g+FnWyJKwUfSSU2nwJuMV2Zqui856El9u+ElB+j9fV1g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-module-transforms": "^7.25.7", - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/helper-validator-identifier": "^7.25.7", - "@babel/traverse": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-modules-umd": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.25.7.tgz", - "integrity": "sha512-p88Jg6QqsaPh+EB7I9GJrIqi1Zt4ZBHUQtjw3z1bzEXcLh6GfPqzZJ6G+G1HBGKUNukT58MnKG7EN7zXQBCODw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-module-transforms": "^7.25.7", - "@babel/helper-plugin-utils": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.25.7.tgz", - "integrity": "sha512-BtAT9LzCISKG3Dsdw5uso4oV1+v2NlVXIIomKJgQybotJY3OwCwJmkongjHgwGKoZXd0qG5UZ12JUlDQ07W6Ow==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.25.7", - "@babel/helper-plugin-utils": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/plugin-transform-new-target": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.25.7.tgz", - "integrity": "sha512-CfCS2jDsbcZaVYxRFo2qtavW8SpdzmBXC2LOI4oO0rP+JSRDxxF3inF4GcPsLgfb5FjkhXG5/yR/lxuRs2pySA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-nullish-coalescing-operator": { - "version": "7.25.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.25.8.tgz", - "integrity": "sha512-Z7WJJWdQc8yCWgAmjI3hyC+5PXIubH9yRKzkl9ZEG647O9szl9zvmKLzpbItlijBnVhTUf1cpyWBsZ3+2wjWPQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-numeric-separator": { - "version": "7.25.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.25.8.tgz", - "integrity": "sha512-rm9a5iEFPS4iMIy+/A/PiS0QN0UyjPIeVvbU5EMZFKJZHt8vQnasbpo3T3EFcxzCeYO0BHfc4RqooCZc51J86Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-object-rest-spread": { - "version": "7.25.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.25.8.tgz", - "integrity": "sha512-LkUu0O2hnUKHKE7/zYOIjByMa4VRaV2CD/cdGz0AxU9we+VA3kDDggKEzI0Oz1IroG+6gUP6UmWEHBMWZU316g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-compilation-targets": "^7.25.7", - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/plugin-transform-parameters": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-object-super": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.25.7.tgz", - "integrity": "sha512-pWT6UXCEW3u1t2tcAGtE15ornCBvopHj9Bps9D2DsH15APgNVOTwwczGckX+WkAvBmuoYKRCFa4DK+jM8vh5AA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/helper-replace-supers": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-optional-catch-binding": { - "version": "7.25.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.25.8.tgz", - "integrity": "sha512-EbQYweoMAHOn7iJ9GgZo14ghhb9tTjgOc88xFgYngifx7Z9u580cENCV159M4xDh3q/irbhSjZVpuhpC2gKBbg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-optional-chaining": { - "version": "7.25.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.25.8.tgz", - "integrity": "sha512-q05Bk7gXOxpTHoQ8RSzGSh/LHVB9JEIkKnk3myAWwZHnYiTGYtbdrYkIsS8Xyh4ltKf7GNUSgzs/6P2bJtBAQg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-parameters": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.25.7.tgz", - "integrity": "sha512-FYiTvku63me9+1Nz7TOx4YMtW3tWXzfANZtrzHhUZrz4d47EEtMQhzFoZWESfXuAMMT5mwzD4+y1N8ONAX6lMQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-private-methods": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.25.7.tgz", - "integrity": "sha512-KY0hh2FluNxMLwOCHbxVOKfdB5sjWG4M183885FmaqWWiGMhRZq4DQRKH6mHdEucbJnyDyYiZNwNG424RymJjA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.25.7", - "@babel/helper-plugin-utils": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-private-property-in-object": { - "version": "7.25.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.25.8.tgz", - "integrity": "sha512-8Uh966svuB4V8RHHg0QJOB32QK287NBksJOByoKmHMp1TAobNniNalIkI2i5IPj5+S9NYCG4VIjbEuiSN8r+ow==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.25.7", - "@babel/helper-create-class-features-plugin": "^7.25.7", - "@babel/helper-plugin-utils": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-property-literals": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.25.7.tgz", - "integrity": "sha512-lQEeetGKfFi0wHbt8ClQrUSUMfEeI3MMm74Z73T9/kuz990yYVtfofjf3NuA42Jy3auFOpbjDyCSiIkTs1VIYw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-regenerator": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.25.7.tgz", - "integrity": "sha512-mgDoQCRjrY3XK95UuV60tZlFCQGXEtMg8H+IsW72ldw1ih1jZhzYXbJvghmAEpg5UVhhnCeia1CkGttUvCkiMQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7", - "regenerator-transform": "^0.15.2" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-reserved-words": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.25.7.tgz", - "integrity": "sha512-3OfyfRRqiGeOvIWSagcwUTVk2hXBsr/ww7bLn6TRTuXnexA+Udov2icFOxFX9abaj4l96ooYkcNN1qi2Zvqwng==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-shorthand-properties": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.25.7.tgz", - "integrity": "sha512-uBbxNwimHi5Bv3hUccmOFlUy3ATO6WagTApenHz9KzoIdn0XeACdB12ZJ4cjhuB2WSi80Ez2FWzJnarccriJeA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-spread": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.25.7.tgz", - "integrity": "sha512-Mm6aeymI0PBh44xNIv/qvo8nmbkpZze1KvR8MkEqbIREDxoiWTi18Zr2jryfRMwDfVZF9foKh060fWgni44luw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-sticky-regex": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.25.7.tgz", - "integrity": "sha512-ZFAeNkpGuLnAQ/NCsXJ6xik7Id+tHuS+NT+ue/2+rn/31zcdnupCdmunOizEaP0JsUmTFSTOPoQY7PkK2pttXw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-template-literals": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.25.7.tgz", - "integrity": "sha512-SI274k0nUsFFmyQupiO7+wKATAmMFf8iFgq2O+vVFXZ0SV9lNfT1NGzBEhjquFmD8I9sqHLguH+gZVN3vww2AA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-typeof-symbol": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.25.7.tgz", - "integrity": "sha512-OmWmQtTHnO8RSUbL0NTdtpbZHeNTnm68Gj5pA4Y2blFNh+V4iZR68V1qL9cI37J21ZN7AaCnkfdHtLExQPf2uA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-unicode-escapes": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.25.7.tgz", - "integrity": "sha512-BN87D7KpbdiABA+t3HbVqHzKWUDN3dymLaTnPFAMyc8lV+KN3+YzNhVRNdinaCPA4AUqx7ubXbQ9shRjYBl3SQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-unicode-property-regex": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.25.7.tgz", - "integrity": "sha512-IWfR89zcEPQGB/iB408uGtSPlQd3Jpq11Im86vUgcmSTcoWAiQMCTOa2K2yNNqFJEBVICKhayctee65Ka8OB0w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.25.7", - "@babel/helper-plugin-utils": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-unicode-regex": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.25.7.tgz", - "integrity": "sha512-8JKfg/hiuA3qXnlLx8qtv5HWRbgyFx2hMMtpDDuU2rTckpKkGu4ycK5yYHwuEa16/quXfoxHBIApEsNyMWnt0g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.25.7", - "@babel/helper-plugin-utils": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-unicode-sets-regex": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.25.7.tgz", - "integrity": "sha512-YRW8o9vzImwmh4Q3Rffd09bH5/hvY0pxg+1H1i0f7APoUeg12G7+HhLj9ZFNIrYkgBXhIijPJ+IXypN0hLTIbw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.25.7", - "@babel/helper-plugin-utils": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/preset-env": { - "version": "7.25.8", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.25.8.tgz", - "integrity": "sha512-58T2yulDHMN8YMUxiLq5YmWUnlDCyY1FsHM+v12VMx+1/FlrUj5tY50iDCpofFQEM8fMYOaY9YRvym2jcjn1Dg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/compat-data": "^7.25.8", - "@babel/helper-compilation-targets": "^7.25.7", - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/helper-validator-option": "^7.25.7", - "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "^7.25.7", - "@babel/plugin-bugfix-safari-class-field-initializer-scope": "^7.25.7", - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.25.7", - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.25.7", - "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.25.7", - "@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2", - "@babel/plugin-syntax-import-assertions": "^7.25.7", - "@babel/plugin-syntax-import-attributes": "^7.25.7", - "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6", - "@babel/plugin-transform-arrow-functions": "^7.25.7", - "@babel/plugin-transform-async-generator-functions": "^7.25.8", - "@babel/plugin-transform-async-to-generator": "^7.25.7", - "@babel/plugin-transform-block-scoped-functions": "^7.25.7", - "@babel/plugin-transform-block-scoping": "^7.25.7", - "@babel/plugin-transform-class-properties": "^7.25.7", - "@babel/plugin-transform-class-static-block": "^7.25.8", - "@babel/plugin-transform-classes": "^7.25.7", - "@babel/plugin-transform-computed-properties": "^7.25.7", - "@babel/plugin-transform-destructuring": "^7.25.7", - "@babel/plugin-transform-dotall-regex": "^7.25.7", - "@babel/plugin-transform-duplicate-keys": "^7.25.7", - "@babel/plugin-transform-duplicate-named-capturing-groups-regex": "^7.25.7", - "@babel/plugin-transform-dynamic-import": "^7.25.8", - "@babel/plugin-transform-exponentiation-operator": "^7.25.7", - "@babel/plugin-transform-export-namespace-from": "^7.25.8", - "@babel/plugin-transform-for-of": "^7.25.7", - "@babel/plugin-transform-function-name": "^7.25.7", - "@babel/plugin-transform-json-strings": "^7.25.8", - "@babel/plugin-transform-literals": "^7.25.7", - "@babel/plugin-transform-logical-assignment-operators": "^7.25.8", - "@babel/plugin-transform-member-expression-literals": "^7.25.7", - "@babel/plugin-transform-modules-amd": "^7.25.7", - "@babel/plugin-transform-modules-commonjs": "^7.25.7", - "@babel/plugin-transform-modules-systemjs": "^7.25.7", - "@babel/plugin-transform-modules-umd": "^7.25.7", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.25.7", - "@babel/plugin-transform-new-target": "^7.25.7", - "@babel/plugin-transform-nullish-coalescing-operator": "^7.25.8", - "@babel/plugin-transform-numeric-separator": "^7.25.8", - "@babel/plugin-transform-object-rest-spread": "^7.25.8", - "@babel/plugin-transform-object-super": "^7.25.7", - "@babel/plugin-transform-optional-catch-binding": "^7.25.8", - "@babel/plugin-transform-optional-chaining": "^7.25.8", - "@babel/plugin-transform-parameters": "^7.25.7", - "@babel/plugin-transform-private-methods": "^7.25.7", - "@babel/plugin-transform-private-property-in-object": "^7.25.8", - "@babel/plugin-transform-property-literals": "^7.25.7", - "@babel/plugin-transform-regenerator": "^7.25.7", - "@babel/plugin-transform-reserved-words": "^7.25.7", - "@babel/plugin-transform-shorthand-properties": "^7.25.7", - "@babel/plugin-transform-spread": "^7.25.7", - "@babel/plugin-transform-sticky-regex": "^7.25.7", - "@babel/plugin-transform-template-literals": "^7.25.7", - "@babel/plugin-transform-typeof-symbol": "^7.25.7", - "@babel/plugin-transform-unicode-escapes": "^7.25.7", - "@babel/plugin-transform-unicode-property-regex": "^7.25.7", - "@babel/plugin-transform-unicode-regex": "^7.25.7", - "@babel/plugin-transform-unicode-sets-regex": "^7.25.7", - "@babel/preset-modules": "0.1.6-no-external-plugins", - "babel-plugin-polyfill-corejs2": "^0.4.10", - "babel-plugin-polyfill-corejs3": "^0.10.6", - "babel-plugin-polyfill-regenerator": "^0.6.1", - "core-js-compat": "^3.38.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/preset-modules": { - "version": "0.1.6-no-external-plugins", - "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.6-no-external-plugins.tgz", - "integrity": "sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/types": "^7.4.4", - "esutils": "^2.0.2" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0 || ^8.0.0-0 <8.0.0" - } - }, - "node_modules/@babel/runtime": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.7.tgz", - "integrity": "sha512-FjoyLe754PMiYsFaN5C94ttGiOmBNYTf6pLr4xXHAT5uctHb092PBszndLDR5XA/jghQvn4n7JMHl7dmTgbm9w==", - "dev": true, - "license": "MIT", - "dependencies": { - "regenerator-runtime": "^0.14.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/template": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.7.tgz", - "integrity": "sha512-wRwtAgI3bAS+JGU2upWNL9lSlDcRCqD05BZ1n3X2ONLH1WilFP6O1otQjeMK/1g0pvYcXC7b/qVUB1keofjtZA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.25.7", - "@babel/parser": "^7.25.7", - "@babel/types": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.7.tgz", - "integrity": "sha512-jatJPT1Zjqvh/1FyJs6qAHL+Dzb7sTb+xr7Q+gM1b+1oBsMsQQ4FkVKb6dFlJvLlVssqkRzV05Jzervt9yhnzg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.25.7", - "@babel/generator": "^7.25.7", - "@babel/parser": "^7.25.7", - "@babel/template": "^7.25.7", - "@babel/types": "^7.25.7", - "debug": "^4.3.1", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/types": { - "version": "7.25.8", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.8.tgz", - "integrity": "sha512-JWtuCu8VQsMladxVz/P4HzHUGCAwpuqacmowgXFs5XjxIgKuNjnLokQzuVjlTvIzODaDmpjT3oxcC48vyk9EWg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.25.7", - "@babel/helper-validator-identifier": "^7.25.7", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", - "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/source-map": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", - "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", - "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@rollup/plugin-babel": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-6.0.4.tgz", - "integrity": "sha512-YF7Y52kFdFT/xVSuVdjkV5ZdX/3YtmX0QulG+x0taQOtJdHYzVU61aSSkAgVJ7NOv6qPkIYiJSgSWWN/DM5sGw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-module-imports": "^7.18.6", - "@rollup/pluginutils": "^5.0.1" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0", - "@types/babel__core": "^7.1.9", - "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" - }, - "peerDependenciesMeta": { - "@types/babel__core": { - "optional": true - }, - "rollup": { - "optional": true - } - } - }, - "node_modules/@rollup/plugin-terser": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/@rollup/plugin-terser/-/plugin-terser-0.4.4.tgz", - "integrity": "sha512-XHeJC5Bgvs8LfukDwWZp7yeqin6ns8RTl2B9avbejt6tZqsqvVoWI7ZTQrcNsfKEDWBTnTxM8nMDkO2IFFbd0A==", + "node_modules/@rollup/plugin-swc": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-swc/-/plugin-swc-0.4.0.tgz", + "integrity": "sha512-oAtqXa8rOl7BOK1Rz3rRxI+LIL53S9SqO2KSq2UUUzWgOgXg6492Jh5mL2mv/f9cpit8zFWdwILuVeozZ0C8mg==", "dev": true, "license": "MIT", "dependencies": { - "serialize-javascript": "^6.0.1", - "smob": "^1.0.0", - "terser": "^5.17.4" + "@rollup/pluginutils": "^5.0.1", + "smob": "^1.4.0" }, "engines": { "node": ">=14.0.0" }, "peerDependencies": { - "rollup": "^2.0.0||^3.0.0||^4.0.0" + "@swc/core": "^1.3.0", + "rollup": "^3.0.0||^4.0.0" }, "peerDependenciesMeta": { "rollup": { @@ -1715,9 +80,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.24.0.tgz", - "integrity": "sha512-Q6HJd7Y6xdB48x8ZNVDOqsbh2uByBhgK8PiQgPhwkIw/HC/YX5Ghq2mQY5sRMZWHb3VsFkWooUVOZHKr7DmDIA==", + "version": "4.44.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.44.2.tgz", + "integrity": "sha512-g0dF8P1e2QYPOj1gu7s/3LVP6kze9A7m6x0BZ9iTdXK8N5c2V7cpBKHV3/9A4Zd8xxavdhK0t4PnqjkqVmUc9Q==", "cpu": [ "arm" ], @@ -1729,9 +94,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.24.0.tgz", - "integrity": "sha512-ijLnS1qFId8xhKjT81uBHuuJp2lU4x2yxa4ctFPtG+MqEE6+C5f/+X/bStmxapgmwLwiL3ih122xv8kVARNAZA==", + "version": "4.44.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.44.2.tgz", + "integrity": "sha512-Yt5MKrOosSbSaAK5Y4J+vSiID57sOvpBNBR6K7xAaQvk3MkcNVV0f9fE20T+41WYN8hDn6SGFlFrKudtx4EoxA==", "cpu": [ "arm64" ], @@ -1743,9 +108,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.24.0.tgz", - "integrity": "sha512-bIv+X9xeSs1XCk6DVvkO+S/z8/2AMt/2lMqdQbMrmVpgFvXlmde9mLcbQpztXm1tajC3raFDqegsH18HQPMYtA==", + "version": "4.44.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.44.2.tgz", + "integrity": "sha512-EsnFot9ZieM35YNA26nhbLTJBHD0jTwWpPwmRVDzjylQT6gkar+zenfb8mHxWpRrbn+WytRRjE0WKsfaxBkVUA==", "cpu": [ "arm64" ], @@ -1757,9 +122,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.24.0.tgz", - "integrity": "sha512-X6/nOwoFN7RT2svEQWUsW/5C/fYMBe4fnLK9DQk4SX4mgVBiTA9h64kjUYPvGQ0F/9xwJ5U5UfTbl6BEjaQdBQ==", + "version": "4.44.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.44.2.tgz", + "integrity": "sha512-dv/t1t1RkCvJdWWxQ2lWOO+b7cMsVw5YFaS04oHpZRWehI1h0fV1gF4wgGCTyQHHjJDfbNpwOi6PXEafRBBezw==", "cpu": [ "x64" ], @@ -1770,10 +135,38 @@ "darwin" ] }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.44.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.44.2.tgz", + "integrity": "sha512-W4tt4BLorKND4qeHElxDoim0+BsprFTwb+vriVQnFFtT/P6v/xO5I99xvYnVzKWrK6j7Hb0yp3x7V5LUbaeOMg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.44.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.44.2.tgz", + "integrity": "sha512-tdT1PHopokkuBVyHjvYehnIe20fxibxFCEhQP/96MDSOcyjM/shlTkZZLOufV3qO6/FQOSiJTBebhVc12JyPTA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.24.0.tgz", - "integrity": "sha512-0KXvIJQMOImLCVCz9uvvdPgfyWo93aHHp8ui3FrtOP57svqrF/roSSR5pjqL2hcMp0ljeGlU4q9o/rQaAQ3AYA==", + "version": "4.44.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.44.2.tgz", + "integrity": "sha512-+xmiDGGaSfIIOXMzkhJ++Oa0Gwvl9oXUeIiwarsdRXSe27HUIvjbSIpPxvnNsRebsNdUo7uAiQVgBD1hVriwSQ==", "cpu": [ "arm" ], @@ -1785,9 +178,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.24.0.tgz", - "integrity": "sha512-it2BW6kKFVh8xk/BnHfakEeoLPv8STIISekpoF+nBgWM4d55CZKc7T4Dx1pEbTnYm/xEKMgy1MNtYuoA8RFIWw==", + "version": "4.44.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.44.2.tgz", + "integrity": "sha512-bDHvhzOfORk3wt8yxIra8N4k/N0MnKInCW5OGZaeDYa/hMrdPaJzo7CSkjKZqX4JFUWjUGm88lI6QJLCM7lDrA==", "cpu": [ "arm" ], @@ -1799,9 +192,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.24.0.tgz", - "integrity": "sha512-i0xTLXjqap2eRfulFVlSnM5dEbTVque/3Pi4g2y7cxrs7+a9De42z4XxKLYJ7+OhE3IgxvfQM7vQc43bwTgPwA==", + "version": "4.44.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.44.2.tgz", + "integrity": "sha512-NMsDEsDiYghTbeZWEGnNi4F0hSbGnsuOG+VnNvxkKg0IGDvFh7UVpM/14mnMwxRxUf9AdAVJgHPvKXf6FpMB7A==", "cpu": [ "arm64" ], @@ -1813,9 +206,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.24.0.tgz", - "integrity": "sha512-9E6MKUJhDuDh604Qco5yP/3qn3y7SLXYuiC0Rpr89aMScS2UAmK1wHP2b7KAa1nSjWJc/f/Lc0Wl1L47qjiyQw==", + "version": "4.44.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.44.2.tgz", + "integrity": "sha512-lb5bxXnxXglVq+7imxykIp5xMq+idehfl+wOgiiix0191av84OqbjUED+PRC5OA8eFJYj5xAGcpAZ0pF2MnW+A==", "cpu": [ "arm64" ], @@ -1826,10 +219,24 @@ "linux" ] }, + "node_modules/@rollup/rollup-linux-loongarch64-gnu": { + "version": "4.44.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.44.2.tgz", + "integrity": "sha512-Yl5Rdpf9pIc4GW1PmkUGHdMtbx0fBLE1//SxDmuf3X0dUC57+zMepow2LK0V21661cjXdTn8hO2tXDdAWAqE5g==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.24.0.tgz", - "integrity": "sha512-2XFFPJ2XMEiF5Zi2EBf4h73oR1V/lycirxZxHZNc93SqDN/IWhYYSYj8I9381ikUFXZrz2v7r2tOVk2NBwxrWw==", + "version": "4.44.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.44.2.tgz", + "integrity": "sha512-03vUDH+w55s680YYryyr78jsO1RWU9ocRMaeV2vMniJJW/6HhoTBwyyiiTPVHNWLnhsnwcQ0oH3S9JSBEKuyqw==", "cpu": [ "ppc64" ], @@ -1841,9 +248,23 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.24.0.tgz", - "integrity": "sha512-M3Dg4hlwuntUCdzU7KjYqbbd+BLq3JMAOhCKdBE3TcMGMZbKkDdJ5ivNdehOssMCIokNHFOsv7DO4rlEOfyKpg==", + "version": "4.44.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.44.2.tgz", + "integrity": "sha512-iYtAqBg5eEMG4dEfVlkqo05xMOk6y/JXIToRca2bAWuqjrJYJlx/I7+Z+4hSrsWU8GdJDFPL4ktV3dy4yBSrzg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.44.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.44.2.tgz", + "integrity": "sha512-e6vEbgaaqz2yEHqtkPXa28fFuBGmUJ0N2dOJK8YUfijejInt9gfCSA7YDdJ4nYlv67JfP3+PSWFX4IVw/xRIPg==", "cpu": [ "riscv64" ], @@ -1855,151 +276,346 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.24.0.tgz", - "integrity": "sha512-mjBaoo4ocxJppTorZVKWFpy1bfFj9FeCMJqzlMQGjpNPY9JwQi7OuS1axzNIk0nMX6jSgy6ZURDZ2w0QW6D56g==", + "version": "4.44.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.44.2.tgz", + "integrity": "sha512-evFOtkmVdY3udE+0QKrV5wBx7bKI0iHz5yEVx5WqDJkxp9YQefy4Mpx3RajIVcM6o7jxTvVd/qpC1IXUhGc1Mw==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.44.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.44.2.tgz", + "integrity": "sha512-/bXb0bEsWMyEkIsUL2Yt5nFB5naLAwyOWMEviQfQY1x3l5WsLKgvZf66TM7UTfED6erckUVUJQ/jJ1FSpm3pRQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.44.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.44.2.tgz", + "integrity": "sha512-3D3OB1vSSBXmkGEZR27uiMRNiwN08/RVAcBKwhUYPaiZ8bcvdeEwWPvbnXvvXHY+A/7xluzcN+kaiOFNiOZwWg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.44.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.44.2.tgz", + "integrity": "sha512-VfU0fsMK+rwdK8mwODqYeM2hDrF2WiHaSmCBrS7gColkQft95/8tphyzv2EupVxn3iE0FI78wzffoULH1G+dkw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.44.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.44.2.tgz", + "integrity": "sha512-+qMUrkbUurpE6DVRjiJCNGZBGo9xM4Y0FXU5cjgudWqIBWbcLkjE3XprJUsOFgC6xjBClwVa9k6O3A7K3vxb5Q==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.44.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.44.2.tgz", + "integrity": "sha512-3+QZROYfJ25PDcxFF66UEk8jGWigHJeecZILvkPkyQN7oc5BvFo4YEXFkOs154j3FTMp9mn9Ky8RCOwastduEA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@swc/core": { + "version": "1.12.11", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.12.11.tgz", + "integrity": "sha512-P3GM+0lqjFctcp5HhR9mOcvLSX3SptI9L1aux0Fuvgt8oH4f92rCUrkodAa0U2ktmdjcyIiG37xg2mb/dSCYSA==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@swc/counter": "^0.1.3", + "@swc/types": "^0.1.23" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/swc" + }, + "optionalDependencies": { + "@swc/core-darwin-arm64": "1.12.11", + "@swc/core-darwin-x64": "1.12.11", + "@swc/core-linux-arm-gnueabihf": "1.12.11", + "@swc/core-linux-arm64-gnu": "1.12.11", + "@swc/core-linux-arm64-musl": "1.12.11", + "@swc/core-linux-x64-gnu": "1.12.11", + "@swc/core-linux-x64-musl": "1.12.11", + "@swc/core-win32-arm64-msvc": "1.12.11", + "@swc/core-win32-ia32-msvc": "1.12.11", + "@swc/core-win32-x64-msvc": "1.12.11" + }, + "peerDependencies": { + "@swc/helpers": ">=0.5.17" + }, + "peerDependenciesMeta": { + "@swc/helpers": { + "optional": true + } + } + }, + "node_modules/@swc/core-darwin-arm64": { + "version": "1.12.11", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.12.11.tgz", + "integrity": "sha512-J19Jj9Y5x/N0loExH7W0OI9OwwoVyxutDdkyq1o/kgXyBqmmzV7Y/Q9QekI2Fm/qc5mNeAdP7aj4boY4AY/JPw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "darwin" + ], + "peer": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-darwin-x64": { + "version": "1.12.11", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.12.11.tgz", + "integrity": "sha512-PTuUQrfStQ6cjW+uprGO2lpQHy84/l0v+GqRqq8s/jdK55rFRjMfCeyf6FAR0l6saO5oNOQl+zWR1aNpj8pMQw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "darwin" + ], + "peer": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm-gnueabihf": { + "version": "1.12.11", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.12.11.tgz", + "integrity": "sha512-poxBq152HsupOtnZilenvHmxZ9a8SRj4LtfxUnkMDNOGrZR9oxbQNwEzNKfi3RXEcXz+P8c0Rai1ubBazXv8oQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm64-gnu": { + "version": "1.12.11", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.12.11.tgz", + "integrity": "sha512-y1HNamR/D0Hc8xIE910ysyLe269UYiGaQPoLjQS0phzWFfWdMj9bHM++oydVXZ4RSWycO7KyJ3uvw4NilvyMKQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm64-musl": { + "version": "1.12.11", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.12.11.tgz", + "integrity": "sha512-LlBxPh/32pyQsu2emMEOFRm7poEFLsw12Y1mPY7FWZiZeptomKSOSHRzKDz9EolMiV4qhK1caP1lvW4vminYgQ==", "cpu": [ - "s390x" + "arm64" ], "dev": true, - "license": "MIT", + "license": "Apache-2.0 AND MIT", "optional": true, "os": [ "linux" - ] + ], + "peer": true, + "engines": { + "node": ">=10" + } }, - "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.24.0.tgz", - "integrity": "sha512-ZXFk7M72R0YYFN5q13niV0B7G8/5dcQ9JDp8keJSfr3GoZeXEoMHP/HlvqROA3OMbMdfr19IjCeNAnPUG93b6A==", + "node_modules/@swc/core-linux-x64-gnu": { + "version": "1.12.11", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.12.11.tgz", + "integrity": "sha512-bOjiZB8O/1AzHkzjge1jqX62HGRIpOHqFUrGPfAln/NC6NR+Z2A78u3ixV7k5KesWZFhCV0YVGJL+qToL27myA==", "cpu": [ "x64" ], "dev": true, - "license": "MIT", + "license": "Apache-2.0 AND MIT", "optional": true, "os": [ "linux" - ] + ], + "peer": true, + "engines": { + "node": ">=10" + } }, - "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.24.0.tgz", - "integrity": "sha512-w1i+L7kAXZNdYl+vFvzSZy8Y1arS7vMgIy8wusXJzRrPyof5LAb02KGr1PD2EkRcl73kHulIID0M501lN+vobQ==", + "node_modules/@swc/core-linux-x64-musl": { + "version": "1.12.11", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.12.11.tgz", + "integrity": "sha512-4dzAtbT/m3/UjF045+33gLiHd8aSXJDoqof7gTtu4q0ZyAf7XJ3HHspz+/AvOJLVo4FHHdFcdXhmo/zi1nFn8A==", "cpu": [ "x64" ], "dev": true, - "license": "MIT", + "license": "Apache-2.0 AND MIT", "optional": true, "os": [ "linux" - ] + ], + "peer": true, + "engines": { + "node": ">=10" + } }, - "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.24.0.tgz", - "integrity": "sha512-VXBrnPWgBpVDCVY6XF3LEW0pOU51KbaHhccHw6AS6vBWIC60eqsH19DAeeObl+g8nKAz04QFdl/Cefta0xQtUQ==", + "node_modules/@swc/core-win32-arm64-msvc": { + "version": "1.12.11", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.12.11.tgz", + "integrity": "sha512-h8HiwBZErKvCAmjW92JvQp0iOqm6bncU4ac5jxBGkRApabpUenNJcj3h2g5O6GL5K6T9/WhnXE5gyq/s1fhPQg==", "cpu": [ "arm64" ], "dev": true, - "license": "MIT", + "license": "Apache-2.0 AND MIT", "optional": true, "os": [ "win32" - ] + ], + "peer": true, + "engines": { + "node": ">=10" + } }, - "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.24.0.tgz", - "integrity": "sha512-xrNcGDU0OxVcPTH/8n/ShH4UevZxKIO6HJFK0e15XItZP2UcaiLFd5kiX7hJnqCbSztUF8Qot+JWBC/QXRPYWQ==", + "node_modules/@swc/core-win32-ia32-msvc": { + "version": "1.12.11", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.12.11.tgz", + "integrity": "sha512-1pwr325mXRNUhxTtXmx1IokV5SiRL+6iDvnt3FRXj+X5UvXXKtg2zeyftk+03u8v8v8WUr5I32hIypVJPTNxNg==", "cpu": [ "ia32" ], "dev": true, - "license": "MIT", + "license": "Apache-2.0 AND MIT", "optional": true, "os": [ "win32" - ] + ], + "peer": true, + "engines": { + "node": ">=10" + } }, - "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.24.0.tgz", - "integrity": "sha512-fbMkAF7fufku0N2dE5TBXcNlg0pt0cJue4xBRE2Qc5Vqikxr4VCgKj/ht6SMdFcOacVA9rqF70APJ8RN/4vMJw==", + "node_modules/@swc/core-win32-x64-msvc": { + "version": "1.12.11", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.12.11.tgz", + "integrity": "sha512-5gggWo690Gvs7XiPxAmb5tHwzB9RTVXUV7AWoGb6bmyUd1OXYaebQF0HAOtade5jIoNhfQMQJ7QReRgt/d2jAA==", "cpu": [ "x64" ], "dev": true, - "license": "MIT", + "license": "Apache-2.0 AND MIT", "optional": true, "os": [ "win32" - ] - }, - "node_modules/@types/estree": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", - "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", - "dev": true, - "license": "MIT" - }, - "node_modules/acorn": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.13.0.tgz", - "integrity": "sha512-8zSiw54Oxrdym50NlZ9sUusyO1Z1ZchgRLWRaK6c86XJFClyCgFKetdowBg5bKxyp/u+CDBJG4Mpp0m3HLZl9w==", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, + ], + "peer": true, "engines": { - "node": ">=0.4.0" + "node": ">=10" } }, - "node_modules/acorn-dynamic-import": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz", - "integrity": "sha512-zVWV8Z8lislJoOKKqdNMOB+s6+XV5WERty8MnKBeFgwA+19XJjJHs2RP5dzM57FftIs+jQnRToLiWazKr6sSWg==", - "deprecated": "This is probably built in to whatever tool you're using. If you still need it... idk", + "node_modules/@swc/counter": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz", + "integrity": "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==", "dev": true, - "license": "MIT", - "dependencies": { - "acorn": "^5.0.0" - } + "license": "Apache-2.0", + "peer": true }, - "node_modules/acorn-dynamic-import/node_modules/acorn": { - "version": "5.7.4", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.4.tgz", - "integrity": "sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg==", + "node_modules/@swc/types": { + "version": "0.1.23", + "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.23.tgz", + "integrity": "sha512-u1iIVZV9Q0jxY+yM2vw/hZGDNudsN85bBpTqzAQ9rzkxW9D+e3aEM4Han+ow518gSewkXgjmEK0BD79ZcNVgPw==", "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@swc/counter": "^0.1.3" } }, - "node_modules/acorn-es7-plugin": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/acorn-es7-plugin/-/acorn-es7-plugin-1.1.7.tgz", - "integrity": "sha512-7D+8kscFMf6F2t+8ZRYmv82CncDZETsaZ4dEl5lh3qQez7FVABk2Vz616SAbnIq1PbNsLVaZjl2oSkk5BWAKng==", + "node_modules/@types/estree": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", "dev": true, "license": "MIT" }, - "node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "node_modules/acorn": { + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" + "bin": { + "acorn": "bin/acorn" }, "engines": { - "node": ">=4" + "node": ">=0.4.0" } }, "node_modules/anymatch": { @@ -2016,48 +632,6 @@ "node": ">= 8" } }, - "node_modules/babel-plugin-polyfill-corejs2": { - "version": "0.4.11", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.11.tgz", - "integrity": "sha512-sMEJ27L0gRHShOh5G54uAAPaiCOygY/5ratXuiyb2G46FmlSpc9eFCzYVyDiPxfNbwzA7mYahmjQc5q+CZQ09Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/compat-data": "^7.22.6", - "@babel/helper-define-polyfill-provider": "^0.6.2", - "semver": "^6.3.1" - }, - "peerDependencies": { - "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" - } - }, - "node_modules/babel-plugin-polyfill-corejs3": { - "version": "0.10.6", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.10.6.tgz", - "integrity": "sha512-b37+KR2i/khY5sKmWNVQAnitvquQbNdWy6lJdsr0kmquCKEEUgMKK4SboVM3HtfnZilfjr4MMQ7vY58FVWDtIA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.6.2", - "core-js-compat": "^3.38.0" - }, - "peerDependencies": { - "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" - } - }, - "node_modules/babel-plugin-polyfill-regenerator": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.6.2.tgz", - "integrity": "sha512-2R25rQZWP63nGwaAswvDazbPXfrM3HwVoBXK6HcqeKrSrL/JqcC/rDcf95l4r7LXLyxDXc8uQDa064GubtCABg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.6.2" - }, - "peerDependencies": { - "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" - } - }, "node_modules/binary-extensions": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", @@ -2084,82 +658,6 @@ "node": ">=8" } }, - "node_modules/browserslist": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.0.tgz", - "integrity": "sha512-Rmb62sR1Zpjql25eSanFGEhAxcFwfA1K0GuQcLoaJBAcENegrQut3hYdhXFF1obQfiDyqIW/cLM5HSJ/9k884A==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "caniuse-lite": "^1.0.30001663", - "electron-to-chromium": "^1.5.28", - "node-releases": "^2.0.18", - "update-browserslist-db": "^1.1.0" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001669", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001669.tgz", - "integrity": "sha512-DlWzFDJqstqtIVx1zeSpIMLjunf5SmwOw0N2Ck/QSQdS8PLS4+9HrLaYei4w8BIAL7IB/UEDu889d8vhCTPA0w==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "CC-BY-4.0" - }, - "node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/chokidar": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", @@ -2185,96 +683,6 @@ "fsevents": "~2.3.2" } }, - "node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true, - "license": "MIT" - }, - "node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true, - "license": "MIT" - }, - "node_modules/core-js-compat": { - "version": "3.38.1", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.38.1.tgz", - "integrity": "sha512-JRH6gfXxGmrzF3tZ57lFx97YARxCXPaMzPo6jELZhv88pBH5VXpQ+y0znKGlFnzuaihqhLbefxSJxWJMPtfDzw==", - "dev": true, - "license": "MIT", - "dependencies": { - "browserslist": "^4.23.3" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/core-js" - } - }, - "node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/electron-to-chromium": { - "version": "1.5.39", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.39.tgz", - "integrity": "sha512-4xkpSR6CjuiaNyvwiWDI85N9AxsvbPawB8xc7yzLPonYTuP19BVgYweKyUMFtHEZgIcHWMt1ks5Cqx2m+6/Grg==", - "dev": true, - "license": "ISC" - }, - "node_modules/escalade": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/estree-walker": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", @@ -2282,16 +690,6 @@ "dev": true, "license": "MIT" }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/filesize": { "version": "9.0.11", "resolved": "https://registry.npmjs.org/filesize/-/filesize-9.0.11.tgz", @@ -2330,26 +728,6 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/glob-parent": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", @@ -2363,39 +741,6 @@ "node": ">= 6" } }, - "node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/hasown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -2409,22 +754,6 @@ "node": ">=8" } }, - "node_modules/is-core-module": { - "version": "2.15.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", - "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -2432,78 +761,30 @@ "dev": true, "license": "MIT", "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/js-cleanup": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/js-cleanup/-/js-cleanup-1.2.0.tgz", - "integrity": "sha512-JeDD0yiiSt80fXzAVa/crrS0JDPQljyBG/RpOtaSbyDq03VHa9szJWMaWOYU/bcTn412uMN2MxApXq8v79cUiQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "magic-string": "^0.25.7", - "perf-regexes": "^1.0.1", - "skip-regex": "^1.0.2" - }, - "engines": { - "node": "^10.14.2 || >=12.0.0" - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true, - "license": "MIT" + "node": ">=0.10.0" + } }, - "node_modules/jsesc": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz", - "integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==", + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" + "dependencies": { + "is-extglob": "^2.1.1" }, "engines": { - "node": ">=6" + "node": ">=0.10.0" } }, - "node_modules/json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, "license": "MIT", - "bin": { - "json5": "lib/cli.js" - }, "engines": { - "node": ">=6" + "node": ">=0.12.0" } }, "node_modules/livereload": { @@ -2532,44 +813,20 @@ "dev": true, "license": "MIT" }, - "node_modules/lodash.debounce": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", - "dev": true, - "license": "MIT" - }, - "node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^3.0.2" - } - }, - "node_modules/magic-string": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", - "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "sourcemap-codec": "^1.4.8" - } - }, "node_modules/mime": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz", - "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==", + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/mime/-/mime-4.0.7.tgz", + "integrity": "sha512-2OfDPL+e03E0LrXaGYOtTFIYhiuzep94NSsuhrNULq+stylcJedcHdzHtz0atMUuGwJfFYs0YL5xeC/Ca2x0eQ==", "dev": true, + "funding": [ + "https://github.com/sponsors/broofa" + ], "license": "MIT", "bin": { - "mime": "cli.js" + "mime": "bin/cli.js" }, "engines": { - "node": ">=4.0.0" + "node": ">=16" } }, "node_modules/module-details-from-path": { @@ -2579,54 +836,6 @@ "dev": true, "license": "MIT" }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true, - "license": "MIT" - }, - "node_modules/node-releases": { - "version": "2.0.18", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", - "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", - "dev": true, - "license": "MIT" - }, - "node_modules/nodent-compiler": { - "version": "3.2.13", - "resolved": "https://registry.npmjs.org/nodent-compiler/-/nodent-compiler-3.2.13.tgz", - "integrity": "sha512-nzzWPXZwSdsWie34om+4dLrT/5l1nT/+ig1v06xuSgMtieJVAnMQFuZihUwREM+M7dFso9YoHfDmweexEXXrrw==", - "dev": true, - "engines": "node >= 0.10.0", - "license": "BSD-2-Clause", - "dependencies": { - "acorn": ">= 2.5.2 <= 5.7.5", - "acorn-es7-plugin": "^1.1.7", - "nodent-transform": "^3.2.9", - "source-map": "^0.5.7" - } - }, - "node_modules/nodent-compiler/node_modules/acorn": { - "version": "5.7.4", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.4.tgz", - "integrity": "sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg==", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/nodent-transform": { - "version": "3.2.9", - "resolved": "https://registry.npmjs.org/nodent-transform/-/nodent-transform-3.2.9.tgz", - "integrity": "sha512-4a5FH4WLi+daH/CGD5o/JWRR8W5tlCkd3nrDSkxbOzscJTyTUITltvOJeQjg3HJ1YgEuNyiPhQbvbtRjkQBByQ==", - "dev": true, - "license": "MIT" - }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -2654,30 +863,6 @@ "dev": true, "license": "BSD-2-Clause" }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true, - "license": "MIT" - }, - "node_modules/perf-regexes": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/perf-regexes/-/perf-regexes-1.0.1.tgz", - "integrity": "sha512-L7MXxUDtqr4PUaLFCDCXBfGV/6KLIuSEccizDI7JxT+c9x1G1v04BQ4+4oag84SHaCdrBgQAIs/Cqn+flwFPng==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.14" - } - }, - "node_modules/picocolors": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", - "dev": true, - "license": "ISC" - }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", @@ -2691,16 +876,6 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -2714,107 +889,14 @@ "node": ">=8.10.0" } }, - "node_modules/regenerate": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", - "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", - "dev": true, - "license": "MIT" - }, - "node_modules/regenerate-unicode-properties": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.2.0.tgz", - "integrity": "sha512-DqHn3DwbmmPVzeKj9woBadqmXxLvQoQIwu7nopMc72ztvxVmVk2SBhSnx67zuye5TP+lJsb/TBQsjLKhnDf3MA==", - "dev": true, - "license": "MIT", - "dependencies": { - "regenerate": "^1.4.2" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/regenerator-runtime": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", - "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", - "dev": true, - "license": "MIT" - }, - "node_modules/regenerator-transform": { - "version": "0.15.2", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.2.tgz", - "integrity": "sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.8.4" - } - }, - "node_modules/regexpu-core": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-6.1.1.tgz", - "integrity": "sha512-k67Nb9jvwJcJmVpw0jPttR1/zVfnKf8Km0IPatrU/zJ5XeG3+Slx0xLXs9HByJSzXzrlz5EDvN6yLNMDc2qdnw==", - "dev": true, - "license": "MIT", - "dependencies": { - "regenerate": "^1.4.2", - "regenerate-unicode-properties": "^10.2.0", - "regjsgen": "^0.8.0", - "regjsparser": "^0.11.0", - "unicode-match-property-ecmascript": "^2.0.0", - "unicode-match-property-value-ecmascript": "^2.1.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/regjsgen": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.8.0.tgz", - "integrity": "sha512-RvwtGe3d7LvWiDQXeQw8p5asZUmfU1G/l6WbUXeHta7Y2PEIvBTwH6E2EfmYUK8pxcxEdEmaomqyp0vZZ7C+3Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/regjsparser": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.11.1.tgz", - "integrity": "sha512-1DHODs4B8p/mQHU9kr+jv8+wIC9mtG4eBHxWxIq5mhjE3D5oORhCc6deRKzTjs9DcfRFmj9BHSDguZklqCGFWQ==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "jsesc": "~3.0.2" - }, - "bin": { - "regjsparser": "bin/parser" - } - }, - "node_modules/resolve": { - "version": "1.22.8", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", - "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/rollup": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.24.0.tgz", - "integrity": "sha512-DOmrlGSXNk1DM0ljiQA+i+o0rSLhtii1je5wgk60j49d1jHT5YYttBv1iWOnYSTG+fZZESUOSNiAl89SIet+Cg==", + "version": "4.44.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.44.2.tgz", + "integrity": "sha512-PVoapzTwSEcelaWGth3uR66u7ZRo6qhPHc0f2uRO9fX6XDVNrIiGYS0Pj9+R8yIIYSD/mCx2b16Ws9itljKSPg==", "dev": true, "license": "MIT", "dependencies": { - "@types/estree": "1.0.6" + "@types/estree": "1.0.8" }, "bin": { "rollup": "dist/bin/rollup" @@ -2824,22 +906,26 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.24.0", - "@rollup/rollup-android-arm64": "4.24.0", - "@rollup/rollup-darwin-arm64": "4.24.0", - "@rollup/rollup-darwin-x64": "4.24.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.24.0", - "@rollup/rollup-linux-arm-musleabihf": "4.24.0", - "@rollup/rollup-linux-arm64-gnu": "4.24.0", - "@rollup/rollup-linux-arm64-musl": "4.24.0", - "@rollup/rollup-linux-powerpc64le-gnu": "4.24.0", - "@rollup/rollup-linux-riscv64-gnu": "4.24.0", - "@rollup/rollup-linux-s390x-gnu": "4.24.0", - "@rollup/rollup-linux-x64-gnu": "4.24.0", - "@rollup/rollup-linux-x64-musl": "4.24.0", - "@rollup/rollup-win32-arm64-msvc": "4.24.0", - "@rollup/rollup-win32-ia32-msvc": "4.24.0", - "@rollup/rollup-win32-x64-msvc": "4.24.0", + "@rollup/rollup-android-arm-eabi": "4.44.2", + "@rollup/rollup-android-arm64": "4.44.2", + "@rollup/rollup-darwin-arm64": "4.44.2", + "@rollup/rollup-darwin-x64": "4.44.2", + "@rollup/rollup-freebsd-arm64": "4.44.2", + "@rollup/rollup-freebsd-x64": "4.44.2", + "@rollup/rollup-linux-arm-gnueabihf": "4.44.2", + "@rollup/rollup-linux-arm-musleabihf": "4.44.2", + "@rollup/rollup-linux-arm64-gnu": "4.44.2", + "@rollup/rollup-linux-arm64-musl": "4.44.2", + "@rollup/rollup-linux-loongarch64-gnu": "4.44.2", + "@rollup/rollup-linux-powerpc64le-gnu": "4.44.2", + "@rollup/rollup-linux-riscv64-gnu": "4.44.2", + "@rollup/rollup-linux-riscv64-musl": "4.44.2", + "@rollup/rollup-linux-s390x-gnu": "4.44.2", + "@rollup/rollup-linux-x64-gnu": "4.44.2", + "@rollup/rollup-linux-x64-musl": "4.44.2", + "@rollup/rollup-win32-arm64-msvc": "4.44.2", + "@rollup/rollup-win32-ia32-msvc": "4.44.2", + "@rollup/rollup-win32-x64-msvc": "4.44.2", "fsevents": "~2.3.2" } }, @@ -2853,27 +939,10 @@ "node": ">=8.0.0" } }, - "node_modules/rollup-plugin-cleanup": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/rollup-plugin-cleanup/-/rollup-plugin-cleanup-3.2.1.tgz", - "integrity": "sha512-zuv8EhoO3TpnrU8MX8W7YxSbO4gmOR0ny06Lm3nkFfq0IVKdBUtHwhVzY1OAJyNCIAdLiyPnOrU0KnO0Fri1GQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "js-cleanup": "^1.2.0", - "rollup-pluginutils": "^2.8.2" - }, - "engines": { - "node": "^10.14.2 || >=12.0.0" - }, - "peerDependencies": { - "rollup": ">=2.0" - } - }, "node_modules/rollup-plugin-gzip": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/rollup-plugin-gzip/-/rollup-plugin-gzip-4.0.1.tgz", - "integrity": "sha512-HVukJ5vwTxgzKaNeKCNEqFRQ+/T/j/3zqoUaCN3VGTt8/Mn7Wu2nMCE8VBIDubjM5U+QGgiWs6fYysn63JZY1g==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/rollup-plugin-gzip/-/rollup-plugin-gzip-4.1.1.tgz", + "integrity": "sha512-yyhAAn4/bqo/EZlfpKqPu3+675u2KRYy3AVYeEPpU+ej+fEuhXA7lL1+UfmDw4MlH1593LQQOEQ8+1itw02L6A==", "dev": true, "license": "MIT", "engines": { @@ -2896,36 +965,21 @@ "node": ">=8.3" } }, - "node_modules/rollup-plugin-nodent": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/rollup-plugin-nodent/-/rollup-plugin-nodent-0.2.2.tgz", - "integrity": "sha512-mFomzLjxhS3pVQ0ZAuiLqDtWLXACqylO/sfw9b4JF6nGmiLNyeYmwCgm7hICgMcSFMWOA+IiQQr373HRKg776A==", - "dev": true, - "license": "MIT", - "dependencies": { - "acorn-dynamic-import": "^3.0.0", - "nodent-compiler": "^3.1.6", - "rollup-pluginutils": "^2.0.1" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/rollup-plugin-serve": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/rollup-plugin-serve/-/rollup-plugin-serve-1.1.1.tgz", - "integrity": "sha512-H0VarZRtFR0lfiiC9/P8jzCDvtFf1liOX4oSdIeeYqUCKrmFA7vNiQ0rg2D+TuoP7leaa/LBR8XBts5viF6lnw==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-serve/-/rollup-plugin-serve-3.0.0.tgz", + "integrity": "sha512-DjVRhbwC0OgP1Q1sj8Lvx12ee60UTZM767kkjT61sYKHw/wLpANAw3VZN5ZMa5NlvO8bYpfTaqiUrW+icAjXFg==", "dev": true, "license": "MIT", "dependencies": { - "mime": "^2", + "mime": "^4", "opener": "1" } }, "node_modules/rollup-plugin-sizes": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/rollup-plugin-sizes/-/rollup-plugin-sizes-1.0.6.tgz", - "integrity": "sha512-TQlfd2Ef+1BQjsDIuXyoBPAFFJfA9q4DXSCT5/jsUEtsyn99CzwGH98StQOg+sriq9+j8VgCxPO4yodMbvynPg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-sizes/-/rollup-plugin-sizes-1.1.0.tgz", + "integrity": "sha512-AEYZTYlWfPEIKpjOyL3wxhGZkdVkgmheHatW2xiMNet1MrGws5NszWSKXyiGi2fK0kSbx/X1f3sZqdc1laK1dA==", "dev": true, "license": "MIT", "dependencies": { @@ -2936,74 +990,6 @@ "rollup": "^2 || ^3 || ^4" } }, - "node_modules/rollup-pluginutils": { - "version": "2.8.2", - "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", - "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "estree-walker": "^0.6.1" - } - }, - "node_modules/rollup-pluginutils/node_modules/estree-walker": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", - "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", - "dev": true, - "license": "MIT" - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/serialize-javascript": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", - "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "randombytes": "^2.1.0" - } - }, - "node_modules/skip-regex": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/skip-regex/-/skip-regex-1.0.2.tgz", - "integrity": "sha512-pEjMUbwJ5Pl/6Vn6FsamXHXItJXSRftcibixDmNCWbWhic0hzHrwkMZo0IZ7fMRH9KxcWDFSkzhccB4285PutA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4.2" - } - }, "node_modules/smob": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/smob/-/smob-1.5.0.tgz", @@ -3011,100 +997,6 @@ "dev": true, "license": "MIT" }, - "node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/source-map-support/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/sourcemap-codec": { - "version": "1.4.8", - "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", - "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", - "deprecated": "Please use @jridgewell/sourcemap-codec instead", - "dev": true, - "license": "MIT" - }, - "node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/terser": { - "version": "5.36.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.36.0.tgz", - "integrity": "sha512-IYV9eNMuFAV4THUspIRXkLakHnV6XO7FEdtKjf/mDyrnqUg9LnlOn6/RwRvM9SZjR4GUq8Nk8zj67FzVARr74w==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@jridgewell/source-map": "^0.3.3", - "acorn": "^8.8.2", - "commander": "^2.20.0", - "source-map-support": "~0.5.20" - }, - "bin": { - "terser": "bin/terser" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -3118,81 +1010,6 @@ "node": ">=8.0" } }, - "node_modules/unicode-canonical-property-names-ecmascript": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.1.tgz", - "integrity": "sha512-dA8WbNeb2a6oQzAQ55YlT5vQAWGV9WXOsi3SskE3bcCdM0P4SDd+24zS/OCacdRq5BkdsRj9q3Pg6YyQoxIGqg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/unicode-match-property-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", - "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "unicode-canonical-property-names-ecmascript": "^2.0.0", - "unicode-property-aliases-ecmascript": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/unicode-match-property-value-ecmascript": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.2.0.tgz", - "integrity": "sha512-4IehN3V/+kkr5YeSSDDQG8QLqO26XpL2XP3GQtqwlT/QYSECAwFztxVHjlbh0+gjJ3XmNLS0zDsbgs9jWKExLg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/unicode-property-aliases-ecmascript": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz", - "integrity": "sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/update-browserslist-db": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", - "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "escalade": "^3.2.0", - "picocolors": "^1.1.0" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, "node_modules/ws": { "version": "7.5.10", "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", @@ -3214,13 +1031,6 @@ "optional": true } } - }, - "node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true, - "license": "ISC" } } } diff --git a/package.json b/package.json index e97aa78..6aadbee 100644 --- a/package.json +++ b/package.json @@ -60,23 +60,18 @@ "unpkg": "dist/autoComplete.min.js", "module": "dist/autoComplete.min.js", "devDependencies": { - "@babel/core": "^7.18.6", - "@babel/preset-env": "^7.18.6", - "@rollup/plugin-babel": "^6.0.4", - "@rollup/plugin-terser": "^0.4.4", - "acorn": "^8.7.1", - "rollup": "^4.24.0", + "@rollup/plugin-swc": "^0.4.0", + "acorn": "^8.15.0", + "rollup": "^4.44.2", "rollup-plugin-analyzer": "^4.0.0", - "rollup-plugin-cleanup": "^3.2.1", - "rollup-plugin-gzip": "^4.0.1", + "rollup-plugin-gzip": "^4.1.1", "rollup-plugin-livereload": "^2.0.5", - "rollup-plugin-nodent": "^0.2.2", - "rollup-plugin-serve": "^1.1.1", - "rollup-plugin-sizes": "^1.0.4" + "rollup-plugin-serve": "^3.0.0", + "rollup-plugin-sizes": "^1.1.0" }, "scripts": { "dev": "NODE_ENV=development rollup -c -w", - "build": "NODE_ENV=production rollup -c --bundleConfigAsCjs", + "build": "NODE_ENV=production rollup -c", "docs": "jsdoc -c jsdocs.json" }, "license": "Apache-2.0", diff --git a/rollup.config.js b/rollup.config.js index 1fb48be..4840571 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,13 +1,10 @@ -import nodent from "rollup-plugin-nodent"; -import babel from "@rollup/plugin-babel"; -import cleanup from "rollup-plugin-cleanup"; -import terser from "@rollup/plugin-terser"; -import pkg from "./package.json" assert { type: "json" }; +import pkg from "./package.json" with { type: "json" }; import gzipPlugin from "rollup-plugin-gzip"; import analyze from "rollup-plugin-analyzer"; import sizes from "rollup-plugin-sizes"; import serve from "rollup-plugin-serve"; import livereload from "rollup-plugin-livereload"; +import swc from "@rollup/plugin-swc"; // Library Name const libName = "autoComplete"; @@ -16,7 +13,11 @@ const isProduction = process.env.NODE_ENV === "production"; // Library Max. Size Allowed const limitBytes = 3 * 1024 * 1024; // Library Size Analyzer +let analyzePluginIterations = 0; const onAnalysis = ({ bundleSize }) => { + if (analyzePluginIterations > 0) { + throw ""; // We only want reports on the first output + } if (bundleSize < limitBytes) return; console.log(`Bundle size exceeds ${limitBytes} bytes: ${bundleSize} bytes`); return process.exit(1); @@ -40,26 +41,15 @@ export default [ }, ], plugins: [ - nodent({ - es7: true, - promises: true, - // sourcemap: isProduction ? false : true, - noRuntime: true, - es6target: true, - }), - babel({ - babelHelpers: "bundled", - exclude: "node_modules/**", - presets: ["@babel/preset-env"], - }), - cleanup(), - terser({ - compress: { - drop_console: true, + swc({ + swc: { + jsc: { + target: "es2015", + }, + minify: true, }, - toplevel: true, }), - gzipPlugin.default(), + gzipPlugin(), ], }, { @@ -78,20 +68,15 @@ export default [ }, ], plugins: [ - nodent({ - es7: true, - promises: true, - // sourcemap: isProduction ? false : true, - noRuntime: true, - es6target: true, - }), - babel({ - babelHelpers: "bundled", - exclude: "node_modules/**", - presets: ["@babel/preset-env"], + swc({ + swc: { + jsc: { + target: "es2015", + }, + minify: false, + }, }), - cleanup(), - gzipPlugin.default(), + gzipPlugin(), // Analyzer analyze({ onAnalysis,