diff options
| author | dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> | 2026-07-12 08:56:35 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-07-12 08:56:35 +0200 |
| commit | 74b4e7c8d180b54d2ab5204d304d4bd579eab902 (patch) | |
| tree | 3cb72d43afc72672a81175185502dc72cba946a7 /searx/static/themes | |
| parent | 39f4dd24a5bd755cc96ab377b27527b9b791cd7a (diff) | |
[upd] web-client (simple): Bump the minor group across 1 directory with 5 updates (#6399)
Bumps the minor group with 5 updates in the /client/simple directory:
| Package | From | To |
| --- | --- | --- |
| [@biomejs/biome](https://github.com/biomejs/biome/tree/HEAD/packages/@biomejs/biome) | `2.5.2` | `2.5.3` |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `26.1.0` | `26.1.1` |
| [browserslist](https://github.com/browserslist/browserslist) | `4.28.4` | `4.28.6` |
| [svgo](https://github.com/svg/svgo) | `4.0.1` | `4.0.2` |
| [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) | `8.1.3` | `8.1.4` |
Updates `@biomejs/biome` from 2.5.2 to 2.5.3
- [Release notes](https://github.com/biomejs/biome/releases)
- [Changelog](https://github.com/biomejs/biome/blob/main/packages/@biomejs/biome/CHANGELOG.md)
- [Commits](https://github.com/biomejs/biome/commits/@biomejs/biome@2.5.3/packages/@biomejs/biome)
Updates `@types/node` from 26.1.0 to 26.1.1
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)
Updates `browserslist` from 4.28.4 to 4.28.6
- [Release notes](https://github.com/browserslist/browserslist/releases)
- [Changelog](https://github.com/browserslist/browserslist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/browserslist/browserslist/compare/4.28.4...4.28.6)
Updates `svgo` from 4.0.1 to 4.0.2
- [Release notes](https://github.com/svg/svgo/releases)
- [Commits](https://github.com/svg/svgo/compare/v4.0.1...v4.0.2)
Updates `vite` from 8.1.3 to 8.1.4
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v8.1.4/packages/vite)
---
updated-dependencies:
- dependency-name: "@biomejs/biome"
dependency-version: 2.5.3
dependency-type: direct:development
update-type: version-update:semver-patch
dependency-group: minor
- dependency-name: "@types/node"
dependency-version: 26.1.1
dependency-type: direct:development
update-type: version-update:semver-patch
dependency-group: minor
- dependency-name: browserslist
dependency-version: 4.28.6
dependency-type: direct:development
update-type: version-update:semver-patch
dependency-group: minor
- dependency-name: svgo
dependency-version: 4.0.2
dependency-type: direct:development
update-type: version-update:semver-patch
dependency-group: minor
- dependency-name: vite
dependency-version: 8.1.4
dependency-type: direct:development
update-type: version-update:semver-patch
dependency-group: minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Diffstat (limited to 'searx/static/themes')
| -rw-r--r-- | searx/static/themes/simple/sxng-core.min.js | 2 | ||||
| -rw-r--r-- | searx/static/themes/simple/sxng-core.min.js.map | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/searx/static/themes/simple/sxng-core.min.js b/searx/static/themes/simple/sxng-core.min.js index e05b2668f..a70162f10 100644 --- a/searx/static/themes/simple/sxng-core.min.js +++ b/searx/static/themes/simple/sxng-core.min.js @@ -1,3 +1,3 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./chunk/BnnvKC7b.min.js","./sxng-mapview.min.css","./chunk/DpvWr1cn.min.js","./chunk/DK4yUVpy.min.js","./chunk/DcK-mo-Y.min.js","./chunk/C8c7HJzp.min.js","./chunk/C93hSkpT.min.js","./chunk/5Ako-qGW.min.js","./chunk/DvCYLbJr.min.js","./chunk/od7pNHfk.min.js","./chunk/e2-9fzwE.min.js"])))=>i.map(i=>d[i]); -var e=class{id;constructor(e){this.id=e,queueMicrotask(()=>this.invoke())}async invoke(){try{console.debug(`[PLUGIN] ${this.id}: Running...`);let e=await this.run();if(!e)return;console.debug(`[PLUGIN] ${this.id}: Running post-exec...`),await this.post(e)}catch(e){console.error(`[PLUGIN] ${this.id}:`,e)}finally{console.debug(`[PLUGIN] ${this.id}: Done.`)}}},t={index:`index`,results:`results`,preferences:`preferences`,unknown:`unknown`},n={closeDetail:void 0,scrollPageToSelected:void 0,selectImage:void 0,selectNext:void 0,selectPrevious:void 0},r=()=>{let e=document.querySelector(`meta[name="endpoint"]`)?.getAttribute(`content`);return e&&e in t?e:t.unknown},i=()=>{let e=document.querySelector(`script[client_settings]`)?.getAttribute(`client_settings`);if(!e)return{};try{return JSON.parse(atob(e))}catch(e){return console.error(`Failed to load client_settings:`,e),{}}},a=async(e,t,n)=>{let r=new AbortController,i=setTimeout(()=>r.abort(),n?.timeout??3e4),a=await fetch(t,{body:n?.body,method:e,signal:r.signal}).finally(()=>clearTimeout(i));if(!a.ok)throw Error(a.statusText);return a},o=(e,t,n,r)=>{if(typeof t!=`string`){t.addEventListener(e,n,r);return}document.addEventListener(e,e=>{for(let r of e.composedPath())if(r instanceof HTMLElement&&r.matches(t)){try{n.call(r,e)}catch(e){console.error(e)}break}},r)},s=(e,t)=>{for(let e of t?.on??[])if(!e)return;document.readyState===`loading`?o(`DOMContentLoaded`,document,e,{once:!0}):e()},c=r(),l=i(),u=(e,t)=>{d(t)&&e()},d=e=>{switch(e.on){case`global`:return!0;case`endpoint`:return!!e.where.includes(c)}},f=`modulepreload`,p=function(e,t){return new URL(e,t).href},m={},h=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,new URL(`../../../src/node/plugins/importAnalysisBuild.ts`,import.meta.url)).href}r=o(t.map(t=>{if(t=p(t,n),t=s(t),t in m)return;m[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:f,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};s(()=>{document.documentElement.classList.remove(`no-js`),document.documentElement.classList.add(`js`),o(`click`,`.close`,function(){this.parentNode?.classList.add(`invisible`)}),o(`click`,`.searxng_init_map`,async function(e){e.preventDefault(),this.classList.remove(`searxng_init_map`),u(()=>h(async()=>{let{default:e}=await import(`./chunk/BnnvKC7b.min.js`);return{default:e}},__vite__mapDeps([0,1]),import.meta.url).then(({default:e})=>new e(this)),{on:`endpoint`,where:[t.results]})}),l.plugins?.includes(`infiniteScroll`)&&u(()=>h(async()=>{let{default:e}=await import(`./chunk/DpvWr1cn.min.js`);return{default:e}},__vite__mapDeps([2,3,4]),import.meta.url).then(({default:e})=>new e),{on:`endpoint`,where:[t.results]}),l.plugins?.includes(`calculator`)&&u(()=>h(async()=>{let{default:e}=await import(`./chunk/C8c7HJzp.min.js`);return{default:e}},__vite__mapDeps([5,4,3]),import.meta.url).then(({default:e})=>new e),{on:`endpoint`,where:[t.results]})}),s(()=>{h(()=>import(`./chunk/C93hSkpT.min.js`),__vite__mapDeps([6,3]),import.meta.url),h(()=>import(`./chunk/5Ako-qGW.min.js`),__vite__mapDeps([7,4,3]),import.meta.url),l.autocomplete&&h(()=>import(`./chunk/DvCYLbJr.min.js`),__vite__mapDeps([8,3]),import.meta.url)},{on:[c===t.index]}),s(()=>{h(()=>import(`./chunk/C93hSkpT.min.js`),__vite__mapDeps([6,3]),import.meta.url),h(()=>import(`./chunk/od7pNHfk.min.js`),__vite__mapDeps([9,3]),import.meta.url),h(()=>import(`./chunk/5Ako-qGW.min.js`),__vite__mapDeps([7,4,3]),import.meta.url),l.autocomplete&&h(()=>import(`./chunk/DvCYLbJr.min.js`),__vite__mapDeps([8,3]),import.meta.url)},{on:[c===t.results]}),s(()=>{h(()=>import(`./chunk/e2-9fzwE.min.js`),__vite__mapDeps([10,3]),import.meta.url)},{on:[c===t.preferences]});export{e as a,l as i,o as n,n as r,a as t}; +var e=class{id;constructor(e){this.id=e,queueMicrotask(()=>this.invoke())}async invoke(){try{console.debug(`[PLUGIN] ${this.id}: Running...`);let e=await this.run();if(!e)return;console.debug(`[PLUGIN] ${this.id}: Running post-exec...`),await this.post(e)}catch(e){console.error(`[PLUGIN] ${this.id}:`,e)}finally{console.debug(`[PLUGIN] ${this.id}: Done.`)}}},t={index:`index`,results:`results`,preferences:`preferences`,unknown:`unknown`},n={closeDetail:void 0,scrollPageToSelected:void 0,selectImage:void 0,selectNext:void 0,selectPrevious:void 0},r=()=>{let e=document.querySelector(`meta[name="endpoint"]`)?.getAttribute(`content`);return e&&e in t?e:t.unknown},i=()=>{let e=document.querySelector(`script[client_settings]`)?.getAttribute(`client_settings`);if(!e)return{};try{return JSON.parse(atob(e))}catch(e){return console.error(`Failed to load client_settings:`,e),{}}},a=async(e,t,n)=>{let r=new AbortController,i=setTimeout(()=>r.abort(),n?.timeout??3e4),a=await fetch(t,{body:n?.body,method:e,signal:r.signal}).finally(()=>clearTimeout(i));if(!a.ok)throw Error(a.statusText);return a},o=(e,t,n,r)=>{if(typeof t!=`string`){t.addEventListener(e,n,r);return}document.addEventListener(e,e=>{for(let r of e.composedPath())if(r instanceof HTMLElement&&r.matches(t)){try{n.call(r,e)}catch(e){console.error(e)}break}},r)},s=(e,t)=>{for(let e of t?.on??[])if(!e)return;document.readyState===`loading`?o(`DOMContentLoaded`,document,e,{once:!0}):e()},c=r(),l=i(),u=(e,t)=>{d(t)&&e()},d=e=>{switch(e.on){case`global`:return!0;case`endpoint`:return!!e.where.includes(c)}},f=`modulepreload`,p=function(e,t){return new URL(e,t).href},m={},h=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=p(t,n),t=s(t),t in m)return;m[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:f,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};s(()=>{document.documentElement.classList.remove(`no-js`),document.documentElement.classList.add(`js`),o(`click`,`.close`,function(){this.parentNode?.classList.add(`invisible`)}),o(`click`,`.searxng_init_map`,async function(e){e.preventDefault(),this.classList.remove(`searxng_init_map`),u(()=>h(async()=>{let{default:e}=await import(`./chunk/BnnvKC7b.min.js`);return{default:e}},__vite__mapDeps([0,1]),import.meta.url).then(({default:e})=>new e(this)),{on:`endpoint`,where:[t.results]})}),l.plugins?.includes(`infiniteScroll`)&&u(()=>h(async()=>{let{default:e}=await import(`./chunk/DpvWr1cn.min.js`);return{default:e}},__vite__mapDeps([2,3,4]),import.meta.url).then(({default:e})=>new e),{on:`endpoint`,where:[t.results]}),l.plugins?.includes(`calculator`)&&u(()=>h(async()=>{let{default:e}=await import(`./chunk/C8c7HJzp.min.js`);return{default:e}},__vite__mapDeps([5,4,3]),import.meta.url).then(({default:e})=>new e),{on:`endpoint`,where:[t.results]})}),s(()=>{h(()=>import(`./chunk/C93hSkpT.min.js`),__vite__mapDeps([6,3]),import.meta.url),h(()=>import(`./chunk/5Ako-qGW.min.js`),__vite__mapDeps([7,4,3]),import.meta.url),l.autocomplete&&h(()=>import(`./chunk/DvCYLbJr.min.js`),__vite__mapDeps([8,3]),import.meta.url)},{on:[c===t.index]}),s(()=>{h(()=>import(`./chunk/C93hSkpT.min.js`),__vite__mapDeps([6,3]),import.meta.url),h(()=>import(`./chunk/od7pNHfk.min.js`),__vite__mapDeps([9,3]),import.meta.url),h(()=>import(`./chunk/5Ako-qGW.min.js`),__vite__mapDeps([7,4,3]),import.meta.url),l.autocomplete&&h(()=>import(`./chunk/DvCYLbJr.min.js`),__vite__mapDeps([8,3]),import.meta.url)},{on:[c===t.results]}),s(()=>{h(()=>import(`./chunk/e2-9fzwE.min.js`),__vite__mapDeps([10,3]),import.meta.url)},{on:[c===t.preferences]});export{e as a,l as i,o as n,n as r,a as t}; //# sourceMappingURL=sxng-core.min.js.map
\ No newline at end of file diff --git a/searx/static/themes/simple/sxng-core.min.js.map b/searx/static/themes/simple/sxng-core.min.js.map index 770c4027b..294604400 100644 --- a/searx/static/themes/simple/sxng-core.min.js.map +++ b/searx/static/themes/simple/sxng-core.min.js.map @@ -1 +1 @@ -{"version":3,"mappings":";AAYA,IAAsB,EAAtB,KAA6B,CAI3B,GAMA,YAAsB,EAAY,CAChC,KAAK,GAAK,EAEV,mBAAqB,KAAK,OAAO,CAAC,CACpC,CAEA,MAAc,QAAwB,CACpC,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C,sDAAR,MAAM,CAAE,QAAS,KAAa,IAAI,CAAQ,EAAG,CAC3F,GAAI,WACJ,MAAO,CAAC,EAAU,OAAO,CAC3B,CAAC,EAGC,EAAS,SAAS,SAAS,YAAY,GACzC,qBAAkD,CAAE,QAAS,SAAlD,OAAO,kCAAkC,sDAAR,MAAM,CAAE,QAAS,KAAa,IAAI,CAAQ,EAAG,CACvF,GAAI,WACJ,MAAO,CAAC,EAAU,OAAO,CAC3B,CAAC,CAEL,CAAC,EAED,MACQ,CACJ,MAAK,OAAO,mEACZ,MAAK,OAAO,qEAER,EAAS,cACX,MAAK,OAAO,kEAEhB,EACA,CAAE,GAAI,CAAC,IAAa,EAAU,KAAK,CAAE,CACvC,EAEA,MACQ,CACJ,MAAK,OAAO,mEACZ,MAAK,OAAO,mEACZ,MAAK,OAAO,qEAER,EAAS,cACX,MAAK,OAAO,kEAEhB,EACA,CAAE,GAAI,CAAC,IAAa,EAAU,OAAO,CAAE,CACzC,EAEA,MACQ,CACJ,MAAK,OAAO,mEACd,EACA,CAAE,GAAI,CAAC,IAAa,EAAU,WAAW,CAAE,CAC7C","names":[],"ignoreList":[],"sources":["../../../../client/simple/src/js/Plugin.ts","../../../../client/simple/src/js/toolkit.ts","../../../../client/simple/src/js/loader.ts","../../../../client/simple/src/js/router.ts"],"sourcesContent":["// SPDX-License-Identifier: AGPL-3.0-or-later\n\n/**\n * Base class for client-side plugins.\n *\n * @remarks\n * Handle conditional loading of the plugin in:\n *\n * - client/simple/src/js/router.ts\n *\n * @abstract\n */\nexport abstract class Plugin {\n /**\n * Plugin name.\n */\n protected readonly id: string;\n\n /**\n * @remarks\n * Don't hold references of this instance outside the class.\n */\n protected constructor(id: string) {\n this.id = id;\n\n queueMicrotask(() => this.invoke());\n }\n\n private async invoke(): Promise<void> {\n try {\n console.debug(`[PLUGIN] ${this.id}: Running...`);\n const result = await this.run();\n if (!result) return;\n\n console.debug(`[PLUGIN] ${this.id}: Running post-exec...`);\n // @ts-expect-error\n void (await this.post(result as NonNullable<Awaited<ReturnType<this[\"run\"]>>>));\n } catch (error) {\n console.error(`[PLUGIN] ${this.id}:`, error);\n } finally {\n console.debug(`[PLUGIN] ${this.id}: Done.`);\n }\n }\n\n /**\n * Plugin goes here.\n *\n * @remarks\n * The plugin is already loaded at this point. If you wish to execute\n * conditions to exit early, consider moving the logic to:\n *\n * - client/simple/src/js/router.ts\n *\n * ...to avoid unnecessarily loading this plugin on the client.\n */\n protected abstract run(): Promise<unknown>;\n\n /**\n * Post-execution hook.\n *\n * @remarks\n * The hook is only executed if `#run()` returns a truthy value.\n */\n // @ts-expect-error\n protected abstract post(result: NonNullable<Awaited<ReturnType<this[\"run\"]>>>): Promise<void>;\n}\n","// SPDX-License-Identifier: AGPL-3.0-or-later\n\nimport type { KeyBindingLayout } from \"./main/keyboard.ts\";\n\n// synced with searx/webapp.py get_client_settings\ntype Settings = {\n plugins?: string[];\n autocomplete?: string;\n autocomplete_min?: number;\n doi_resolver?: string;\n favicon_resolver?: string;\n hotkeys?: KeyBindingLayout;\n method?: \"GET\" | \"POST\";\n query_in_title?: boolean;\n results_on_new_tab?: boolean;\n safesearch?: 0 | 1 | 2;\n search_on_category_select?: boolean;\n theme?: string;\n theme_static_path?: string;\n translations?: Record<string, string>;\n url_formatting?: \"pretty\" | \"full\" | \"host\";\n};\n\ntype HTTPOptions = {\n body?: BodyInit;\n timeout?: number;\n};\n\ntype ReadyOptions = {\n // all values must be truthy for the callback to be executed\n on?: (boolean | undefined)[];\n};\n\nexport type EndpointsKeys = keyof typeof Endpoints;\n\nexport const Endpoints = {\n index: \"index\",\n results: \"results\",\n preferences: \"preferences\",\n unknown: \"unknown\"\n} as const;\n\nexport const mutable = {\n closeDetail: undefined as (() => void) | undefined,\n scrollPageToSelected: undefined as (() => void) | undefined,\n selectImage: undefined as ((resultElement: HTMLElement) => void) | undefined,\n selectNext: undefined as ((openDetailView?: boolean) => void) | undefined,\n selectPrevious: undefined as ((openDetailView?: boolean) => void) | undefined\n};\n\nconst getEndpoint = (): EndpointsKeys => {\n const metaEndpoint = document.querySelector('meta[name=\"endpoint\"]')?.getAttribute(\"content\");\n\n if (metaEndpoint && metaEndpoint in Endpoints) {\n return metaEndpoint as EndpointsKeys;\n }\n\n return Endpoints.unknown;\n};\n\nconst getSettings = (): Settings => {\n const settings = document.querySelector(\"script[client_settings]\")?.getAttribute(\"client_settings\");\n if (!settings) return {};\n\n try {\n return JSON.parse(atob(settings));\n } catch (error) {\n console.error(\"Failed to load client_settings:\", error);\n return {};\n }\n};\n\nexport const http = async (method: string, url: string | URL, options?: HTTPOptions): Promise<Response> => {\n const controller = new AbortController();\n const timeoutId = setTimeout(() => controller.abort(), options?.timeout ?? 30_000);\n\n const res = await fetch(url, {\n body: options?.body,\n method: method,\n signal: controller.signal\n }).finally(() => clearTimeout(timeoutId));\n if (!res.ok) {\n throw new Error(res.statusText);\n }\n\n return res;\n};\n\nexport const listen = <K extends keyof DocumentEventMap, E extends HTMLElement>(\n type: string | K,\n target: string | Document | E,\n listener: (this: E, event: DocumentEventMap[K]) => void | Promise<void>,\n options?: AddEventListenerOptions\n): void => {\n if (typeof target !== \"string\") {\n target.addEventListener(type, listener as EventListener, options);\n return;\n }\n\n document.addEventListener(\n type,\n (event: Event) => {\n for (const node of event.composedPath()) {\n if (node instanceof HTMLElement && node.matches(target)) {\n try {\n listener.call(node as E, event as DocumentEventMap[K]);\n } catch (error) {\n console.error(error);\n }\n break;\n }\n }\n },\n options\n );\n};\n\nexport const ready = (callback: () => void, options?: ReadyOptions): void => {\n for (const condition of options?.on ?? []) {\n if (!condition) {\n return;\n }\n }\n\n if (document.readyState === \"loading\") {\n listen(\"DOMContentLoaded\", document, callback, { once: true });\n } else {\n callback();\n }\n};\n\nexport const endpoint: EndpointsKeys = getEndpoint();\nexport const settings: Settings = getSettings();\n","// SPDX-License-Identifier: AGPL-3.0-or-later\n\nimport type { Plugin } from \"./Plugin.ts\";\nimport { type EndpointsKeys, endpoint } from \"./toolkit.ts\";\n\ntype Options =\n | {\n on: \"global\";\n }\n | {\n on: \"endpoint\";\n where: EndpointsKeys[];\n };\n\nexport const load = <T extends Plugin>(instance: () => Promise<T>, options: Options): void => {\n if (!check(options)) return;\n\n void instance();\n};\n\nconst check = (options: Options): boolean => {\n // biome-ignore lint/style/useDefaultSwitchClause: options is typed\n switch (options.on) {\n case \"global\": {\n return true;\n }\n case \"endpoint\": {\n if (!options.where.includes(endpoint)) {\n // not on the expected endpoint\n return false;\n }\n\n return true;\n }\n }\n};\n","// SPDX-License-Identifier: AGPL-3.0-or-later\n\nimport { load } from \"./loader.ts\";\nimport { Endpoints, endpoint, listen, ready, settings } from \"./toolkit.ts\";\n\nready(() => {\n document.documentElement.classList.remove(\"no-js\");\n document.documentElement.classList.add(\"js\");\n\n listen(\"click\", \".close\", function (this: HTMLElement) {\n (this.parentNode as HTMLElement)?.classList.add(\"invisible\");\n });\n\n listen(\"click\", \".searxng_init_map\", async function (this: HTMLElement, event: Event) {\n event.preventDefault();\n this.classList.remove(\"searxng_init_map\");\n\n load(() => import(\"./plugin/MapView.ts\").then(({ default: Plugin }) => new Plugin(this)), {\n on: \"endpoint\",\n where: [Endpoints.results]\n });\n });\n\n if (settings.plugins?.includes(\"infiniteScroll\")) {\n load(() => import(\"./plugin/InfiniteScroll.ts\").then(({ default: Plugin }) => new Plugin()), {\n on: \"endpoint\",\n where: [Endpoints.results]\n });\n }\n\n if (settings.plugins?.includes(\"calculator\")) {\n load(() => import(\"./plugin/Calculator.ts\").then(({ default: Plugin }) => new Plugin()), {\n on: \"endpoint\",\n where: [Endpoints.results]\n });\n }\n});\n\nready(\n () => {\n void import(\"./main/keyboard.ts\");\n void import(\"./main/search.ts\");\n\n if (settings.autocomplete) {\n void import(\"./main/autocomplete.ts\");\n }\n },\n { on: [endpoint === Endpoints.index] }\n);\n\nready(\n () => {\n void import(\"./main/keyboard.ts\");\n void import(\"./main/results.ts\");\n void import(\"./main/search.ts\");\n\n if (settings.autocomplete) {\n void import(\"./main/autocomplete.ts\");\n }\n },\n { on: [endpoint === Endpoints.results] }\n);\n\nready(\n () => {\n void import(\"./main/preferences.ts\");\n },\n { on: [endpoint === Endpoints.preferences] }\n);\n"],"file":"sxng-core.min.js"}
\ No newline at end of file +{"version":3,"mappings":";AAYA,IAAsB,EAAtB,KAA6B,CAI3B,GAMA,YAAsB,EAAY,CAChC,KAAK,GAAK,EAEV,mBAAqB,KAAK,OAAO,CAAC,CACpC,CAEA,MAAc,QAAwB,CACpC,GAAI,CACF,QAAQ,MAAM,YAAY,KAAK,GAAG,aAAa,EAC/C,IAAM,EAAS,MAAM,KAAK,IAAI,EAC9B,GAAI,CAAC,EAAQ,OAEb,QAAQ,MAAM,YAAY,KAAK,GAAG,uBAAuB,EAEzD,MAAY,KAAK,KAAK,CAAuD,CAC/E,OAAS,EAAO,CACd,QAAQ,MAAM,YAAY,KAAK,GAAG,GAAI,CAAK,CAC7C,QAAU,CACR,QAAQ,MAAM,YAAY,KAAK,GAAG,QAAQ,CAC5C,CACF,CAuBF,EC9Ba,EAAY,CACvB,MAAO,QACP,QAAS,UACT,YAAa,cACb,QAAS,SACX,EAEa,EAAU,CACrB,YAAa,OACb,qBAAsB,OACtB,YAAa,OACb,WAAY,OACZ,eAAgB,MAClB,EAEM,MAAmC,CACvC,IAAM,EAAe,SAAS,cAAc,uBAAuB,CAAC,EAAE,aAAa,SAAS,EAM5F,OAJI,GAAgB,KAAgB,EAC3B,EAGF,EAAU,OACnB,EAEM,MAA8B,CAClC,IAAM,EAAW,SAAS,cAAc,yBAAyB,CAAC,EAAE,aAAa,iBAAiB,EAClG,GAAI,CAAC,EAAU,MAAO,CAAC,EAEvB,GAAI,CACF,OAAO,KAAK,MAAM,KAAK,CAAQ,CAAC,CAClC,OAAS,EAAO,CAEd,OADA,QAAQ,MAAM,kCAAmC,CAAK,EAC/C,CAAC,CACV,CACF,EAEa,EAAO,MAAO,EAAgB,EAAmB,IAA6C,CACzG,IAAM,EAAa,IAAI,gBACjB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c,CACpF,EAAM,eAAe,EACrB,KAAK,UAAU,OAAO,kBAAkB,EAExC,qBAA+C,CAAE,QAAS,SAA/C,OAAO,kCAA+B,oDAAR,MAAM,CAAE,QAAS,KAAa,IAAI,EAAO,IAAI,CAAC,EAAG,CACxF,GAAI,WACJ,MAAO,CAAC,EAAU,OAAO,CAC3B,CAAC,CACH,CAAC,EAEG,EAAS,SAAS,SAAS,gBAAgB,GAC7C,qBAAsD,CAAE,QAAS,SAAtD,OAAO,kCAAsC,sDAAR,MAAM,CAAE,QAAS,KAAa,IAAI,CAAQ,EAAG,CAC3F,GAAI,WACJ,MAAO,CAAC,EAAU,OAAO,CAC3B,CAAC,EAGC,EAAS,SAAS,SAAS,YAAY,GACzC,qBAAkD,CAAE,QAAS,SAAlD,OAAO,kCAAkC,sDAAR,MAAM,CAAE,QAAS,KAAa,IAAI,CAAQ,EAAG,CACvF,GAAI,WACJ,MAAO,CAAC,EAAU,OAAO,CAC3B,CAAC,CAEL,CAAC,EAED,MACQ,CACJ,MAAK,OAAO,mEACZ,MAAK,OAAO,qEAER,EAAS,cACX,MAAK,OAAO,kEAEhB,EACA,CAAE,GAAI,CAAC,IAAa,EAAU,KAAK,CAAE,CACvC,EAEA,MACQ,CACJ,MAAK,OAAO,mEACZ,MAAK,OAAO,mEACZ,MAAK,OAAO,qEAER,EAAS,cACX,MAAK,OAAO,kEAEhB,EACA,CAAE,GAAI,CAAC,IAAa,EAAU,OAAO,CAAE,CACzC,EAEA,MACQ,CACJ,MAAK,OAAO,mEACd,EACA,CAAE,GAAI,CAAC,IAAa,EAAU,WAAW,CAAE,CAC7C","names":[],"ignoreList":[],"sources":["../../../../client/simple/src/js/Plugin.ts","../../../../client/simple/src/js/toolkit.ts","../../../../client/simple/src/js/loader.ts","../../../../client/simple/src/js/router.ts"],"sourcesContent":["// SPDX-License-Identifier: AGPL-3.0-or-later\n\n/**\n * Base class for client-side plugins.\n *\n * @remarks\n * Handle conditional loading of the plugin in:\n *\n * - client/simple/src/js/router.ts\n *\n * @abstract\n */\nexport abstract class Plugin {\n /**\n * Plugin name.\n */\n protected readonly id: string;\n\n /**\n * @remarks\n * Don't hold references of this instance outside the class.\n */\n protected constructor(id: string) {\n this.id = id;\n\n queueMicrotask(() => this.invoke());\n }\n\n private async invoke(): Promise<void> {\n try {\n console.debug(`[PLUGIN] ${this.id}: Running...`);\n const result = await this.run();\n if (!result) return;\n\n console.debug(`[PLUGIN] ${this.id}: Running post-exec...`);\n // @ts-expect-error\n void (await this.post(result as NonNullable<Awaited<ReturnType<this[\"run\"]>>>));\n } catch (error) {\n console.error(`[PLUGIN] ${this.id}:`, error);\n } finally {\n console.debug(`[PLUGIN] ${this.id}: Done.`);\n }\n }\n\n /**\n * Plugin goes here.\n *\n * @remarks\n * The plugin is already loaded at this point. If you wish to execute\n * conditions to exit early, consider moving the logic to:\n *\n * - client/simple/src/js/router.ts\n *\n * ...to avoid unnecessarily loading this plugin on the client.\n */\n protected abstract run(): Promise<unknown>;\n\n /**\n * Post-execution hook.\n *\n * @remarks\n * The hook is only executed if `#run()` returns a truthy value.\n */\n // @ts-expect-error\n protected abstract post(result: NonNullable<Awaited<ReturnType<this[\"run\"]>>>): Promise<void>;\n}\n","// SPDX-License-Identifier: AGPL-3.0-or-later\n\nimport type { KeyBindingLayout } from \"./main/keyboard.ts\";\n\n// synced with searx/webapp.py get_client_settings\ntype Settings = {\n plugins?: string[];\n autocomplete?: string;\n autocomplete_min?: number;\n doi_resolver?: string;\n favicon_resolver?: string;\n hotkeys?: KeyBindingLayout;\n method?: \"GET\" | \"POST\";\n query_in_title?: boolean;\n results_on_new_tab?: boolean;\n safesearch?: 0 | 1 | 2;\n search_on_category_select?: boolean;\n theme?: string;\n theme_static_path?: string;\n translations?: Record<string, string>;\n url_formatting?: \"pretty\" | \"full\" | \"host\";\n};\n\ntype HTTPOptions = {\n body?: BodyInit;\n timeout?: number;\n};\n\ntype ReadyOptions = {\n // all values must be truthy for the callback to be executed\n on?: (boolean | undefined)[];\n};\n\nexport type EndpointsKeys = keyof typeof Endpoints;\n\nexport const Endpoints = {\n index: \"index\",\n results: \"results\",\n preferences: \"preferences\",\n unknown: \"unknown\"\n} as const;\n\nexport const mutable = {\n closeDetail: undefined as (() => void) | undefined,\n scrollPageToSelected: undefined as (() => void) | undefined,\n selectImage: undefined as ((resultElement: HTMLElement) => void) | undefined,\n selectNext: undefined as ((openDetailView?: boolean) => void) | undefined,\n selectPrevious: undefined as ((openDetailView?: boolean) => void) | undefined\n};\n\nconst getEndpoint = (): EndpointsKeys => {\n const metaEndpoint = document.querySelector('meta[name=\"endpoint\"]')?.getAttribute(\"content\");\n\n if (metaEndpoint && metaEndpoint in Endpoints) {\n return metaEndpoint as EndpointsKeys;\n }\n\n return Endpoints.unknown;\n};\n\nconst getSettings = (): Settings => {\n const settings = document.querySelector(\"script[client_settings]\")?.getAttribute(\"client_settings\");\n if (!settings) return {};\n\n try {\n return JSON.parse(atob(settings));\n } catch (error) {\n console.error(\"Failed to load client_settings:\", error);\n return {};\n }\n};\n\nexport const http = async (method: string, url: string | URL, options?: HTTPOptions): Promise<Response> => {\n const controller = new AbortController();\n const timeoutId = setTimeout(() => controller.abort(), options?.timeout ?? 30_000);\n\n const res = await fetch(url, {\n body: options?.body,\n method: method,\n signal: controller.signal\n }).finally(() => clearTimeout(timeoutId));\n if (!res.ok) {\n throw new Error(res.statusText);\n }\n\n return res;\n};\n\nexport const listen = <K extends keyof DocumentEventMap, E extends HTMLElement>(\n type: string | K,\n target: string | Document | E,\n listener: (this: E, event: DocumentEventMap[K]) => void | Promise<void>,\n options?: AddEventListenerOptions\n): void => {\n if (typeof target !== \"string\") {\n target.addEventListener(type, listener as EventListener, options);\n return;\n }\n\n document.addEventListener(\n type,\n (event: Event) => {\n for (const node of event.composedPath()) {\n if (node instanceof HTMLElement && node.matches(target)) {\n try {\n listener.call(node as E, event as DocumentEventMap[K]);\n } catch (error) {\n console.error(error);\n }\n break;\n }\n }\n },\n options\n );\n};\n\nexport const ready = (callback: () => void, options?: ReadyOptions): void => {\n for (const condition of options?.on ?? []) {\n if (!condition) {\n return;\n }\n }\n\n if (document.readyState === \"loading\") {\n listen(\"DOMContentLoaded\", document, callback, { once: true });\n } else {\n callback();\n }\n};\n\nexport const endpoint: EndpointsKeys = getEndpoint();\nexport const settings: Settings = getSettings();\n","// SPDX-License-Identifier: AGPL-3.0-or-later\n\nimport type { Plugin } from \"./Plugin.ts\";\nimport { type EndpointsKeys, endpoint } from \"./toolkit.ts\";\n\ntype Options =\n | {\n on: \"global\";\n }\n | {\n on: \"endpoint\";\n where: EndpointsKeys[];\n };\n\nexport const load = <T extends Plugin>(instance: () => Promise<T>, options: Options): void => {\n if (!check(options)) return;\n\n void instance();\n};\n\nconst check = (options: Options): boolean => {\n // biome-ignore lint/style/useDefaultSwitchClause: options is typed\n switch (options.on) {\n case \"global\": {\n return true;\n }\n case \"endpoint\": {\n if (!options.where.includes(endpoint)) {\n // not on the expected endpoint\n return false;\n }\n\n return true;\n }\n }\n};\n","// SPDX-License-Identifier: AGPL-3.0-or-later\n\nimport { load } from \"./loader.ts\";\nimport { Endpoints, endpoint, listen, ready, settings } from \"./toolkit.ts\";\n\nready(() => {\n document.documentElement.classList.remove(\"no-js\");\n document.documentElement.classList.add(\"js\");\n\n listen(\"click\", \".close\", function (this: HTMLElement) {\n (this.parentNode as HTMLElement)?.classList.add(\"invisible\");\n });\n\n listen(\"click\", \".searxng_init_map\", async function (this: HTMLElement, event: Event) {\n event.preventDefault();\n this.classList.remove(\"searxng_init_map\");\n\n load(() => import(\"./plugin/MapView.ts\").then(({ default: Plugin }) => new Plugin(this)), {\n on: \"endpoint\",\n where: [Endpoints.results]\n });\n });\n\n if (settings.plugins?.includes(\"infiniteScroll\")) {\n load(() => import(\"./plugin/InfiniteScroll.ts\").then(({ default: Plugin }) => new Plugin()), {\n on: \"endpoint\",\n where: [Endpoints.results]\n });\n }\n\n if (settings.plugins?.includes(\"calculator\")) {\n load(() => import(\"./plugin/Calculator.ts\").then(({ default: Plugin }) => new Plugin()), {\n on: \"endpoint\",\n where: [Endpoints.results]\n });\n }\n});\n\nready(\n () => {\n void import(\"./main/keyboard.ts\");\n void import(\"./main/search.ts\");\n\n if (settings.autocomplete) {\n void import(\"./main/autocomplete.ts\");\n }\n },\n { on: [endpoint === Endpoints.index] }\n);\n\nready(\n () => {\n void import(\"./main/keyboard.ts\");\n void import(\"./main/results.ts\");\n void import(\"./main/search.ts\");\n\n if (settings.autocomplete) {\n void import(\"./main/autocomplete.ts\");\n }\n },\n { on: [endpoint === Endpoints.results] }\n);\n\nready(\n () => {\n void import(\"./main/preferences.ts\");\n },\n { on: [endpoint === Endpoints.preferences] }\n);\n"],"file":"sxng-core.min.js"}
\ No newline at end of file |
