初始化
This commit is contained in:
10
uni_modules/UniDevTools/node_modules/systemjs/LICENSE
generated
vendored
Normal file
10
uni_modules/UniDevTools/node_modules/systemjs/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
MIT License
|
||||
-----------
|
||||
|
||||
Copyright (C) 2013-2022 Guy Bedford
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
260
uni_modules/UniDevTools/node_modules/systemjs/README.md
generated
vendored
Normal file
260
uni_modules/UniDevTools/node_modules/systemjs/README.md
generated
vendored
Normal file
@@ -0,0 +1,260 @@
|
||||
# SystemJS
|
||||
|
||||
[](https://gitter.im/systemjs/systemjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
[](#backers)
|
||||
[](#sponsors)
|
||||
[](https://www.jsdelivr.com/package/npm/systemjs)
|
||||
|
||||
SystemJS is a hookable, standards-based module loader. It provides a workflow where code written for production workflows of native ES modules in browsers ([like Rollup code-splitting builds](https://rollupjs.org/guide/en#code-splitting)), can be transpiled to the [System.register module format](docs/system-register.md) to work in older browsers that don't support native modules, running [almost-native module speeds](#performance) while supporting top-level await, dynamic import, circular references and live bindings, import.meta.url, module types, import maps, integrity and Content Security Policy with compatibility in older browsers back to IE11.
|
||||
|
||||
## Sponsors
|
||||
|
||||
<a href="https://opencollective.com/systemjs/sponsor/0/website" target="_blank"><img src="https://opencollective.com/systemjs/sponsor/0/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/systemjs/sponsor/1/website" target="_blank"><img src="https://opencollective.com/systemjs/sponsor/1/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/systemjs/sponsor/2/website" target="_blank"><img src="https://opencollective.com/systemjs/sponsor/2/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/systemjs/sponsor/3/website" target="_blank"><img src="https://opencollective.com/systemjs/sponsor/3/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/systemjs/sponsor/4/website" target="_blank"><img src="https://opencollective.com/systemjs/sponsor/4/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/systemjs/sponsor/5/website" target="_blank"><img src="https://opencollective.com/systemjs/sponsor/5/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/systemjs/sponsor/6/website" target="_blank"><img src="https://opencollective.com/systemjs/sponsor/6/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/systemjs/sponsor/7/website" target="_blank"><img src="https://opencollective.com/systemjs/sponsor/7/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/systemjs/sponsor/8/website" target="_blank"><img src="https://opencollective.com/systemjs/sponsor/8/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/systemjs/sponsor/9/website" target="_blank"><img src="https://opencollective.com/systemjs/sponsor/9/avatar.svg"></a>
|
||||
|
||||
> **Support SystemJS by [becoming a sponsor](https://opencollective.com/systemjs#sponsor).** Your logo will show up here with a link to your website.
|
||||
|
||||
## Backers
|
||||
|
||||
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/systemjs#backer)]
|
||||
|
||||
<a href="https://opencollective.com/systemjs#backers" target="_blank"><img src="https://opencollective.com/systemjs/backers.svg?width=890"></a>
|
||||
|
||||
### Overview
|
||||
|
||||
#### 1. s.js minimal production loader
|
||||
|
||||
The minimal [2.8KB s.js production loader](dist/s.min.js) includes the following features:
|
||||
|
||||
* Loads `System.register` modules, the CSP-compatible [SystemJS module format](docs/system-register.md).
|
||||
* Support for loading bare specifier names with [import maps](docs/import-maps.md) via `<script type="systemjs-importmap">`.
|
||||
* Supports [hooks](docs/hooks.md) for loader customization.
|
||||
|
||||
#### 2. system.js loader
|
||||
|
||||
The [4.2KB system.js loader](dist/system.min.js) adds the following features in addition to the `s.js` features above:
|
||||
|
||||
* [Tracing hooks](docs/hooks.md##onloaderr-id-deps-iserrsource-sync) and [registry deletion API](docs/api.md#registry) for reloading workflows.
|
||||
* Supports loading Wasm, CSS and JSON [module types](docs/module-types.md).
|
||||
* Includes the [global loading extra](#extras) for loading global scripts, useful for loading library dependencies traditionally loaded with script tags.
|
||||
|
||||
#### 3. system-node.cjs loader
|
||||
|
||||
The [system-node.cjs](/dist/system-node.cjs) loader is a version of SystemJS build designed to run in Node.js, typically for workflows where System modules need to be executed on the server like SSR. It has the following features:
|
||||
|
||||
* Loading System modules from disk (via `file://` urls) or the network, with included caching that respects the Content-Type header.
|
||||
* Import Maps (via the `applyImportMap` api).
|
||||
* [Tracing hooks](docs/hooks.md#trace-hooks) and [registry deletion API](docs/api.md#registry) for reloading workflows.
|
||||
* Loading global modules with the included [global loading extra](#extras).
|
||||
|
||||
_Loading CommonJS modules is not currently supported in this loader and likely won't be. If you find you need them it is more advisable to use [Node.js native module support](https://nodejs.org/dist/latest/docs/api/esm.html) where possible instead of the SystemJS Node.js loader._
|
||||
|
||||
#### Extras
|
||||
|
||||
The following [pluggable extras](dist/extras) can be dropped in with either the s.js or system.js loader:
|
||||
|
||||
* [AMD loading](dist/extras/amd.js) support (through `Window.define` which is created).
|
||||
* [Named register](dist/extras/named-register.js) supports `System.register('name', ...)` named bundles which can then be imported as `System.import('name')` (as well as AMD named define support)
|
||||
* [Dynamic import maps](dist/extras/dynamic-import-maps.js) support. This is currently a _potential_ new standard [feature](https://github.com/guybedford/import-maps-extensions#lazy-loading-of-import-maps).
|
||||
|
||||
The following extras are included in system.js loader by default, and can be added to the s.js loader for a smaller tailored footprint:
|
||||
|
||||
* [Global loading](dist/extras/global.js) support for loading global scripts and detecting the defined global as the default export. Useful for loading common library scripts from CDN like `System.import('//unpkg.com/lodash')`.
|
||||
* [Module Types](dist/extras/module-types.js) `.css`, `.wasm`, `.json` [module type](docs/module-types.md) loading support in line with the existing modules specifications.
|
||||
|
||||
Since all loader features are hookable, custom extensions can be easily made following the same approach as the bundled extras. See the [hooks documentation](docs/hooks.md) for more information.
|
||||
|
||||
## SystemJS Babel
|
||||
|
||||
To support easy loading of TypeScript or ES modules in development SystemJS workflows, see the [SystemJS Babel Extension](https://github.com/systemjs/systemjs-babel).
|
||||
|
||||
SystemJS does not support direct integration with the native ES module browser loader because there is no way to share dependencies between the module systems. For extending the functionality of the native module loader in browsers, see [ES module Shims](https://github.com/guybedford/es-module-shims), which like SystemJS, provides workflows for import maps and other modules features, but on top of base-level modules support in browsers, which it does using a fast Wasm-based source rewriting to remap module specifiers.
|
||||
|
||||
## Performance
|
||||
|
||||
SystemJS is designed for production modules performance roughly only around a factor of 1.5 times the speed of native ES modules, as seen in the following performance benchmark, which was run by loading 426 javascript modules (all of `@babel/core`) on a Macbook pro with fast wifi internet connection. Each test was the average of five page loads in Chrome 80.
|
||||
|
||||
| Tool | Uncached | Cached |
|
||||
| ---- | -------- | ------ |
|
||||
| Native modules | 1668ms | 49ms |
|
||||
| SystemJS | 2334ms | 81ms |
|
||||
|
||||
## Getting Started
|
||||
|
||||
[Introduction video](https://www.youtube.com/watch?v=AmdKF2UhFzw).
|
||||
|
||||
The [systemjs-examples repo](https://github.com/systemjs/systemjs-examples) contains a variety of examples demonstrating how to use SystemJS.
|
||||
|
||||
## Installation
|
||||
|
||||
```
|
||||
npm install systemjs
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
* [Import Maps](docs/import-maps.md)
|
||||
* [API](docs/api.md)
|
||||
* [System.register](docs/system-register.md)
|
||||
* [Loader Hooks](docs/hooks.md)
|
||||
* [Module Types](docs/module-types.md)
|
||||
|
||||
## Example Usage
|
||||
|
||||
### Loading a System.register module
|
||||
You can load [System.register](/docs/system-register.md) modules with a script element in your HTML:
|
||||
|
||||
```html
|
||||
<script src="system.js"></script>
|
||||
<script type="systemjs-module" src="/js/main.js"></script>
|
||||
<script type="systemjs-module" src="import:name-of-module"></script>
|
||||
```
|
||||
|
||||
### Loading with System.import
|
||||
You can also dynamically load modules at any time with `System.import()`:
|
||||
|
||||
```js
|
||||
System.import('/js/main.js');
|
||||
```
|
||||
|
||||
where `main.js` is a module available in the System.register module format.
|
||||
|
||||
### Bundling workflow
|
||||
|
||||
For an example of a bundling workflow, see the Rollup Code Splitting starter project - https://github.com/rollup/rollup-starter-code-splitting.
|
||||
|
||||
Note that when building System modules you typically want to ensure anonymous System.register statements like:
|
||||
|
||||
```js
|
||||
System.register([], function () { ... });
|
||||
```
|
||||
|
||||
are emitted, as these can be loaded in a way that behaves the same as normal ES modules, and **not** named register statements like:
|
||||
|
||||
```js
|
||||
System.register('name', [], function () { ... });
|
||||
```
|
||||
|
||||
While these can be supported with the named register extension, this approach is typically not recommended for modern modules workflows.
|
||||
|
||||
### Import Maps
|
||||
|
||||
Say `main.js` depends on loading `'lodash'`, then we can define an import map:
|
||||
|
||||
```html
|
||||
<script src="system.js"></script>
|
||||
<script type="systemjs-importmap">
|
||||
{
|
||||
"imports": {
|
||||
"lodash": "https://unpkg.com/lodash@4.17.10/lodash.js"
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<!-- Alternatively:
|
||||
<script type="systemjs-importmap" src="path/to/map.json" crossorigin="anonymous"></script>
|
||||
-->
|
||||
<script type="systemjs-module" src="/js/main.js"></script>
|
||||
```
|
||||
|
||||
### IE11 Support
|
||||
|
||||
IE11 continues to be fully supported, provided the relevant polyfills are available.
|
||||
|
||||
The main required polyfill is a `Promise` polyfill. If using import maps a `fetch` polyfill is also needed.
|
||||
|
||||
Both of these can be loaded conditionally using for example using [Bluebird Promises](http://bluebirdjs.com/docs/getting-started.html) and the [GitHub Fetch Polyfill](https://github.github.io/fetch/) over Unpkg:
|
||||
|
||||
```html
|
||||
<script>
|
||||
if (typeof Promise === 'undefined')
|
||||
document.write('<script src="https://unpkg.com/bluebird@3.7.2/js/browser/bluebird.core.min.js"><\/script>');
|
||||
if (typeof fetch === 'undefined')
|
||||
document.write('<script src="https://unpkg.com/whatwg-fetch@3.4.1/dist/fetch.umd.js"><\/script>');
|
||||
</script>
|
||||
```
|
||||
|
||||
located _before_ the SystemJS script itself. The above will ensure these polyfills are only fetched for older browsers without `Promise` and `fetch` support.
|
||||
|
||||
#### Note on Import Maps Support in IE11
|
||||
|
||||
When using external import maps (those with `src=""` attributes), there is an IE11-specific workaround that might need to be used. Browsers should not make a network request when they see `<script type="systemjs-importmap" src="/importmap.json"></script>` during parsing of the initial HTML page. However, IE11 does so. [Codesandbox demonstration](https://codesandbox.io/s/vibrant-black-xiok4?file=/index.html)
|
||||
|
||||
Normally this is not an issue, as SystemJS will make an additional request via fetch/xhr for the import map. However, a problem can occur when the file is cached after the first request, since the first request caused by IE11 does not send the Origin request header by default. If the request requires CORS, the lack of an Origin request header causes many web servers (including AWS Cloudfront) to omit the response CORS headers. This can result in the resource being cached without CORS headers, which causes the later SystemJS fetch() to fail because of CORS checks.
|
||||
|
||||
This can be worked around by adding `crossorigin="anonymous"` as an attribute to the `<script type="systemjs-importmap">` script.
|
||||
|
||||
## Community Projects
|
||||
|
||||
A list of projects that use or work with SystemJS in providing modular browser workflows. [Post a PR](https://github.com/systemjs/systemjs/edit/master/README.md).
|
||||
|
||||
* [beyondjs.com](https://beyondjs.com) -TypeScript first meta-framework for universal microfrontends/micronservices.
|
||||
* [esm-bundle](https://github.com/esm-bundle) - list of System.register versions for major libraries, including documentation on how to create a System.register bundle for any npm package.
|
||||
* [es-dev-server](https://github.com/open-wc/open-wc/tree/master/packages/es-dev-server) - A web server for developing without a build step.
|
||||
* [import map overrides](https://github.com/joeldenning/import-map-overrides/) - Dynamically inject an import map stored in local storage so that you can override the URL for any module. Can be useful for running development modules on localhost against the server.
|
||||
* [js-env](https://github.com/jsenv/jsenv-core) - Collection of development tools providing a unified workflow to write JavaScript for the web, node.js or both at the same time.
|
||||
* [jspm.org](https://jspm.org) - Package manager for native modules, using SystemJS for backwards compatibility.
|
||||
* [single-spa](https://single-spa.js.org/) - JavaScript framework for front-end microservices.
|
||||
* [systemjs-webpack-interop](https://github.com/joeldenning/systemjs-webpack-interop) - npm lib for setting webpack public path and creating webpack configs that work well with SystemJS.
|
||||
* [@wener/system](https://github.com/wenerme/wode/tree/main/packages/system) - hooks to make System works with npm registry & package.json}
|
||||
|
||||
|
||||
## Compatibility with Webpack
|
||||
|
||||
Code-splitting builds on top of native ES modules, like Rollup offers, are an alternative to the Webpack-style chunking approach - offering a way to utilize the native module loader for loading shared and dynamic chunks instead of using a custom registry and loader as Webpack bundles include. Scope-level optimizations can be performed on ES modules when they are combined, while ensuring no duplicate code is loaded through dynamic loading and code-sharing in the module registry, using the features of the native module loader and its dynamic runtime nature.
|
||||
|
||||
[systemjs-webpack-interop](https://github.com/joeldenning/systemjs-webpack-interop) is a community-maintained npm library that might help you get webpack and systemjs working well together.
|
||||
|
||||
As of webpack@4.30.0, it is now possible to compile webpack bundles to System.register format, by modifying your webpack config:
|
||||
|
||||
```js
|
||||
{
|
||||
output: {
|
||||
libraryTarget: 'system',
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
If using webpack@<5, the following config is needed to avoid rewriting references to the global `System` variable:
|
||||
|
||||
```js
|
||||
{
|
||||
module: {
|
||||
rules: [
|
||||
{ parser: { system: false } }
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Using npm packages
|
||||
|
||||
Third party libraries and npm packages may be used as long as they are published in [a supported module format](https://github.com/systemjs/systemjs/blob/master/docs/module-types.md). For packages that do not exist in a supported module format, [here is a list of github repos](https://github.com/esm-bundle/) that publish `System.register` versions of popular third party libraries (such as react, react-dom, rxjs, etc).
|
||||
|
||||
## Contributing to SystemJS
|
||||
|
||||
Project bug fixes and changes are welcome for discussion, provided the project footprint remains minimal.
|
||||
|
||||
Task running is handled by Chomp (https://chompbuild.com).
|
||||
|
||||
To run the tests:
|
||||
|
||||
```
|
||||
npm install -g chomp
|
||||
chomp test
|
||||
```
|
||||
|
||||
## Changes
|
||||
|
||||
For the changelog, see [CHANGELOG.md](CHANGELOG.md).
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
112
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/amd.js
generated
vendored
Normal file
112
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/amd.js
generated
vendored
Normal file
@@ -0,0 +1,112 @@
|
||||
(function () {
|
||||
|
||||
function errMsg(errCode, msg) {
|
||||
return (msg || "") + " (SystemJS Error#" + errCode + " " + "https://github.com/systemjs/systemjs/blob/main/docs/errors.md#" + errCode + ")";
|
||||
}
|
||||
|
||||
/*
|
||||
* Support for AMD loading
|
||||
*/
|
||||
(function (global) {
|
||||
function unsupportedRequire () {
|
||||
throw Error(errMsg(5, 'AMD require not supported.'));
|
||||
}
|
||||
|
||||
var requireExportsModule = ['require', 'exports', 'module'];
|
||||
|
||||
function createAMDRegister (amdDefineDeps, amdDefineExec) {
|
||||
var exports = {};
|
||||
var module = { exports: exports };
|
||||
var depModules = [];
|
||||
var setters = [];
|
||||
var splice = 0;
|
||||
for (var i = 0; i < amdDefineDeps.length; i++) {
|
||||
var id = amdDefineDeps[i];
|
||||
var index = setters.length;
|
||||
if (id === 'require') {
|
||||
depModules[i] = unsupportedRequire;
|
||||
splice++;
|
||||
}
|
||||
else if (id === 'module') {
|
||||
depModules[i] = module;
|
||||
splice++;
|
||||
}
|
||||
else if (id === 'exports') {
|
||||
depModules[i] = exports;
|
||||
splice++;
|
||||
}
|
||||
else {
|
||||
createSetter(i);
|
||||
}
|
||||
if (splice)
|
||||
amdDefineDeps[index] = id;
|
||||
}
|
||||
if (splice)
|
||||
amdDefineDeps.length -= splice;
|
||||
var amdExec = amdDefineExec;
|
||||
return [amdDefineDeps, function (_export) {
|
||||
_export({ default: exports, __useDefault: true });
|
||||
return {
|
||||
setters: setters,
|
||||
execute: function () {
|
||||
var amdResult = amdExec.apply(exports, depModules);
|
||||
if (amdResult !== undefined)
|
||||
module.exports = amdResult;
|
||||
_export(module.exports);
|
||||
_export('default', module.exports);
|
||||
}
|
||||
};
|
||||
}];
|
||||
|
||||
// needed to avoid iteration scope issues
|
||||
function createSetter(idx) {
|
||||
setters.push(function (ns) {
|
||||
depModules[idx] = ns.__useDefault ? ns.default : ns;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
global.define = function (arg1, arg2, arg3) {
|
||||
var isNamedRegister = typeof arg1 === 'string';
|
||||
var name = isNamedRegister ? arg1 : null;
|
||||
var depArg = isNamedRegister ? arg2 : arg1;
|
||||
var execArg = isNamedRegister ? arg3 : arg2;
|
||||
|
||||
// The System.register(deps, exec) arguments
|
||||
var deps, exec;
|
||||
|
||||
// define([], function () {})
|
||||
if (Array.isArray(depArg)) {
|
||||
deps = depArg;
|
||||
exec = execArg;
|
||||
}
|
||||
// define({})
|
||||
else if (typeof depArg === 'object') {
|
||||
deps = [];
|
||||
exec = function () { return depArg };
|
||||
}
|
||||
// define(function () {})
|
||||
else if (typeof depArg === 'function') {
|
||||
deps = requireExportsModule;
|
||||
exec = depArg;
|
||||
} else {
|
||||
throw Error(errMsg(9, 'Invalid call to AMD define()'));
|
||||
}
|
||||
|
||||
var amdRegister = createAMDRegister(deps, exec);
|
||||
|
||||
if (isNamedRegister) {
|
||||
if (System.registerRegistry) {
|
||||
System.registerRegistry[name] = amdRegister;
|
||||
System.register(name, amdRegister[0], amdRegister[1]);
|
||||
} else
|
||||
console.warn(errMsg('W6', 'Include named-register.js for full named define support'));
|
||||
// TODO: create new warning number and documentation for using named define without named-register extra
|
||||
System.register(amdRegister[0], amdRegister[1]);
|
||||
} else
|
||||
System.register(amdRegister[0], amdRegister[1]);
|
||||
};
|
||||
global.define.amd = {};
|
||||
})(typeof self !== 'undefined' ? self : global);
|
||||
|
||||
})();
|
||||
2
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/amd.min.js
generated
vendored
Normal file
2
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/amd.min.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
!function(){function e(e,r){return(r||"")+" (SystemJS Error#"+e+" https://github.com/systemjs/systemjs/blob/main/docs/errors.md#"+e+")"}!function(r){function t(){throw Error(e(5,"AMD require not supported."))}var n=["require","exports","module"];r.define=function(r,o,s){var i,u,f="string"==typeof r,l=f?r:null,a=f?o:r,d=f?s:o;if(Array.isArray(a))i=a,u=d;else if("object"==typeof a)i=[],u=function(){return a};else{if("function"!=typeof a)throw Error(e(9,"Invalid call to AMD define()"));i=n,u=a}var c=function(e,r){function n(e){u.push((function(r){i[e]=r.__useDefault?r.default:r}))}for(var o={},s={exports:o},i=[],u=[],f=0,l=0;l<e.length;l++){var a=e[l],d=u.length;"require"===a?(i[l]=t,f++):"module"===a?(i[l]=s,f++):"exports"===a?(i[l]=o,f++):n(l),f&&(e[d]=a)}f&&(e.length-=f);var c=r;return[e,function(e){return e({default:o,__useDefault:!0}),{setters:u,execute:function(){var r=c.apply(o,i);void 0!==r&&(s.exports=r),e(s.exports),e("default",s.exports)}}}]}(i,u);f?(System.registerRegistry?(System.registerRegistry[l]=c,System.register(l,c[0],c[1])):console.warn(e("W6","Include named-register.js for full named define support")),System.register(c[0],c[1])):System.register(c[0],c[1])},r.define.amd={}}("undefined"!=typeof self?self:global)}();
|
||||
//# sourceMappingURL=amd.min.js.map
|
||||
1
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/amd.min.js.map
generated
vendored
Normal file
1
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/amd.min.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
20
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/dynamic-import-maps.js
generated
vendored
Normal file
20
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/dynamic-import-maps.js
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
(function () {
|
||||
|
||||
/*
|
||||
* Support for live DOM updating import maps
|
||||
*/
|
||||
new MutationObserver(function (mutations) {
|
||||
for (var i = 0; i < mutations.length; i++) {
|
||||
var mutation = mutations[i];
|
||||
if (mutation.type === 'childList')
|
||||
for (var j = 0; j < mutation.addedNodes.length; j++) {
|
||||
var addedNode = mutation.addedNodes[j];
|
||||
if (addedNode.tagName === 'SCRIPT' && addedNode.type === 'systemjs-importmap' && !addedNode.sp) {
|
||||
System.prepareImport(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}).observe(document, { childList: true, subtree: true });
|
||||
|
||||
})();
|
||||
2
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/dynamic-import-maps.min.js
generated
vendored
Normal file
2
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/dynamic-import-maps.min.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
new MutationObserver((function(e){for(var t=0;t<e.length;t++){var r=e[t];if("childList"===r.type)for(var a=0;a<r.addedNodes.length;a++){var s=r.addedNodes[a];if("SCRIPT"===s.tagName&&"systemjs-importmap"===s.type&&!s.sp){System.prepareImport(!0);break}}}})).observe(document,{childList:!0,subtree:!0});
|
||||
//# sourceMappingURL=dynamic-import-maps.min.js.map
|
||||
1
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/dynamic-import-maps.min.js.map
generated
vendored
Normal file
1
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/dynamic-import-maps.min.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"##.min.js","names":["MutationObserver","mutations","i","length","mutation","type","j","addedNodes","addedNode","tagName","sp","System","prepareImport","observe","document","childList","subtree"],"sources":["dynamic-import-maps.js"],"sourcesContent":["(function () {\n\n /*\n * Support for live DOM updating import maps\n */\n new MutationObserver(function (mutations) {\n for (var i = 0; i < mutations.length; i++) {\n var mutation = mutations[i];\n if (mutation.type === 'childList')\n for (var j = 0; j < mutation.addedNodes.length; j++) {\n var addedNode = mutation.addedNodes[j];\n if (addedNode.tagName === 'SCRIPT' && addedNode.type === 'systemjs-importmap' && !addedNode.sp) {\n System.prepareImport(true);\n break;\n }\n }\n }\n }).observe(document, { childList: true, subtree: true });\n\n})();\n"],"mappings":"AAKE,IAAIA,kBAAiB,SAAUC,GAC7B,IAAK,IAAIC,EAAI,EAAGA,EAAID,EAAUE,OAAQD,IAAK,CACzC,IAAIE,EAAWH,EAAUC,GACzB,GAAsB,cAAlBE,EAASC,KACb,IAAK,IAAIC,EAAI,EAAGA,EAAIF,EAASG,WAAWJ,OAAQG,IAAK,CACnD,IAAIE,EAAYJ,EAASG,WAAWD,GACpC,GAA0B,WAAtBE,EAAUC,SAA2C,uBAAnBD,EAAUH,OAAkCG,EAAUE,GAAI,CAC9FC,OAAOC,eAAc,GACrB,KACF,CACF,CACF,CACF,IAAGC,QAAQC,SAAU,CAAEC,WAAW,EAAMC,SAAS"}
|
||||
100
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/global.js
generated
vendored
Normal file
100
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/global.js
generated
vendored
Normal file
@@ -0,0 +1,100 @@
|
||||
(function () {
|
||||
|
||||
/*
|
||||
* SystemJS global script loading support
|
||||
* Extra for the s.js build only
|
||||
* (Included by default in system.js build)
|
||||
*/
|
||||
(function (global) {
|
||||
var systemJSPrototype = global.System.constructor.prototype;
|
||||
|
||||
// safari unpredictably lists some new globals first or second in object order
|
||||
var firstGlobalProp, secondGlobalProp, lastGlobalProp;
|
||||
function getGlobalProp (useFirstGlobalProp) {
|
||||
var cnt = 0;
|
||||
var foundLastProp, result;
|
||||
for (var p in global) {
|
||||
// do not check frames cause it could be removed during import
|
||||
if (shouldSkipProperty(p))
|
||||
continue;
|
||||
if (cnt === 0 && p !== firstGlobalProp || cnt === 1 && p !== secondGlobalProp)
|
||||
return p;
|
||||
if (foundLastProp) {
|
||||
lastGlobalProp = p;
|
||||
result = useFirstGlobalProp && result || p;
|
||||
}
|
||||
else {
|
||||
foundLastProp = p === lastGlobalProp;
|
||||
}
|
||||
cnt++;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
function noteGlobalProps () {
|
||||
// alternatively Object.keys(global).pop()
|
||||
// but this may be faster (pending benchmarks)
|
||||
firstGlobalProp = secondGlobalProp = undefined;
|
||||
for (var p in global) {
|
||||
// do not check frames cause it could be removed during import
|
||||
if (shouldSkipProperty(p))
|
||||
continue;
|
||||
if (!firstGlobalProp)
|
||||
firstGlobalProp = p;
|
||||
else if (!secondGlobalProp)
|
||||
secondGlobalProp = p;
|
||||
lastGlobalProp = p;
|
||||
}
|
||||
return lastGlobalProp;
|
||||
}
|
||||
|
||||
var impt = systemJSPrototype.import;
|
||||
systemJSPrototype.import = function (id, parentUrl, meta) {
|
||||
noteGlobalProps();
|
||||
return impt.call(this, id, parentUrl, meta);
|
||||
};
|
||||
|
||||
var emptyInstantiation = [[], function () { return {} }];
|
||||
|
||||
var getRegister = systemJSPrototype.getRegister;
|
||||
systemJSPrototype.getRegister = function () {
|
||||
var lastRegister = getRegister.call(this);
|
||||
if (lastRegister)
|
||||
return lastRegister;
|
||||
|
||||
// no registration -> attempt a global detection as difference from snapshot
|
||||
// when multiple globals, we take the global value to be the last defined new global object property
|
||||
// for performance, this will not support multi-version / global collisions as previous SystemJS versions did
|
||||
// note in Edge, deleting and re-adding a global does not change its ordering
|
||||
var globalProp = getGlobalProp(this.firstGlobalProp);
|
||||
if (!globalProp)
|
||||
return emptyInstantiation;
|
||||
|
||||
var globalExport;
|
||||
try {
|
||||
globalExport = global[globalProp];
|
||||
}
|
||||
catch (e) {
|
||||
return emptyInstantiation;
|
||||
}
|
||||
|
||||
return [[], function (_export) {
|
||||
return {
|
||||
execute: function () {
|
||||
_export(globalExport);
|
||||
_export({ default: globalExport, __useDefault: true });
|
||||
}
|
||||
};
|
||||
}];
|
||||
};
|
||||
|
||||
var isIE11 = typeof navigator !== 'undefined' && navigator.userAgent.indexOf('Trident') !== -1;
|
||||
|
||||
function shouldSkipProperty(p) {
|
||||
return !global.hasOwnProperty(p)
|
||||
|| !isNaN(p) && p < global.length
|
||||
|| isIE11 && global[p] && typeof window !== 'undefined' && global[p].parent === window;
|
||||
}
|
||||
})(typeof self !== 'undefined' ? self : global);
|
||||
|
||||
})();
|
||||
2
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/global.min.js
generated
vendored
Normal file
2
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/global.min.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
!function(t){function n(n){return!t.hasOwnProperty(n)||!isNaN(n)&&n<t.length||c&&t[n]&&"undefined"!=typeof window&&t[n].parent===window}var r,e,i,o=t.System.constructor.prototype,u=o.import;o.import=function(o,f,a){return function(){for(var o in r=e=void 0,t)n(o)||(r?e||(e=o):r=o,i=o)}(),u.call(this,o,f,a)};var f=[[],function(){return{}}],a=o.getRegister;o.getRegister=function(){var o=a.call(this);if(o)return o;var u,c=function(o){var u,f,a=0;for(var c in t)if(!n(c)){if(0===a&&c!==r||1===a&&c!==e)return c;u?(i=c,f=o&&f||c):u=c===i,a++}return f}(this.firstGlobalProp);if(!c)return f;try{u=t[c]}catch(s){return f}return[[],function(t){return{execute:function(){t(u),t({default:u,__useDefault:!0})}}}]};var c="undefined"!=typeof navigator&&-1!==navigator.userAgent.indexOf("Trident")}("undefined"!=typeof self?self:global);
|
||||
//# sourceMappingURL=global.min.js.map
|
||||
1
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/global.min.js.map
generated
vendored
Normal file
1
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/global.min.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
191
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/module-types.js
generated
vendored
Normal file
191
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/module-types.js
generated
vendored
Normal file
@@ -0,0 +1,191 @@
|
||||
(function () {
|
||||
|
||||
var hasDocument = typeof document !== 'undefined';
|
||||
|
||||
var baseUrl;
|
||||
|
||||
if (hasDocument) {
|
||||
var baseEl = document.querySelector('base[href]');
|
||||
if (baseEl)
|
||||
baseUrl = baseEl.href;
|
||||
}
|
||||
|
||||
if (!baseUrl && typeof location !== 'undefined') {
|
||||
baseUrl = location.href.split('#')[0].split('?')[0];
|
||||
var lastSepIndex = baseUrl.lastIndexOf('/');
|
||||
if (lastSepIndex !== -1)
|
||||
baseUrl = baseUrl.slice(0, lastSepIndex + 1);
|
||||
}
|
||||
|
||||
var backslashRegEx = /\\/g;
|
||||
function resolveIfNotPlainOrUrl (relUrl, parentUrl) {
|
||||
if (relUrl.indexOf('\\') !== -1)
|
||||
relUrl = relUrl.replace(backslashRegEx, '/');
|
||||
// protocol-relative
|
||||
if (relUrl[0] === '/' && relUrl[1] === '/') {
|
||||
return parentUrl.slice(0, parentUrl.indexOf(':') + 1) + relUrl;
|
||||
}
|
||||
// relative-url
|
||||
else if (relUrl[0] === '.' && (relUrl[1] === '/' || relUrl[1] === '.' && (relUrl[2] === '/' || relUrl.length === 2 && (relUrl += '/')) ||
|
||||
relUrl.length === 1 && (relUrl += '/')) ||
|
||||
relUrl[0] === '/') {
|
||||
var parentProtocol = parentUrl.slice(0, parentUrl.indexOf(':') + 1);
|
||||
// Disabled, but these cases will give inconsistent results for deep backtracking
|
||||
//if (parentUrl[parentProtocol.length] !== '/')
|
||||
// throw Error('Cannot resolve');
|
||||
// read pathname from parent URL
|
||||
// pathname taken to be part after leading "/"
|
||||
var pathname;
|
||||
if (parentUrl[parentProtocol.length + 1] === '/') {
|
||||
// resolving to a :// so we need to read out the auth and host
|
||||
if (parentProtocol !== 'file:') {
|
||||
pathname = parentUrl.slice(parentProtocol.length + 2);
|
||||
pathname = pathname.slice(pathname.indexOf('/') + 1);
|
||||
}
|
||||
else {
|
||||
pathname = parentUrl.slice(8);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// resolving to :/ so pathname is the /... part
|
||||
pathname = parentUrl.slice(parentProtocol.length + (parentUrl[parentProtocol.length] === '/'));
|
||||
}
|
||||
|
||||
if (relUrl[0] === '/')
|
||||
return parentUrl.slice(0, parentUrl.length - pathname.length - 1) + relUrl;
|
||||
|
||||
// join together and split for removal of .. and . segments
|
||||
// looping the string instead of anything fancy for perf reasons
|
||||
// '../../../../../z' resolved to 'x/y' is just 'z'
|
||||
var segmented = pathname.slice(0, pathname.lastIndexOf('/') + 1) + relUrl;
|
||||
|
||||
var output = [];
|
||||
var segmentIndex = -1;
|
||||
for (var i = 0; i < segmented.length; i++) {
|
||||
// busy reading a segment - only terminate on '/'
|
||||
if (segmentIndex !== -1) {
|
||||
if (segmented[i] === '/') {
|
||||
output.push(segmented.slice(segmentIndex, i + 1));
|
||||
segmentIndex = -1;
|
||||
}
|
||||
}
|
||||
|
||||
// new segment - check if it is relative
|
||||
else if (segmented[i] === '.') {
|
||||
// ../ segment
|
||||
if (segmented[i + 1] === '.' && (segmented[i + 2] === '/' || i + 2 === segmented.length)) {
|
||||
output.pop();
|
||||
i += 2;
|
||||
}
|
||||
// ./ segment
|
||||
else if (segmented[i + 1] === '/' || i + 1 === segmented.length) {
|
||||
i += 1;
|
||||
}
|
||||
else {
|
||||
// the start of a new segment as below
|
||||
segmentIndex = i;
|
||||
}
|
||||
}
|
||||
// it is the start of a new segment
|
||||
else {
|
||||
segmentIndex = i;
|
||||
}
|
||||
}
|
||||
// finish reading out the last segment
|
||||
if (segmentIndex !== -1)
|
||||
output.push(segmented.slice(segmentIndex));
|
||||
return parentUrl.slice(0, parentUrl.length - pathname.length) + output.join('');
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Import maps implementation
|
||||
*
|
||||
* To make lookups fast we pre-resolve the entire import map
|
||||
* and then match based on backtracked hash lookups
|
||||
*
|
||||
*/
|
||||
|
||||
function resolveUrl (relUrl, parentUrl) {
|
||||
return resolveIfNotPlainOrUrl(relUrl, parentUrl) || (relUrl.indexOf(':') !== -1 ? relUrl : resolveIfNotPlainOrUrl('./' + relUrl, parentUrl));
|
||||
}
|
||||
|
||||
/*
|
||||
* Loads JSON, CSS, Wasm module types based on file extension
|
||||
* filters and content type verifications
|
||||
*/
|
||||
(function(global) {
|
||||
var systemJSPrototype = global.System.constructor.prototype;
|
||||
|
||||
var moduleTypesRegEx = /^[^#?]+\.(css|html|json|wasm)([?#].*)?$/;
|
||||
var _shouldFetch = systemJSPrototype.shouldFetch.bind(systemJSPrototype);
|
||||
systemJSPrototype.shouldFetch = function (url) {
|
||||
return _shouldFetch(url) || moduleTypesRegEx.test(url);
|
||||
};
|
||||
|
||||
var jsonContentType = /^application\/json(;|$)/;
|
||||
var cssContentType = /^text\/css(;|$)/;
|
||||
var wasmContentType = /^application\/wasm(;|$)/;
|
||||
|
||||
var fetch = systemJSPrototype.fetch;
|
||||
systemJSPrototype.fetch = function (url, options) {
|
||||
return fetch(url, options)
|
||||
.then(function (res) {
|
||||
if (options.passThrough)
|
||||
return res;
|
||||
|
||||
if (!res.ok)
|
||||
return res;
|
||||
var contentType = res.headers.get('content-type');
|
||||
if (jsonContentType.test(contentType))
|
||||
return res.json()
|
||||
.then(function (json) {
|
||||
return new Response(new Blob([
|
||||
'System.register([],function(e){return{execute:function(){e("default",' + JSON.stringify(json) + ')}}})'
|
||||
], {
|
||||
type: 'application/javascript'
|
||||
}));
|
||||
});
|
||||
if (cssContentType.test(contentType))
|
||||
return res.text()
|
||||
.then(function (source) {
|
||||
source = source.replace(/url\(\s*(?:(["'])((?:\\.|[^\n\\"'])+)\1|((?:\\.|[^\s,"'()\\])+))\s*\)/g, function (match, quotes, relUrl1, relUrl2) {
|
||||
return 'url(' + quotes + resolveUrl(relUrl1 || relUrl2, url) + quotes + ')';
|
||||
});
|
||||
return new Response(new Blob([
|
||||
'System.register([],function(e){return{execute:function(){var s=new CSSStyleSheet();s.replaceSync(' + JSON.stringify(source) + ');e("default",s)}}})'
|
||||
], {
|
||||
type: 'application/javascript'
|
||||
}));
|
||||
});
|
||||
if (wasmContentType.test(contentType))
|
||||
return (WebAssembly.compileStreaming ? WebAssembly.compileStreaming(res) : res.arrayBuffer().then(WebAssembly.compile))
|
||||
.then(function (module) {
|
||||
if (!global.System.wasmModules)
|
||||
global.System.wasmModules = Object.create(null);
|
||||
global.System.wasmModules[url] = module;
|
||||
// we can only set imports if supported (eg early Safari doesnt support)
|
||||
var deps = [];
|
||||
var setterSources = [];
|
||||
if (WebAssembly.Module.imports)
|
||||
WebAssembly.Module.imports(module).forEach(function (impt) {
|
||||
var key = JSON.stringify(impt.module);
|
||||
if (deps.indexOf(key) === -1) {
|
||||
deps.push(key);
|
||||
setterSources.push('function(m){i[' + key + ']=m}');
|
||||
}
|
||||
});
|
||||
return new Response(new Blob([
|
||||
'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)})}}})'
|
||||
], {
|
||||
type: 'application/javascript'
|
||||
}));
|
||||
});
|
||||
return res;
|
||||
});
|
||||
};
|
||||
})(typeof self !== 'undefined' ? self : global);
|
||||
|
||||
})();
|
||||
2
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/module-types.min.js
generated
vendored
Normal file
2
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/module-types.min.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
!function(){function e(e,t){if(-1!==e.indexOf("\\")&&(e=e.replace(i,"/")),"/"===e[0]&&"/"===e[1])return t.slice(0,t.indexOf(":")+1)+e;if("."===e[0]&&("/"===e[1]||"."===e[1]&&("/"===e[2]||2===e.length&&(e+="/"))||1===e.length&&(e+="/"))||"/"===e[0]){var n,s=t.slice(0,t.indexOf(":")+1);if(n="/"===t[s.length+1]?"file:"!==s?(n=t.slice(s.length+2)).slice(n.indexOf("/")+1):t.slice(8):t.slice(s.length+("/"===t[s.length])),"/"===e[0])return t.slice(0,t.length-n.length-1)+e;for(var r=n.slice(0,n.lastIndexOf("/")+1)+e,l=[],o=-1,c=0;c<r.length;c++)-1!==o?"/"===r[c]&&(l.push(r.slice(o,c+1)),o=-1):"."===r[c]?"."!==r[c+1]||"/"!==r[c+2]&&c+2!==r.length?"/"===r[c+1]||c+1===r.length?c+=1:o=c:(l.pop(),c+=2):o=c;return-1!==o&&l.push(r.slice(o)),t.slice(0,t.length-n.length)+l.join("")}}var t;if("undefined"!=typeof document){var n=document.querySelector("base[href]");n&&(t=n.href)}if(!t&&"undefined"!=typeof location){var s=(t=location.href.split("#")[0].split("?")[0]).lastIndexOf("/");-1!==s&&(t=t.slice(0,s+1))}var i=/\\/g;!function(t){var n=t.System.constructor.prototype,s=/^[^#?]+\.(css|html|json|wasm)([?#].*)?$/,i=n.shouldFetch.bind(n);n.shouldFetch=function(e){return i(e)||s.test(e)};var r=/^application\/json(;|$)/,l=/^text\/css(;|$)/,o=/^application\/wasm(;|$)/,c=n.fetch;n.fetch=function(n,s){return c(n,s).then((function(i){if(s.passThrough)return i;if(!i.ok)return i;var c=i.headers.get("content-type");return r.test(c)?i.json().then((function(e){return new Response(new Blob(['System.register([],function(e){return{execute:function(){e("default",'+JSON.stringify(e)+")}}})"],{type:"application/javascript"}))})):l.test(c)?i.text().then((function(t){return t=t.replace(/url\(\s*(?:(["'])((?:\\.|[^\n\\"'])+)\1|((?:\\.|[^\s,"'()\\])+))\s*\)/g,(function(t,s,i,r){return"url("+s+(e(l=i||r,o=n)||(-1!==l.indexOf(":")?l:e("./"+l,o)))+s+")";var l,o})),new Response(new Blob(["System.register([],function(e){return{execute:function(){var s=new CSSStyleSheet();s.replaceSync("+JSON.stringify(t)+');e("default",s)}}})'],{type:"application/javascript"}))})):o.test(c)?(WebAssembly.compileStreaming?WebAssembly.compileStreaming(i):i.arrayBuffer().then(WebAssembly.compile)).then((function(e){t.System.wasmModules||(t.System.wasmModules=Object.create(null)),t.System.wasmModules[n]=e;var s=[],i=[];return WebAssembly.Module.imports&&WebAssembly.Module.imports(e).forEach((function(e){var t=JSON.stringify(e.module);-1===s.indexOf(t)&&(s.push(t),i.push("function(m){i["+t+"]=m}"))})),new Response(new Blob(["System.register(["+s.join(",")+"],function(e){var i={};return{setters:["+i.join(",")+"],execute:function(){return WebAssembly.instantiate(System.wasmModules["+JSON.stringify(n)+"],i).then(function(m){e(m.exports)})}}})"],{type:"application/javascript"}))})):i}))}}("undefined"!=typeof self?self:global)}();
|
||||
//# sourceMappingURL=module-types.min.js.map
|
||||
1
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/module-types.min.js.map
generated
vendored
Normal file
1
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/module-types.min.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
67
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/named-exports.js
generated
vendored
Normal file
67
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/named-exports.js
generated
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
(function () {
|
||||
|
||||
/*
|
||||
* Named exports support for legacy module formats in SystemJS 2.0
|
||||
*
|
||||
* Note: This extra is deprecated as the behaviour is now the default in core,
|
||||
* so will be removed in the next major.
|
||||
*/
|
||||
(function (global) {
|
||||
var systemJSPrototype = global.System.constructor.prototype;
|
||||
|
||||
// hook System.register to know the last declaration binding
|
||||
var lastRegisterDeclare;
|
||||
var systemRegister = systemJSPrototype.register;
|
||||
systemJSPrototype.register = function (name, deps, declare) {
|
||||
lastRegisterDeclare = typeof name === 'string' ? declare : deps;
|
||||
systemRegister.apply(this, arguments);
|
||||
};
|
||||
|
||||
var getRegister = systemJSPrototype.getRegister;
|
||||
systemJSPrototype.getRegister = function () {
|
||||
var register = getRegister.call(this);
|
||||
// if it is an actual System.register call, then its ESM
|
||||
// -> dont add named exports
|
||||
if (!register || register[1] === lastRegisterDeclare || register[1].length === 0)
|
||||
return register;
|
||||
|
||||
// otherwise it was provided by a custom instantiator
|
||||
// -> extend the registration with named exports support
|
||||
var registerDeclare = register[1];
|
||||
register[1] = function (_export, _context) {
|
||||
// hook the _export function to note the default export
|
||||
var defaultExport, hasDefaultExport = false;
|
||||
var declaration = registerDeclare.call(this, function (name, value) {
|
||||
if (typeof name === 'object' && name && name.__useDefault)
|
||||
defaultExport = name.default, hasDefaultExport = true;
|
||||
else if (name === 'default')
|
||||
defaultExport = value;
|
||||
else if (name === '__useDefault')
|
||||
hasDefaultExport = true;
|
||||
_export(name, value);
|
||||
}, _context);
|
||||
// hook the execute function
|
||||
var execute = declaration.execute;
|
||||
if (execute)
|
||||
declaration.execute = function () {
|
||||
execute.call(this);
|
||||
// do a bulk export of the default export object
|
||||
// to export all its names as named exports
|
||||
|
||||
if (hasDefaultExport)
|
||||
for (var exportName in defaultExport) {
|
||||
if (
|
||||
Object.prototype.hasOwnProperty.call(defaultExport, exportName) // Check if epoxrt name is not inherited, safe for Object.create(null)
|
||||
&& exportName !== 'default' // default is not a named export
|
||||
) {
|
||||
_export(exportName, defaultExport[exportName]);
|
||||
}
|
||||
}
|
||||
};
|
||||
return declaration;
|
||||
};
|
||||
return register;
|
||||
};
|
||||
})(typeof self !== 'undefined' ? self : global);
|
||||
|
||||
})();
|
||||
2
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/named-exports.min.js
generated
vendored
Normal file
2
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/named-exports.min.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
!function(t){var e,r=t.System.constructor.prototype,n=r.register;r.register=function(t,r,f){e="string"==typeof t?f:r,n.apply(this,arguments)};var f=r.getRegister;r.getRegister=function(){var t=f.call(this);if(!t||t[1]===e||0===t[1].length)return t;var r=t[1];return t[1]=function(t,e){var n,f=!1,u=r.call(this,(function(e,r){"object"==typeof e&&e&&e.__useDefault?(n=e.default,f=!0):"default"===e?n=r:"__useDefault"===e&&(f=!0),t(e,r)}),e),i=u.execute;return i&&(u.execute=function(){if(i.call(this),f)for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&"default"!==e&&t(e,n[e])}),u},t}}("undefined"!=typeof self?self:global);
|
||||
//# sourceMappingURL=named-exports.min.js.map
|
||||
1
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/named-exports.min.js.map
generated
vendored
Normal file
1
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/named-exports.min.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"##.min.js","names":["global","lastRegisterDeclare","systemJSPrototype","System","constructor","prototype","systemRegister","register","name","deps","declare","apply","this","arguments","getRegister","call","length","registerDeclare","_export","_context","defaultExport","hasDefaultExport","declaration","value","__useDefault","default","execute","exportName","Object","hasOwnProperty","self"],"sources":["named-exports.js"],"sourcesContent":["(function () {\n\n /*\n * Named exports support for legacy module formats in SystemJS 2.0\n * \n * Note: This extra is deprecated as the behaviour is now the default in core,\n * so will be removed in the next major.\n */\n (function (global) {\n var systemJSPrototype = global.System.constructor.prototype;\n\n // hook System.register to know the last declaration binding\n var lastRegisterDeclare;\n var systemRegister = systemJSPrototype.register;\n systemJSPrototype.register = function (name, deps, declare) {\n lastRegisterDeclare = typeof name === 'string' ? declare : deps;\n systemRegister.apply(this, arguments);\n };\n\n var getRegister = systemJSPrototype.getRegister;\n systemJSPrototype.getRegister = function () {\n var register = getRegister.call(this);\n // if it is an actual System.register call, then its ESM\n // -> dont add named exports\n if (!register || register[1] === lastRegisterDeclare || register[1].length === 0)\n return register;\n\n // otherwise it was provided by a custom instantiator\n // -> extend the registration with named exports support\n var registerDeclare = register[1];\n register[1] = function (_export, _context) {\n // hook the _export function to note the default export\n var defaultExport, hasDefaultExport = false;\n var declaration = registerDeclare.call(this, function (name, value) {\n if (typeof name === 'object' && name && name.__useDefault)\n defaultExport = name.default, hasDefaultExport = true;\n else if (name === 'default')\n defaultExport = value;\n else if (name === '__useDefault')\n hasDefaultExport = true;\n _export(name, value);\n }, _context);\n // hook the execute function\n var execute = declaration.execute;\n if (execute)\n declaration.execute = function () {\n execute.call(this);\n // do a bulk export of the default export object\n // to export all its names as named exports\n\n if (hasDefaultExport)\n for (var exportName in defaultExport) {\n if (\n Object.prototype.hasOwnProperty.call(defaultExport, exportName) // Check if epoxrt name is not inherited, safe for Object.create(null)\n && exportName !== 'default' // default is not a named export\n ) {\n _export(exportName, defaultExport[exportName]);\n }\n }\n };\n return declaration;\n };\n return register;\n };\n })(typeof self !== 'undefined' ? self : global);\n\n})();\n"],"mappings":"CAQE,SAAWA,GACT,IAGIC,EAHAC,EAAoBF,EAAOG,OAAOC,YAAYC,UAI9CC,EAAiBJ,EAAkBK,SACvCL,EAAkBK,SAAW,SAAUC,EAAMC,EAAMC,GACjDT,EAAsC,iBAATO,EAAoBE,EAAUD,EAC3DH,EAAeK,MAAMC,KAAMC,UAC7B,EAEA,IAAIC,EAAcZ,EAAkBY,YACpCZ,EAAkBY,YAAc,WAC9B,IAAIP,EAAWO,EAAYC,KAAKH,MAGhC,IAAKL,GAAYA,EAAS,KAAON,GAA8C,IAAvBM,EAAS,GAAGS,OAClE,OAAOT,EAIT,IAAIU,EAAkBV,EAAS,GAiC/B,OAhCAA,EAAS,GAAK,SAAUW,EAASC,GAE/B,IAAIC,EAAeC,GAAmB,EAClCC,EAAcL,EAAgBF,KAAKH,MAAM,SAAUJ,EAAMe,GACvC,iBAATf,GAAqBA,GAAQA,EAAKgB,cAC3CJ,EAAgBZ,EAAKiB,QAASJ,GAAmB,GACjC,YAATb,EACPY,EAAgBG,EACA,iBAATf,IACPa,GAAmB,GACrBH,EAAQV,EAAMe,EAChB,GAAGJ,GAECO,EAAUJ,EAAYI,QAiB1B,OAhBIA,IACFJ,EAAYI,QAAU,WAKpB,GAJAA,EAAQX,KAAKH,MAITS,EACF,IAAK,IAAIM,KAAcP,EAEnBQ,OAAOvB,UAAUwB,eAAed,KAAKK,EAAgBO,IACnC,YAAfA,GAEHT,EAAQS,EAAYP,EAAcO,GAG1C,GACKL,CACT,EACOf,CACT,CACD,CAxDD,CAwDmB,oBAATuB,KAAuBA,KAAO9B"}
|
||||
85
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/named-register.js
generated
vendored
Normal file
85
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/named-register.js
generated
vendored
Normal file
@@ -0,0 +1,85 @@
|
||||
(function () {
|
||||
|
||||
/*
|
||||
* SystemJS named register extension
|
||||
* Supports System.register('name', [..deps..], function (_export, _context) { ... })
|
||||
*
|
||||
* Names are written to the registry as-is
|
||||
* System.register('x', ...) can be imported as System.import('x')
|
||||
*/
|
||||
(function (global) {
|
||||
var System = global.System;
|
||||
setRegisterRegistry(System);
|
||||
var systemJSPrototype = System.constructor.prototype;
|
||||
var constructor = System.constructor;
|
||||
var SystemJS = function () {
|
||||
constructor.call(this);
|
||||
setRegisterRegistry(this);
|
||||
};
|
||||
SystemJS.prototype = systemJSPrototype;
|
||||
System.constructor = SystemJS;
|
||||
|
||||
var firstNamedDefine, firstName;
|
||||
|
||||
function setRegisterRegistry(systemInstance) {
|
||||
systemInstance.registerRegistry = Object.create(null);
|
||||
systemInstance.namedRegisterAliases = Object.create(null);
|
||||
}
|
||||
|
||||
var register = systemJSPrototype.register;
|
||||
systemJSPrototype.register = function (name, deps, declare, metas) {
|
||||
if (typeof name !== 'string')
|
||||
return register.apply(this, arguments);
|
||||
var define = [deps, declare, metas];
|
||||
this.registerRegistry[name] = define;
|
||||
if (!firstNamedDefine) {
|
||||
firstNamedDefine = define;
|
||||
firstName = name;
|
||||
}
|
||||
Promise.resolve().then(function () {
|
||||
firstNamedDefine = null;
|
||||
firstName = null;
|
||||
});
|
||||
return register.apply(this, [deps, declare, metas]);
|
||||
};
|
||||
|
||||
var resolve = systemJSPrototype.resolve;
|
||||
systemJSPrototype.resolve = function (id, parentURL) {
|
||||
try {
|
||||
// Prefer import map (or other existing) resolution over the registerRegistry
|
||||
return resolve.call(this, id, parentURL);
|
||||
} catch (err) {
|
||||
if (id in this.registerRegistry) {
|
||||
return this.namedRegisterAliases[id] || id;
|
||||
}
|
||||
throw err;
|
||||
}
|
||||
};
|
||||
|
||||
var instantiate = systemJSPrototype.instantiate;
|
||||
systemJSPrototype.instantiate = function (url, firstParentUrl, meta) {
|
||||
var result = this.registerRegistry[url];
|
||||
if (result) {
|
||||
this.registerRegistry[url] = null;
|
||||
return result;
|
||||
} else {
|
||||
return instantiate.call(this, url, firstParentUrl, meta);
|
||||
}
|
||||
};
|
||||
|
||||
var getRegister = systemJSPrototype.getRegister;
|
||||
systemJSPrototype.getRegister = function (url) {
|
||||
// Calling getRegister() because other extras need to know it was called so they can perform side effects
|
||||
var register = getRegister.call(this, url);
|
||||
|
||||
if (firstName && url) {
|
||||
this.namedRegisterAliases[firstName] = url;
|
||||
}
|
||||
var result = firstNamedDefine || register;
|
||||
firstNamedDefine = null;
|
||||
firstName = null;
|
||||
return result;
|
||||
};
|
||||
})(typeof self !== 'undefined' ? self : global);
|
||||
|
||||
})();
|
||||
2
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/named-register.min.js
generated
vendored
Normal file
2
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/named-register.min.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
!function(t){function e(t){t.registerRegistry=Object.create(null),t.namedRegisterAliases=Object.create(null)}var r=t.System;e(r);var i,s,n=r.constructor.prototype,l=r.constructor,a=function(){l.call(this),e(this)};a.prototype=n,r.constructor=a;var o=n.register;n.register=function(t,e,r,n){if("string"!=typeof t)return o.apply(this,arguments);var l=[e,r,n];return this.registerRegistry[t]=l,i||(i=l,s=t),Promise.resolve().then((function(){i=null,s=null})),o.call(this,e,r,n)};var c=n.resolve;n.resolve=function(t,e){try{return c.call(this,t,e)}catch(r){if(t in this.registerRegistry)return this.namedRegisterAliases[t]||t;throw r}};var u=n.instantiate;n.instantiate=function(t,e,r){var i=this.registerRegistry[t];return i?(this.registerRegistry[t]=null,i):u.call(this,t,e,r)};var g=n.getRegister;n.getRegister=function(t){var e=g.call(this,t);s&&t&&(this.namedRegisterAliases[s]=t);var r=i||e;return i=null,s=null,r}}("undefined"!=typeof self?self:global);
|
||||
//# sourceMappingURL=named-register.min.js.map
|
||||
1
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/named-register.min.js.map
generated
vendored
Normal file
1
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/named-register.min.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"##.min.js","names":["global","setRegisterRegistry","systemInstance","registerRegistry","Object","create","namedRegisterAliases","System","firstNamedDefine","firstName","systemJSPrototype","constructor","prototype","SystemJS","call","this","register","name","deps","declare","metas","apply","arguments","define","Promise","resolve","then","id","parentURL","err","instantiate","url","firstParentUrl","meta","result","getRegister","self"],"sources":["named-register.js"],"sourcesContent":["(function () {\n\n /*\n * SystemJS named register extension\n * Supports System.register('name', [..deps..], function (_export, _context) { ... })\n *\n * Names are written to the registry as-is\n * System.register('x', ...) can be imported as System.import('x')\n */\n (function (global) {\n var System = global.System;\n setRegisterRegistry(System);\n var systemJSPrototype = System.constructor.prototype;\n var constructor = System.constructor;\n var SystemJS = function () {\n constructor.call(this);\n setRegisterRegistry(this);\n };\n SystemJS.prototype = systemJSPrototype;\n System.constructor = SystemJS;\n\n var firstNamedDefine, firstName;\n\n function setRegisterRegistry(systemInstance) {\n systemInstance.registerRegistry = Object.create(null);\n systemInstance.namedRegisterAliases = Object.create(null);\n }\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\n var resolve = systemJSPrototype.resolve;\n systemJSPrototype.resolve = function (id, parentURL) {\n try {\n // Prefer import map (or other existing) resolution over the registerRegistry\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\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\n var getRegister = systemJSPrototype.getRegister;\n systemJSPrototype.getRegister = function (url) {\n // Calling getRegister() because other extras need to know it was called so they can perform side effects\n var register = getRegister.call(this, url);\n\n if (firstName && url) {\n this.namedRegisterAliases[firstName] = url;\n }\n var result = firstNamedDefine || register;\n firstNamedDefine = null;\n firstName = null;\n return result;\n };\n })(typeof self !== 'undefined' ? self : global);\n\n})();\n"],"mappings":"CASE,SAAWA,GAcT,SAASC,EAAoBC,GAC3BA,EAAeC,iBAAmBC,OAAOC,OAAO,MAChDH,EAAeI,qBAAuBF,OAAOC,OAAO,KACtD,CAhBA,IAAIE,EAASP,EAAOO,OACpBN,EAAoBM,GACpB,IASIC,EAAkBC,EATlBC,EAAoBH,EAAOI,YAAYC,UACvCD,EAAcJ,EAAOI,YACrBE,EAAW,WACbF,EAAYG,KAAKC,MACjBd,EAAoBc,KACtB,EACAF,EAASD,UAAYF,EACrBH,EAAOI,YAAcE,EASrB,IAAIG,EAAWN,EAAkBM,SACjCN,EAAkBM,SAAW,SAAUC,EAAMC,EAAMC,EAASC,GAC1D,GAAoB,iBAATH,EACT,OAAOD,EAASK,MAAMN,KAAMO,WAC9B,IAAIC,EAAS,CAACL,EAAMC,EAASC,GAU7B,OATAL,KAAKZ,iBAAiBc,GAAQM,EACzBf,IACHA,EAAmBe,EACnBd,EAAYQ,GAEdO,QAAQC,UAAUC,MAAK,WACrBlB,EAAmB,KACnBC,EAAY,IACd,IACOO,EAASK,KAAMN,KAAOG,EAAMC,EAASC,EAC9C,EAEA,IAAIK,EAAUf,EAAkBe,QAChCf,EAAkBe,QAAU,SAAUE,EAAIC,GACxC,IAEE,OAAOH,EAAQX,KAAKC,KAAMY,EAAIC,EAChC,CAAE,MAAOC,GACP,GAAIF,KAAMZ,KAAKZ,iBACb,OAAOY,KAAKT,qBAAqBqB,IAAOA,EAE1C,MAAME,CACR,CACF,EAEA,IAAIC,EAAcpB,EAAkBoB,YACpCpB,EAAkBoB,YAAc,SAAUC,EAAKC,EAAgBC,GAC7D,IAAIC,EAASnB,KAAKZ,iBAAiB4B,GACnC,OAAIG,GACFnB,KAAKZ,iBAAiB4B,GAAO,KACtBG,GAEAJ,EAAYhB,KAAKC,KAAMgB,EAAKC,EAAgBC,EAEvD,EAEA,IAAIE,EAAczB,EAAkByB,YACpCzB,EAAkByB,YAAc,SAAUJ,GAExC,IAAIf,EAAWmB,EAAYrB,KAAKC,KAAMgB,GAElCtB,GAAasB,IACfhB,KAAKT,qBAAqBG,GAAasB,GAEzC,IAAIG,EAAS1B,GAAoBQ,EAGjC,OAFAR,EAAmB,KACnBC,EAAY,KACLyB,CACT,CACD,CAzED,CAyEmB,oBAATE,KAAuBA,KAAOpC"}
|
||||
42
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/transform.js
generated
vendored
Normal file
42
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/transform.js
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
(function () {
|
||||
|
||||
function errMsg(errCode, msg) {
|
||||
return (msg || "") + " (SystemJS Error#" + errCode + " " + "https://github.com/systemjs/systemjs/blob/main/docs/errors.md#" + errCode + ")";
|
||||
}
|
||||
|
||||
/*
|
||||
* Support for a "transform" loader interface
|
||||
*
|
||||
* Note: This extra is deprecated and will be removed in the next major.
|
||||
*/
|
||||
(function (global) {
|
||||
var systemJSPrototype = global.System.constructor.prototype;
|
||||
|
||||
var instantiate = systemJSPrototype.instantiate;
|
||||
systemJSPrototype.instantiate = function (url, parent, meta) {
|
||||
if (url.slice(-5) === '.wasm')
|
||||
return instantiate.call(this, url, parent, meta);
|
||||
|
||||
var loader = this;
|
||||
return fetch(url, { credentials: 'same-origin' })
|
||||
.then(function (res) {
|
||||
if (!res.ok)
|
||||
throw Error(errMsg(7, 'Fetch error: ' + res.status + ' ' + res.statusText + (parent ? ' loading from ' + parent : '')));
|
||||
return res.text();
|
||||
})
|
||||
.then(function (source) {
|
||||
return loader.transform.call(this, url, source);
|
||||
})
|
||||
.then(function (source) {
|
||||
(0, eval)(source + '\n//# sourceURL=' + url);
|
||||
return loader.getRegister(url);
|
||||
});
|
||||
};
|
||||
|
||||
// Hookable transform function!
|
||||
systemJSPrototype.transform = function (_id, source) {
|
||||
return source;
|
||||
};
|
||||
})(typeof self !== 'undefined' ? self : global);
|
||||
|
||||
})();
|
||||
2
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/transform.min.js
generated
vendored
Normal file
2
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/transform.min.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
!function(t){var r=t.System.constructor.prototype,e=r.instantiate;r.instantiate=function(t,r,n){if(".wasm"===t.slice(-5))return e.call(this,t,r,n);var s=this;return fetch(t,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw Error(("Fetch error: "+t.status+" "+t.statusText+(r?" loading from "+r:"")||"")+" (SystemJS Error#"+7+" https://github.com/systemjs/systemjs/blob/main/docs/errors.md#7)");return t.text()})).then((function(r){return s.transform.call(this,t,r)})).then((function(r){return(0,eval)(r+"\n//# sourceURL="+t),s.getRegister(t)}))},r.transform=function(t,r){return r}}("undefined"!=typeof self?self:global);
|
||||
//# sourceMappingURL=transform.min.js.map
|
||||
1
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/transform.min.js.map
generated
vendored
Normal file
1
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/transform.min.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"##.min.js","names":["global","systemJSPrototype","System","constructor","prototype","instantiate","url","parent","meta","slice","call","this","loader","fetch","credentials","then","res","ok","Error","status","statusText","text","source","transform","eval","getRegister","_id","self"],"sources":["transform.js"],"sourcesContent":["(function () {\n\n function errMsg(errCode, msg) {\n return (msg || \"\") + \" (SystemJS Error#\" + errCode + \" \" + \"https://github.com/systemjs/systemjs/blob/main/docs/errors.md#\" + errCode + \")\";\n }\n\n /*\n * Support for a \"transform\" loader interface\n *\n * Note: This extra is deprecated and will be removed in the next major.\n */\n (function (global) {\n var systemJSPrototype = global.System.constructor.prototype;\n\n var instantiate = systemJSPrototype.instantiate;\n systemJSPrototype.instantiate = function (url, parent, meta) {\n if (url.slice(-5) === '.wasm')\n return instantiate.call(this, url, parent, meta);\n\n var loader = this;\n return fetch(url, { credentials: 'same-origin' })\n .then(function (res) {\n if (!res.ok)\n throw Error(errMsg(7, 'Fetch error: ' + res.status + ' ' + res.statusText + (parent ? ' loading from ' + parent : '')));\n return res.text();\n })\n .then(function (source) {\n return loader.transform.call(this, url, source);\n })\n .then(function (source) {\n (0, eval)(source + '\\n//# sourceURL=' + url);\n return loader.getRegister(url);\n });\n };\n\n // Hookable transform function!\n systemJSPrototype.transform = function (_id, source) {\n return source;\n };\n })(typeof self !== 'undefined' ? self : global);\n\n})();\n"],"mappings":"CAWE,SAAWA,GACT,IAAIC,EAAoBD,EAAOE,OAAOC,YAAYC,UAE9CC,EAAcJ,EAAkBI,YACpCJ,EAAkBI,YAAc,SAAUC,EAAKC,EAAQC,GACrD,GAAsB,UAAlBF,EAAIG,OAAO,GACb,OAAOJ,EAAYK,KAAKC,KAAML,EAAKC,EAAQC,GAE7C,IAAII,EAASD,KACb,OAAOE,MAAMP,EAAK,CAAEQ,YAAa,gBAChCC,MAAK,SAAUC,GACd,IAAKA,EAAIC,GACP,MAAMC,OAAgB,gBAAkBF,EAAIG,OAAS,IAAMH,EAAII,YAAcb,EAAS,iBAAmBA,EAAS,KApBzG,IAAM,oBAoBI,EApBlB,qEAqBH,OAAOS,EAAIK,MACb,IACCN,MAAK,SAAUO,GACd,OAAOV,EAAOW,UAAUb,KAAKC,KAAML,EAAKgB,EAC1C,IACCP,MAAK,SAAUO,GAEd,OADA,EAAIE,MAAMF,EAAS,mBAAqBhB,GACjCM,EAAOa,YAAYnB,EAC5B,GACF,EAGAL,EAAkBsB,UAAY,SAAUG,EAAKJ,GAC3C,OAAOA,CACT,CACD,CA5BD,CA4BmB,oBAATK,KAAuBA,KAAO3B"}
|
||||
20
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/use-default.js
generated
vendored
Normal file
20
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/use-default.js
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
(function () {
|
||||
|
||||
/*
|
||||
* Interop for AMD modules to return the direct AMD binding instead of a
|
||||
* `{ default: amdModule }` object from `System.import`
|
||||
*
|
||||
* Note: This extra is deprecated and will be removed in the next major.
|
||||
*/
|
||||
(function (global) {
|
||||
var systemJSPrototype = global.System.constructor.prototype;
|
||||
var originalImport = systemJSPrototype.import;
|
||||
|
||||
systemJSPrototype.import = function () {
|
||||
return originalImport.apply(this, arguments).then(function (ns) {
|
||||
return ns.__useDefault ? ns.default : ns;
|
||||
});
|
||||
};
|
||||
})(typeof self !== 'undefined' ? self : global);
|
||||
|
||||
})();
|
||||
2
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/use-default.min.js
generated
vendored
Normal file
2
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/use-default.min.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
!function(t){var e=t.System.constructor.prototype,n=e.import;e.import=function(){return n.apply(this,arguments).then((function(t){return t.__useDefault?t.default:t}))}}("undefined"!=typeof self?self:global);
|
||||
//# sourceMappingURL=use-default.min.js.map
|
||||
1
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/use-default.min.js.map
generated
vendored
Normal file
1
uni_modules/UniDevTools/node_modules/systemjs/dist/extras/use-default.min.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"##.min.js","names":["global","systemJSPrototype","System","constructor","prototype","originalImport","import","apply","this","arguments","then","ns","__useDefault","default","self"],"sources":["use-default.js"],"sourcesContent":["(function () {\n\n /*\n * Interop for AMD modules to return the direct AMD binding instead of a\n * `{ default: amdModule }` object from `System.import`\n * \n * Note: This extra is deprecated and will be removed in the next major.\n */\n (function (global) {\n var systemJSPrototype = global.System.constructor.prototype;\n var originalImport = systemJSPrototype.import;\n\n systemJSPrototype.import = function () {\n return originalImport.apply(this, arguments).then(function (ns) {\n return ns.__useDefault ? ns.default : ns;\n });\n };\n })(typeof self !== 'undefined' ? self : global);\n\n})();\n"],"mappings":"CAQE,SAAWA,GACT,IAAIC,EAAoBD,EAAOE,OAAOC,YAAYC,UAC9CC,EAAiBJ,EAAkBK,OAEvCL,EAAkBK,OAAS,WACzB,OAAOD,EAAeE,MAAMC,KAAMC,WAAWC,MAAK,SAAUC,GAC1D,OAAOA,EAAGC,aAAeD,EAAGE,QAAUF,CACxC,GACF,CACD,CATD,CASmB,oBAATG,KAAuBA,KAAOd"}
|
||||
739
uni_modules/UniDevTools/node_modules/systemjs/dist/s.js
generated
vendored
Normal file
739
uni_modules/UniDevTools/node_modules/systemjs/dist/s.js
generated
vendored
Normal file
@@ -0,0 +1,739 @@
|
||||
/*!
|
||||
* SJS 6.14.1
|
||||
*/
|
||||
(function () {
|
||||
|
||||
function errMsg(errCode, msg) {
|
||||
return (msg || "") + " (SystemJS https://github.com/systemjs/systemjs/blob/main/docs/errors.md#" + errCode + ")";
|
||||
}
|
||||
|
||||
var hasSymbol = typeof Symbol !== 'undefined';
|
||||
var hasSelf = typeof self !== 'undefined';
|
||||
var hasDocument = typeof document !== 'undefined';
|
||||
|
||||
var envGlobal = hasSelf ? self : global;
|
||||
|
||||
var baseUrl;
|
||||
|
||||
if (hasDocument) {
|
||||
var baseEl = document.querySelector('base[href]');
|
||||
if (baseEl)
|
||||
baseUrl = baseEl.href;
|
||||
}
|
||||
|
||||
if (!baseUrl && typeof location !== 'undefined') {
|
||||
baseUrl = location.href.split('#')[0].split('?')[0];
|
||||
var lastSepIndex = baseUrl.lastIndexOf('/');
|
||||
if (lastSepIndex !== -1)
|
||||
baseUrl = baseUrl.slice(0, lastSepIndex + 1);
|
||||
}
|
||||
|
||||
var backslashRegEx = /\\/g;
|
||||
function resolveIfNotPlainOrUrl (relUrl, parentUrl) {
|
||||
if (relUrl.indexOf('\\') !== -1)
|
||||
relUrl = relUrl.replace(backslashRegEx, '/');
|
||||
// protocol-relative
|
||||
if (relUrl[0] === '/' && relUrl[1] === '/') {
|
||||
return parentUrl.slice(0, parentUrl.indexOf(':') + 1) + relUrl;
|
||||
}
|
||||
// relative-url
|
||||
else if (relUrl[0] === '.' && (relUrl[1] === '/' || relUrl[1] === '.' && (relUrl[2] === '/' || relUrl.length === 2 && (relUrl += '/')) ||
|
||||
relUrl.length === 1 && (relUrl += '/')) ||
|
||||
relUrl[0] === '/') {
|
||||
var parentProtocol = parentUrl.slice(0, parentUrl.indexOf(':') + 1);
|
||||
// Disabled, but these cases will give inconsistent results for deep backtracking
|
||||
//if (parentUrl[parentProtocol.length] !== '/')
|
||||
// throw Error('Cannot resolve');
|
||||
// read pathname from parent URL
|
||||
// pathname taken to be part after leading "/"
|
||||
var pathname;
|
||||
if (parentUrl[parentProtocol.length + 1] === '/') {
|
||||
// resolving to a :// so we need to read out the auth and host
|
||||
if (parentProtocol !== 'file:') {
|
||||
pathname = parentUrl.slice(parentProtocol.length + 2);
|
||||
pathname = pathname.slice(pathname.indexOf('/') + 1);
|
||||
}
|
||||
else {
|
||||
pathname = parentUrl.slice(8);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// resolving to :/ so pathname is the /... part
|
||||
pathname = parentUrl.slice(parentProtocol.length + (parentUrl[parentProtocol.length] === '/'));
|
||||
}
|
||||
|
||||
if (relUrl[0] === '/')
|
||||
return parentUrl.slice(0, parentUrl.length - pathname.length - 1) + relUrl;
|
||||
|
||||
// join together and split for removal of .. and . segments
|
||||
// looping the string instead of anything fancy for perf reasons
|
||||
// '../../../../../z' resolved to 'x/y' is just 'z'
|
||||
var segmented = pathname.slice(0, pathname.lastIndexOf('/') + 1) + relUrl;
|
||||
|
||||
var output = [];
|
||||
var segmentIndex = -1;
|
||||
for (var i = 0; i < segmented.length; i++) {
|
||||
// busy reading a segment - only terminate on '/'
|
||||
if (segmentIndex !== -1) {
|
||||
if (segmented[i] === '/') {
|
||||
output.push(segmented.slice(segmentIndex, i + 1));
|
||||
segmentIndex = -1;
|
||||
}
|
||||
}
|
||||
|
||||
// new segment - check if it is relative
|
||||
else if (segmented[i] === '.') {
|
||||
// ../ segment
|
||||
if (segmented[i + 1] === '.' && (segmented[i + 2] === '/' || i + 2 === segmented.length)) {
|
||||
output.pop();
|
||||
i += 2;
|
||||
}
|
||||
// ./ segment
|
||||
else if (segmented[i + 1] === '/' || i + 1 === segmented.length) {
|
||||
i += 1;
|
||||
}
|
||||
else {
|
||||
// the start of a new segment as below
|
||||
segmentIndex = i;
|
||||
}
|
||||
}
|
||||
// it is the start of a new segment
|
||||
else {
|
||||
segmentIndex = i;
|
||||
}
|
||||
}
|
||||
// finish reading out the last segment
|
||||
if (segmentIndex !== -1)
|
||||
output.push(segmented.slice(segmentIndex));
|
||||
return parentUrl.slice(0, parentUrl.length - pathname.length) + output.join('');
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Import maps implementation
|
||||
*
|
||||
* To make lookups fast we pre-resolve the entire import map
|
||||
* and then match based on backtracked hash lookups
|
||||
*
|
||||
*/
|
||||
|
||||
function resolveUrl (relUrl, parentUrl) {
|
||||
return resolveIfNotPlainOrUrl(relUrl, parentUrl) || (relUrl.indexOf(':') !== -1 ? relUrl : resolveIfNotPlainOrUrl('./' + relUrl, parentUrl));
|
||||
}
|
||||
|
||||
function resolveAndComposePackages (packages, outPackages, baseUrl, parentMap, parentUrl) {
|
||||
for (var p in packages) {
|
||||
var resolvedLhs = resolveIfNotPlainOrUrl(p, baseUrl) || p;
|
||||
var rhs = packages[p];
|
||||
// package fallbacks not currently supported
|
||||
if (typeof rhs !== 'string')
|
||||
continue;
|
||||
var mapped = resolveImportMap(parentMap, resolveIfNotPlainOrUrl(rhs, baseUrl) || rhs, parentUrl);
|
||||
if (!mapped) {
|
||||
targetWarning('W1', p, rhs);
|
||||
}
|
||||
else
|
||||
outPackages[resolvedLhs] = mapped;
|
||||
}
|
||||
}
|
||||
|
||||
function resolveAndComposeImportMap (json, baseUrl, outMap) {
|
||||
if (json.imports)
|
||||
resolveAndComposePackages(json.imports, outMap.imports, baseUrl, outMap, null);
|
||||
|
||||
var u;
|
||||
for (u in json.scopes || {}) {
|
||||
var resolvedScope = resolveUrl(u, baseUrl);
|
||||
resolveAndComposePackages(json.scopes[u], outMap.scopes[resolvedScope] || (outMap.scopes[resolvedScope] = {}), baseUrl, outMap, resolvedScope);
|
||||
}
|
||||
|
||||
for (u in json.depcache || {})
|
||||
outMap.depcache[resolveUrl(u, baseUrl)] = json.depcache[u];
|
||||
|
||||
for (u in json.integrity || {})
|
||||
outMap.integrity[resolveUrl(u, baseUrl)] = json.integrity[u];
|
||||
}
|
||||
|
||||
function getMatch (path, matchObj) {
|
||||
if (matchObj[path])
|
||||
return path;
|
||||
var sepIndex = path.length;
|
||||
do {
|
||||
var segment = path.slice(0, sepIndex + 1);
|
||||
if (segment in matchObj)
|
||||
return segment;
|
||||
} while ((sepIndex = path.lastIndexOf('/', sepIndex - 1)) !== -1)
|
||||
}
|
||||
|
||||
function applyPackages (id, packages) {
|
||||
var pkgName = getMatch(id, packages);
|
||||
if (pkgName) {
|
||||
var pkg = packages[pkgName];
|
||||
if (pkg === null) return;
|
||||
if (id.length > pkgName.length && pkg[pkg.length - 1] !== '/') {
|
||||
targetWarning('W2', pkgName, pkg);
|
||||
}
|
||||
else
|
||||
return pkg + id.slice(pkgName.length);
|
||||
}
|
||||
}
|
||||
|
||||
function targetWarning (code, match, target, msg) {
|
||||
console.warn(errMsg(code, [target, match].join(', ') ));
|
||||
}
|
||||
|
||||
function resolveImportMap (importMap, resolvedOrPlain, parentUrl) {
|
||||
var scopes = importMap.scopes;
|
||||
var scopeUrl = parentUrl && getMatch(parentUrl, scopes);
|
||||
while (scopeUrl) {
|
||||
var packageResolution = applyPackages(resolvedOrPlain, scopes[scopeUrl]);
|
||||
if (packageResolution)
|
||||
return packageResolution;
|
||||
scopeUrl = getMatch(scopeUrl.slice(0, scopeUrl.lastIndexOf('/')), scopes);
|
||||
}
|
||||
return applyPackages(resolvedOrPlain, importMap.imports) || resolvedOrPlain.indexOf(':') !== -1 && resolvedOrPlain;
|
||||
}
|
||||
|
||||
/*
|
||||
* SystemJS Core
|
||||
*
|
||||
* Provides
|
||||
* - System.import
|
||||
* - System.register support for
|
||||
* live bindings, function hoisting through circular references,
|
||||
* reexports, dynamic import, import.meta.url, top-level await
|
||||
* - System.getRegister to get the registration
|
||||
* - Symbol.toStringTag support in Module objects
|
||||
* - Hookable System.createContext to customize import.meta
|
||||
* - System.onload(err, id, deps) handler for tracing / hot-reloading
|
||||
*
|
||||
* Core comes with no System.prototype.resolve or
|
||||
* System.prototype.instantiate implementations
|
||||
*/
|
||||
|
||||
var toStringTag = hasSymbol && Symbol.toStringTag;
|
||||
var REGISTRY = hasSymbol ? Symbol() : '@';
|
||||
|
||||
function SystemJS () {
|
||||
this[REGISTRY] = {};
|
||||
}
|
||||
|
||||
var systemJSPrototype = SystemJS.prototype;
|
||||
|
||||
systemJSPrototype.import = function (id, parentUrl, meta) {
|
||||
var loader = this;
|
||||
(parentUrl && typeof parentUrl === 'object') && (meta = parentUrl, parentUrl = undefined);
|
||||
return Promise.resolve(loader.prepareImport())
|
||||
.then(function() {
|
||||
return loader.resolve(id, parentUrl, meta);
|
||||
})
|
||||
.then(function (id) {
|
||||
var load = getOrCreateLoad(loader, id, undefined, meta);
|
||||
return load.C || topLevelLoad(loader, load);
|
||||
});
|
||||
};
|
||||
|
||||
// Hookable createContext function -> allowing eg custom import meta
|
||||
systemJSPrototype.createContext = function (parentId) {
|
||||
var loader = this;
|
||||
return {
|
||||
url: parentId,
|
||||
resolve: function (id, parentUrl) {
|
||||
return Promise.resolve(loader.resolve(id, parentUrl || parentId));
|
||||
}
|
||||
};
|
||||
};
|
||||
function loadToId (load) {
|
||||
return load.id;
|
||||
}
|
||||
function triggerOnload (loader, load, err, isErrSource) {
|
||||
loader.onload(err, load.id, load.d && load.d.map(loadToId), !!isErrSource);
|
||||
if (err)
|
||||
throw err;
|
||||
}
|
||||
|
||||
var lastRegister;
|
||||
systemJSPrototype.register = function (deps, declare, metas) {
|
||||
lastRegister = [deps, declare, metas];
|
||||
};
|
||||
|
||||
/*
|
||||
* getRegister provides the last anonymous System.register call
|
||||
*/
|
||||
systemJSPrototype.getRegister = function () {
|
||||
var _lastRegister = lastRegister;
|
||||
lastRegister = undefined;
|
||||
return _lastRegister;
|
||||
};
|
||||
|
||||
function getOrCreateLoad (loader, id, firstParentUrl, meta) {
|
||||
var load = loader[REGISTRY][id];
|
||||
if (load)
|
||||
return load;
|
||||
|
||||
var importerSetters = [];
|
||||
var ns = Object.create(null);
|
||||
if (toStringTag)
|
||||
Object.defineProperty(ns, toStringTag, { value: 'Module' });
|
||||
|
||||
var instantiatePromise = Promise.resolve()
|
||||
.then(function () {
|
||||
return loader.instantiate(id, firstParentUrl, meta);
|
||||
})
|
||||
.then(function (registration) {
|
||||
if (!registration)
|
||||
throw Error(errMsg(2, id ));
|
||||
function _export (name, value) {
|
||||
// note if we have hoisted exports (including reexports)
|
||||
load.h = true;
|
||||
var changed = false;
|
||||
if (typeof name === 'string') {
|
||||
if (!(name in ns) || ns[name] !== value) {
|
||||
ns[name] = value;
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (var p in name) {
|
||||
var value = name[p];
|
||||
if (!(p in ns) || ns[p] !== value) {
|
||||
ns[p] = value;
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (name && name.__esModule) {
|
||||
ns.__esModule = name.__esModule;
|
||||
}
|
||||
}
|
||||
if (changed)
|
||||
for (var i = 0; i < importerSetters.length; i++) {
|
||||
var setter = importerSetters[i];
|
||||
if (setter) setter(ns);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
var declared = registration[1](_export, registration[1].length === 2 ? {
|
||||
import: function (importId, meta) {
|
||||
return loader.import(importId, id, meta);
|
||||
},
|
||||
meta: loader.createContext(id)
|
||||
} : undefined);
|
||||
load.e = declared.execute || function () {};
|
||||
return [registration[0], declared.setters || [], registration[2] || []];
|
||||
}, function (err) {
|
||||
load.e = null;
|
||||
load.er = err;
|
||||
throw err;
|
||||
});
|
||||
|
||||
var linkPromise = instantiatePromise
|
||||
.then(function (instantiation) {
|
||||
return Promise.all(instantiation[0].map(function (dep, i) {
|
||||
var setter = instantiation[1][i];
|
||||
var meta = instantiation[2][i];
|
||||
return Promise.resolve(loader.resolve(dep, id))
|
||||
.then(function (depId) {
|
||||
var depLoad = getOrCreateLoad(loader, depId, id, meta);
|
||||
// depLoad.I may be undefined for already-evaluated
|
||||
return Promise.resolve(depLoad.I)
|
||||
.then(function () {
|
||||
if (setter) {
|
||||
depLoad.i.push(setter);
|
||||
// only run early setters when there are hoisted exports of that module
|
||||
// the timing works here as pending hoisted export calls will trigger through importerSetters
|
||||
if (depLoad.h || !depLoad.I)
|
||||
setter(depLoad.n);
|
||||
}
|
||||
return depLoad;
|
||||
});
|
||||
});
|
||||
}))
|
||||
.then(function (depLoads) {
|
||||
load.d = depLoads;
|
||||
});
|
||||
});
|
||||
|
||||
// Capital letter = a promise function
|
||||
return load = loader[REGISTRY][id] = {
|
||||
id: id,
|
||||
// importerSetters, the setters functions registered to this dependency
|
||||
// we retain this to add more later
|
||||
i: importerSetters,
|
||||
// module namespace object
|
||||
n: ns,
|
||||
// extra module information for import assertion
|
||||
// shape like: { assert: { type: 'xyz' } }
|
||||
m: meta,
|
||||
|
||||
// instantiate
|
||||
I: instantiatePromise,
|
||||
// link
|
||||
L: linkPromise,
|
||||
// whether it has hoisted exports
|
||||
h: false,
|
||||
|
||||
// On instantiate completion we have populated:
|
||||
// dependency load records
|
||||
d: undefined,
|
||||
// execution function
|
||||
e: undefined,
|
||||
|
||||
// On execution we have populated:
|
||||
// the execution error if any
|
||||
er: undefined,
|
||||
// in the case of TLA, the execution promise
|
||||
E: undefined,
|
||||
|
||||
// On execution, L, I, E cleared
|
||||
|
||||
// Promise for top-level completion
|
||||
C: undefined,
|
||||
|
||||
// parent instantiator / executor
|
||||
p: undefined
|
||||
};
|
||||
}
|
||||
|
||||
function instantiateAll (loader, load, parent, loaded) {
|
||||
if (!loaded[load.id]) {
|
||||
loaded[load.id] = true;
|
||||
// load.L may be undefined for already-instantiated
|
||||
return Promise.resolve(load.L)
|
||||
.then(function () {
|
||||
if (!load.p || load.p.e === null)
|
||||
load.p = parent;
|
||||
return Promise.all(load.d.map(function (dep) {
|
||||
return instantiateAll(loader, dep, parent, loaded);
|
||||
}));
|
||||
})
|
||||
.catch(function (err) {
|
||||
if (load.er)
|
||||
throw err;
|
||||
load.e = null;
|
||||
throw err;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function topLevelLoad (loader, load) {
|
||||
return load.C = instantiateAll(loader, load, load, {})
|
||||
.then(function () {
|
||||
return postOrderExec(loader, load, {});
|
||||
})
|
||||
.then(function () {
|
||||
return load.n;
|
||||
});
|
||||
}
|
||||
|
||||
// the closest we can get to call(undefined)
|
||||
var nullContext = Object.freeze(Object.create(null));
|
||||
|
||||
// returns a promise if and only if a top-level await subgraph
|
||||
// throws on sync errors
|
||||
function postOrderExec (loader, load, seen) {
|
||||
if (seen[load.id])
|
||||
return;
|
||||
seen[load.id] = true;
|
||||
|
||||
if (!load.e) {
|
||||
if (load.er)
|
||||
throw load.er;
|
||||
if (load.E)
|
||||
return load.E;
|
||||
return;
|
||||
}
|
||||
|
||||
// From here we're about to execute the load.
|
||||
// Because the execution may be async, we pop the `load.e` first.
|
||||
// So `load.e === null` always means the load has been executed or is executing.
|
||||
// To inspect the state:
|
||||
// - If `load.er` is truthy, the execution has threw or has been rejected;
|
||||
// - otherwise, either the `load.E` is a promise, means it's under async execution, or
|
||||
// - the `load.E` is null, means the load has completed the execution or has been async resolved.
|
||||
var exec = load.e;
|
||||
load.e = null;
|
||||
|
||||
// deps execute first, unless circular
|
||||
var depLoadPromises;
|
||||
load.d.forEach(function (depLoad) {
|
||||
try {
|
||||
var depLoadPromise = postOrderExec(loader, depLoad, seen);
|
||||
if (depLoadPromise)
|
||||
(depLoadPromises = depLoadPromises || []).push(depLoadPromise);
|
||||
}
|
||||
catch (err) {
|
||||
load.er = err;
|
||||
throw err;
|
||||
}
|
||||
});
|
||||
if (depLoadPromises)
|
||||
return Promise.all(depLoadPromises).then(doExec);
|
||||
|
||||
return doExec();
|
||||
|
||||
function doExec () {
|
||||
try {
|
||||
var execPromise = exec.call(nullContext);
|
||||
if (execPromise) {
|
||||
execPromise = execPromise.then(function () {
|
||||
load.C = load.n;
|
||||
load.E = null; // indicates completion
|
||||
if (!true) ;
|
||||
}, function (err) {
|
||||
load.er = err;
|
||||
load.E = null;
|
||||
if (!true) ;
|
||||
throw err;
|
||||
});
|
||||
return load.E = execPromise;
|
||||
}
|
||||
// (should be a promise, but a minify optimization to leave out Promise.resolve)
|
||||
load.C = load.n;
|
||||
load.L = load.I = undefined;
|
||||
}
|
||||
catch (err) {
|
||||
load.er = err;
|
||||
throw err;
|
||||
}
|
||||
finally {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
envGlobal.System = new SystemJS();
|
||||
|
||||
/*
|
||||
* SystemJS browser attachments for script and import map processing
|
||||
*/
|
||||
|
||||
var importMapPromise = Promise.resolve();
|
||||
var importMap = { imports: {}, scopes: {}, depcache: {}, integrity: {} };
|
||||
|
||||
// Scripts are processed immediately, on the first System.import, and on DOMReady.
|
||||
// Import map scripts are processed only once (by being marked) and in order for each phase.
|
||||
// This is to avoid using DOM mutation observers in core, although that would be an alternative.
|
||||
var processFirst = hasDocument;
|
||||
systemJSPrototype.prepareImport = function (doProcessScripts) {
|
||||
if (processFirst || doProcessScripts) {
|
||||
processScripts();
|
||||
processFirst = false;
|
||||
}
|
||||
return importMapPromise;
|
||||
};
|
||||
if (hasDocument) {
|
||||
processScripts();
|
||||
window.addEventListener('DOMContentLoaded', processScripts);
|
||||
}
|
||||
systemJSPrototype.addImportMap = function (newMap, mapBase) {
|
||||
resolveAndComposeImportMap(newMap, mapBase || baseUrl, importMap);
|
||||
};
|
||||
|
||||
function processScripts () {
|
||||
[].forEach.call(document.querySelectorAll('script'), function (script) {
|
||||
if (script.sp) // sp marker = systemjs processed
|
||||
return;
|
||||
// TODO: deprecate systemjs-module in next major now that we have auto import
|
||||
if (script.type === 'systemjs-module') {
|
||||
script.sp = true;
|
||||
if (!script.src)
|
||||
return;
|
||||
System.import(script.src.slice(0, 7) === 'import:' ? script.src.slice(7) : resolveUrl(script.src, baseUrl)).catch(function (e) {
|
||||
// if there is a script load error, dispatch an "error" event
|
||||
// on the script tag.
|
||||
if (e.message.indexOf('https://github.com/systemjs/systemjs/blob/main/docs/errors.md#3') > -1) {
|
||||
var event = document.createEvent('Event');
|
||||
event.initEvent('error', false, false);
|
||||
script.dispatchEvent(event);
|
||||
}
|
||||
return Promise.reject(e);
|
||||
});
|
||||
}
|
||||
else if (script.type === 'systemjs-importmap') {
|
||||
script.sp = true;
|
||||
// The passThrough property is for letting the module types fetch implementation know that this is not a SystemJS module.
|
||||
var fetchPromise = script.src ? (System.fetch || fetch)(script.src, { integrity: script.integrity, passThrough: true }).then(function (res) {
|
||||
if (!res.ok)
|
||||
throw Error(res.status );
|
||||
return res.text();
|
||||
}).catch(function (err) {
|
||||
err.message = errMsg('W4', script.src ) + '\n' + err.message;
|
||||
console.warn(err);
|
||||
if (typeof script.onerror === 'function') {
|
||||
script.onerror();
|
||||
}
|
||||
return '{}';
|
||||
}) : script.innerHTML;
|
||||
importMapPromise = importMapPromise.then(function () {
|
||||
return fetchPromise;
|
||||
}).then(function (text) {
|
||||
extendImportMap(importMap, text, script.src || baseUrl);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function extendImportMap (importMap, newMapText, newMapUrl) {
|
||||
var newMap = {};
|
||||
try {
|
||||
newMap = JSON.parse(newMapText);
|
||||
} catch (err) {
|
||||
console.warn(Error((errMsg('W5') )));
|
||||
}
|
||||
resolveAndComposeImportMap(newMap, newMapUrl, importMap);
|
||||
}
|
||||
|
||||
/*
|
||||
* Script instantiation loading
|
||||
*/
|
||||
|
||||
if (hasDocument) {
|
||||
window.addEventListener('error', function (evt) {
|
||||
lastWindowErrorUrl = evt.filename;
|
||||
lastWindowError = evt.error;
|
||||
});
|
||||
var baseOrigin = location.origin;
|
||||
}
|
||||
|
||||
systemJSPrototype.createScript = function (url) {
|
||||
var script = document.createElement('script');
|
||||
script.async = true;
|
||||
// Only add cross origin for actual cross origin
|
||||
// this is because Safari triggers for all
|
||||
// - https://bugs.webkit.org/show_bug.cgi?id=171566
|
||||
if (url.indexOf(baseOrigin + '/'))
|
||||
script.crossOrigin = 'anonymous';
|
||||
var integrity = importMap.integrity[url];
|
||||
if (integrity)
|
||||
script.integrity = integrity;
|
||||
script.src = url;
|
||||
return script;
|
||||
};
|
||||
|
||||
// Auto imports -> script tags can be inlined directly for load phase
|
||||
var lastAutoImportDeps, lastAutoImportTimeout;
|
||||
var autoImportCandidates = {};
|
||||
var systemRegister = systemJSPrototype.register;
|
||||
systemJSPrototype.register = function (deps, declare) {
|
||||
if (hasDocument && document.readyState === 'loading' && typeof deps !== 'string') {
|
||||
var scripts = document.querySelectorAll('script[src]');
|
||||
var lastScript = scripts[scripts.length - 1];
|
||||
if (lastScript) {
|
||||
lastScript.src;
|
||||
lastAutoImportDeps = deps;
|
||||
// if this is already a System load, then the instantiate has already begun
|
||||
// so this re-import has no consequence
|
||||
var loader = this;
|
||||
lastAutoImportTimeout = setTimeout(function () {
|
||||
autoImportCandidates[lastScript.src] = [deps, declare];
|
||||
loader.import(lastScript.src);
|
||||
});
|
||||
}
|
||||
}
|
||||
else {
|
||||
lastAutoImportDeps = undefined;
|
||||
}
|
||||
return systemRegister.call(this, deps, declare);
|
||||
};
|
||||
|
||||
var lastWindowErrorUrl, lastWindowError;
|
||||
systemJSPrototype.instantiate = function (url, firstParentUrl) {
|
||||
var autoImportRegistration = autoImportCandidates[url];
|
||||
if (autoImportRegistration) {
|
||||
delete autoImportCandidates[url];
|
||||
return autoImportRegistration;
|
||||
}
|
||||
var loader = this;
|
||||
return Promise.resolve(systemJSPrototype.createScript(url)).then(function (script) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
script.addEventListener('error', function () {
|
||||
reject(Error(errMsg(3, [url, firstParentUrl].join(', ') )));
|
||||
});
|
||||
script.addEventListener('load', function () {
|
||||
document.head.removeChild(script);
|
||||
// Note that if an error occurs that isn't caught by this if statement,
|
||||
// that getRegister will return null and a "did not instantiate" error will be thrown.
|
||||
if (lastWindowErrorUrl === url) {
|
||||
reject(lastWindowError);
|
||||
}
|
||||
else {
|
||||
var register = loader.getRegister(url);
|
||||
// Clear any auto import registration for dynamic import scripts during load
|
||||
if (register && register[0] === lastAutoImportDeps)
|
||||
clearTimeout(lastAutoImportTimeout);
|
||||
resolve(register);
|
||||
}
|
||||
});
|
||||
document.head.appendChild(script);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
/*
|
||||
* Fetch loader, sets up shouldFetch and fetch hooks
|
||||
*/
|
||||
systemJSPrototype.shouldFetch = function () {
|
||||
return false;
|
||||
};
|
||||
if (typeof fetch !== 'undefined')
|
||||
systemJSPrototype.fetch = fetch;
|
||||
|
||||
var instantiate = systemJSPrototype.instantiate;
|
||||
var jsContentTypeRegEx = /^(text|application)\/(x-)?javascript(;|$)/;
|
||||
systemJSPrototype.instantiate = function (url, parent, meta) {
|
||||
var loader = this;
|
||||
if (!this.shouldFetch(url, parent, meta))
|
||||
return instantiate.apply(this, arguments);
|
||||
return this.fetch(url, {
|
||||
credentials: 'same-origin',
|
||||
integrity: importMap.integrity[url],
|
||||
meta: meta,
|
||||
})
|
||||
.then(function (res) {
|
||||
if (!res.ok)
|
||||
throw Error(errMsg(7, [res.status, res.statusText, url, parent].join(', ') ));
|
||||
var contentType = res.headers.get('content-type');
|
||||
if (!contentType || !jsContentTypeRegEx.test(contentType))
|
||||
throw Error(errMsg(4, contentType ));
|
||||
return res.text().then(function (source) {
|
||||
if (source.indexOf('//# sourceURL=') < 0)
|
||||
source += '\n//# sourceURL=' + url;
|
||||
(0, eval)(source);
|
||||
return loader.getRegister(url);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
systemJSPrototype.resolve = function (id, parentUrl) {
|
||||
parentUrl = parentUrl || !true || baseUrl;
|
||||
return resolveImportMap((importMap), resolveIfNotPlainOrUrl(id, parentUrl) || id, parentUrl) || throwUnresolved(id, parentUrl);
|
||||
};
|
||||
|
||||
function throwUnresolved (id, parentUrl) {
|
||||
throw Error(errMsg(8, [id, parentUrl].join(', ') ));
|
||||
}
|
||||
|
||||
var systemInstantiate = systemJSPrototype.instantiate;
|
||||
systemJSPrototype.instantiate = function (url, firstParentUrl, meta) {
|
||||
var preloads = (importMap).depcache[url];
|
||||
if (preloads) {
|
||||
for (var i = 0; i < preloads.length; i++)
|
||||
getOrCreateLoad(this, this.resolve(preloads[i], url), url);
|
||||
}
|
||||
return systemInstantiate.call(this, url, firstParentUrl, meta);
|
||||
};
|
||||
|
||||
/*
|
||||
* Supports loading System.register in workers
|
||||
*/
|
||||
|
||||
if (hasSelf && typeof importScripts === 'function')
|
||||
systemJSPrototype.instantiate = function (url) {
|
||||
var loader = this;
|
||||
return Promise.resolve().then(function () {
|
||||
importScripts(url);
|
||||
return loader.getRegister(url);
|
||||
});
|
||||
};
|
||||
|
||||
})();
|
||||
5
uni_modules/UniDevTools/node_modules/systemjs/dist/s.min.js
generated
vendored
Normal file
5
uni_modules/UniDevTools/node_modules/systemjs/dist/s.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
uni_modules/UniDevTools/node_modules/systemjs/dist/s.min.js.map
generated
vendored
Normal file
1
uni_modules/UniDevTools/node_modules/systemjs/dist/s.min.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
6712
uni_modules/UniDevTools/node_modules/systemjs/dist/system-node.cjs
generated
vendored
Normal file
6712
uni_modules/UniDevTools/node_modules/systemjs/dist/system-node.cjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1035
uni_modules/UniDevTools/node_modules/systemjs/dist/system.js
generated
vendored
Normal file
1035
uni_modules/UniDevTools/node_modules/systemjs/dist/system.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
5
uni_modules/UniDevTools/node_modules/systemjs/dist/system.min.js
generated
vendored
Normal file
5
uni_modules/UniDevTools/node_modules/systemjs/dist/system.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
uni_modules/UniDevTools/node_modules/systemjs/dist/system.min.js.map
generated
vendored
Normal file
1
uni_modules/UniDevTools/node_modules/systemjs/dist/system.min.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
54
uni_modules/UniDevTools/node_modules/systemjs/package.json
generated
vendored
Normal file
54
uni_modules/UniDevTools/node_modules/systemjs/package.json
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"name": "systemjs",
|
||||
"version": "6.14.1",
|
||||
"main": "dist/system-node.cjs",
|
||||
"exports": {
|
||||
".": {
|
||||
"node": "./dist/system-node.cjs",
|
||||
"default": "./dist/system.min.js"
|
||||
},
|
||||
"./s.js": "./dist/s.min.js",
|
||||
"./package.json": "./package.json",
|
||||
"./dist/*": "./dist/*"
|
||||
},
|
||||
"description": "Dynamic ES module loader",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/systemjs/systemjs"
|
||||
},
|
||||
"author": "Guy Bedford",
|
||||
"type": "script",
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"scripts": {
|
||||
"test": "chomp test",
|
||||
"build": "chomp build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@jsenv/file-size-impact": "^5.2.0",
|
||||
"@rollup/plugin-json": "^4.0.2",
|
||||
"@rollup/plugin-node-resolve": "^7.1.1",
|
||||
"@rollup/plugin-replace": "^2.4.2",
|
||||
"@vercel/ncc": "^0.34.0",
|
||||
"bluebird": "^3.7.2",
|
||||
"construct-style-sheets-polyfill": "^2.3.5",
|
||||
"kleur": "^4.1.5",
|
||||
"mkdirp": "^1.0.4",
|
||||
"mocha": "^7.1.1",
|
||||
"node-fetch": "^2.6.0",
|
||||
"open": "^8.4.0",
|
||||
"rimraf": "^3.0.2",
|
||||
"rollup": "^2.79.1",
|
||||
"rollup-plugin-terser": "^5.3.0",
|
||||
"source-map-support": "^0.5.16",
|
||||
"symbol-es6": "^0.1.2",
|
||||
"terser": "^5.16.5",
|
||||
"whatwg-fetch": "^3.0.0"
|
||||
},
|
||||
"collective": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/systemjs"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user