PageSourceSearch

https://skola-kopiena.lv/_content/DevExpress.Blazor.Resources/js/import-scripts.js?v=26.1.4.0

js skola-kopiena.lv collected 2026-09-26 01:37:19 UTC 1,837 bytes, 61 lines download raw bytes

1const loadedResources = {};
2
3async function wrapKo(callback) {
4    const oldeval = window.eval;
5    window.eval = (x) => {
6        window.eval = oldeval;
7        if(x === "this") return window;
8    }
9    const olddefine = window.define;
10    window.define = undefined;
11    await callback();
12    window.define = olddefine;
13}
14
15async function importAllResources(resources) {
16    for(let i = 0;i < resources.length;i++) {
17        if(!loadedResources[resources[i]]) {
18            loadedResources[resources[i]] = (async () => {
19                try {
20                    let resourcePath = resources[i][0] === "." ? "../../../" + resources[i].substring(2) : resources[i]; // take a module from root
21                    if(resourcePath.indexOf("knockout") !== -1) {
22                        await wrapKo(async () => await import(resourcePath));
23                    } else {
24                        await import(resourcePath);
25                    }
26                } catch(e) {
27                    console.error(e);
28                }
29            })();
30        }
31        await loadedResources[resources[i]]
32    }
33}
34
35async function collectAndLoadResources() {
36    const resources = [...document.getElementsByTagName("dxbl-resource-script")];
37    if(resources.length > 0) {
38        await importAllResources(resources.map(x => x.getAttribute("src")));
39    }
40}
41
42class ResourceScript extends HTMLElement {
43    connectedCallback() {
44        collectAndLoadResources();
45    }
46}
47
48customElements.define("dxbl-resource-script", ResourceScript);
49
50
51const loaderPromise = collectAndLoadResources()
52
53window["_dx_loader_promise"] = loaderPromise;
54
55window["_dx_import_resources"] = async (params) => {
56    await loaderPromise;
57    await importAllResources(params);
58}
59
60export default await loaderPromise;
61

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.