insertSlide(config = {}, index = -1) {
        // Append at the end
        if (index < 0) {
            index = this.elements.length;
        }

        const slide = new Slide(config, this, index);
        const data = slide.getConfig();
        const slideInfo = _.extend({}, data);
        const newSlide = slide.create();
        const totalSlides = this.elements.length - 1;

        slideInfo.index = index;
        slideInfo.node = false;
        slideInfo.instance = slide;
        slideInfo.slideConfig = data;
        this.elements.splice(index, 0, slideInfo);

        let addedSlideNode = null;
        let addedSlidePlayer = null;

        if (this.slidesContainer) {
            // Append at the end
            if (index > totalSlides) {
                this.slidesContainer.appendChild(newSlide);
            } else {
                // A current slide must exist in the position specified
                // we need tp get that slide and insder the new slide before
                let existingSlide = this.slidesContainer.querySelectorAll('.gslide')[index];
                this.slidesContainer.insertBefore(newSlide, existingSlide);
            }

            if ((this.settings.preload && this.index == 0 && index == 0) || this.index - 1 == index || this.index + 1 == index) {
                this.preloadSlide(index);
            }

            if (this.index === 0 && index === 0) {
                this.index = 1;
            }

            this.updateNavigationClasses();

            addedSlideNode = this.slidesContainer.querySelectorAll('.gslide')[index];
            addedSlidePlayer = this.getSlidePlayerInstance(index);
            slideInfo.slideNode = addedSlideNode;
        }

        this.trigger('slide_inserted', {
            index: index,
            slide: addedSlideNode,
            slideNode: addedSlideNode,
            slideConfig: data,
            slideIndex: index,
            trigger: null,
            player: addedSlidePlayer
        });

        // Deprecated and will be removed in a future update
        if (_.isFunction(this.settings.slideInserted)) {
            this.settings.slideInserted({
                index: index,
                slide: addedSlideNode,
                player: addedSlidePlayer
            });
        }
    }
Insert slide

@param { object } data
@param { numeric } position