function BlockNode(blocks) {
    if (!(this instanceof BlockNode)) {
      throw new SyntaxError('Constructor must be called with the new operator');
    } // validate input, copy blocks


    if (!Array.isArray(blocks)) throw new Error('Array expected');
    this.blocks = blocks.map(function (block) {
      var node = block && block.node;
      var visible = block && block.visible !== undefined ? block.visible : true;
      if (!type.isNode(node)) throw new TypeError('Property "node" must be a Node');
      if (typeof visible !== 'boolean') throw new TypeError('Property "visible" must be a boolean');
      return {
        node: node,
        visible: visible
      };
    });
  }
@constructor BlockNode
@extends {Node}
Holds a set with blocks
@param {Array.<{node: Node} | {node: Node, visible: boolean}>} blocks
           An array with blocks, where a block is constructed as an Object
           with properties block, which is a Node, and visible, which is
           a boolean. The property visible is optional and is true by default