@plasmicpkgs/commerce-local 0.0.4 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -98,201 +98,198 @@ function createCommonjsModule(fn, module) {
98
98
  return module = { exports: {} }, fn(module, module.exports), module.exports;
99
99
  }
100
100
 
101
- var runtime_1 = createCommonjsModule(function (module) {
102
- /**
103
- * Copyright (c) 2014-present, Facebook, Inc.
104
- *
105
- * This source code is licensed under the MIT license found in the
106
- * LICENSE file in the root directory of this source tree.
107
- */
108
-
109
- var runtime = (function (exports) {
110
-
111
- var Op = Object.prototype;
112
- var hasOwn = Op.hasOwnProperty;
113
- var undefined$1; // More compressible than void 0.
114
- var $Symbol = typeof Symbol === "function" ? Symbol : {};
115
- var iteratorSymbol = $Symbol.iterator || "@@iterator";
116
- var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
117
- var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
118
-
119
- function define(obj, key, value) {
120
- Object.defineProperty(obj, key, {
121
- value: value,
122
- enumerable: true,
123
- configurable: true,
124
- writable: true
125
- });
126
- return obj[key];
127
- }
128
- try {
129
- // IE 8 has a broken Object.defineProperty that only works on DOM objects.
130
- define({}, "");
131
- } catch (err) {
132
- define = function(obj, key, value) {
133
- return obj[key] = value;
134
- };
135
- }
136
-
137
- function wrap(innerFn, outerFn, self, tryLocsList) {
138
- // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
139
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
140
- var generator = Object.create(protoGenerator.prototype);
141
- var context = new Context(tryLocsList || []);
142
-
143
- // The ._invoke method unifies the implementations of the .next,
144
- // .throw, and .return methods.
145
- generator._invoke = makeInvokeMethod(innerFn, self, context);
101
+ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
102
+ /**
103
+ * Copyright (c) 2014-present, Facebook, Inc.
104
+ *
105
+ * This source code is licensed under the MIT license found in the
106
+ * LICENSE file in the root directory of this source tree.
107
+ */
108
+ var runtime = function (exports) {
109
+
110
+ var Op = Object.prototype;
111
+ var hasOwn = Op.hasOwnProperty;
112
+ var undefined$1; // More compressible than void 0.
113
+
114
+ var $Symbol = typeof Symbol === "function" ? Symbol : {};
115
+ var iteratorSymbol = $Symbol.iterator || "@@iterator";
116
+ var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
117
+ var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
118
+
119
+ function define(obj, key, value) {
120
+ Object.defineProperty(obj, key, {
121
+ value: value,
122
+ enumerable: true,
123
+ configurable: true,
124
+ writable: true
125
+ });
126
+ return obj[key];
127
+ }
146
128
 
147
- return generator;
148
- }
149
- exports.wrap = wrap;
150
-
151
- // Try/catch helper to minimize deoptimizations. Returns a completion
152
- // record like context.tryEntries[i].completion. This interface could
153
- // have been (and was previously) designed to take a closure to be
154
- // invoked without arguments, but in all the cases we care about we
155
- // already have an existing method we want to call, so there's no need
156
- // to create a new function object. We can even get away with assuming
157
- // the method takes exactly one argument, since that happens to be true
158
- // in every case, so we don't have to touch the arguments object. The
159
- // only additional allocation required is the completion record, which
160
- // has a stable shape and so hopefully should be cheap to allocate.
161
- function tryCatch(fn, obj, arg) {
162
129
  try {
163
- return { type: "normal", arg: fn.call(obj, arg) };
130
+ // IE 8 has a broken Object.defineProperty that only works on DOM objects.
131
+ define({}, "");
164
132
  } catch (err) {
165
- return { type: "throw", arg: err };
133
+ define = function define(obj, key, value) {
134
+ return obj[key] = value;
135
+ };
166
136
  }
167
- }
168
137
 
169
- var GenStateSuspendedStart = "suspendedStart";
170
- var GenStateSuspendedYield = "suspendedYield";
171
- var GenStateExecuting = "executing";
172
- var GenStateCompleted = "completed";
173
-
174
- // Returning this object from the innerFn has the same effect as
175
- // breaking out of the dispatch switch statement.
176
- var ContinueSentinel = {};
177
-
178
- // Dummy constructor functions that we use as the .constructor and
179
- // .constructor.prototype properties for functions that return Generator
180
- // objects. For full spec compliance, you may wish to configure your
181
- // minifier not to mangle the names of these two functions.
182
- function Generator() {}
183
- function GeneratorFunction() {}
184
- function GeneratorFunctionPrototype() {}
185
-
186
- // This is a polyfill for %IteratorPrototype% for environments that
187
- // don't natively support it.
188
- var IteratorPrototype = {};
189
- define(IteratorPrototype, iteratorSymbol, function () {
190
- return this;
191
- });
192
-
193
- var getProto = Object.getPrototypeOf;
194
- var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
195
- if (NativeIteratorPrototype &&
196
- NativeIteratorPrototype !== Op &&
197
- hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
198
- // This environment has a native %IteratorPrototype%; use it instead
199
- // of the polyfill.
200
- IteratorPrototype = NativeIteratorPrototype;
201
- }
138
+ function wrap(innerFn, outerFn, self, tryLocsList) {
139
+ // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
140
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
141
+ var generator = Object.create(protoGenerator.prototype);
142
+ var context = new Context(tryLocsList || []); // The ._invoke method unifies the implementations of the .next,
143
+ // .throw, and .return methods.
202
144
 
203
- var Gp = GeneratorFunctionPrototype.prototype =
204
- Generator.prototype = Object.create(IteratorPrototype);
205
- GeneratorFunction.prototype = GeneratorFunctionPrototype;
206
- define(Gp, "constructor", GeneratorFunctionPrototype);
207
- define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
208
- GeneratorFunction.displayName = define(
209
- GeneratorFunctionPrototype,
210
- toStringTagSymbol,
211
- "GeneratorFunction"
212
- );
213
-
214
- // Helper for defining the .next, .throw, and .return methods of the
215
- // Iterator interface in terms of a single ._invoke method.
216
- function defineIteratorMethods(prototype) {
217
- ["next", "throw", "return"].forEach(function(method) {
218
- define(prototype, method, function(arg) {
219
- return this._invoke(method, arg);
220
- });
221
- });
222
- }
145
+ generator._invoke = makeInvokeMethod(innerFn, self, context);
146
+ return generator;
147
+ }
223
148
 
224
- exports.isGeneratorFunction = function(genFun) {
225
- var ctor = typeof genFun === "function" && genFun.constructor;
226
- return ctor
227
- ? ctor === GeneratorFunction ||
228
- // For the native GeneratorFunction constructor, the best we can
229
- // do is to check its .name property.
230
- (ctor.displayName || ctor.name) === "GeneratorFunction"
231
- : false;
232
- };
149
+ exports.wrap = wrap; // Try/catch helper to minimize deoptimizations. Returns a completion
150
+ // record like context.tryEntries[i].completion. This interface could
151
+ // have been (and was previously) designed to take a closure to be
152
+ // invoked without arguments, but in all the cases we care about we
153
+ // already have an existing method we want to call, so there's no need
154
+ // to create a new function object. We can even get away with assuming
155
+ // the method takes exactly one argument, since that happens to be true
156
+ // in every case, so we don't have to touch the arguments object. The
157
+ // only additional allocation required is the completion record, which
158
+ // has a stable shape and so hopefully should be cheap to allocate.
159
+
160
+ function tryCatch(fn, obj, arg) {
161
+ try {
162
+ return {
163
+ type: "normal",
164
+ arg: fn.call(obj, arg)
165
+ };
166
+ } catch (err) {
167
+ return {
168
+ type: "throw",
169
+ arg: err
170
+ };
171
+ }
172
+ }
173
+
174
+ var GenStateSuspendedStart = "suspendedStart";
175
+ var GenStateSuspendedYield = "suspendedYield";
176
+ var GenStateExecuting = "executing";
177
+ var GenStateCompleted = "completed"; // Returning this object from the innerFn has the same effect as
178
+ // breaking out of the dispatch switch statement.
179
+
180
+ var ContinueSentinel = {}; // Dummy constructor functions that we use as the .constructor and
181
+ // .constructor.prototype properties for functions that return Generator
182
+ // objects. For full spec compliance, you may wish to configure your
183
+ // minifier not to mangle the names of these two functions.
184
+
185
+ function Generator() {}
186
+
187
+ function GeneratorFunction() {}
188
+
189
+ function GeneratorFunctionPrototype() {} // This is a polyfill for %IteratorPrototype% for environments that
190
+ // don't natively support it.
191
+
192
+
193
+ var IteratorPrototype = {};
233
194
 
234
- exports.mark = function(genFun) {
235
- if (Object.setPrototypeOf) {
236
- Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
237
- } else {
238
- genFun.__proto__ = GeneratorFunctionPrototype;
239
- define(genFun, toStringTagSymbol, "GeneratorFunction");
195
+ IteratorPrototype[iteratorSymbol] = function () {
196
+ return this;
197
+ };
198
+
199
+ var getProto = Object.getPrototypeOf;
200
+ var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
201
+
202
+ if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
203
+ // This environment has a native %IteratorPrototype%; use it instead
204
+ // of the polyfill.
205
+ IteratorPrototype = NativeIteratorPrototype;
240
206
  }
241
- genFun.prototype = Object.create(Gp);
242
- return genFun;
243
- };
244
207
 
245
- // Within the body of any async function, `await x` is transformed to
246
- // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
247
- // `hasOwn.call(value, "__await")` to determine if the yielded value is
248
- // meant to be awaited.
249
- exports.awrap = function(arg) {
250
- return { __await: arg };
251
- };
208
+ var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
209
+ GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
210
+ GeneratorFunctionPrototype.constructor = GeneratorFunction;
211
+ GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"); // Helper for defining the .next, .throw, and .return methods of the
212
+ // Iterator interface in terms of a single ._invoke method.
252
213
 
253
- function AsyncIterator(generator, PromiseImpl) {
254
- function invoke(method, arg, resolve, reject) {
255
- var record = tryCatch(generator[method], generator, arg);
256
- if (record.type === "throw") {
257
- reject(record.arg);
214
+ function defineIteratorMethods(prototype) {
215
+ ["next", "throw", "return"].forEach(function (method) {
216
+ define(prototype, method, function (arg) {
217
+ return this._invoke(method, arg);
218
+ });
219
+ });
220
+ }
221
+
222
+ exports.isGeneratorFunction = function (genFun) {
223
+ var ctor = typeof genFun === "function" && genFun.constructor;
224
+ return ctor ? ctor === GeneratorFunction || // For the native GeneratorFunction constructor, the best we can
225
+ // do is to check its .name property.
226
+ (ctor.displayName || ctor.name) === "GeneratorFunction" : false;
227
+ };
228
+
229
+ exports.mark = function (genFun) {
230
+ if (Object.setPrototypeOf) {
231
+ Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
258
232
  } else {
259
- var result = record.arg;
260
- var value = result.value;
261
- if (value &&
262
- typeof value === "object" &&
263
- hasOwn.call(value, "__await")) {
264
- return PromiseImpl.resolve(value.__await).then(function(value) {
265
- invoke("next", value, resolve, reject);
266
- }, function(err) {
267
- invoke("throw", err, resolve, reject);
233
+ genFun.__proto__ = GeneratorFunctionPrototype;
234
+ define(genFun, toStringTagSymbol, "GeneratorFunction");
235
+ }
236
+
237
+ genFun.prototype = Object.create(Gp);
238
+ return genFun;
239
+ }; // Within the body of any async function, `await x` is transformed to
240
+ // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
241
+ // `hasOwn.call(value, "__await")` to determine if the yielded value is
242
+ // meant to be awaited.
243
+
244
+
245
+ exports.awrap = function (arg) {
246
+ return {
247
+ __await: arg
248
+ };
249
+ };
250
+
251
+ function AsyncIterator(generator, PromiseImpl) {
252
+ function invoke(method, arg, resolve, reject) {
253
+ var record = tryCatch(generator[method], generator, arg);
254
+
255
+ if (record.type === "throw") {
256
+ reject(record.arg);
257
+ } else {
258
+ var result = record.arg;
259
+ var value = result.value;
260
+
261
+ if (value && typeof value === "object" && hasOwn.call(value, "__await")) {
262
+ return PromiseImpl.resolve(value.__await).then(function (value) {
263
+ invoke("next", value, resolve, reject);
264
+ }, function (err) {
265
+ invoke("throw", err, resolve, reject);
266
+ });
267
+ }
268
+
269
+ return PromiseImpl.resolve(value).then(function (unwrapped) {
270
+ // When a yielded Promise is resolved, its final value becomes
271
+ // the .value of the Promise<{value,done}> result for the
272
+ // current iteration.
273
+ result.value = unwrapped;
274
+ resolve(result);
275
+ }, function (error) {
276
+ // If a rejected Promise was yielded, throw the rejection back
277
+ // into the async generator function so it can be handled there.
278
+ return invoke("throw", error, resolve, reject);
268
279
  });
269
280
  }
270
-
271
- return PromiseImpl.resolve(value).then(function(unwrapped) {
272
- // When a yielded Promise is resolved, its final value becomes
273
- // the .value of the Promise<{value,done}> result for the
274
- // current iteration.
275
- result.value = unwrapped;
276
- resolve(result);
277
- }, function(error) {
278
- // If a rejected Promise was yielded, throw the rejection back
279
- // into the async generator function so it can be handled there.
280
- return invoke("throw", error, resolve, reject);
281
- });
282
281
  }
283
- }
284
282
 
285
- var previousPromise;
283
+ var previousPromise;
286
284
 
287
- function enqueue(method, arg) {
288
- function callInvokeWithMethodAndArg() {
289
- return new PromiseImpl(function(resolve, reject) {
290
- invoke(method, arg, resolve, reject);
291
- });
292
- }
285
+ function enqueue(method, arg) {
286
+ function callInvokeWithMethodAndArg() {
287
+ return new PromiseImpl(function (resolve, reject) {
288
+ invoke(method, arg, resolve, reject);
289
+ });
290
+ }
293
291
 
294
- return previousPromise =
295
- // If enqueue has been called before, then we want to wait until
292
+ return previousPromise = // If enqueue has been called before, then we want to wait until
296
293
  // all previous Promises have been resolved before calling invoke,
297
294
  // so that results are always delivered in the correct order. If
298
295
  // enqueue has not been called before, then it is important to
@@ -304,554 +301,525 @@ var runtime = (function (exports) {
304
301
  // execute code before the first await. Since we implement simple
305
302
  // async functions in terms of async generators, it is especially
306
303
  // important to get this right, even though it requires care.
307
- previousPromise ? previousPromise.then(
308
- callInvokeWithMethodAndArg,
309
- // Avoid propagating failures to Promises returned by later
310
- // invocations of the iterator.
311
- callInvokeWithMethodAndArg
312
- ) : callInvokeWithMethodAndArg();
304
+ previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, // Avoid propagating failures to Promises returned by later
305
+ // invocations of the iterator.
306
+ callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
307
+ } // Define the unified helper method that is used to implement .next,
308
+ // .throw, and .return (see defineIteratorMethods).
309
+
310
+
311
+ this._invoke = enqueue;
313
312
  }
314
313
 
315
- // Define the unified helper method that is used to implement .next,
316
- // .throw, and .return (see defineIteratorMethods).
317
- this._invoke = enqueue;
318
- }
314
+ defineIteratorMethods(AsyncIterator.prototype);
319
315
 
320
- defineIteratorMethods(AsyncIterator.prototype);
321
- define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
322
- return this;
323
- });
324
- exports.AsyncIterator = AsyncIterator;
325
-
326
- // Note that simple async functions are implemented on top of
327
- // AsyncIterator objects; they just return a Promise for the value of
328
- // the final result produced by the iterator.
329
- exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
330
- if (PromiseImpl === void 0) PromiseImpl = Promise;
331
-
332
- var iter = new AsyncIterator(
333
- wrap(innerFn, outerFn, self, tryLocsList),
334
- PromiseImpl
335
- );
336
-
337
- return exports.isGeneratorFunction(outerFn)
338
- ? iter // If outerFn is a generator, return the full iterator.
339
- : iter.next().then(function(result) {
340
- return result.done ? result.value : iter.next();
341
- });
342
- };
316
+ AsyncIterator.prototype[asyncIteratorSymbol] = function () {
317
+ return this;
318
+ };
343
319
 
344
- function makeInvokeMethod(innerFn, self, context) {
345
- var state = GenStateSuspendedStart;
320
+ exports.AsyncIterator = AsyncIterator; // Note that simple async functions are implemented on top of
321
+ // AsyncIterator objects; they just return a Promise for the value of
322
+ // the final result produced by the iterator.
346
323
 
347
- return function invoke(method, arg) {
348
- if (state === GenStateExecuting) {
349
- throw new Error("Generator is already running");
350
- }
324
+ exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
325
+ if (PromiseImpl === void 0) PromiseImpl = Promise;
326
+ var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
327
+ return exports.isGeneratorFunction(outerFn) ? iter // If outerFn is a generator, return the full iterator.
328
+ : iter.next().then(function (result) {
329
+ return result.done ? result.value : iter.next();
330
+ });
331
+ };
351
332
 
352
- if (state === GenStateCompleted) {
353
- if (method === "throw") {
354
- throw arg;
333
+ function makeInvokeMethod(innerFn, self, context) {
334
+ var state = GenStateSuspendedStart;
335
+ return function invoke(method, arg) {
336
+ if (state === GenStateExecuting) {
337
+ throw new Error("Generator is already running");
355
338
  }
356
339
 
357
- // Be forgiving, per 25.3.3.3.3 of the spec:
358
- // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
359
- return doneResult();
360
- }
340
+ if (state === GenStateCompleted) {
341
+ if (method === "throw") {
342
+ throw arg;
343
+ } // Be forgiving, per 25.3.3.3.3 of the spec:
344
+ // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
361
345
 
362
- context.method = method;
363
- context.arg = arg;
364
346
 
365
- while (true) {
366
- var delegate = context.delegate;
367
- if (delegate) {
368
- var delegateResult = maybeInvokeDelegate(delegate, context);
369
- if (delegateResult) {
370
- if (delegateResult === ContinueSentinel) continue;
371
- return delegateResult;
372
- }
347
+ return doneResult();
373
348
  }
374
349
 
375
- if (context.method === "next") {
376
- // Setting context._sent for legacy support of Babel's
377
- // function.sent implementation.
378
- context.sent = context._sent = context.arg;
350
+ context.method = method;
351
+ context.arg = arg;
379
352
 
380
- } else if (context.method === "throw") {
381
- if (state === GenStateSuspendedStart) {
382
- state = GenStateCompleted;
383
- throw context.arg;
353
+ while (true) {
354
+ var delegate = context.delegate;
355
+
356
+ if (delegate) {
357
+ var delegateResult = maybeInvokeDelegate(delegate, context);
358
+
359
+ if (delegateResult) {
360
+ if (delegateResult === ContinueSentinel) continue;
361
+ return delegateResult;
362
+ }
384
363
  }
385
364
 
386
- context.dispatchException(context.arg);
365
+ if (context.method === "next") {
366
+ // Setting context._sent for legacy support of Babel's
367
+ // function.sent implementation.
368
+ context.sent = context._sent = context.arg;
369
+ } else if (context.method === "throw") {
370
+ if (state === GenStateSuspendedStart) {
371
+ state = GenStateCompleted;
372
+ throw context.arg;
373
+ }
387
374
 
388
- } else if (context.method === "return") {
389
- context.abrupt("return", context.arg);
390
- }
375
+ context.dispatchException(context.arg);
376
+ } else if (context.method === "return") {
377
+ context.abrupt("return", context.arg);
378
+ }
391
379
 
392
- state = GenStateExecuting;
380
+ state = GenStateExecuting;
381
+ var record = tryCatch(innerFn, self, context);
393
382
 
394
- var record = tryCatch(innerFn, self, context);
395
- if (record.type === "normal") {
396
- // If an exception is thrown from innerFn, we leave state ===
397
- // GenStateExecuting and loop back for another invocation.
398
- state = context.done
399
- ? GenStateCompleted
400
- : GenStateSuspendedYield;
383
+ if (record.type === "normal") {
384
+ // If an exception is thrown from innerFn, we leave state ===
385
+ // GenStateExecuting and loop back for another invocation.
386
+ state = context.done ? GenStateCompleted : GenStateSuspendedYield;
401
387
 
402
- if (record.arg === ContinueSentinel) {
403
- continue;
404
- }
388
+ if (record.arg === ContinueSentinel) {
389
+ continue;
390
+ }
405
391
 
406
- return {
407
- value: record.arg,
408
- done: context.done
409
- };
392
+ return {
393
+ value: record.arg,
394
+ done: context.done
395
+ };
396
+ } else if (record.type === "throw") {
397
+ state = GenStateCompleted; // Dispatch the exception by looping back around to the
398
+ // context.dispatchException(context.arg) call above.
399
+
400
+ context.method = "throw";
401
+ context.arg = record.arg;
402
+ }
403
+ }
404
+ };
405
+ } // Call delegate.iterator[context.method](context.arg) and handle the
406
+ // result, either by returning a { value, done } result from the
407
+ // delegate iterator, or by modifying context.method and context.arg,
408
+ // setting context.delegate to null, and returning the ContinueSentinel.
409
+
410
+
411
+ function maybeInvokeDelegate(delegate, context) {
412
+ var method = delegate.iterator[context.method];
413
+
414
+ if (method === undefined$1) {
415
+ // A .throw or .return when the delegate iterator has no .throw
416
+ // method always terminates the yield* loop.
417
+ context.delegate = null;
418
+
419
+ if (context.method === "throw") {
420
+ // Note: ["return"] must be used for ES3 parsing compatibility.
421
+ if (delegate.iterator["return"]) {
422
+ // If the delegate iterator has a return method, give it a
423
+ // chance to clean up.
424
+ context.method = "return";
425
+ context.arg = undefined$1;
426
+ maybeInvokeDelegate(delegate, context);
427
+
428
+ if (context.method === "throw") {
429
+ // If maybeInvokeDelegate(context) changed context.method from
430
+ // "return" to "throw", let that override the TypeError below.
431
+ return ContinueSentinel;
432
+ }
433
+ }
410
434
 
411
- } else if (record.type === "throw") {
412
- state = GenStateCompleted;
413
- // Dispatch the exception by looping back around to the
414
- // context.dispatchException(context.arg) call above.
415
435
  context.method = "throw";
416
- context.arg = record.arg;
436
+ context.arg = new TypeError("The iterator does not provide a 'throw' method");
417
437
  }
438
+
439
+ return ContinueSentinel;
418
440
  }
419
- };
420
- }
421
441
 
422
- // Call delegate.iterator[context.method](context.arg) and handle the
423
- // result, either by returning a { value, done } result from the
424
- // delegate iterator, or by modifying context.method and context.arg,
425
- // setting context.delegate to null, and returning the ContinueSentinel.
426
- function maybeInvokeDelegate(delegate, context) {
427
- var method = delegate.iterator[context.method];
428
- if (method === undefined$1) {
429
- // A .throw or .return when the delegate iterator has no .throw
430
- // method always terminates the yield* loop.
431
- context.delegate = null;
442
+ var record = tryCatch(method, delegate.iterator, context.arg);
432
443
 
433
- if (context.method === "throw") {
434
- // Note: ["return"] must be used for ES3 parsing compatibility.
435
- if (delegate.iterator["return"]) {
436
- // If the delegate iterator has a return method, give it a
437
- // chance to clean up.
438
- context.method = "return";
439
- context.arg = undefined$1;
440
- maybeInvokeDelegate(delegate, context);
444
+ if (record.type === "throw") {
445
+ context.method = "throw";
446
+ context.arg = record.arg;
447
+ context.delegate = null;
448
+ return ContinueSentinel;
449
+ }
441
450
 
442
- if (context.method === "throw") {
443
- // If maybeInvokeDelegate(context) changed context.method from
444
- // "return" to "throw", let that override the TypeError below.
445
- return ContinueSentinel;
446
- }
447
- }
451
+ var info = record.arg;
448
452
 
453
+ if (!info) {
449
454
  context.method = "throw";
450
- context.arg = new TypeError(
451
- "The iterator does not provide a 'throw' method");
455
+ context.arg = new TypeError("iterator result is not an object");
456
+ context.delegate = null;
457
+ return ContinueSentinel;
452
458
  }
453
459
 
454
- return ContinueSentinel;
455
- }
460
+ if (info.done) {
461
+ // Assign the result of the finished delegate to the temporary
462
+ // variable specified by delegate.resultName (see delegateYield).
463
+ context[delegate.resultName] = info.value; // Resume execution at the desired location (see delegateYield).
456
464
 
457
- var record = tryCatch(method, delegate.iterator, context.arg);
465
+ context.next = delegate.nextLoc; // If context.method was "throw" but the delegate handled the
466
+ // exception, let the outer generator proceed normally. If
467
+ // context.method was "next", forget context.arg since it has been
468
+ // "consumed" by the delegate iterator. If context.method was
469
+ // "return", allow the original .return call to continue in the
470
+ // outer generator.
458
471
 
459
- if (record.type === "throw") {
460
- context.method = "throw";
461
- context.arg = record.arg;
462
- context.delegate = null;
463
- return ContinueSentinel;
464
- }
472
+ if (context.method !== "return") {
473
+ context.method = "next";
474
+ context.arg = undefined$1;
475
+ }
476
+ } else {
477
+ // Re-yield the result returned by the delegate method.
478
+ return info;
479
+ } // The delegate iterator is finished, so forget it and continue with
480
+ // the outer generator.
465
481
 
466
- var info = record.arg;
467
482
 
468
- if (! info) {
469
- context.method = "throw";
470
- context.arg = new TypeError("iterator result is not an object");
471
483
  context.delegate = null;
472
484
  return ContinueSentinel;
473
- }
485
+ } // Define Generator.prototype.{next,throw,return} in terms of the
486
+ // unified ._invoke helper method.
474
487
 
475
- if (info.done) {
476
- // Assign the result of the finished delegate to the temporary
477
- // variable specified by delegate.resultName (see delegateYield).
478
- context[delegate.resultName] = info.value;
479
-
480
- // Resume execution at the desired location (see delegateYield).
481
- context.next = delegate.nextLoc;
482
-
483
- // If context.method was "throw" but the delegate handled the
484
- // exception, let the outer generator proceed normally. If
485
- // context.method was "next", forget context.arg since it has been
486
- // "consumed" by the delegate iterator. If context.method was
487
- // "return", allow the original .return call to continue in the
488
- // outer generator.
489
- if (context.method !== "return") {
490
- context.method = "next";
491
- context.arg = undefined$1;
492
- }
493
488
 
494
- } else {
495
- // Re-yield the result returned by the delegate method.
496
- return info;
497
- }
489
+ defineIteratorMethods(Gp);
490
+ define(Gp, toStringTagSymbol, "Generator"); // A Generator should always return itself as the iterator object when the
491
+ // @@iterator function is called on it. Some browsers' implementations of the
492
+ // iterator prototype chain incorrectly implement this, causing the Generator
493
+ // object to not be returned from this call. This ensures that doesn't happen.
494
+ // See https://github.com/facebook/regenerator/issues/274 for more details.
498
495
 
499
- // The delegate iterator is finished, so forget it and continue with
500
- // the outer generator.
501
- context.delegate = null;
502
- return ContinueSentinel;
503
- }
504
-
505
- // Define Generator.prototype.{next,throw,return} in terms of the
506
- // unified ._invoke helper method.
507
- defineIteratorMethods(Gp);
496
+ Gp[iteratorSymbol] = function () {
497
+ return this;
498
+ };
508
499
 
509
- define(Gp, toStringTagSymbol, "Generator");
500
+ Gp.toString = function () {
501
+ return "[object Generator]";
502
+ };
510
503
 
511
- // A Generator should always return itself as the iterator object when the
512
- // @@iterator function is called on it. Some browsers' implementations of the
513
- // iterator prototype chain incorrectly implement this, causing the Generator
514
- // object to not be returned from this call. This ensures that doesn't happen.
515
- // See https://github.com/facebook/regenerator/issues/274 for more details.
516
- define(Gp, iteratorSymbol, function() {
517
- return this;
518
- });
504
+ function pushTryEntry(locs) {
505
+ var entry = {
506
+ tryLoc: locs[0]
507
+ };
519
508
 
520
- define(Gp, "toString", function() {
521
- return "[object Generator]";
522
- });
509
+ if (1 in locs) {
510
+ entry.catchLoc = locs[1];
511
+ }
523
512
 
524
- function pushTryEntry(locs) {
525
- var entry = { tryLoc: locs[0] };
513
+ if (2 in locs) {
514
+ entry.finallyLoc = locs[2];
515
+ entry.afterLoc = locs[3];
516
+ }
526
517
 
527
- if (1 in locs) {
528
- entry.catchLoc = locs[1];
518
+ this.tryEntries.push(entry);
529
519
  }
530
520
 
531
- if (2 in locs) {
532
- entry.finallyLoc = locs[2];
533
- entry.afterLoc = locs[3];
521
+ function resetTryEntry(entry) {
522
+ var record = entry.completion || {};
523
+ record.type = "normal";
524
+ delete record.arg;
525
+ entry.completion = record;
534
526
  }
535
527
 
536
- this.tryEntries.push(entry);
537
- }
538
-
539
- function resetTryEntry(entry) {
540
- var record = entry.completion || {};
541
- record.type = "normal";
542
- delete record.arg;
543
- entry.completion = record;
544
- }
545
-
546
- function Context(tryLocsList) {
547
- // The root entry object (effectively a try statement without a catch
548
- // or a finally block) gives us a place to store values thrown from
549
- // locations where there is no enclosing try statement.
550
- this.tryEntries = [{ tryLoc: "root" }];
551
- tryLocsList.forEach(pushTryEntry, this);
552
- this.reset(true);
553
- }
554
-
555
- exports.keys = function(object) {
556
- var keys = [];
557
- for (var key in object) {
558
- keys.push(key);
528
+ function Context(tryLocsList) {
529
+ // The root entry object (effectively a try statement without a catch
530
+ // or a finally block) gives us a place to store values thrown from
531
+ // locations where there is no enclosing try statement.
532
+ this.tryEntries = [{
533
+ tryLoc: "root"
534
+ }];
535
+ tryLocsList.forEach(pushTryEntry, this);
536
+ this.reset(true);
559
537
  }
560
- keys.reverse();
561
-
562
- // Rather than returning an object with a next method, we keep
563
- // things simple and return the next function itself.
564
- return function next() {
565
- while (keys.length) {
566
- var key = keys.pop();
567
- if (key in object) {
568
- next.value = key;
569
- next.done = false;
570
- return next;
571
- }
572
- }
573
538
 
574
- // To avoid creating an additional object, we just hang the .value
575
- // and .done properties off the next function object itself. This
576
- // also ensures that the minifier will not anonymize the function.
577
- next.done = true;
578
- return next;
579
- };
580
- };
539
+ exports.keys = function (object) {
540
+ var keys = [];
581
541
 
582
- function values(iterable) {
583
- if (iterable) {
584
- var iteratorMethod = iterable[iteratorSymbol];
585
- if (iteratorMethod) {
586
- return iteratorMethod.call(iterable);
542
+ for (var key in object) {
543
+ keys.push(key);
587
544
  }
588
545
 
589
- if (typeof iterable.next === "function") {
590
- return iterable;
591
- }
546
+ keys.reverse(); // Rather than returning an object with a next method, we keep
547
+ // things simple and return the next function itself.
592
548
 
593
- if (!isNaN(iterable.length)) {
594
- var i = -1, next = function next() {
595
- while (++i < iterable.length) {
596
- if (hasOwn.call(iterable, i)) {
597
- next.value = iterable[i];
598
- next.done = false;
599
- return next;
600
- }
601
- }
549
+ return function next() {
550
+ while (keys.length) {
551
+ var key = keys.pop();
602
552
 
603
- next.value = undefined$1;
604
- next.done = true;
553
+ if (key in object) {
554
+ next.value = key;
555
+ next.done = false;
556
+ return next;
557
+ }
558
+ } // To avoid creating an additional object, we just hang the .value
559
+ // and .done properties off the next function object itself. This
560
+ // also ensures that the minifier will not anonymize the function.
605
561
 
606
- return next;
607
- };
608
562
 
609
- return next.next = next;
610
- }
611
- }
612
-
613
- // Return an iterator with no values.
614
- return { next: doneResult };
615
- }
616
- exports.values = values;
563
+ next.done = true;
564
+ return next;
565
+ };
566
+ };
617
567
 
618
- function doneResult() {
619
- return { value: undefined$1, done: true };
620
- }
568
+ function values(iterable) {
569
+ if (iterable) {
570
+ var iteratorMethod = iterable[iteratorSymbol];
621
571
 
622
- Context.prototype = {
623
- constructor: Context,
624
-
625
- reset: function(skipTempReset) {
626
- this.prev = 0;
627
- this.next = 0;
628
- // Resetting context._sent for legacy support of Babel's
629
- // function.sent implementation.
630
- this.sent = this._sent = undefined$1;
631
- this.done = false;
632
- this.delegate = null;
633
-
634
- this.method = "next";
635
- this.arg = undefined$1;
636
-
637
- this.tryEntries.forEach(resetTryEntry);
638
-
639
- if (!skipTempReset) {
640
- for (var name in this) {
641
- // Not sure about the optimal order of these conditions:
642
- if (name.charAt(0) === "t" &&
643
- hasOwn.call(this, name) &&
644
- !isNaN(+name.slice(1))) {
645
- this[name] = undefined$1;
646
- }
572
+ if (iteratorMethod) {
573
+ return iteratorMethod.call(iterable);
647
574
  }
648
- }
649
- },
650
-
651
- stop: function() {
652
- this.done = true;
653
575
 
654
- var rootEntry = this.tryEntries[0];
655
- var rootRecord = rootEntry.completion;
656
- if (rootRecord.type === "throw") {
657
- throw rootRecord.arg;
658
- }
659
-
660
- return this.rval;
661
- },
576
+ if (typeof iterable.next === "function") {
577
+ return iterable;
578
+ }
662
579
 
663
- dispatchException: function(exception) {
664
- if (this.done) {
665
- throw exception;
666
- }
580
+ if (!isNaN(iterable.length)) {
581
+ var i = -1,
582
+ next = function next() {
583
+ while (++i < iterable.length) {
584
+ if (hasOwn.call(iterable, i)) {
585
+ next.value = iterable[i];
586
+ next.done = false;
587
+ return next;
588
+ }
589
+ }
667
590
 
668
- var context = this;
669
- function handle(loc, caught) {
670
- record.type = "throw";
671
- record.arg = exception;
672
- context.next = loc;
591
+ next.value = undefined$1;
592
+ next.done = true;
593
+ return next;
594
+ };
673
595
 
674
- if (caught) {
675
- // If the dispatched exception was caught by a catch block,
676
- // then let that catch block handle the exception normally.
677
- context.method = "next";
678
- context.arg = undefined$1;
596
+ return next.next = next;
679
597
  }
598
+ } // Return an iterator with no values.
680
599
 
681
- return !! caught;
682
- }
683
600
 
684
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
685
- var entry = this.tryEntries[i];
686
- var record = entry.completion;
601
+ return {
602
+ next: doneResult
603
+ };
604
+ }
687
605
 
688
- if (entry.tryLoc === "root") {
689
- // Exception thrown outside of any try block that could handle
690
- // it, so set the completion value of the entire function to
691
- // throw the exception.
692
- return handle("end");
693
- }
606
+ exports.values = values;
694
607
 
695
- if (entry.tryLoc <= this.prev) {
696
- var hasCatch = hasOwn.call(entry, "catchLoc");
697
- var hasFinally = hasOwn.call(entry, "finallyLoc");
608
+ function doneResult() {
609
+ return {
610
+ value: undefined$1,
611
+ done: true
612
+ };
613
+ }
698
614
 
699
- if (hasCatch && hasFinally) {
700
- if (this.prev < entry.catchLoc) {
701
- return handle(entry.catchLoc, true);
702
- } else if (this.prev < entry.finallyLoc) {
703
- return handle(entry.finallyLoc);
704
- }
615
+ Context.prototype = {
616
+ constructor: Context,
617
+ reset: function reset(skipTempReset) {
618
+ this.prev = 0;
619
+ this.next = 0; // Resetting context._sent for legacy support of Babel's
620
+ // function.sent implementation.
705
621
 
706
- } else if (hasCatch) {
707
- if (this.prev < entry.catchLoc) {
708
- return handle(entry.catchLoc, true);
709
- }
622
+ this.sent = this._sent = undefined$1;
623
+ this.done = false;
624
+ this.delegate = null;
625
+ this.method = "next";
626
+ this.arg = undefined$1;
627
+ this.tryEntries.forEach(resetTryEntry);
710
628
 
711
- } else if (hasFinally) {
712
- if (this.prev < entry.finallyLoc) {
713
- return handle(entry.finallyLoc);
629
+ if (!skipTempReset) {
630
+ for (var name in this) {
631
+ // Not sure about the optimal order of these conditions:
632
+ if (name.charAt(0) === "t" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) {
633
+ this[name] = undefined$1;
714
634
  }
715
-
716
- } else {
717
- throw new Error("try statement without catch or finally");
718
635
  }
719
636
  }
720
- }
721
- },
637
+ },
638
+ stop: function stop() {
639
+ this.done = true;
640
+ var rootEntry = this.tryEntries[0];
641
+ var rootRecord = rootEntry.completion;
642
+
643
+ if (rootRecord.type === "throw") {
644
+ throw rootRecord.arg;
645
+ }
722
646
 
723
- abrupt: function(type, arg) {
724
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
725
- var entry = this.tryEntries[i];
726
- if (entry.tryLoc <= this.prev &&
727
- hasOwn.call(entry, "finallyLoc") &&
728
- this.prev < entry.finallyLoc) {
729
- var finallyEntry = entry;
730
- break;
647
+ return this.rval;
648
+ },
649
+ dispatchException: function dispatchException(exception) {
650
+ if (this.done) {
651
+ throw exception;
731
652
  }
732
- }
733
653
 
734
- if (finallyEntry &&
735
- (type === "break" ||
736
- type === "continue") &&
737
- finallyEntry.tryLoc <= arg &&
738
- arg <= finallyEntry.finallyLoc) {
739
- // Ignore the finally entry if control is not jumping to a
740
- // location outside the try/catch block.
741
- finallyEntry = null;
742
- }
654
+ var context = this;
743
655
 
744
- var record = finallyEntry ? finallyEntry.completion : {};
745
- record.type = type;
746
- record.arg = arg;
656
+ function handle(loc, caught) {
657
+ record.type = "throw";
658
+ record.arg = exception;
659
+ context.next = loc;
747
660
 
748
- if (finallyEntry) {
749
- this.method = "next";
750
- this.next = finallyEntry.finallyLoc;
751
- return ContinueSentinel;
752
- }
661
+ if (caught) {
662
+ // If the dispatched exception was caught by a catch block,
663
+ // then let that catch block handle the exception normally.
664
+ context.method = "next";
665
+ context.arg = undefined$1;
666
+ }
753
667
 
754
- return this.complete(record);
755
- },
668
+ return !!caught;
669
+ }
756
670
 
757
- complete: function(record, afterLoc) {
758
- if (record.type === "throw") {
759
- throw record.arg;
760
- }
671
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
672
+ var entry = this.tryEntries[i];
673
+ var record = entry.completion;
761
674
 
762
- if (record.type === "break" ||
763
- record.type === "continue") {
764
- this.next = record.arg;
765
- } else if (record.type === "return") {
766
- this.rval = this.arg = record.arg;
767
- this.method = "return";
768
- this.next = "end";
769
- } else if (record.type === "normal" && afterLoc) {
770
- this.next = afterLoc;
771
- }
675
+ if (entry.tryLoc === "root") {
676
+ // Exception thrown outside of any try block that could handle
677
+ // it, so set the completion value of the entire function to
678
+ // throw the exception.
679
+ return handle("end");
680
+ }
772
681
 
773
- return ContinueSentinel;
774
- },
682
+ if (entry.tryLoc <= this.prev) {
683
+ var hasCatch = hasOwn.call(entry, "catchLoc");
684
+ var hasFinally = hasOwn.call(entry, "finallyLoc");
775
685
 
776
- finish: function(finallyLoc) {
777
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
778
- var entry = this.tryEntries[i];
779
- if (entry.finallyLoc === finallyLoc) {
780
- this.complete(entry.completion, entry.afterLoc);
781
- resetTryEntry(entry);
686
+ if (hasCatch && hasFinally) {
687
+ if (this.prev < entry.catchLoc) {
688
+ return handle(entry.catchLoc, true);
689
+ } else if (this.prev < entry.finallyLoc) {
690
+ return handle(entry.finallyLoc);
691
+ }
692
+ } else if (hasCatch) {
693
+ if (this.prev < entry.catchLoc) {
694
+ return handle(entry.catchLoc, true);
695
+ }
696
+ } else if (hasFinally) {
697
+ if (this.prev < entry.finallyLoc) {
698
+ return handle(entry.finallyLoc);
699
+ }
700
+ } else {
701
+ throw new Error("try statement without catch or finally");
702
+ }
703
+ }
704
+ }
705
+ },
706
+ abrupt: function abrupt(type, arg) {
707
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
708
+ var entry = this.tryEntries[i];
709
+
710
+ if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
711
+ var finallyEntry = entry;
712
+ break;
713
+ }
714
+ }
715
+
716
+ if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) {
717
+ // Ignore the finally entry if control is not jumping to a
718
+ // location outside the try/catch block.
719
+ finallyEntry = null;
720
+ }
721
+
722
+ var record = finallyEntry ? finallyEntry.completion : {};
723
+ record.type = type;
724
+ record.arg = arg;
725
+
726
+ if (finallyEntry) {
727
+ this.method = "next";
728
+ this.next = finallyEntry.finallyLoc;
782
729
  return ContinueSentinel;
783
730
  }
784
- }
785
- },
786
731
 
787
- "catch": function(tryLoc) {
788
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
789
- var entry = this.tryEntries[i];
790
- if (entry.tryLoc === tryLoc) {
791
- var record = entry.completion;
792
- if (record.type === "throw") {
793
- var thrown = record.arg;
732
+ return this.complete(record);
733
+ },
734
+ complete: function complete(record, afterLoc) {
735
+ if (record.type === "throw") {
736
+ throw record.arg;
737
+ }
738
+
739
+ if (record.type === "break" || record.type === "continue") {
740
+ this.next = record.arg;
741
+ } else if (record.type === "return") {
742
+ this.rval = this.arg = record.arg;
743
+ this.method = "return";
744
+ this.next = "end";
745
+ } else if (record.type === "normal" && afterLoc) {
746
+ this.next = afterLoc;
747
+ }
748
+
749
+ return ContinueSentinel;
750
+ },
751
+ finish: function finish(finallyLoc) {
752
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
753
+ var entry = this.tryEntries[i];
754
+
755
+ if (entry.finallyLoc === finallyLoc) {
756
+ this.complete(entry.completion, entry.afterLoc);
794
757
  resetTryEntry(entry);
758
+ return ContinueSentinel;
795
759
  }
796
- return thrown;
797
760
  }
798
- }
761
+ },
762
+ "catch": function _catch(tryLoc) {
763
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
764
+ var entry = this.tryEntries[i];
799
765
 
800
- // The context.catch method must only be called with a location
801
- // argument that corresponds to a known catch block.
802
- throw new Error("illegal catch attempt");
803
- },
766
+ if (entry.tryLoc === tryLoc) {
767
+ var record = entry.completion;
804
768
 
805
- delegateYield: function(iterable, resultName, nextLoc) {
806
- this.delegate = {
807
- iterator: values(iterable),
808
- resultName: resultName,
809
- nextLoc: nextLoc
810
- };
769
+ if (record.type === "throw") {
770
+ var thrown = record.arg;
771
+ resetTryEntry(entry);
772
+ }
811
773
 
812
- if (this.method === "next") {
813
- // Deliberately forget the last sent value so that we don't
814
- // accidentally pass it on to the delegate.
815
- this.arg = undefined$1;
816
- }
774
+ return thrown;
775
+ }
776
+ } // The context.catch method must only be called with a location
777
+ // argument that corresponds to a known catch block.
817
778
 
818
- return ContinueSentinel;
819
- }
820
- };
821
779
 
822
- // Regardless of whether this script is executing as a CommonJS module
823
- // or not, return the runtime object so that we can declare the variable
824
- // regeneratorRuntime in the outer scope, which allows this module to be
825
- // injected easily by `bin/regenerator --include-runtime script.js`.
826
- return exports;
780
+ throw new Error("illegal catch attempt");
781
+ },
782
+ delegateYield: function delegateYield(iterable, resultName, nextLoc) {
783
+ this.delegate = {
784
+ iterator: values(iterable),
785
+ resultName: resultName,
786
+ nextLoc: nextLoc
787
+ };
788
+
789
+ if (this.method === "next") {
790
+ // Deliberately forget the last sent value so that we don't
791
+ // accidentally pass it on to the delegate.
792
+ this.arg = undefined$1;
793
+ }
794
+
795
+ return ContinueSentinel;
796
+ }
797
+ }; // Regardless of whether this script is executing as a CommonJS module
798
+ // or not, return the runtime object so that we can declare the variable
799
+ // regeneratorRuntime in the outer scope, which allows this module to be
800
+ // injected easily by `bin/regenerator --include-runtime script.js`.
827
801
 
828
- }(
829
- // If this script is executing as a CommonJS module, use module.exports
802
+ return exports;
803
+ }( // If this script is executing as a CommonJS module, use module.exports
830
804
  // as the regeneratorRuntime namespace. Otherwise create a new empty
831
805
  // object. Either way, the resulting object will be used to initialize
832
806
  // the regeneratorRuntime variable at the top of this file.
833
- module.exports
834
- ));
835
-
836
- try {
837
- regeneratorRuntime = runtime;
838
- } catch (accidentalStrictMode) {
839
- // This module should not be running in strict mode, so the above
840
- // assignment should always work unless something is misconfigured. Just
841
- // in case runtime.js accidentally runs in strict mode, in modern engines
842
- // we can explicitly access globalThis. In older engines we can escape
843
- // strict mode using a global Function call. This could conceivably fail
844
- // if a Content Security Policy forbids using Function, but in that case
845
- // the proper solution is to fix the accidental strict mode problem. If
846
- // you've misconfigured your bundler to force strict mode and applied a
847
- // CSP to forbid Function, and you're not willing to fix either of those
848
- // problems, please detail your unique predicament in a GitHub issue.
849
- if (typeof globalThis === "object") {
850
- globalThis.regeneratorRuntime = runtime;
851
- } else {
807
+ module.exports );
808
+
809
+ try {
810
+ regeneratorRuntime = runtime;
811
+ } catch (accidentalStrictMode) {
812
+ // This module should not be running in strict mode, so the above
813
+ // assignment should always work unless something is misconfigured. Just
814
+ // in case runtime.js accidentally runs in strict mode, we can escape
815
+ // strict mode using a global Function call. This could conceivably fail
816
+ // if a Content Security Policy forbids using Function, but in that case
817
+ // the proper solution is to fix the accidental strict mode problem. If
818
+ // you've misconfigured your bundler to force strict mode and applied a
819
+ // CSP to forbid Function, and you're not willing to fix either of those
820
+ // problems, please detail your unique predicament in a GitHub issue.
852
821
  Function("r", "regeneratorRuntime = r")(runtime);
853
822
  }
854
- }
855
823
  });
856
824
 
857
825
  var fetcher = /*#__PURE__*/function () {