summaryrefslogtreecommitdiff
path: root/searx/static/themes/simple/js/searxng.core.min.js.map
diff options
context:
space:
mode:
Diffstat (limited to 'searx/static/themes/simple/js/searxng.core.min.js.map')
-rw-r--r--searx/static/themes/simple/js/searxng.core.min.js.map1
1 files changed, 1 insertions, 0 deletions
diff --git a/searx/static/themes/simple/js/searxng.core.min.js.map b/searx/static/themes/simple/js/searxng.core.min.js.map
new file mode 100644
index 000000000..df062bc05
--- /dev/null
+++ b/searx/static/themes/simple/js/searxng.core.min.js.map
@@ -0,0 +1 @@
+{"version":3,"mappings":"AAsCA,MAAa,EAAY,CACvB,MAAO,QACP,QAAS,UACT,YAAa,cACb,QAAS,SACV,EAEY,EAAU,CACrB,YAAa,OACb,qBAAsB,OACtB,YAAa,OACb,WAAY,OACZ,eAAgB,MACjB,EAEK,EAAc,IAAqB,CACvC,IAAM,EAAe,SAAS,cAAc,wBAAwB,EAAE,aAAa,UAAU,CAM7F,OAJI,GAAgB,KAAgB,EAC3B,EAGF,EAAU,OAClB,EAEK,EAAc,IAAgB,CAClC,IAAM,EAAW,SAAS,cAAc,0BAA0B,EAAE,aAAa,kBAAkB,CACnG,GAAI,CAAC,EAAU,MAAO,CAAE,EAExB,GAAI,CACF,OAAO,KAAK,MAAM,KAAK,EAAS,CAAC,CAClC,MAAQ,EAAO,CAEd,OADA,QAAQ,MAAM,kCAAmC,EAAM,CAChD,CAAE,CACV,CACF,EAEYA,EAA+B,CAACC,EAAiE,CAC5G,GAAI,CAAC,EACH,MAAU,MAAM,wCAEnB,CAEY,EAAO,MAAOC,EAAgBC,EAAmBC,IAA6C,CACzG,IAAM,EAAa,IAAI,gBACjB,EAAY,WAAW,IAAM,EAAW,OAAO,CAAE,GAAS,SAAW,IAAO,CAE5E,EAAM,MAAM,MAAM,EAAK,CAC3B,KAAM,GAAS,KACP,SACR,OAAQ,EAAW,MACpB,EAAC,CAAC,QAAQ,IAAM,aAAa,EAAU,CAAC,CACzC,GAAI,CAAC,EAAI,GACP,MAAU,MAAM,EAAI,YAGtB,OAAO,CACR,EAEY,EAAS,CACpBC,EACAC,EACAC,EACAC,IACS,CACT,GAAI,OAAO,GAAW,SAAU,CAC9B,EAAO,iBAAiB,EAAM,EAA2B,EAAQ,CACjE,MACD,CAED,SAAS,iBACP,EACA,CAACC,EAAiB,CAChB,IAAK,IAAM,KAAQ,EAAM,cAAc,CACrC,GAAI,aAAgB,aAAe,EAAK,QAAQ,EAAO,CAAE,CACvD,GAAI,CACF,EAAS,KAAK,EAAW,EAA6B,CACvD,MAAQ,EAAO,CACd,QAAQ,MAAM,EAAM,CAEtB,KACD,CAEJ,EACD,EACD,CACF,CAEY,EAAQ,CAACC,EAAsBC,IAAiC,CAC3E,IAAK,IAAM,KAAa,GAAS,IAAM,CAAE,EACvC,GAAI,CAAC,EACH,OAIA,SAAS,aAAe,UAG1B,EAAO,mBAAoB,SAAU,EAAU,CAAE,KAAM,EAAM,EAAC,CAF9D,GAAU,CAIb,CAEYC,EAA0B,GAAa,CACvCC,EAAqB,GAAa,8rCCzI/C,EACE,IAAM,OACJ,OAAO,+BACP,OAAO,uBAEH,EAAS,oBACX,OAAO,6BAEV,CACD,CAAE,GAAI,CAAC,IAAa,EAAU,KAAM,CAAE,EACvC,CAED,EACE,IAAM,OACJ,OAAO,+BACP,OAAO,gCACP,OAAO,8BACP,OAAO,uBAEH,EAAS,uBACX,OAAO,gCAGL,EAAS,oBACX,OAAO,6BAEV,CACD,CAAE,GAAI,CAAC,IAAa,EAAU,OAAQ,CAAE,EACzC,CAED,EACE,IAAM,OACJ,OAAO,4BACR,CACD,CAAE,GAAI,CAAC,IAAa,EAAU,WAAY,CAAE,EAC7C,CCnCD,EAAO,QAAS,SAAU,UAA6B,CACpD,KAAK,YAA4B,UAAU,IAAI,YAAY,CAC7D,CAAC","names":["assertElement: AssertElement","element?: HTMLElement | null","method: string","url: string | URL","options?: HTTPOptions","type: string | K","target: string | Document | E","listener: (this: E, event: DocumentEventMap[K]) => void | Promise<void>","options?: AddEventListenerOptions","event: Event","callback: () => void","options?: ReadyOptions","endpoint: EndpointsKeys","settings: Settings"],"ignoreList":[],"sources":["../../../../../client/simple/src/js/core/toolkit.ts","../../../../../client/simple/src/js/core/router.ts","../../../../../client/simple/src/js/core/listener.ts"],"sourcesContent":["// 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 advanced_search?: boolean;\n autocomplete?: string;\n autocomplete_min?: number;\n doi_resolver?: string;\n favicon_resolver?: string;\n hotkeys?: KeyBindingLayout;\n infinite_scroll?: boolean;\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\ntype AssertElement = (element?: HTMLElement | null) => asserts element is HTMLElement;\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 assertElement: AssertElement = (element?: HTMLElement | null): asserts element is HTMLElement => {\n if (!element) {\n throw new Error(\"Bad assertion: DOM element not found\");\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 callback();\n } else {\n listen(\"DOMContentLoaded\", document, callback, { once: true });\n }\n};\n\nexport const endpoint: EndpointsKeys = getEndpoint();\nexport const settings: Settings = getSettings();\n","// SPDX-License-Identifier: AGPL-3.0-or-later\n\nimport { Endpoints, endpoint, ready, settings } from \"./toolkit.ts\";\n\nready(\n () => {\n import(\"../main/keyboard.ts\");\n import(\"../main/search.ts\");\n\n if (settings.autocomplete) {\n import(\"../main/autocomplete.ts\");\n }\n },\n { on: [endpoint === Endpoints.index] }\n);\n\nready(\n () => {\n import(\"../main/keyboard.ts\");\n import(\"../main/mapresult.ts\");\n import(\"../main/results.ts\");\n import(\"../main/search.ts\");\n\n if (settings.infinite_scroll) {\n import(\"../main/infinite_scroll.ts\");\n }\n\n if (settings.autocomplete) {\n import(\"../main/autocomplete.ts\");\n }\n },\n { on: [endpoint === Endpoints.results] }\n);\n\nready(\n () => {\n import(\"../main/preferences.ts\");\n },\n { on: [endpoint === Endpoints.preferences] }\n);\n","// SPDX-License-Identifier: AGPL-3.0-or-later\n\nimport { listen } from \"./toolkit.ts\";\n\nlisten(\"click\", \".close\", function (this: HTMLElement) {\n (this.parentNode as HTMLElement)?.classList.add(\"invisible\");\n});\n"],"file":"js/searxng.core.min.js"} \ No newline at end of file