mapshaper = {
const src = "https://cdn.jsdelivr.net/npm/mapshaper@0.6.25/mapshaper.js";
const requires = {
kdbush: await require("kdbush"),
flatbush: await require("flatbush"),
"@tmcw/togeojson": await require("@tmcw/togeojson"),
mproj: await require("mproj"),
"iconv-lite": null,
buffer: {},
rw: null,
fs: null,
path: null,
"@xmldom/xmldom": null,
"sync-request": null
};
globalThis.__require = (what) => requires[what];
const ms = eval(
`(function() {
const require = globalThis.__require;
${await fetch(src).then((d) => d.text())};
return mapshaper;
})()`
);
delete globalThis.__require;
return ms;
}