|
1 |
| -/* ES Module Shims 1.3.5 */ |
| 1 | +/* ES Module Shims 1.3.6 */ |
2 | 2 | (function () {
|
3 | 3 |
|
4 | 4 | const edge = navigator.userAgent.match(/Edge\/\d\d\.\d+$/);
|
|
199 | 199 |
|
200 | 200 | const optionsScript = document.querySelector('script[type=esms-options]');
|
201 | 201 |
|
202 |
| - const esmsInitOptions$1 = optionsScript ? JSON.parse(optionsScript.innerHTML) : self.esmsInitOptions ? self.esmsInitOptions : {}; |
| 202 | + const esmsInitOptions = optionsScript ? JSON.parse(optionsScript.innerHTML) : self.esmsInitOptions ? self.esmsInitOptions : {}; |
203 | 203 |
|
204 |
| - let shimMode = !!esmsInitOptions$1.shimMode; |
205 |
| - const resolveHook = globalHook(shimMode && esmsInitOptions$1.resolve); |
| 204 | + let shimMode = !!esmsInitOptions.shimMode; |
| 205 | + const resolveHook = globalHook(shimMode && esmsInitOptions.resolve); |
206 | 206 |
|
207 |
| - const skip = esmsInitOptions$1.skip ? new RegExp(esmsInitOptions$1.skip) : null; |
| 207 | + const skip = esmsInitOptions.skip ? new RegExp(esmsInitOptions.skip) : null; |
208 | 208 |
|
209 |
| - let nonce = esmsInitOptions$1.nonce; |
| 209 | + let nonce = esmsInitOptions.nonce; |
210 | 210 |
|
211 | 211 | if (!nonce) {
|
212 | 212 | const nonceElement = document.querySelector('script[nonce]');
|
213 | 213 | if (nonceElement)
|
214 | 214 | nonce = nonceElement.nonce || nonceElement.getAttribute('nonce');
|
215 | 215 | }
|
216 | 216 |
|
217 |
| - const onerror = globalHook(esmsInitOptions$1.onerror || noop); |
218 |
| - const onpolyfill = globalHook(esmsInitOptions$1.onpolyfill || noop); |
| 217 | + const onerror = globalHook(esmsInitOptions.onerror || noop); |
| 218 | + const onpolyfill = globalHook(esmsInitOptions.onpolyfill || noop); |
219 | 219 |
|
220 |
| - const { revokeBlobURLs, noLoadEventRetriggers } = esmsInitOptions$1; |
| 220 | + const { revokeBlobURLs, noLoadEventRetriggers } = esmsInitOptions; |
221 | 221 |
|
222 |
| - const fetchHook = esmsInitOptions$1.fetch ? globalHook(esmsInitOptions$1.fetch) : fetch; |
| 222 | + const fetchHook = esmsInitOptions.fetch ? globalHook(esmsInitOptions.fetch) : fetch; |
223 | 223 |
|
224 | 224 | function globalHook (name) {
|
225 | 225 | return typeof name === 'string' ? self[name] : name;
|
226 | 226 | }
|
227 | 227 |
|
228 |
| - const enable = Array.isArray(esmsInitOptions$1.polyfillEnable) ? esmsInitOptions$1.polyfillEnable : []; |
| 228 | + const enable = Array.isArray(esmsInitOptions.polyfillEnable) ? esmsInitOptions.polyfillEnable : []; |
229 | 229 | const cssModulesEnabled = enable.includes('css-modules');
|
230 | 230 | const jsonModulesEnabled = enable.includes('json-modules');
|
231 | 231 |
|
|
318 | 318 | };
|
319 | 319 | }
|
320 | 320 |
|
321 |
| - const resolve = resolveHook ? async (id, parentUrl) => ({ r: await esmsInitOptions.resolve(id, parentUrl, defaultResolve), b: false }) : _resolve; |
| 321 | + const resolve = resolveHook ? async (id, parentUrl) => ({ r: await resolveHook(id, parentUrl, defaultResolve), b: false }) : _resolve; |
322 | 322 |
|
323 | 323 | let id = 0;
|
324 | 324 | const registry = {};
|
|
0 commit comments