function group(instances) {
  var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
      _ref$delay = _ref.delay,
      delay = _ref$delay === void 0 ? instances[0].props.delay : _ref$delay,
      _ref$duration = _ref.duration,
      duration = _ref$duration === void 0 ? 0 : _ref$duration;

  var isAnyTippyOpen = false;
  instances.forEach(function (instance) {
    if (instance._originalProps) {
      instance.set(instance._originalProps);
    } else {
      instance._originalProps = _extends$2({}, instance.props);
    }
  });

  function setIsAnyTippyOpen(value) {
    isAnyTippyOpen = value;
    updateInstances();
  }

  function onShow(instance) {
    instance._originalProps.onShow(instance);

    instances.forEach(function (instance) {
      instance.set({
        duration: duration
      });

      if (instance.state.isVisible) {
        instance.hide();
      }
    });
    setIsAnyTippyOpen(true);
  }

  function onHide(instance) {
    instance._originalProps.onHide(instance);

    setIsAnyTippyOpen(false);
  }

  function onShown(instance) {
    instance._originalProps.onShown(instance);

    instance.set({
      duration: instance._originalProps.duration
    });
  }

  function updateInstances() {
    instances.forEach(function (instance) {
      instance.set({
        onShow: onShow,
        onShown: onShown,
        onHide: onHide,
        delay: isAnyTippyOpen ? [0, Array.isArray(delay) ? delay[1] : delay] : delay,
        duration: isAnyTippyOpen ? duration : instance._originalProps.duration
      });
    });
  }

  updateInstances();
}
/**
 * Groups an array of instances by taking control of their props during
 * certain lifecycles.
 */
Groups an array of instances by taking control of their props during
certain lifecycles.
Groups an array of instances by taking control of their props during certain lifecycles .
function group(instances) {
  var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
      _ref$delay = _ref.delay,
      delay = _ref$delay === void 0 ? instances[0].props.delay : _ref$delay,
      _ref$duration = _ref.duration,
      duration = _ref$duration === void 0 ? 0 : _ref$duration;
  var isAnyTippyOpen = false;
  instances.forEach(function (instance) {
    if (instance._originalProps) {
      instance.set(instance._originalProps);
    } else {
      instance._originalProps = _extends$2({}, instance.props);
    }
  });
  function setIsAnyTippyOpen(value) {
    isAnyTippyOpen = value;
    updateInstances();
  }
  function onShow(instance) {
    instance._originalProps.onShow(instance);
    instances.forEach(function (instance) {
      instance.set({
        duration: duration
      });
      if (instance.state.isVisible) {
        instance.hide();
      }
    });
    setIsAnyTippyOpen(true);
  }
  function onHide(instance) {
    instance._originalProps.onHide(instance);
    setIsAnyTippyOpen(false);
  }
  function onShown(instance) {
    instance._originalProps.onShown(instance);
    instance.set({
      duration: instance._originalProps.duration
    });
  }
  function updateInstances() {
    instances.forEach(function (instance) {
      instance.set({
        onShow: onShow,
        onShown: onShown,
        onHide: onHide,
        delay: isAnyTippyOpen ? [0, Array.isArray(delay) ? delay[1] : delay] : delay,
        duration: isAnyTippyOpen ? duration : instance._originalProps.duration
      });
    });
  }
  updateInstances();
}
function group ( instances ) { var _ref = arguments . length > 1 && arguments [ 1 ] !== undefined ? arguments [ 1 ] : { } , _ref$delay = _ref . delay , delay = _ref$delay === void 0 ? instances [ 0 ] . props . delay : _ref$delay , _ref$duration = _ref . duration , duration = _ref$duration === void 0 ? 0 : _ref$duration ; var isAnyTippyOpen = false ; instances . forEach ( function ( instance ) { if ( instance . _originalProps ) { instance . set ( instance . _originalProps ) ; } else { instance . _originalProps = _extends$2 ( { } , instance . props ) ; } } ) ; function setIsAnyTippyOpen ( value ) { isAnyTippyOpen = value ; updateInstances ( ) ; } function onShow ( instance ) { instance . _originalProps . onShow ( instance ) ; instances . forEach ( function ( instance ) { instance . set ( { duration : duration } ) ; if ( instance . state . isVisible ) { instance . hide ( ) ; } } ) ; setIsAnyTippyOpen ( true ) ; } function onHide ( instance ) { instance . _originalProps . onHide ( instance ) ; setIsAnyTippyOpen ( false ) ; } function onShown ( instance ) { instance . _originalProps . onShown ( instance ) ; instance . set ( { duration : instance . _originalProps . duration } ) ; } function updateInstances ( ) { instances . forEach ( function ( instance ) { instance . set ( { onShow : onShow , onShown : onShown , onHide : onHide , delay : isAnyTippyOpen ? [ 0 , Array . isArray ( delay ) ? delay [ 1 ] : delay ] : delay , duration : isAnyTippyOpen ? duration : instance . _originalProps . duration } ) ; } ) ; } updateInstances ( ) ; }
Groups an array of instances by taking control of their props during
 certain lifecycles.
Groups an array of instances by taking control of their props during certain lifecycles .