svgedit/dist/editor/system/s.min.js.map

1 line
38 KiB
Plaintext

{"version":3,"file":"s.min.js","sources":["../src/err-msg.js","../src/common.js","../src/system-core.js","../src/features/import-maps.js","../src/features/script-load.js","../src/features/fetch-load.js","../src/features/resolve.js","../src/features/depcache.js","../src/features/worker-load.js"],"sourcesContent":["export function errMsg(errCode, msg) {\n if (process.env.SYSTEM_PRODUCTION)\n return (msg || \"\") + \" (SystemJS https://git.io/JvFET#\" + errCode + \")\";\n else\n return (msg || \"\") + \" (SystemJS Error#\" + errCode + \" \" + \"https://git.io/JvFET#\" + errCode + \")\";\n}","import { errMsg } from './err-msg.js';\n\nexport var hasSymbol = typeof Symbol !== 'undefined';\nexport var hasSelf = typeof self !== 'undefined';\nexport var hasDocument = typeof document !== 'undefined';\n\nvar envGlobal = hasSelf ? self : global;\nexport { envGlobal as global };\n\n// Loader-scoped baseUrl and import map supported in Node.js only\nexport var BASE_URL = hasSymbol ? Symbol() : '_';\nexport var IMPORT_MAP = hasSymbol ? Symbol() : '#';\n\nexport var baseUrl;\n\nif (hasDocument) {\n var baseEl = document.querySelector('base[href]');\n if (baseEl)\n baseUrl = baseEl.href;\n}\n\nif (!baseUrl && typeof location !== 'undefined') {\n baseUrl = location.href.split('#')[0].split('?')[0];\n var lastSepIndex = baseUrl.lastIndexOf('/');\n if (lastSepIndex !== -1)\n baseUrl = baseUrl.slice(0, lastSepIndex + 1);\n}\n\nif (!process.env.SYSTEM_BROWSER && !baseUrl && typeof process !== 'undefined') {\n var cwd = process.cwd();\n // TODO: encoding edge cases\n baseUrl = 'file://' + (cwd[0] === '/' ? '' : '/') + cwd.replace(/\\\\/g, '/') + '/';\n}\n\nvar backslashRegEx = /\\\\/g;\nexport function resolveIfNotPlainOrUrl (relUrl, parentUrl) {\n if (relUrl.indexOf('\\\\') !== -1)\n relUrl = relUrl.replace(backslashRegEx, '/');\n // protocol-relative\n if (relUrl[0] === '/' && relUrl[1] === '/') {\n return parentUrl.slice(0, parentUrl.indexOf(':') + 1) + relUrl;\n }\n // relative-url\n else if (relUrl[0] === '.' && (relUrl[1] === '/' || relUrl[1] === '.' && (relUrl[2] === '/' || relUrl.length === 2 && (relUrl += '/')) ||\n relUrl.length === 1 && (relUrl += '/')) ||\n relUrl[0] === '/') {\n var parentProtocol = parentUrl.slice(0, parentUrl.indexOf(':') + 1);\n // Disabled, but these cases will give inconsistent results for deep backtracking\n //if (parentUrl[parentProtocol.length] !== '/')\n // throw Error('Cannot resolve');\n // read pathname from parent URL\n // pathname taken to be part after leading \"/\"\n var pathname;\n if (parentUrl[parentProtocol.length + 1] === '/') {\n // resolving to a :// so we need to read out the auth and host\n if (parentProtocol !== 'file:') {\n pathname = parentUrl.slice(parentProtocol.length + 2);\n pathname = pathname.slice(pathname.indexOf('/') + 1);\n }\n else {\n pathname = parentUrl.slice(8);\n }\n }\n else {\n // resolving to :/ so pathname is the /... part\n pathname = parentUrl.slice(parentProtocol.length + (parentUrl[parentProtocol.length] === '/'));\n }\n\n if (relUrl[0] === '/')\n return parentUrl.slice(0, parentUrl.length - pathname.length - 1) + relUrl;\n\n // join together and split for removal of .. and . segments\n // looping the string instead of anything fancy for perf reasons\n // '../../../../../z' resolved to 'x/y' is just 'z'\n var segmented = pathname.slice(0, pathname.lastIndexOf('/') + 1) + relUrl;\n\n var output = [];\n var segmentIndex = -1;\n for (var i = 0; i < segmented.length; i++) {\n // busy reading a segment - only terminate on '/'\n if (segmentIndex !== -1) {\n if (segmented[i] === '/') {\n output.push(segmented.slice(segmentIndex, i + 1));\n segmentIndex = -1;\n }\n }\n\n // new segment - check if it is relative\n else if (segmented[i] === '.') {\n // ../ segment\n if (segmented[i + 1] === '.' && (segmented[i + 2] === '/' || i + 2 === segmented.length)) {\n output.pop();\n i += 2;\n }\n // ./ segment\n else if (segmented[i + 1] === '/' || i + 1 === segmented.length) {\n i += 1;\n }\n else {\n // the start of a new segment as below\n segmentIndex = i;\n }\n }\n // it is the start of a new segment\n else {\n segmentIndex = i;\n }\n }\n // finish reading out the last segment\n if (segmentIndex !== -1)\n output.push(segmented.slice(segmentIndex));\n return parentUrl.slice(0, parentUrl.length - pathname.length) + output.join('');\n }\n}\n\n/*\n * Import maps implementation\n *\n * To make lookups fast we pre-resolve the entire import map\n * and then match based on backtracked hash lookups\n *\n */\n\nexport function resolveUrl (relUrl, parentUrl) {\n return resolveIfNotPlainOrUrl(relUrl, parentUrl) || (relUrl.indexOf(':') !== -1 ? relUrl : resolveIfNotPlainOrUrl('./' + relUrl, parentUrl));\n}\n\nfunction resolveAndComposePackages (packages, outPackages, baseUrl, parentMap, parentUrl) {\n for (var p in packages) {\n var resolvedLhs = resolveIfNotPlainOrUrl(p, baseUrl) || p;\n var rhs = packages[p];\n // package fallbacks not currently supported\n if (typeof rhs !== 'string')\n continue;\n var mapped = resolveImportMap(parentMap, resolveIfNotPlainOrUrl(rhs, baseUrl) || rhs, parentUrl);\n if (!mapped) {\n if (process.env.SYSTEM_PRODUCTION)\n targetWarning('W1', p, rhs);\n else\n targetWarning('W1', p, rhs, 'bare specifier did not resolve');\n }\n else\n outPackages[resolvedLhs] = mapped;\n }\n}\n\nexport function resolveAndComposeImportMap (json, baseUrl, outMap) {\n if (json.imports)\n resolveAndComposePackages(json.imports, outMap.imports, baseUrl, outMap, null);\n\n var u;\n for (u in json.scopes || {}) {\n var resolvedScope = resolveUrl(u, baseUrl);\n resolveAndComposePackages(json.scopes[u], outMap.scopes[resolvedScope] || (outMap.scopes[resolvedScope] = {}), baseUrl, outMap, resolvedScope);\n }\n\n for (u in json.depcache || {})\n outMap.depcache[resolveUrl(u, baseUrl)] = json.depcache[u];\n \n for (u in json.integrity || {})\n outMap.integrity[resolveUrl(u, baseUrl)] = json.integrity[u];\n}\n\nfunction getMatch (path, matchObj) {\n if (matchObj[path])\n return path;\n var sepIndex = path.length;\n do {\n var segment = path.slice(0, sepIndex + 1);\n if (segment in matchObj)\n return segment;\n } while ((sepIndex = path.lastIndexOf('/', sepIndex - 1)) !== -1)\n}\n\nfunction applyPackages (id, packages) {\n var pkgName = getMatch(id, packages);\n if (pkgName) {\n var pkg = packages[pkgName];\n if (pkg === null) return;\n if (id.length > pkgName.length && pkg[pkg.length - 1] !== '/') {\n if (process.env.SYSTEM_PRODUCTION)\n targetWarning('W2', pkgName, pkg);\n else\n targetWarning('W2', pkgName, pkg, \"should have a trailing '/'\");\n }\n else\n return pkg + id.slice(pkgName.length);\n }\n}\n\nfunction targetWarning (code, match, target, msg) {\n console.warn(errMsg(code, process.env.SYSTEM_PRODUCTION ? [target, match].join(', ') : \"Package target \" + msg + \", resolving target '\" + target + \"' for \" + match));\n}\n\nexport function resolveImportMap (importMap, resolvedOrPlain, parentUrl) {\n var scopes = importMap.scopes;\n var scopeUrl = parentUrl && getMatch(parentUrl, scopes);\n while (scopeUrl) {\n var packageResolution = applyPackages(resolvedOrPlain, scopes[scopeUrl]);\n if (packageResolution)\n return packageResolution;\n scopeUrl = getMatch(scopeUrl.slice(0, scopeUrl.lastIndexOf('/')), scopes);\n }\n return applyPackages(resolvedOrPlain, importMap.imports) || resolvedOrPlain.indexOf(':') !== -1 && resolvedOrPlain;\n}\n","/*\n * SystemJS Core\n * \n * Provides\n * - System.import\n * - System.register support for\n * live bindings, function hoisting through circular references,\n * reexports, dynamic import, import.meta.url, top-level await\n * - System.getRegister to get the registration\n * - Symbol.toStringTag support in Module objects\n * - Hookable System.createContext to customize import.meta\n * - System.onload(err, id, deps) handler for tracing / hot-reloading\n * \n * Core comes with no System.prototype.resolve or\n * System.prototype.instantiate implementations\n */\nimport { global, hasSymbol } from './common.js';\nimport { errMsg } from './err-msg.js';\nexport { systemJSPrototype, REGISTRY }\n\nvar toStringTag = hasSymbol && Symbol.toStringTag;\nvar REGISTRY = hasSymbol ? Symbol() : '@';\n\nfunction SystemJS () {\n this[REGISTRY] = {};\n}\n\nvar systemJSPrototype = SystemJS.prototype;\n\nsystemJSPrototype.import = function (id, parentUrl) {\n var loader = this;\n return Promise.resolve(loader.prepareImport())\n .then(function() {\n return loader.resolve(id, parentUrl);\n })\n .then(function (id) {\n var load = getOrCreateLoad(loader, id);\n return load.C || topLevelLoad(loader, load);\n });\n};\n\n// Hookable createContext function -> allowing eg custom import meta\nsystemJSPrototype.createContext = function (parentId) {\n var loader = this;\n return {\n url: parentId,\n resolve: function (id, parentUrl) {\n return Promise.resolve(loader.resolve(id, parentUrl || parentId));\n }\n };\n};\n\n// onLoad(err, id, deps) provided for tracing / hot-reloading\nif (!process.env.SYSTEM_PRODUCTION)\n systemJSPrototype.onload = function () {};\nfunction loadToId (load) {\n return load.id;\n}\nfunction triggerOnload (loader, load, err, isErrSource) {\n loader.onload(err, load.id, load.d && load.d.map(loadToId), !!isErrSource);\n if (err)\n throw err;\n}\n\nvar lastRegister;\nsystemJSPrototype.register = function (deps, declare) {\n lastRegister = [deps, declare];\n};\n\n/*\n * getRegister provides the last anonymous System.register call\n */\nsystemJSPrototype.getRegister = function () {\n var _lastRegister = lastRegister;\n lastRegister = undefined;\n return _lastRegister;\n};\n\nexport function getOrCreateLoad (loader, id, firstParentUrl) {\n var load = loader[REGISTRY][id];\n if (load)\n return load;\n\n var importerSetters = [];\n var ns = Object.create(null);\n if (toStringTag)\n Object.defineProperty(ns, toStringTag, { value: 'Module' });\n \n var instantiatePromise = Promise.resolve()\n .then(function () {\n return loader.instantiate(id, firstParentUrl);\n })\n .then(function (registration) {\n if (!registration)\n throw Error(errMsg(2, process.env.SYSTEM_PRODUCTION ? id : 'Module ' + id + ' did not instantiate'));\n function _export (name, value) {\n // note if we have hoisted exports (including reexports)\n load.h = true;\n var changed = false;\n if (typeof name === 'string') {\n if (!(name in ns) || ns[name] !== value) {\n ns[name] = value;\n changed = true;\n }\n }\n else {\n for (var p in name) {\n var value = name[p];\n if (!(p in ns) || ns[p] !== value) {\n ns[p] = value;\n changed = true;\n }\n }\n\n if (name.__esModule) {\n ns.__esModule = name.__esModule;\n }\n }\n if (changed)\n for (var i = 0; i < importerSetters.length; i++) {\n var setter = importerSetters[i];\n if (setter) setter(ns);\n }\n return value;\n }\n var declared = registration[1](_export, registration[1].length === 2 ? {\n import: function (importId) {\n return loader.import(importId, id);\n },\n meta: loader.createContext(id)\n } : undefined);\n load.e = declared.execute || function () {};\n return [registration[0], declared.setters || []];\n });\n\n if (!process.env.SYSTEM_PRODUCTION)\n instantiatePromise = instantiatePromise.catch(function (err) {\n triggerOnload(loader, load, err, true);\n });\n\n var linkPromise = instantiatePromise\n .then(function (instantiation) {\n return Promise.all(instantiation[0].map(function (dep, i) {\n var setter = instantiation[1][i];\n return Promise.resolve(loader.resolve(dep, id))\n .then(function (depId) {\n var depLoad = getOrCreateLoad(loader, depId, id);\n // depLoad.I may be undefined for already-evaluated\n return Promise.resolve(depLoad.I)\n .then(function () {\n if (setter) {\n depLoad.i.push(setter);\n // only run early setters when there are hoisted exports of that module\n // the timing works here as pending hoisted export calls will trigger through importerSetters\n if (depLoad.h || !depLoad.I)\n setter(depLoad.n);\n }\n return depLoad;\n });\n })\n }))\n .then(\n function (depLoads) {\n load.d = depLoads;\n },\n !process.env.SYSTEM_PRODUCTION && function (err) {\n triggerOnload(loader, load, err, false);\n }\n )\n });\n\n linkPromise.catch(function (err) {\n load.e = null;\n load.er = err;\n });\n\n // Capital letter = a promise function\n return load = loader[REGISTRY][id] = {\n id: id,\n // importerSetters, the setters functions registered to this dependency\n // we retain this to add more later\n i: importerSetters,\n // module namespace object\n n: ns,\n\n // instantiate\n I: instantiatePromise,\n // link\n L: linkPromise,\n // whether it has hoisted exports\n h: false,\n\n // On instantiate completion we have populated:\n // dependency load records\n d: undefined,\n // execution function\n // set to NULL immediately after execution (or on any failure) to indicate execution has happened\n // in such a case, C should be used, and E, I, L will be emptied\n e: undefined,\n\n // On execution we have populated:\n // the execution error if any\n er: undefined,\n // in the case of TLA, the execution promise\n E: undefined,\n\n // On execution, L, I, E cleared\n\n // Promise for top-level completion\n C: undefined\n };\n}\n\nfunction instantiateAll (loader, load, loaded) {\n if (!loaded[load.id]) {\n loaded[load.id] = true;\n // load.L may be undefined for already-instantiated\n return Promise.resolve(load.L)\n .then(function () {\n return Promise.all(load.d.map(function (dep) {\n return instantiateAll(loader, dep, loaded);\n }));\n })\n }\n}\n\nfunction topLevelLoad (loader, load) {\n return load.C = instantiateAll(loader, load, {})\n .then(function () {\n return postOrderExec(loader, load, {});\n })\n .then(function () {\n return load.n;\n });\n}\n\n// the closest we can get to call(undefined)\nvar nullContext = Object.freeze(Object.create(null));\n\n// returns a promise if and only if a top-level await subgraph\n// throws on sync errors\nfunction postOrderExec (loader, load, seen) {\n if (seen[load.id])\n return;\n seen[load.id] = true;\n\n if (!load.e) {\n if (load.er)\n throw load.er;\n if (load.E)\n return load.E;\n return;\n }\n\n // deps execute first, unless circular\n var depLoadPromises;\n load.d.forEach(function (depLoad) {\n try {\n var depLoadPromise = postOrderExec(loader, depLoad, seen);\n if (depLoadPromise) \n (depLoadPromises = depLoadPromises || []).push(depLoadPromise);\n }\n catch (err) {\n load.e = null;\n load.er = err;\n if (!process.env.SYSTEM_PRODUCTION) triggerOnload(loader, load, err, false); \n else throw err;\n }\n });\n if (depLoadPromises)\n return Promise.all(depLoadPromises).then(doExec, function (err) {\n load.e = null;\n load.er = err;\n if (!process.env.SYSTEM_PRODUCTION) triggerOnload(loader, load, err, false); \n else throw err;\n });\n\n return doExec();\n\n function doExec () {\n try {\n var execPromise = load.e.call(nullContext);\n if (execPromise) {\n execPromise = execPromise.then(function () {\n load.C = load.n;\n load.E = null; // indicates completion\n if (!process.env.SYSTEM_PRODUCTION) triggerOnload(loader, load, null, true);\n }, function (err) {\n load.er = err;\n load.E = null;\n if (!process.env.SYSTEM_PRODUCTION) triggerOnload(loader, load, err, true);\n else throw err;\n });\n return load.E = load.E || execPromise;\n }\n // (should be a promise, but a minify optimization to leave out Promise.resolve)\n load.C = load.n;\n if (!process.env.SYSTEM_PRODUCTION) triggerOnload(loader, load, null, true);\n }\n catch (err) {\n load.er = err;\n if (!process.env.SYSTEM_PRODUCTION) triggerOnload(loader, load, err, true);\n else throw err;\n }\n finally {\n load.L = load.I = undefined;\n load.e = null;\n }\n }\n}\n\nglobal.System = new SystemJS();\n","/*\n * SystemJS browser attachments for script and import map processing\n */\nimport { baseUrl, resolveAndComposeImportMap, hasDocument, resolveUrl } from '../common.js';\nimport { systemJSPrototype } from '../system-core.js';\nimport { errMsg } from '../err-msg.js';\n\nvar importMapPromise = Promise.resolve();\nexport var importMap = { imports: {}, scopes: {}, depcache: {}, integrity: {} };\n\n// Scripts are processed immediately, on the first System.import, and on DOMReady.\n// Import map scripts are processed only once (by being marked) and in order for each phase.\n// This is to avoid using DOM mutation observers in core, although that would be an alternative.\nvar processFirst = hasDocument;\nsystemJSPrototype.prepareImport = function (doProcessScripts) {\n if (processFirst || doProcessScripts) {\n processScripts();\n processFirst = false;\n }\n return importMapPromise;\n};\nif (hasDocument) {\n processScripts();\n window.addEventListener('DOMContentLoaded', processScripts);\n}\n\nfunction processScripts () {\n [].forEach.call(document.querySelectorAll('script'), function (script) {\n if (script.sp) // sp marker = systemjs processed\n return;\n // TODO: deprecate systemjs-module in next major now that we have auto import\n if (script.type === 'systemjs-module') {\n script.sp = true;\n if (!script.src)\n return;\n System.import(script.src.slice(0, 7) === 'import:' ? script.src.slice(7) : resolveUrl(script.src, baseUrl));\n }\n else if (script.type === 'systemjs-importmap') {\n script.sp = true;\n var fetchPromise = script.src ? fetch(script.src, { integrity: script.integrity }).then(function (res) {\n return res.text();\n }) : script.innerHTML;\n importMapPromise = importMapPromise.then(function () {\n return fetchPromise;\n }).then(function (text) {\n extendImportMap(importMap, text, script.src || baseUrl);\n });\n }\n });\n}\n\nfunction extendImportMap (importMap, newMapText, newMapUrl) {\n try {\n var newMap = JSON.parse(newMapText);\n } catch (err) {\n throw Error(process.env.SYSTEM_PRODUCTION ? errMsg(1) : errMsg(1, \"systemjs-importmap contains invalid JSON\"));\n }\n resolveAndComposeImportMap(newMap, newMapUrl, importMap);\n}\n","/*\n * Script instantiation loading\n */\nimport { hasDocument } from '../common.js';\nimport { systemJSPrototype } from '../system-core.js';\nimport { errMsg } from '../err-msg.js';\nimport { importMap } from './import-maps.js';\n\nif (hasDocument) {\n window.addEventListener('error', function (evt) {\n lastWindowErrorUrl = evt.filename;\n lastWindowError = evt.error;\n });\n var baseOrigin = location.origin;\n}\n\nsystemJSPrototype.createScript = function (url) {\n var script = document.createElement('script');\n script.async = true;\n // Only add cross origin for actual cross origin\n // this is because Safari triggers for all\n // - https://bugs.webkit.org/show_bug.cgi?id=171566\n if (url.indexOf(baseOrigin + '/'))\n script.crossOrigin = 'anonymous';\n var integrity = importMap.integrity[url];\n if (integrity)\n script.integrity = integrity;\n script.src = url;\n return script;\n};\n\n// Auto imports -> script tags can be inlined directly for load phase\nvar lastAutoImportUrl, lastAutoImportDeps, lastAutoImportTimeout;\nvar autoImportCandidates = {};\nvar systemRegister = systemJSPrototype.register;\nsystemJSPrototype.register = function (deps, declare) {\n if (hasDocument && document.readyState === 'loading' && typeof deps !== 'string') {\n var scripts = document.querySelectorAll('script[src]');\n var lastScript = scripts[scripts.length - 1];\n if (lastScript) {\n lastAutoImportUrl = lastScript.src;\n lastAutoImportDeps = deps;\n // if this is already a System load, then the instantiate has already begun\n // so this re-import has no consequence\n var loader = this;\n lastAutoImportTimeout = setTimeout(function () {\n autoImportCandidates[lastScript.src] = [deps, declare];\n loader.import(lastScript.src);\n });\n }\n }\n else {\n lastAutoImportDeps = undefined;\n }\n return systemRegister.call(this, deps, declare);\n};\n\nvar lastWindowErrorUrl, lastWindowError;\nsystemJSPrototype.instantiate = function (url, firstParentUrl) {\n var autoImportRegistration = autoImportCandidates[url];\n if (autoImportRegistration) {\n delete autoImportCandidates[url];\n return autoImportRegistration;\n }\n var loader = this;\n return new Promise(function (resolve, reject) {\n var script = systemJSPrototype.createScript(url);\n script.addEventListener('error', function () {\n reject(Error(errMsg(3, process.env.SYSTEM_PRODUCTION ? [url, firstParentUrl].join(', ') : 'Error loading ' + url + (firstParentUrl ? ' from ' + firstParentUrl : ''))));\n });\n script.addEventListener('load', function () {\n document.head.removeChild(script);\n // Note that if an error occurs that isn't caught by this if statement,\n // that getRegister will return null and a \"did not instantiate\" error will be thrown.\n if (lastWindowErrorUrl === url) {\n reject(lastWindowError);\n }\n else {\n var register = loader.getRegister();\n // Clear any auto import registration for dynamic import scripts during load\n if (register && register[0] === lastAutoImportDeps)\n clearTimeout(lastAutoImportTimeout);\n resolve(register);\n }\n });\n document.head.appendChild(script);\n });\n};\n","import { errMsg } from '../err-msg.js';\nimport { importMap } from '../features/import-maps.js';\nimport { systemJSPrototype } from '../system-core.js';\n\n/*\n * Fetch loader, sets up shouldFetch and fetch hooks\n */\nsystemJSPrototype.shouldFetch = function () {\n return false;\n};\nif (typeof fetch !== 'undefined')\n systemJSPrototype.fetch = fetch;\n\nvar instantiate = systemJSPrototype.instantiate;\nvar jsContentTypeRegEx = /^(text|application)\\/(x-)?javascript(;|$)/;\nsystemJSPrototype.instantiate = function (url, parent) {\n var loader = this;\n if (!this.shouldFetch(url))\n return instantiate.apply(this, arguments);\n return this.fetch(url, {\n credentials: 'same-origin',\n integrity: importMap.integrity[url]\n })\n .then(function (res) {\n if (!res.ok)\n throw Error(errMsg(7, process.env.SYSTEM_PRODUCTION ? [res.status, res.statusText, url, parent].join(', ') : res.status + ' ' + res.statusText + ', loading ' + url + (parent ? ' from ' + parent : '')));\n var contentType = res.headers.get('content-type');\n if (!contentType || !jsContentTypeRegEx.test(contentType))\n throw Error(errMsg(4, process.env.SYSTEM_PRODUCTION ? contentType : 'Unknown Content-Type \"' + contentType + '\", loading ' + url + (parent ? ' from ' + parent : '')));\n return res.text().then(function (source) {\n (0, eval)(source);\n return loader.getRegister();\n });\n });\n};\n","import { BASE_URL, baseUrl, resolveImportMap, resolveIfNotPlainOrUrl, IMPORT_MAP } from '../common.js';\nimport { importMap } from './import-maps.js';\nimport { systemJSPrototype } from '../system-core.js';\nimport { errMsg } from '../err-msg.js';\n\nsystemJSPrototype.resolve = function (id, parentUrl) {\n parentUrl = parentUrl || !process.env.SYSTEM_BROWSER && this[BASE_URL] || baseUrl;\n return resolveImportMap((!process.env.SYSTEM_BROWSER && this[IMPORT_MAP] || importMap), resolveIfNotPlainOrUrl(id, parentUrl) || id, parentUrl) || throwUnresolved(id, parentUrl);\n};\n\nfunction throwUnresolved (id, parentUrl) {\n throw Error(errMsg(8, process.env.SYSTEM_PRODUCTION ? [id, parentUrl].join(', ') : \"Unable to resolve bare specifier '\" + id + (parentUrl ? \"' from \" + parentUrl : \"'\")));\n}\n","import { IMPORT_MAP } from '../common.js';\nimport { systemJSPrototype, getOrCreateLoad } from '../system-core.js';\nimport { importMap } from './import-maps.js';\n\nvar systemInstantiate = systemJSPrototype.instantiate;\nsystemJSPrototype.instantiate = function (url, firstParentUrl) {\n var preloads = (!process.env.SYSTEM_BROWSER && this[IMPORT_MAP] || importMap).depcache[url];\n if (preloads) {\n for (var i = 0; i < preloads.length; i++)\n getOrCreateLoad(this, this.resolve(preloads[i], url), url);\n }\n return systemInstantiate.call(this, url, firstParentUrl);\n};","/*\n * Supports loading System.register in workers\n */\nimport { systemJSPrototype } from '../system-core';\nimport { hasSelf } from '../common';\n\nif (hasSelf && typeof importScripts === 'function')\n systemJSPrototype.instantiate = function (url) {\n var loader = this;\n return Promise.resolve().then(function () {\n importScripts(url);\n return loader.getRegister();\n });\n };\n"],"names":["errMsg","errCode","msg","resolveIfNotPlainOrUrl","relUrl","parentUrl","indexOf","replace","slice","length","pathname","parentProtocol","segmented","lastIndexOf","output","segmentIndex","i","push","pop","join","resolveUrl","resolveAndComposePackages","packages","outPackages","baseUrl","parentMap","p","resolvedLhs","rhs","mapped","resolveImportMap","targetWarning","getMatch","path","matchObj","sepIndex","segment","applyPackages","id","pkgName","pkg","code","match","target","console","warn","importMap","resolvedOrPlain","scopes","scopeUrl","packageResolution","imports","SystemJS","this","REGISTRY","getOrCreateLoad","loader","firstParentUrl","load","importerSetters","ns","Object","create","toStringTag","defineProperty","value","instantiatePromise","Promise","resolve","then","instantiate","registration","Error","declared","name","h","changed","__esModule","setter","import","importId","meta","createContext","undefined","e","execute","setters","linkPromise","instantiation","all","map","dep","depId","depLoad","I","n","depLoads","d","catch","err","er","L","E","C","processScripts","forEach","call","document","querySelectorAll","script","sp","type","src","System","fetchPromise","fetch","integrity","res","text","innerHTML","importMapPromise","newMapText","newMapUrl","newMap","JSON","parse","json","outMap","u","resolvedScope","depcache","resolveAndComposeImportMap","extendImportMap","hasSymbol","Symbol","hasSelf","self","hasDocument","envGlobal","global","baseEl","querySelector","href","location","lastSepIndex","split","lastRegister","systemJSPrototype","prototype","prepareImport","instantiateAll","loaded","postOrderExec","seen","doExec","execPromise","nullContext","depLoadPromises","depLoadPromise","topLevelLoad","parentId","url","register","deps","declare","getRegister","_lastRegister","freeze","lastAutoImportDeps","lastAutoImportTimeout","processFirst","doProcessScripts","window","addEventListener","evt","lastWindowErrorUrl","filename","lastWindowError","error","baseOrigin","origin","createScript","createElement","async","crossOrigin","autoImportCandidates","systemRegister","readyState","scripts","lastScript","setTimeout","autoImportRegistration","reject","head","removeChild","clearTimeout","appendChild","shouldFetch","jsContentTypeRegEx","parent","credentials","ok","status","statusText","contentType","headers","get","test","source","eval","apply","arguments","throwUnresolved","systemInstantiate","preloads","importScripts"],"mappings":"YAAO,SAASA,EAAOC,EAASC,GAE5B,OAAQA,GAAO,IAAM,mCAAqCD,EAAU,ICiCjE,SAASE,EAAwBC,EAAQC,GAI9C,IAH8B,IAA1BD,EAAOE,QAAQ,QACjBF,EAASA,EAAOG,QAHC,MAGuB,MAExB,MAAdH,EAAO,IAA4B,MAAdA,EAAO,GAC9B,OAAOC,EAAUG,MAAM,EAAGH,EAAUC,QAAQ,KAAO,GAAKF,EAGrD,GAAkB,MAAdA,EAAO,KAA6B,MAAdA,EAAO,IAA4B,MAAdA,EAAO,KAA6B,MAAdA,EAAO,IAAgC,IAAlBA,EAAOK,SAAiBL,GAAU,OAC3G,IAAlBA,EAAOK,SAAkBL,GAAU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