/*!
 * @maptalks/gl v0.124.0
 * LICENSE : UNLICENSED
 * (c) 2016-2026 maptalks.com
 */
const n = function() {
    if ("undefined" != typeof globalThis) return globalThis;
    if ("undefined" != typeof self) return self;
    if ("undefined" != typeof window) return window;
    if ("undefined" != typeof global) return global;
    throw new Error("unable to locate global object");
}, t = n(), e = t.gl_trans__coders = t.gl_trans__coders || {};

function r(n) {
    return e[n];
}

function _(n, t) {
    e[n] = t;
}

function o() {
    return n().maptalks_gltf_loader;
}

function l(t) {
    n().maptalks_gltf_loader_bundle = t;
}

e.inject = function(e) {
    const r = e.toString(), _ = r.indexOf("{") + 1, o = r.substring(0, _), l = t.gl_trans__coders = t.gl_trans__coders || {};
    let s = `${o}\n    const _____getGlobal = ${n.toString()};\n    const g___lobals = _____getGlobal()\n    const tran_____scoders = g___lobals['gl_trans__coders'] = g___lobals['gl_trans__coders'] || {};`;
    for (const n in l) "inject" !== n && "getTranscoder" !== n && "registerTranscoder" !== n && (s += 'tran_____scoders["' + n + '"] =' + l[n].toString() + "\n;");
    return s += "\n(" + n().maptalks_gltf_loader_bundle.toString() + ")({});\n", s += "\n" + r.substring(o.length), 
    s;
}, e.registerTranscoder = _, e.getTranscoder = r;

export { e as default, o as getGLTFLoaderBundle, r as getTranscoder, l as registerGLTFLoaderBundle, _ as registerTranscoder };
