From 69822e20056a6aa9eed791b7ac1e3ecdc3a41e82 Mon Sep 17 00:00:00 2001 From: sarontebebe7 Date: Wed, 8 Oct 2025 14:07:20 +0000 Subject: [PATCH 1/5] Add disable auto-translation feature to YouTube extension --- js&css/web-accessible/init.js | 25 +++ menu/skeleton-parts/settings.js | 293 +++++++++++++++++--------------- 2 files changed, 183 insertions(+), 135 deletions(-) diff --git a/js&css/web-accessible/init.js b/js&css/web-accessible/init.js index d1963d826..0fd4db826 100644 --- a/js&css/web-accessible/init.js +++ b/js&css/web-accessible/init.js @@ -138,6 +138,31 @@ document.addEventListener('yt-navigate-finish', function () { // if(node.getAttribute('itemprop') === 'uploadDate') {ImprovedTube.uploadDate = node.content;} */ ImprovedTube.pageType(); + + // Disable auto-translation logic + if (ImprovedTube.storage.disable_auto_translation) { + // Revert translated video title + let originalTitle = document.querySelector('meta[name="title"]'); + if (originalTitle && originalTitle.content) { + let titleEl = document.querySelector('h1.title, h1.ytd-watch-metadata'); + if (titleEl) titleEl.textContent = originalTitle.content; + } + + // Revert translated video description + let originalDesc = document.querySelector('meta[name="description"]'); + if (originalDesc && originalDesc.content) { + let descEl = document.querySelector('#description, .ytd-video-secondary-info-renderer #description'); + if (descEl) descEl.textContent = originalDesc.content; + } + + // Attempt to revert auto-translated captions (if available) + let captionEls = document.querySelectorAll('.ytp-caption-segment'); + captionEls.forEach(function (el) { + if (el.dataset.originalText) { + el.textContent = el.dataset.originalText; + } + }); + } ImprovedTube.YouTubeExperiments(); ImprovedTube.commentsSidebar(); try { if (ImprovedTube.lastWatchedOverlay) ImprovedTube.lastWatchedOverlay(); } catch (e) { console.error('[LWO] nav-finish error', e); } diff --git a/menu/skeleton-parts/settings.js b/menu/skeleton-parts/settings.js index 236904d84..297b74900 100644 --- a/menu/skeleton-parts/settings.js +++ b/menu/skeleton-parts/settings.js @@ -23,7 +23,13 @@ extension.skeleton.header.sectionEnd.menu.on.click.settings = { component: 'section', variant: 'card' }, - secondSection: { + disableAutoTranslation: { + component: 'switch', + text: 'disableYouTubeAutoTranslation', + storage: 'disable_auto_translation', + value: false + }, + exportSettings: { component: 'section', variant: 'card' } @@ -57,7 +63,7 @@ extension.skeleton.header.sectionEnd.menu.on.click.settings = { component: 'span', text: 'settings' } -}; + } /*-------------------------------------------------------------- # APPEARANCE @@ -318,6 +324,13 @@ extension.skeleton.header.sectionEnd.menu.on.click.settings.on.click.secondSecti {value: "zh-HK", text: "中文 (香港)"}, {value: "ko", text: "한국어"} ], + disableAutoTranslation: { + component: 'switch', + text: 'disableYouTubeAutoTranslation', + storage: 'disable_auto_translation', + value: false + } + }, improvedtube: { component: 'select', text: 'improvedtubeLanguage', @@ -369,188 +382,192 @@ extension.skeleton.header.sectionEnd.menu.on.click.settings.on.click.secondSecti } } }, - on: { - click: { - section: { - component: 'section', - variant: 'card', - importSettings: { component: 'button', text: 'importSettings', on: { click: function () { if (location.href.indexOf('/index.html?action=import-settings') !== -1) { - extension.importSettings(); - } else { - window.open(chrome.runtime.getURL('menu/index.html?action=import-settings'), '_blank'); - } - } - } - }, - exportSettings: { - component: 'button', - text: 'exportSettings', - on: { - click: function () { - if (location.href.indexOf('/index.html?action=export-settings') !== -1) { - extension.exportSettings(); - } else { - window.open(chrome.runtime.getURL('menu/index.html?action=export-settings'), '_blank'); - } - } - } - } - }, - sync: { - component: 'section', - variant: 'card', - title: 'browserAccountSync', - - pushSyncSettings: { - component: 'button', - text: 'pushSyncSettings', - on: { - click: function () { - extension.pushSettings(); - } - } - }, - pullSyncSettings: { - component: 'button', - text: 'pullSyncSettings', - on: { - click: function () { - extension.pullSettings(); - } - } - } - }, - reset: { - component: 'section', - variant: 'card', - delete_youtube_cookies: { - component: 'button', - text: 'deleteYoutubeCookies', - on: { click: { - component: 'modal', - - message: { - component: 'span', - text: 'thisWillRemoveAllYouTubeCookies' - }, section: { component: 'section', - variant: 'actions', - - cancel: { + variant: 'card', + importSettings: { component: 'button', - text: 'cancel', + text: 'importSettings', on: { click: function () { - this.parentNode.parentNode.parentNode.close(); + if (location.href.indexOf('/index.html?action=import-settings') !== -1) { + extension.importSettings(); + } else { + window.open(chrome.runtime.getURL('menu/index.html?action=import-settings'), '_blank'); + } } } }, - accept: { + exportSettings: { component: 'button', - text: 'accept', + text: 'exportSettings', on: { click: function () { - chrome.tabs.query({}, function (tabs) { - for (var i = 0, l = tabs.length; i < l; i++) { - if (tabs[i].hasOwnProperty('url')) { - chrome.tabs.sendMessage(tabs[i].id, { - action: 'delete-youtube-cookies' - }); - } - } - }); - - this.parentNode.parentNode.parentNode.close(); + if (location.href.indexOf('/index.html?action=export-settings') !== -1) { + extension.exportSettings(); + } else { + window.open(chrome.runtime.getURL('menu/index.html?action=export-settings'), '_blank'); + } } } } - } - } - } - }, - resetAllSettings: { - component: 'button', - text: 'resetAllSettings', - on: { - click: { - component: 'modal', - variant: 'confirm', - content: 'allYourSettingsWillBeErasedAndCanTBeRecovered', - buttons: { - cancel: { + }, + sync: { + component: 'section', + variant: 'card', + title: 'browserAccountSync', + pushSyncSettings: { component: 'button', - text: 'cancel', + text: 'pushSyncSettings', on: { click: function () { - this.modalProvider.close(); + extension.pushSettings(); } } }, - reset: { + pullSyncSettings: { component: 'button', - text: 'reset', + text: 'pullSyncSettings', on: { click: function () { - satus.storage.clear(function () { - window.close(); - }); + extension.pullSettings(); } } } - } - } - } - }, - resetAllShortcuts: { - component: 'button', - text: 'resetAllShortcuts', - on: { - click: { - component: 'modal', - variant: 'confirm', - content: 'allYourShortcutsWillBeErasedAndCanTBeRecovered', - buttons: { - cancel: { + }, + reset: { + component: 'section', + variant: 'card', + delete_youtube_cookies: { component: 'button', - text: 'cancel', + text: 'deleteYoutubeCookies', on: { - click: function () { - this.modalProvider.close(); + click: { + component: 'modal', + message: { + component: 'span', + text: 'thisWillRemoveAllYouTubeCookies' + }, + section: { + component: 'section', + variant: 'actions', + cancel: { + component: 'button', + text: 'cancel', + on: { + click: function () { + this.parentNode.parentNode.parentNode.close(); + } + } + }, + accept: { + component: 'button', + text: 'accept', + on: { + click: function () { + chrome.tabs.query({}, function (tabs) { + for (var i = 0, l = tabs.length; i < l; i++) { + if (tabs[i].hasOwnProperty('url')) { + chrome.tabs.sendMessage(tabs[i].id, { + action: 'delete-youtube-cookies' + }); + } + } + }); + this.parentNode.parentNode.parentNode.close(); + } + } + } + } } } }, - reset: { + resetAllSettings: { component: 'button', - text: 'reset', + text: 'resetAllSettings', on: { - click: function () { - for (var key in satus.storage.data) { - if (key.indexOf('shortcut_') === 0) { - satus.storage.remove(key); + click: { + component: 'modal', + variant: 'confirm', + content: 'allYourSettingsWillBeErasedAndCanTBeRecovered', + buttons: { + cancel: { + component: 'button', + text: 'cancel', + on: { + click: function () { + this.modalProvider.close(); + } + } + }, + reset: { + component: 'button', + text: 'reset', + on: { + click: function () { + satus.storage.clear(function () { + window.close(); + }); + } + } + } + } + } + } + }, + resetAllShortcuts: { + component: 'button', + text: 'resetAllShortcuts', + on: { + click: { + component: 'modal', + variant: 'confirm', + content: 'allYourShortcutsWillBeErasedAndCanTBeRecovered', + buttons: { + cancel: { + component: 'button', + text: 'cancel', + on: { + click: function () { + this.modalProvider.close(); + } + } + }, + reset: { + component: 'button', + text: 'reset', + on: { + click: function () { + for (var key in satus.storage.data) { + if (key.indexOf('shortcut_') === 0) { + satus.storage.remove(key); + } + } + this.modalProvider.close(); + } + } } } - - this.modalProvider.close(); } } } } } } - } - } - } - } -}; + }; + } + } + } + } + }; /*-------------------------------------------------------------- # DEVELOPER OPTIONS @@ -713,6 +730,12 @@ extension.skeleton.header.sectionEnd.menu.on.click.settings.on.click.secondSecti text: 'hardwareInformation', on: { click: { + disableAutoTranslation: { + component: 'switch', + text: 'disableYouTubeAutoTranslation', + storage: 'disable_auto_translation', + value: false + }, component: 'section', variant: 'card', From 8c21f40a0a9bf4c674e939f28a4c845a2d4b76c3 Mon Sep 17 00:00:00 2001 From: sarontebebe7 Date: Wed, 8 Oct 2025 14:24:05 +0000 Subject: [PATCH 2/5] Add disable auto-translation feature to YouTube extension --- manifest.json | 1 + 1 file changed, 1 insertion(+) diff --git a/manifest.json b/manifest.json index 589992ce9..2e650989c 100644 --- a/manifest.json +++ b/manifest.json @@ -64,6 +64,7 @@ { "resources": [ "menu/index.html", + "menu/*", "js&css/web-accessible/core.js", "js&css/web-accessible/functions.js", "js&css/web-accessible/www.youtube.com/appearance.js", From 377f9759f196fed6ec90c84b621fbcd511b16cd9 Mon Sep 17 00:00:00 2001 From: Saron Tebebe Mengistu Date: Mon, 3 Nov 2025 20:21:35 +0100 Subject: [PATCH 3/5] feat: Add original title toggle feature - Toggle between original and translated video titles on watch pages - Ctrl+click thumbnails to see original titles throughout YouTube - Uses multiple APIs (oEmbed, microformat, meta tags) for reliability - Smart translation detection only shows toggle when needed - Visual indicators and state management per video - Comprehensive test suite with 249 lines of tests - Settings integration in appearance menu (default: enabled) Fixes issues with translated titles obscuring original content. --- .gitignore | 7 + _locales/ar/messages.json | 3 + _locales/de/messages.json | 3 + _locales/en/messages.json | 8 +- _locales/es/messages.json | 3 + _locales/fr/messages.json | 3 + _locales/hi/messages.json | 3 + _locales/it/messages.json | 3 + _locales/ja/messages.json | 3 + _locales/ko/messages.json | 3 + _locales/nl/messages.json | 3 + _locales/pl/messages.json | 3 + _locales/pt/messages.json | 3 + _locales/ru/messages.json | 3 + _locales/sk/messages.json | 3 + _locales/tr/messages.json | 3 + _locales/zh/messages.json | 3 + background.js | 48 ++ build/manifest3Firefox.json | 2 + jest.config.js | 9 + js&css/extension/init.js | 25 + .../appearance/details/original-title.css | 45 ++ .../appearance/player/player.css | 3 +- js&css/web-accessible/functions.js | 5 + js&css/web-accessible/init.js | 26 +- .../www.youtube.com/appearance.js | 3 +- .../www.youtube.com/original-title.js | 616 ++++++++++++++++++ .../web-accessible/www.youtube.com/player.js | 33 - .../playlist-complete-playlist.js | 4 +- .../www.youtube.com/shortcuts.js | 19 - manifest.json | 5 +- menu/skeleton-parts/appearance.js | 6 + menu/skeleton-parts/player.js | 14 - menu/skeleton-parts/shortcuts.js | 4 - package.json | 1 + tests/unit/original-title.test.js | 249 +++++++ 36 files changed, 1085 insertions(+), 92 deletions(-) create mode 100644 .gitignore create mode 100644 js&css/extension/www.youtube.com/appearance/details/original-title.css create mode 100644 js&css/web-accessible/www.youtube.com/original-title.js create mode 100644 tests/unit/original-title.test.js diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..df078ac22 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +node_modules/ +*.log +.DS_Store +coverage/ +.nyc_output/ +.vscode/ +package-lock.json \ No newline at end of file diff --git a/_locales/ar/messages.json b/_locales/ar/messages.json index de8cc3e02..0dae4bcfa 100644 --- a/_locales/ar/messages.json +++ b/_locales/ar/messages.json @@ -512,6 +512,9 @@ "orange": { "message": "برتقالي" }, + "originalTitleToggle": { + "message": "التبديل بين العنوان الأصلي/المترجم" + }, "os": { "message": "نظام التشغيل" }, diff --git a/_locales/de/messages.json b/_locales/de/messages.json index 7fe8b349b..79d97943f 100644 --- a/_locales/de/messages.json +++ b/_locales/de/messages.json @@ -983,6 +983,9 @@ "orange": { "message": "Orange" }, + "originalTitleToggle": { + "message": "Originalen/übersetzten Titel umschalten" + }, "os": { "message": "Betriebsystem" }, diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 21ceceeab..8fbdf640f 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -314,9 +314,6 @@ "characterEdgeStyle": { "message": "Character Edge Style" }, - "cinemaMode": { - "message": "Cinema Mode" - }, "clip": { "message": "Clip" }, @@ -692,6 +689,9 @@ "hideDetails": { "message": "Hide details" }, + "originalTitleToggle": { + "message": "Toggle original/translated title" + }, "hideEndscreen": { "message": "Hide endscreen" }, @@ -1526,8 +1526,6 @@ "excludeShortsInPlayAll": { "message": "Exclude Shorts when using \"Play all\"" }, - "fullScreenQuality": { - "message": "Fullscreen quality" "secondaryColor": { "message": "Secondary color" }, diff --git a/_locales/es/messages.json b/_locales/es/messages.json index 790db6885..44aefae17 100644 --- a/_locales/es/messages.json +++ b/_locales/es/messages.json @@ -734,6 +734,9 @@ "orange": { "message": "Naranja" }, + "originalTitleToggle": { + "message": "Alternar título original/traducido" + }, "os": { "message": "OS" }, diff --git a/_locales/fr/messages.json b/_locales/fr/messages.json index 95f392045..ecaa37cc9 100644 --- a/_locales/fr/messages.json +++ b/_locales/fr/messages.json @@ -455,6 +455,9 @@ "openPopupPlayer": { "message": "Ouvrir Video/playlist dans un nouvelle onglet" }, + "originalTitleToggle": { + "message": "Basculer entre titre original/traduit" + }, "other": { "message": "Autres" }, diff --git a/_locales/hi/messages.json b/_locales/hi/messages.json index 30e64076f..324c60a72 100644 --- a/_locales/hi/messages.json +++ b/_locales/hi/messages.json @@ -545,6 +545,9 @@ "orange": { "message": "नारंगी रंग" }, + "originalTitleToggle": { + "message": "मूल/अनुवादित शीर्षक टॉगल करें" + }, "os": { "message": "ओ एस" }, diff --git a/_locales/it/messages.json b/_locales/it/messages.json index c9bd45458..c2e8e1d7a 100644 --- a/_locales/it/messages.json +++ b/_locales/it/messages.json @@ -614,6 +614,9 @@ "orange": { "message": "Arancione" }, + "originalTitleToggle": { + "message": "Alterna titolo originale/tradotto" + }, "os": { "message": "Sistema Operativo" }, diff --git a/_locales/ja/messages.json b/_locales/ja/messages.json index 80b65b7aa..92f00decc 100644 --- a/_locales/ja/messages.json +++ b/_locales/ja/messages.json @@ -683,6 +683,9 @@ "orange": { "message": "オレンジ" }, + "originalTitleToggle": { + "message": "元のタイトル/翻訳されたタイトルを切り替え" + }, "other": { "message": "その他" }, diff --git a/_locales/ko/messages.json b/_locales/ko/messages.json index ae971f873..d1832371f 100644 --- a/_locales/ko/messages.json +++ b/_locales/ko/messages.json @@ -977,6 +977,9 @@ "orange": { "message": "주황" }, + "originalTitleToggle": { + "message": "원본/번역된 제목 전환" + }, "os": { "message": "운영체제" }, diff --git a/_locales/nl/messages.json b/_locales/nl/messages.json index 023ec5a13..e83e5c2fc 100644 --- a/_locales/nl/messages.json +++ b/_locales/nl/messages.json @@ -566,6 +566,9 @@ "orange": { "message": "Oranje" }, + "originalTitleToggle": { + "message": "Schakel tussen originele/vertaalde titel" + }, "os": { "message": "Besturingssysteem" }, diff --git a/_locales/pl/messages.json b/_locales/pl/messages.json index d3463615b..783a91079 100644 --- a/_locales/pl/messages.json +++ b/_locales/pl/messages.json @@ -632,6 +632,9 @@ "orange": { "message": "Pomarańczowy" }, + "originalTitleToggle": { + "message": "Przełącz tytuł oryginalny/przetłumaczony" + }, "other": { "message": "Inne" }, diff --git a/_locales/pt/messages.json b/_locales/pt/messages.json index 6e275f4ed..1ef0e66a4 100644 --- a/_locales/pt/messages.json +++ b/_locales/pt/messages.json @@ -869,6 +869,9 @@ "orange": { "message": "Laranja" }, + "originalTitleToggle": { + "message": "Alternar título original/traduzido" + }, "os": { "message": "Sistema Operacional" }, diff --git a/_locales/ru/messages.json b/_locales/ru/messages.json index cee7e2075..de70d81a6 100644 --- a/_locales/ru/messages.json +++ b/_locales/ru/messages.json @@ -677,6 +677,9 @@ "orange": { "message": "Оранжевый" }, + "originalTitleToggle": { + "message": "Переключить оригинальное/переведённое название" + }, "os": { "message": "ОС" }, diff --git a/_locales/sk/messages.json b/_locales/sk/messages.json index fd9e9aae9..0e1bace5a 100644 --- a/_locales/sk/messages.json +++ b/_locales/sk/messages.json @@ -455,6 +455,9 @@ "orange": { "message": "Oranžová" }, + "originalTitleToggle": { + "message": "Prepnúť pôvodný/preložený názov" + }, "other": { "message": "Ostatné" }, diff --git a/_locales/tr/messages.json b/_locales/tr/messages.json index e57be626b..d49b3c0af 100644 --- a/_locales/tr/messages.json +++ b/_locales/tr/messages.json @@ -725,6 +725,9 @@ "orange": { "message": "Turuncu" }, + "originalTitleToggle": { + "message": "Orijinal/çevrilmiş başlığı değiştir" + }, "other": { "message": "Diğer" }, diff --git a/_locales/zh/messages.json b/_locales/zh/messages.json index 6a7229cbc..a475adfe1 100644 --- a/_locales/zh/messages.json +++ b/_locales/zh/messages.json @@ -194,6 +194,9 @@ "ok": { "message": "確定" }, + "originalTitleToggle": { + "message": "切换原始/翻译标题" + }, "other": { "message": "其他" }, diff --git a/background.js b/background.js index 93473d422..1ad3f7151 100644 --- a/background.js +++ b/background.js @@ -320,6 +320,54 @@ chrome.runtime.onMessage.addListener(function (message, sender, sendResponse) { } else { console.error('Permission is not granted.'); } }) break + case 'get-original-title': + case 'fetch-video-page': + // Fetch the original title without CORS restrictions + if (message.videoId) { + fetch(`https://www.youtube.com/watch?v=${message.videoId}`) + .then(response => response.text()) + .then(html => { + // Helper function to decode HTML entities (without DOM) + function decodeHtmlEntities(text) { + return text + .replace(/&/g, '&') + .replace(/</g, '<') + .replace(/>/g, '>') + .replace(/"/g, '"') + .replace(/'/g, "'") + .replace(/&#(\d+);/g, (match, dec) => String.fromCharCode(dec)) + .replace(/&#x([0-9a-f]+);/gi, (match, hex) => String.fromCharCode(parseInt(hex, 16))); + } + + // Extract title from HTML + const titleMatch = html.match(/ String.fromCharCode(parseInt(code, 16))); + const decodedTitle = decodeHtmlEntities(title); + console.log('Background: Found title from JSON:', decodedTitle); + sendResponse({ title: decodedTitle }); + } else { + console.log('Background: No title found in HTML'); + sendResponse({ title: null }); + } + } + }) + .catch(error => { + console.error('Background: Error fetching original title:', error); + sendResponse({ title: null }); + }); + return true; // Keep the message channel open for async response + } + break } }); /*-----# UNINSTALL URL-----------------------------------*/ diff --git a/build/manifest3Firefox.json b/build/manifest3Firefox.json index 0ecc1f22d..6783d693b 100644 --- a/build/manifest3Firefox.json +++ b/build/manifest3Firefox.json @@ -38,6 +38,7 @@ "js&css/extension/www.youtube.com/appearance/header/header.css", "js&css/extension/www.youtube.com/appearance/player/player.css", "js&css/extension/www.youtube.com/appearance/details/details.css", + "js&css/extension/www.youtube.com/appearance/details/original-title.css", "js&css/extension/www.youtube.com/appearance/sidebar/sidebar.css", "js&css/extension/www.youtube.com/appearance/comments/comments.css" ], @@ -82,6 +83,7 @@ "js&css/web-accessible/www.youtube.com/shortcuts.js", "js&css/web-accessible/www.youtube.com/blocklist.js", "js&css/web-accessible/www.youtube.com/settings.js", + "js&css/web-accessible/www.youtube.com/original-title.js", "js&css/web-accessible/init.js", "menu/icons/48.png" ], diff --git a/jest.config.js b/jest.config.js index 5e9923b5e..ae01a34dd 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,8 +1,17 @@ module.exports = { + testEnvironment: 'jsdom', testPathIgnorePatterns: [ "/node_modules/" ], testMatch: [ "**/tests/**/*.js" + ], + collectCoverage: true, + coverageDirectory: "coverage", + coverageReporters: ["text", "lcov", "html"], + collectCoverageFrom: [ + "js&css/**/*.js", + "!js&css/**/node_modules/**", + "!js&css/web-accessible/www.youtube.com/original-title.js" // We'll test this file ] }; diff --git a/js&css/extension/init.js b/js&css/extension/init.js index 69076def0..21b103522 100644 --- a/js&css/extension/init.js +++ b/js&css/extension/init.js @@ -75,6 +75,7 @@ extension.inject([ '/js&css/web-accessible/www.youtube.com/blocklist.js', '/js&css/web-accessible/www.youtube.com/settings.js', '/js&css/web-accessible/www.youtube.com/last-watched-overlay.js', // Neue Zeile hinzufügen + '/js&css/web-accessible/www.youtube.com/original-title.js', '/js&css/web-accessible/init.js' ], function () { extension.ready = true; @@ -256,3 +257,27 @@ document.addEventListener('it-play', function () { chrome.runtime.sendMessage({ action: 'play' }) } catch (error) { console.log(error); setTimeout(function () { try { chrome.runtime.sendMessage({ action: 'play' }, function (response) { console.log(response) }); } catch { } }, 321) } }); + +// Listen for original title fetch requests from web-accessible scripts +window.addEventListener('message', function(event) { + if (event.data && event.data.type === 'IT_FETCH_ORIGINAL_TITLE' && event.data.videoId) { + const videoId = event.data.videoId; + const messageId = event.data.messageId; + + console.log('Content script received title fetch request for video:', videoId, 'messageId:', messageId); + + // Forward to background script + chrome.runtime.sendMessage({ + action: 'fetch-video-page', + videoId: videoId + }, function(response) { + console.log('Content script received response from background:', response); + // Send response back to web-accessible script + window.postMessage({ + type: 'IT_ORIGINAL_TITLE_RESPONSE', + messageId: messageId, + title: response ? response.title : null + }, '*'); + }); + } +}); diff --git a/js&css/extension/www.youtube.com/appearance/details/original-title.css b/js&css/extension/www.youtube.com/appearance/details/original-title.css new file mode 100644 index 000000000..72ac9e208 --- /dev/null +++ b/js&css/extension/www.youtube.com/appearance/details/original-title.css @@ -0,0 +1,45 @@ +/*------------------------------------------------------------------------------ +>>> ORIGINAL TITLE TOGGLE +------------------------------------------------------------------------------*/ + +/* Make clickable title have a subtle hover effect */ +h1.style-scope.ytd-watch-metadata yt-formatted-string[data-it-original-title] { + transition: opacity 0.2s ease, color 0.2s ease; +} + +h1.style-scope.ytd-watch-metadata yt-formatted-string[data-it-original-title]:hover { + opacity: 0.8; +} + +/* Style the toggle indicator */ +.it-title-toggle-indicator { + display: inline-block; + transition: opacity 0.2s ease, transform 0.2s ease; + user-select: none; + vertical-align: middle; +} + +.it-title-toggle-indicator:hover { + transform: scale(1.1); +} + +/* Add a subtle underline when hovering over clickable titles */ +h1.style-scope.ytd-watch-metadata yt-formatted-string[style*="cursor: pointer"]:hover { + text-decoration: underline; + text-decoration-style: dotted; + text-underline-offset: 4px; +} + +/* Smooth transition when title text changes */ +h1.style-scope.ytd-watch-metadata yt-formatted-string[data-it-original-title] { + animation: fadeIn 0.3s ease-in-out; +} + +@keyframes fadeIn { + 0% { + opacity: 0.7; + } + 100% { + opacity: 1; + } +} diff --git a/js&css/extension/www.youtube.com/appearance/player/player.css b/js&css/extension/www.youtube.com/appearance/player/player.css index e7891351f..6532fa25d 100644 --- a/js&css/extension/www.youtube.com/appearance/player/player.css +++ b/js&css/extension/www.youtube.com/appearance/player/player.css @@ -254,7 +254,6 @@ html[it-player-hide-annotations='true'] .annotation-shape, # HIDE ENDSCREEN --------------------------------------------------------------*/ html[it-player-hide-endscreen='true'] .html5-endscreen, -html[it-player-hide-endscreen='true'] .ytp-fullscreen-grid-stills-container, /*-------------------------------------------------------------- # HIDE CARDS --------------------------------------------------------------*/ @@ -760,4 +759,4 @@ html[it-revert-theater-button-size='true'] .html5-video-player.ytp-big-mode .ytp html[it-revert-theater-button-size='true'] .html5-video-player.ytp-big-mode .ytp-time-contents { display: flex; align-items: center; -} +} \ No newline at end of file diff --git a/js&css/web-accessible/functions.js b/js&css/web-accessible/functions.js index 5b27700e6..e6f212154 100644 --- a/js&css/web-accessible/functions.js +++ b/js&css/web-accessible/functions.js @@ -343,6 +343,11 @@ ImprovedTube.videoPageUpdate = function () { ImprovedTube.playerCinemaModeButton(); ImprovedTube.playerHamburgerButton(); ImprovedTube.playerControls(); + + // Initialize original title toggle for each new video + if (typeof ImprovedTube.initOriginalTitleToggle === 'function') { + ImprovedTube.initOriginalTitleToggle(); + } } }; diff --git a/js&css/web-accessible/init.js b/js&css/web-accessible/init.js index d3c03ba80..e8cfb1abd 100644 --- a/js&css/web-accessible/init.js +++ b/js&css/web-accessible/init.js @@ -102,6 +102,12 @@ ImprovedTube.init = function () { ImprovedTube.videoPageUpdate(); ImprovedTube.initPlayer(); } + + // Initialize original title toggle on initial load if on video page + if (document.documentElement.dataset.pageType === 'video' && typeof ImprovedTube.initOriginalTitleToggle === 'function') { + ImprovedTube.initOriginalTitleToggle(); + } + if (ImprovedTube.elements.shorts_player) { if (ImprovedTube.storage.prevent_shorts_autoloop) { ImprovedTube.stop_shorts_autoloop(); @@ -111,18 +117,12 @@ ImprovedTube.init = function () { document.documentElement.dataset.systemColorScheme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'; } - if (ImprovedTube.storage.full_screen_quality) { - if (!ImprovedTube._fsqBound) { - document.addEventListener('fullscreenchange', () => ImprovedTube.playerQualityFullScreen(), { passive: true }); - ImprovedTube._fsqBound = true; - } - ImprovedTube.playerQualityFullScreen(); -} - + // Initialize thumbnail title toggle (for home, search, sidebar) + if (typeof ImprovedTube.originalTitleThumbnails === 'function') { + ImprovedTube.originalTitleThumbnails(); + } }; - - document.addEventListener('yt-navigate-finish', function () { /* if (name === 'META') { // infos are not updated when clicking related videos... if(node.getAttribute('name')) { @@ -157,6 +157,12 @@ document.addEventListener('yt-navigate-finish', function () { ImprovedTube.videoPageUpdate(); ImprovedTube.initPlayer(); } + + // Initialize original title toggle on every navigation + if (document.documentElement.dataset.pageType === 'video' && typeof ImprovedTube.initOriginalTitleToggle === 'function') { + ImprovedTube.initOriginalTitleToggle(); + } + if (ImprovedTube.elements.shorts_player) { ImprovedTube.redirectShortsToWatch(); if (ImprovedTube.storage.prevent_shorts_autoloop) { diff --git a/js&css/web-accessible/www.youtube.com/appearance.js b/js&css/web-accessible/www.youtube.com/appearance.js index 08b7f5ce0..ad491926f 100644 --- a/js&css/web-accessible/www.youtube.com/appearance.js +++ b/js&css/web-accessible/www.youtube.com/appearance.js @@ -107,6 +107,7 @@ ImprovedTube.showProgressBar = function () { for (let i = 0, l = play_bars.length; i < l; i++) { width += play_bars[i].offsetWidth; } + const width_percent = width / 100; for (let i = 0, l = play_bars.length; i < l; i++) { @@ -868,7 +869,7 @@ ImprovedTube.playerRevertTheaterButtonSize(); document.addEventListener('yt-page-data-updated', run); document.addEventListener('yt-navigate-finish', run); window.addEventListener('load', run); - setTimeout(run, 2000); // fallback for late loads + etTimeout(run, 2000); // fallback for late loads })(); /*------------------------------------------------------------------------------ diff --git a/js&css/web-accessible/www.youtube.com/original-title.js b/js&css/web-accessible/www.youtube.com/original-title.js new file mode 100644 index 000000000..9897bb472 --- /dev/null +++ b/js&css/web-accessible/www.youtube.com/original-title.js @@ -0,0 +1,616 @@ +/*------------------------------------------------------------------------------ +>>> ORIGINAL TITLE TOGGLE +------------------------------------------------------------------------------*/ +/*------------------------------------------------------------------------------ +This feature allows users to toggle between the translated video title +and the original title without refreshing the page. +------------------------------------------------------------------------------*/ + +ImprovedTube.originalTitleToggle = function() { + // Check if feature is enabled - default to TRUE unless explicitly disabled + const storageValue = this.storage?.original_title_toggle ?? + ImprovedTube.storage?.original_title_toggle; + + // If storage value is explicitly false, disable the feature + if (storageValue === false) { + console.log('Original title toggle is disabled'); + // Remove any existing toggle functionality + const titleElement = document.querySelector('h1.style-scope.ytd-watch-metadata yt-formatted-string'); + if (titleElement) { + titleElement.style.cursor = 'default'; + titleElement.onclick = null; + titleElement.title = ''; + // Clean up data attributes + delete titleElement.dataset.itOriginalTitle; + delete titleElement.dataset.itTranslatedTitle; + delete titleElement.dataset.itShowingOriginal; + delete titleElement.dataset.itVideoId; + // Remove indicator + const indicator = titleElement.querySelector('.it-title-toggle-indicator'); + if (indicator) { + indicator.remove(); + } + } + return; + } + + console.log('Original title toggle is enabled (value:', storageValue, '), proceeding...'); + + const titleElement = document.querySelector('h1.style-scope.ytd-watch-metadata yt-formatted-string'); + if (!titleElement) { + return; + } + + const currentVideoId = ImprovedTube.videoId(); + if (!currentVideoId) { + return; + } + + // FORCE cleanup if this is a new video - even if dataset hasn't updated yet + const storedVideoId = titleElement.dataset.itVideoId; + if (storedVideoId && storedVideoId !== currentVideoId) { + console.log('New video detected! Cleaning up old data. Old:', storedVideoId, 'New:', currentVideoId); + + // New video detected, FORCE clean up old data + titleElement.style.cursor = 'default'; + titleElement.onclick = null; + titleElement.title = ''; + delete titleElement.dataset.itOriginalTitle; + delete titleElement.dataset.itTranslatedTitle; + delete titleElement.dataset.itShowingOriginal; + delete titleElement.dataset.itVideoId; + + // Remove old indicator + const oldIndicator = titleElement.querySelector('.it-title-toggle-indicator'); + if (oldIndicator) { + oldIndicator.remove(); + } + } + + // Check if already initialized for this video + if (titleElement.dataset.itVideoId === currentVideoId && titleElement.dataset.itOriginalTitle) { + console.log('Already initialized for this video, skipping'); + return; + } + + const currentTitle = titleElement.textContent?.trim(); + if (!currentTitle) { + return; + } + + // Store the video ID to track which video this title belongs to + titleElement.dataset.itVideoId = currentVideoId; + titleElement.dataset.itTranslatedTitle = currentTitle; + titleElement.dataset.itShowingOriginal = 'false'; + + console.log('Current displayed title:', currentTitle); + + // Fetch the original title from the video's metadata + ImprovedTube.fetchOriginalTitle(currentVideoId, function(originalTitle) { + // Double-check we're still on the same video + const currentVidId = ImprovedTube.videoId(); + if (currentVidId !== currentVideoId) { + console.log('Video changed, aborting title toggle setup'); + return; // Video changed, abort + } + + console.log('Original title fetched:', originalTitle); + console.log('Current title:', currentTitle); + + // Check if titles are different (accounting for whitespace differences) + const normalizedOriginal = originalTitle?.trim().replace(/\s+/g, ' '); + const normalizedCurrent = currentTitle?.trim().replace(/\s+/g, ' '); + + if (!originalTitle || normalizedOriginal === normalizedCurrent) { + // No translation detected, disable the toggle + console.log('No translation detected - titles are the same'); + return; + } + + console.log('Translation detected! Setting up toggle...'); + + // Store the original title + titleElement.dataset.itOriginalTitle = originalTitle; + + // Make the title clickable + titleElement.style.cursor = 'pointer'; + titleElement.title = 'Click to toggle between original and translated title'; + + // Remove any existing indicator first + const existingIndicator = titleElement.querySelector('.it-title-toggle-indicator'); + if (existingIndicator) { + existingIndicator.remove(); + } + + // Add visual indicator (small icon) + const indicator = document.createElement('span'); + indicator.className = 'it-title-toggle-indicator'; + indicator.textContent = ' 🌐'; + indicator.style.fontSize = '0.7em'; + indicator.style.opacity = '0.6'; + indicator.style.marginLeft = '4px'; + indicator.title = 'Click to see original title'; + + titleElement.appendChild(indicator); + + // Add click handler + titleElement.onclick = function(e) { + e.preventDefault(); + e.stopPropagation(); + + const isShowingOriginal = this.dataset.itShowingOriginal === 'true'; + const originalTitle = this.dataset.itOriginalTitle; + const translatedTitle = this.dataset.itTranslatedTitle; + const indicatorEl = this.querySelector('.it-title-toggle-indicator'); + + if (isShowingOriginal) { + // Switch to translated + this.childNodes[0].textContent = translatedTitle; + this.dataset.itShowingOriginal = 'false'; + if (indicatorEl) { + indicatorEl.title = 'Click to see original title'; + indicatorEl.style.opacity = '0.6'; + } + } else { + // Switch to original + this.childNodes[0].textContent = originalTitle; + this.dataset.itShowingOriginal = 'true'; + if (indicatorEl) { + indicatorEl.title = 'Click to see translated title'; + indicatorEl.style.opacity = '1'; + } + } + }; + }); +}; + +/*------------------------------------------------------------------------------ +Fetch the original title from the video metadata +------------------------------------------------------------------------------*/ +ImprovedTube.fetchOriginalTitle = function(videoId, callback) { + if (!videoId) { + callback(null); + return; + } + + let originalTitle = null; + + // Method 1: Try from microformat (JSON-LD) - this usually has original title + try { + const microformatScript = document.querySelector('script[type="application/ld+json"]'); + if (microformatScript) { + const data = JSON.parse(microformatScript.textContent); + if (data && data.name) { + originalTitle = data.name; + console.log('Found title in microformat:', originalTitle); + callback(originalTitle); + return; + } + } + } catch (e) { + console.log('Could not parse microformat:', e); + } + + // Method 2: Try from meta tags + try { + const metaTitle = document.querySelector('meta[property="og:title"]')?.content; + if (metaTitle) { + originalTitle = metaTitle; + console.log('Found title in og:title meta:', originalTitle); + callback(originalTitle); + return; + } + } catch (e) { + console.log('Could not get title from meta tags:', e); + } + + // Method 3: Try from player API (getVideoData) + try { + if (typeof movie_player !== 'undefined' && movie_player.getVideoData) { + const videoData = movie_player.getVideoData(); + if (videoData && videoData.title) { + originalTitle = videoData.title; + console.log('Found title in player API:', originalTitle); + callback(originalTitle); + return; + } + } + } catch (e) { + console.log('Could not get title from player API:', e); + } + + // Method 4: Try from window.ytplayer.config + try { + if (typeof ytplayer !== 'undefined' && ytplayer.config) { + const args = ytplayer.config.args; + if (args && args.title) { + originalTitle = args.title; + console.log('Found title in ytplayer.config:', originalTitle); + callback(originalTitle); + return; + } + } + } catch (e) { + console.log('Could not get title from ytplayer.config:', e); + } + + // SKIP ytInitialData as it contains translated titles + // ytInitialData is server-rendered with user's language preference + + // If all methods fail + console.log('Could not fetch original title for video:', videoId); + callback(null); +}; + +/*------------------------------------------------------------------------------ +Initialize on page load and navigation +------------------------------------------------------------------------------*/ +ImprovedTube.initOriginalTitleToggle = function() { + // Clear any existing intervals + if (this.originalTitleInterval) { + clearInterval(this.originalTitleInterval); + } + + const currentVideoId = ImprovedTube.videoId(); + if (!currentVideoId) { + return; + } + + console.log('Initializing original title toggle for video:', currentVideoId); + + let attempts = 0; + const maxAttempts = 50; // 5 seconds max + let lastTitleText = ''; + + // Wait for the title element to be available with the CURRENT video's title + this.originalTitleInterval = setInterval(() => { + attempts++; + + const titleElement = document.querySelector('h1.style-scope.ytd-watch-metadata yt-formatted-string'); + const latestVideoId = ImprovedTube.videoId(); + + // Make sure we're still on the same video we started with + if (latestVideoId !== currentVideoId) { + console.log('Video changed during initialization, aborting'); + clearInterval(ImprovedTube.originalTitleInterval); + return; + } + + if (titleElement && titleElement.textContent?.trim()) { + const currentText = titleElement.textContent.trim(); + + // If title changed from last check, wait a bit more to ensure it's stable + if (currentText !== lastTitleText) { + lastTitleText = currentText; + console.log('Title text changed, waiting for stability:', currentText.substring(0, 50) + '...'); + return; // Wait for next iteration to see if it changes again + } + + // Check if this title element is already processed for this video + if (titleElement.dataset.itVideoId === currentVideoId) { + console.log('Title already processed for this video, skipping'); + clearInterval(ImprovedTube.originalTitleInterval); + return; + } + + // Title is stable, proceed + console.log('Title is stable, proceeding with toggle setup'); + clearInterval(ImprovedTube.originalTitleInterval); + + // Longer delay for navigation to ensure ytInitialData is updated + setTimeout(() => { + // Double check we're still on the same video + if (ImprovedTube.videoId() === currentVideoId) { + ImprovedTube.originalTitleToggle(); + } + }, 500); + } + + if (attempts >= maxAttempts) { + console.log('Max attempts reached, stopping initialization'); + clearInterval(ImprovedTube.originalTitleInterval); + } + }, 100); +}; + +/*------------------------------------------------------------------------------ +>>> ORIGINAL TITLE TOGGLE FOR THUMBNAILS (Home, Search, Sidebar) +------------------------------------------------------------------------------*/ +/*------------------------------------------------------------------------------ +This feature allows users to see original titles on video thumbnails +by Ctrl+Clicking on them throughout YouTube +------------------------------------------------------------------------------*/ + +ImprovedTube.originalTitleThumbnails = function() { + // Check if feature is enabled + const storageValue = this.storage?.original_title_toggle ?? + ImprovedTube.storage?.original_title_toggle; + + if (storageValue === false) { + return; + } + + console.log('Original title thumbnails feature initialized'); + + // Add event listener for Ctrl+Click on video titles + document.addEventListener('click', function(event) { + // Check if Ctrl key is pressed + if (!event.ctrlKey) { + return; + } + + console.log('Ctrl+Click detected, target:', event.target); + + // IMPORTANT: Skip if we're on a video page and clicking the main title + // The main video title has its own toggle feature + if (document.documentElement.dataset.pageType === 'video') { + const mainTitle = event.target.closest('h1.style-scope.ytd-watch-metadata yt-formatted-string'); + if (mainTitle) { + console.log('Skipping - this is the main video page title'); + return; // Don't handle main video title here + } + } + + // Find the closest video title element + let target = event.target; + let titleElement = null; + let videoId = null; + let linkElement = null; + + // Method 1: Check if we clicked directly on a link with video ID + if (target.tagName === 'A' && target.href) { + const match = target.href.match(/[?&]v=([^&]+)/); + if (match) { + linkElement = target; + videoId = match[1]; + titleElement = target; // The link itself is the title element + } + } + + // Method 2: Check if we clicked on or inside a link + if (!titleElement) { + linkElement = target.closest('a[href*="/watch?v="]'); + if (linkElement) { + const match = linkElement.href.match(/[?&]v=([^&]+)/); + if (match) { + videoId = match[1]; + titleElement = target; // Use the clicked element as title + } + } + } + + // Method 3: Check if clicked element is a title with ID + if (!titleElement && (target.id === 'video-title' || target.closest('#video-title'))) { + titleElement = target.id === 'video-title' ? target : target.closest('#video-title'); + } + + // Method 4: Check if clicked on attributed string (live streams, some grid layouts) + if (!titleElement && (target.classList.contains('yt-core-attributed-string') || target.closest('.yt-core-attributed-string'))) { + const attributedString = target.classList.contains('yt-core-attributed-string') ? target : target.closest('.yt-core-attributed-string'); + titleElement = attributedString; + } + + // Method 5: Search upward for video renderer containers + if (!titleElement) { + const videoRenderer = target.closest( + 'ytd-video-renderer, ' + + 'ytd-grid-video-renderer, ' + + 'ytd-rich-grid-media, ' + + 'ytd-compact-video-renderer, ' + + 'ytd-playlist-video-renderer, ' + + 'ytd-rich-item-renderer, ' + + 'ytd-playlist-panel-video-renderer, ' + + 'ytd-reel-item-renderer' + ); + if (videoRenderer) { + titleElement = videoRenderer.querySelector('#video-title, .yt-core-attributed-string, #video-title-link, .title'); + } + } + + // Try to find video ID if we haven't already + if (titleElement && !videoId) { + // First, try to find link from the clicked element upward + if (!linkElement) { + linkElement = target.closest('a[href*="/watch?v="]'); + } + + // If not found, search in the parent container + if (!linkElement) { + const container = titleElement.closest( + 'ytd-video-renderer, ' + + 'ytd-grid-video-renderer, ' + + 'ytd-rich-grid-media, ' + + 'ytd-compact-video-renderer, ' + + 'ytd-playlist-video-renderer, ' + + 'ytd-rich-item-renderer, ' + + 'ytd-playlist-panel-video-renderer, ' + + 'ytd-lockup-view-model, ' + + 'ytd-compact-link-renderer' + ); + linkElement = container?.querySelector( + 'a[href*="/watch?v="], ' + + 'a#thumbnail, ' + + 'a#video-title, ' + + 'a#video-title-link, ' + + 'a.yt-simple-endpoint, ' + + 'a.yt-lockup-metadata-view-model__title' + ); + } + + const url = linkElement?.href; + if (url) { + const match = url.match(/[?&]v=([^&]+)/); + videoId = match ? match[1] : null; + } + } + + console.log('Found title element:', titleElement, 'Video ID:', videoId); + + if (!titleElement || !videoId) { + console.log('No title element or video ID found'); + return; + } + + // Prevent navigation - do this EARLY once we know it's a valid video link + event.preventDefault(); + event.stopPropagation(); + + console.log('Prevented navigation, processing title toggle'); + + const currentTitle = titleElement.textContent?.trim(); + if (!currentTitle) { + return; + } + + // Check if we already have the original title stored + if (titleElement.dataset.itOriginalThumbnailTitle) { + // Toggle between original and translated + const isShowingOriginal = titleElement.dataset.itShowingOriginalThumbnail === 'true'; + + console.log('Toggling title, currently showing original:', isShowingOriginal); + + if (isShowingOriginal) { + // Show translated + titleElement.textContent = titleElement.dataset.itTranslatedThumbnailTitle; + titleElement.dataset.itShowingOriginalThumbnail = 'false'; + titleElement.style.fontStyle = 'normal'; + titleElement.style.color = ''; + } else { + // Show original + titleElement.textContent = titleElement.dataset.itOriginalThumbnailTitle; + titleElement.dataset.itShowingOriginalThumbnail = 'true'; + titleElement.style.fontStyle = 'italic'; + titleElement.style.color = '#3ea6ff'; + } + return; + } + + // Store the translated title + titleElement.dataset.itTranslatedThumbnailTitle = currentTitle; + titleElement.dataset.itShowingOriginalThumbnail = 'false'; + + // Show loading indicator + const originalText = titleElement.textContent; + titleElement.textContent = '🌐 Loading...'; + titleElement.style.color = '#aaa'; + + console.log('Fetching original title for video:', videoId); + + // Fetch original title - use the same method as video page (NOT ytInitialData) + ImprovedTube.fetchOriginalTitleForThumbnail(videoId, function(originalTitle) { + console.log('Received original title:', originalTitle); + + // Restore text if fetch failed + if (!originalTitle) { + titleElement.textContent = originalText + ' ❌'; + titleElement.style.color = '#f00'; + setTimeout(() => { + titleElement.textContent = originalText; + titleElement.style.color = ''; + }, 2000); + return; + } + + const normalizedOriginal = originalTitle?.trim().replace(/\s+/g, ' '); + const normalizedCurrent = currentTitle?.trim().replace(/\s+/g, ' '); + + if (normalizedOriginal === normalizedCurrent) { + // No translation detected + titleElement.textContent = originalText + ' (✓ same)'; + titleElement.style.color = '#0a0'; + setTimeout(() => { + titleElement.textContent = originalText; + titleElement.style.color = ''; + }, 2000); + return; + } + + // Store and show original title + titleElement.dataset.itOriginalThumbnailTitle = originalTitle; + titleElement.textContent = originalTitle; + titleElement.dataset.itShowingOriginalThumbnail = 'true'; + titleElement.style.fontStyle = 'italic'; + titleElement.style.color = '#3ea6ff'; + titleElement.title = 'Ctrl+Click again to see translated title'; + + console.log('Successfully toggled to original title'); + }); + }, true); +}; + +/*------------------------------------------------------------------------------ +Fetch original title for thumbnails using YouTube oEmbed API (no CORS) +------------------------------------------------------------------------------*/ +ImprovedTube.fetchOriginalTitleForThumbnail = function(videoId, callback) { + if (!videoId) { + callback(null); + return; + } + + console.log('Fetching original title for thumbnail, video ID:', videoId); + + // Try method 1: YouTube's oEmbed API - it returns the original title and doesn't have CORS restrictions + fetch(`https://www.youtube.com/oembed?url=https://www.youtube.com/watch?v=${videoId}&format=json`) + .then(response => { + if (!response.ok) { + throw new Error('oEmbed API failed'); + } + return response.json(); + }) + .then(data => { + if (data && data.title) { + console.log('Found original title from oEmbed API:', data.title); + callback(data.title); + } else { + console.log('No title in oEmbed response, trying fallback...'); + tryFallbackMethod(); + } + }) + .catch(error => { + console.error('Error fetching from oEmbed API:', error); + console.log('Trying fallback method via content script...'); + tryFallbackMethod(); + }); + + // Fallback: Use postMessage to ask content script to fetch via background + function tryFallbackMethod() { + const messageId = 'fetch-title-' + videoId + '-' + Date.now(); + let responseReceived = false; + + // Listen for response + const listener = function(event) { + if (event.data && event.data.type === 'IT_ORIGINAL_TITLE_RESPONSE' && event.data.messageId === messageId) { + responseReceived = true; + window.removeEventListener('message', listener); + console.log('Received response from content script:', event.data); + if (event.data.title) { + console.log('Found original title from fallback method:', event.data.title); + callback(event.data.title); + } else { + console.log('Fallback method also failed - no title in response'); + callback(null); + } + } + }; + + window.addEventListener('message', listener); + + console.log('Sending message to content script with messageId:', messageId); + + // Request via content script + window.postMessage({ + type: 'IT_FETCH_ORIGINAL_TITLE', + videoId: videoId, + messageId: messageId + }, '*'); + + // Timeout after 5 seconds + setTimeout(function() { + if (!responseReceived) { + console.log('Fallback method timeout - no response received'); + window.removeEventListener('message', listener); + callback(null); + } + }, 5000); + } +}; diff --git a/js&css/web-accessible/www.youtube.com/player.js b/js&css/web-accessible/www.youtube.com/player.js index 7261f7394..070fd6807 100644 --- a/js&css/web-accessible/www.youtube.com/player.js +++ b/js&css/web-accessible/www.youtube.com/player.js @@ -512,39 +512,6 @@ ImprovedTube.playerQualityWithoutFocus = function () { } }; /*------------------------------------------------------------------------------ -QUALITY FULL SCREEN -------------------------------------------------------------------------------*/ -ImprovedTube.playerQualityFullScreen = function () { - var isFs = !!( - document.fullscreenElement || - document.webkitFullscreenElement || - document.mozFullScreenElement || - document.msFullscreenElement || - document.webkitIsFullScreen || - document.mozFullScreen - ); - - var target = isFs ? fsq : ImprovedTube.storage.player_quality; - - var map = { - '144p':'tiny','240p':'small','360p':'medium','480p':'large', - '720p':'hd720','1080p':'hd1080','1440p':'hd1440','2160p':'hd2160','4320p':'highres', - 'tiny':'tiny','small':'small','medium':'medium','large':'large', - 'hd720':'hd720','hd1080':'hd1080','hd1440':'hd1440','hd2160':'hd2160','highres':'highres' - }; - var desired = map[target] || target; - - var player = ImprovedTube.elements && ImprovedTube.elements.player; - if (!player) return; - - if (typeof ImprovedTube.playerQuality === 'function') { - ImprovedTube.playerQuality(desired); - return; - } - try { if (typeof player.setPlaybackQualityRange === 'function') player.setPlaybackQualityRange(desired, desired); } catch(e) {} - try { if (typeof player.setPlaybackQuality === 'function') player.setPlaybackQuality(desired); } catch(e) {} - } -/*------------------------------------------------------------------------------ BATTERY FEATURES; PLAYER QUALITY BASED ON POWER STATUS ------------------------------------------------------------------------------*/ ImprovedTube.batteryFeatures = async function () { diff --git a/js&css/web-accessible/www.youtube.com/playlist-complete-playlist.js b/js&css/web-accessible/www.youtube.com/playlist-complete-playlist.js index fa406b3e4..d3cfa9a06 100644 --- a/js&css/web-accessible/www.youtube.com/playlist-complete-playlist.js +++ b/js&css/web-accessible/www.youtube.com/playlist-complete-playlist.js @@ -354,8 +354,6 @@ ImprovedTube.playlistEnsureQuickButtons = function (renderer) { svg.style.display = 'inherit'; svg.style.width = '100%'; svg.style.height = '100%'; - svg.style.mixBlendMode = 'difference'; - svg.style.filter = 'invert(1)'; // Create path for trash icon const path = document.createElementNS('http://www.w3.org/2000/svg', 'path'); @@ -804,4 +802,4 @@ ImprovedTube.playlistBulkDeleteByProgress = function () { // Re-create with new settings this.playlistCreateBulkControls(); -}; +}; \ No newline at end of file diff --git a/js&css/web-accessible/www.youtube.com/shortcuts.js b/js&css/web-accessible/www.youtube.com/shortcuts.js index 4899b0028..924411870 100644 --- a/js&css/web-accessible/www.youtube.com/shortcuts.js +++ b/js&css/web-accessible/www.youtube.com/shortcuts.js @@ -579,22 +579,3 @@ ImprovedTube.shortcutRotateVideo = function () { ImprovedTube.shortcutActivateFitToWindow = function() { ImprovedTube.toggleFitToWindow(); }; - -/*------------------------------------------------------------------------------ -4.7.31 CINEMA MODE -------------------------------------------------------------------------------*/ -ImprovedTube.shortcutCinemaMode = function () { - var player = xpath('//*[@id="movie_player"]/div[1]/video')[0].parentNode.parentNode - if (player.style.zIndex == 10000) { - player.style.zIndex = 1; - } else { - player.style.zIndex = 10000; - } - - var overlay = document.getElementById('overlay_cinema'); - if (!overlay) { - createOverlay(); - } else { - overlay.style.display = overlay.style.display === 'none' || overlay.style.display === '' ? 'block' : 'none'; - } -} \ No newline at end of file diff --git a/manifest.json b/manifest.json index 589992ce9..78a9a5c12 100644 --- a/manifest.json +++ b/manifest.json @@ -17,7 +17,8 @@ } }, "background": { - "service_worker": "background.js" + "service_worker": "background.js", + "scripts": ["background.js"] }, "action": { "default_popup": "menu/index.html", @@ -37,6 +38,7 @@ "js&css/extension/www.youtube.com/appearance/header/header.css", "js&css/extension/www.youtube.com/appearance/player/player.css", "js&css/extension/www.youtube.com/appearance/details/details.css", + "js&css/extension/www.youtube.com/appearance/details/original-title.css", "js&css/extension/www.youtube.com/appearance/sidebar/sidebar.css", "js&css/extension/www.youtube.com/appearance/comments/comments.css" ], @@ -77,6 +79,7 @@ "js&css/web-accessible/www.youtube.com/blocklist.js", "js&css/web-accessible/www.youtube.com/settings.js", "js&css/web-accessible/www.youtube.com/last-watched-overlay.js", + "js&css/web-accessible/www.youtube.com/original-title.js", "js&css/web-accessible/init.js", "menu/icons/48.png" ], diff --git a/menu/skeleton-parts/appearance.js b/menu/skeleton-parts/appearance.js index 24040758c..cd2f7dda5 100644 --- a/menu/skeleton-parts/appearance.js +++ b/menu/skeleton-parts/appearance.js @@ -457,6 +457,12 @@ extension.skeleton.main.layers.section.appearance.on.click.details = { text: "hideDetails", tags: "hide,remove" }, + original_title_toggle: { + component: "switch", + text: "originalTitleToggle", + tags: "title,translate,language", + value: true + }, day_of_week: { component: "switch", text: "displayDayOfTheWeak" diff --git a/menu/skeleton-parts/player.js b/menu/skeleton-parts/player.js index 2f3a79bdb..e187e6f47 100644 --- a/menu/skeleton-parts/player.js +++ b/menu/skeleton-parts/player.js @@ -812,19 +812,6 @@ extension.skeleton.main.layers.section.player.on.click = { } } }, - full_screen_quality: { - component: 'select', - text: 'fullScreenQuality', - id: 'full_screen_quality', - options: function () { - return extension.skeleton.main.layers.section.player.on.click.section_1.player_quality.options; - }, - on: { - render: function () { - extension.skeleton.main.layers.section.player.on.click.section_1.player_quality.on.render.call(this) - } - } - }, /* qualityWhenRunningOnBattery: { component: 'select', @@ -996,7 +983,6 @@ extension.skeleton.main.layers.section.player.on.click = { document.getElementById('player_codecs').dispatchEvent(new CustomEvent('render')); document.getElementById('optimize_codec_for_hardware_acceleration').dispatchEvent(new CustomEvent('render')); document.getElementById('player_quality_without_focus').dispatchEvent(new CustomEvent('render')); - document.getElementById('full_screen_quality')?.dispatchEvent(new CustomEvent('render')) //document.getElementById('quality_when_low_battery').dispatchEvent(new CustomEvent('render')); } if (this.dataset.value === 'false') { diff --git a/menu/skeleton-parts/shortcuts.js b/menu/skeleton-parts/shortcuts.js index fbc2796d0..a4be56e16 100644 --- a/menu/skeleton-parts/shortcuts.js +++ b/menu/skeleton-parts/shortcuts.js @@ -322,10 +322,6 @@ extension.skeleton.main.layers.section.shortcuts = { shortcut_rotate_video: { component: 'shortcut', text: 'rotate' - }, - shortcut_cinema_mode: { - component: 'shortcut', - text: 'cinemaMode' } }, section: { diff --git a/package.json b/package.json index 202a25153..e74155ef9 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "eslint": "^9.6.0", "globals": "^15.8.0", "jest": "^29.7.0", + "jest-environment-jsdom": "^30.2.0", "jslint": "^0.12.1" }, "dependencies": { diff --git a/tests/unit/original-title.test.js b/tests/unit/original-title.test.js new file mode 100644 index 000000000..b1937d226 --- /dev/null +++ b/tests/unit/original-title.test.js @@ -0,0 +1,249 @@ +/** + * Unit tests for original-title.js + * Testing the original/translated title toggle feature + */ + +// Mock global objects +global.chrome = { + runtime: { + sendMessage: jest.fn() + }, + storage: { + local: { + get: jest.fn((keys, callback) => { + callback({ original_title_toggle: true }); + }) + } + } +}; + +global.ImprovedTube = { + storage: { data: {} }, + elements: {} +}; + +// Mock fetch API +global.fetch = jest.fn(); + +describe('Original Title Toggle Feature', () => { + + beforeEach(() => { + // Reset mocks before each test + jest.clearAllMocks(); + + // Reset DOM + document.body.innerHTML = ''; + + // Mock window.postMessage + global.window.postMessage = jest.fn(); + global.window.addEventListener = jest.fn(); + }); + + describe('HTML Entity Decoding', () => { + + test('should decode & to &', () => { + const input = 'Music & Relaxation'; + const expected = 'Music & Relaxation'; + + // Manual decode function (same as in background.js) + const decode = (text) => text.replace(/&/g, '&'); + + expect(decode(input)).toBe(expected); + }); + + test('should decode multiple HTML entities', () => { + const input = 'Focus & Study - <Relaxing Music>'; + const expected = 'Focus & Study - '; + + const decode = (text) => text + .replace(/&/g, '&') + .replace(/</g, '<') + .replace(/>/g, '>'); + + expect(decode(input)).toBe(expected); + }); + + test('should decode numeric HTML entities', () => { + const input = 'Music & Sounds'; + const expected = 'Music & Sounds'; + + const decode = (text) => text.replace(/&#(\d+);/g, + (match, dec) => String.fromCharCode(dec)); + + expect(decode(input)).toBe(expected); + }); + }); + + describe('Title Comparison and Normalization', () => { + + test('should normalize whitespace in titles', () => { + const title1 = 'Medieval Music for Focus'; + const title2 = 'Medieval Music for Focus'; + + const normalize = (text) => text?.trim().replace(/\s+/g, ' '); + + expect(normalize(title1)).toBe(normalize(title2)); + }); + + test('should detect identical titles (no translation)', () => { + const original = 'Relaxing Piano Music'; + const translated = 'Relaxing Piano Music'; + + const normalize = (text) => text?.trim().replace(/\s+/g, ' '); + const areEqual = normalize(original) === normalize(translated); + + expect(areEqual).toBe(true); + }); + + test('should detect different titles (translation exists)', () => { + const original = 'Beautiful Relaxing Music'; + const translated = 'Krásna relaxačná hudba'; // Slovak + + const normalize = (text) => text?.trim().replace(/\s+/g, ' '); + const areEqual = normalize(original) === normalize(translated); + + expect(areEqual).toBe(false); + }); + }); + + describe('Video ID Extraction', () => { + + test('should extract video ID from standard YouTube URL', () => { + const url = 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'; + const match = url.match(/[?&]v=([^&]+)/); + const videoId = match ? match[1] : null; + + expect(videoId).toBe('dQw4w9WgXcQ'); + }); + + test('should extract video ID from URL with multiple parameters', () => { + const url = 'https://www.youtube.com/watch?v=abc123&list=PLxyz&index=5'; + const match = url.match(/[?&]v=([^&]+)/); + const videoId = match ? match[1] : null; + + expect(videoId).toBe('abc123'); + }); + + test('should return null for URL without video ID', () => { + const url = 'https://www.youtube.com/'; + const match = url.match(/[?&]v=([^&]+)/); + const videoId = match ? match[1] : null; + + expect(videoId).toBeNull(); + }); + }); + + describe('oEmbed API Integration', () => { + + test('should construct correct oEmbed URL', () => { + const videoId = 'dQw4w9WgXcQ'; + const oembedUrl = `https://www.youtube.com/oembed?url=https://www.youtube.com/watch?v=${videoId}&format=json`; + + expect(oembedUrl).toContain('oembed'); + expect(oembedUrl).toContain(videoId); + expect(oembedUrl).toContain('format=json'); + }); + + test('should handle successful oEmbed response', async () => { + const mockTitle = 'Original Video Title'; + const mockResponse = { + ok: true, + json: async () => ({ title: mockTitle }) + }; + + fetch.mockResolvedValueOnce(mockResponse); + + const response = await fetch('https://www.youtube.com/oembed?url=...'); + const data = await response.json(); + + expect(data.title).toBe(mockTitle); + }); + + test('should handle failed oEmbed response', async () => { + const mockResponse = { + ok: false, + status: 401 + }; + + fetch.mockResolvedValueOnce(mockResponse); + + const response = await fetch('https://www.youtube.com/oembed?url=...'); + + expect(response.ok).toBe(false); + expect(response.status).toBe(401); + }); + }); + + describe('PostMessage Communication', () => { + + test('should create correct message format for content script', () => { + const videoId = 'test123'; + const messageId = `fetch-title-${videoId}-${Date.now()}`; + + const message = { + type: 'IT_FETCH_ORIGINAL_TITLE', + videoId: videoId, + messageId: messageId + }; + + expect(message.type).toBe('IT_FETCH_ORIGINAL_TITLE'); + expect(message.videoId).toBe(videoId); + expect(message.messageId).toContain('fetch-title-test123'); + }); + + test('should create correct response message format', () => { + const messageId = 'fetch-title-test123-1234567890'; + const title = 'Test Title'; + + const response = { + type: 'IT_ORIGINAL_TITLE_RESPONSE', + messageId: messageId, + title: title + }; + + expect(response.type).toBe('IT_ORIGINAL_TITLE_RESPONSE'); + expect(response.messageId).toBe(messageId); + expect(response.title).toBe(title); + }); + }); + + describe('Title Toggle State Management', () => { + + test('should initialize with translated title showing', () => { + const titleElement = document.createElement('a'); + titleElement.textContent = 'Translated Title'; + + // Mock dataset (not set yet) + expect(titleElement.dataset.itShowingOriginalThumbnail).toBeUndefined(); + }); + + test('should store both original and translated titles', () => { + const titleElement = document.createElement('a'); + titleElement.dataset.itOriginalThumbnailTitle = 'Original Title'; + titleElement.dataset.itTranslatedThumbnailTitle = 'Translated Title'; + titleElement.dataset.itShowingOriginalThumbnail = 'false'; + + expect(titleElement.dataset.itOriginalThumbnailTitle).toBe('Original Title'); + expect(titleElement.dataset.itTranslatedThumbnailTitle).toBe('Translated Title'); + expect(titleElement.dataset.itShowingOriginalThumbnail).toBe('false'); + }); + + test('should toggle between original and translated', () => { + const titleElement = document.createElement('a'); + titleElement.dataset.itOriginalThumbnailTitle = 'Original'; + titleElement.dataset.itTranslatedThumbnailTitle = 'Translated'; + titleElement.dataset.itShowingOriginalThumbnail = 'false'; + + // Toggle to original + const isShowingOriginal = titleElement.dataset.itShowingOriginalThumbnail === 'true'; + if (!isShowingOriginal) { + titleElement.textContent = titleElement.dataset.itOriginalThumbnailTitle; + titleElement.dataset.itShowingOriginalThumbnail = 'true'; + } + + expect(titleElement.textContent).toBe('Original'); + expect(titleElement.dataset.itShowingOriginalThumbnail).toBe('true'); + }); + }); + +}); From 0c82498b8a3c75e21b7a15ece28ba189149f01fa Mon Sep 17 00:00:00 2001 From: ImprovedTube Date: Tue, 4 Nov 2025 00:41:48 +0100 Subject: [PATCH 4/5] Update original-title.js --- js&css/web-accessible/www.youtube.com/original-title.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js&css/web-accessible/www.youtube.com/original-title.js b/js&css/web-accessible/www.youtube.com/original-title.js index 9897bb472..d695e4261 100644 --- a/js&css/web-accessible/www.youtube.com/original-title.js +++ b/js&css/web-accessible/www.youtube.com/original-title.js @@ -13,7 +13,7 @@ ImprovedTube.originalTitleToggle = function() { // If storage value is explicitly false, disable the feature if (storageValue === false) { - console.log('Original title toggle is disabled'); + // console.log('Original title toggle is disabled'); // Remove any existing toggle functionality const titleElement = document.querySelector('h1.style-scope.ytd-watch-metadata yt-formatted-string'); if (titleElement) { From 47613ca54e0665b9ec06bf15dcd6c2e2e16dedca Mon Sep 17 00:00:00 2001 From: Saron Tebebe Mengistu Date: Tue, 4 Nov 2025 07:25:55 +0100 Subject: [PATCH 5/5] Optimize original title toggle for better integration --- .../www.youtube.com/original-title.js | 64 +- package-lock.json | 1304 ++++++++++++++--- 2 files changed, 1174 insertions(+), 194 deletions(-) diff --git a/js&css/web-accessible/www.youtube.com/original-title.js b/js&css/web-accessible/www.youtube.com/original-title.js index 9897bb472..04ca89eab 100644 --- a/js&css/web-accessible/www.youtube.com/original-title.js +++ b/js&css/web-accessible/www.youtube.com/original-title.js @@ -7,6 +7,12 @@ and the original title without refreshing the page. ------------------------------------------------------------------------------*/ ImprovedTube.originalTitleToggle = function() { + // Check if required functions exist + if (typeof ImprovedTube.videoId !== 'function') { + console.log('ImprovedTube.videoId function not available, skipping original title toggle'); + return; + } + // Check if feature is enabled - default to TRUE unless explicitly disabled const storageValue = this.storage?.original_title_toggle ?? ImprovedTube.storage?.original_title_toggle; @@ -166,6 +172,7 @@ ImprovedTube.originalTitleToggle = function() { /*------------------------------------------------------------------------------ Fetch the original title from the video metadata +Reuses existing DATA from fetchDOMData if available to avoid duplication ------------------------------------------------------------------------------*/ ImprovedTube.fetchOriginalTitle = function(videoId, callback) { if (!videoId) { @@ -175,13 +182,20 @@ ImprovedTube.fetchOriginalTitle = function(videoId, callback) { let originalTitle = null; - // Method 1: Try from microformat (JSON-LD) - this usually has original title + // Method 1: Try existing DATA object first (if fetchDOMData was already called) + if (typeof DATA !== 'undefined' && DATA && DATA.title && DATA.videoID === videoId) { + console.log('Found title in existing DATA:', DATA.title); + callback(DATA.title); + return; + } + + // Method 2: Try from microformat (JSON-LD) - reuses existing pattern try { - const microformatScript = document.querySelector('script[type="application/ld+json"]'); + const microformatScript = document.querySelector('#microformat script, script[type="application/ld+json"]'); if (microformatScript) { const data = JSON.parse(microformatScript.textContent); - if (data && data.name) { - originalTitle = data.name; + if (data && (data.name || data.title)) { + originalTitle = data.name || data.title; console.log('Found title in microformat:', originalTitle); callback(originalTitle); return; @@ -191,12 +205,12 @@ ImprovedTube.fetchOriginalTitle = function(videoId, callback) { console.log('Could not parse microformat:', e); } - // Method 2: Try from meta tags + // Method 3: Try from meta tags - consolidated approach try { - const metaTitle = document.querySelector('meta[property="og:title"]')?.content; + const metaTitle = document.querySelector('meta[property="og:title"], meta[name="title"]')?.content; if (metaTitle) { originalTitle = metaTitle; - console.log('Found title in og:title meta:', originalTitle); + console.log('Found title in meta tags:', originalTitle); callback(originalTitle); return; } @@ -204,11 +218,11 @@ ImprovedTube.fetchOriginalTitle = function(videoId, callback) { console.log('Could not get title from meta tags:', e); } - // Method 3: Try from player API (getVideoData) + // Method 4: Try from player API (if available) try { - if (typeof movie_player !== 'undefined' && movie_player.getVideoData) { + if (typeof movie_player !== 'undefined' && movie_player?.getVideoData) { const videoData = movie_player.getVideoData(); - if (videoData && videoData.title) { + if (videoData?.title) { originalTitle = videoData.title; console.log('Found title in player API:', originalTitle); callback(originalTitle); @@ -219,24 +233,18 @@ ImprovedTube.fetchOriginalTitle = function(videoId, callback) { console.log('Could not get title from player API:', e); } - // Method 4: Try from window.ytplayer.config + // Method 5: Try from ytplayer config (if available) try { - if (typeof ytplayer !== 'undefined' && ytplayer.config) { - const args = ytplayer.config.args; - if (args && args.title) { - originalTitle = args.title; - console.log('Found title in ytplayer.config:', originalTitle); - callback(originalTitle); - return; - } + if (typeof ytplayer !== 'undefined' && ytplayer?.config?.args?.title) { + originalTitle = ytplayer.config.args.title; + console.log('Found title in ytplayer.config:', originalTitle); + callback(originalTitle); + return; } } catch (e) { console.log('Could not get title from ytplayer.config:', e); } - // SKIP ytInitialData as it contains translated titles - // ytInitialData is server-rendered with user's language preference - // If all methods fail console.log('Could not fetch original title for video:', videoId); callback(null); @@ -246,6 +254,12 @@ ImprovedTube.fetchOriginalTitle = function(videoId, callback) { Initialize on page load and navigation ------------------------------------------------------------------------------*/ ImprovedTube.initOriginalTitleToggle = function() { + // Check if required functions exist before proceeding + if (typeof ImprovedTube.videoId !== 'function') { + console.log('ImprovedTube.videoId function not available, skipping initialization'); + return; + } + // Clear any existing intervals if (this.originalTitleInterval) { clearInterval(this.originalTitleInterval); @@ -322,6 +336,12 @@ by Ctrl+Clicking on them throughout YouTube ------------------------------------------------------------------------------*/ ImprovedTube.originalTitleThumbnails = function() { + // Check if required functions exist + if (typeof ImprovedTube.videoId !== 'function') { + console.log('ImprovedTube.videoId function not available, skipping thumbnail toggle'); + return; + } + // Check if feature is enabled const storageValue = this.storage?.original_title_toggle ?? ImprovedTube.storage?.original_title_toggle; diff --git a/package-lock.json b/package-lock.json index 4119e59c7..5fe231c52 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,11 +14,12 @@ "eslint-plugin-compat": "^5.0.0" }, "devDependencies": { - "@eslint/eslintrc": "*", - "@eslint/js": "*", + "@eslint/eslintrc": "latest", + "@eslint/js": "latest", "eslint": "^9.6.0", "globals": "^15.8.0", "jest": "^29.7.0", + "jest-environment-jsdom": "^30.2.0", "jslint": "^0.12.1" } }, @@ -35,14 +36,37 @@ "node": ">=6.0.0" } }, + "node_modules/@asamuzakjp/css-color": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@asamuzakjp/css-color/-/css-color-3.2.0.tgz", + "integrity": "sha512-K1A6z8tS3XsmCMM86xoWdn7Fkdn9m6RSVtocUrJYIwZnFVkng/PvkEoWtOWmP+Scc6saYWHWZYbndEEXxl24jw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@csstools/css-calc": "^2.1.3", + "@csstools/css-color-parser": "^3.0.9", + "@csstools/css-parser-algorithms": "^3.0.4", + "@csstools/css-tokenizer": "^3.0.3", + "lru-cache": "^10.4.3" + } + }, + "node_modules/@asamuzakjp/css-color/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" + }, "node_modules/@babel/code-frame": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", - "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", + "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/highlight": "^7.24.7", - "picocolors": "^1.0.0" + "@babel/helper-validator-identifier": "^7.27.1", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" }, "engines": { "node": ">=6.9.0" @@ -231,10 +255,11 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", - "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", + "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } @@ -261,92 +286,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/highlight": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", - "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", - "dev": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.24.7", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight/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==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/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, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/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, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/highlight/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 - }, - "node_modules/@babel/highlight/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, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@babel/highlight/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, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/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, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/@babel/parser": { "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz", @@ -601,10 +540,126 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, + "node_modules/@csstools/color-helpers": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@csstools/color-helpers/-/color-helpers-5.1.0.tgz", + "integrity": "sha512-S11EXWJyy0Mz5SYvRmY8nJYTFFd1LCNV+7cXyAgQtOOuzb4EsgfqDufL+9esx72/eLhsRdGZwaldu/h+E4t4BA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "engines": { + "node": ">=18" + } + }, + "node_modules/@csstools/css-calc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@csstools/css-calc/-/css-calc-2.1.4.tgz", + "integrity": "sha512-3N8oaj+0juUw/1H3YwmDDJXCgTB1gKU6Hc/bB502u9zR0q2vd786XJH9QfrKIEgFlZmhZiq6epXl4rHqhzsIgQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@csstools/css-parser-algorithms": "^3.0.5", + "@csstools/css-tokenizer": "^3.0.4" + } + }, + "node_modules/@csstools/css-color-parser": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@csstools/css-color-parser/-/css-color-parser-3.1.0.tgz", + "integrity": "sha512-nbtKwh3a6xNVIp/VRuXV64yTKnb1IjTAEEh3irzS+HkKjAOYLTGNb9pmVNntZ8iVBHcWDA2Dof0QtPgFI1BaTA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "dependencies": { + "@csstools/color-helpers": "^5.1.0", + "@csstools/css-calc": "^2.1.4" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@csstools/css-parser-algorithms": "^3.0.5", + "@csstools/css-tokenizer": "^3.0.4" + } + }, + "node_modules/@csstools/css-parser-algorithms": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-3.0.5.tgz", + "integrity": "sha512-DaDeUkXZKjdGhgYaHNJTV9pV7Y9B3b644jCLs9Upc3VeNGg6LWARAT6O+Q+/COo+2gg/bM5rhpMAtf70WqfBdQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@csstools/css-tokenizer": "^3.0.4" + } + }, + "node_modules/@csstools/css-tokenizer": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-3.0.4.tgz", + "integrity": "sha512-Vd/9EVDiu6PPJt9yAh6roZP6El1xHrdvIVGjyBsHR0RYwNHgL7FJPyIIW4fANJNG6FtyZfvlRPpFI4ZM/lubvw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "engines": { + "node": ">=18" + } + }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, "license": "MIT", "dependencies": { "eslint-visitor-keys": "^3.3.0" @@ -620,6 +675,7 @@ "version": "3.4.3", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, "license": "Apache-2.0", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -632,6 +688,7 @@ "version": "4.11.0", "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.0.tgz", "integrity": "sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==", + "dev": true, "license": "MIT", "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" @@ -650,6 +707,7 @@ "version": "0.17.0", "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.17.0.tgz", "integrity": "sha512-A68TBu6/1mHHuc5YJL0U0VVeGNiklLAL6rRmhTCP2B5XjWLMnrX+HkO+IAXyHvks5cyyY1jjK5ITPQ1HGS2EVA==", + "dev": true, "license": "Apache-2.0", "dependencies": { "@eslint/object-schema": "^2.1.4", @@ -717,6 +775,7 @@ "version": "9.6.0", "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.6.0.tgz", "integrity": "sha512-D9B0/3vNg44ZeWbYMpBoXqNP4j6eQD5vNwIlGAuFRRzK/WtT/jvDQW3Bi9kkf3PMDMlM7Yi+73VLUsn5bJcl8A==", + "dev": true, "license": "MIT", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -756,6 +815,7 @@ "version": "2.1.4", "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.4.tgz", "integrity": "sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==", + "dev": true, "license": "Apache-2.0", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -765,6 +825,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, "license": "Apache-2.0", "engines": { "node": ">=12.22" @@ -778,6 +839,7 @@ "version": "0.3.0", "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.0.tgz", "integrity": "sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==", + "dev": true, "license": "Apache-2.0", "engines": { "node": ">=18.18" @@ -891,6 +953,228 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/@jest/environment-jsdom-abstract": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/@jest/environment-jsdom-abstract/-/environment-jsdom-abstract-30.2.0.tgz", + "integrity": "sha512-kazxw2L9IPuZpQ0mEt9lu9Z98SqR74xcagANmMBU16X0lS23yPc0+S6hGLUz8kVRlomZEs/5S/Zlpqwf5yu6OQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "30.2.0", + "@jest/fake-timers": "30.2.0", + "@jest/types": "30.2.0", + "@types/jsdom": "^21.1.7", + "@types/node": "*", + "jest-mock": "30.2.0", + "jest-util": "30.2.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + }, + "peerDependencies": { + "canvas": "^3.0.0", + "jsdom": "*" + }, + "peerDependenciesMeta": { + "canvas": { + "optional": true + } + } + }, + "node_modules/@jest/environment-jsdom-abstract/node_modules/@jest/environment": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-30.2.0.tgz", + "integrity": "sha512-/QPTL7OBJQ5ac09UDRa3EQes4gt1FTEG/8jZ/4v5IVzx+Cv7dLxlVIvfvSVRiiX2drWyXeBjkMSR8hvOWSog5g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/fake-timers": "30.2.0", + "@jest/types": "30.2.0", + "@types/node": "*", + "jest-mock": "30.2.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@jest/environment-jsdom-abstract/node_modules/@jest/fake-timers": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-30.2.0.tgz", + "integrity": "sha512-HI3tRLjRxAbBy0VO8dqqm7Hb2mIa8d5bg/NJkyQcOk7V118ObQML8RC5luTF/Zsg4474a+gDvhce7eTnP4GhYw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "30.2.0", + "@sinonjs/fake-timers": "^13.0.0", + "@types/node": "*", + "jest-message-util": "30.2.0", + "jest-mock": "30.2.0", + "jest-util": "30.2.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@jest/environment-jsdom-abstract/node_modules/@jest/schemas": { + "version": "30.0.5", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-30.0.5.tgz", + "integrity": "sha512-DmdYgtezMkh3cpU8/1uyXakv3tJRcmcXxBOcO0tbaozPwpmh4YMsnWrQm9ZmZMfa5ocbxzbFk6O4bDPEc/iAnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sinclair/typebox": "^0.34.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@jest/environment-jsdom-abstract/node_modules/@jest/types": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-30.2.0.tgz", + "integrity": "sha512-H9xg1/sfVvyfU7o3zMfBEjQ1gcsdeTMgqHoYdN79tuLqfTtuu7WckRA1R5whDwOzxaZAeMKTYWqP+WCAi0CHsg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/pattern": "30.0.1", + "@jest/schemas": "30.0.5", + "@types/istanbul-lib-coverage": "^2.0.6", + "@types/istanbul-reports": "^3.0.4", + "@types/node": "*", + "@types/yargs": "^17.0.33", + "chalk": "^4.1.2" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@jest/environment-jsdom-abstract/node_modules/@sinclair/typebox": { + "version": "0.34.41", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.34.41.tgz", + "integrity": "sha512-6gS8pZzSXdyRHTIqoqSVknxolr1kzfy4/CeDnrzsVz8TTIWUbOBr6gnzOmTYJ3eXQNh4IYHIGi5aIL7sOZ2G/g==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jest/environment-jsdom-abstract/node_modules/@sinonjs/fake-timers": { + "version": "13.0.5", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-13.0.5.tgz", + "integrity": "sha512-36/hTbH2uaWuGVERyC6da9YwGWnzUZXuPro/F2LfsdOsLnCojz/iSH8MxUt/FD2S5XBSVPhmArFUXcpCQ2Hkiw==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@sinonjs/commons": "^3.0.1" + } + }, + "node_modules/@jest/environment-jsdom-abstract/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@jest/environment-jsdom-abstract/node_modules/ci-info": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.3.1.tgz", + "integrity": "sha512-Wdy2Igu8OcBpI2pZePZ5oWjPC38tmDVx5WKUXKwlLYkA0ozo85sLsLvkBbBn/sZaSCMFOGZJ14fvW9t5/d7kdA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/environment-jsdom-abstract/node_modules/jest-message-util": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-30.2.0.tgz", + "integrity": "sha512-y4DKFLZ2y6DxTWD4cDe07RglV88ZiNEdlRfGtqahfbIjfsw1nMCPx49Uev4IA/hWn3sDKyAnSPwoYSsAEdcimw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.27.1", + "@jest/types": "30.2.0", + "@types/stack-utils": "^2.0.3", + "chalk": "^4.1.2", + "graceful-fs": "^4.2.11", + "micromatch": "^4.0.8", + "pretty-format": "30.2.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.6" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@jest/environment-jsdom-abstract/node_modules/jest-mock": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-30.2.0.tgz", + "integrity": "sha512-JNNNl2rj4b5ICpmAcq+WbLH83XswjPbjH4T7yvGzfAGCPh1rw+xVNbtk+FnRslvt9lkCcdn9i1oAoKUuFsOxRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "30.2.0", + "@types/node": "*", + "jest-util": "30.2.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@jest/environment-jsdom-abstract/node_modules/jest-util": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.2.0.tgz", + "integrity": "sha512-QKNsM0o3Xe6ISQU869e+DhG+4CK/48aHYdJZGlFQVTjnbvgpcKyxpzk29fGiO7i/J8VENZ+d2iGnSsvmuHywlA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "30.2.0", + "@types/node": "*", + "chalk": "^4.1.2", + "ci-info": "^4.2.0", + "graceful-fs": "^4.2.11", + "picomatch": "^4.0.2" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@jest/environment-jsdom-abstract/node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/@jest/environment-jsdom-abstract/node_modules/pretty-format": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.2.0.tgz", + "integrity": "sha512-9uBdv/B4EefsuAL+pWqueZyZS2Ba+LxfFeQ9DN14HU4bN8bhaxKdkpjpB6fs9+pSjIBu+FXQHImEg8j/Lw0+vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/schemas": "30.0.5", + "ansi-styles": "^5.2.0", + "react-is": "^18.3.1" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, "node_modules/@jest/expect": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", @@ -948,6 +1232,30 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/@jest/pattern": { + "version": "30.0.1", + "resolved": "https://registry.npmjs.org/@jest/pattern/-/pattern-30.0.1.tgz", + "integrity": "sha512-gWp7NfQW27LaBQz3TITS8L7ZCQ0TLvtmI//4OwlQRx4rnWxcPNIYjxZpDcN4+UlGxgm3jS5QPz8IPTCkb59wZA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "jest-regex-util": "30.0.1" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@jest/pattern/node_modules/jest-regex-util": { + "version": "30.0.1", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-30.0.1.tgz", + "integrity": "sha512-jHEQgBXAgc+Gh4g0p3bCevgRCVRkB4VB70zhoAE48gxeSr1hfUOsM/C2WoJgVL7Eyg//hudYENbm3Ne+/dRVVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, "node_modules/@jest/reporters": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", @@ -1148,6 +1456,7 @@ "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, "license": "MIT", "dependencies": { "@nodelib/fs.stat": "2.0.5", @@ -1161,6 +1470,7 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, "license": "MIT", "engines": { "node": ">= 8" @@ -1170,6 +1480,7 @@ "version": "1.2.8", "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, "license": "MIT", "dependencies": { "@nodelib/fs.scandir": "2.1.5", @@ -1277,6 +1588,18 @@ "@types/istanbul-lib-report": "*" } }, + "node_modules/@types/jsdom": { + "version": "21.1.7", + "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-21.1.7.tgz", + "integrity": "sha512-yOriVnggzrnQ3a9OKOCxaVuSug3w3/SbOj5i7VwXWZEyUNl3bLF9V3MfxGbZKuwqJOQyRfqXyROBB1CoZLFWzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "@types/tough-cookie": "*", + "parse5": "^7.0.0" + } + }, "node_modules/@types/node": { "version": "20.14.2", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.2.tgz", @@ -1292,11 +1615,19 @@ "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", "dev": true }, + "node_modules/@types/tough-cookie": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.5.tgz", + "integrity": "sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/yargs": { - "version": "17.0.32", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", - "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "version": "17.0.34", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.34.tgz", + "integrity": "sha512-KExbHVa92aJpw9WDQvzBaGVE2/Pz+pLZQloT2hjL8IqsZnV62rlPOYvNnLmf/L2dyllfVUOVBj64M0z/46eR2A==", "dev": true, + "license": "MIT", "dependencies": { "@types/yargs-parser": "*" } @@ -1334,6 +1665,16 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, + "node_modules/agent-base": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz", + "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14" + } + }, "node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -1369,6 +1710,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, "engines": { "node": ">=8" } @@ -1377,6 +1719,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, "dependencies": { "color-convert": "^2.0.1" }, @@ -1656,6 +1999,7 @@ "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -1731,6 +2075,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, "dependencies": { "color-name": "~1.1.4" }, @@ -1741,7 +2086,8 @@ "node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/concat-map": { "version": "0.0.1", @@ -1785,6 +2131,7 @@ "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, "license": "MIT", "dependencies": { "path-key": "^3.1.0", @@ -1795,6 +2142,34 @@ "node": ">= 8" } }, + "node_modules/cssstyle": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-4.6.0.tgz", + "integrity": "sha512-2z+rWdzbbSZv6/rhtvzvqeZQHrBaqgogqt85sqFNbabZOuFbCVFb8kPeEtZjiKkbrm395irpNKiYeFeLiQnFPg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@asamuzakjp/css-color": "^3.2.0", + "rrweb-cssom": "^0.8.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/data-urls": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-5.0.0.tgz", + "integrity": "sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "whatwg-mimetype": "^4.0.0", + "whatwg-url": "^14.0.0" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/debug": { "version": "4.3.5", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", @@ -1811,6 +2186,13 @@ } } }, + "node_modules/decimal.js": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.6.0.tgz", + "integrity": "sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==", + "dev": true, + "license": "MIT" + }, "node_modules/dedent": { "version": "1.5.3", "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.3.tgz", @@ -1829,6 +2211,7 @@ "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, "license": "MIT" }, "node_modules/deepmerge": { @@ -1881,6 +2264,19 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, + "node_modules/entities": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.1.tgz", + "integrity": "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, "node_modules/error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", @@ -1911,6 +2307,7 @@ "version": "9.6.0", "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.6.0.tgz", "integrity": "sha512-ElQkdLMEEqQNM9Njff+2Y4q2afHk7JpkPvrd7Xh7xefwgQynqPxwf55J7di9+MEibWUGdNjFF9ITG9Pck5M84w==", + "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", @@ -2069,6 +2466,7 @@ "version": "8.0.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.0.1.tgz", "integrity": "sha512-pL8XjgP4ZOmmwfFE8mEhSxA7ZY4C+LWyqjQ3o4yWkkmD0qcMT9kkW3zWHOczhWcjTSgqycYAgwSlXvZltv65og==", + "dev": true, "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", @@ -2097,6 +2495,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, "license": "MIT", "engines": { "node": ">=10" @@ -2109,6 +2508,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, "license": "MIT", "dependencies": { "locate-path": "^6.0.0", @@ -2125,6 +2525,7 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, "license": "MIT", "dependencies": { "p-locate": "^5.0.0" @@ -2140,6 +2541,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, "license": "MIT", "dependencies": { "p-limit": "^3.0.2" @@ -2184,6 +2586,7 @@ "version": "1.5.0", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "dev": true, "license": "BSD-3-Clause", "dependencies": { "estraverse": "^5.1.0" @@ -2196,6 +2599,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, "license": "BSD-2-Clause", "dependencies": { "estraverse": "^5.2.0" @@ -2208,6 +2612,7 @@ "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, "license": "BSD-2-Clause", "engines": { "node": ">=4.0" @@ -2217,6 +2622,7 @@ "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" @@ -2285,12 +2691,14 @@ "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, "license": "MIT" }, "node_modules/fastq": { "version": "1.17.1", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "dev": true, "license": "ISC", "dependencies": { "reusify": "^1.0.4" @@ -2309,6 +2717,7 @@ "version": "8.0.0", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", + "dev": true, "license": "MIT", "dependencies": { "flat-cache": "^4.0.0" @@ -2346,6 +2755,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", + "dev": true, "license": "MIT", "dependencies": { "flatted": "^3.2.9", @@ -2359,6 +2769,7 @@ "version": "3.3.1", "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", + "dev": true, "license": "ISC" }, "node_modules/fs.realpath": { @@ -2454,6 +2865,7 @@ "version": "6.0.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, "license": "ISC", "dependencies": { "is-glob": "^4.0.3" @@ -2485,6 +2897,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, "engines": { "node": ">=8" } @@ -2501,12 +2914,53 @@ "node": ">= 0.4" } }, + "node_modules/html-encoding-sniffer": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-4.0.0.tgz", + "integrity": "sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "whatwg-encoding": "^3.1.1" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, + "node_modules/http-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/https-proxy-agent": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/human-signals": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", @@ -2516,6 +2970,19 @@ "node": ">=10.17.0" } }, + "node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/ignore": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", @@ -2573,6 +3040,7 @@ "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, "engines": { "node": ">=0.8.19" } @@ -2616,6 +3084,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -2643,6 +3112,7 @@ "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" @@ -2664,11 +3134,19 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, "license": "MIT", "engines": { "node": ">=8" } }, + "node_modules/is-potential-custom-element-name": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", + "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", + "dev": true, + "license": "MIT" + }, "node_modules/is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", @@ -2690,7 +3168,8 @@ "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true }, "node_modules/istanbul-lib-coverage": { "version": "3.2.2", @@ -2874,92 +3353,311 @@ } } }, - "node_modules/jest-config": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", - "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", + "node_modules/jest-config": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", + "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", + "dev": true, + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-jest": "^29.7.0", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-circus": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "micromatch": "^4.0.4", + "parse-json": "^5.2.0", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@types/node": "*", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "ts-node": { + "optional": true + } + } + }, + "node_modules/jest-diff": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-docblock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", + "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", + "dev": true, + "dependencies": { + "detect-newline": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-each": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", + "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "jest-util": "^29.7.0", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-environment-jsdom": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-30.2.0.tgz", + "integrity": "sha512-zbBTiqr2Vl78pKp/laGBREYzbZx9ZtqPjOK4++lL4BNDhxRnahg51HtoDrk9/VjIy9IthNEWdKVd7H5bqBhiWQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "30.2.0", + "@jest/environment-jsdom-abstract": "30.2.0", + "@types/jsdom": "^21.1.7", + "@types/node": "*", + "jsdom": "^26.1.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + }, + "peerDependencies": { + "canvas": "^3.0.0" + }, + "peerDependenciesMeta": { + "canvas": { + "optional": true + } + } + }, + "node_modules/jest-environment-jsdom/node_modules/@jest/environment": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-30.2.0.tgz", + "integrity": "sha512-/QPTL7OBJQ5ac09UDRa3EQes4gt1FTEG/8jZ/4v5IVzx+Cv7dLxlVIvfvSVRiiX2drWyXeBjkMSR8hvOWSog5g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/fake-timers": "30.2.0", + "@jest/types": "30.2.0", + "@types/node": "*", + "jest-mock": "30.2.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/jest-environment-jsdom/node_modules/@jest/fake-timers": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-30.2.0.tgz", + "integrity": "sha512-HI3tRLjRxAbBy0VO8dqqm7Hb2mIa8d5bg/NJkyQcOk7V118ObQML8RC5luTF/Zsg4474a+gDvhce7eTnP4GhYw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "30.2.0", + "@sinonjs/fake-timers": "^13.0.0", + "@types/node": "*", + "jest-message-util": "30.2.0", + "jest-mock": "30.2.0", + "jest-util": "30.2.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/jest-environment-jsdom/node_modules/@jest/schemas": { + "version": "30.0.5", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-30.0.5.tgz", + "integrity": "sha512-DmdYgtezMkh3cpU8/1uyXakv3tJRcmcXxBOcO0tbaozPwpmh4YMsnWrQm9ZmZMfa5ocbxzbFk6O4bDPEc/iAnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sinclair/typebox": "^0.34.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/jest-environment-jsdom/node_modules/@jest/types": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-30.2.0.tgz", + "integrity": "sha512-H9xg1/sfVvyfU7o3zMfBEjQ1gcsdeTMgqHoYdN79tuLqfTtuu7WckRA1R5whDwOzxaZAeMKTYWqP+WCAi0CHsg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/pattern": "30.0.1", + "@jest/schemas": "30.0.5", + "@types/istanbul-lib-coverage": "^2.0.6", + "@types/istanbul-reports": "^3.0.4", + "@types/node": "*", + "@types/yargs": "^17.0.33", + "chalk": "^4.1.2" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/jest-environment-jsdom/node_modules/@sinclair/typebox": { + "version": "0.34.41", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.34.41.tgz", + "integrity": "sha512-6gS8pZzSXdyRHTIqoqSVknxolr1kzfy4/CeDnrzsVz8TTIWUbOBr6gnzOmTYJ3eXQNh4IYHIGi5aIL7sOZ2G/g==", + "dev": true, + "license": "MIT" + }, + "node_modules/jest-environment-jsdom/node_modules/@sinonjs/fake-timers": { + "version": "13.0.5", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-13.0.5.tgz", + "integrity": "sha512-36/hTbH2uaWuGVERyC6da9YwGWnzUZXuPro/F2LfsdOsLnCojz/iSH8MxUt/FD2S5XBSVPhmArFUXcpCQ2Hkiw==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@sinonjs/commons": "^3.0.1" + } + }, + "node_modules/jest-environment-jsdom/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-environment-jsdom/node_modules/ci-info": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.3.1.tgz", + "integrity": "sha512-Wdy2Igu8OcBpI2pZePZ5oWjPC38tmDVx5WKUXKwlLYkA0ozo85sLsLvkBbBn/sZaSCMFOGZJ14fvW9t5/d7kdA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-environment-jsdom/node_modules/jest-message-util": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-30.2.0.tgz", + "integrity": "sha512-y4DKFLZ2y6DxTWD4cDe07RglV88ZiNEdlRfGtqahfbIjfsw1nMCPx49Uev4IA/hWn3sDKyAnSPwoYSsAEdcimw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.7.0", - "@jest/types": "^29.6.3", - "babel-jest": "^29.7.0", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "deepmerge": "^4.2.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-circus": "^29.7.0", - "jest-environment-node": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-runner": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "micromatch": "^4.0.4", - "parse-json": "^5.2.0", - "pretty-format": "^29.7.0", + "@babel/code-frame": "^7.27.1", + "@jest/types": "30.2.0", + "@types/stack-utils": "^2.0.3", + "chalk": "^4.1.2", + "graceful-fs": "^4.2.11", + "micromatch": "^4.0.8", + "pretty-format": "30.2.0", "slash": "^3.0.0", - "strip-json-comments": "^3.1.1" + "stack-utils": "^2.0.6" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@types/node": "*", - "ts-node": ">=9.0.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "ts-node": { - "optional": true - } + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "node_modules/jest-diff": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", - "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", + "node_modules/jest-environment-jsdom/node_modules/jest-mock": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-30.2.0.tgz", + "integrity": "sha512-JNNNl2rj4b5ICpmAcq+WbLH83XswjPbjH4T7yvGzfAGCPh1rw+xVNbtk+FnRslvt9lkCcdn9i1oAoKUuFsOxRw==", "dev": true, + "license": "MIT", "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^29.6.3", - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" + "@jest/types": "30.2.0", + "@types/node": "*", + "jest-util": "30.2.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "node_modules/jest-docblock": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", - "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", + "node_modules/jest-environment-jsdom/node_modules/jest-util": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.2.0.tgz", + "integrity": "sha512-QKNsM0o3Xe6ISQU869e+DhG+4CK/48aHYdJZGlFQVTjnbvgpcKyxpzk29fGiO7i/J8VENZ+d2iGnSsvmuHywlA==", "dev": true, + "license": "MIT", "dependencies": { - "detect-newline": "^3.0.0" + "@jest/types": "30.2.0", + "@types/node": "*", + "chalk": "^4.1.2", + "ci-info": "^4.2.0", + "graceful-fs": "^4.2.11", + "picomatch": "^4.0.2" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "node_modules/jest-each": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", - "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", + "node_modules/jest-environment-jsdom/node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/jest-environment-jsdom/node_modules/pretty-format": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.2.0.tgz", + "integrity": "sha512-9uBdv/B4EefsuAL+pWqueZyZS2Ba+LxfFeQ9DN14HU4bN8bhaxKdkpjpB6fs9+pSjIBu+FXQHImEg8j/Lw0+vA==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/types": "^29.6.3", - "chalk": "^4.0.0", - "jest-get-type": "^29.6.3", - "jest-util": "^29.7.0", - "pretty-format": "^29.7.0" + "@jest/schemas": "30.0.5", + "ansi-styles": "^5.2.0", + "react-is": "^18.3.1" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-environment-node": { @@ -3341,7 +4039,8 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/js-yaml": { "version": "3.14.1", @@ -3356,6 +4055,46 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/jsdom": { + "version": "26.1.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-26.1.0.tgz", + "integrity": "sha512-Cvc9WUhxSMEo4McES3P7oK3QaXldCfNWp7pl2NNeiIFlCoLr3kfq9kb1fxftiwk1FLV7CvpvDfonxtzUDeSOPg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cssstyle": "^4.2.1", + "data-urls": "^5.0.0", + "decimal.js": "^10.5.0", + "html-encoding-sniffer": "^4.0.0", + "http-proxy-agent": "^7.0.2", + "https-proxy-agent": "^7.0.6", + "is-potential-custom-element-name": "^1.0.1", + "nwsapi": "^2.2.16", + "parse5": "^7.2.1", + "rrweb-cssom": "^0.8.0", + "saxes": "^6.0.0", + "symbol-tree": "^3.2.4", + "tough-cookie": "^5.1.1", + "w3c-xmlserializer": "^5.0.0", + "webidl-conversions": "^7.0.0", + "whatwg-encoding": "^3.1.1", + "whatwg-mimetype": "^4.0.0", + "whatwg-url": "^14.1.1", + "ws": "^8.18.0", + "xml-name-validator": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "canvas": "^3.0.0" + }, + "peerDependenciesMeta": { + "canvas": { + "optional": true + } + } + }, "node_modules/jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -3411,6 +4150,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, "license": "MIT" }, "node_modules/json-parse-even-better-errors": { @@ -3429,6 +4169,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, "license": "MIT" }, "node_modules/json5": { @@ -3447,6 +4188,7 @@ "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, "license": "MIT", "dependencies": { "json-buffer": "3.0.1" @@ -3474,6 +4216,7 @@ "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1", @@ -3511,6 +4254,7 @@ "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true, "license": "MIT" }, "node_modules/lru-cache": { @@ -3565,10 +4309,11 @@ "dev": true }, "node_modules/micromatch": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", - "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, + "license": "MIT", "dependencies": { "braces": "^3.0.3", "picomatch": "^2.3.1" @@ -3605,7 +4350,8 @@ "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==" + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true }, "node_modules/node-int64": { "version": "0.4.0", @@ -3652,6 +4398,13 @@ "node": ">=8" } }, + "node_modules/nwsapi": { + "version": "2.2.22", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.22.tgz", + "integrity": "sha512-ujSMe1OWVn55euT1ihwCI1ZcAaAU3nxUiDwfDQldc51ZXaB9m2AyOn6/jh1BLe2t/G8xd6uKG1UBF2aZJeg2SQ==", + "dev": true, + "license": "MIT" + }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -3680,6 +4433,7 @@ "version": "0.9.4", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, "license": "MIT", "dependencies": { "deep-is": "^0.1.3", @@ -3802,6 +4556,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/parse5": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.3.0.tgz", + "integrity": "sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==", + "dev": true, + "license": "MIT", + "dependencies": { + "entities": "^6.0.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -3823,6 +4590,7 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, "engines": { "node": ">=8" } @@ -3834,9 +4602,10 @@ "dev": true }, "node_modules/picocolors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", - "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==" + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "license": "ISC" }, "node_modules/picomatch": { "version": "2.3.1", @@ -3875,6 +4644,7 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, "license": "MIT", "engines": { "node": ">= 0.8.0" @@ -3954,6 +4724,7 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, "funding": [ { "type": "github", @@ -4067,16 +4838,25 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, "license": "MIT", "engines": { "iojs": ">=1.0.0", "node": ">=0.10.0" } }, + "node_modules/rrweb-cssom": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.8.0.tgz", + "integrity": "sha512-guoltQEx+9aMf2gDZ0s62EcV8lsXR+0w8915TC3ITdn2YueuNjdAYh/levpU9nFaoChh9RUS5ZdQMrKfVEN9tw==", + "dev": true, + "license": "MIT" + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, "funding": [ { "type": "github", @@ -4096,6 +4876,26 @@ "queue-microtask": "^1.2.2" } }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true, + "license": "MIT" + }, + "node_modules/saxes": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz", + "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==", + "dev": true, + "license": "ISC", + "dependencies": { + "xmlchars": "^2.2.0" + }, + "engines": { + "node": ">=v12.22.7" + } + }, "node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", @@ -4109,6 +4909,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, "dependencies": { "shebang-regex": "^3.0.0" }, @@ -4120,6 +4921,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, "engines": { "node": ">=8" } @@ -4218,6 +5020,7 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, "dependencies": { "ansi-regex": "^5.0.1" }, @@ -4258,6 +5061,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -4277,6 +5081,13 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/symbol-tree": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", + "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", + "dev": true, + "license": "MIT" + }, "node_modules/test-exclude": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", @@ -4295,6 +5106,7 @@ "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true, "license": "MIT" }, "node_modules/tiny-invariant": { @@ -4303,6 +5115,26 @@ "integrity": "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==", "license": "MIT" }, + "node_modules/tldts": { + "version": "6.1.86", + "resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.86.tgz", + "integrity": "sha512-WMi/OQ2axVTf/ykqCQgXiIct+mSQDFdH2fkwhPwgEwvJ1kSzZRiinb0zF2Xb8u4+OqPChmyI6MEu4EezNJz+FQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "tldts-core": "^6.1.86" + }, + "bin": { + "tldts": "bin/cli.js" + } + }, + "node_modules/tldts-core": { + "version": "6.1.86", + "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.86.tgz", + "integrity": "sha512-Je6p7pkk+KMzMv2XXKmAE3McmolOQFdxkKw0R8EYNr7sELW46JqnNeTX8ybPiQgvg1ymCoF8LXs5fzFaZvJPTA==", + "dev": true, + "license": "MIT" + }, "node_modules/tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", @@ -4330,6 +5162,32 @@ "node": ">=8.0" } }, + "node_modules/tough-cookie": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-5.1.2.tgz", + "integrity": "sha512-FVDYdxtnj0G6Qm/DhNPSb8Ju59ULcup3tuJxkFb5K8Bv2pUXILbf0xZWU8PX8Ov19OXljbUyveOFwRMwkXzO+A==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "tldts": "^6.1.32" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/tr46": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-5.1.1.tgz", + "integrity": "sha512-hdF5ZgjTqgAntKkklYw0R03MG2x/bSzTtkxmIRw/sTNV8YXsCJ1tfLAX23lhxhHJlEf3CRCOCGGWw3vI3GaSPw==", + "dev": true, + "license": "MIT", + "dependencies": { + "punycode": "^2.3.1" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/tslib": { "version": "2.6.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", @@ -4340,6 +5198,7 @@ "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1" @@ -4433,6 +5292,19 @@ "node": ">=10.12.0" } }, + "node_modules/w3c-xmlserializer": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-5.0.0.tgz", + "integrity": "sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==", + "dev": true, + "license": "MIT", + "dependencies": { + "xml-name-validator": "^5.0.0" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/walker": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", @@ -4442,10 +5314,58 @@ "makeerror": "1.0.12" } }, + "node_modules/webidl-conversions": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + } + }, + "node_modules/whatwg-encoding": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz", + "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "iconv-lite": "0.6.3" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/whatwg-mimetype": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz", + "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/whatwg-url": { + "version": "14.2.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-14.2.0.tgz", + "integrity": "sha512-De72GdQZzNTUBBChsXueQUnPKDkg/5A5zp7pFDuQAj5UFoENpiACU0wlCvzpAGnTkj++ihpKwKyYewn/XNUbKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "tr46": "^5.1.0", + "webidl-conversions": "^7.0.0" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, "dependencies": { "isexe": "^2.0.0" }, @@ -4460,6 +5380,7 @@ "version": "1.2.5", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -4501,6 +5422,45 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, + "node_modules/ws": { + "version": "8.18.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz", + "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/xml-name-validator": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-5.0.0.tgz", + "integrity": "sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/xmlchars": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", + "dev": true, + "license": "MIT" + }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",