function maybeInvokeDelegate(delegate, context) {
    var method = delegate.iterator[context.method];

    if (method === undefined$1) {
      // A .throw or .return when the delegate iterator has no .throw
      // method always terminates the yield* loop.
      context.delegate = null;

      if (context.method === "throw") {
        // Note: ["return"] must be used for ES3 parsing compatibility.
        if (delegate.iterator["return"]) {
          // If the delegate iterator has a return method, give it a
          // chance to clean up.
          context.method = "return";
          context.arg = undefined$1;
          maybeInvokeDelegate(delegate, context);

          if (context.method === "throw") {
            // If maybeInvokeDelegate(context) changed context.method from
            // "return" to "throw", let that override the TypeError below.
            return ContinueSentinel;
          }
        }

        context.method = "throw";
        context.arg = new TypeError("The iterator does not provide a 'throw' method");
      }

      return ContinueSentinel;
    }

    var record = tryCatch(method, delegate.iterator, context.arg);

    if (record.type === "throw") {
      context.method = "throw";
      context.arg = record.arg;
      context.delegate = null;
      return ContinueSentinel;
    }

    var info = record.arg;

    if (!info) {
      context.method = "throw";
      context.arg = new TypeError("iterator result is not an object");
      context.delegate = null;
      return ContinueSentinel;
    }

    if (info.done) {
      // Assign the result of the finished delegate to the temporary
      // variable specified by delegate.resultName (see delegateYield).
      context[delegate.resultName] = info.value; // Resume execution at the desired location (see delegateYield).

      context.next = delegate.nextLoc; // If context.method was "throw" but the delegate handled the
      // exception, let the outer generator proceed normally. If
      // context.method was "next", forget context.arg since it has been
      // "consumed" by the delegate iterator. If context.method was
      // "return", allow the original .return call to continue in the
      // outer generator.

      if (context.method !== "return") {
        context.method = "next";
        context.arg = undefined$1;
      }
    } else {
      // Re-yield the result returned by the delegate method.
      return info;
    } // The delegate iterator is finished, so forget it and continue with
    // the outer generator.


    context.delegate = null;
    return ContinueSentinel;
  } // Define Generator.prototype.{next,throw,return} in terms of the
// setting context.delegate to null, and returning the ContinueSentinel.
setting context.delegate to null, and returning the ContinueSentinel.
setting context . delegate to null and returning the ContinueSentinel .
function maybeInvokeDelegate(delegate, context) {
    var method = delegate.iterator[context.method];
    if (method === undefined$1) {
      context.delegate = null;
      if (context.method === "throw") {
        if (delegate.iterator["return"]) {
          context.method = "return";
          context.arg = undefined$1;
          maybeInvokeDelegate(delegate, context);
          if (context.method === "throw") {
            return ContinueSentinel;
          }
        }
        context.method = "throw";
        context.arg = new TypeError("The iterator does not provide a 'throw' method");
      }
      return ContinueSentinel;
    }
    var record = tryCatch(method, delegate.iterator, context.arg);
    if (record.type === "throw") {
      context.method = "throw";
      context.arg = record.arg;
      context.delegate = null;
      return ContinueSentinel;
    }
    var info = record.arg;
    if (!info) {
      context.method = "throw";
      context.arg = new TypeError("iterator result is not an object");
      context.delegate = null;
      return ContinueSentinel;
    }
    if (info.done) {
      context[delegate.resultName] = info.value; 
      context.next = delegate.nextLoc; 
      if (context.method !== "return") {
        context.method = "next";
        context.arg = undefined$1;
      }
    } else {
      return info;
    } 
    context.delegate = null;
    return ContinueSentinel;
  } 
function maybeInvokeDelegate ( delegate , context ) { var method = delegate . iterator [ context . method ] ; if ( method === undefined$1 ) { context . delegate = null ; if ( context . method === "throw" ) { if ( delegate . iterator [ "return" ] ) { context . method = "return" ; context . arg = undefined$1 ; maybeInvokeDelegate ( delegate , context ) ; if ( context . method === "throw" ) { return ContinueSentinel ; } } context . method = "throw" ; context . arg = new TypeError ( "The iterator does not provide a 'throw' method" ) ; } return ContinueSentinel ; } var record = tryCatch ( method , delegate . iterator , context . arg ) ; if ( record . type === "throw" ) { context . method = "throw" ; context . arg = record . arg ; context . delegate = null ; return ContinueSentinel ; } var info = record . arg ; if ( ! info ) { context . method = "throw" ; context . arg = new TypeError ( "iterator result is not an object" ) ; context . delegate = null ; return ContinueSentinel ; } if ( info . done ) { context [ delegate . resultName ] = info . value ; context . next = delegate . nextLoc ; if ( context . method !== "return" ) { context . method = "next" ; context . arg = undefined$1 ; } } else { return info ; } context . delegate = null ; return ContinueSentinel ; }
setting context.delegate to null, and returning the ContinueSentinel.
setting context . delegate to null and returning the ContinueSentinel .
// A .throw or .return when the delegate iterator has no .throw // method always terminates the yield* loop. // Note: ["return"] must be used for ES3 parsing compatibility. // If the delegate iterator has a return method, give it a // chance to clean up. // If maybeInvokeDelegate(context) changed context.method from // "return" to "throw", let that override the TypeError below. // Assign the result of the finished delegate to the temporary // variable specified by delegate.resultName (see delegateYield). // Resume execution at the desired location (see delegateYield). // If context.method was "throw" but the delegate handled the // exception, let the outer generator proceed normally. If // context.method was "next", forget context.arg since it has been // "consumed" by the delegate iterator. If context.method was // "return", allow the original .return call to continue in the // outer generator. // Re-yield the result returned by the delegate method. // The delegate iterator is finished, so forget it and continue with // the outer generator. // Define Generator.prototype.{next,throw,return} in terms of the