@mapcreator/sdk 0.0.0-fonts.1 → 0.0.0-fonts.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/mapcreator-sdk.js
CHANGED
|
@@ -32289,7 +32289,9 @@ function Cr(e, t) {
|
|
|
32289
32289
|
//#region src/utils/fonts.ts
|
|
32290
32290
|
var wr = /* @__PURE__ */ new Map();
|
|
32291
32291
|
async function Tr(e, t, n) {
|
|
32292
|
-
return wr.has(e) || wr.set(e, fetch(`${t}/fonts/${e}.woff2?access_token=${n}`).then((e) => e.
|
|
32292
|
+
return wr.has(e) || wr.set(e, fetch(`${t}/fonts/${e}.woff2?access_token=${n}`).then((e) => e.ok ? e.arrayBuffer() : void 0).then((t) => {
|
|
32293
|
+
if (t !== void 0) return document.fonts.add(new FontFace(e, t)), new Uint8Array(t).toBase64();
|
|
32294
|
+
}).catch(() => void 0)), wr.get(e);
|
|
32293
32295
|
}
|
|
32294
32296
|
async function Er(e, t, n) {
|
|
32295
32297
|
let r = `${t}/stylesheets/ff-${e === "beta" ? "b-" : ""}${n}.css?access_token=${n}`, i;
|
|
@@ -38109,9 +38111,7 @@ function $c(e, t, n, r) {
|
|
|
38109
38111
|
});
|
|
38110
38112
|
c.push(e);
|
|
38111
38113
|
}
|
|
38112
|
-
let l = Promise.all(c).then(() => {
|
|
38113
|
-
el(s);
|
|
38114
|
-
});
|
|
38114
|
+
let l = Promise.all(c).then(() => el(s)).catch(() => {});
|
|
38115
38115
|
return t.on("moveend", () => {
|
|
38116
38116
|
s.moveEndPosition = t.getCenter(), (s.isGlobe || s.globeFallbackActive) && el(s);
|
|
38117
38117
|
}), t.on("move", () => {
|