| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
export default function _regeneratorRuntime() { |
| 10 |
"use strict"; |
| 11 |
|
| 12 |
|
| 13 |
_regeneratorRuntime = function () { |
| 14 |
return exports; |
| 15 |
}; |
| 16 |
var exports = {}; |
| 17 |
var Op = Object.prototype; |
| 18 |
var hasOwn = Op.hasOwnProperty; |
| 19 |
var defineProperty = |
| 20 |
Object.defineProperty || |
| 21 |
function (obj, key, desc) { |
| 22 |
obj[key] = desc.value; |
| 23 |
}; |
| 24 |
var undefined; |
| 25 |
var $Symbol = typeof Symbol === "function" ? Symbol : {}; |
| 26 |
var iteratorSymbol = $Symbol.iterator || "@@iterator"; |
| 27 |
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator"; |
| 28 |
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; |
| 29 |
function define(obj, key, value) { |
| 30 |
Object.defineProperty(obj, key, { |
| 31 |
value: value, |
| 32 |
enumerable: true, |
| 33 |
configurable: true, |
| 34 |
writable: true, |
| 35 |
}); |
| 36 |
return obj[key]; |
| 37 |
} |
| 38 |
try { |
| 39 |
|
| 40 |
define({}, ""); |
| 41 |
} catch (err) { |
| 42 |
define = function (obj, key, value) { |
| 43 |
return (obj[key] = value); |
| 44 |
}; |
| 45 |
} |
| 46 |
function wrap(innerFn, outerFn, self, tryLocsList) { |
| 47 |
|
| 48 |
var protoGenerator = |
| 49 |
outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; |
| 50 |
var generator = Object.create(protoGenerator.prototype); |
| 51 |
var context = new Context(tryLocsList || []); |
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
defineProperty(generator, "_invoke", { |
| 56 |
value: makeInvokeMethod(innerFn, self, context), |
| 57 |
}); |
| 58 |
return generator; |
| 59 |
} |
| 60 |
exports.wrap = wrap; |
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
function tryCatch(fn, obj, arg) { |
| 73 |
try { |
| 74 |
return { |
| 75 |
type: "normal", |
| 76 |
arg: fn.call(obj, arg), |
| 77 |
}; |
| 78 |
} catch (err) { |
| 79 |
return { |
| 80 |
type: "throw", |
| 81 |
arg: err, |
| 82 |
}; |
| 83 |
} |
| 84 |
} |
| 85 |
var GenStateSuspendedStart = "suspendedStart"; |
| 86 |
var GenStateSuspendedYield = "suspendedYield"; |
| 87 |
var GenStateExecuting = "executing"; |
| 88 |
var GenStateCompleted = "completed"; |
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
var ContinueSentinel = {}; |
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
|
| 98 |
function Generator() {} |
| 99 |
function GeneratorFunction() {} |
| 100 |
function GeneratorFunctionPrototype() {} |
| 101 |
|
| 102 |
|
| 103 |
|
| 104 |
var IteratorPrototype = {}; |
| 105 |
define(IteratorPrototype, iteratorSymbol, function () { |
| 106 |
return this; |
| 107 |
}); |
| 108 |
var getProto = Object.getPrototypeOf; |
| 109 |
var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); |
| 110 |
if ( |
| 111 |
NativeIteratorPrototype && |
| 112 |
NativeIteratorPrototype !== Op && |
| 113 |
hasOwn.call(NativeIteratorPrototype, iteratorSymbol) |
| 114 |
) { |
| 115 |
|
| 116 |
|
| 117 |
IteratorPrototype = NativeIteratorPrototype; |
| 118 |
} |
| 119 |
var Gp = |
| 120 |
(GeneratorFunctionPrototype.prototype = |
| 121 |
Generator.prototype = |
| 122 |
Object.create(IteratorPrototype)); |
| 123 |
GeneratorFunction.prototype = GeneratorFunctionPrototype; |
| 124 |
defineProperty(Gp, "constructor", { |
| 125 |
value: GeneratorFunctionPrototype, |
| 126 |
configurable: true, |
| 127 |
}); |
| 128 |
defineProperty(GeneratorFunctionPrototype, "constructor", { |
| 129 |
value: GeneratorFunction, |
| 130 |
configurable: true, |
| 131 |
}); |
| 132 |
GeneratorFunction.displayName = define( |
| 133 |
GeneratorFunctionPrototype, |
| 134 |
toStringTagSymbol, |
| 135 |
"GeneratorFunction", |
| 136 |
); |
| 137 |
|
| 138 |
|
| 139 |
|
| 140 |
function defineIteratorMethods(prototype) { |
| 141 |
["next", "throw", "return"].forEach(function (method) { |
| 142 |
define(prototype, method, function (arg) { |
| 143 |
return this._invoke(method, arg); |
| 144 |
}); |
| 145 |
}); |
| 146 |
} |
| 147 |
exports.isGeneratorFunction = function (genFun) { |
| 148 |
var ctor = typeof genFun === "function" && genFun.constructor; |
| 149 |
return ctor |
| 150 |
? ctor === GeneratorFunction || |
| 151 |
|
| 152 |
|
| 153 |
(ctor.displayName || ctor.name) === "GeneratorFunction" |
| 154 |
: false; |
| 155 |
}; |
| 156 |
exports.mark = function (genFun) { |
| 157 |
if (Object.setPrototypeOf) { |
| 158 |
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); |
| 159 |
} else { |
| 160 |
genFun.__proto__ = GeneratorFunctionPrototype; |
| 161 |
define(genFun, toStringTagSymbol, "GeneratorFunction"); |
| 162 |
} |
| 163 |
genFun.prototype = Object.create(Gp); |
| 164 |
return genFun; |
| 165 |
}; |
| 166 |
|
| 167 |
|
| 168 |
|
| 169 |
|
| 170 |
|
| 171 |
exports.awrap = function (arg) { |
| 172 |
return { |
| 173 |
__await: arg, |
| 174 |
}; |
| 175 |
}; |
| 176 |
function AsyncIterator(generator, PromiseImpl) { |
| 177 |
function invoke(method, arg, resolve, reject) { |
| 178 |
var record = tryCatch(generator[method], generator, arg); |
| 179 |
if (record.type === "throw") { |
| 180 |
reject(record.arg); |
| 181 |
} else { |
| 182 |
var result = record.arg; |
| 183 |
var value = result.value; |
| 184 |
if ( |
| 185 |
value && |
| 186 |
typeof value === "object" && |
| 187 |
hasOwn.call(value, "__await") |
| 188 |
) { |
| 189 |
return PromiseImpl.resolve(value.__await).then( |
| 190 |
function (value) { |
| 191 |
invoke("next", value, resolve, reject); |
| 192 |
}, |
| 193 |
function (err) { |
| 194 |
invoke("throw", err, resolve, reject); |
| 195 |
}, |
| 196 |
); |
| 197 |
} |
| 198 |
return PromiseImpl.resolve(value).then( |
| 199 |
function (unwrapped) { |
| 200 |
|
| 201 |
|
| 202 |
|
| 203 |
result.value = unwrapped; |
| 204 |
resolve(result); |
| 205 |
}, |
| 206 |
function (error) { |
| 207 |
|
| 208 |
|
| 209 |
return invoke("throw", error, resolve, reject); |
| 210 |
}, |
| 211 |
); |
| 212 |
} |
| 213 |
} |
| 214 |
var previousPromise; |
| 215 |
function enqueue(method, arg) { |
| 216 |
function callInvokeWithMethodAndArg() { |
| 217 |
return new PromiseImpl(function (resolve, reject) { |
| 218 |
invoke(method, arg, resolve, reject); |
| 219 |
}); |
| 220 |
} |
| 221 |
return (previousPromise = |
| 222 |
|
| 223 |
|
| 224 |
|
| 225 |
|
| 226 |
|
| 227 |
|
| 228 |
|
| 229 |
|
| 230 |
|
| 231 |
|
| 232 |
|
| 233 |
|
| 234 |
previousPromise |
| 235 |
? previousPromise.then( |
| 236 |
callInvokeWithMethodAndArg, |
| 237 |
|
| 238 |
|
| 239 |
callInvokeWithMethodAndArg, |
| 240 |
) |
| 241 |
: callInvokeWithMethodAndArg()); |
| 242 |
} |
| 243 |
|
| 244 |
|
| 245 |
|
| 246 |
defineProperty(this, "_invoke", { |
| 247 |
value: enqueue, |
| 248 |
}); |
| 249 |
} |
| 250 |
defineIteratorMethods(AsyncIterator.prototype); |
| 251 |
define(AsyncIterator.prototype, asyncIteratorSymbol, function () { |
| 252 |
return this; |
| 253 |
}); |
| 254 |
exports.AsyncIterator = AsyncIterator; |
| 255 |
|
| 256 |
|
| 257 |
|
| 258 |
|
| 259 |
exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { |
| 260 |
if (PromiseImpl === void 0) PromiseImpl = Promise; |
| 261 |
var iter = new AsyncIterator( |
| 262 |
wrap(innerFn, outerFn, self, tryLocsList), |
| 263 |
PromiseImpl, |
| 264 |
); |
| 265 |
return exports.isGeneratorFunction(outerFn) |
| 266 |
? iter |
| 267 |
: iter.next().then(function (result) { |
| 268 |
return result.done ? result.value : iter.next(); |
| 269 |
}); |
| 270 |
}; |
| 271 |
function makeInvokeMethod(innerFn, self, context) { |
| 272 |
var state = GenStateSuspendedStart; |
| 273 |
return function invoke(method, arg) { |
| 274 |
if (state === GenStateExecuting) { |
| 275 |
throw new Error("Generator is already running"); |
| 276 |
} |
| 277 |
if (state === GenStateCompleted) { |
| 278 |
if (method === "throw") { |
| 279 |
throw arg; |
| 280 |
} |
| 281 |
|
| 282 |
|
| 283 |
|
| 284 |
return doneResult(); |
| 285 |
} |
| 286 |
context.method = method; |
| 287 |
context.arg = arg; |
| 288 |
while (true) { |
| 289 |
var delegate = context.delegate; |
| 290 |
if (delegate) { |
| 291 |
var delegateResult = maybeInvokeDelegate(delegate, context); |
| 292 |
if (delegateResult) { |
| 293 |
if (delegateResult === ContinueSentinel) continue; |
| 294 |
return delegateResult; |
| 295 |
} |
| 296 |
} |
| 297 |
if (context.method === "next") { |
| 298 |
|
| 299 |
|
| 300 |
context.sent = context._sent = context.arg; |
| 301 |
} else if (context.method === "throw") { |
| 302 |
if (state === GenStateSuspendedStart) { |
| 303 |
state = GenStateCompleted; |
| 304 |
throw context.arg; |
| 305 |
} |
| 306 |
context.dispatchException(context.arg); |
| 307 |
} else if (context.method === "return") { |
| 308 |
context.abrupt("return", context.arg); |
| 309 |
} |
| 310 |
state = GenStateExecuting; |
| 311 |
var record = tryCatch(innerFn, self, context); |
| 312 |
if (record.type === "normal") { |
| 313 |
|
| 314 |
|
| 315 |
state = context.done ? GenStateCompleted : GenStateSuspendedYield; |
| 316 |
if (record.arg === ContinueSentinel) { |
| 317 |
continue; |
| 318 |
} |
| 319 |
return { |
| 320 |
value: record.arg, |
| 321 |
done: context.done, |
| 322 |
}; |
| 323 |
} else if (record.type === "throw") { |
| 324 |
state = GenStateCompleted; |
| 325 |
|
| 326 |
|
| 327 |
context.method = "throw"; |
| 328 |
context.arg = record.arg; |
| 329 |
} |
| 330 |
} |
| 331 |
}; |
| 332 |
} |
| 333 |
|
| 334 |
|
| 335 |
|
| 336 |
|
| 337 |
|
| 338 |
function maybeInvokeDelegate(delegate, context) { |
| 339 |
var methodName = context.method; |
| 340 |
var method = delegate.iterator[methodName]; |
| 341 |
if (method === undefined) { |
| 342 |
|
| 343 |
|
| 344 |
|
| 345 |
context.delegate = null; |
| 346 |
|
| 347 |
|
| 348 |
if (methodName === "throw" && delegate.iterator["return"]) { |
| 349 |
|
| 350 |
|
| 351 |
context.method = "return"; |
| 352 |
context.arg = undefined; |
| 353 |
maybeInvokeDelegate(delegate, context); |
| 354 |
if (context.method === "throw") { |
| 355 |
|
| 356 |
|
| 357 |
return ContinueSentinel; |
| 358 |
} |
| 359 |
} |
| 360 |
if (methodName !== "return") { |
| 361 |
context.method = "throw"; |
| 362 |
context.arg = new TypeError( |
| 363 |
"The iterator does not provide a '" + methodName + "' method", |
| 364 |
); |
| 365 |
} |
| 366 |
return ContinueSentinel; |
| 367 |
} |
| 368 |
var record = tryCatch(method, delegate.iterator, context.arg); |
| 369 |
if (record.type === "throw") { |
| 370 |
context.method = "throw"; |
| 371 |
context.arg = record.arg; |
| 372 |
context.delegate = null; |
| 373 |
return ContinueSentinel; |
| 374 |
} |
| 375 |
var info = record.arg; |
| 376 |
if (!info) { |
| 377 |
context.method = "throw"; |
| 378 |
context.arg = new TypeError("iterator result is not an object"); |
| 379 |
context.delegate = null; |
| 380 |
return ContinueSentinel; |
| 381 |
} |
| 382 |
if (info.done) { |
| 383 |
|
| 384 |
|
| 385 |
context[delegate.resultName] = info.value; |
| 386 |
|
| 387 |
|
| 388 |
context.next = delegate.nextLoc; |
| 389 |
|
| 390 |
|
| 391 |
|
| 392 |
|
| 393 |
|
| 394 |
|
| 395 |
|
| 396 |
if (context.method !== "return") { |
| 397 |
context.method = "next"; |
| 398 |
context.arg = undefined; |
| 399 |
} |
| 400 |
} else { |
| 401 |
|
| 402 |
return info; |
| 403 |
} |
| 404 |
|
| 405 |
|
| 406 |
|
| 407 |
context.delegate = null; |
| 408 |
return ContinueSentinel; |
| 409 |
} |
| 410 |
|
| 411 |
|
| 412 |
|
| 413 |
defineIteratorMethods(Gp); |
| 414 |
define(Gp, toStringTagSymbol, "Generator"); |
| 415 |
|
| 416 |
|
| 417 |
|
| 418 |
|
| 419 |
|
| 420 |
|
| 421 |
define(Gp, iteratorSymbol, function () { |
| 422 |
return this; |
| 423 |
}); |
| 424 |
define(Gp, "toString", function () { |
| 425 |
return "[object Generator]"; |
| 426 |
}); |
| 427 |
function pushTryEntry(locs) { |
| 428 |
var entry = { |
| 429 |
tryLoc: locs[0], |
| 430 |
}; |
| 431 |
if (1 in locs) { |
| 432 |
entry.catchLoc = locs[1]; |
| 433 |
} |
| 434 |
if (2 in locs) { |
| 435 |
entry.finallyLoc = locs[2]; |
| 436 |
entry.afterLoc = locs[3]; |
| 437 |
} |
| 438 |
this.tryEntries.push(entry); |
| 439 |
} |
| 440 |
function resetTryEntry(entry) { |
| 441 |
var record = entry.completion || {}; |
| 442 |
record.type = "normal"; |
| 443 |
delete record.arg; |
| 444 |
entry.completion = record; |
| 445 |
} |
| 446 |
function Context(tryLocsList) { |
| 447 |
|
| 448 |
|
| 449 |
|
| 450 |
this.tryEntries = [ |
| 451 |
{ |
| 452 |
tryLoc: "root", |
| 453 |
}, |
| 454 |
]; |
| 455 |
tryLocsList.forEach(pushTryEntry, this); |
| 456 |
this.reset(true); |
| 457 |
} |
| 458 |
exports.keys = function (val) { |
| 459 |
var object = Object(val); |
| 460 |
var keys = []; |
| 461 |
for (var key in object) { |
| 462 |
keys.push(key); |
| 463 |
} |
| 464 |
keys.reverse(); |
| 465 |
|
| 466 |
|
| 467 |
|
| 468 |
return function next() { |
| 469 |
while (keys.length) { |
| 470 |
var key = keys.pop(); |
| 471 |
if (key in object) { |
| 472 |
next.value = key; |
| 473 |
next.done = false; |
| 474 |
return next; |
| 475 |
} |
| 476 |
} |
| 477 |
|
| 478 |
|
| 479 |
|
| 480 |
|
| 481 |
next.done = true; |
| 482 |
return next; |
| 483 |
}; |
| 484 |
}; |
| 485 |
function values(iterable) { |
| 486 |
if (iterable) { |
| 487 |
var iteratorMethod = iterable[iteratorSymbol]; |
| 488 |
if (iteratorMethod) { |
| 489 |
return iteratorMethod.call(iterable); |
| 490 |
} |
| 491 |
if (typeof iterable.next === "function") { |
| 492 |
return iterable; |
| 493 |
} |
| 494 |
if (!isNaN(iterable.length)) { |
| 495 |
var i = -1, |
| 496 |
next = function next() { |
| 497 |
while (++i < iterable.length) { |
| 498 |
if (hasOwn.call(iterable, i)) { |
| 499 |
next.value = iterable[i]; |
| 500 |
next.done = false; |
| 501 |
return next; |
| 502 |
} |
| 503 |
} |
| 504 |
next.value = undefined; |
| 505 |
next.done = true; |
| 506 |
return next; |
| 507 |
}; |
| 508 |
return (next.next = next); |
| 509 |
} |
| 510 |
} |
| 511 |
|
| 512 |
|
| 513 |
return { |
| 514 |
next: doneResult, |
| 515 |
}; |
| 516 |
} |
| 517 |
exports.values = values; |
| 518 |
function doneResult() { |
| 519 |
return { |
| 520 |
value: undefined, |
| 521 |
done: true, |
| 522 |
}; |
| 523 |
} |
| 524 |
Context.prototype = { |
| 525 |
constructor: Context, |
| 526 |
reset: function (skipTempReset) { |
| 527 |
this.prev = 0; |
| 528 |
this.next = 0; |
| 529 |
|
| 530 |
|
| 531 |
this.sent = this._sent = undefined; |
| 532 |
this.done = false; |
| 533 |
this.delegate = null; |
| 534 |
this.method = "next"; |
| 535 |
this.arg = undefined; |
| 536 |
this.tryEntries.forEach(resetTryEntry); |
| 537 |
if (!skipTempReset) { |
| 538 |
for (var name in this) { |
| 539 |
|
| 540 |
if ( |
| 541 |
name.charAt(0) === "t" && |
| 542 |
hasOwn.call(this, name) && |
| 543 |
!isNaN(+name.slice(1)) |
| 544 |
) { |
| 545 |
this[name] = undefined; |
| 546 |
} |
| 547 |
} |
| 548 |
} |
| 549 |
}, |
| 550 |
stop: function () { |
| 551 |
this.done = true; |
| 552 |
var rootEntry = this.tryEntries[0]; |
| 553 |
var rootRecord = rootEntry.completion; |
| 554 |
if (rootRecord.type === "throw") { |
| 555 |
throw rootRecord.arg; |
| 556 |
} |
| 557 |
return this.rval; |
| 558 |
}, |
| 559 |
dispatchException: function (exception) { |
| 560 |
if (this.done) { |
| 561 |
throw exception; |
| 562 |
} |
| 563 |
var context = this; |
| 564 |
function handle(loc, caught) { |
| 565 |
record.type = "throw"; |
| 566 |
record.arg = exception; |
| 567 |
context.next = loc; |
| 568 |
if (caught) { |
| 569 |
|
| 570 |
|
| 571 |
context.method = "next"; |
| 572 |
context.arg = undefined; |
| 573 |
} |
| 574 |
return !!caught; |
| 575 |
} |
| 576 |
for (var i = this.tryEntries.length - 1; i >= 0; --i) { |
| 577 |
var entry = this.tryEntries[i]; |
| 578 |
var record = entry.completion; |
| 579 |
if (entry.tryLoc === "root") { |
| 580 |
|
| 581 |
|
| 582 |
|
| 583 |
return handle("end"); |
| 584 |
} |
| 585 |
if (entry.tryLoc <= this.prev) { |
| 586 |
var hasCatch = hasOwn.call(entry, "catchLoc"); |
| 587 |
var hasFinally = hasOwn.call(entry, "finallyLoc"); |
| 588 |
if (hasCatch && hasFinally) { |
| 589 |
if (this.prev < entry.catchLoc) { |
| 590 |
return handle(entry.catchLoc, true); |
| 591 |
} else if (this.prev < entry.finallyLoc) { |
| 592 |
return handle(entry.finallyLoc); |
| 593 |
} |
| 594 |
} else if (hasCatch) { |
| 595 |
if (this.prev < entry.catchLoc) { |
| 596 |
return handle(entry.catchLoc, true); |
| 597 |
} |
| 598 |
} else if (hasFinally) { |
| 599 |
if (this.prev < entry.finallyLoc) { |
| 600 |
return handle(entry.finallyLoc); |
| 601 |
} |
| 602 |
} else { |
| 603 |
throw new Error("try statement without catch or finally"); |
| 604 |
} |
| 605 |
} |
| 606 |
} |
| 607 |
}, |
| 608 |
abrupt: function (type, arg) { |
| 609 |
for (var i = this.tryEntries.length - 1; i >= 0; --i) { |
| 610 |
var entry = this.tryEntries[i]; |
| 611 |
if ( |
| 612 |
entry.tryLoc <= this.prev && |
| 613 |
hasOwn.call(entry, "finallyLoc") && |
| 614 |
this.prev < entry.finallyLoc |
| 615 |
) { |
| 616 |
var finallyEntry = entry; |
| 617 |
break; |
| 618 |
} |
| 619 |
} |
| 620 |
if ( |
| 621 |
finallyEntry && |
| 622 |
(type === "break" || type === "continue") && |
| 623 |
finallyEntry.tryLoc <= arg && |
| 624 |
arg <= finallyEntry.finallyLoc |
| 625 |
) { |
| 626 |
|
| 627 |
|
| 628 |
finallyEntry = null; |
| 629 |
} |
| 630 |
var record = finallyEntry ? finallyEntry.completion : {}; |
| 631 |
record.type = type; |
| 632 |
record.arg = arg; |
| 633 |
if (finallyEntry) { |
| 634 |
this.method = "next"; |
| 635 |
this.next = finallyEntry.finallyLoc; |
| 636 |
return ContinueSentinel; |
| 637 |
} |
| 638 |
return this.complete(record); |
| 639 |
}, |
| 640 |
complete: function (record, afterLoc) { |
| 641 |
if (record.type === "throw") { |
| 642 |
throw record.arg; |
| 643 |
} |
| 644 |
if (record.type === "break" || record.type === "continue") { |
| 645 |
this.next = record.arg; |
| 646 |
} else if (record.type === "return") { |
| 647 |
this.rval = this.arg = record.arg; |
| 648 |
this.method = "return"; |
| 649 |
this.next = "end"; |
| 650 |
} else if (record.type === "normal" && afterLoc) { |
| 651 |
this.next = afterLoc; |
| 652 |
} |
| 653 |
return ContinueSentinel; |
| 654 |
}, |
| 655 |
finish: function (finallyLoc) { |
| 656 |
for (var i = this.tryEntries.length - 1; i >= 0; --i) { |
| 657 |
var entry = this.tryEntries[i]; |
| 658 |
if (entry.finallyLoc === finallyLoc) { |
| 659 |
this.complete(entry.completion, entry.afterLoc); |
| 660 |
resetTryEntry(entry); |
| 661 |
return ContinueSentinel; |
| 662 |
} |
| 663 |
} |
| 664 |
}, |
| 665 |
catch: function (tryLoc) { |
| 666 |
for (var i = this.tryEntries.length - 1; i >= 0; --i) { |
| 667 |
var entry = this.tryEntries[i]; |
| 668 |
if (entry.tryLoc === tryLoc) { |
| 669 |
var record = entry.completion; |
| 670 |
if (record.type === "throw") { |
| 671 |
var thrown = record.arg; |
| 672 |
resetTryEntry(entry); |
| 673 |
} |
| 674 |
return thrown; |
| 675 |
} |
| 676 |
} |
| 677 |
|
| 678 |
|
| 679 |
|
| 680 |
throw new Error("illegal catch attempt"); |
| 681 |
}, |
| 682 |
delegateYield: function (iterable, resultName, nextLoc) { |
| 683 |
this.delegate = { |
| 684 |
iterator: values(iterable), |
| 685 |
resultName: resultName, |
| 686 |
nextLoc: nextLoc, |
| 687 |
}; |
| 688 |
if (this.method === "next") { |
| 689 |
|
| 690 |
|
| 691 |
this.arg = undefined; |
| 692 |
} |
| 693 |
return ContinueSentinel; |
| 694 |
}, |
| 695 |
}; |
| 696 |
|
| 697 |
|
| 698 |
|
| 699 |
|
| 700 |
|
| 701 |
return exports; |
| 702 |
} |