add(type, cfiRange, data, cb, className, styles) {
    let hash = encodeURI(cfiRange + type);
    let cfi = new src_epubcfi["a" /* default */](cfiRange);
    let sectionIndex = cfi.spinePos;
    let annotation = new annotations_Annotation({
      type,
      cfiRange,
      data,
      sectionIndex,
      cb,
      className,
      styles
    });
    this._annotations[hash] = annotation;

    if (sectionIndex in this._annotationsBySectionIndex) {
      this._annotationsBySectionIndex[sectionIndex].push(hash);
    } else {
      this._annotationsBySectionIndex[sectionIndex] = [hash];
    }

    let views = this.rendition.views();
    views.forEach(view => {
      if (annotation.sectionIndex === view.index) {
        annotation.attach(view);
      }
    });
    return annotation;
  }
Add an annotation to store
@param {string} type Type of annotation to add: "highlight", "underline", "mark"
@param {EpubCFI} cfiRange EpubCFI range to attach annotation to
@param {object} data Data to assign to annotation
@param {function} [cb] Callback after annotation is added
@param {string} className CSS class to assign to annotation
@param {object} styles CSS styles to assign to annotation
@returns {Annotation} annotation