@next-core/brick-kit 2.166.1 → 2.167.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -4,7 +4,7 @@ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProper
4
4
  import _defineProperty$1 from '@babel/runtime/helpers/defineProperty';
5
5
  import _asyncToGenerator$3 from '@babel/runtime/helpers/asyncToGenerator';
6
6
  import _, { set, get, difference, identity, uniqueId, cloneDeep, clamp, isNil, isEmpty, merge, sortBy, orderBy, isObject as isObject$1, uniq, pick, omit, findLastIndex, noop, isString as isString$1 } from 'lodash';
7
- import { JsonStorage, toPath, computeRealRoutePath, hasOwnProperty, isObject, isEvaluable, transformAndInject, transform, trackContext, trackState, trackFormState, scanPermissionActionsInStoryboard, precookFunction, cook, collectContextUsage, deferResolveContextConcurrently, resolveContextConcurrently, syncResolveContextConcurrently, trackUsedFormState, trackUsedState, trackUsedContext, shouldAllowRecursiveEvaluations, preevaluate, inject, scanPermissionActionsInAny, deepFreeze, matchPath, asyncProcessBrick, createProviderClass, removeDeadConditionsInTpl, getTemplateDepsOfStoryboard, getDllAndDepsOfStoryboard, asyncProcessStoryboard, getDllAndDepsByResource, scanRouteAliasInStoryboard, prefetchScript, scanBricksInBrickConf, scanProcessorsInAny, loadScript, scanAppGetMenuInAny, scanInstalledAppsInStoryboard, removeDeadConditions, restoreDynamicTemplates, scanStoryboard, mapCustomApisToNameAndNamespace } from '@next-core/brick-utils';
7
+ import { JsonStorage, toPath, computeRealRoutePath, hasOwnProperty, isObject, isEvaluable, transformAndInject, transform, trackContext, trackState, trackFormState, scanPermissionActionsInStoryboard, precookFunction, cook, collectContextUsage, deferResolveContextConcurrently, resolveContextConcurrently, syncResolveContextConcurrently, trackUsedFormState, trackUsedState, trackUsedContext, shouldAllowRecursiveEvaluations, preevaluate, inject, scanPermissionActionsInAny, deepFreeze, matchPath, asyncProcessBrick, createProviderClass, removeDeadConditionsInTpl, getTemplateDepsOfStoryboard, getDllAndDepsOfStoryboard, asyncProcessStoryboard, getDllAndDepsByResource, scanRouteAliasInStoryboard, prefetchScript, scanBricksInBrickConf, scanProcessorsInAny, loadScript as loadScript$1, scanAppGetMenuInAny, scanInstalledAppsInStoryboard, removeDeadConditions, restoreDynamicTemplates, scanStoryboard, mapCustomApisToNameAndNamespace } from '@next-core/brick-utils';
8
8
  import React, { useState, useEffect, useRef, useMemo, useCallback, forwardRef, useImperativeHandle, useContext, createContext, useReducer } from 'react';
9
9
  import { http, HttpResponseError, HttpAbortError, HttpFetchError } from '@next-core/brick-http';
10
10
  import { Modal, message, Empty, ConfigProvider } from 'antd';
@@ -6552,6 +6552,267 @@ var UserAdminApi_searchAllUsersInfo = /*#__PURE__*/function () {
6552
6552
  };
6553
6553
  }();
6554
6554
 
6555
+ var cache$1 = new Map();
6556
+ function loadScript(src, prefix) {
6557
+ if (Array.isArray(src)) {
6558
+ return Promise.all(src.map(item => loadScript(item, prefix)));
6559
+ }
6560
+ var fixedSrc = prefix ? "".concat(prefix).concat(src) : src;
6561
+ var cachedPromise = cache$1.get(fixedSrc);
6562
+ if (cachedPromise) {
6563
+ return cachedPromise;
6564
+ }
6565
+ var promise = new Promise((resolve, reject) => {
6566
+ var end = () => {
6567
+ window.dispatchEvent(new Event("request.end"));
6568
+ };
6569
+ var script = document.createElement("script");
6570
+ script.src = fixedSrc;
6571
+ script.type = "text/javascript";
6572
+ script.async = true;
6573
+ script.onload = () => {
6574
+ resolve(fixedSrc);
6575
+ end();
6576
+ };
6577
+ script.onerror = e => {
6578
+ reject(e);
6579
+ end();
6580
+ };
6581
+ var firstScript = document.currentScript || document.getElementsByTagName("script")[0];
6582
+ firstScript.parentNode.insertBefore(script, firstScript);
6583
+ window.dispatchEvent(new Event("request.start"));
6584
+ });
6585
+ cache$1.set(fixedSrc, promise);
6586
+ return promise;
6587
+ }
6588
+
6589
+ // https://github.com/module-federation/module-federation-examples/blob/eda9493f3991a423479fd834cfb1d7b241d9d1f0/advanced-api/dynamic-remotes/app1/src/App.js
6590
+ function loadSharedModule(_x, _x2) {
6591
+ return _loadSharedModule.apply(this, arguments);
6592
+ }
6593
+ function _loadSharedModule() {
6594
+ _loadSharedModule = _asyncToGenerator$3(function* (scope, module) {
6595
+ // Initializes the share scope. This fills it with known provided modules from this build and all remotes
6596
+ yield __webpack_init_sharing__("default");
6597
+ var container = window[scope]; // or get the container somewhere else
6598
+ // Initialize the container, it may provide shared modules
6599
+ yield container.init(__webpack_share_scopes__.default);
6600
+ var factory = yield container.get(module);
6601
+ return factory();
6602
+ });
6603
+ return _loadSharedModule.apply(this, arguments);
6604
+ }
6605
+
6606
+ var resolveBasicPkg;
6607
+ var basicPkgWillBeResolved = false;
6608
+ var waitBasicPkg = new Promise(resolve => {
6609
+ resolveBasicPkg = resolve;
6610
+ });
6611
+ function flushStableLoadBricks() {
6612
+ if (!basicPkgWillBeResolved) {
6613
+ resolveBasicPkg();
6614
+ }
6615
+ }
6616
+ function loadBricksImperatively(_x, _x2) {
6617
+ return _loadBricksImperatively.apply(this, arguments);
6618
+ }
6619
+ function _loadBricksImperatively() {
6620
+ _loadBricksImperatively = _asyncToGenerator$3(function* (bricks, brickPackages) {
6621
+ var promise = enqueueStableLoad("bricks", bricks, brickPackages);
6622
+ flushStableLoadBricks();
6623
+ return dispatchRequestStatus(promise);
6624
+ });
6625
+ return _loadBricksImperatively.apply(this, arguments);
6626
+ }
6627
+ function loadProcessorsImperatively(processors, brickPackages) {
6628
+ var promise = enqueueStableLoad("processors", processors, brickPackages);
6629
+ flushStableLoadBricks();
6630
+ return dispatchRequestStatus(promise);
6631
+ }
6632
+ var v2AdapterPromise;
6633
+ var V2_ADAPTER_LOAD_BRICKS = "v2-adapter.load-bricks";
6634
+
6635
+ // Get brick/processor items including their dependencies
6636
+ function getItemsByPkg(type, list, brickPackagesMap) {
6637
+ var itemsByPkg = new Map();
6638
+ var listToLoad = new Set();
6639
+ var add = item => {
6640
+ var _pkg$dependencies;
6641
+ if (listToLoad.has(item)) {
6642
+ return;
6643
+ }
6644
+ listToLoad.add(item);
6645
+ var pkg;
6646
+ var namespace;
6647
+ var itemName;
6648
+ if (type === "processors" || item.includes(".")) {
6649
+ [namespace, itemName] = item.split(".");
6650
+ var pkgId = "bricks/".concat(type === "processors" ? getProcessorPackageName(namespace) : namespace);
6651
+ pkg = brickPackagesMap.get(pkgId);
6652
+ } else {
6653
+ itemName = item;
6654
+ for (var p of brickPackagesMap.values()) {
6655
+ var _p$elements;
6656
+ if ((_p$elements = p.elements) !== null && _p$elements !== void 0 && _p$elements.some(e => e === itemName)) {
6657
+ pkg = p;
6658
+ break;
6659
+ }
6660
+ }
6661
+ }
6662
+ if (!pkg) {
6663
+ throw new Error("Package for ".concat(item, " not found."));
6664
+ }
6665
+ var groupItems = itemsByPkg.get(pkg);
6666
+ if (!groupItems) {
6667
+ groupItems = [];
6668
+ itemsByPkg.set(pkg, groupItems);
6669
+ }
6670
+ groupItems.push(itemName);
6671
+
6672
+ // Load their dependencies too
6673
+ var deps = (_pkg$dependencies = pkg.dependencies) === null || _pkg$dependencies === void 0 ? void 0 : _pkg$dependencies[item];
6674
+ if (deps) {
6675
+ for (var dep of deps) {
6676
+ add(dep);
6677
+ }
6678
+ }
6679
+ };
6680
+ for (var item of list) {
6681
+ add(item);
6682
+ }
6683
+ return itemsByPkg;
6684
+ }
6685
+ function loadBrickModule(_x3, _x4, _x5) {
6686
+ return _loadBrickModule.apply(this, arguments);
6687
+ }
6688
+ function _loadBrickModule() {
6689
+ _loadBrickModule = _asyncToGenerator$3(function* (type, pkgId, itemName) {
6690
+ var moduleName = "".concat(type === "processors" ? "./processors/" : "./").concat(itemName);
6691
+ try {
6692
+ yield loadSharedModule(pkgId, moduleName);
6693
+ } catch (error) {
6694
+ // eslint-disable-next-line no-console
6695
+ console.error(error);
6696
+ throw new Error("Load ".concat(type, " of \"").concat(pkgId.split("/").pop(), ".").concat(moduleName.split("/").pop(), "\" failed"));
6697
+ }
6698
+ });
6699
+ return _loadBrickModule.apply(this, arguments);
6700
+ }
6701
+ function loadRestBricks(type, pkgs, itemsMap) {
6702
+ return pkgs.map( /*#__PURE__*/function () {
6703
+ var _ref = _asyncToGenerator$3(function* (pkg) {
6704
+ var _window$PUBLIC_ROOT;
6705
+ yield loadScript(pkg.filePath, (_window$PUBLIC_ROOT = window.PUBLIC_ROOT) !== null && _window$PUBLIC_ROOT !== void 0 ? _window$PUBLIC_ROOT : "");
6706
+ yield waitBasicPkg;
6707
+ return Promise.all(
6708
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
6709
+ itemsMap.get(pkg).map(itemName => loadBrickModule(type, pkg.id, itemName)));
6710
+ });
6711
+ return function (_x6) {
6712
+ return _ref.apply(this, arguments);
6713
+ };
6714
+ }());
6715
+ }
6716
+ function enqueueStableLoad(_x7, _x8, _x9) {
6717
+ return _enqueueStableLoad.apply(this, arguments);
6718
+ }
6719
+ function _enqueueStableLoad() {
6720
+ _enqueueStableLoad = _asyncToGenerator$3(function* (type, list, brickPackages) {
6721
+ var brickPackagesMap = new Map();
6722
+ for (var pkg of brickPackages) {
6723
+ var _pkg$id;
6724
+ var pkgId = (_pkg$id = pkg.id) !== null && _pkg$id !== void 0 ? _pkg$id : getPkgIdByFilePath(pkg.filePath);
6725
+ brickPackagesMap.set(pkgId, pkg);
6726
+ }
6727
+ var itemsByPkg = getItemsByPkg(type, list, brickPackagesMap);
6728
+ var foundBasicPkg;
6729
+ var v2Packages = [];
6730
+ var v3PackagesOtherThanBasic = [];
6731
+ var maybeV2Adapter;
6732
+ for (var _pkg of itemsByPkg.keys()) {
6733
+ if (_pkg.id) {
6734
+ if (_pkg.id === "bricks/basic") {
6735
+ foundBasicPkg = _pkg;
6736
+ } else {
6737
+ v3PackagesOtherThanBasic.push(_pkg);
6738
+ }
6739
+ } else {
6740
+ // Brick packages of v2 has no `id`
6741
+ v2Packages.push(_pkg);
6742
+ maybeV2Adapter = brickPackagesMap.get("bricks/v2-adapter");
6743
+ if (!maybeV2Adapter) {
6744
+ // eslint-disable-next-line no-console
6745
+ console.error("Using v2 bricks, but v2-adapter not found");
6746
+ }
6747
+ }
6748
+ }
6749
+ var v2Adapter = maybeV2Adapter;
6750
+ var basicPkgPromise;
6751
+ var basicPkg = foundBasicPkg;
6752
+ if (basicPkg) {
6753
+ var _window$PUBLIC_ROOT2;
6754
+ var tempPromise = loadScript(basicPkg.filePath, (_window$PUBLIC_ROOT2 = window.PUBLIC_ROOT) !== null && _window$PUBLIC_ROOT2 !== void 0 ? _window$PUBLIC_ROOT2 : "");
6755
+ // Packages other than BASIC will wait for an extra micro-task tick.
6756
+ if (!basicPkgWillBeResolved) {
6757
+ basicPkgWillBeResolved = true;
6758
+ tempPromise.then(() => Promise.resolve()).then(resolveBasicPkg);
6759
+ }
6760
+ basicPkgPromise = tempPromise.then(() => Promise.all(
6761
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
6762
+ itemsByPkg.get(basicPkg).map(itemName => loadBrickModule(type, basicPkg.id, itemName))));
6763
+ }
6764
+ var pkgPromises = [basicPkgPromise].concat(loadRestBricks(type, v3PackagesOtherThanBasic, itemsByPkg));
6765
+ if (v2Adapter && v2Packages.length > 0) {
6766
+ if (!v2AdapterPromise) {
6767
+ // Load `v2-adapter.load-bricks` and its dependencies
6768
+ var v2AdapterItemsByPkg = getItemsByPkg("bricks", [V2_ADAPTER_LOAD_BRICKS], brickPackagesMap);
6769
+ var v2AdapterPackages = [...v2AdapterItemsByPkg.keys()];
6770
+ var loadV2Adapter = /*#__PURE__*/function () {
6771
+ var _ref2 = _asyncToGenerator$3(function* () {
6772
+ yield Promise.all(loadRestBricks("bricks", v2AdapterPackages, v2AdapterItemsByPkg));
6773
+ return document.createElement(V2_ADAPTER_LOAD_BRICKS);
6774
+ });
6775
+ return function loadV2Adapter() {
6776
+ return _ref2.apply(this, arguments);
6777
+ };
6778
+ }();
6779
+ v2AdapterPromise = loadV2Adapter();
6780
+ }
6781
+ pkgPromises.push(v2AdapterPromise.then(adapter => Promise.all(v2Packages.map(pkg => {
6782
+ var pkgId = getPkgIdByFilePath(pkg.filePath);
6783
+ var pkgNamespace = pkgId.split("/")[1];
6784
+ return adapter.resolve(v2Adapter.filePath, pkg.filePath, type === "bricks" ?
6785
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
6786
+ itemsByPkg.get(pkg).map(itemName => "".concat(pkgNamespace, ".").concat(itemName)) : [], pkg.dll,
6787
+ // Todo: remove `brickPackages` as an argument
6788
+ brickPackages);
6789
+ }))));
6790
+ }
6791
+ yield Promise.all(pkgPromises);
6792
+ });
6793
+ return _enqueueStableLoad.apply(this, arguments);
6794
+ }
6795
+ function dispatchRequestStatus(_x10) {
6796
+ return _dispatchRequestStatus.apply(this, arguments);
6797
+ }
6798
+ function _dispatchRequestStatus() {
6799
+ _dispatchRequestStatus = _asyncToGenerator$3(function* (promise) {
6800
+ window.dispatchEvent(new Event("request.start"));
6801
+ try {
6802
+ yield promise;
6803
+ } finally {
6804
+ window.dispatchEvent(new Event("request.end"));
6805
+ }
6806
+ });
6807
+ return _dispatchRequestStatus.apply(this, arguments);
6808
+ }
6809
+ function getProcessorPackageName(camelPackageName) {
6810
+ return camelPackageName.replace(/[A-Z]/g, match => "-".concat(match[0].toLocaleLowerCase())).replace(/_[0-9]/g, match => "-".concat(match[1]));
6811
+ }
6812
+ function getPkgIdByFilePath(filePath) {
6813
+ return filePath.split("/").slice(0, 2).join("/");
6814
+ }
6815
+
6555
6816
  /**
6556
6817
  * Merge `app.defaultConfig` and `app.userConfig` to `app.config`.
6557
6818
  *
@@ -8319,6 +8580,7 @@ class Kernel {
8319
8580
  pendingTask: Promise.resolve()
8320
8581
  };
8321
8582
  } else {
8583
+ var _eager$v3Bricks;
8322
8584
  // 先加载模板
8323
8585
  var templateDeps = getTemplateDepsOfStoryboard(storyboard, templatePackages);
8324
8586
  yield loadScriptOfBricksOrTemplates(templateDeps);
@@ -8327,6 +8589,8 @@ class Kernel {
8327
8589
  dll,
8328
8590
  deps,
8329
8591
  bricks,
8592
+ v3Bricks,
8593
+ v3Processors,
8330
8594
  eager
8331
8595
  } = getDllAndDepsOfStoryboard(yield asyncProcessStoryboard(storyboard, brickTemplateRegistry, templatePackages), brickPackages, {
8332
8596
  ignoreBricksInUnusedCustomTemplates: true
@@ -8334,10 +8598,15 @@ class Kernel {
8334
8598
  // 需要先阻塞加载 Custom Processors 和 widgets。
8335
8599
  yield loadScriptOfDll(eager.dll);
8336
8600
  yield loadScriptOfBricksOrTemplates(eager.deps);
8601
+ if ((_eager$v3Bricks = eager.v3Bricks) !== null && _eager$v3Bricks !== void 0 && _eager$v3Bricks.length) {
8602
+ yield loadBricksImperatively(eager.v3Bricks, brickPackages);
8603
+ }
8337
8604
  // 加载构件资源时,不再阻塞后续业务数据的加载,在挂载构件时再等待该任务完成。
8338
8605
  // 挂载构件可能包括:Provider 构件实时挂载、路由准备完成后的统一挂载等。
8339
8606
  return {
8340
- pendingTask: loadScriptOfDll(dll).then(() => loadScriptOfBricksOrTemplates(deps)).then(() => loadLazyBricks(bricks))
8607
+ pendingTask: loadScriptOfDll(dll).then(() => loadScriptOfBricksOrTemplates(deps)).then( /*#__PURE__*/_asyncToGenerator$3(function* () {
8608
+ yield Promise.all([loadLazyBricks(bricks), (v3Bricks === null || v3Bricks === void 0 ? void 0 : v3Bricks.length) && loadBricksImperatively(v3Bricks, brickPackages), (v3Processors === null || v3Processors === void 0 ? void 0 : v3Processors.length) && loadProcessorsImperatively(v3Processors, brickPackages)]);
8609
+ }))
8341
8610
  };
8342
8611
  }
8343
8612
  });
@@ -8346,28 +8615,33 @@ class Kernel {
8346
8615
  };
8347
8616
  }());
8348
8617
  _defineProperty$1(this, "_loadDynamicBricks", /*#__PURE__*/function () {
8349
- var _ref2 = _asyncToGenerator$3(function* (bricks, processors) {
8618
+ var _ref3 = _asyncToGenerator$3(function* (bricks, processors) {
8350
8619
  var filteredBricks = bricks.filter(
8351
8620
  // Only try to load undefined custom elements.
8352
8621
  item => !customElements.get(item));
8622
+ var {
8623
+ brickPackages
8624
+ } = _this.bootstrapData;
8353
8625
  // Try to load deps for dynamic added bricks.
8354
8626
  var {
8355
8627
  dll,
8356
- deps
8628
+ deps,
8629
+ v3Bricks,
8630
+ v3Processors
8357
8631
  } = getDllAndDepsByResource({
8358
8632
  bricks: filteredBricks,
8359
8633
  processors
8360
8634
  }, _this.bootstrapData.brickPackages);
8361
8635
  yield loadScriptOfDll(dll);
8362
8636
  yield loadScriptOfBricksOrTemplates(deps);
8363
- yield loadLazyBricks(filteredBricks);
8637
+ yield Promise.all([loadLazyBricks(filteredBricks), (v3Bricks === null || v3Bricks === void 0 ? void 0 : v3Bricks.length) && loadBricksImperatively(v3Bricks, brickPackages), (v3Processors === null || v3Processors === void 0 ? void 0 : v3Processors.length) && loadProcessorsImperatively(v3Processors, brickPackages)]);
8364
8638
  });
8365
8639
  return function (_x2, _x3) {
8366
- return _ref2.apply(this, arguments);
8640
+ return _ref3.apply(this, arguments);
8367
8641
  };
8368
8642
  }());
8369
8643
  _defineProperty$1(this, "_loadEditorBricks", /*#__PURE__*/function () {
8370
- var _ref3 = _asyncToGenerator$3(function* (editorBricks) {
8644
+ var _ref4 = _asyncToGenerator$3(function* (editorBricks) {
8371
8645
  var {
8372
8646
  dll,
8373
8647
  deps
@@ -8380,7 +8654,7 @@ class Kernel {
8380
8654
  yield loadScriptOfBricksOrTemplates(deps);
8381
8655
  });
8382
8656
  return function (_x4) {
8383
- return _ref3.apply(this, arguments);
8657
+ return _ref4.apply(this, arguments);
8384
8658
  };
8385
8659
  }());
8386
8660
  }
@@ -8564,8 +8838,8 @@ class Kernel {
8564
8838
  // Prefix to avoid conflict between brick package's i18n namespace.
8565
8839
  var i18nNamespace = getI18nNamespace("app", storyboard.app.id);
8566
8840
  // Support any language in `meta.i18n`.
8567
- Object.entries(storyboard.meta.i18n).forEach(_ref4 => {
8568
- var [lang, resources] = _ref4;
8841
+ Object.entries(storyboard.meta.i18n).forEach(_ref5 => {
8842
+ var [lang, resources] = _ref5;
8569
8843
  i18next.addResourceBundle(lang, i18nNamespace, resources);
8570
8844
  });
8571
8845
  }
@@ -8987,8 +9261,8 @@ class Kernel {
8987
9261
  });
8988
9262
  });
8989
9263
  if (!filterMenus.length) {
8990
- var _ref5, _yield$InstanceApi_po;
8991
- filterMenus = (_ref5 = (_yield$InstanceApi_po = yield InstanceApi_postSearch("STANDALONE_MENU@EASYOPS", {
9264
+ var _ref6, _yield$InstanceApi_po;
9265
+ filterMenus = (_ref6 = (_yield$InstanceApi_po = yield InstanceApi_postSearch("STANDALONE_MENU@EASYOPS", {
8992
9266
  page: 1,
8993
9267
  page_size: 200,
8994
9268
  fields: {
@@ -9017,7 +9291,7 @@ class Kernel {
9017
9291
  $eq: true
9018
9292
  }
9019
9293
  }
9020
- })) === null || _yield$InstanceApi_po === void 0 ? void 0 : _yield$InstanceApi_po.list) !== null && _ref5 !== void 0 ? _ref5 : [];
9294
+ })) === null || _yield$InstanceApi_po === void 0 ? void 0 : _yield$InstanceApi_po.list) !== null && _ref6 !== void 0 ? _ref6 : [];
9021
9295
  }
9022
9296
  return filterMenus;
9023
9297
  })();
@@ -9060,15 +9334,15 @@ function _loadScriptOfDll() {
9060
9334
  _loadScriptOfDll = _asyncToGenerator$3(function* (dlls) {
9061
9335
  if (dlls.some(dll => dll.startsWith("dll-of-editor-bricks-helper."))) {
9062
9336
  var dllPath = window.DLL_PATH || {};
9063
- yield loadScript(dllPath["react-dnd"], window.CORE_ROOT);
9337
+ yield loadScript$1(dllPath["react-dnd"], window.CORE_ROOT);
9064
9338
  }
9065
9339
  // `loadScript` is auto cached, no need to filter out `react-dnd`.
9066
- yield loadScript(dlls, window.CORE_ROOT);
9340
+ yield loadScript$1(dlls, window.CORE_ROOT);
9067
9341
  });
9068
9342
  return _loadScriptOfDll.apply(this, arguments);
9069
9343
  }
9070
9344
  function loadScriptOfBricksOrTemplates(src) {
9071
- return loadScript(src, window.PUBLIC_ROOT);
9345
+ return loadScript$1(src, window.PUBLIC_ROOT);
9072
9346
  }
9073
9347
  function generateColorTheme(theme) {
9074
9348
  if (!theme) {