diff --git a/app/assets/javascripts/player.js b/app/assets/javascripts/player.js
index bda2ea1..1f2d947 100644
--- a/app/assets/javascripts/player.js
+++ b/app/assets/javascripts/player.js
@@ -1,11 +1,8 @@
-//= require rAF
-//= require react-0.10.0
//= require asciinema-player
-//= require screenfull
function tryCreatePlayer(parentNode, asciicast, options) {
function createPlayer() {
- asciinema.CreatePlayer(
+ asciinema_player.core.CreatePlayer(
parentNode,
asciicast.width, asciicast.height,
asciicast.stdout_frames_url,
diff --git a/app/assets/stylesheets/player.sass b/app/assets/stylesheets/player.sass
index 3038cbd..4ae45d6 100644
--- a/app/assets/stylesheets/player.sass
+++ b/app/assets/stylesheets/player.sass
@@ -1,5 +1,2 @@
//= require asciinema-player
-//= require themes/tango
-//= require themes/solarized-dark
-//= require themes/solarized-light
//= require powerline-symbols
diff --git a/vendor/assets/javascripts/asciinema-player.js b/vendor/assets/javascripts/asciinema-player.js
index 3fc7938..8577f04 100644
--- a/vendor/assets/javascripts/asciinema-player.js
+++ b/vendor/assets/javascripts/asciinema-player.js
@@ -1,1211 +1,638 @@
-/** @jsx React.DOM */
-
-(function(exports) {
- var dom = React.DOM;
-
- var PlaybackControlButton = React.createClass({ displayName: 'PlayButton',
- // props: playing, onPauseClick, onResumeClick
-
- render: function() {
- var icon;
-
- if (this.props.playing) {
- icon = asciinema.PauseIcon();
- } else {
- icon = asciinema.PlayIcon();
- }
-
- return dom.span({ className: "playback-button", onClick: this.handleClick }, icon);
- },
-
- handleClick: function(event) {
- event.preventDefault();
-
- if (this.props.playing) {
- this.props.onPauseClick();
- } else {
- this.props.onResumeClick();
- }
- }
-
- });
-
- var FullscreenToggleButton = React.createClass({ displayName: 'FullscreenToggleButton',
- // props: fullscreen, onClick
-
- render: function() {
- var icon;
-
- if (this.props.fullscreen) {
- icon = asciinema.ShrinkIcon();
- } else {
- icon = asciinema.ExpandIcon();
- }
-
- return dom.span({ className: "fullscreen-button", onClick: this.handleClick, title: 'Toggle full screen mode (f)' }, icon);
- },
-
- handleClick: function(event) {
- event.preventDefault();
- this.props.onClick();
- },
-
- });
-
- exports.ControlBar = React.createClass({ displayName: 'ControlBar',
- // props: playing, fullscreen, currentTime, totalTime, onPauseClick,
- // onResumeClick, onSeekClick, toggleFullscreen
-
- render: function() {
- return (
- dom.div({ className: "control-bar" },
-
- PlaybackControlButton({
- playing: this.props.playing,
- onPauseClick: this.props.onPauseClick,
- onResumeClick: this.props.onResumeClick
- }),
-
- asciinema.Timer({
- currentTime: this.props.currentTime,
- totalTime: this.props.totalTime
- }),
-
- FullscreenToggleButton({
- fullscreen: this.props.fullscreen,
- onClick: this.props.toggleFullscreen,
- }),
-
- asciinema.ProgressBar({
- value: this.props.currentTime / this.props.totalTime,
- onClick: this.handleSeek
- })
-
- )
- )
- },
-
- handleSeek: function(value) {
- this.props.onSeekClick(value * this.props.totalTime);
- },
-
- shouldComponentUpdate: function(nextProps, nextState) {
- return nextProps.playing != this.props.playing ||
- nextProps.currentTime != this.props.currentTime ||
- nextProps.totalTime != this.props.totalTime ||
- nextProps.fullscreen != this.props.fullscreen;
- },
-
- });
-
-})(window.asciinema = window.asciinema || {});
-
-(function(exports) {
- var dom = React.DOM;
-
- exports.Cursor = React.createClass({ displayName: 'Cursor',
- // props: fg, bg, char, inverse
-
- render: function() {
- return dom.span({ className: this.className() }, this.props.char);
- },
-
- className: function() {
- if (this.props.inverse) {
- return "cursor fg-" + this.props.fg + " bg-" + this.props.bg;
- } else {
- return "cursor fg-" + this.props.bg + " bg-" + this.props.fg;
- }
- },
- });
-
-})(window.asciinema = window.asciinema || {});
-
-(function(exports) {
-
- function FunnyMovie() {
- // this.onFrame = onFrame;
- this.n = 0;
- this.direction = 1
- }
-
- FunnyMovie.prototype.start = function(onFrame) {
- setInterval(function() {
- this.generateFrame(onFrame);
- }.bind(this), 100);
- }
-
- FunnyMovie.prototype.generateFrame = function(onFrame) {
- var lines = {};
- lines[this.n] = [[(new Date()).toString(), {}]];
- onFrame({ lines: lines });
-
- this.n += this.direction;
- if (this.n < 0 || this.n >= 10) {
- this.direction *= -1;
- }
- }
-
- FunnyMovie.prototype.pause = function() {
- return false;
- }
-
- FunnyMovie.prototype.resume = function() {
- return false;
- }
-
- FunnyMovie.prototype.seek = function(time) {
- return false;
- }
-
- exports.FunnyMovie = FunnyMovie;
-
-})(window.asciinema = window.asciinema || {});
-
-(function(exports) {
-
- function HttpArraySource(url, speed) {
- this.url = url;
- this.speed = speed || 1;
- }
-
- HttpArraySource.prototype.start = function(onFrame, onFinish, setLoading) {
- var controller;
-
- if (this.data) {
- controller = this.createController(onFrame, onFinish);
- } else {
- this.fetchData(setLoading, function() {
- controller = this.createController(onFrame, onFinish);
- }.bind(this));
+/**
+ * asciinema-player v1.1.0
+ *
+ * Copyright 2011-2015, Marcin Kulik
+ * All rights reserved.
+ *
+ */
+
+if(typeof Math.imul == "undefined" || (Math.imul(0xffffffff,5) == 0)) {
+ Math.imul = function (a, b) {
+ var ah = (a >>> 16) & 0xffff;
+ var al = a & 0xffff;
+ var bh = (b >>> 16) & 0xffff;
+ var bl = b & 0xffff;
+ // the shift by 0 fixes the sign on the high part
+ // the final |0 converts the unsigned value into a signed value
+ return ((al * bl) + (((ah * bl + al * bh) << 16) >>> 0)|0);
}
-
- return {
- time: function() {
- if (controller && controller.time) {
- return controller.time();
- } else {
- return 0;
- }
- },
-
- pause: function() {
- if (controller && controller.pause) {
- return controller.pause();
- }
- },
-
- resume: function() {
- if (controller && controller.resume) {
- return controller.resume();
- }
- },
-
- seek: function(time) {
- if (controller && controller.seek) {
- return controller.seek(time);
- }
- }
- }
- }
-
- HttpArraySource.prototype.fetchData = function(setLoading, onResult) {
- setLoading(true);
-
- var request = $.ajax({ url: this.url, dataType: 'json' });
-
- request.done(function(data) {
- setLoading(false);
- this.data = data;
- onResult();
- }.bind(this));
-
- request.fail(function(jqXHR, textStatus) {
- setLoading(false);
- console.error(this.url, textStatus);
- });
- }
-
- HttpArraySource.prototype.createController = function(onFrame, onFinish) {
- arraySource = new asciinema.NavigableArraySource(this.data, this.speed);
-
- return arraySource.start(onFrame, onFinish);
- }
-
- exports.HttpArraySource = HttpArraySource;
-
-})(window.asciinema = window.asciinema || {});
-
-/** @jsx React.DOM */
-
-(function(exports) {
- var dom = React.DOM;
-
- var logoSvg = ' ';
-
- exports.LogoPlayIcon = React.createClass({ displayName: 'LogoPlayIcon',
-
- render: function() {
- return (
- dom.svg({ version: "1.1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 866.0254037844387 866.0254037844387", className: "icon", dangerouslySetInnerHTML: { __html: logoSvg } })
- )
- },
-
- });
-
- exports.PlayIcon = React.createClass({ displayName: 'PlayIcon',
-
- render: function() {
- return (
- dom.svg({ version: "1.1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 12 12", className: "icon" },
- dom.path({ d: "M1,0 L11,6 L1,12 Z" })
- )
- )
- },
-
- });
-
- exports.PauseIcon = React.createClass({ displayName: 'PauseIcon',
-
- render: function() {
- return (
- dom.svg({ version: "1.1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 12 12", className: "icon" },
- dom.path({ d: "M1,0 L4,0 L4,12 L1,12 Z" }),
- dom.path({ d: "M8,0 L11,0 L11,12 L8,12 Z" })
- )
- )
- },
-
- });
-
- exports.ExpandIcon = React.createClass({ displayName: 'ExpandIcon',
-
- render: function() {
- return (
- dom.svg({ version: "1.1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 12 12", className: "icon" },
- dom.path({ d: "M0,0 L5,0 L3,2 L5,4 L4,5 L2,3 L0,5 Z" }),
- dom.path({ d: "M12,12 L12,7 L10,9 L8,7 L7,8 L9,10 L7,12 Z" })
- )
- )
- },
-
- });
-
- exports.ShrinkIcon = React.createClass({ displayName: 'ShrinkIcon',
-
- render: function() {
- return (
- dom.svg({ version: "1.1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 12 12", className: "icon" },
- dom.path({ d: "M5,5 L5,0 L3,2 L1,0 L0,1 L2,3 L0,5 Z" }),
- dom.path({ d: "M7,7 L12,7 L10,9 L12,11 L11,12 L9,10 L7,12 Z" })
- )
- )
- },
-
- });
-
-})(window.asciinema = window.asciinema || {});
-
-(function(exports) {
- var dom = React.DOM;
-
- exports.Line = React.createClass({ displayName: 'Line',
- // props: parts, cursorX, cursorInverted
-
- render: function() {
- var lineLength = 0;
- var cursorX = this.props.cursorX;
-
- var parts = this.props.parts.map(function(part, index) {
- var attrs = {};
- // clone attrs, so we can adjust it below
- for (key in part[1]) {
- attrs[key] = part[1][key];
- }
-
- var partProps = { text: part[0], attrs: attrs };
- var partLength = part[0].length;
-
- if (cursorX !== null) {
- if (lineLength <= cursorX && cursorX < lineLength + partLength) {
- partProps.cursorX = cursorX - lineLength;
- partProps.cursorInverted = this.props.cursorInverted;
-
- // TODO: remove this hack and update terminal.c to do this instead
- if (attrs.inverse) {
- delete attrs.inverse;
- } else {
- attrs.inverse = true;
- }
- }
- }
-
- lineLength += partLength;
-
- return asciinema.Part(partProps);
- }.bind(this));
-
- return dom.span({ className: "line" }, parts);
- },
-
- });
-})(window.asciinema = window.asciinema || {});
-
-(function(exports) {
-
- function Movie(width, height, source, snapshot, totalTime) {
- this.width = width;
- this.height = height;
- this.source = source;
- this.snapshot = snapshot;
- this.totalTime = totalTime;
- }
-
- Movie.prototype.start = function(onFrame, onFinish, setTime, setLoading, loop) {
- var timeIntervalId;
-
- var source = this.source;
- var controller = {};
-
- function onSourceFinish() {
- if (loop) {
- start();
- } else {
- setTime(controller.time());
- clearInterval(timeIntervalId);
- onFinish();
- }
- }
-
- function start() {
- var ctrl = source.start(onFrame, onSourceFinish, setLoading);
-
- for (prop in ctrl) {
- controller[prop] = ctrl[prop];
- }
- }
-
- start();
-
- timeIntervalId = setInterval(function() {
- setTime(controller.time());
- }, 300);
-
- return controller;
- }
-
- exports.Movie = Movie;
-
-})(window.asciinema = window.asciinema || {});
-
-// var source = new ArraySource([]);
-// var source = new CamSource(80, 24);
-// var source = new WebsocketSource(url);
-
-// var movie = new Movie(80, 24, source, [], 123.456);
-
-// var controller = source.start(onFrame, onFinish, setLoading);
-// controller.pause();
-
-(function(exports) {
-
- function now() {
- return (new Date).getTime() / 1000;
- }
-
- function play(frames, speed, onFrame, onFinish) {
- var frameNo = 0;
- var startedAt = new Date;
- var timeoutId;
-
- function generate() {
- var frame = frames[frameNo];
-
- if (!frame) {
- return;
- }
-
- onFrame(frame[0], frame[1]);
-
- frameNo += 1;
- scheduleNextFrame();
- }
-
- function scheduleNextFrame() {
- var frame = frames[frameNo];
-
- if (frame) {
- timeoutId = setTimeout(generate, frames[frameNo][0] * 1000 / speed);
- } else {
- onFinish();
-
- if (window.console) {
- window.console.log('finished in ' + ((new Date).getTime() - startedAt.getTime()));
- }
- }
- }
-
- function stop() {
- clearTimeout(timeoutId);
- }
-
- scheduleNextFrame();
-
- return stop;
- }
-
- function NavigableArraySource(frames, speed) {
- this.frames = frames;
- this.speed = speed || 1;
- }
-
- NavigableArraySource.prototype.start = function(onFrame, onFinish, setLoading) {
- var elapsedTime = 0;
- var currentFramePauseTime;
- var lastFrameTime;
- var paused = false;
- var finished = false;
- var stop;
-
- var playFrom = function(time) {
- lastFrameTime = now();
- elapsedTime = time;
-
- return play(this.framesFrom(time), this.speed, function(delay, changes) {
- lastFrameTime = now();
- elapsedTime += delay;
- onFrame(changes);
- }, function() {
- finished = true;
- onFinish();
- });
- }.bind(this);
-
- var currentFrameTime = function() {
- return (now() - lastFrameTime) * this.speed;
- }.bind(this);
-
- stop = playFrom(0);
-
- return {
- pause: function() {
- if (finished) {
- return false;
- }
-
- paused = true;
- stop();
- currentFramePauseTime = currentFrameTime();
-
- return true;
- }.bind(this),
-
- resume: function() {
- if (finished) {
- return false;
- }
-
- paused = false;
- stop = playFrom(elapsedTime + currentFramePauseTime);
-
- return true;
- }.bind(this),
-
- seek: function(seconds) {
- if (finished) {
- return false;
- }
-
- paused = false;
- stop();
- stop = playFrom(seconds);
-
- return true;
- }.bind(this),
-
- time: function() {
- if (finished) {
- return elapsedTime;
- } else if (paused) {
- return elapsedTime + currentFramePauseTime;
- } else {
- return elapsedTime + currentFrameTime();
- }
- }.bind(this),
- }
- }
-
- NavigableArraySource.prototype.framesFrom = function(fromTime) {
- var frameNo = 0;
- var currentTime = 0;
- var changes = {};
-
- while (currentTime + this.frames[frameNo][0] < fromTime) {
- var frame = this.frames[frameNo];
- currentTime += frame[0];
- asciinema.mergeChanges(changes, frame[1]);
- frameNo += 1;
- }
-
- var frames = [[0, changes]];
-
- var nextFrame = this.frames[frameNo];
- var delay = nextFrame[0] - (fromTime - currentTime);
- frames = frames.concat([[delay, nextFrame[1]]]);
-
- frames = frames.concat(this.frames.slice(frameNo + 1));
-
- return frames;
- }
-
- exports.NavigableArraySource = NavigableArraySource;
-
-})(window.asciinema = window.asciinema || {});
-
-(function(exports) {
- var dom = React.DOM;
-
- exports.LoadingOverlay = React.createClass({ displayName: 'LoadingOverlay',
-
- render: function() {
- return (
- dom.div({ className: "loading" },
- dom.div({ className: "loader" })
- )
- );
- }
-
- });
-
- exports.StartOverlay = React.createClass({ displayName: 'StartOverlay',
- // props: start
-
- render: function() {
- return (
- dom.div({ className: "start-prompt", onClick: this.onClick },
- dom.div({ className: "play-button" },
- dom.div(null,
- dom.span(null,
- asciinema.LogoPlayIcon()
- )
- )
- )
- )
- );
- },
-
- onClick: function(event) {
- event.preventDefault();
- this.props.start();
- },
-
- });
-})(window.asciinema = window.asciinema || {});
-
-(function(exports) {
- var dom = React.DOM;
-
- exports.Part = React.createClass({ displayName: 'Part',
- // props: text, attrs, cursorX, cursorInverted
-
- render: function() {
- return dom.span({ className: this.className() }, this.children());
- },
-
- children: function() {
- var text = this.props.text;
- var cursorX = this.props.cursorX;
-
- if (cursorX !== undefined) {
- var elements = [];
-
- if (cursorX > 0) {
- elements = elements.concat([text.slice(0, cursorX)])
- }
-
- var cursor = asciinema.Cursor({
- fg: this.fgColor() || 'fg',
- bg: this.bgColor() || 'bg',
- char: text[cursorX],
- inverse: this.props.cursorInverted,
- });
-
- elements = elements.concat([cursor]);
-
- if (cursorX + 1 < text.length) {
- elements = elements.concat([text.slice(cursorX + 1)]);
- }
-
- return elements;
- } else {
- return this.props.text;
- }
- },
-
- fgColor: function() {
- var fg = this.props.attrs.fg;
-
- if (this.props.attrs.bold && fg !== undefined && fg < 8) {
- fg += 8;
- }
-
- return fg;
- },
-
- bgColor: function() {
- var bg = this.props.attrs.bg;
-
- if (this.props.attrs.blink && bg !== undefined && bg < 8) {
- bg += 8;
- }
-
- return bg;
- },
-
- className: function() {
- var classes = [];
- var attrs = this.props.attrs;
-
- var fg = this.fgColor();
- var bg = this.bgColor();
-
- if (attrs.inverse) {
- var fgClass, bgClass;
-
- if (bg !== undefined) {
- fgClass = 'fg-' + bg;
- } else {
- fgClass = 'fg-bg';
- }
-
- if (fg !== undefined) {
- bgClass = 'bg-' + fg;
- } else {
- bgClass = 'bg-fg';
- }
-
- classes = classes.concat([fgClass, bgClass]);
- } else {
- if (fg !== undefined) {
- classes = classes.concat(['fg-' + fg]);
- }
-
- if (bg !== undefined) {
- classes = classes.concat(['bg-' + bg]);
- }
- }
-
- if (attrs.bold) {
- classes = classes.concat(['bright']);
- }
-
- if (attrs.underline) {
- classes = classes.concat(['underline']);
- }
-
- return classes.join(' ');
- }
-
- });
-})(window.asciinema = window.asciinema || {});
-
-(function(exports) {
- var dom = React.DOM;
-
- var Player = React.createClass({ displayName: 'Player',
- // props: movie, autoPlay, fontSize, theme, loop
-
- getInitialState: function() {
- var lines = this.props.movie.snapshot || [];
- var cursor = { x: 0, y: 0, visible: false };
- var fontSize = this.props.fontSize || 'small';
-
- return {
- lines: lines,
- cursor: cursor,
- fontSize: fontSize,
- fullscreen: false,
- loading: false,
- state: 'not-started',
- currentTime: 0,
- totalTime: this.props.movie.totalTime,
- }
- },
-
- componentWillMount: function() {
- if (this.props.autoPlay) {
- this.start();
- }
- },
-
- componentDidMount: function() {
- if (screenfull.enabled) {
- document.addEventListener(screenfull.raw.fullscreenchange, function() {
- this.setState({ fullscreen: screenfull.isFullscreen });
- }.bind(this));
- }
-
- window.addEventListener('resize', function() {
- this.setState({
- windowHeight: window.innerHeight,
- playerHeight: this.refs.player.getDOMNode().offsetHeight
- });
- }.bind(this), true);
-
- $(this.getDOMNode()).on('keypress', this.onKeyPress);
-
- requestAnimationFrame(this.applyChanges);
- },
-
- componentWillUnmount: function() {
- $(this.getDOMNode()).off('keypress', this.onKeyPress);
- },
-
- onKeyPress: function(event) {
- if (event.which == 32) { // space bar
- event.preventDefault();
- this.togglePlay();
- } else if (event.which == 102) { // 'f'
- event.preventDefault();
- this.toggleFullscreen();
- }
- },
-
- render: function() {
- var overlay;
-
- if (this.state.loading) {
- overlay = asciinema.LoadingOverlay();
- } else if (!this.props.autoPlay && this.isNotStarted()) {
- overlay = asciinema.StartOverlay({ start: this.start });
- }
-
- return (
- dom.div({ className: 'asciinema-player-wrapper', tabIndex: -1 },
- dom.div({ ref: 'player', className: this.playerClassName(), style: this.playerStyle() },
-
- asciinema.Terminal({
- width: this.props.movie.width,
- height: this.props.movie.height,
- fontSize: this.fontSize(),
- lines: this.state.lines,
- cursor: this.state.cursor,
- cursorBlinking: this.isPlaying(),
- }),
-
- asciinema.ControlBar({
- playing: this.isPlaying(),
- onPauseClick: this.pause,
- onResumeClick: this.resume,
- onSeekClick: this.seek,
- currentTime: this.state.currentTime,
- totalTime: this.state.totalTime,
- fullscreen: this.state.fullscreen,
- toggleFullscreen: this.toggleFullscreen,
- }),
-
- overlay
- )
- )
- );
- },
-
- playerClassName: function() {
- return 'asciinema-player ' + this.themeClassName();
- },
-
- themeClassName: function() {
- return 'asciinema-theme-' + (this.props.theme || 'tango');
- },
-
- fontSize: function() {
- if (this.state.fullscreen) {
- return 'small';
- } else {
- return this.state.fontSize;
- }
- },
-
- playerStyle: function() {
- if (this.state.fullscreen && this.state.windowHeight && this.state.playerHeight) {
- var space = this.state.windowHeight - this.state.playerHeight;
-
- if (space > 0) {
- return { marginTop: (space / 2) + 'px' };
- }
- }
-
- return {};
- },
-
- setLoading: function(loading) {
- this.setState({ loading: loading });
- },
-
- start: function() {
- this.setState({ state: 'playing' });
- this.movieController = this.props.movie.start(this.onFrame, this.onFinish, this.setTime, this.setLoading, this.props.loop);
- },
-
- onFinish: function() {
- this.setState({ state: 'finished' });
- },
-
- setTime: function(time) {
- this.setState({ currentTime: time });
- },
-
- pause: function() {
- if (this.movieController.pause && this.movieController.pause()) {
- this.setState({ state: 'paused' });
- }
- },
-
- resume: function() {
- if (this.isFinished()) {
- this.start();
- } else {
- if (this.movieController.resume && this.movieController.resume()) {
- this.setState({ state: 'playing' });
- }
- }
- },
-
- togglePlay: function() {
- if (this.isNotStarted()) {
- this.start();
- } else if (this.isPlaying()) {
- this.pause();
- } else {
- this.resume();
- }
- },
-
- seek: function(time) {
- if (this.movieController.seek && this.movieController.seek(time)) {
- this.setState({ state: 'playing', currentTime: time });
- }
- },
-
- toggleFullscreen: function() {
- if (screenfull.enabled) {
- screenfull.toggle(this.getDOMNode());
- }
- },
-
- onFrame: function(changes) {
- this.changes = this.changes || {};
- asciinema.mergeChanges(this.changes, changes);
- },
-
- applyChanges: function() {
- requestAnimationFrame(this.applyChanges);
-
- // if (!this.dirty) {
- // return;
- // }
-
- var changes = this.changes || {};
- var newState = {};
-
- if (changes.lines) {
- var lines = [];
-
- for (var n in this.state.lines) {
- lines[n] = this.state.lines[n];
- }
-
- for (var n in changes.lines) {
- lines[n] = changes.lines[n];
- }
-
- newState.lines = lines;
- }
-
- if (changes.cursor) {
- var cursor = {
- x: this.state.cursor.x,
- y: this.state.cursor.y,
- visible: this.state.cursor.visible
- };
-
- for (var key in changes.cursor) {
- cursor[key] = changes.cursor[key];
- }
-
- newState.cursor = cursor;
- }
-
- this.setState(newState);
- this.changes = {};
- },
-
- isNotStarted: function() {
- return this.state.state === 'not-started';
- },
-
- isPlaying: function() {
- return this.state.state === 'playing';
- },
-
- isPaused: function() {
- return this.state.state === 'paused';
- },
-
- isFinished: function() {
- return this.state.state === 'finished';
- },
- });
-
- exports.Player = Player;
-
- exports.mergeChanges = function(dest, src) {
- if (src.lines) {
- dest.lines = dest.lines || {};
-
- for (var n in src.lines) {
- dest.lines[n] = src.lines[n];
- }
- }
-
- if (src.cursor) {
- dest.cursor = dest.cursor || {};
-
- for (var key in src.cursor) {
- dest.cursor[key] = src.cursor[key];
- }
- }
- }
-
- exports.CreatePlayer = function(parent, width, height, dataUrl, totalTime, options) {
- var options = options || {};
- var source = new asciinema.HttpArraySource(dataUrl, options.speed);
- var movie = new asciinema.Movie(width, height, source, options.snapshot, totalTime);
-
- React.renderComponent(
- Player({
- movie: movie,
- autoPlay: options.autoPlay,
- loop: options.loop,
- fontSize: options.fontSize,
- theme: options.theme
- }),
- parent
- );
- }
-
-})(window.asciinema = window.asciinema || {});
-
-(function(exports) {
- var dom = React.DOM;
-
- exports.ProgressBar = React.createClass({ displayName: 'ProgressBar',
- // props.value
- // props.onClick
-
- render: function() {
- var width = 100 * this.props.value;
-
- return (
- dom.span({ className: "progressbar" },
- dom.span({ className: "bar", ref: "bar", onMouseDown: this.handleClick },
- dom.span({ className: "gutter" },
- dom.span({ style: { width: width + "%" } })
- )
- )
- )
- )
- },
-
- handleClick: function(event) {
- event.preventDefault();
-
- var target = event.target || event.srcElement,
- style = target.currentStyle || window.getComputedStyle(target, null),
- borderLeftWidth = parseInt(style['borderLeftWidth'], 10),
- borderTopWidth = parseInt(style['borderTopWidth'], 10),
- rect = target.getBoundingClientRect(),
- offsetX = event.clientX - borderLeftWidth - rect.left,
- offsetY = event.clientY - borderTopWidth - rect.top;
-
- var barWidth = this.refs.bar.getDOMNode().offsetWidth;
- this.props.onClick(offsetX / barWidth);
- }
-
- });
-
-})(window.asciinema = window.asciinema || {});
-
-(function(exports) {
- var dom = React.DOM;
-
- exports.Terminal = React.createClass({ displayName: 'Terminal',
- // props: width, height, fontSize, lines, cursor, cursorBlinking
-
- getInitialState: function() {
- return { cursorInverted: false };
- },
-
- render: function() {
- var cursor = this.props.cursor;
-
- var lines = this.props.lines.map(function(line, index) {
- if (cursor.visible && cursor.y == index) {
- return asciinema.Line({
- parts: line,
- cursorX: cursor.x,
- cursorInverted: this.props.cursorBlinking && this.state.cursorInverted,
- });
- } else {
- return asciinema.Line({ parts: line });
- }
-
- }.bind(this));
-
- return dom.pre({ className: this.className(), style: this.style() }, lines);
- },
-
- className: function() {
- return "asciinema-terminal " + this.fontClassName();
- },
-
- fontClassName: function() {
- return 'font-' + this.props.fontSize;
- },
-
- style: function() {
- if (this.state.charDimensions) {
- var dimensions = this.state.charDimensions[this.props.fontSize];
- var width = Math.ceil(this.props.width * dimensions.width) + 'px';
- var height = Math.ceil(this.props.height * dimensions.height) + 'px';
- return { width: width, height: height };
- } else {
- return {};
- }
- },
-
- componentDidMount: function() {
- this.calculateCharDimensions();
- this.startBlinking();
- },
-
- componentDidUpdate: function(prevProps, prevState) {
- if (prevProps.lines != this.props.lines || prevProps.cursor != this.props.cursor) {
- this.restartBlinking();
- }
- },
-
- componentWillUnmount: function() {
- this.stopBlinking();
- },
-
- shouldComponentUpdate: function(nextProps, nextState) {
- return nextProps.lines != this.props.lines ||
- nextProps.cursor != this.props.cursor ||
- nextProps.fontSize != this.props.fontSize ||
- nextState.cursorInverted != this.state.cursorInverted ||
- nextState.charDimensions != this.state.charDimensions;
- },
-
- calculateCharDimensions: function() {
- var $tmpChild = $('MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM');
- this.getDOMNode().appendChild($tmpChild[0]);
- var $span = $tmpChild.find('.char');
-
- var charDimensions = {};
-
- $tmpChild.addClass('font-small');
- charDimensions.small = { width: $span.width() / 200, height: $tmpChild.height() };
-
- $tmpChild.removeClass('font-small');
- $tmpChild.addClass('font-medium');
- charDimensions.medium = { width: $span.width() / 200, height: $tmpChild.height() };
-
- $tmpChild.removeClass('font-medium');
- $tmpChild.addClass('font-big');
- charDimensions.big = { width: $span.width() / 200, height: $tmpChild.height() };
-
- $tmpChild.remove();
-
- this.setState({ charDimensions: charDimensions });
- },
-
- startBlinking: function() {
- this.cursorBlinkInvervalId = setInterval(this.flip, 500);
- },
-
- stopBlinking: function() {
- clearInterval(this.cursorBlinkInvervalId);
- },
-
- restartBlinking: function() {
- this.stopBlinking();
- this.reset();
- this.startBlinking();
- },
-
- reset: function() {
- this.setState({ cursorInverted: false });
- },
-
- flip: function() {
- this.setState({ cursorInverted: !this.state.cursorInverted });
- },
-
- });
-})(typeof exports === 'undefined' ? (this.asciinema = this.asciinema || {}) : exports);
-
-(function(exports) {
- var dom = React.DOM;
-
- exports.Timer = React.createClass({ displayName: 'Timer',
- // props.currentTime
- // props.totalTime
-
- render: function() {
- return (
- dom.span({ className: "timer" },
- dom.span({ className: "time-elapsed" }, this.elapsedTime()),
- dom.span({ className: "time-remaining" }, this.remainingTime())
- )
- )
- },
-
- remainingTime: function() {
- var t = this.props.totalTime - this.props.currentTime;
- return "-" + this.formatTime(t);
- },
-
- elapsedTime: function() {
- return this.formatTime(this.props.currentTime);
- },
-
- formatTime: function(seconds) {
- if (seconds < 0) {
- seconds = 0;
- }
-
- return "" + this.minutes(seconds) + ":" + this.seconds(seconds);
- },
-
- minutes: function(s) {
- var minutes = Math.floor(s / 60)
- return this.pad2(minutes);
- },
-
- seconds: function(s) {
- var seconds = Math.floor(s % 60)
- return this.pad2(seconds);
- },
-
- pad2: function(number) {
- if (number < 10) {
- return '0' + number;
- } else {
- return number;
- }
- }
-
- });
-
-})(window.asciinema = window.asciinema || {});
+}
+
+/**
+ * React v0.13.1
+ *
+ * Copyright 2013-2015, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ */
+!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.React=e()}}(function(){return function e(t,n,r){function o(a,u){if(!n[a]){if(!t[a]){var s="function"==typeof require&&require;if(!u&&s)return s(a,!0);if(i)return i(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,function(e){var n=t[a][1][e];return o(n?n:e)},c,c.exports,e,t,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a8&&11>=_),M=32,N=String.fromCharCode(M),I=d.topLevelTypes,T={beforeInput:{phasedRegistrationNames:{bubbled:y({onBeforeInput:null}),captured:y({onBeforeInputCapture:null})},dependencies:[I.topCompositionEnd,I.topKeyPress,I.topTextInput,I.topPaste]},compositionEnd:{phasedRegistrationNames:{bubbled:y({onCompositionEnd:null}),captured:y({onCompositionEndCapture:null})},dependencies:[I.topBlur,I.topCompositionEnd,I.topKeyDown,I.topKeyPress,I.topKeyUp,I.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:y({onCompositionStart:null}),captured:y({onCompositionStartCapture:null})},dependencies:[I.topBlur,I.topCompositionStart,I.topKeyDown,I.topKeyPress,I.topKeyUp,I.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:y({onCompositionUpdate:null}),captured:y({onCompositionUpdateCapture:null})},dependencies:[I.topBlur,I.topCompositionUpdate,I.topKeyDown,I.topKeyPress,I.topKeyUp,I.topMouseDown]}},R=!1,P=null,w={eventTypes:T,extractEvents:function(e,t,n,r){return[s(e,t,n,r),p(e,t,n,r)]}};t.exports=w},{139:139,15:15,20:20,21:21,22:22,91:91,95:95}],4:[function(e,t){"use strict";function n(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var r={boxFlex:!0,boxFlexGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,strokeOpacity:!0},o=["Webkit","ms","Moz","O"];Object.keys(r).forEach(function(e){o.forEach(function(t){r[n(t,e)]=r[e]})});var i={background:{backgroundImage:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundColor:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0}},a={isUnitlessNumber:r,shorthandPropertyExpansions:i};t.exports=a},{}],5:[function(e,t){"use strict";var n=e(4),r=e(21),o=(e(106),e(111)),i=e(131),a=e(141),u=(e(150),a(function(e){return i(e)})),s="cssFloat";r.canUseDOM&&void 0===document.documentElement.style.cssFloat&&(s="styleFloat");var l={createMarkupForStyles:function(e){var t="";for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];null!=r&&(t+=u(n)+":",t+=o(n,r)+";")}return t||null},setValueForStyles:function(e,t){var r=e.style;for(var i in t)if(t.hasOwnProperty(i)){var a=o(i,t[i]);if("float"===i&&(i=s),a)r[i]=a;else{var u=n.shorthandPropertyExpansions[i];if(u)for(var l in u)r[l]="";else r[i]=""}}}};t.exports=l},{106:106,111:111,131:131,141:141,150:150,21:21,4:4}],6:[function(e,t){"use strict";function n(){this._callbacks=null,this._contexts=null}var r=e(28),o=e(27),i=e(133);o(n.prototype,{enqueue:function(e,t){this._callbacks=this._callbacks||[],this._contexts=this._contexts||[],this._callbacks.push(e),this._contexts.push(t)},notifyAll:function(){var e=this._callbacks,t=this._contexts;if(e){i(e.length===t.length),this._callbacks=null,this._contexts=null;for(var n=0,r=e.length;r>n;n++)e[n].call(t[n]);e.length=0,t.length=0}},reset:function(){this._callbacks=null,this._contexts=null},destructor:function(){this.reset()}}),r.addPoolingTo(n),t.exports=n},{133:133,27:27,28:28}],7:[function(e,t){"use strict";function n(e){return"SELECT"===e.nodeName||"INPUT"===e.nodeName&&"file"===e.type}function r(e){var t=_.getPooled(I.change,R,e);C.accumulateTwoPhaseDispatches(t),b.batchedUpdates(o,t)}function o(e){y.enqueueEvents(e),y.processEventQueue()}function i(e,t){T=e,R=t,T.attachEvent("onchange",r)}function a(){T&&(T.detachEvent("onchange",r),T=null,R=null)}function u(e,t,n){return e===N.topChange?n:void 0}function s(e,t,n){e===N.topFocus?(a(),i(t,n)):e===N.topBlur&&a()}function l(e,t){T=e,R=t,P=e.value,w=Object.getOwnPropertyDescriptor(e.constructor.prototype,"value"),Object.defineProperty(T,"value",A),T.attachEvent("onpropertychange",p)}function c(){T&&(delete T.value,T.detachEvent("onpropertychange",p),T=null,R=null,P=null,w=null)}function p(e){if("value"===e.propertyName){var t=e.srcElement.value;t!==P&&(P=t,r(e))}}function d(e,t,n){return e===N.topInput?n:void 0}function f(e,t,n){e===N.topFocus?(c(),l(t,n)):e===N.topBlur&&c()}function h(e){return e!==N.topSelectionChange&&e!==N.topKeyUp&&e!==N.topKeyDown||!T||T.value===P?void 0:(P=T.value,R)}function m(e){return"INPUT"===e.nodeName&&("checkbox"===e.type||"radio"===e.type)}function v(e,t,n){return e===N.topClick?n:void 0}var g=e(15),y=e(17),C=e(20),E=e(21),b=e(85),_=e(93),x=e(134),D=e(136),M=e(139),N=g.topLevelTypes,I={change:{phasedRegistrationNames:{bubbled:M({onChange:null}),captured:M({onChangeCapture:null})},dependencies:[N.topBlur,N.topChange,N.topClick,N.topFocus,N.topInput,N.topKeyDown,N.topKeyUp,N.topSelectionChange]}},T=null,R=null,P=null,w=null,O=!1;E.canUseDOM&&(O=x("change")&&(!("documentMode"in document)||document.documentMode>8));var S=!1;E.canUseDOM&&(S=x("input")&&(!("documentMode"in document)||document.documentMode>9));var A={get:function(){return w.get.call(this)},set:function(e){P=""+e,w.set.call(this,e)}},k={eventTypes:I,extractEvents:function(e,t,r,o){var i,a;if(n(t)?O?i=u:a=s:D(t)?S?i=d:(i=h,a=f):m(t)&&(i=v),i){var l=i(e,t,r);if(l){var c=_.getPooled(I.change,l,o);return C.accumulateTwoPhaseDispatches(c),c}}a&&a(e,t,r)}};t.exports=k},{134:134,136:136,139:139,15:15,17:17,20:20,21:21,85:85,93:93}],8:[function(e,t){"use strict";var n=0,r={createReactRootIndex:function(){return n++}};t.exports=r},{}],9:[function(e,t){"use strict";function n(e,t,n){e.insertBefore(t,e.childNodes[n]||null)}var r=e(12),o=e(70),i=e(145),a=e(133),u={dangerouslyReplaceNodeWithMarkup:r.dangerouslyReplaceNodeWithMarkup,updateTextContent:i,processUpdates:function(e,t){for(var u,s=null,l=null,c=0;ct||r.hasOverloadedBooleanValue[e]&&t===!1}var r=e(10),o=e(143),i=(e(150),{createMarkupForID:function(e){return r.ID_ATTRIBUTE_NAME+"="+o(e)},createMarkupForProperty:function(e,t){if(r.isStandardName.hasOwnProperty(e)&&r.isStandardName[e]){if(n(e,t))return"";var i=r.getAttributeName[e];return r.hasBooleanValue[e]||r.hasOverloadedBooleanValue[e]&&t===!0?i:i+"="+o(t)}return r.isCustomAttribute(e)?null==t?"":e+"="+o(t):null},setValueForProperty:function(e,t,o){if(r.isStandardName.hasOwnProperty(t)&&r.isStandardName[t]){var i=r.getMutationMethod[t];if(i)i(e,o);else if(n(t,o))this.deleteValueForProperty(e,t);else if(r.mustUseAttribute[t])e.setAttribute(r.getAttributeName[t],""+o);else{var a=r.getPropertyName[t];r.hasSideEffects[t]&&""+e[a]==""+o||(e[a]=o)}}else r.isCustomAttribute(t)&&(null==o?e.removeAttribute(t):e.setAttribute(t,""+o))},deleteValueForProperty:function(e,t){if(r.isStandardName.hasOwnProperty(t)&&r.isStandardName[t]){var n=r.getMutationMethod[t];if(n)n(e,void 0);else if(r.mustUseAttribute[t])e.removeAttribute(r.getAttributeName[t]);else{var o=r.getPropertyName[t],i=r.getDefaultValueForProperty(e.nodeName,o);r.hasSideEffects[t]&&""+e[o]===i||(e[o]=i)}}else r.isCustomAttribute(t)&&e.removeAttribute(t)}});t.exports=i},{10:10,143:143,150:150}],12:[function(e,t){"use strict";function n(e){return e.substring(1,e.indexOf(" "))}var r=e(21),o=e(110),i=e(112),a=e(125),u=e(133),s=/^(<[^ \/>]+)/,l="data-danger-index",c={dangerouslyRenderMarkup:function(e){u(r.canUseDOM);for(var t,c={},p=0;ps;s++){var c=u[s];if(c){var p=c.extractEvents(e,t,r,i);p&&(a=o(a,p))}}return a},enqueueEvents:function(e){e&&(s=o(s,e))},processEventQueue:function(){var e=s;s=null,i(e,l),a(!s)},__purge:function(){u={}},__getListenerBank:function(){return u}};t.exports=p},{103:103,118:118,133:133,18:18,19:19}],18:[function(e,t){"use strict";function n(){if(a)for(var e in u){var t=u[e],n=a.indexOf(e);if(i(n>-1),!s.plugins[n]){i(t.extractEvents),s.plugins[n]=t;var o=t.eventTypes;for(var l in o)i(r(o[l],t,l))}}}function r(e,t,n){i(!s.eventNameDispatchConfigs.hasOwnProperty(n)),s.eventNameDispatchConfigs[n]=e;var r=e.phasedRegistrationNames;if(r){for(var a in r)if(r.hasOwnProperty(a)){var u=r[a];o(u,t,n)}return!0}return e.registrationName?(o(e.registrationName,t,n),!0):!1}function o(e,t,n){i(!s.registrationNameModules[e]),s.registrationNameModules[e]=t,s.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var i=e(133),a=null,u={},s={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},injectEventPluginOrder:function(e){i(!a),a=Array.prototype.slice.call(e),n()},injectEventPluginsByName:function(e){var t=!1;for(var r in e)if(e.hasOwnProperty(r)){var o=e[r];u.hasOwnProperty(r)&&u[r]===o||(i(!u[r]),u[r]=o,t=!0)}t&&n()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return s.registrationNameModules[t.registrationName]||null;for(var n in t.phasedRegistrationNames)if(t.phasedRegistrationNames.hasOwnProperty(n)){var r=s.registrationNameModules[t.phasedRegistrationNames[n]];if(r)return r}return null},_resetEventPlugins:function(){a=null;for(var e in u)u.hasOwnProperty(e)&&delete u[e];s.plugins.length=0;var t=s.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=s.registrationNameModules;for(var o in r)r.hasOwnProperty(o)&&delete r[o]}};t.exports=s},{133:133}],19:[function(e,t){"use strict";function n(e){return e===m.topMouseUp||e===m.topTouchEnd||e===m.topTouchCancel}function r(e){return e===m.topMouseMove||e===m.topTouchMove}function o(e){return e===m.topMouseDown||e===m.topTouchStart}function i(e,t){var n=e._dispatchListeners,r=e._dispatchIDs;if(Array.isArray(n))for(var o=0;oe&&n[e]===o[e];e++);var a=r-e;for(t=1;a>=t&&n[r-t]===o[i-t];t++);var u=t>1?1-t:void 0;return this._fallbackText=o.slice(e,u),this._fallbackText}}),r.addPoolingTo(n),t.exports=n},{128:128,27:27,28:28}],23:[function(e,t){"use strict";var n,r=e(10),o=e(21),i=r.injection.MUST_USE_ATTRIBUTE,a=r.injection.MUST_USE_PROPERTY,u=r.injection.HAS_BOOLEAN_VALUE,s=r.injection.HAS_SIDE_EFFECTS,l=r.injection.HAS_NUMERIC_VALUE,c=r.injection.HAS_POSITIVE_NUMERIC_VALUE,p=r.injection.HAS_OVERLOADED_BOOLEAN_VALUE;if(o.canUseDOM){var d=document.implementation;n=d&&d.hasFeature&&d.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")}var f={isCustomAttribute:RegExp.prototype.test.bind(/^(data|aria)-[a-z_][a-z\d_.\-]*$/),Properties:{accept:null,acceptCharset:null,accessKey:null,action:null,allowFullScreen:i|u,allowTransparency:i,alt:null,async:u,autoComplete:null,autoPlay:u,cellPadding:null,cellSpacing:null,charSet:i,checked:a|u,classID:i,className:n?i:a,cols:i|c,colSpan:null,content:null,contentEditable:null,contextMenu:i,controls:a|u,coords:null,crossOrigin:null,data:null,dateTime:i,defer:u,dir:null,disabled:i|u,download:p,draggable:null,encType:null,form:i,formAction:i,formEncType:i,formMethod:i,formNoValidate:u,formTarget:i,frameBorder:i,headers:null,height:i,hidden:i|u,href:null,hrefLang:null,htmlFor:null,httpEquiv:null,icon:null,id:a,label:null,lang:null,list:i,loop:a|u,manifest:i,marginHeight:null,marginWidth:null,max:null,maxLength:i,media:i,mediaGroup:null,method:null,min:null,multiple:a|u,muted:a|u,name:null,noValidate:u,open:u,pattern:null,placeholder:null,poster:null,preload:null,radioGroup:null,readOnly:a|u,rel:null,required:u,role:i,rows:i|c,rowSpan:null,sandbox:null,scope:null,scrolling:null,seamless:i|u,selected:a|u,shape:null,size:i|c,sizes:i,span:c,spellCheck:null,src:null,srcDoc:a,srcSet:i,start:l,step:null,style:null,tabIndex:null,target:null,title:null,type:null,useMap:null,value:a|s,width:i,wmode:i,autoCapitalize:null,autoCorrect:null,itemProp:i,itemScope:i|u,itemType:i,itemID:i,itemRef:i,property:null},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{autoCapitalize:"autocapitalize",autoComplete:"autocomplete",autoCorrect:"autocorrect",autoFocus:"autofocus",autoPlay:"autoplay",encType:"encoding",hrefLang:"hreflang",radioGroup:"radiogroup",spellCheck:"spellcheck",srcDoc:"srcdoc",srcSet:"srcset"}};t.exports=f},{10:10,21:21}],24:[function(e,t){"use strict";function n(e){s(null==e.props.checkedLink||null==e.props.valueLink)}function r(e){n(e),s(null==e.props.value&&null==e.props.onChange)}function o(e){n(e),s(null==e.props.checked&&null==e.props.onChange)}function i(e){this.props.valueLink.requestChange(e.target.value)}function a(e){this.props.checkedLink.requestChange(e.target.checked)}var u=e(76),s=e(133),l={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},c={Mixin:{propTypes:{value:function(e,t){return!e[t]||l[e.type]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(e,t){return!e[t]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")},onChange:u.func}},getValue:function(e){return e.props.valueLink?(r(e),e.props.valueLink.value):e.props.value},getChecked:function(e){return e.props.checkedLink?(o(e),e.props.checkedLink.value):e.props.checked},getOnChange:function(e){return e.props.valueLink?(r(e),i):e.props.checkedLink?(o(e),a):e.props.onChange}};t.exports=c},{133:133,76:76}],25:[function(e,t){"use strict";function n(e){e.remove()}var r=e(30),o=e(103),i=e(118),a=e(133),u={trapBubbledEvent:function(e,t){a(this.isMounted());var n=this.getDOMNode();a(n);var i=r.trapBubbledEvent(e,t,n);this._localEventListeners=o(this._localEventListeners,i)},componentWillUnmount:function(){this._localEventListeners&&i(this._localEventListeners,n)}};t.exports=u},{103:103,118:118,133:133,30:30}],26:[function(e,t){"use strict";var n=e(15),r=e(112),o=n.topLevelTypes,i={eventTypes:null,extractEvents:function(e,t,n,i){if(e===o.topTouchStart){var a=i.target;a&&!a.onclick&&(a.onclick=r)}}};t.exports=i},{112:112,15:15}],27:[function(e,t){"use strict";function n(e){if(null==e)throw new TypeError("Object.assign target cannot be null or undefined");for(var t=Object(e),n=Object.prototype.hasOwnProperty,r=1;rc;c++){var d=u[c];a.hasOwnProperty(d)&&a[d]||(d===s.topWheel?l("wheel")?m.ReactEventListener.trapBubbledEvent(s.topWheel,"wheel",o):l("mousewheel")?m.ReactEventListener.trapBubbledEvent(s.topWheel,"mousewheel",o):m.ReactEventListener.trapBubbledEvent(s.topWheel,"DOMMouseScroll",o):d===s.topScroll?l("scroll",!0)?m.ReactEventListener.trapCapturedEvent(s.topScroll,"scroll",o):m.ReactEventListener.trapBubbledEvent(s.topScroll,"scroll",m.ReactEventListener.WINDOW_HANDLE):d===s.topFocus||d===s.topBlur?(l("focus",!0)?(m.ReactEventListener.trapCapturedEvent(s.topFocus,"focus",o),m.ReactEventListener.trapCapturedEvent(s.topBlur,"blur",o)):l("focusin")&&(m.ReactEventListener.trapBubbledEvent(s.topFocus,"focusin",o),m.ReactEventListener.trapBubbledEvent(s.topBlur,"focusout",o)),a[s.topBlur]=!0,a[s.topFocus]=!0):f.hasOwnProperty(d)&&m.ReactEventListener.trapBubbledEvent(d,f[d],o),a[d]=!0)}},trapBubbledEvent:function(e,t,n){return m.ReactEventListener.trapBubbledEvent(e,t,n)},trapCapturedEvent:function(e,t,n){return m.ReactEventListener.trapCapturedEvent(e,t,n)},ensureScrollValueMonitoring:function(){if(!p){var e=u.refreshScrollValues;
+m.ReactEventListener.monitorScrollValue(e),p=!0}},eventNameDispatchConfigs:o.eventNameDispatchConfigs,registrationNameModules:o.registrationNameModules,putListener:o.putListener,getListener:o.getListener,deleteListener:o.deleteListener,deleteAllListeners:o.deleteAllListeners});t.exports=m},{102:102,134:134,15:15,17:17,18:18,27:27,59:59}],31:[function(e,t){"use strict";var n=e(79),r=e(116),o=e(132),i=e(147),a={instantiateChildren:function(e){var t=r(e);for(var n in t)if(t.hasOwnProperty(n)){var i=t[n],a=o(i,null);t[n]=a}return t},updateChildren:function(e,t,a,u){var s=r(t);if(!s&&!e)return null;var l;for(l in s)if(s.hasOwnProperty(l)){var c=e&&e[l],p=c&&c._currentElement,d=s[l];if(i(p,d))n.receiveComponent(c,d,a,u),s[l]=c;else{c&&n.unmountComponent(c,l);var f=o(d,null);s[l]=f}}for(l in e)!e.hasOwnProperty(l)||s&&s.hasOwnProperty(l)||n.unmountComponent(e[l]);return s},unmountChildren:function(e){for(var t in e){var r=e[t];n.unmountComponent(r)}}};t.exports=a},{116:116,132:132,147:147,79:79}],32:[function(e,t){"use strict";function n(e,t){this.forEachFunction=e,this.forEachContext=t}function r(e,t,n,r){var o=e;o.forEachFunction.call(o.forEachContext,t,r)}function o(e,t,o){if(null==e)return e;var i=n.getPooled(t,o);d(e,r,i),n.release(i)}function i(e,t,n){this.mapResult=e,this.mapFunction=t,this.mapContext=n}function a(e,t,n,r){var o=e,i=o.mapResult,a=!i.hasOwnProperty(n);if(a){var u=o.mapFunction.call(o.mapContext,t,r);i[n]=u}}function u(e,t,n){if(null==e)return e;var r={},o=i.getPooled(r,t,n);return d(e,a,o),i.release(o),p.create(r)}function s(){return null}function l(e){return d(e,s,null)}var c=e(28),p=e(61),d=e(149),f=(e(150),c.twoArgumentPooler),h=c.threeArgumentPooler;c.addPoolingTo(n,f),c.addPoolingTo(i,h);var m={forEach:o,map:u,count:l};t.exports=m},{149:149,150:150,28:28,61:61}],33:[function(e,t){"use strict";function n(e,t){var n=x.hasOwnProperty(t)?x[t]:null;M.hasOwnProperty(t)&&g(n===b.OVERRIDE_BASE),e.hasOwnProperty(t)&&g(n===b.DEFINE_MANY||n===b.DEFINE_MANY_MERGED)}function r(e,t){if(t){g("function"!=typeof t),g(!p.isValidElement(t));var r=e.prototype;t.hasOwnProperty(E)&&D.mixins(e,t.mixins);for(var o in t)if(t.hasOwnProperty(o)&&o!==E){var i=t[o];if(n(r,o),D.hasOwnProperty(o))D[o](e,i);else{var s=x.hasOwnProperty(o),l=r.hasOwnProperty(o),c=i&&i.__reactDontBind,d="function"==typeof i,f=d&&!s&&!l&&!c;if(f)r.__reactAutoBindMap||(r.__reactAutoBindMap={}),r.__reactAutoBindMap[o]=i,r[o]=i;else if(l){var h=x[o];g(s&&(h===b.DEFINE_MANY_MERGED||h===b.DEFINE_MANY)),h===b.DEFINE_MANY_MERGED?r[o]=a(r[o],i):h===b.DEFINE_MANY&&(r[o]=u(r[o],i))}else r[o]=i}}}}function o(e,t){if(t)for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){var o=n in D;g(!o);var i=n in e;g(!i),e[n]=r}}}function i(e,t){g(e&&t&&"object"==typeof e&&"object"==typeof t);for(var n in t)t.hasOwnProperty(n)&&(g(void 0===e[n]),e[n]=t[n]);return e}function a(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var o={};return i(o,n),i(o,r),o}}function u(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function s(e,t){var n=t.bind(e);return n}function l(e){for(var t in e.__reactAutoBindMap)if(e.__reactAutoBindMap.hasOwnProperty(t)){var n=e.__reactAutoBindMap[t];e[t]=s(e,d.guard(n,e.constructor.displayName+"."+t))}}var c=e(34),p=(e(39),e(55)),d=e(58),f=e(65),h=e(66),m=(e(75),e(74),e(84)),v=e(27),g=e(133),y=e(138),C=e(139),E=(e(150),C({mixins:null})),b=y({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null}),_=[],x={mixins:b.DEFINE_MANY,statics:b.DEFINE_MANY,propTypes:b.DEFINE_MANY,contextTypes:b.DEFINE_MANY,childContextTypes:b.DEFINE_MANY,getDefaultProps:b.DEFINE_MANY_MERGED,getInitialState:b.DEFINE_MANY_MERGED,getChildContext:b.DEFINE_MANY_MERGED,render:b.DEFINE_ONCE,componentWillMount:b.DEFINE_MANY,componentDidMount:b.DEFINE_MANY,componentWillReceiveProps:b.DEFINE_MANY,shouldComponentUpdate:b.DEFINE_ONCE,componentWillUpdate:b.DEFINE_MANY,componentDidUpdate:b.DEFINE_MANY,componentWillUnmount:b.DEFINE_MANY,updateComponent:b.OVERRIDE_BASE},D={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n";return this._createOpenTagMarkupAndPutListeners(t)+this._createContentMarkup(t,r)+o},_createOpenTagMarkupAndPutListeners:function(e){var t=this._currentElement.props,n="<"+this._tag;for(var o in t)if(t.hasOwnProperty(o)){var i=t[o];if(null!=i)if(E.hasOwnProperty(o))r(this._rootNodeID,o,i,e);else{o===_&&(i&&(i=this._previousStyleCopy=h({},t.style)),i=a.createMarkupForStyles(i));var u=s.createMarkupForProperty(o,i);u&&(n+=" "+u)}}if(e.renderToStaticMarkup)return n+">";var l=s.createMarkupForID(this._rootNodeID);return n+" "+l+">"},_createContentMarkup:function(e,t){var n="";("listing"===this._tag||"pre"===this._tag||"textarea"===this._tag)&&(n="\n");var r=this._currentElement.props,o=r.dangerouslySetInnerHTML;if(null!=o){if(null!=o.__html)return n+o.__html}else{var i=b[typeof r.children]?r.children:null,a=null!=i?null:r.children;if(null!=i)return n+m(i);if(null!=a){var u=this.mountChildren(a,e,t);return n+u.join("")}}return n},receiveComponent:function(e,t,n){var r=this._currentElement;this._currentElement=e,this.updateComponent(t,r,e,n)},updateComponent:function(e,t,r,o){n(this._currentElement.props),this._updateDOMProperties(t.props,e),this._updateDOMChildren(t.props,e,o)},_updateDOMProperties:function(e,t){var n,o,i,a=this._currentElement.props;for(n in e)if(!a.hasOwnProperty(n)&&e.hasOwnProperty(n))if(n===_){var s=this._previousStyleCopy;for(o in s)s.hasOwnProperty(o)&&(i=i||{},i[o]="");this._previousStyleCopy=null}else E.hasOwnProperty(n)?y(this._rootNodeID,n):(u.isStandardName[n]||u.isCustomAttribute(n))&&D.deletePropertyByID(this._rootNodeID,n);for(n in a){var l=a[n],c=n===_?this._previousStyleCopy:e[n];if(a.hasOwnProperty(n)&&l!==c)if(n===_)if(l&&(l=this._previousStyleCopy=h({},l)),c){for(o in c)!c.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(i=i||{},i[o]="");for(o in l)l.hasOwnProperty(o)&&c[o]!==l[o]&&(i=i||{},i[o]=l[o])}else i=l;else E.hasOwnProperty(n)?r(this._rootNodeID,n,l,t):(u.isStandardName[n]||u.isCustomAttribute(n))&&D.updatePropertyByID(this._rootNodeID,n,l)}i&&D.updateStylesByID(this._rootNodeID,i)},_updateDOMChildren:function(e,t,n){var r=this._currentElement.props,o=b[typeof e.children]?e.children:null,i=b[typeof r.children]?r.children:null,a=e.dangerouslySetInnerHTML&&e.dangerouslySetInnerHTML.__html,u=r.dangerouslySetInnerHTML&&r.dangerouslySetInnerHTML.__html,s=null!=o?null:e.children,l=null!=i?null:r.children,c=null!=o||null!=a,p=null!=i||null!=u;null!=s&&null==l?this.updateChildren(null,t,n):c&&!p&&this.updateTextContent(""),null!=i?o!==i&&this.updateTextContent(""+i):null!=u?a!==u&&D.updateInnerHTMLByID(this._rootNodeID,u):null!=l&&this.updateChildren(l,t,n)},unmountComponent:function(){this.unmountChildren(),l.deleteAllListeners(this._rootNodeID),c.unmountIDFromEnvironment(this._rootNodeID),this._rootNodeID=null}},f.measureMethods(i,"ReactDOMComponent",{mountComponent:"mountComponent",updateComponent:"updateComponent"}),h(i.prototype,i.Mixin,d.Mixin),i.injection={injectIDOperations:function(e){i.BackendIDOperations=D=e}},t.exports=i},{10:10,11:11,114:114,133:133,134:134,139:139,150:150,27:27,30:30,35:35,5:5,68:68,69:69,73:73}],43:[function(e,t){"use strict";var n=e(15),r=e(25),o=e(29),i=e(33),a=e(55),u=a.createFactory("form"),s=i.createClass({displayName:"ReactDOMForm",tagName:"FORM",mixins:[o,r],render:function(){return u(this.props)},componentDidMount:function(){this.trapBubbledEvent(n.topLevelTypes.topReset,"reset"),this.trapBubbledEvent(n.topLevelTypes.topSubmit,"submit")}});t.exports=s},{15:15,25:25,29:29,33:33,55:55}],44:[function(e,t){"use strict";var n=e(5),r=e(9),o=e(11),i=e(68),a=e(73),u=e(133),s=e(144),l={dangerouslySetInnerHTML:"`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.",style:"`style` must be set using `updateStylesByID()`."},c={updatePropertyByID:function(e,t,n){var r=i.getNode(e);u(!l.hasOwnProperty(t)),null!=n?o.setValueForProperty(r,t,n):o.deleteValueForProperty(r,t)},deletePropertyByID:function(e,t,n){var r=i.getNode(e);u(!l.hasOwnProperty(t)),o.deleteValueForProperty(r,t,n)},updateStylesByID:function(e,t){var r=i.getNode(e);n.setValueForStyles(r,t)},updateInnerHTMLByID:function(e,t){var n=i.getNode(e);s(n,t)},updateTextContentByID:function(e,t){var n=i.getNode(e);r.updateTextContent(n,t)},dangerouslyReplaceNodeWithMarkupByID:function(e,t){var n=i.getNode(e);r.dangerouslyReplaceNodeWithMarkup(n,t)},dangerouslyProcessChildrenUpdates:function(e,t){for(var n=0;np;p++){var m=s[p];if(m!==a&&m.form===a.form){var v=l.getID(m);d(v);var g=h[v];d(g),c.asap(n,g)}}}return t}});t.exports=m},{11:11,133:133,2:2,24:24,27:27,29:29,33:33,55:55,68:68,85:85}],48:[function(e,t){"use strict";var n=e(29),r=e(33),o=e(55),i=(e(150),o.createFactory("option")),a=r.createClass({displayName:"ReactDOMOption",tagName:"OPTION",mixins:[n],componentWillMount:function(){},render:function(){return i(this.props,this.props.children)}});t.exports=a},{150:150,29:29,33:33,55:55}],49:[function(e,t){"use strict";function n(){if(this._pendingUpdate){this._pendingUpdate=!1;var e=a.getValue(this);null!=e&&this.isMounted()&&o(this,e)}}function r(e,t){if(null==e[t])return null;if(e.multiple){if(!Array.isArray(e[t]))return new Error("The `"+t+"` prop supplied to