/*
jQuery.deck('getSlide', index)

index: integer, optional

Returns a jQuery object containing the slide at index. If index is not
specified, the current slide is returned.
767935
function(index) {
			var i = typeof index !== 'undefined' ? index : current;
			if (typeof i != 'number' || i < 0 || i >= slides.length) return null;
			return slides[i];
		}
889097
function (index) {
            var carousel = this;

            if (index < 0 || index >= carousel.get("numItems")) {
                YAHOO.log("Index out of bounds", "error", WidgetName);
                return null;
            }

            if (carousel._itemsTable.items[index]) {
                return Dom.get(carousel._itemsTable.items[index].id);
            }

            return null;
        }
832630
function slide9() {
		var intWgap = 4.25;
		var opts_lineDataSymbol = ['circle','dash','diamond','dot','none','square','triangle'];
		var slide = pptx.addNewSlide();
		slide.addNotes('API Docs: https://gitbrent.github.io/PptxGenJS/docs/api-charts.html');
		slide.addTable( [ [{ text:'Chart Examples: Line Chart: lineDataSymbol option test', options:gOptsTextL },gOptsTextR] ], gOptsTabOpts );

		opts_lineDataSymbol.forEach(function(opt,idx){
			slide.addChart(
				pptx.charts.LINE,
				arrDataLineStat,
				{
					x:(idx < 3 ? idx*intWgap : (idx < 6 ? (idx-3)*intWgap : (idx-6)*intWgap)), y:(idx < 3 ? 0.5 : (idx < 6 ? 2.75 : 5)),
					w:4.25, h:2.25,
					lineDataSymbol:opt, title:opt, showTitle:true,
					lineDataSymbolSize:(idx==5 ? 9 : (idx==6 ? 12 : null))
				}
			);
		});
	}
1023310
@SuppressWarnings("unchecked")
    private void displaySlide(final Slide slide, final boolean isReverse) {
        synchronized (this) {
            try {

                LOGGER.trace("Display slide N°" + slide.getPage() + " reverse=" + isReverse);

                SlideModel<SlideStep> previousSlideModel = null;

                if (this.selectedSlide != null) {
                    final Class<Model> previousClass = (Class<Model>) (this.selectedSlide.getModelClass() == null
                            ? Class.forName(getPresentationService().getPresentation().getSlides().getDefaultModelClass())
                            : Class.forName(this.selectedSlide.getModelClass()));

                    previousSlideModel = (SlideModel<SlideStep>) getModel(previousClass, this.selectedSlide);
                }

                // Define the slide number
                // slide.setPage(this.slidePosition);

                final Class<Model> nextClass = (Class<Model>) (slide.getModelClass() == null
                        ? Class.forName(getPresentationService().getPresentation().getSlides().getDefaultModelClass())
                        : Class.forName(slide.getModelClass()));
                this.selectedSlideModel = (SlideModel<SlideStep>) getModel(nextClass, slide);

                // Add the new slide to the stack
                if (!view().node().getChildren().contains(this.selectedSlideModel.node())) {
                    view().node().getChildren().add(this.selectedSlideModel.node());
                }

                // final String animationKey = isReverse ? this.slidePosition + "_" + (this.slidePosition + 1) : this.slidePosition - 1 + "_" + this.slidePosition;

                // Play the animation<
                this.slideAnimation = buildSlideTransition(isReverse, previousSlideModel, this.selectedSlideModel);

                this.selectedSlideModel.setCurrentFlow(isReverse ? SlideFlow.backward : SlideFlow.forward);

                if (isReverse) {

                    this.slideAnimation.setRate(-1);
                    this.slideAnimation.playFrom(this.slideAnimation.getCycleDuration());
                } else {
                    this.slideAnimation.setRate(1);
                    this.slideAnimation.playFromStart();
                }

                // Store the new default slide
                this.selectedSlide = slide;

                // Define the current position
                // setSlidePosition(slide.getPage().intValue());

            } catch (final ClassNotFoundException e) {
                LOGGER.error("Error while loading a slide", e);
            }
        }

    }
824202
def get_slide(self, slide_id):
        
        for sldId in self._element.sldIdLst:
            if sldId.id == slide_id:
                return self.related_parts[sldId.rId].slide
        return None
744858
function moveTo(priv, index) {
  check(priv.started, 'slider.started').is.True();
  check(index, 'index').is.inRange(0, priv.slides.length)();

  var toIndex = index <= priv.slides.length? index % priv.slides.length: index;
  if (priv.toIndex === toIndex) {
    return;
  }

  removeTempClasses(priv);
  removeMarkers(priv);

  priv.fromIndex = priv.toIndex;
  priv.toIndex = toIndex;

  addMarkers(priv);
  addTempClasses(priv);

  priv.phaser.startTransition();
  emitEvent(priv, slidechange(priv.fromIndex, priv.toIndex));
}
397762
function(slide) {
		var slide_id = slide.unique_id;
		if (!TL.Util.trim(slide_id)) {
			// give it an ID if it doesn't have one
			slide_id = (slide.text) ? TL.Util.slugify(slide.text.headline) : null;
		}
		// make sure it's unique and add it.
		slide.unique_id = TL.Util.ensureUniqueKey(this.event_dict,slide_id);
		return slide.unique_id
	}
374957
def get_slide_number(self):
		
		a, slide_number, b = self.get_id_parts()
		if slide_number > 5000:
			slide_number = 5000 - slide_number
		return slide_number
62139
function (table, index) {
			if (!((table || shine.EMPTY_OBJ) instanceof shine.Table)) throw new shine.Error('Bad argument #1 in table.remove(). Table expected');
	
			var max = shine.lib.table.getn(table),
				vals = table.__shine.numValues,
				result;

			if (index > max) return;
			if (index == undefined) index = max;
				
			result = vals.splice(index, 1);
			while (index < max && vals[index] === undefined) delete vals[index++];

			return result;
		}
353289
function(index) {
    var layers = [];
    for(var i = 0; i < this.layers.length; ++i) {
      var layer = this.layers[i];
      if(this._isLayerVisible(layer)) {
        layers.push(i);
      }
    }
    if (index >= layers.length) {
      return -1;
    }
    return +layers[index];
  }
855808
function(index) {
        if (this.animating) {
            return;
        }

        index = $.bound(index, this.data.length);

        // Exit since transitions don't occur
        if (index === this.index) {
            return;
        }

        var self = this,
            element = this.element,
            caption = this.caption,
            list = this.items,
            listItems = list.children('li'),
            listItem = listItems.eq(index),
            items = this.data,
            item = items[index],
            deferred = $.Deferred();

        this.fireEvent('jumping', [this.index]);

        // Update tabs
        this.tabs.find('a')
            .removeClass('is-active')
            .eq(index)
                .addClass('is-active');

        // Reset previous styles
        listItems.conceal(true);
        caption.conceal(true);
        element
            .addClass('is-loading')
            .aria('busy', true)
            .reveal();

        // Setup deferred callbacks
        this.animating = true;

        deferred.always(function(width, height) {
            list.transitionend(function() {
                caption.html(item.title).reveal(true);
                listItem.reveal(true);
                self.position();
                self.animating = false;
            });

            self._resize(width, height);

            element
                .removeClass('is-loading')
                .aria('busy', false);

            listItem
                .data('width', width)
                .data('height', height);
        });

        deferred.fail(function() {
            element.addClass('has-failed');
            listItem.html(Toolkit.messages.error);
        });

        // Image already exists
        if (listItem.data('width')) {
            deferred.resolve(listItem.data('width'), listItem.data('height'));

        // Create image and animate
        } else {
            var img = new Image();
                img.src = item.image;
                img.onerror = function() {
                    deferred.reject(150, 150);
                };
                img.onload = function() {
                    deferred.resolve(this.width, this.height);
                    listItem.append(img);
                };
        }

        // Hide loader
        if (this.blackout) {
            this.blackout.hideLoader();
        }

        // Save state
        this.index = index;

        this.fireEvent('jumped', [index]);
    }
1095916
private static Object getRawElem(Scriptable target, long index) {
        if (index > Integer.MAX_VALUE) {
            return ScriptableObject.getProperty(target, Long.toString(index));
        }
        return ScriptableObject.getProperty(target, (int)index);
    }
979138
@Override
    public T get(int index) {
        /* Check that this is a valid index. */
        if (index < 0 || index >= size())
            throw new IndexOutOfBoundsException("Index " + index + ", size " + size());

        /* Look up the element. */
        return mArrays[computeOffset(index)][computeIndex(index)];
    }
1243199
public XEvent get(int index) {
		try {
			XEvent event = events.get(index);
			return event;
		} catch (IOException e) {
			e.printStackTrace();
			return null;
		}
	}
851400
function (index) {
      return this.options.start + Math.floor(index) * this.options.step +
        this.options.step * this._roundToFraction(index % 1);
    }
329447
function fromIndex(a, index) {
    var arr = is.isArguments(a) ? arraySlice.call(a) : a;
    return arraySlice.call(arr, index, arr.length);
}
1044470
function slide(direction) {
    const movement = direction === true ? 1 : -1
    let duration = slideSpeed

    // calculate the nextIndex according to the movement
    let nextIndex = index + 1 * movement

    // nextIndex should be between 0 and items minus 1
    nextIndex = clampNumber(nextIndex, 0, items - 1)

    // if the nextIndex and the current is the same, we don't need to do the slide
    if (nextIndex === index) return

    // if the nextIndex is possible according to number of items, then use it
    if (nextIndex <= items) {
      // execute the callback from the options before sliding
      doBeforeSlide({currentSlide: index, nextSlide: nextIndex})
      // execute the internal callback
      direction ? onNext(nextIndex) : onPrev(nextIndex)
      index = nextIndex
    }

    // translate to the next index by a defined duration and ease function
    _translate(duration, ease)

    // execute the callback from the options after sliding
    slidesDOMEl.addEventListener(TRANSITION_END, function cb(e) {
      doAfterSlide({currentSlide: index})
      e.currentTarget.removeEventListener(e.type, cb)
    })
  }