libpag 4.5.0 → 4.5.1

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/lib/libpag.cjs.js CHANGED
@@ -3011,7 +3011,7 @@ var __publicField = (obj, key, value) => {
3011
3011
  return value;
3012
3012
  };
3013
3013
  var PAGInit$1 = (() => {
3014
- var _scriptName = typeof document != "undefined" ? document.currentScript?.src : void 0;
3014
+ var _scriptName = import.meta.url;
3015
3015
  return async function(moduleArg = {}) {
3016
3016
  var moduleRtn;
3017
3017
  var Module = moduleArg;
@@ -3163,11 +3163,14 @@ var PAGInit$1 = (() => {
3163
3163
  }
3164
3164
  var wasmBinaryFile;
3165
3165
  function findWasmBinary() {
3166
- var f = "libpag.wasm";
3167
- if (!isDataURI(f)) {
3168
- return locateFile(f);
3166
+ if (Module["locateFile"]) {
3167
+ var f = "libpag.wasm";
3168
+ if (!isDataURI(f)) {
3169
+ return locateFile(f);
3170
+ }
3171
+ return f;
3169
3172
  }
3170
- return f;
3173
+ return new URL("libpag.wasm", import.meta.url).href;
3171
3174
  }
3172
3175
  function getBinarySync(file) {
3173
3176
  if (file == wasmBinaryFile && wasmBinary) {