Set slide inline content
we'll extend this to make http
requests using the fetch api
but for now we keep it simple

@param {node} slide
@param {object} data
@param {function} callback
967931
function setInlineContent(slide, data, callback) {
        var slideMedia = slide.querySelector('.gslide-media');
        var hash = data.href.split('#').pop().trim();

        var div = document.getElementById(hash);
        if (!div) {
            return false;
        }

        var cloned = div.cloneNode(true);

        cloned.style.height = data.height + 'px';
        cloned.style.maxWidth = data.width + 'px';
        addClass(cloned, 'ginlined-content');
        slideMedia.appendChild(cloned);

        if (utils.isFunction(callback)) {
            callback();
        }
        return;
    }
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))
				}
			);
		});
	}
277179
function (data, callback) {
            var html = '';
            var self = this;
            callback = callback || function (error, ret) {
                html = ret;
            };
            if (!self.name && self.tpl.TPL_NAME) {
                self.name = self.tpl.TPL_NAME;
            }
            var scope = new Scope(data), buffer = new LinkedBuffer(callback).head;
            renderTpl(self, scope, buffer);
            return html;
        }
732550
function () {
		this._el.content_container		= TL.Dom.create("div", "tl-timeaxis-content-container", this._el.container);
		this._el.major					= TL.Dom.create("div", "tl-timeaxis-major", this._el.content_container);
		this._el.minor					= TL.Dom.create("div", "tl-timeaxis-minor", this._el.content_container);

		// Fire event that the slide is loaded
		this.onLoaded();
	}
862518
function moreLikeThisContent(data, callback) {
  var title = data.title;
  var content = data.content;
  // FIXME use all URIs
  var mlt = require('./moreLikeThis.js');
  content = utils.getTextFromHtml(content);

  mlt.fields = sourceFields;
  mlt.query.bool.should[0].mlt_field.content.like_text = content;
  mlt.query.bool.should[1].mlt_field.title.like_text = title;
  var query = JSON.stringify(mlt);

  doPost('/contentItem/_search', query, callback);
}
372950
function() {
	    var _layout = this.options.layout;

		for (var i = 0; i < this._slides.length; i++) {
			this._slides[i].updateDisplay(this.options.width, this.options.height, _layout);
			this._slides[i].setPosition({left:(this.slide_spacing * i), top:0});
		};

		this.goToId(this.current_id, true, false);
	}
937601
public void showSlideStep(final SlideStep slideStep) {

        if (this.subSlides.size() >= model().getStepPosition() || this.subSlides.get(model().getStepPosition()) == null) {
            addSubSlide(buildDefaultContent(model().getContent(slideStep)));
        }
        final Node nextSlide = this.subSlides.get(model().getStepPosition());

        if (this.currentSubSlide == null || nextSlide == null) {
            // No Animation
            this.currentSubSlide = nextSlide;
        } else {
            performStepAnimation(nextSlide);
        }

    }
551615
function get() {
      var autoplay = Components.Html.slides[Glide.index].getAttribute('data-glide-autoplay');

      if (autoplay) {
        return toInt(autoplay);
      }

      return toInt(Glide.settings.autoplay);
    }
685131
function( data ){

            // interpred data as either dom node or event data
            var el = (data.nodeType && data) || (data.body && data.body.view)
                ;

            if ( el ){
                // attach to viewport
                this.el.appendChild( el );
            }

            return this;
        }
323789
function(data, callback) {
    var json
    try {
        json = JSON.parse(data)
    } catch (exc) {
        return callback(exc)
    }
    callback(null, json)
}
837627
function documentReady(callback) {
  document.readyState === "interactive" || document.readyState === "complete" ? callback() : document.addEventListener("DOMContentLoaded", callback);
}
453453
function acceptSlide(priv, slideElement) {
  slideElement.classList.add(Flag.UPGRADED);
  insertSlide(priv, slideElement);

  priv.phaser.addPhaseTrigger(slideElement.querySelector('.'+ Layout.CONTENT));

  if (priv.slides.length === 1) {
    priv.startCallback.call(null, priv.pub);
    // moving this to next tick is required in chromium for some reason
    window.setTimeout(moveToFirstSlide.bind(null, priv), 1);
  }
}
381770
function slide1() {
		var slide = pptx.addNewSlide();
		slide.addNotes('API Docs: https://gitbrent.github.io/PptxGenJS/docs/api-charts.html');
		slide.addTable( [ [{ text:'Chart Examples: Bar Chart', options:gOptsTextL },gOptsTextR] ], gOptsTabOpts );

		var arrDataRegions = [
			{
				name  : 'Region 1',
				labels: ['May', 'June', 'July', 'August'],
				values: [26, 53, 100, 75]
			},
			{
				name  : 'Region 2',
				labels: ['May', 'June', 'July', 'August'],
				values: [43.5, 70.3, 90.1, 80.05]
			}
		];
		var arrDataHighVals = [
			{
				name  : 'California',
				labels: ['Apartment', 'Townhome', 'Duplex', 'House', 'Big House'],
				values: [2000, 2800, 3200, 4000, 5000]
			},
			{
				name  : 'Texas',
				labels: ['Apartment', 'Townhome', 'Duplex', 'House', 'Big House'],
				values: [1400, 2000, 2500, 3000, 3800]
			}
		];

		// TOP-LEFT: H/bar
		var optsChartBar1 = { x:0.5, y:0.6, w:6.0, h:3.0,
			barDir: 'bar',
			border: { pt:'3', color:'00EE00' },
			fill: 'F1F1F1',

			catAxisLabelColor   : 'CC0000',
			catAxisLabelFontFace: 'Helvetica Neue',
			catAxisLabelFontSize: 14,
			catAxisOrientation  : 'maxMin',
			// valAxisCrossesAt: 10,

			titleColor   : '33CF22',
			titleFontFace: 'Helvetica Neue',
			titleFontSize: 24
		};
		slide.addChart( pptx.charts.BAR, arrDataRegions, optsChartBar1 );

		// TOP-RIGHT: V/col
		var optsChartBar2 = { x:7.0, y:0.6, w:6.0, h:3.0,
			barDir: 'col',

			catAxisLabelColor   : '0000CC',
			catAxisLabelFontFace: 'Courier',
			catAxisLabelFontSize: 12,
			catAxisOrientation  : 'minMax',

			dataBorder         : { pt:'1', color:'F1F1F1' },
			dataLabelColor     : '696969',
			dataLabelFontFace  : 'Arial',
			dataLabelFontSize  : 11,
			dataLabelPosition  : 'outEnd',
			dataLabelFormatCode: '#.0',
			showValue          : true,

			valAxisOrientation: 'maxMin',

			showLegend: false,
			showTitle : false
		};
		slide.addChart( pptx.charts.BAR, arrDataRegions, optsChartBar2 );

		// BTM-LEFT: H/bar - TITLE and LEGEND
		slide.addText( '.', { x:0.5, y:3.8, w:6.0, h:3.5, fill:'F1F1F1', color:'F1F1F1'} );
		var optsChartBar3 = { x:0.5, y:3.8, w:6.0, h:3.5,
			barDir     : 'bar',

			border: { pt:'3', color:'CF0909' },
			fill: 'F1C1C1',

			catAxisLabelColor   : 'CC0000',
			catAxisLabelFontFace: 'Helvetica Neue',
			catAxisLabelFontSize: 14,
			catAxisOrientation  : 'minMax',

			titleColor   : '33CF22',
			titleFontFace: 'Helvetica Neue',
			titleFontSize: 16,

			showTitle : true,
			title: 'Sales by Region'
		};
		slide.addChart( pptx.charts.BAR, arrDataHighVals, optsChartBar3 );

		// BTM-RIGHT: V/col - TITLE and LEGEND
		slide.addText( '.', { x:7.0, y:3.8, w:6.0, h:3.5, fill:'F1F1F1', color:'F1F1F1'} );
		var optsChartBar4 = { x:7.0, y:3.8, w:6.0, h:3.5,
			barDir: 'col',
			barGapWidthPct: 25,
			chartColors: ['0088CC', '99FFCC'],
			chartColorsOpacity: 50,
			valAxisMaxVal: 5000,

			catAxisLabelColor   : '0000CC',
			catAxisLabelFontFace: 'Times',
			catAxisLabelFontSize: 11,
			catAxisOrientation  : 'minMax',

			dataBorder         : { pt:'1', color:'F1F1F1' },
			dataLabelColor     : 'FFFFFF',
			dataLabelFontFace  : 'Arial',
			dataLabelFontSize  : 10,
			dataLabelPosition  : 'ctr',
			showValue          : true,

			showLegend : true,
			legendPos  :  't',
			legendColor: 'FF0000',
			showTitle  : true,
			titleColor : 'FF0000',
			title      : 'Red Title and Legend'
		};
		slide.addChart( pptx.charts.BAR, arrDataHighVals, optsChartBar4 );
	}
977918
function addCallback (t, data) {
  var result = data.result || data.error;
  cbid = data.id;
  if (t.callbacks[cbid]) {
    if (data.result) {
      t.callbacks[cbid](result);
    } else {
      t.callbacks[cbid](result, 'error');
    }
  }
}
175045
function (data, callback) {
    if (typeof txDataQueue != "undefined" || txInProgress) {
      if (txDataQueue === undefined)
        txDataQueue = "";
      txDataQueue += data;
      return callback();
    } else {
      txDataQueue = data;
    }

    function writeChunk() {
      var chunk;
      var CHUNKSIZE = 20;
      if (txDataQueue.length <= CHUNKSIZE) {
        chunk = txDataQueue;
        txDataQueue = undefined;
      } else {
        chunk = txDataQueue.substr(0, CHUNKSIZE);
        txDataQueue = txDataQueue.substr(CHUNKSIZE);
      }
      txInProgress = true;
      console.log("BT> Sending " + JSON.stringify(chunk));
      try {
        winnus.write(chunk);
        setTimeout(function() {
          txInProgress = false;
          if (txDataQueue)
            writeChunk();
        }, 20);
      } catch (e) {
        console.log("BT> ERROR " + e);
        txDataQueue = undefined;
      }
    }
    writeChunk();
    return callback();
  }
1351791
function (/**String*/name, /**Object*/data) /**String*/ {
            var self = this;
            var template = data && data.views ?
                data.views.templates[name] : this.templates[name];
            if(!template){
                return '';
            }
            return self.getContent(template, data);
        }
1076106
protected void onRPCComplete(int asyncHandle, String data) {
        IAsyncRPCEvent callback = getCallback(asyncHandle);
        
        if (callback != null) {
            callback.onRPCComplete(asyncHandle, data);
        }
    }