empty-piral 1.10.0-beta.8564 → 1.10.0-beta.8571

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.
@@ -1623,7 +1623,9 @@ function loader6(entry, options) {
1623
1623
  try {
1624
1624
  for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
1625
1625
  var style = _step3.value;
1626
- attachStyles(pilet, "".concat(pilet.basePath, "/").concat(style));
1626
+ var s = !style.startsWith("//") ? style.replace(/^\/+/, "") : style;
1627
+ var url = new URL(s, pilet.basePath).toString();
1628
+ attachStyles(pilet, url);
1627
1629
  }
1628
1630
  } catch (err) {
1629
1631
  _iterator3.e(err);
@@ -2110,4 +2112,4 @@ var events = (0,piral_base__WEBPACK_IMPORTED_MODULE_0__.createListener)();
2110
2112
 
2111
2113
  /******/ })()
2112
2114
  ;
2113
- //# sourceMappingURL=index.a9f6f2.js.map
2115
+ //# sourceMappingURL=index.c7ac5f.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.c7ac5f.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAEA;AAGA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AALA;AAAA;AAAA;AAMA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AAAA;AACA;AACA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAAA;AAAA;AACA;AACA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AAAA;AAAA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGA;AAAA;AAAA;AACA;;AAEA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;;AAEA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGA;AACA;AAEA;AAAA;AAAA;AAAA;AAEA;AACA;AACA;AAAA;AAAA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAGA;AAAA;AAAA;AACA;;AAEA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAGA;AACA;AAAA;AAAA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGA;AACA;AACA;AACA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAdA;AAAA;AAAA;AAcA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AALA;AAAA;AAAA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGA;AAAA;AAAA;AAAA;AAAA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AANA;AAAA;AAAA;AAMA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AAEA;AACA;AAAA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAyCA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACvwDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACPA;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACNA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","sources":["webpack://empty-piral/../../framework/piral-base/dist/piral-base-full.mjs","webpack://empty-piral/webpack/bootstrap","webpack://empty-piral/webpack/runtime/define property getters","webpack://empty-piral/webpack/runtime/global","webpack://empty-piral/webpack/runtime/hasOwnProperty shorthand","webpack://empty-piral/webpack/runtime/make namespace object","webpack://empty-piral/./src/index.tsx"],"sourcesContent":["// ../../../node_modules/systemjs/dist/system.js\n(function() {\n function errMsg(errCode, msg) {\n return (msg || \"\") + \" (SystemJS Error#\" + errCode + \" https://github.com/systemjs/systemjs/blob/main/docs/errors.md#\" + errCode + \")\";\n }\n var hasSymbol = typeof Symbol !== \"undefined\";\n var hasSelf = typeof self !== \"undefined\";\n var hasDocument = typeof document !== \"undefined\";\n var envGlobal = hasSelf ? self : global;\n var baseUrl;\n if (hasDocument) {\n var baseEl = document.querySelector(\"base[href]\");\n if (baseEl)\n baseUrl = baseEl.href;\n }\n if (!baseUrl && typeof location !== \"undefined\") {\n baseUrl = location.href.split(\"#\")[0].split(\"?\")[0];\n var lastSepIndex = baseUrl.lastIndexOf(\"/\");\n if (lastSepIndex !== -1)\n baseUrl = baseUrl.slice(0, lastSepIndex + 1);\n }\n var backslashRegEx = /\\\\/g;\n function resolveIfNotPlainOrUrl(relUrl, parentUrl) {\n if (relUrl.indexOf(\"\\\\\") !== -1)\n relUrl = relUrl.replace(backslashRegEx, \"/\");\n if (relUrl[0] === \"/\" && relUrl[1] === \"/\") {\n return parentUrl.slice(0, parentUrl.indexOf(\":\") + 1) + relUrl;\n } else if (relUrl[0] === \".\" && (relUrl[1] === \"/\" || relUrl[1] === \".\" && (relUrl[2] === \"/\" || relUrl.length === 2 && (relUrl += \"/\")) || relUrl.length === 1 && (relUrl += \"/\")) || relUrl[0] === \"/\") {\n var parentProtocol = parentUrl.slice(0, parentUrl.indexOf(\":\") + 1);\n var pathname;\n if (parentUrl[parentProtocol.length + 1] === \"/\") {\n if (parentProtocol !== \"file:\") {\n pathname = parentUrl.slice(parentProtocol.length + 2);\n pathname = pathname.slice(pathname.indexOf(\"/\") + 1);\n } else {\n pathname = parentUrl.slice(8);\n }\n } else {\n pathname = parentUrl.slice(parentProtocol.length + (parentUrl[parentProtocol.length] === \"/\"));\n }\n if (relUrl[0] === \"/\")\n return parentUrl.slice(0, parentUrl.length - pathname.length - 1) + relUrl;\n var segmented = pathname.slice(0, pathname.lastIndexOf(\"/\") + 1) + relUrl;\n var output = [];\n var segmentIndex = -1;\n for (var i = 0; i < segmented.length; i++) {\n if (segmentIndex !== -1) {\n if (segmented[i] === \"/\") {\n output.push(segmented.slice(segmentIndex, i + 1));\n segmentIndex = -1;\n }\n } else if (segmented[i] === \".\") {\n if (segmented[i + 1] === \".\" && (segmented[i + 2] === \"/\" || i + 2 === segmented.length)) {\n output.pop();\n i += 2;\n } else if (segmented[i + 1] === \"/\" || i + 1 === segmented.length) {\n i += 1;\n } else {\n segmentIndex = i;\n }\n } else {\n segmentIndex = i;\n }\n }\n if (segmentIndex !== -1)\n output.push(segmented.slice(segmentIndex));\n return parentUrl.slice(0, parentUrl.length - pathname.length) + output.join(\"\");\n }\n }\n function resolveUrl(relUrl, parentUrl) {\n return resolveIfNotPlainOrUrl(relUrl, parentUrl) || (relUrl.indexOf(\":\") !== -1 ? relUrl : resolveIfNotPlainOrUrl(\"./\" + relUrl, parentUrl));\n }\n function resolveAndComposePackages(packages, outPackages, baseUrl2, parentMap, parentUrl) {\n for (var p in packages) {\n var resolvedLhs = resolveIfNotPlainOrUrl(p, baseUrl2) || p;\n var rhs = packages[p];\n if (typeof rhs !== \"string\")\n continue;\n var mapped = resolveImportMap(parentMap, resolveIfNotPlainOrUrl(rhs, baseUrl2) || rhs, parentUrl);\n if (!mapped) {\n targetWarning(\"W1\", p, rhs, \"bare specifier did not resolve\");\n } else\n outPackages[resolvedLhs] = mapped;\n }\n }\n function resolveAndComposeImportMap(json, baseUrl2, outMap) {\n if (json.imports)\n resolveAndComposePackages(json.imports, outMap.imports, baseUrl2, outMap, null);\n var u;\n for (u in json.scopes || {}) {\n var resolvedScope = resolveUrl(u, baseUrl2);\n resolveAndComposePackages(json.scopes[u], outMap.scopes[resolvedScope] || (outMap.scopes[resolvedScope] = {}), baseUrl2, outMap, resolvedScope);\n }\n for (u in json.depcache || {})\n outMap.depcache[resolveUrl(u, baseUrl2)] = json.depcache[u];\n for (u in json.integrity || {})\n outMap.integrity[resolveUrl(u, baseUrl2)] = json.integrity[u];\n }\n function getMatch(path, matchObj) {\n if (matchObj[path])\n return path;\n var sepIndex = path.length;\n do {\n var segment = path.slice(0, sepIndex + 1);\n if (segment in matchObj)\n return segment;\n } while ((sepIndex = path.lastIndexOf(\"/\", sepIndex - 1)) !== -1);\n }\n function applyPackages(id, packages) {\n var pkgName = getMatch(id, packages);\n if (pkgName) {\n var pkg = packages[pkgName];\n if (pkg === null) return;\n if (id.length > pkgName.length && pkg[pkg.length - 1] !== \"/\") {\n targetWarning(\"W2\", pkgName, pkg, \"should have a trailing '/'\");\n } else\n return pkg + id.slice(pkgName.length);\n }\n }\n function targetWarning(code, match, target, msg) {\n console.warn(errMsg(code, \"Package target \" + msg + \", resolving target '\" + target + \"' for \" + match));\n }\n function resolveImportMap(importMap2, resolvedOrPlain, parentUrl) {\n var scopes = importMap2.scopes;\n var scopeUrl = parentUrl && getMatch(parentUrl, scopes);\n while (scopeUrl) {\n var packageResolution = applyPackages(resolvedOrPlain, scopes[scopeUrl]);\n if (packageResolution)\n return packageResolution;\n scopeUrl = getMatch(scopeUrl.slice(0, scopeUrl.lastIndexOf(\"/\")), scopes);\n }\n return applyPackages(resolvedOrPlain, importMap2.imports) || resolvedOrPlain.indexOf(\":\") !== -1 && resolvedOrPlain;\n }\n var toStringTag$1 = hasSymbol && Symbol.toStringTag;\n var REGISTRY = hasSymbol ? /* @__PURE__ */ Symbol() : \"@\";\n function SystemJS() {\n this[REGISTRY] = {};\n }\n var systemJSPrototype = SystemJS.prototype;\n systemJSPrototype.import = function(id, parentUrl, meta) {\n var loader8 = this;\n parentUrl && typeof parentUrl === \"object\" && (meta = parentUrl, parentUrl = void 0);\n return Promise.resolve(loader8.prepareImport()).then(function() {\n return loader8.resolve(id, parentUrl, meta);\n }).then(function(id2) {\n var load = getOrCreateLoad(loader8, id2, void 0, meta);\n return load.C || topLevelLoad(loader8, load);\n });\n };\n systemJSPrototype.createContext = function(parentId) {\n var loader8 = this;\n return {\n url: parentId,\n resolve: function(id, parentUrl) {\n return Promise.resolve(loader8.resolve(id, parentUrl || parentId));\n }\n };\n };\n systemJSPrototype.onload = function() {\n };\n function loadToId(load) {\n return load.id;\n }\n function triggerOnload(loader8, load, err, isErrSource) {\n loader8.onload(err, load.id, load.d && load.d.map(loadToId), !!isErrSource);\n if (err)\n throw err;\n }\n var lastRegister;\n systemJSPrototype.register = function(deps, declare, metas) {\n lastRegister = [deps, declare, metas];\n };\n systemJSPrototype.getRegister = function() {\n var _lastRegister = lastRegister;\n lastRegister = void 0;\n return _lastRegister;\n };\n function getOrCreateLoad(loader8, id, firstParentUrl, meta) {\n var load = loader8[REGISTRY][id];\n if (load)\n return load;\n var importerSetters = [];\n var ns = /* @__PURE__ */ Object.create(null);\n if (toStringTag$1)\n Object.defineProperty(ns, toStringTag$1, { value: \"Module\" });\n var instantiatePromise = Promise.resolve().then(function() {\n return loader8.instantiate(id, firstParentUrl, meta);\n }).then(function(registration) {\n if (!registration)\n throw Error(errMsg(2, \"Module \" + id + \" did not instantiate\"));\n function _export(name, value) {\n load.h = true;\n var changed = false;\n if (typeof name === \"string\") {\n if (!(name in ns) || ns[name] !== value) {\n ns[name] = value;\n changed = true;\n }\n } else {\n for (var p in name) {\n var value = name[p];\n if (!(p in ns) || ns[p] !== value) {\n ns[p] = value;\n changed = true;\n }\n }\n if (name && name.__esModule) {\n ns.__esModule = name.__esModule;\n }\n }\n if (changed)\n for (var i = 0; i < importerSetters.length; i++) {\n var setter = importerSetters[i];\n if (setter) setter(ns);\n }\n return value;\n }\n var declared = registration[1](_export, registration[1].length === 2 ? {\n import: function(importId, meta2) {\n return loader8.import(importId, id, meta2);\n },\n meta: loader8.createContext(id)\n } : void 0);\n load.e = declared.execute || function() {\n };\n return [registration[0], declared.setters || [], registration[2] || []];\n }, function(err) {\n load.e = null;\n load.er = err;\n triggerOnload(loader8, load, err, true);\n throw err;\n });\n var linkPromise = instantiatePromise.then(function(instantiation) {\n return Promise.all(instantiation[0].map(function(dep, i) {\n var setter = instantiation[1][i];\n var meta2 = instantiation[2][i];\n return Promise.resolve(loader8.resolve(dep, id)).then(function(depId) {\n var depLoad = getOrCreateLoad(loader8, depId, id, meta2);\n return Promise.resolve(depLoad.I).then(function() {\n if (setter) {\n depLoad.i.push(setter);\n if (depLoad.h || !depLoad.I)\n setter(depLoad.n);\n }\n return depLoad;\n });\n });\n })).then(function(depLoads) {\n load.d = depLoads;\n });\n });\n return load = loader8[REGISTRY][id] = {\n id,\n // importerSetters, the setters functions registered to this dependency\n // we retain this to add more later\n i: importerSetters,\n // module namespace object\n n: ns,\n // extra module information for import assertion\n // shape like: { assert: { type: 'xyz' } }\n m: meta,\n // instantiate\n I: instantiatePromise,\n // link\n L: linkPromise,\n // whether it has hoisted exports\n h: false,\n // On instantiate completion we have populated:\n // dependency load records\n d: void 0,\n // execution function\n e: void 0,\n // On execution we have populated:\n // the execution error if any\n er: void 0,\n // in the case of TLA, the execution promise\n E: void 0,\n // On execution, L, I, E cleared\n // Promise for top-level completion\n C: void 0,\n // parent instantiator / executor\n p: void 0\n };\n }\n function instantiateAll(loader8, load, parent, loaded) {\n if (!loaded[load.id]) {\n loaded[load.id] = true;\n return Promise.resolve(load.L).then(function() {\n if (!load.p || load.p.e === null)\n load.p = parent;\n return Promise.all(load.d.map(function(dep) {\n return instantiateAll(loader8, dep, parent, loaded);\n }));\n }).catch(function(err) {\n if (load.er)\n throw err;\n load.e = null;\n triggerOnload(loader8, load, err, false);\n throw err;\n });\n }\n }\n function topLevelLoad(loader8, load) {\n return load.C = instantiateAll(loader8, load, load, {}).then(function() {\n return postOrderExec(loader8, load, {});\n }).then(function() {\n return load.n;\n });\n }\n var nullContext = Object.freeze(/* @__PURE__ */ Object.create(null));\n function postOrderExec(loader8, load, seen) {\n if (seen[load.id])\n return;\n seen[load.id] = true;\n if (!load.e) {\n if (load.er)\n throw load.er;\n if (load.E)\n return load.E;\n return;\n }\n var exec = load.e;\n load.e = null;\n var depLoadPromises;\n load.d.forEach(function(depLoad) {\n try {\n var depLoadPromise = postOrderExec(loader8, depLoad, seen);\n if (depLoadPromise)\n (depLoadPromises = depLoadPromises || []).push(depLoadPromise);\n } catch (err) {\n load.er = err;\n triggerOnload(loader8, load, err, false);\n throw err;\n }\n });\n if (depLoadPromises)\n return Promise.all(depLoadPromises).then(doExec);\n return doExec();\n function doExec() {\n try {\n var execPromise = exec.call(nullContext);\n if (execPromise) {\n execPromise = execPromise.then(function() {\n load.C = load.n;\n load.E = null;\n if (true) triggerOnload(loader8, load, null, true);\n }, function(err) {\n load.er = err;\n load.E = null;\n if (true) triggerOnload(loader8, load, err, true);\n throw err;\n });\n return load.E = execPromise;\n }\n load.C = load.n;\n load.L = load.I = void 0;\n } catch (err) {\n load.er = err;\n throw err;\n } finally {\n triggerOnload(loader8, load, load.er, true);\n }\n }\n }\n envGlobal.System = new SystemJS();\n var importMapPromise = Promise.resolve();\n var importMap = { imports: {}, scopes: {}, depcache: {}, integrity: {} };\n var processFirst = hasDocument;\n systemJSPrototype.prepareImport = function(doProcessScripts) {\n if (processFirst || doProcessScripts) {\n processScripts();\n processFirst = false;\n }\n return importMapPromise;\n };\n systemJSPrototype.getImportMap = function() {\n return JSON.parse(JSON.stringify(importMap));\n };\n if (hasDocument) {\n processScripts();\n window.addEventListener(\"DOMContentLoaded\", processScripts);\n }\n systemJSPrototype.addImportMap = function(newMap, mapBase) {\n resolveAndComposeImportMap(newMap, mapBase || baseUrl, importMap);\n };\n function processScripts() {\n [].forEach.call(document.querySelectorAll(\"script\"), function(script) {\n if (script.sp)\n return;\n if (script.type === \"systemjs-module\") {\n script.sp = true;\n if (!script.src)\n return;\n System.import(script.src.slice(0, 7) === \"import:\" ? script.src.slice(7) : resolveUrl(script.src, baseUrl)).catch(function(e) {\n if (e.message.indexOf(\"https://github.com/systemjs/systemjs/blob/main/docs/errors.md#3\") > -1) {\n var event = document.createEvent(\"Event\");\n event.initEvent(\"error\", false, false);\n script.dispatchEvent(event);\n }\n return Promise.reject(e);\n });\n } else if (script.type === \"systemjs-importmap\") {\n script.sp = true;\n var fetchPromise = script.src ? (System.fetch || fetch)(script.src, { integrity: script.integrity, priority: script.fetchPriority, passThrough: true }).then(function(res) {\n if (!res.ok)\n throw Error(\"Invalid status code: \" + res.status);\n return res.text();\n }).catch(function(err) {\n err.message = errMsg(\"W4\", \"Error fetching systemjs-import map \" + script.src) + \"\\n\" + err.message;\n console.warn(err);\n if (typeof script.onerror === \"function\") {\n script.onerror();\n }\n return \"{}\";\n }) : script.innerHTML;\n importMapPromise = importMapPromise.then(function() {\n return fetchPromise;\n }).then(function(text) {\n extendImportMap(importMap, text, script.src || baseUrl);\n });\n }\n });\n }\n function extendImportMap(importMap2, newMapText, newMapUrl) {\n var newMap = {};\n try {\n newMap = JSON.parse(newMapText);\n } catch (err) {\n console.warn(Error(errMsg(\"W5\", \"systemjs-importmap contains invalid JSON\") + \"\\n\\n\" + newMapText + \"\\n\"));\n }\n resolveAndComposeImportMap(newMap, newMapUrl, importMap2);\n }\n if (hasDocument) {\n window.addEventListener(\"error\", function(evt) {\n lastWindowErrorUrl = evt.filename;\n lastWindowError = evt.error;\n });\n var baseOrigin = location.origin;\n }\n systemJSPrototype.createScript = function(url) {\n var script = document.createElement(\"script\");\n script.async = true;\n if (url.indexOf(baseOrigin + \"/\"))\n script.crossOrigin = \"anonymous\";\n var integrity = importMap.integrity[url];\n if (integrity)\n script.integrity = integrity;\n script.src = url;\n return script;\n };\n var lastAutoImportDeps, lastAutoImportTimeout;\n var autoImportCandidates = {};\n var systemRegister2 = systemJSPrototype.register;\n systemJSPrototype.register = function(deps, declare) {\n if (hasDocument && document.readyState === \"loading\" && typeof deps !== \"string\") {\n var scripts = document.querySelectorAll(\"script[src]\");\n var lastScript = scripts[scripts.length - 1];\n if (lastScript) {\n lastScript.src;\n lastAutoImportDeps = deps;\n var loader8 = this;\n lastAutoImportTimeout = setTimeout(function() {\n autoImportCandidates[lastScript.src] = [deps, declare];\n loader8.import(lastScript.src);\n });\n }\n } else {\n lastAutoImportDeps = void 0;\n }\n return systemRegister2.call(this, deps, declare);\n };\n var lastWindowErrorUrl, lastWindowError;\n systemJSPrototype.instantiate = function(url, firstParentUrl) {\n var autoImportRegistration = autoImportCandidates[url];\n if (autoImportRegistration) {\n delete autoImportCandidates[url];\n return autoImportRegistration;\n }\n var loader8 = this;\n return Promise.resolve(systemJSPrototype.createScript(url)).then(function(script) {\n return new Promise(function(resolve, reject) {\n script.addEventListener(\"error\", function() {\n reject(Error(errMsg(3, \"Error loading \" + url + (firstParentUrl ? \" from \" + firstParentUrl : \"\"))));\n });\n script.addEventListener(\"load\", function() {\n document.head.removeChild(script);\n if (lastWindowErrorUrl === url) {\n reject(lastWindowError);\n } else {\n var register = loader8.getRegister(url);\n if (register && register[0] === lastAutoImportDeps)\n clearTimeout(lastAutoImportTimeout);\n resolve(register);\n }\n });\n document.head.appendChild(script);\n });\n });\n };\n systemJSPrototype.shouldFetch = function() {\n return false;\n };\n if (typeof fetch !== \"undefined\")\n systemJSPrototype.fetch = fetch;\n var instantiate = systemJSPrototype.instantiate;\n var jsContentTypeRegEx = /^(text|application)\\/(x-)?javascript(;|$)/;\n systemJSPrototype.instantiate = function(url, parent, meta) {\n var loader8 = this;\n if (!this.shouldFetch(url, parent, meta))\n return instantiate.apply(this, arguments);\n return this.fetch(url, {\n credentials: \"same-origin\",\n integrity: importMap.integrity[url],\n meta\n }).then(function(res) {\n if (!res.ok)\n throw Error(errMsg(7, res.status + \" \" + res.statusText + \", loading \" + url + (parent ? \" from \" + parent : \"\")));\n var contentType = res.headers.get(\"content-type\");\n if (!contentType || !jsContentTypeRegEx.test(contentType))\n throw Error(errMsg(4, 'Unknown Content-Type \"' + contentType + '\", loading ' + url + (parent ? \" from \" + parent : \"\")));\n return res.text().then(function(source) {\n if (source.indexOf(\"//# sourceURL=\") < 0)\n source += \"\\n//# sourceURL=\" + url;\n (0, eval)(source);\n return loader8.getRegister(url);\n });\n });\n };\n systemJSPrototype.resolve = function(id, parentUrl) {\n parentUrl = parentUrl || false || baseUrl;\n return resolveImportMap(importMap, resolveIfNotPlainOrUrl(id, parentUrl) || id, parentUrl) || throwUnresolved(id, parentUrl);\n };\n function throwUnresolved(id, parentUrl) {\n throw Error(errMsg(8, \"Unable to resolve bare specifier '\" + id + (parentUrl ? \"' from \" + parentUrl : \"'\")));\n }\n var systemInstantiate = systemJSPrototype.instantiate;\n systemJSPrototype.instantiate = function(url, firstParentUrl, meta) {\n var preloads = importMap.depcache[url];\n if (preloads) {\n for (var i = 0; i < preloads.length; i++)\n getOrCreateLoad(this, this.resolve(preloads[i], url), url);\n }\n return systemInstantiate.call(this, url, firstParentUrl, meta);\n };\n if (hasSelf && typeof importScripts === \"function\")\n systemJSPrototype.instantiate = function(url) {\n var loader8 = this;\n return Promise.resolve().then(function() {\n importScripts(url);\n return loader8.getRegister(url);\n });\n };\n (function(global2) {\n var systemJSPrototype2 = global2.System.constructor.prototype;\n var firstGlobalProp, secondGlobalProp, lastGlobalProp;\n function getGlobalProp(useFirstGlobalProp) {\n var cnt = 0;\n var foundLastProp, result;\n for (var p in global2) {\n if (shouldSkipProperty(p))\n continue;\n if (cnt === 0 && p !== firstGlobalProp || cnt === 1 && p !== secondGlobalProp)\n return p;\n if (foundLastProp) {\n lastGlobalProp = p;\n result = useFirstGlobalProp && result || p;\n } else {\n foundLastProp = p === lastGlobalProp;\n }\n cnt++;\n }\n return result;\n }\n function noteGlobalProps() {\n firstGlobalProp = secondGlobalProp = void 0;\n for (var p in global2) {\n if (shouldSkipProperty(p))\n continue;\n if (!firstGlobalProp)\n firstGlobalProp = p;\n else if (!secondGlobalProp)\n secondGlobalProp = p;\n lastGlobalProp = p;\n }\n return lastGlobalProp;\n }\n var impt = systemJSPrototype2.import;\n systemJSPrototype2.import = function(id, parentUrl, meta) {\n noteGlobalProps();\n return impt.call(this, id, parentUrl, meta);\n };\n var emptyInstantiation = [[], function() {\n return {};\n }];\n var getRegister = systemJSPrototype2.getRegister;\n systemJSPrototype2.getRegister = function() {\n var lastRegister2 = getRegister.call(this);\n if (lastRegister2)\n return lastRegister2;\n var globalProp = getGlobalProp(this.firstGlobalProp);\n if (!globalProp)\n return emptyInstantiation;\n var globalExport;\n try {\n globalExport = global2[globalProp];\n } catch (e) {\n return emptyInstantiation;\n }\n return [[], function(_export) {\n return {\n execute: function() {\n _export(globalExport);\n _export({ default: globalExport, __useDefault: true });\n }\n };\n }];\n };\n var isIE11 = typeof navigator !== \"undefined\" && navigator.userAgent.indexOf(\"Trident\") !== -1;\n function shouldSkipProperty(p) {\n return !global2.hasOwnProperty(p) || !isNaN(p) && p < global2.length || isIE11 && global2[p] && typeof window !== \"undefined\" && global2[p].parent === window;\n }\n })(typeof self !== \"undefined\" ? self : global);\n (function(global2) {\n var systemJSPrototype2 = global2.System.constructor.prototype;\n var moduleTypesRegEx = /^[^#?]+\\.(css|html|json|wasm)([?#].*)?$/;\n var _shouldFetch = systemJSPrototype2.shouldFetch.bind(systemJSPrototype2);\n systemJSPrototype2.shouldFetch = function(url) {\n return _shouldFetch(url) || moduleTypesRegEx.test(url);\n };\n var jsonContentType = /^application\\/json(;|$)/;\n var cssContentType = /^text\\/css(;|$)/;\n var wasmContentType = /^application\\/wasm(;|$)/;\n var fetch2 = systemJSPrototype2.fetch;\n systemJSPrototype2.fetch = function(url, options) {\n return fetch2(url, options).then(function(res) {\n if (options.passThrough)\n return res;\n if (!res.ok)\n return res;\n var contentType = res.headers.get(\"content-type\");\n if (jsonContentType.test(contentType))\n return res.json().then(function(json) {\n return new Response(new Blob([\n 'System.register([],function(e){return{execute:function(){e(\"default\",' + JSON.stringify(json) + \")}}})\"\n ], {\n type: \"application/javascript\"\n }));\n });\n if (cssContentType.test(contentType))\n return res.text().then(function(source) {\n source = source.replace(/url\\(\\s*(?:([\"'])((?:\\\\.|[^\\n\\\\\"'])+)\\1|((?:\\\\.|[^\\s,\"'()\\\\])+))\\s*\\)/g, function(match, quotes, relUrl1, relUrl2) {\n return [\"url(\", quotes, resolveUrl(relUrl1 || relUrl2, url), quotes, \")\"].join(\"\");\n });\n return new Response(new Blob([\n \"System.register([],function(e){return{execute:function(){var s=new CSSStyleSheet();s.replaceSync(\" + JSON.stringify(source) + ');e(\"default\",s)}}})'\n ], {\n type: \"application/javascript\"\n }));\n });\n if (wasmContentType.test(contentType))\n return (WebAssembly.compileStreaming ? WebAssembly.compileStreaming(res) : res.arrayBuffer().then(WebAssembly.compile)).then(function(module) {\n if (!global2.System.wasmModules)\n global2.System.wasmModules = /* @__PURE__ */ Object.create(null);\n global2.System.wasmModules[url] = module;\n var deps = [];\n var setterSources = [];\n if (WebAssembly.Module.imports)\n WebAssembly.Module.imports(module).forEach(function(impt) {\n var key = JSON.stringify(impt.module);\n if (deps.indexOf(key) === -1) {\n deps.push(key);\n setterSources.push(\"function(m){i[\" + key + \"]=m}\");\n }\n });\n return new Response(new Blob([\n \"System.register([\" + deps.join(\",\") + \"],function(e){var i={};return{setters:[\" + setterSources.join(\",\") + \"],execute:function(){return WebAssembly.instantiate(System.wasmModules[\" + JSON.stringify(url) + \"],i).then(function(m){e(m.exports)})}}})\"\n ], {\n type: \"application/javascript\"\n }));\n });\n return res;\n });\n };\n })(typeof self !== \"undefined\" ? self : global);\n var toStringTag = typeof Symbol !== \"undefined\" && Symbol.toStringTag;\n systemJSPrototype.get = function(id) {\n var load = this[REGISTRY][id];\n if (load && load.e === null && !load.E) {\n if (load.er)\n return null;\n return load.n;\n }\n };\n systemJSPrototype.set = function(id, module) {\n {\n try {\n new URL(id);\n } catch (err) {\n console.warn(Error(errMsg(\"W3\", '\"' + id + '\" is not a valid URL to set in the module registry')));\n }\n }\n var ns;\n if (toStringTag && module[toStringTag] === \"Module\") {\n ns = module;\n } else {\n ns = Object.assign(/* @__PURE__ */ Object.create(null), module);\n if (toStringTag)\n Object.defineProperty(ns, toStringTag, { value: \"Module\" });\n }\n var done = Promise.resolve(ns);\n var load = this[REGISTRY][id] || (this[REGISTRY][id] = {\n id,\n i: [],\n h: false,\n d: [],\n e: null,\n er: void 0,\n E: void 0\n });\n if (load.e || load.E)\n return false;\n Object.assign(load, {\n n: ns,\n I: void 0,\n L: void 0,\n C: done\n });\n return ns;\n };\n systemJSPrototype.has = function(id) {\n var load = this[REGISTRY][id];\n return !!load;\n };\n systemJSPrototype.delete = function(id) {\n var registry = this[REGISTRY];\n var load = registry[id];\n if (!load || load.p && load.p.e !== null || load.E)\n return false;\n var importerSetters = load.i;\n if (load.d)\n load.d.forEach(function(depLoad) {\n var importerIndex = depLoad.i.indexOf(load);\n if (importerIndex !== -1)\n depLoad.i.splice(importerIndex, 1);\n });\n delete registry[id];\n return function() {\n var load2 = registry[id];\n if (!load2 || !importerSetters || load2.e !== null || load2.E)\n return false;\n importerSetters.forEach(function(setter) {\n load2.i.push(setter);\n setter(load2.n);\n });\n importerSetters = null;\n };\n };\n var iterator = typeof Symbol !== \"undefined\" && Symbol.iterator;\n systemJSPrototype.entries = function() {\n var loader8 = this, keys = Object.keys(loader8[REGISTRY]);\n var index = 0, ns, key;\n var result = {\n next: function() {\n while ((key = keys[index++]) !== void 0 && (ns = loader8.get(key)) === void 0) ;\n return {\n done: key === void 0,\n value: key !== void 0 && [key, ns]\n };\n }\n };\n result[iterator] = function() {\n return this;\n };\n return result;\n };\n})();\n\n// ../../../node_modules/systemjs/dist/extras/named-register.js\n(function() {\n (function(global2) {\n var System2 = global2.System;\n setRegisterRegistry(System2);\n var systemJSPrototype = System2.constructor.prototype;\n var constructor = System2.constructor;\n var SystemJS = function() {\n constructor.call(this);\n setRegisterRegistry(this);\n };\n SystemJS.prototype = systemJSPrototype;\n System2.constructor = SystemJS;\n var firstNamedDefine, firstName;\n function setRegisterRegistry(systemInstance) {\n systemInstance.registerRegistry = /* @__PURE__ */ Object.create(null);\n systemInstance.namedRegisterAliases = /* @__PURE__ */ Object.create(null);\n }\n var register = systemJSPrototype.register;\n systemJSPrototype.register = function(name, deps, declare, metas) {\n if (typeof name !== \"string\")\n return register.apply(this, arguments);\n var define = [deps, declare, metas];\n this.registerRegistry[name] = define;\n if (!firstNamedDefine) {\n firstNamedDefine = define;\n firstName = name;\n }\n Promise.resolve().then(function() {\n firstNamedDefine = null;\n firstName = null;\n });\n return register.apply(this, [deps, declare, metas]);\n };\n var resolve = systemJSPrototype.resolve;\n systemJSPrototype.resolve = function(id, parentURL) {\n try {\n return resolve.call(this, id, parentURL);\n } catch (err) {\n if (id in this.registerRegistry) {\n return this.namedRegisterAliases[id] || id;\n }\n throw err;\n }\n };\n var instantiate = systemJSPrototype.instantiate;\n systemJSPrototype.instantiate = function(url, firstParentUrl, meta) {\n var result = this.registerRegistry[url];\n if (result) {\n this.registerRegistry[url] = null;\n return result;\n } else {\n return instantiate.call(this, url, firstParentUrl, meta);\n }\n };\n var getRegister = systemJSPrototype.getRegister;\n systemJSPrototype.getRegister = function(url) {\n var register2 = getRegister.call(this, url);\n if (firstName && url) {\n this.namedRegisterAliases[firstName] = url;\n }\n var result = firstNamedDefine || register2;\n firstNamedDefine = null;\n firstName = null;\n return result;\n };\n })(typeof self !== \"undefined\" ? self : global);\n})();\n\n// src/utils/empty.ts\nvar emptyApp = {\n setup() {\n }\n};\n\n// ../../tooling/piral-cli/src/common/version.ts\nvar semver = /^[v^~<>=]*?(\\d+)(?:\\.([x*]|\\d+)(?:\\.([x*]|\\d+)(?:\\.([x*]|\\d+))?(?:-([\\da-z\\-]+(?:\\.[\\da-z\\-]+)*))?(?:\\+[\\da-z\\-]+(?:\\.[\\da-z\\-]+)*)?)?)?$/i;\nvar acceptsAll = [\"*\", \"x\", \">=0\"];\nvar operatorResMap = {\n \">\": [1],\n \">=\": [0, 1],\n \"=\": [0],\n \"<=\": [-1, 0],\n \"<\": [-1]\n};\nfunction indexOrEnd(str, q) {\n return str.indexOf(q) === -1 ? str.length : str.indexOf(q);\n}\nfunction splitVersion(v) {\n const c = v.replace(/^v/, \"\").replace(/\\+.*$/, \"\");\n const patchIndex = indexOrEnd(c, \"-\");\n const arr = c.substring(0, patchIndex).split(\".\");\n arr.push(c.substring(patchIndex + 1));\n return arr;\n}\nfunction parseSegment(v) {\n const n = parseInt(v, 10);\n return isNaN(n) ? v : n;\n}\nfunction validateAndParse(v) {\n const match = v.match(semver);\n match.shift();\n return match;\n}\nfunction compareStrings(a, b) {\n const ap = parseSegment(a);\n const bp = parseSegment(b);\n if (ap > bp) {\n return 1;\n } else if (ap < bp) {\n return -1;\n } else {\n return 0;\n }\n}\nfunction compareSegments(a, b) {\n for (let i = 0; i < 2; i++) {\n const r = compareStrings(a[i] || \"0\", b[i] || \"0\");\n if (r !== 0) {\n return r;\n }\n }\n return 0;\n}\nfunction compareVersions(v1, v2) {\n const s1 = splitVersion(v1);\n const s2 = splitVersion(v2);\n const len = Math.max(s1.length - 1, s2.length - 1);\n for (let i = 0; i < len; i++) {\n const m1 = s1[i] || \"0\";\n const m2 = s2[i] || \"0\";\n if (m2 === \"x\") {\n return 0;\n }\n const n1 = parseInt(m1, 10);\n const n2 = parseInt(m2, 10);\n if (n1 > n2) {\n return 1;\n } else if (n2 > n1) {\n return -1;\n }\n }\n const sp1 = s1[s1.length - 1];\n const sp2 = s2[s2.length - 1];\n if (sp1 && sp2) {\n const p1 = sp1.split(\".\").map(parseSegment);\n const p2 = sp2.split(\".\").map(parseSegment);\n const len2 = Math.max(p1.length, p2.length);\n for (let i = 0; i < len2; i++) {\n if (p1[i] === void 0 || typeof p2[i] === \"string\" && typeof p1[i] === \"number\") {\n return -1;\n } else if (p2[i] === void 0 || typeof p1[i] === \"string\" && typeof p2[i] === \"number\") {\n return 1;\n } else if (p1[i] > p2[i]) {\n return 1;\n } else if (p2[i] > p1[i]) {\n return -1;\n }\n }\n } else if (sp1 || sp2) {\n return sp1 ? -1 : 1;\n }\n return 0;\n}\nfunction compare(v1, v2, operator) {\n const res = compareVersions(v1, v2);\n return operatorResMap[operator].indexOf(res) > -1;\n}\nfunction validate(version) {\n return acceptsAll.includes(version) || semver.test(version);\n}\nfunction satisfies(v, r) {\n if (!acceptsAll.includes(r)) {\n const match = r.match(/^([<>=~^]+)/);\n const op = match ? match[1] : \"=\";\n if (op !== \"^\" && op !== \"~\") {\n return compare(v, r, op);\n }\n const [v1, v2, v3] = validateAndParse(v);\n const [m1, m2, m3] = validateAndParse(r);\n if (compareStrings(v1, m1) !== 0) {\n return false;\n } else if (op === \"^\") {\n return compareSegments([v2, v3], [m2, m3]) >= 0;\n } else if (compareStrings(v2, m2) !== 0) {\n return false;\n }\n return compareStrings(v3, m3) >= 0;\n }\n return true;\n}\n\n// src/utils/system.ts\nvar systemResolve = System.constructor.prototype.resolve;\nvar systemRegister = System.constructor.prototype.register;\nfunction getLoadedVersions(prefix) {\n return [...System.entries()].filter(([name]) => name.startsWith(prefix)).map(([name]) => name.substring(prefix.length));\n}\nfunction findMatchingPackage(id) {\n const sep = id.indexOf(\"@\", 1);\n if (sep > 1) {\n const available = Object.keys(System.registerRegistry);\n const name = id.substring(0, sep + 1);\n const versionSpec = id.substring(sep + 1);\n if (validate(versionSpec)) {\n const loadedVersions = getLoadedVersions(name);\n const allVersions = available.filter((m) => m.startsWith(name)).map((m) => m.substring(name.length));\n const availableVersions = [...loadedVersions, ...allVersions.filter((m) => !loadedVersions.includes(m))];\n for (const availableVersion of availableVersions) {\n if (validate(availableVersion) && satisfies(availableVersion, versionSpec)) {\n return name + availableVersion;\n }\n }\n }\n }\n return void 0;\n}\nfunction isPrimitiveExport(content) {\n const type = typeof content;\n return type === \"number\" || type === \"boolean\" || type === \"symbol\" || type === \"string\" || type === \"bigint\" || Array.isArray(content);\n}\nSystem.constructor.prototype.resolve = function(id, parentUrl) {\n try {\n return systemResolve.call(this, id, parentUrl);\n } catch (ex) {\n const result = findMatchingPackage(id);\n if (!result) {\n throw ex;\n }\n return result;\n }\n};\nSystem.constructor.prototype.register = function(...args) {\n const getContent = args.pop();\n args.push((_export, ctx) => {\n const exp = (...p) => {\n if (p.length === 1) {\n const content = p[0];\n if (content instanceof Promise) {\n return content.then(exp);\n } else if (typeof content === \"function\") {\n _export(\"__esModule\", true);\n Object.keys(content).forEach((prop) => {\n _export(prop, content[prop]);\n });\n _export(\"default\", content);\n } else if (isPrimitiveExport(content)) {\n _export(\"__esModule\", true);\n _export(\"default\", content);\n } else if (content) {\n _export(content);\n if (typeof content === \"object\" && !(\"default\" in content)) {\n _export(\"default\", content);\n }\n }\n } else {\n return _export(...p);\n }\n };\n return getContent(exp, ctx);\n });\n return systemRegister.apply(this, args);\n};\nfunction tryResolve(name, parent) {\n try {\n return System.resolve(name, parent);\n } catch {\n return void 0;\n }\n}\nfunction handleFailure(error, link) {\n console.error(\"Failed to load SystemJS module\", link, error);\n return emptyApp;\n}\nfunction loadSystemPilet(link) {\n return System.import(link).catch((error) => handleFailure(error, link));\n}\nfunction registerDependencies(modules) {\n const moduleNames = Object.keys(modules);\n moduleNames.forEach((name) => registerModule(name, () => modules[name]));\n return Promise.all(moduleNames.map((name) => System.import(name)));\n}\nfunction registerModule(name, resolve) {\n System.register(name, [], (_exports) => ({\n execute() {\n const content = resolve();\n if (content instanceof Promise) {\n return content.then(_exports);\n } else {\n _exports(content);\n }\n }\n }));\n}\nfunction registerDependencyUrls(dependencies) {\n for (const name of Object.keys(dependencies)) {\n if (!System.has(name)) {\n const dependency = dependencies[name];\n registerModule(name, () => System.import(dependency));\n }\n }\n}\nfunction unregisterModules(baseUrl, dependencies) {\n [...System.entries()].map(([name]) => name).filter((name) => name.startsWith(baseUrl) && !dependencies.includes(name)).forEach((name) => System.delete(name));\n}\nfunction requireModule(name, parent) {\n const moduleId = tryResolve(name, parent);\n const dependency = moduleId && System.get(moduleId);\n if (!dependency) {\n const error = new Error(`Cannot find module '${name}'`);\n error.code = \"MODULE_NOT_FOUND\";\n throw error;\n }\n return dependency;\n}\n\n// src/utils/helpers.ts\nfunction isfunc(f) {\n return typeof f === \"function\";\n}\nfunction callfunc(f, ...args) {\n isfunc(f) && f(...args);\n}\nfunction promisify(value) {\n return Promise.resolve(value);\n}\nfunction getBasePath(link) {\n if (link) {\n const idx = link.lastIndexOf(\"/\");\n return link.substring(0, idx + 1);\n }\n return link;\n}\n\n// src/utils/dependency.ts\nfunction createEvaluatedPilet(meta, mod) {\n const basePath = getBasePath(meta.link);\n const app = checkPiletApp(meta.name, mod);\n return { ...meta, ...app, basePath };\n}\nfunction checkCreateApi(createApi) {\n if (!isfunc(createApi)) {\n console.warn(\"Invalid `createApi` function. Skipping pilet installation.\");\n return false;\n }\n return true;\n}\nfunction checkPiletApp(name, app) {\n if (!app) {\n console.error(\"Invalid module found.\", name);\n } else if (typeof app.setup !== \"function\") {\n console.warn(\"Setup function is missing.\", name);\n } else {\n return app;\n }\n return emptyApp;\n}\nfunction checkPiletAppAsync(name, app) {\n return promisify(app).then((resolvedApp) => checkPiletApp(name, resolvedApp));\n}\nfunction includeScript(depName, link, integrity, crossOrigin) {\n window[depName] = (moduleId) => requireModule(moduleId, link);\n return includeScriptDependency(link, integrity, crossOrigin).then((s) => s.app);\n}\nfunction includeScriptDependency(link, integrity, crossOrigin) {\n return new Promise((resolve, reject) => {\n const s = document.createElement(\"script\");\n s.async = true;\n s.src = link;\n if (integrity) {\n s.crossOrigin = crossOrigin || \"anonymous\";\n s.integrity = integrity;\n } else if (crossOrigin) {\n s.crossOrigin = crossOrigin;\n }\n s.onload = () => resolve(s);\n s.onerror = (e) => reject(e);\n document.body.appendChild(s);\n });\n}\n\n// src/utils/load.ts\nvar depContext = {};\nfunction loadSharedDependencies(dependencies) {\n if (dependencies) {\n const names = Object.keys(dependencies);\n return Promise.all(\n names.map((name) => {\n return depContext[name] || (depContext[name] = includeScriptDependency(dependencies[name]));\n })\n );\n }\n return promisify();\n}\nfunction handleFailure2(error, name) {\n console.error(\"Failed to load pilet\", name, error);\n return emptyApp;\n}\nfunction loadFrom(meta, loadPilet) {\n return loadSharedDependencies(meta.dependencies).then(loadPilet).catch((error) => handleFailure2(error, meta.name)).then((app) => createEvaluatedPilet(meta, app));\n}\n\n// src/lifecycle/cleanup.ts\nvar evtName = \"unload-pilet\";\nfunction runCleanup(app, api, hooks) {\n if (typeof document !== \"undefined\") {\n const css = document.querySelector(`link[data-origin=${JSON.stringify(app.name)}]`);\n css?.remove();\n }\n const url = app.basePath;\n callfunc(app.teardown, api);\n callfunc(hooks.cleanupPilet, app);\n if (\"requireRef\" in app) {\n const depName = app.requireRef;\n delete globalThis[depName];\n }\n if (url) {\n unregisterModules(url, Object.values(app.dependencies));\n }\n}\nfunction prepareCleanup(app, api, hooks) {\n const handler = (e) => {\n if (e.name === app.name) {\n api.off(evtName, handler);\n runCleanup(app, api, hooks);\n }\n };\n api.on(evtName, handler);\n}\n\n// src/lifecycle/setup.ts\nfunction logError(name, e) {\n console.error(`Error while setting up ${name}.`, e);\n}\nfunction withCatch(result, name) {\n if (result instanceof Promise) {\n return result.catch((e) => logError(name, e));\n }\n return promisify(result);\n}\nfunction setupSinglePilet(app, apiFactory, hooks) {\n const name = app?.name;\n try {\n const api = apiFactory(app);\n callfunc(hooks.setupPilet, app);\n const result = app.setup(api);\n prepareCleanup(app, api, hooks);\n return withCatch(result, name);\n } catch (e) {\n logError(name, e);\n }\n return promisify();\n}\nfunction setupPiletBundle(app, apiFactory, hooks) {\n const name = app?.name || \"pilet bundle\";\n try {\n callfunc(hooks.setupPilet, app);\n const result = app.setup(apiFactory);\n return withCatch(result, name);\n } catch (e) {\n logError(name, e);\n }\n return promisify();\n}\n\n// src/inspect.ts\nfunction inspectPilet(meta) {\n const inBrowser = typeof document !== \"undefined\";\n if (\"link\" in meta && meta.spec === \"v3\") {\n return [\"v3\", meta, setupSinglePilet];\n } else if (inBrowser && \"link\" in meta && meta.spec === \"mf\") {\n return [\"mf\", meta, setupSinglePilet];\n } else if (inBrowser && \"link\" in meta && meta.spec === \"v2\") {\n return [\"v2\", meta, setupSinglePilet];\n } else if (inBrowser && \"requireRef\" in meta && meta.spec !== \"v2\") {\n return [\"v1\", meta, setupSinglePilet];\n } else if (inBrowser && \"bundle\" in meta && meta.bundle) {\n return [\"bundle\", meta, setupPiletBundle];\n } else if (\"hash\" in meta) {\n return [\"v0\", meta, setupSinglePilet];\n } else {\n return [\"unknown\", meta, setupSinglePilet];\n }\n}\n\n// src/aggregate.ts\nfunction runPilets(createApi, pilets, hooks = {}) {\n const promises = [];\n if (Array.isArray(pilets)) {\n for (const pilet of pilets) {\n const [, , setupPilet] = inspectPilet(pilet);\n const wait = setupPilet(pilet, createApi, hooks);\n promises.push(wait);\n }\n }\n return Promise.all(promises).then(() => pilets);\n}\nfunction runPilet(createApi, pilet, hooks = {}) {\n const [, , setupPilet] = inspectPilet(pilet);\n const wait = setupPilet(pilet, createApi, hooks);\n return wait.then(() => pilet);\n}\n\n// src/api.ts\nfunction initializeApi(target, events) {\n return {\n on: events.on,\n once: events.once,\n off: events.off,\n emit: events.emit,\n meta: Object.assign({}, target)\n };\n}\nfunction mergeApis(api, extenders, target) {\n const frags = extenders.map((extender) => extender(api, target));\n Object.assign(api, ...frags);\n return api;\n}\n\n// src/load.ts\nfunction checkFetchPilets(fetchPilets) {\n if (!isfunc(fetchPilets)) {\n console.error(\"Could not get the pilets. Provide a valid `fetchPilets` function.\");\n return false;\n }\n return true;\n}\nfunction loadMetadata(fetchPilets) {\n if (checkFetchPilets(fetchPilets)) {\n return fetchPilets().then((pilets) => {\n if (!Array.isArray(pilets)) {\n throw new Error(\"The fetched pilets metadata is not an array.\");\n }\n return pilets.map((meta) => ({ ...meta }));\n });\n }\n return promisify([]);\n}\nfunction loadPilets(fetchPilets, loadPilet) {\n return loadMetadata(fetchPilets).then((pilets) => Promise.all(pilets.map(loadPilet)));\n}\n\n// src/loaders/bundle/dependency.ts\nfunction includeBundle(meta, crossOrigin) {\n return includeScript(meta.bundle, meta.link, meta.integrity, crossOrigin);\n}\n\n// src/loaders/bundle/index.ts\nfunction loader(entry, config) {\n const { dependencies = {}, spec = \"v1\", name = `[bundle] ${entry.link}`, ...rest } = entry;\n const meta = {\n name,\n version: \"\",\n config: {},\n spec,\n dependencies,\n ...rest\n };\n return loadFrom(meta, () => includeBundle(entry, config.crossOrigin));\n}\n\n// src/loaders/empty/index.ts\nfunction loader2(entry, _config) {\n const { name, spec = \"vx\", ...rest } = entry;\n const dependencies = \"dependencies\" in entry ? entry.dependencies : {};\n const meta = {\n name,\n version: \"\",\n spec,\n dependencies,\n config: {},\n link: \"\",\n basePath: \"\",\n ...rest\n };\n console.warn(\"Empty pilet found!\", name);\n return promisify({ ...meta, ...emptyApp });\n}\n\n// src/loaders/v0/fetch.ts\nfunction fetchDependency(url) {\n return fetch(url, {\n method: \"GET\",\n cache: \"force-cache\"\n }).then((m) => m.text());\n}\n\n// src/loaders/v0/dependency.ts\nfunction evalDependency(name, content, link = \"\") {\n const mod = {\n exports: {}\n };\n try {\n const sourceUrl = link && `\n//# sourceURL=${link}`;\n const importer = new Function(\"module\", \"exports\", \"require\", content + sourceUrl);\n const parent = link || name;\n const require2 = (moduleId) => requireModule(moduleId, parent);\n importer(mod, mod.exports, require2);\n } catch (e) {\n console.error(`Error while evaluating ${name}.`, e);\n }\n return mod.exports;\n}\n\n// src/loaders/v0/index.ts\nfunction loader3(entry, _config) {\n const { name, config = {}, dependencies = {}, spec = \"v0\" } = entry;\n const meta = {\n name,\n config,\n dependencies,\n spec,\n link: \"\",\n ...entry\n };\n if (\"link\" in entry && entry.link) {\n return loadFrom(\n meta,\n () => fetchDependency(entry.link).then((content) => evalDependency(name, content, entry.link))\n );\n } else {\n const content = \"content\" in entry && entry.content || \"\";\n return loadFrom(meta, () => evalDependency(name, content, void 0));\n }\n}\n\n// src/loaders/v1/dependency.ts\nfunction includeDependency(entry, crossOrigin) {\n return includeScript(entry.requireRef, entry.link, entry.integrity, crossOrigin);\n}\n\n// src/loaders/v1/index.ts\nfunction loader4(entry, config) {\n const { dependencies = {}, spec = \"v1\", ...rest } = entry;\n const meta = {\n dependencies,\n config: {},\n spec,\n ...rest\n };\n return loadFrom(meta, () => includeDependency(entry, config.crossOrigin));\n}\n\n// src/loaders/v2/index.ts\nfunction loader5(entry, _config) {\n const { dependencies = {}, config = {}, link, ...rest } = entry;\n const meta = {\n dependencies,\n config,\n link,\n ...rest\n };\n registerDependencyUrls(dependencies);\n return loadSystemPilet(link).then((app) => createEvaluatedPilet(meta, app));\n}\n\n// src/loaders/v3/index.ts\nfunction attachStylesToDocument(pilet, url) {\n if (typeof document !== \"undefined\") {\n const link = document.createElement(\"link\");\n link.setAttribute(\"data-origin\", pilet.name);\n link.type = \"text/css\";\n link.rel = \"stylesheet\";\n link.href = url;\n document.head.appendChild(link);\n }\n}\nfunction loader6(entry, options) {\n const { dependencies = {}, config = {}, link, ...rest } = entry;\n const attachStyles = typeof options.attachStyles === \"function\" ? options.attachStyles : attachStylesToDocument;\n const meta = {\n dependencies,\n config,\n link,\n ...rest\n };\n registerDependencyUrls(dependencies);\n return loadSystemPilet(link).then((app) => {\n const pilet = createEvaluatedPilet(meta, app);\n if (Array.isArray(app.styles)) {\n for (const style of app.styles) {\n const s = !style.startsWith(\"//\") ? style.replace(/^\\/+/, \"\") : style;\n const url = new URL(s, pilet.basePath).toString();\n attachStyles(pilet, url);\n }\n }\n return pilet;\n });\n}\n\n// src/loaders/mf/index.ts\nvar appShell = \"piral\";\nfunction populateKnownDependencies(scope) {\n for (const [entry] of System.entries()) {\n const index = entry.lastIndexOf(\"@\");\n if (index > 0 && !entry.match(/^https?:\\/\\//)) {\n const entryName = entry.substring(0, index);\n const entryVersion = entry.substring(index + 1);\n if (!(entryName in scope)) {\n scope[entryName] = {};\n }\n scope[entryName][entryVersion] = {\n from: appShell,\n eager: false,\n get: () => System.import(entry).then((result) => () => result)\n };\n }\n }\n}\nfunction extractSharedDependencies(scope) {\n for (const entryName of Object.keys(scope)) {\n const entries = scope[entryName];\n for (const entryVersion of Object.keys(entries)) {\n const entry = entries[entryVersion];\n if (entry.from !== appShell) {\n registerModule(`${entryName}@${entryVersion}`, () => entry.get().then((factory) => factory()));\n }\n }\n }\n}\nfunction loadMfFactory(piletName, exposedName) {\n const varName = piletName.replace(/^@/, \"\").replace(\"/\", \"-\").replace(/\\-/g, \"_\");\n const container = window[varName];\n const scope = {};\n container.init(scope);\n populateKnownDependencies(scope);\n extractSharedDependencies(scope);\n return container.get(exposedName);\n}\nfunction loader7(entry, _config) {\n const { config = {}, name, link, ...rest } = entry;\n const dependencies = {};\n const exposedName = rest.custom?.exposed || \"./pilet\";\n const meta = {\n name,\n dependencies,\n config,\n link,\n ...rest\n };\n return includeScriptDependency(link).then(() => loadMfFactory(name, exposedName)).then((factory) => createEvaluatedPilet(meta, factory()));\n}\n\n// src/loader.ts\nfunction extendLoader(fallback, specLoaders) {\n if (typeof specLoaders === \"object\" && specLoaders) {\n return (meta) => {\n if (typeof meta.spec === \"string\") {\n const loaderOverride = specLoaders[meta.spec];\n if (isfunc(loaderOverride)) {\n return loaderOverride(meta);\n }\n }\n return fallback(meta);\n };\n }\n return fallback;\n}\nfunction getDefaultLoader(config = {}) {\n return (result) => {\n const r = inspectPilet(result);\n switch (r[0]) {\n case \"v3\":\n return loader6(r[1], config);\n case \"v2\":\n return loader5(r[1], config);\n case \"v1\":\n return loader4(r[1], config);\n case \"v0\":\n return loader3(r[1], config);\n case \"mf\":\n return loader7(r[1], config);\n case \"bundle\":\n return loader(r[1], config);\n default:\n return loader2(r[1], config);\n }\n };\n}\n\n// src/strategies.ts\nfunction runAll(createApi, existingPilets, additionalPilets, hooks) {\n if (!Array.isArray(existingPilets)) {\n return Promise.reject(`The existing pilets must be passed as an array.`);\n }\n if (!checkCreateApi(createApi)) {\n return Promise.resolve([]);\n }\n try {\n for (const existing of existingPilets) {\n const { name } = existing;\n const [newPilet] = additionalPilets.filter((pilet) => pilet.name === name);\n if (newPilet) {\n additionalPilets.splice(additionalPilets.indexOf(newPilet), 1);\n }\n }\n const pilets = [...existingPilets, ...additionalPilets];\n return runPilets(createApi, pilets, hooks);\n } catch (err) {\n return Promise.reject(err);\n }\n}\nfunction createProgressiveStrategy(async) {\n return (options, cb) => {\n const {\n fetchPilets,\n dependencies = {},\n createApi,\n config,\n pilets = [],\n loadPilet = getDefaultLoader(config),\n loaders,\n hooks\n } = options;\n const loadingAll = loadMetadata(fetchPilets);\n const loadSingle = extendLoader(loadPilet, loaders);\n return registerDependencies(dependencies).then(() => {\n if (!checkCreateApi(createApi)) {\n cb(void 0, []);\n return Promise.resolve();\n }\n return runPilets(createApi, pilets, hooks).then((integratedPilets) => {\n if (async && integratedPilets.length > 0) {\n cb(void 0, [...integratedPilets]);\n }\n const followUp = loadingAll.then((metadata) => {\n const promises = metadata.map(\n (m) => loadSingle(m).then((app) => {\n const available = pilets.filter((m2) => m2.name === app.name).length === 0;\n if (available) {\n return runPilet(createApi, app, hooks).then((additionalPilet) => {\n integratedPilets.push(additionalPilet);\n if (async) {\n cb(void 0, [...integratedPilets]);\n }\n });\n }\n })\n );\n return Promise.all(promises).then(() => {\n if (!async) {\n cb(void 0, integratedPilets);\n }\n });\n });\n if (async) {\n followUp.catch(() => {\n });\n return loadingAll.then();\n } else {\n return followUp.then();\n }\n });\n });\n };\n}\nfunction blazingStrategy(options, cb) {\n const strategy = createProgressiveStrategy(true);\n return strategy(options, cb);\n}\nfunction asyncStrategy(options, cb) {\n standardStrategy(options, cb);\n return promisify();\n}\nfunction standardStrategy(options, cb) {\n const {\n fetchPilets,\n dependencies = {},\n createApi,\n config,\n pilets = [],\n loadPilet = getDefaultLoader(config),\n loaders,\n hooks\n } = options;\n const loadSingle = extendLoader(loadPilet, loaders);\n return registerDependencies(dependencies).then(() => loadPilets(fetchPilets, loadSingle)).then((additionalPilets) => runAll(createApi, pilets, additionalPilets, hooks)).then((integratedPilets) => cb(void 0, integratedPilets)).catch((error) => cb(error, []));\n}\nfunction syncStrategy(options, cb) {\n const { createApi, hooks, dependencies = {}, pilets = [] } = options;\n return registerDependencies(dependencies).then(\n () => runAll(createApi, pilets, [], hooks).then(\n (integratedPilets) => cb(void 0, integratedPilets),\n (err) => cb(err, [])\n )\n );\n}\nfunction createDeferredStrategy(trigger, strategy = standardStrategy) {\n return (options, cb) => {\n cb(void 0, []);\n trigger.then(() => strategy(options, cb));\n return promisify();\n };\n}\n\n// src/create.ts\nfunction startLoadingPilets(options) {\n const state = {\n loaded: false,\n pilets: [],\n error: void 0\n };\n const notifiers = [];\n const call = (notifier) => notifier(state.error, state.pilets, state.loaded);\n const notify = () => notifiers.forEach(call);\n const setPilets = (error, pilets) => {\n state.error = error;\n state.pilets = pilets;\n notify();\n };\n const setLoaded = () => {\n state.loaded = true;\n notify();\n };\n const { strategy = standardStrategy } = options;\n strategy(options, setPilets).then(setLoaded, setLoaded);\n return {\n connect(notifier) {\n if (isfunc(notifier)) {\n notifiers.push(notifier);\n call(notifier);\n }\n },\n disconnect(notifier) {\n const index = notifiers.indexOf(notifier);\n index !== -1 && notifiers.splice(index, 1);\n }\n };\n}\n\n// src/events.ts\nfunction nameOf(type) {\n return `piral-${type}`;\n}\nfunction createListener(state = {}) {\n const eventListeners = [];\n const events = {\n on(type, callback) {\n const listener = ({ detail }) => detail && detail.state === state && callback(detail.arg);\n document.body.addEventListener(nameOf(type), listener);\n eventListeners.push([callback, listener]);\n return events;\n },\n once(type, callback) {\n const cb = (ev) => {\n events.off(type, cb);\n callback(ev);\n };\n return events.on(type, cb);\n },\n off(type, callback) {\n const [listener] = eventListeners.filter((m) => m[0] === callback);\n if (listener) {\n document.body.removeEventListener(nameOf(type), listener[1]);\n eventListeners.splice(eventListeners.indexOf(listener), 1);\n }\n return events;\n },\n emit(type, arg) {\n document.body.dispatchEvent(\n new CustomEvent(nameOf(type), {\n bubbles: false,\n cancelable: false,\n detail: {\n arg,\n state\n }\n })\n );\n return events;\n }\n };\n return events;\n}\nexport {\n asyncStrategy,\n blazingStrategy,\n callfunc,\n checkCreateApi,\n checkPiletApp,\n checkPiletAppAsync,\n createDeferredStrategy,\n createEvaluatedPilet,\n createListener,\n createProgressiveStrategy,\n emptyApp,\n extendLoader,\n getBasePath,\n getDefaultLoader,\n includeScript,\n includeScriptDependency,\n initializeApi,\n inspectPilet,\n isfunc,\n loadFrom,\n loadMetadata,\n loadPilets,\n loadSystemPilet,\n mergeApis,\n prepareCleanup,\n promisify,\n registerDependencies,\n registerDependencyUrls,\n registerModule,\n requireModule,\n runCleanup,\n runPilet,\n runPilets,\n setupPiletBundle,\n setupSinglePilet,\n standardStrategy,\n startLoadingPilets,\n syncStrategy,\n unregisterModules\n};\n/*! Bundled license information:\n\nsystemjs/dist/system.js:\n (*!\n * SystemJS 6.15.1\n *)\n*/\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Check if module exists (development only)\n\tif (__webpack_modules__[moduleId] === undefined) {\n\t\tvar e = new Error(\"Cannot find module '\" + moduleId + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { startLoadingPilets, initializeApi, createListener } from 'piral-base';\n\nconst events = createListener();\n\nstartLoadingPilets({\n createApi(target) {\n return initializeApi(target, events);\n },\n fetchPilets() {\n return Promise.resolve([]);\n },\n});\n"],"names":[],"ignoreList":[],"sourceRoot":""}
package/app/index.html CHANGED
@@ -3,7 +3,7 @@
3
3
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
4
4
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
5
5
  <title>Empty Piral Instance</title>
6
- <script defer src="/index.a9f6f2.js"></script></head>
6
+ <script defer src="/index.c7ac5f.js"></script></head>
7
7
  <body>
8
8
  <div id="app"></div>
9
9
 
package/files.tar CHANGED
Binary file
package/files_once.tar CHANGED
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "empty-piral",
3
3
  "description": "An empty app shell with no dependencies.",
4
- "version": "1.10.0-beta.8564",
4
+ "version": "1.10.0-beta.8571",
5
5
  "license": "MIT",
6
6
  "homepage": "https://piral.io",
7
7
  "keywords": [
@@ -24,7 +24,7 @@
24
24
  "files": []
25
25
  },
26
26
  "piralCLI": {
27
- "version": "1.10.0-beta.8564",
27
+ "version": "1.10.0-beta.8571",
28
28
  "generated": true
29
29
  },
30
30
  "main": "./app/index.js",
@@ -33,9 +33,9 @@
33
33
  "peerDependencies": {},
34
34
  "optionalDependencies": {},
35
35
  "devDependencies": {
36
- "piral-cli": "^1.10.0-beta.8564",
37
- "piral-cli-webpack5": "^1.10.0-beta.8564",
38
- "piral-base": "^1.10.0-beta.8564",
36
+ "piral-cli": "^1.10.0-beta.8571",
37
+ "piral-cli-webpack5": "^1.10.0-beta.8571",
38
+ "piral-base": "^1.10.0-beta.8571",
39
39
  "tslib": "2.8.1"
40
40
  },
41
41
  "sharedDependencies": [
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.a9f6f2.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAEA;AAGA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AALA;AAAA;AAAA;AAMA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AAAA;AACA;AACA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAAA;AAAA;AACA;AACA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AAAA;AAAA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGA;AAAA;AAAA;AACA;;AAEA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;;AAEA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGA;AACA;AAEA;AAAA;AAAA;AAAA;AAEA;AACA;AACA;AAAA;AAAA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAGA;AAAA;AAAA;AACA;;AAEA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAGA;AACA;AAAA;AAAA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGA;AACA;AACA;AACA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAdA;AAAA;AAAA;AAcA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AALA;AAAA;AAAA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGA;AAAA;AAAA;AAAA;AAAA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AANA;AAAA;AAAA;AAMA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AAEA;AACA;AAAA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAyCA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACrwDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACPA;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACNA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","sources":["webpack://empty-piral/../../framework/piral-base/dist/piral-base-full.mjs","webpack://empty-piral/webpack/bootstrap","webpack://empty-piral/webpack/runtime/define property getters","webpack://empty-piral/webpack/runtime/global","webpack://empty-piral/webpack/runtime/hasOwnProperty shorthand","webpack://empty-piral/webpack/runtime/make namespace object","webpack://empty-piral/./src/index.tsx"],"sourcesContent":["// ../../../node_modules/systemjs/dist/system.js\n(function() {\n function errMsg(errCode, msg) {\n return (msg || \"\") + \" (SystemJS Error#\" + errCode + \" https://github.com/systemjs/systemjs/blob/main/docs/errors.md#\" + errCode + \")\";\n }\n var hasSymbol = typeof Symbol !== \"undefined\";\n var hasSelf = typeof self !== \"undefined\";\n var hasDocument = typeof document !== \"undefined\";\n var envGlobal = hasSelf ? self : global;\n var baseUrl;\n if (hasDocument) {\n var baseEl = document.querySelector(\"base[href]\");\n if (baseEl)\n baseUrl = baseEl.href;\n }\n if (!baseUrl && typeof location !== \"undefined\") {\n baseUrl = location.href.split(\"#\")[0].split(\"?\")[0];\n var lastSepIndex = baseUrl.lastIndexOf(\"/\");\n if (lastSepIndex !== -1)\n baseUrl = baseUrl.slice(0, lastSepIndex + 1);\n }\n var backslashRegEx = /\\\\/g;\n function resolveIfNotPlainOrUrl(relUrl, parentUrl) {\n if (relUrl.indexOf(\"\\\\\") !== -1)\n relUrl = relUrl.replace(backslashRegEx, \"/\");\n if (relUrl[0] === \"/\" && relUrl[1] === \"/\") {\n return parentUrl.slice(0, parentUrl.indexOf(\":\") + 1) + relUrl;\n } else if (relUrl[0] === \".\" && (relUrl[1] === \"/\" || relUrl[1] === \".\" && (relUrl[2] === \"/\" || relUrl.length === 2 && (relUrl += \"/\")) || relUrl.length === 1 && (relUrl += \"/\")) || relUrl[0] === \"/\") {\n var parentProtocol = parentUrl.slice(0, parentUrl.indexOf(\":\") + 1);\n var pathname;\n if (parentUrl[parentProtocol.length + 1] === \"/\") {\n if (parentProtocol !== \"file:\") {\n pathname = parentUrl.slice(parentProtocol.length + 2);\n pathname = pathname.slice(pathname.indexOf(\"/\") + 1);\n } else {\n pathname = parentUrl.slice(8);\n }\n } else {\n pathname = parentUrl.slice(parentProtocol.length + (parentUrl[parentProtocol.length] === \"/\"));\n }\n if (relUrl[0] === \"/\")\n return parentUrl.slice(0, parentUrl.length - pathname.length - 1) + relUrl;\n var segmented = pathname.slice(0, pathname.lastIndexOf(\"/\") + 1) + relUrl;\n var output = [];\n var segmentIndex = -1;\n for (var i = 0; i < segmented.length; i++) {\n if (segmentIndex !== -1) {\n if (segmented[i] === \"/\") {\n output.push(segmented.slice(segmentIndex, i + 1));\n segmentIndex = -1;\n }\n } else if (segmented[i] === \".\") {\n if (segmented[i + 1] === \".\" && (segmented[i + 2] === \"/\" || i + 2 === segmented.length)) {\n output.pop();\n i += 2;\n } else if (segmented[i + 1] === \"/\" || i + 1 === segmented.length) {\n i += 1;\n } else {\n segmentIndex = i;\n }\n } else {\n segmentIndex = i;\n }\n }\n if (segmentIndex !== -1)\n output.push(segmented.slice(segmentIndex));\n return parentUrl.slice(0, parentUrl.length - pathname.length) + output.join(\"\");\n }\n }\n function resolveUrl(relUrl, parentUrl) {\n return resolveIfNotPlainOrUrl(relUrl, parentUrl) || (relUrl.indexOf(\":\") !== -1 ? relUrl : resolveIfNotPlainOrUrl(\"./\" + relUrl, parentUrl));\n }\n function resolveAndComposePackages(packages, outPackages, baseUrl2, parentMap, parentUrl) {\n for (var p in packages) {\n var resolvedLhs = resolveIfNotPlainOrUrl(p, baseUrl2) || p;\n var rhs = packages[p];\n if (typeof rhs !== \"string\")\n continue;\n var mapped = resolveImportMap(parentMap, resolveIfNotPlainOrUrl(rhs, baseUrl2) || rhs, parentUrl);\n if (!mapped) {\n targetWarning(\"W1\", p, rhs, \"bare specifier did not resolve\");\n } else\n outPackages[resolvedLhs] = mapped;\n }\n }\n function resolveAndComposeImportMap(json, baseUrl2, outMap) {\n if (json.imports)\n resolveAndComposePackages(json.imports, outMap.imports, baseUrl2, outMap, null);\n var u;\n for (u in json.scopes || {}) {\n var resolvedScope = resolveUrl(u, baseUrl2);\n resolveAndComposePackages(json.scopes[u], outMap.scopes[resolvedScope] || (outMap.scopes[resolvedScope] = {}), baseUrl2, outMap, resolvedScope);\n }\n for (u in json.depcache || {})\n outMap.depcache[resolveUrl(u, baseUrl2)] = json.depcache[u];\n for (u in json.integrity || {})\n outMap.integrity[resolveUrl(u, baseUrl2)] = json.integrity[u];\n }\n function getMatch(path, matchObj) {\n if (matchObj[path])\n return path;\n var sepIndex = path.length;\n do {\n var segment = path.slice(0, sepIndex + 1);\n if (segment in matchObj)\n return segment;\n } while ((sepIndex = path.lastIndexOf(\"/\", sepIndex - 1)) !== -1);\n }\n function applyPackages(id, packages) {\n var pkgName = getMatch(id, packages);\n if (pkgName) {\n var pkg = packages[pkgName];\n if (pkg === null) return;\n if (id.length > pkgName.length && pkg[pkg.length - 1] !== \"/\") {\n targetWarning(\"W2\", pkgName, pkg, \"should have a trailing '/'\");\n } else\n return pkg + id.slice(pkgName.length);\n }\n }\n function targetWarning(code, match, target, msg) {\n console.warn(errMsg(code, \"Package target \" + msg + \", resolving target '\" + target + \"' for \" + match));\n }\n function resolveImportMap(importMap2, resolvedOrPlain, parentUrl) {\n var scopes = importMap2.scopes;\n var scopeUrl = parentUrl && getMatch(parentUrl, scopes);\n while (scopeUrl) {\n var packageResolution = applyPackages(resolvedOrPlain, scopes[scopeUrl]);\n if (packageResolution)\n return packageResolution;\n scopeUrl = getMatch(scopeUrl.slice(0, scopeUrl.lastIndexOf(\"/\")), scopes);\n }\n return applyPackages(resolvedOrPlain, importMap2.imports) || resolvedOrPlain.indexOf(\":\") !== -1 && resolvedOrPlain;\n }\n var toStringTag$1 = hasSymbol && Symbol.toStringTag;\n var REGISTRY = hasSymbol ? /* @__PURE__ */ Symbol() : \"@\";\n function SystemJS() {\n this[REGISTRY] = {};\n }\n var systemJSPrototype = SystemJS.prototype;\n systemJSPrototype.import = function(id, parentUrl, meta) {\n var loader8 = this;\n parentUrl && typeof parentUrl === \"object\" && (meta = parentUrl, parentUrl = void 0);\n return Promise.resolve(loader8.prepareImport()).then(function() {\n return loader8.resolve(id, parentUrl, meta);\n }).then(function(id2) {\n var load = getOrCreateLoad(loader8, id2, void 0, meta);\n return load.C || topLevelLoad(loader8, load);\n });\n };\n systemJSPrototype.createContext = function(parentId) {\n var loader8 = this;\n return {\n url: parentId,\n resolve: function(id, parentUrl) {\n return Promise.resolve(loader8.resolve(id, parentUrl || parentId));\n }\n };\n };\n systemJSPrototype.onload = function() {\n };\n function loadToId(load) {\n return load.id;\n }\n function triggerOnload(loader8, load, err, isErrSource) {\n loader8.onload(err, load.id, load.d && load.d.map(loadToId), !!isErrSource);\n if (err)\n throw err;\n }\n var lastRegister;\n systemJSPrototype.register = function(deps, declare, metas) {\n lastRegister = [deps, declare, metas];\n };\n systemJSPrototype.getRegister = function() {\n var _lastRegister = lastRegister;\n lastRegister = void 0;\n return _lastRegister;\n };\n function getOrCreateLoad(loader8, id, firstParentUrl, meta) {\n var load = loader8[REGISTRY][id];\n if (load)\n return load;\n var importerSetters = [];\n var ns = /* @__PURE__ */ Object.create(null);\n if (toStringTag$1)\n Object.defineProperty(ns, toStringTag$1, { value: \"Module\" });\n var instantiatePromise = Promise.resolve().then(function() {\n return loader8.instantiate(id, firstParentUrl, meta);\n }).then(function(registration) {\n if (!registration)\n throw Error(errMsg(2, \"Module \" + id + \" did not instantiate\"));\n function _export(name, value) {\n load.h = true;\n var changed = false;\n if (typeof name === \"string\") {\n if (!(name in ns) || ns[name] !== value) {\n ns[name] = value;\n changed = true;\n }\n } else {\n for (var p in name) {\n var value = name[p];\n if (!(p in ns) || ns[p] !== value) {\n ns[p] = value;\n changed = true;\n }\n }\n if (name && name.__esModule) {\n ns.__esModule = name.__esModule;\n }\n }\n if (changed)\n for (var i = 0; i < importerSetters.length; i++) {\n var setter = importerSetters[i];\n if (setter) setter(ns);\n }\n return value;\n }\n var declared = registration[1](_export, registration[1].length === 2 ? {\n import: function(importId, meta2) {\n return loader8.import(importId, id, meta2);\n },\n meta: loader8.createContext(id)\n } : void 0);\n load.e = declared.execute || function() {\n };\n return [registration[0], declared.setters || [], registration[2] || []];\n }, function(err) {\n load.e = null;\n load.er = err;\n triggerOnload(loader8, load, err, true);\n throw err;\n });\n var linkPromise = instantiatePromise.then(function(instantiation) {\n return Promise.all(instantiation[0].map(function(dep, i) {\n var setter = instantiation[1][i];\n var meta2 = instantiation[2][i];\n return Promise.resolve(loader8.resolve(dep, id)).then(function(depId) {\n var depLoad = getOrCreateLoad(loader8, depId, id, meta2);\n return Promise.resolve(depLoad.I).then(function() {\n if (setter) {\n depLoad.i.push(setter);\n if (depLoad.h || !depLoad.I)\n setter(depLoad.n);\n }\n return depLoad;\n });\n });\n })).then(function(depLoads) {\n load.d = depLoads;\n });\n });\n return load = loader8[REGISTRY][id] = {\n id,\n // importerSetters, the setters functions registered to this dependency\n // we retain this to add more later\n i: importerSetters,\n // module namespace object\n n: ns,\n // extra module information for import assertion\n // shape like: { assert: { type: 'xyz' } }\n m: meta,\n // instantiate\n I: instantiatePromise,\n // link\n L: linkPromise,\n // whether it has hoisted exports\n h: false,\n // On instantiate completion we have populated:\n // dependency load records\n d: void 0,\n // execution function\n e: void 0,\n // On execution we have populated:\n // the execution error if any\n er: void 0,\n // in the case of TLA, the execution promise\n E: void 0,\n // On execution, L, I, E cleared\n // Promise for top-level completion\n C: void 0,\n // parent instantiator / executor\n p: void 0\n };\n }\n function instantiateAll(loader8, load, parent, loaded) {\n if (!loaded[load.id]) {\n loaded[load.id] = true;\n return Promise.resolve(load.L).then(function() {\n if (!load.p || load.p.e === null)\n load.p = parent;\n return Promise.all(load.d.map(function(dep) {\n return instantiateAll(loader8, dep, parent, loaded);\n }));\n }).catch(function(err) {\n if (load.er)\n throw err;\n load.e = null;\n triggerOnload(loader8, load, err, false);\n throw err;\n });\n }\n }\n function topLevelLoad(loader8, load) {\n return load.C = instantiateAll(loader8, load, load, {}).then(function() {\n return postOrderExec(loader8, load, {});\n }).then(function() {\n return load.n;\n });\n }\n var nullContext = Object.freeze(/* @__PURE__ */ Object.create(null));\n function postOrderExec(loader8, load, seen) {\n if (seen[load.id])\n return;\n seen[load.id] = true;\n if (!load.e) {\n if (load.er)\n throw load.er;\n if (load.E)\n return load.E;\n return;\n }\n var exec = load.e;\n load.e = null;\n var depLoadPromises;\n load.d.forEach(function(depLoad) {\n try {\n var depLoadPromise = postOrderExec(loader8, depLoad, seen);\n if (depLoadPromise)\n (depLoadPromises = depLoadPromises || []).push(depLoadPromise);\n } catch (err) {\n load.er = err;\n triggerOnload(loader8, load, err, false);\n throw err;\n }\n });\n if (depLoadPromises)\n return Promise.all(depLoadPromises).then(doExec);\n return doExec();\n function doExec() {\n try {\n var execPromise = exec.call(nullContext);\n if (execPromise) {\n execPromise = execPromise.then(function() {\n load.C = load.n;\n load.E = null;\n if (true) triggerOnload(loader8, load, null, true);\n }, function(err) {\n load.er = err;\n load.E = null;\n if (true) triggerOnload(loader8, load, err, true);\n throw err;\n });\n return load.E = execPromise;\n }\n load.C = load.n;\n load.L = load.I = void 0;\n } catch (err) {\n load.er = err;\n throw err;\n } finally {\n triggerOnload(loader8, load, load.er, true);\n }\n }\n }\n envGlobal.System = new SystemJS();\n var importMapPromise = Promise.resolve();\n var importMap = { imports: {}, scopes: {}, depcache: {}, integrity: {} };\n var processFirst = hasDocument;\n systemJSPrototype.prepareImport = function(doProcessScripts) {\n if (processFirst || doProcessScripts) {\n processScripts();\n processFirst = false;\n }\n return importMapPromise;\n };\n systemJSPrototype.getImportMap = function() {\n return JSON.parse(JSON.stringify(importMap));\n };\n if (hasDocument) {\n processScripts();\n window.addEventListener(\"DOMContentLoaded\", processScripts);\n }\n systemJSPrototype.addImportMap = function(newMap, mapBase) {\n resolveAndComposeImportMap(newMap, mapBase || baseUrl, importMap);\n };\n function processScripts() {\n [].forEach.call(document.querySelectorAll(\"script\"), function(script) {\n if (script.sp)\n return;\n if (script.type === \"systemjs-module\") {\n script.sp = true;\n if (!script.src)\n return;\n System.import(script.src.slice(0, 7) === \"import:\" ? script.src.slice(7) : resolveUrl(script.src, baseUrl)).catch(function(e) {\n if (e.message.indexOf(\"https://github.com/systemjs/systemjs/blob/main/docs/errors.md#3\") > -1) {\n var event = document.createEvent(\"Event\");\n event.initEvent(\"error\", false, false);\n script.dispatchEvent(event);\n }\n return Promise.reject(e);\n });\n } else if (script.type === \"systemjs-importmap\") {\n script.sp = true;\n var fetchPromise = script.src ? (System.fetch || fetch)(script.src, { integrity: script.integrity, priority: script.fetchPriority, passThrough: true }).then(function(res) {\n if (!res.ok)\n throw Error(\"Invalid status code: \" + res.status);\n return res.text();\n }).catch(function(err) {\n err.message = errMsg(\"W4\", \"Error fetching systemjs-import map \" + script.src) + \"\\n\" + err.message;\n console.warn(err);\n if (typeof script.onerror === \"function\") {\n script.onerror();\n }\n return \"{}\";\n }) : script.innerHTML;\n importMapPromise = importMapPromise.then(function() {\n return fetchPromise;\n }).then(function(text) {\n extendImportMap(importMap, text, script.src || baseUrl);\n });\n }\n });\n }\n function extendImportMap(importMap2, newMapText, newMapUrl) {\n var newMap = {};\n try {\n newMap = JSON.parse(newMapText);\n } catch (err) {\n console.warn(Error(errMsg(\"W5\", \"systemjs-importmap contains invalid JSON\") + \"\\n\\n\" + newMapText + \"\\n\"));\n }\n resolveAndComposeImportMap(newMap, newMapUrl, importMap2);\n }\n if (hasDocument) {\n window.addEventListener(\"error\", function(evt) {\n lastWindowErrorUrl = evt.filename;\n lastWindowError = evt.error;\n });\n var baseOrigin = location.origin;\n }\n systemJSPrototype.createScript = function(url) {\n var script = document.createElement(\"script\");\n script.async = true;\n if (url.indexOf(baseOrigin + \"/\"))\n script.crossOrigin = \"anonymous\";\n var integrity = importMap.integrity[url];\n if (integrity)\n script.integrity = integrity;\n script.src = url;\n return script;\n };\n var lastAutoImportDeps, lastAutoImportTimeout;\n var autoImportCandidates = {};\n var systemRegister2 = systemJSPrototype.register;\n systemJSPrototype.register = function(deps, declare) {\n if (hasDocument && document.readyState === \"loading\" && typeof deps !== \"string\") {\n var scripts = document.querySelectorAll(\"script[src]\");\n var lastScript = scripts[scripts.length - 1];\n if (lastScript) {\n lastScript.src;\n lastAutoImportDeps = deps;\n var loader8 = this;\n lastAutoImportTimeout = setTimeout(function() {\n autoImportCandidates[lastScript.src] = [deps, declare];\n loader8.import(lastScript.src);\n });\n }\n } else {\n lastAutoImportDeps = void 0;\n }\n return systemRegister2.call(this, deps, declare);\n };\n var lastWindowErrorUrl, lastWindowError;\n systemJSPrototype.instantiate = function(url, firstParentUrl) {\n var autoImportRegistration = autoImportCandidates[url];\n if (autoImportRegistration) {\n delete autoImportCandidates[url];\n return autoImportRegistration;\n }\n var loader8 = this;\n return Promise.resolve(systemJSPrototype.createScript(url)).then(function(script) {\n return new Promise(function(resolve, reject) {\n script.addEventListener(\"error\", function() {\n reject(Error(errMsg(3, \"Error loading \" + url + (firstParentUrl ? \" from \" + firstParentUrl : \"\"))));\n });\n script.addEventListener(\"load\", function() {\n document.head.removeChild(script);\n if (lastWindowErrorUrl === url) {\n reject(lastWindowError);\n } else {\n var register = loader8.getRegister(url);\n if (register && register[0] === lastAutoImportDeps)\n clearTimeout(lastAutoImportTimeout);\n resolve(register);\n }\n });\n document.head.appendChild(script);\n });\n });\n };\n systemJSPrototype.shouldFetch = function() {\n return false;\n };\n if (typeof fetch !== \"undefined\")\n systemJSPrototype.fetch = fetch;\n var instantiate = systemJSPrototype.instantiate;\n var jsContentTypeRegEx = /^(text|application)\\/(x-)?javascript(;|$)/;\n systemJSPrototype.instantiate = function(url, parent, meta) {\n var loader8 = this;\n if (!this.shouldFetch(url, parent, meta))\n return instantiate.apply(this, arguments);\n return this.fetch(url, {\n credentials: \"same-origin\",\n integrity: importMap.integrity[url],\n meta\n }).then(function(res) {\n if (!res.ok)\n throw Error(errMsg(7, res.status + \" \" + res.statusText + \", loading \" + url + (parent ? \" from \" + parent : \"\")));\n var contentType = res.headers.get(\"content-type\");\n if (!contentType || !jsContentTypeRegEx.test(contentType))\n throw Error(errMsg(4, 'Unknown Content-Type \"' + contentType + '\", loading ' + url + (parent ? \" from \" + parent : \"\")));\n return res.text().then(function(source) {\n if (source.indexOf(\"//# sourceURL=\") < 0)\n source += \"\\n//# sourceURL=\" + url;\n (0, eval)(source);\n return loader8.getRegister(url);\n });\n });\n };\n systemJSPrototype.resolve = function(id, parentUrl) {\n parentUrl = parentUrl || false || baseUrl;\n return resolveImportMap(importMap, resolveIfNotPlainOrUrl(id, parentUrl) || id, parentUrl) || throwUnresolved(id, parentUrl);\n };\n function throwUnresolved(id, parentUrl) {\n throw Error(errMsg(8, \"Unable to resolve bare specifier '\" + id + (parentUrl ? \"' from \" + parentUrl : \"'\")));\n }\n var systemInstantiate = systemJSPrototype.instantiate;\n systemJSPrototype.instantiate = function(url, firstParentUrl, meta) {\n var preloads = importMap.depcache[url];\n if (preloads) {\n for (var i = 0; i < preloads.length; i++)\n getOrCreateLoad(this, this.resolve(preloads[i], url), url);\n }\n return systemInstantiate.call(this, url, firstParentUrl, meta);\n };\n if (hasSelf && typeof importScripts === \"function\")\n systemJSPrototype.instantiate = function(url) {\n var loader8 = this;\n return Promise.resolve().then(function() {\n importScripts(url);\n return loader8.getRegister(url);\n });\n };\n (function(global2) {\n var systemJSPrototype2 = global2.System.constructor.prototype;\n var firstGlobalProp, secondGlobalProp, lastGlobalProp;\n function getGlobalProp(useFirstGlobalProp) {\n var cnt = 0;\n var foundLastProp, result;\n for (var p in global2) {\n if (shouldSkipProperty(p))\n continue;\n if (cnt === 0 && p !== firstGlobalProp || cnt === 1 && p !== secondGlobalProp)\n return p;\n if (foundLastProp) {\n lastGlobalProp = p;\n result = useFirstGlobalProp && result || p;\n } else {\n foundLastProp = p === lastGlobalProp;\n }\n cnt++;\n }\n return result;\n }\n function noteGlobalProps() {\n firstGlobalProp = secondGlobalProp = void 0;\n for (var p in global2) {\n if (shouldSkipProperty(p))\n continue;\n if (!firstGlobalProp)\n firstGlobalProp = p;\n else if (!secondGlobalProp)\n secondGlobalProp = p;\n lastGlobalProp = p;\n }\n return lastGlobalProp;\n }\n var impt = systemJSPrototype2.import;\n systemJSPrototype2.import = function(id, parentUrl, meta) {\n noteGlobalProps();\n return impt.call(this, id, parentUrl, meta);\n };\n var emptyInstantiation = [[], function() {\n return {};\n }];\n var getRegister = systemJSPrototype2.getRegister;\n systemJSPrototype2.getRegister = function() {\n var lastRegister2 = getRegister.call(this);\n if (lastRegister2)\n return lastRegister2;\n var globalProp = getGlobalProp(this.firstGlobalProp);\n if (!globalProp)\n return emptyInstantiation;\n var globalExport;\n try {\n globalExport = global2[globalProp];\n } catch (e) {\n return emptyInstantiation;\n }\n return [[], function(_export) {\n return {\n execute: function() {\n _export(globalExport);\n _export({ default: globalExport, __useDefault: true });\n }\n };\n }];\n };\n var isIE11 = typeof navigator !== \"undefined\" && navigator.userAgent.indexOf(\"Trident\") !== -1;\n function shouldSkipProperty(p) {\n return !global2.hasOwnProperty(p) || !isNaN(p) && p < global2.length || isIE11 && global2[p] && typeof window !== \"undefined\" && global2[p].parent === window;\n }\n })(typeof self !== \"undefined\" ? self : global);\n (function(global2) {\n var systemJSPrototype2 = global2.System.constructor.prototype;\n var moduleTypesRegEx = /^[^#?]+\\.(css|html|json|wasm)([?#].*)?$/;\n var _shouldFetch = systemJSPrototype2.shouldFetch.bind(systemJSPrototype2);\n systemJSPrototype2.shouldFetch = function(url) {\n return _shouldFetch(url) || moduleTypesRegEx.test(url);\n };\n var jsonContentType = /^application\\/json(;|$)/;\n var cssContentType = /^text\\/css(;|$)/;\n var wasmContentType = /^application\\/wasm(;|$)/;\n var fetch2 = systemJSPrototype2.fetch;\n systemJSPrototype2.fetch = function(url, options) {\n return fetch2(url, options).then(function(res) {\n if (options.passThrough)\n return res;\n if (!res.ok)\n return res;\n var contentType = res.headers.get(\"content-type\");\n if (jsonContentType.test(contentType))\n return res.json().then(function(json) {\n return new Response(new Blob([\n 'System.register([],function(e){return{execute:function(){e(\"default\",' + JSON.stringify(json) + \")}}})\"\n ], {\n type: \"application/javascript\"\n }));\n });\n if (cssContentType.test(contentType))\n return res.text().then(function(source) {\n source = source.replace(/url\\(\\s*(?:([\"'])((?:\\\\.|[^\\n\\\\\"'])+)\\1|((?:\\\\.|[^\\s,\"'()\\\\])+))\\s*\\)/g, function(match, quotes, relUrl1, relUrl2) {\n return [\"url(\", quotes, resolveUrl(relUrl1 || relUrl2, url), quotes, \")\"].join(\"\");\n });\n return new Response(new Blob([\n \"System.register([],function(e){return{execute:function(){var s=new CSSStyleSheet();s.replaceSync(\" + JSON.stringify(source) + ');e(\"default\",s)}}})'\n ], {\n type: \"application/javascript\"\n }));\n });\n if (wasmContentType.test(contentType))\n return (WebAssembly.compileStreaming ? WebAssembly.compileStreaming(res) : res.arrayBuffer().then(WebAssembly.compile)).then(function(module) {\n if (!global2.System.wasmModules)\n global2.System.wasmModules = /* @__PURE__ */ Object.create(null);\n global2.System.wasmModules[url] = module;\n var deps = [];\n var setterSources = [];\n if (WebAssembly.Module.imports)\n WebAssembly.Module.imports(module).forEach(function(impt) {\n var key = JSON.stringify(impt.module);\n if (deps.indexOf(key) === -1) {\n deps.push(key);\n setterSources.push(\"function(m){i[\" + key + \"]=m}\");\n }\n });\n return new Response(new Blob([\n \"System.register([\" + deps.join(\",\") + \"],function(e){var i={};return{setters:[\" + setterSources.join(\",\") + \"],execute:function(){return WebAssembly.instantiate(System.wasmModules[\" + JSON.stringify(url) + \"],i).then(function(m){e(m.exports)})}}})\"\n ], {\n type: \"application/javascript\"\n }));\n });\n return res;\n });\n };\n })(typeof self !== \"undefined\" ? self : global);\n var toStringTag = typeof Symbol !== \"undefined\" && Symbol.toStringTag;\n systemJSPrototype.get = function(id) {\n var load = this[REGISTRY][id];\n if (load && load.e === null && !load.E) {\n if (load.er)\n return null;\n return load.n;\n }\n };\n systemJSPrototype.set = function(id, module) {\n {\n try {\n new URL(id);\n } catch (err) {\n console.warn(Error(errMsg(\"W3\", '\"' + id + '\" is not a valid URL to set in the module registry')));\n }\n }\n var ns;\n if (toStringTag && module[toStringTag] === \"Module\") {\n ns = module;\n } else {\n ns = Object.assign(/* @__PURE__ */ Object.create(null), module);\n if (toStringTag)\n Object.defineProperty(ns, toStringTag, { value: \"Module\" });\n }\n var done = Promise.resolve(ns);\n var load = this[REGISTRY][id] || (this[REGISTRY][id] = {\n id,\n i: [],\n h: false,\n d: [],\n e: null,\n er: void 0,\n E: void 0\n });\n if (load.e || load.E)\n return false;\n Object.assign(load, {\n n: ns,\n I: void 0,\n L: void 0,\n C: done\n });\n return ns;\n };\n systemJSPrototype.has = function(id) {\n var load = this[REGISTRY][id];\n return !!load;\n };\n systemJSPrototype.delete = function(id) {\n var registry = this[REGISTRY];\n var load = registry[id];\n if (!load || load.p && load.p.e !== null || load.E)\n return false;\n var importerSetters = load.i;\n if (load.d)\n load.d.forEach(function(depLoad) {\n var importerIndex = depLoad.i.indexOf(load);\n if (importerIndex !== -1)\n depLoad.i.splice(importerIndex, 1);\n });\n delete registry[id];\n return function() {\n var load2 = registry[id];\n if (!load2 || !importerSetters || load2.e !== null || load2.E)\n return false;\n importerSetters.forEach(function(setter) {\n load2.i.push(setter);\n setter(load2.n);\n });\n importerSetters = null;\n };\n };\n var iterator = typeof Symbol !== \"undefined\" && Symbol.iterator;\n systemJSPrototype.entries = function() {\n var loader8 = this, keys = Object.keys(loader8[REGISTRY]);\n var index = 0, ns, key;\n var result = {\n next: function() {\n while ((key = keys[index++]) !== void 0 && (ns = loader8.get(key)) === void 0) ;\n return {\n done: key === void 0,\n value: key !== void 0 && [key, ns]\n };\n }\n };\n result[iterator] = function() {\n return this;\n };\n return result;\n };\n})();\n\n// ../../../node_modules/systemjs/dist/extras/named-register.js\n(function() {\n (function(global2) {\n var System2 = global2.System;\n setRegisterRegistry(System2);\n var systemJSPrototype = System2.constructor.prototype;\n var constructor = System2.constructor;\n var SystemJS = function() {\n constructor.call(this);\n setRegisterRegistry(this);\n };\n SystemJS.prototype = systemJSPrototype;\n System2.constructor = SystemJS;\n var firstNamedDefine, firstName;\n function setRegisterRegistry(systemInstance) {\n systemInstance.registerRegistry = /* @__PURE__ */ Object.create(null);\n systemInstance.namedRegisterAliases = /* @__PURE__ */ Object.create(null);\n }\n var register = systemJSPrototype.register;\n systemJSPrototype.register = function(name, deps, declare, metas) {\n if (typeof name !== \"string\")\n return register.apply(this, arguments);\n var define = [deps, declare, metas];\n this.registerRegistry[name] = define;\n if (!firstNamedDefine) {\n firstNamedDefine = define;\n firstName = name;\n }\n Promise.resolve().then(function() {\n firstNamedDefine = null;\n firstName = null;\n });\n return register.apply(this, [deps, declare, metas]);\n };\n var resolve = systemJSPrototype.resolve;\n systemJSPrototype.resolve = function(id, parentURL) {\n try {\n return resolve.call(this, id, parentURL);\n } catch (err) {\n if (id in this.registerRegistry) {\n return this.namedRegisterAliases[id] || id;\n }\n throw err;\n }\n };\n var instantiate = systemJSPrototype.instantiate;\n systemJSPrototype.instantiate = function(url, firstParentUrl, meta) {\n var result = this.registerRegistry[url];\n if (result) {\n this.registerRegistry[url] = null;\n return result;\n } else {\n return instantiate.call(this, url, firstParentUrl, meta);\n }\n };\n var getRegister = systemJSPrototype.getRegister;\n systemJSPrototype.getRegister = function(url) {\n var register2 = getRegister.call(this, url);\n if (firstName && url) {\n this.namedRegisterAliases[firstName] = url;\n }\n var result = firstNamedDefine || register2;\n firstNamedDefine = null;\n firstName = null;\n return result;\n };\n })(typeof self !== \"undefined\" ? self : global);\n})();\n\n// src/utils/empty.ts\nvar emptyApp = {\n setup() {\n }\n};\n\n// ../../tooling/piral-cli/src/common/version.ts\nvar semver = /^[v^~<>=]*?(\\d+)(?:\\.([x*]|\\d+)(?:\\.([x*]|\\d+)(?:\\.([x*]|\\d+))?(?:-([\\da-z\\-]+(?:\\.[\\da-z\\-]+)*))?(?:\\+[\\da-z\\-]+(?:\\.[\\da-z\\-]+)*)?)?)?$/i;\nvar acceptsAll = [\"*\", \"x\", \">=0\"];\nvar operatorResMap = {\n \">\": [1],\n \">=\": [0, 1],\n \"=\": [0],\n \"<=\": [-1, 0],\n \"<\": [-1]\n};\nfunction indexOrEnd(str, q) {\n return str.indexOf(q) === -1 ? str.length : str.indexOf(q);\n}\nfunction splitVersion(v) {\n const c = v.replace(/^v/, \"\").replace(/\\+.*$/, \"\");\n const patchIndex = indexOrEnd(c, \"-\");\n const arr = c.substring(0, patchIndex).split(\".\");\n arr.push(c.substring(patchIndex + 1));\n return arr;\n}\nfunction parseSegment(v) {\n const n = parseInt(v, 10);\n return isNaN(n) ? v : n;\n}\nfunction validateAndParse(v) {\n const match = v.match(semver);\n match.shift();\n return match;\n}\nfunction compareStrings(a, b) {\n const ap = parseSegment(a);\n const bp = parseSegment(b);\n if (ap > bp) {\n return 1;\n } else if (ap < bp) {\n return -1;\n } else {\n return 0;\n }\n}\nfunction compareSegments(a, b) {\n for (let i = 0; i < 2; i++) {\n const r = compareStrings(a[i] || \"0\", b[i] || \"0\");\n if (r !== 0) {\n return r;\n }\n }\n return 0;\n}\nfunction compareVersions(v1, v2) {\n const s1 = splitVersion(v1);\n const s2 = splitVersion(v2);\n const len = Math.max(s1.length - 1, s2.length - 1);\n for (let i = 0; i < len; i++) {\n const m1 = s1[i] || \"0\";\n const m2 = s2[i] || \"0\";\n if (m2 === \"x\") {\n return 0;\n }\n const n1 = parseInt(m1, 10);\n const n2 = parseInt(m2, 10);\n if (n1 > n2) {\n return 1;\n } else if (n2 > n1) {\n return -1;\n }\n }\n const sp1 = s1[s1.length - 1];\n const sp2 = s2[s2.length - 1];\n if (sp1 && sp2) {\n const p1 = sp1.split(\".\").map(parseSegment);\n const p2 = sp2.split(\".\").map(parseSegment);\n const len2 = Math.max(p1.length, p2.length);\n for (let i = 0; i < len2; i++) {\n if (p1[i] === void 0 || typeof p2[i] === \"string\" && typeof p1[i] === \"number\") {\n return -1;\n } else if (p2[i] === void 0 || typeof p1[i] === \"string\" && typeof p2[i] === \"number\") {\n return 1;\n } else if (p1[i] > p2[i]) {\n return 1;\n } else if (p2[i] > p1[i]) {\n return -1;\n }\n }\n } else if (sp1 || sp2) {\n return sp1 ? -1 : 1;\n }\n return 0;\n}\nfunction compare(v1, v2, operator) {\n const res = compareVersions(v1, v2);\n return operatorResMap[operator].indexOf(res) > -1;\n}\nfunction validate(version) {\n return acceptsAll.includes(version) || semver.test(version);\n}\nfunction satisfies(v, r) {\n if (!acceptsAll.includes(r)) {\n const match = r.match(/^([<>=~^]+)/);\n const op = match ? match[1] : \"=\";\n if (op !== \"^\" && op !== \"~\") {\n return compare(v, r, op);\n }\n const [v1, v2, v3] = validateAndParse(v);\n const [m1, m2, m3] = validateAndParse(r);\n if (compareStrings(v1, m1) !== 0) {\n return false;\n } else if (op === \"^\") {\n return compareSegments([v2, v3], [m2, m3]) >= 0;\n } else if (compareStrings(v2, m2) !== 0) {\n return false;\n }\n return compareStrings(v3, m3) >= 0;\n }\n return true;\n}\n\n// src/utils/system.ts\nvar systemResolve = System.constructor.prototype.resolve;\nvar systemRegister = System.constructor.prototype.register;\nfunction getLoadedVersions(prefix) {\n return [...System.entries()].filter(([name]) => name.startsWith(prefix)).map(([name]) => name.substring(prefix.length));\n}\nfunction findMatchingPackage(id) {\n const sep = id.indexOf(\"@\", 1);\n if (sep > 1) {\n const available = Object.keys(System.registerRegistry);\n const name = id.substring(0, sep + 1);\n const versionSpec = id.substring(sep + 1);\n if (validate(versionSpec)) {\n const loadedVersions = getLoadedVersions(name);\n const allVersions = available.filter((m) => m.startsWith(name)).map((m) => m.substring(name.length));\n const availableVersions = [...loadedVersions, ...allVersions.filter((m) => !loadedVersions.includes(m))];\n for (const availableVersion of availableVersions) {\n if (validate(availableVersion) && satisfies(availableVersion, versionSpec)) {\n return name + availableVersion;\n }\n }\n }\n }\n return void 0;\n}\nfunction isPrimitiveExport(content) {\n const type = typeof content;\n return type === \"number\" || type === \"boolean\" || type === \"symbol\" || type === \"string\" || type === \"bigint\" || Array.isArray(content);\n}\nSystem.constructor.prototype.resolve = function(id, parentUrl) {\n try {\n return systemResolve.call(this, id, parentUrl);\n } catch (ex) {\n const result = findMatchingPackage(id);\n if (!result) {\n throw ex;\n }\n return result;\n }\n};\nSystem.constructor.prototype.register = function(...args) {\n const getContent = args.pop();\n args.push((_export, ctx) => {\n const exp = (...p) => {\n if (p.length === 1) {\n const content = p[0];\n if (content instanceof Promise) {\n return content.then(exp);\n } else if (typeof content === \"function\") {\n _export(\"__esModule\", true);\n Object.keys(content).forEach((prop) => {\n _export(prop, content[prop]);\n });\n _export(\"default\", content);\n } else if (isPrimitiveExport(content)) {\n _export(\"__esModule\", true);\n _export(\"default\", content);\n } else if (content) {\n _export(content);\n if (typeof content === \"object\" && !(\"default\" in content)) {\n _export(\"default\", content);\n }\n }\n } else {\n return _export(...p);\n }\n };\n return getContent(exp, ctx);\n });\n return systemRegister.apply(this, args);\n};\nfunction tryResolve(name, parent) {\n try {\n return System.resolve(name, parent);\n } catch {\n return void 0;\n }\n}\nfunction handleFailure(error, link) {\n console.error(\"Failed to load SystemJS module\", link, error);\n return emptyApp;\n}\nfunction loadSystemPilet(link) {\n return System.import(link).catch((error) => handleFailure(error, link));\n}\nfunction registerDependencies(modules) {\n const moduleNames = Object.keys(modules);\n moduleNames.forEach((name) => registerModule(name, () => modules[name]));\n return Promise.all(moduleNames.map((name) => System.import(name)));\n}\nfunction registerModule(name, resolve) {\n System.register(name, [], (_exports) => ({\n execute() {\n const content = resolve();\n if (content instanceof Promise) {\n return content.then(_exports);\n } else {\n _exports(content);\n }\n }\n }));\n}\nfunction registerDependencyUrls(dependencies) {\n for (const name of Object.keys(dependencies)) {\n if (!System.has(name)) {\n const dependency = dependencies[name];\n registerModule(name, () => System.import(dependency));\n }\n }\n}\nfunction unregisterModules(baseUrl, dependencies) {\n [...System.entries()].map(([name]) => name).filter((name) => name.startsWith(baseUrl) && !dependencies.includes(name)).forEach((name) => System.delete(name));\n}\nfunction requireModule(name, parent) {\n const moduleId = tryResolve(name, parent);\n const dependency = moduleId && System.get(moduleId);\n if (!dependency) {\n const error = new Error(`Cannot find module '${name}'`);\n error.code = \"MODULE_NOT_FOUND\";\n throw error;\n }\n return dependency;\n}\n\n// src/utils/helpers.ts\nfunction isfunc(f) {\n return typeof f === \"function\";\n}\nfunction callfunc(f, ...args) {\n isfunc(f) && f(...args);\n}\nfunction promisify(value) {\n return Promise.resolve(value);\n}\nfunction getBasePath(link) {\n if (link) {\n const idx = link.lastIndexOf(\"/\");\n return link.substring(0, idx + 1);\n }\n return link;\n}\n\n// src/utils/dependency.ts\nfunction createEvaluatedPilet(meta, mod) {\n const basePath = getBasePath(meta.link);\n const app = checkPiletApp(meta.name, mod);\n return { ...meta, ...app, basePath };\n}\nfunction checkCreateApi(createApi) {\n if (!isfunc(createApi)) {\n console.warn(\"Invalid `createApi` function. Skipping pilet installation.\");\n return false;\n }\n return true;\n}\nfunction checkPiletApp(name, app) {\n if (!app) {\n console.error(\"Invalid module found.\", name);\n } else if (typeof app.setup !== \"function\") {\n console.warn(\"Setup function is missing.\", name);\n } else {\n return app;\n }\n return emptyApp;\n}\nfunction checkPiletAppAsync(name, app) {\n return promisify(app).then((resolvedApp) => checkPiletApp(name, resolvedApp));\n}\nfunction includeScript(depName, link, integrity, crossOrigin) {\n window[depName] = (moduleId) => requireModule(moduleId, link);\n return includeScriptDependency(link, integrity, crossOrigin).then((s) => s.app);\n}\nfunction includeScriptDependency(link, integrity, crossOrigin) {\n return new Promise((resolve, reject) => {\n const s = document.createElement(\"script\");\n s.async = true;\n s.src = link;\n if (integrity) {\n s.crossOrigin = crossOrigin || \"anonymous\";\n s.integrity = integrity;\n } else if (crossOrigin) {\n s.crossOrigin = crossOrigin;\n }\n s.onload = () => resolve(s);\n s.onerror = (e) => reject(e);\n document.body.appendChild(s);\n });\n}\n\n// src/utils/load.ts\nvar depContext = {};\nfunction loadSharedDependencies(dependencies) {\n if (dependencies) {\n const names = Object.keys(dependencies);\n return Promise.all(\n names.map((name) => {\n return depContext[name] || (depContext[name] = includeScriptDependency(dependencies[name]));\n })\n );\n }\n return promisify();\n}\nfunction handleFailure2(error, name) {\n console.error(\"Failed to load pilet\", name, error);\n return emptyApp;\n}\nfunction loadFrom(meta, loadPilet) {\n return loadSharedDependencies(meta.dependencies).then(loadPilet).catch((error) => handleFailure2(error, meta.name)).then((app) => createEvaluatedPilet(meta, app));\n}\n\n// src/lifecycle/cleanup.ts\nvar evtName = \"unload-pilet\";\nfunction runCleanup(app, api, hooks) {\n if (typeof document !== \"undefined\") {\n const css = document.querySelector(`link[data-origin=${JSON.stringify(app.name)}]`);\n css?.remove();\n }\n const url = app.basePath;\n callfunc(app.teardown, api);\n callfunc(hooks.cleanupPilet, app);\n if (\"requireRef\" in app) {\n const depName = app.requireRef;\n delete globalThis[depName];\n }\n if (url) {\n unregisterModules(url, Object.values(app.dependencies));\n }\n}\nfunction prepareCleanup(app, api, hooks) {\n const handler = (e) => {\n if (e.name === app.name) {\n api.off(evtName, handler);\n runCleanup(app, api, hooks);\n }\n };\n api.on(evtName, handler);\n}\n\n// src/lifecycle/setup.ts\nfunction logError(name, e) {\n console.error(`Error while setting up ${name}.`, e);\n}\nfunction withCatch(result, name) {\n if (result instanceof Promise) {\n return result.catch((e) => logError(name, e));\n }\n return promisify(result);\n}\nfunction setupSinglePilet(app, apiFactory, hooks) {\n const name = app?.name;\n try {\n const api = apiFactory(app);\n callfunc(hooks.setupPilet, app);\n const result = app.setup(api);\n prepareCleanup(app, api, hooks);\n return withCatch(result, name);\n } catch (e) {\n logError(name, e);\n }\n return promisify();\n}\nfunction setupPiletBundle(app, apiFactory, hooks) {\n const name = app?.name || \"pilet bundle\";\n try {\n callfunc(hooks.setupPilet, app);\n const result = app.setup(apiFactory);\n return withCatch(result, name);\n } catch (e) {\n logError(name, e);\n }\n return promisify();\n}\n\n// src/inspect.ts\nfunction inspectPilet(meta) {\n const inBrowser = typeof document !== \"undefined\";\n if (\"link\" in meta && meta.spec === \"v3\") {\n return [\"v3\", meta, setupSinglePilet];\n } else if (inBrowser && \"link\" in meta && meta.spec === \"mf\") {\n return [\"mf\", meta, setupSinglePilet];\n } else if (inBrowser && \"link\" in meta && meta.spec === \"v2\") {\n return [\"v2\", meta, setupSinglePilet];\n } else if (inBrowser && \"requireRef\" in meta && meta.spec !== \"v2\") {\n return [\"v1\", meta, setupSinglePilet];\n } else if (inBrowser && \"bundle\" in meta && meta.bundle) {\n return [\"bundle\", meta, setupPiletBundle];\n } else if (\"hash\" in meta) {\n return [\"v0\", meta, setupSinglePilet];\n } else {\n return [\"unknown\", meta, setupSinglePilet];\n }\n}\n\n// src/aggregate.ts\nfunction runPilets(createApi, pilets, hooks = {}) {\n const promises = [];\n if (Array.isArray(pilets)) {\n for (const pilet of pilets) {\n const [, , setupPilet] = inspectPilet(pilet);\n const wait = setupPilet(pilet, createApi, hooks);\n promises.push(wait);\n }\n }\n return Promise.all(promises).then(() => pilets);\n}\nfunction runPilet(createApi, pilet, hooks = {}) {\n const [, , setupPilet] = inspectPilet(pilet);\n const wait = setupPilet(pilet, createApi, hooks);\n return wait.then(() => pilet);\n}\n\n// src/api.ts\nfunction initializeApi(target, events) {\n return {\n on: events.on,\n once: events.once,\n off: events.off,\n emit: events.emit,\n meta: Object.assign({}, target)\n };\n}\nfunction mergeApis(api, extenders, target) {\n const frags = extenders.map((extender) => extender(api, target));\n Object.assign(api, ...frags);\n return api;\n}\n\n// src/load.ts\nfunction checkFetchPilets(fetchPilets) {\n if (!isfunc(fetchPilets)) {\n console.error(\"Could not get the pilets. Provide a valid `fetchPilets` function.\");\n return false;\n }\n return true;\n}\nfunction loadMetadata(fetchPilets) {\n if (checkFetchPilets(fetchPilets)) {\n return fetchPilets().then((pilets) => {\n if (!Array.isArray(pilets)) {\n throw new Error(\"The fetched pilets metadata is not an array.\");\n }\n return pilets.map((meta) => ({ ...meta }));\n });\n }\n return promisify([]);\n}\nfunction loadPilets(fetchPilets, loadPilet) {\n return loadMetadata(fetchPilets).then((pilets) => Promise.all(pilets.map(loadPilet)));\n}\n\n// src/loaders/bundle/dependency.ts\nfunction includeBundle(meta, crossOrigin) {\n return includeScript(meta.bundle, meta.link, meta.integrity, crossOrigin);\n}\n\n// src/loaders/bundle/index.ts\nfunction loader(entry, config) {\n const { dependencies = {}, spec = \"v1\", name = `[bundle] ${entry.link}`, ...rest } = entry;\n const meta = {\n name,\n version: \"\",\n config: {},\n spec,\n dependencies,\n ...rest\n };\n return loadFrom(meta, () => includeBundle(entry, config.crossOrigin));\n}\n\n// src/loaders/empty/index.ts\nfunction loader2(entry, _config) {\n const { name, spec = \"vx\", ...rest } = entry;\n const dependencies = \"dependencies\" in entry ? entry.dependencies : {};\n const meta = {\n name,\n version: \"\",\n spec,\n dependencies,\n config: {},\n link: \"\",\n basePath: \"\",\n ...rest\n };\n console.warn(\"Empty pilet found!\", name);\n return promisify({ ...meta, ...emptyApp });\n}\n\n// src/loaders/v0/fetch.ts\nfunction fetchDependency(url) {\n return fetch(url, {\n method: \"GET\",\n cache: \"force-cache\"\n }).then((m) => m.text());\n}\n\n// src/loaders/v0/dependency.ts\nfunction evalDependency(name, content, link = \"\") {\n const mod = {\n exports: {}\n };\n try {\n const sourceUrl = link && `\n//# sourceURL=${link}`;\n const importer = new Function(\"module\", \"exports\", \"require\", content + sourceUrl);\n const parent = link || name;\n const require2 = (moduleId) => requireModule(moduleId, parent);\n importer(mod, mod.exports, require2);\n } catch (e) {\n console.error(`Error while evaluating ${name}.`, e);\n }\n return mod.exports;\n}\n\n// src/loaders/v0/index.ts\nfunction loader3(entry, _config) {\n const { name, config = {}, dependencies = {}, spec = \"v0\" } = entry;\n const meta = {\n name,\n config,\n dependencies,\n spec,\n link: \"\",\n ...entry\n };\n if (\"link\" in entry && entry.link) {\n return loadFrom(\n meta,\n () => fetchDependency(entry.link).then((content) => evalDependency(name, content, entry.link))\n );\n } else {\n const content = \"content\" in entry && entry.content || \"\";\n return loadFrom(meta, () => evalDependency(name, content, void 0));\n }\n}\n\n// src/loaders/v1/dependency.ts\nfunction includeDependency(entry, crossOrigin) {\n return includeScript(entry.requireRef, entry.link, entry.integrity, crossOrigin);\n}\n\n// src/loaders/v1/index.ts\nfunction loader4(entry, config) {\n const { dependencies = {}, spec = \"v1\", ...rest } = entry;\n const meta = {\n dependencies,\n config: {},\n spec,\n ...rest\n };\n return loadFrom(meta, () => includeDependency(entry, config.crossOrigin));\n}\n\n// src/loaders/v2/index.ts\nfunction loader5(entry, _config) {\n const { dependencies = {}, config = {}, link, ...rest } = entry;\n const meta = {\n dependencies,\n config,\n link,\n ...rest\n };\n registerDependencyUrls(dependencies);\n return loadSystemPilet(link).then((app) => createEvaluatedPilet(meta, app));\n}\n\n// src/loaders/v3/index.ts\nfunction attachStylesToDocument(pilet, url) {\n if (typeof document !== \"undefined\") {\n const link = document.createElement(\"link\");\n link.setAttribute(\"data-origin\", pilet.name);\n link.type = \"text/css\";\n link.rel = \"stylesheet\";\n link.href = url;\n document.head.appendChild(link);\n }\n}\nfunction loader6(entry, options) {\n const { dependencies = {}, config = {}, link, ...rest } = entry;\n const attachStyles = typeof options.attachStyles === \"function\" ? options.attachStyles : attachStylesToDocument;\n const meta = {\n dependencies,\n config,\n link,\n ...rest\n };\n registerDependencyUrls(dependencies);\n return loadSystemPilet(link).then((app) => {\n const pilet = createEvaluatedPilet(meta, app);\n if (Array.isArray(app.styles)) {\n for (const style of app.styles) {\n attachStyles(pilet, `${pilet.basePath}/${style}`);\n }\n }\n return pilet;\n });\n}\n\n// src/loaders/mf/index.ts\nvar appShell = \"piral\";\nfunction populateKnownDependencies(scope) {\n for (const [entry] of System.entries()) {\n const index = entry.lastIndexOf(\"@\");\n if (index > 0 && !entry.match(/^https?:\\/\\//)) {\n const entryName = entry.substring(0, index);\n const entryVersion = entry.substring(index + 1);\n if (!(entryName in scope)) {\n scope[entryName] = {};\n }\n scope[entryName][entryVersion] = {\n from: appShell,\n eager: false,\n get: () => System.import(entry).then((result) => () => result)\n };\n }\n }\n}\nfunction extractSharedDependencies(scope) {\n for (const entryName of Object.keys(scope)) {\n const entries = scope[entryName];\n for (const entryVersion of Object.keys(entries)) {\n const entry = entries[entryVersion];\n if (entry.from !== appShell) {\n registerModule(`${entryName}@${entryVersion}`, () => entry.get().then((factory) => factory()));\n }\n }\n }\n}\nfunction loadMfFactory(piletName, exposedName) {\n const varName = piletName.replace(/^@/, \"\").replace(\"/\", \"-\").replace(/\\-/g, \"_\");\n const container = window[varName];\n const scope = {};\n container.init(scope);\n populateKnownDependencies(scope);\n extractSharedDependencies(scope);\n return container.get(exposedName);\n}\nfunction loader7(entry, _config) {\n const { config = {}, name, link, ...rest } = entry;\n const dependencies = {};\n const exposedName = rest.custom?.exposed || \"./pilet\";\n const meta = {\n name,\n dependencies,\n config,\n link,\n ...rest\n };\n return includeScriptDependency(link).then(() => loadMfFactory(name, exposedName)).then((factory) => createEvaluatedPilet(meta, factory()));\n}\n\n// src/loader.ts\nfunction extendLoader(fallback, specLoaders) {\n if (typeof specLoaders === \"object\" && specLoaders) {\n return (meta) => {\n if (typeof meta.spec === \"string\") {\n const loaderOverride = specLoaders[meta.spec];\n if (isfunc(loaderOverride)) {\n return loaderOverride(meta);\n }\n }\n return fallback(meta);\n };\n }\n return fallback;\n}\nfunction getDefaultLoader(config = {}) {\n return (result) => {\n const r = inspectPilet(result);\n switch (r[0]) {\n case \"v3\":\n return loader6(r[1], config);\n case \"v2\":\n return loader5(r[1], config);\n case \"v1\":\n return loader4(r[1], config);\n case \"v0\":\n return loader3(r[1], config);\n case \"mf\":\n return loader7(r[1], config);\n case \"bundle\":\n return loader(r[1], config);\n default:\n return loader2(r[1], config);\n }\n };\n}\n\n// src/strategies.ts\nfunction runAll(createApi, existingPilets, additionalPilets, hooks) {\n if (!Array.isArray(existingPilets)) {\n return Promise.reject(`The existing pilets must be passed as an array.`);\n }\n if (!checkCreateApi(createApi)) {\n return Promise.resolve([]);\n }\n try {\n for (const existing of existingPilets) {\n const { name } = existing;\n const [newPilet] = additionalPilets.filter((pilet) => pilet.name === name);\n if (newPilet) {\n additionalPilets.splice(additionalPilets.indexOf(newPilet), 1);\n }\n }\n const pilets = [...existingPilets, ...additionalPilets];\n return runPilets(createApi, pilets, hooks);\n } catch (err) {\n return Promise.reject(err);\n }\n}\nfunction createProgressiveStrategy(async) {\n return (options, cb) => {\n const {\n fetchPilets,\n dependencies = {},\n createApi,\n config,\n pilets = [],\n loadPilet = getDefaultLoader(config),\n loaders,\n hooks\n } = options;\n const loadingAll = loadMetadata(fetchPilets);\n const loadSingle = extendLoader(loadPilet, loaders);\n return registerDependencies(dependencies).then(() => {\n if (!checkCreateApi(createApi)) {\n cb(void 0, []);\n return Promise.resolve();\n }\n return runPilets(createApi, pilets, hooks).then((integratedPilets) => {\n if (async && integratedPilets.length > 0) {\n cb(void 0, [...integratedPilets]);\n }\n const followUp = loadingAll.then((metadata) => {\n const promises = metadata.map(\n (m) => loadSingle(m).then((app) => {\n const available = pilets.filter((m2) => m2.name === app.name).length === 0;\n if (available) {\n return runPilet(createApi, app, hooks).then((additionalPilet) => {\n integratedPilets.push(additionalPilet);\n if (async) {\n cb(void 0, [...integratedPilets]);\n }\n });\n }\n })\n );\n return Promise.all(promises).then(() => {\n if (!async) {\n cb(void 0, integratedPilets);\n }\n });\n });\n if (async) {\n followUp.catch(() => {\n });\n return loadingAll.then();\n } else {\n return followUp.then();\n }\n });\n });\n };\n}\nfunction blazingStrategy(options, cb) {\n const strategy = createProgressiveStrategy(true);\n return strategy(options, cb);\n}\nfunction asyncStrategy(options, cb) {\n standardStrategy(options, cb);\n return promisify();\n}\nfunction standardStrategy(options, cb) {\n const {\n fetchPilets,\n dependencies = {},\n createApi,\n config,\n pilets = [],\n loadPilet = getDefaultLoader(config),\n loaders,\n hooks\n } = options;\n const loadSingle = extendLoader(loadPilet, loaders);\n return registerDependencies(dependencies).then(() => loadPilets(fetchPilets, loadSingle)).then((additionalPilets) => runAll(createApi, pilets, additionalPilets, hooks)).then((integratedPilets) => cb(void 0, integratedPilets)).catch((error) => cb(error, []));\n}\nfunction syncStrategy(options, cb) {\n const { createApi, hooks, dependencies = {}, pilets = [] } = options;\n return registerDependencies(dependencies).then(\n () => runAll(createApi, pilets, [], hooks).then(\n (integratedPilets) => cb(void 0, integratedPilets),\n (err) => cb(err, [])\n )\n );\n}\nfunction createDeferredStrategy(trigger, strategy = standardStrategy) {\n return (options, cb) => {\n cb(void 0, []);\n trigger.then(() => strategy(options, cb));\n return promisify();\n };\n}\n\n// src/create.ts\nfunction startLoadingPilets(options) {\n const state = {\n loaded: false,\n pilets: [],\n error: void 0\n };\n const notifiers = [];\n const call = (notifier) => notifier(state.error, state.pilets, state.loaded);\n const notify = () => notifiers.forEach(call);\n const setPilets = (error, pilets) => {\n state.error = error;\n state.pilets = pilets;\n notify();\n };\n const setLoaded = () => {\n state.loaded = true;\n notify();\n };\n const { strategy = standardStrategy } = options;\n strategy(options, setPilets).then(setLoaded, setLoaded);\n return {\n connect(notifier) {\n if (isfunc(notifier)) {\n notifiers.push(notifier);\n call(notifier);\n }\n },\n disconnect(notifier) {\n const index = notifiers.indexOf(notifier);\n index !== -1 && notifiers.splice(index, 1);\n }\n };\n}\n\n// src/events.ts\nfunction nameOf(type) {\n return `piral-${type}`;\n}\nfunction createListener(state = {}) {\n const eventListeners = [];\n const events = {\n on(type, callback) {\n const listener = ({ detail }) => detail && detail.state === state && callback(detail.arg);\n document.body.addEventListener(nameOf(type), listener);\n eventListeners.push([callback, listener]);\n return events;\n },\n once(type, callback) {\n const cb = (ev) => {\n events.off(type, cb);\n callback(ev);\n };\n return events.on(type, cb);\n },\n off(type, callback) {\n const [listener] = eventListeners.filter((m) => m[0] === callback);\n if (listener) {\n document.body.removeEventListener(nameOf(type), listener[1]);\n eventListeners.splice(eventListeners.indexOf(listener), 1);\n }\n return events;\n },\n emit(type, arg) {\n document.body.dispatchEvent(\n new CustomEvent(nameOf(type), {\n bubbles: false,\n cancelable: false,\n detail: {\n arg,\n state\n }\n })\n );\n return events;\n }\n };\n return events;\n}\nexport {\n asyncStrategy,\n blazingStrategy,\n callfunc,\n checkCreateApi,\n checkPiletApp,\n checkPiletAppAsync,\n createDeferredStrategy,\n createEvaluatedPilet,\n createListener,\n createProgressiveStrategy,\n emptyApp,\n extendLoader,\n getBasePath,\n getDefaultLoader,\n includeScript,\n includeScriptDependency,\n initializeApi,\n inspectPilet,\n isfunc,\n loadFrom,\n loadMetadata,\n loadPilets,\n loadSystemPilet,\n mergeApis,\n prepareCleanup,\n promisify,\n registerDependencies,\n registerDependencyUrls,\n registerModule,\n requireModule,\n runCleanup,\n runPilet,\n runPilets,\n setupPiletBundle,\n setupSinglePilet,\n standardStrategy,\n startLoadingPilets,\n syncStrategy,\n unregisterModules\n};\n/*! Bundled license information:\n\nsystemjs/dist/system.js:\n (*!\n * SystemJS 6.15.1\n *)\n*/\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Check if module exists (development only)\n\tif (__webpack_modules__[moduleId] === undefined) {\n\t\tvar e = new Error(\"Cannot find module '\" + moduleId + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { startLoadingPilets, initializeApi, createListener } from 'piral-base';\n\nconst events = createListener();\n\nstartLoadingPilets({\n createApi(target) {\n return initializeApi(target, events);\n },\n fetchPilets() {\n return Promise.resolve([]);\n },\n});\n"],"names":[],"ignoreList":[],"sourceRoot":""}