RichText/Archived/Rooster/Rooster.gcomp/Support/node_modules/roosterjs/dist/rooster-amd.js
/**
 * Split parent node by a balanced node range
 * @param nodes The nodes to split from. If only one node is passed, split it from all its siblings.
 * If two or nodes are passed, will split before the first one and after the last one, all other nodes will be ignored
 * @returns The parent node of the given node range if the given nodes are balanced, otherwise null
 */
Split parent node by a balanced node range
@param nodes The nodes to split from. If only one node is passed, split it from all its siblings.
If two or nodes are passed, will split before the first one and after the last one, all other nodes will be ignored
@returns The parent node of the given node range if the given nodes are balanced, otherwise null
Split parent node by a balanced node range @param nodes The nodes to split from . If only one node is passed split it from all its siblings . If two or nodes are passed will split before the first one and after the last one all other nodes will be ignored @returns The parent node of the given node range if the given nodes are balanced otherwise null
function splitBalancedNodeRange(nodes) {
    var start = nodes instanceof Array ? nodes[0] : nodes;
    var end = nodes instanceof Array ? nodes[nodes.length - 1] : nodes;
    var parentNode = start && end && start.parentNode == end.parentNode ? start.parentNode : null;
    if (parentNode) {
        if (isNodeAfter_1.default(start, end)) {
            var temp = end;
            end = start;
            start = temp;
        }
        splitParentNode(start, true );
        splitParentNode(end, false );
    }
    return parentNode;
}
function splitBalancedNodeRange ( nodes ) { var start = nodes instanceof Array ? nodes [ 0 ] : nodes ; var end = nodes instanceof Array ? nodes [ nodes . length - 1 ] : nodes ; var parentNode = start && end && start . parentNode == end . parentNode ? start . parentNode : null ; if ( parentNode ) { if ( isNodeAfter_1 . default ( start , end ) ) { var temp = end ; end = start ; start = temp ; } splitParentNode ( start , true ) ; splitParentNode ( end , false ) ; } return parentNode ; }
Split parent node by a balanced node range
 @param nodes The nodes to split from.
Split parent node by a balanced node range @param nodes The nodes to split from .
/*splitBefore*/ /*splitBefore*/