/*!
 * @maptalks/gl v0.109.0
 * LICENSE : UNLICENSED
 * (c) 2016-2025 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");
}, o = n(), e = o.gl_trans__coders = o.gl_trans__coders || {};

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

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

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

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

e.inject = function(e) {
    const t = e.toString(), _ = t.indexOf("{") + 1, r = t.substring(0, _), l = o.gl_trans__coders = o.gl_trans__coders || {};
    let s = `${r}\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" + t.substring(r.length), 
    s;
}, e.registerTranscoder = _, e.getTranscoder = t;

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