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 must be a scalar value if `multiple` is false.")}function o(e,t){var n,r,o,i=e.getDOMNode().options;if(e.props.multiple){for(n={},r=0,o=t.length;o>r;r++)n[""+t[r]]=!0;for(r=0,o=i.length;o>r;r++){var a=n.hasOwnProperty(i[r].value);i[r].selected!==a&&(i[r].selected=a)}}else{for(n=""+t,r=0,o=i.length;o>r;r++)if(i[r].value===n)return void(i[r].selected=!0);i.length&&(i[0].selected=!0)}}var i=e(2),a=e(24),u=e(29),s=e(33),l=e(55),c=e(85),p=e(27),d=l.createFactory("select"),f=s.createClass({displayName:"ReactDOMSelect",tagName:"SELECT",mixins:[i,a.Mixin,u],propTypes:{defaultValue:r,value:r},render:function(){var e=p({},this.props);return e.onChange=this._handleChange,e.value=null,d(e,this.props.children)},componentWillMount:function(){this._pendingUpdate=!1},componentDidMount:function(){var e=a.getValue(this);null!=e?o(this,e):null!=this.props.defaultValue&&o(this,this.props.defaultValue)},componentDidUpdate:function(e){var t=a.getValue(this);null!=t?(this._pendingUpdate=!1,o(this,t)):!e.multiple!=!this.props.multiple&&(null!=this.props.defaultValue?o(this,this.props.defaultValue):o(this,this.props.multiple?[]:""))},_handleChange:function(e){var t,r=a.getOnChange(this);return r&&(t=r.call(this,e)),this._pendingUpdate=!0,c.asap(n,this),t}});t.exports=f},{2:2,24:24,27:27,29:29,33:33,55:55,85:85}],50:[function(e,t){"use strict";function n(e,t,n,r){return e===n&&t===r}function r(e){var t=document.selection,n=t.createRange(),r=n.text.length,o=n.duplicate();o.moveToElementText(e),o.setEndPoint("EndToStart",n);var i=o.text.length,a=i+r;return{start:i,end:a}}function o(e){var t=window.getSelection&&window.getSelection();if(!t||0===t.rangeCount)return null;var r=t.anchorNode,o=t.anchorOffset,i=t.focusNode,a=t.focusOffset,u=t.getRangeAt(0),s=n(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset),l=s?0:u.toString().length,c=u.cloneRange();c.selectNodeContents(e),c.setEnd(u.startContainer,u.startOffset);var p=n(c.startContainer,c.startOffset,c.endContainer,c.endOffset),d=p?0:c.toString().length,f=d+l,h=document.createRange();h.setStart(r,o),h.setEnd(i,a);var m=h.collapsed;return{start:m?f:d,end:m?d:f}}function i(e,t){var n,r,o=document.selection.createRange().duplicate();"undefined"==typeof t.end?(n=t.start,r=n):t.start>t.end?(n=t.end,r=t.start):(n=t.start,r=t.end),o.moveToElementText(e),o.moveStart("character",n),o.setEndPoint("EndToStart",o),o.moveEnd("character",r-n),o.select()}function a(e,t){if(window.getSelection){var n=window.getSelection(),r=e[l()].length,o=Math.min(t.start,r),i="undefined"==typeof t.end?o:Math.min(t.end,r);if(!n.extend&&o>i){var a=i;i=o,o=a}var u=s(e,o),c=s(e,i);if(u&&c){var p=document.createRange();p.setStart(u.node,u.offset),n.removeAllRanges(),o>i?(n.addRange(p),n.extend(c.node,c.offset)):(p.setEnd(c.node,c.offset),n.addRange(p))}}}var u=e(21),s=e(126),l=e(128),c=u.canUseDOM&&"selection"in document&&!("getSelection"in window),p={getOffsets:c?r:o,setOffsets:c?i:a};t.exports=p},{126:126,128:128,21:21}],51:[function(e,t){"use strict";var n=e(11),r=e(35),o=e(42),i=e(27),a=e(114),u=function(){};i(u.prototype,{construct:function(e){this._currentElement=e,this._stringText=""+e,this._rootNodeID=null,this._mountIndex=0},mountComponent:function(e,t){this._rootNodeID=e;var r=a(this._stringText);return t.renderToStaticMarkup?r:""+r+""},receiveComponent:function(e){if(e!==this._currentElement){this._currentElement=e;var t=""+e;t!==this._stringText&&(this._stringText=t,o.BackendIDOperations.updateTextContentByID(this._rootNodeID,t))}},unmountComponent:function(){r.unmountIDFromEnvironment(this._rootNodeID)}}),t.exports=u},{11:11,114:114,27:27,35:35,42:42}],52:[function(e,t){"use strict";function n(){this.isMounted()&&this.forceUpdate()}var r=e(2),o=e(11),i=e(24),a=e(29),u=e(33),s=e(55),l=e(85),c=e(27),p=e(133),d=(e(150),s.createFactory("textarea")),f=u.createClass({displayName:"ReactDOMTextarea",tagName:"TEXTAREA",mixins:[r,i.Mixin,a],getInitialState:function(){var e=this.props.defaultValue,t=this.props.children;null!=t&&(p(null==e),Array.isArray(t)&&(p(t.length<=1),t=t[0]),e=""+t),null==e&&(e="");var n=i.getValue(this);return{initialValue:""+(null!=n?n:e)}},render:function(){var e=c({},this.props);return p(null==e.dangerouslySetInnerHTML),e.defaultValue=null,e.value=null,e.onChange=this._handleChange,d(e,this.state.initialValue)},componentDidUpdate:function(){var e=i.getValue(this);if(null!=e){var t=this.getDOMNode();o.setValueForProperty(t,"value",""+e)}},_handleChange:function(e){var t,r=i.getOnChange(this);return r&&(t=r.call(this,e)),l.asap(n,this),t}});t.exports=f},{11:11,133:133,150:150,2:2,24:24,27:27,29:29,33:33,55:55,85:85}],53:[function(e,t){"use strict";function n(){this.reinitializeTransaction()}var r=e(85),o=e(101),i=e(27),a=e(112),u={initialize:a,close:function(){p.isBatchingUpdates=!1}},s={initialize:a,close:r.flushBatchedUpdates.bind(r)},l=[s,u];i(n.prototype,o.Mixin,{getTransactionWrappers:function(){return l}});var c=new n,p={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,r,o){var i=p.isBatchingUpdates;p.isBatchingUpdates=!0,i?e(t,n,r,o):c.perform(e,null,t,n,r,o)}};t.exports=p},{101:101,112:112,27:27,85:85}],54:[function(e,t){"use strict";function n(e){return f.createClass({tagName:e.toUpperCase(),render:function(){return new I(e,null,null,null,null,this.props)}})}function r(){R.EventEmitter.injectReactEventListener(T),R.EventPluginHub.injectEventPluginOrder(u),R.EventPluginHub.injectInstanceHandle(P),R.EventPluginHub.injectMount(w),R.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:k,EnterLeaveEventPlugin:s,ChangeEventPlugin:i,MobileSafariClickEventPlugin:p,SelectEventPlugin:S,BeforeInputEventPlugin:o}),R.NativeComponent.injectGenericComponentClass(v),R.NativeComponent.injectTextComponentClass(N),R.NativeComponent.injectAutoWrapper(n),R.Class.injectMixin(d),R.NativeComponent.injectComponentClasses({button:g,form:y,iframe:b,img:C,input:_,option:x,select:D,textarea:M,html:U("html"),head:U("head"),body:U("body")}),R.DOMProperty.injectDOMPropertyConfig(c),R.DOMProperty.injectDOMPropertyConfig(L),R.EmptyComponent.injectEmptyComponent("noscript"),R.Updates.injectReconcileTransaction(O),R.Updates.injectBatchingStrategy(m),R.RootIndex.injectCreateReactRootIndex(l.canUseDOM?a.createReactRootIndex:A.createReactRootIndex),R.Component.injectEnvironment(h),R.DOMComponent.injectIDOperations(E)}var o=e(3),i=e(7),a=e(8),u=e(13),s=e(14),l=e(21),c=e(23),p=e(26),d=e(29),f=e(33),h=e(35),m=e(53),v=e(42),g=e(41),y=e(43),C=e(46),E=e(44),b=e(45),_=e(47),x=e(48),D=e(49),M=e(52),N=e(51),I=e(55),T=e(60),R=e(62),P=e(64),w=e(68),O=e(78),S=e(87),A=e(88),k=e(89),L=e(86),U=e(109);t.exports={inject:r}},{109:109,13:13,14:14,21:21,23:23,26:26,29:29,3:3,33:33,35:35,41:41,42:42,43:43,44:44,45:45,46:46,47:47,48:48,49:49,51:51,52:52,53:53,55:55,60:60,62:62,64:64,68:68,7:7,78:78,8:8,86:86,87:87,88:88,89:89}],55:[function(e,t){"use strict";var n=e(38),r=e(39),o=e(27),i=(e(150),{key:!0,ref:!0}),a=function(e,t,n,r,o,i){this.type=e,this.key=t,this.ref=n,this._owner=r,this._context=o,this.props=i};a.prototype={_isReactElement:!0},a.createElement=function(e,t,o){var u,s={},l=null,c=null;if(null!=t){c=void 0===t.ref?null:t.ref,l=void 0===t.key?null:""+t.key;for(u in t)t.hasOwnProperty(u)&&!i.hasOwnProperty(u)&&(s[u]=t[u]) +}var p=arguments.length-2;if(1===p)s.children=o;else if(p>1){for(var d=Array(p),f=0;p>f;f++)d[f]=arguments[f+2];s.children=d}if(e&&e.defaultProps){var h=e.defaultProps;for(u in h)"undefined"==typeof s[u]&&(s[u]=h[u])}return new a(e,l,c,r.current,n.current,s)},a.createFactory=function(e){var t=a.createElement.bind(null,e);return t.type=e,t},a.cloneAndReplaceProps=function(e,t){var n=new a(e.type,e.key,e.ref,e._owner,e._context,t);return n},a.cloneElement=function(e,t,n){var u,s=o({},e.props),l=e.key,c=e.ref,p=e._owner;if(null!=t){void 0!==t.ref&&(c=t.ref,p=r.current),void 0!==t.key&&(l=""+t.key);for(u in t)t.hasOwnProperty(u)&&!i.hasOwnProperty(u)&&(s[u]=t[u])}var d=arguments.length-2;if(1===d)s.children=n;else if(d>1){for(var f=Array(d),h=0;d>h;h++)f[h]=arguments[h+2];s.children=f}return new a(e.type,l,c,p,e._context,s)},a.isValidElement=function(e){var t=!(!e||!e._isReactElement);return t},t.exports=a},{150:150,27:27,38:38,39:39}],56:[function(e,t){"use strict";function n(){if(g.current){var e=g.current.getName();if(e)return" Check the render method of `"+e+"`."}return""}function r(e){var t=e&&e.getPublicInstance();if(!t)return void 0;var n=t.constructor;return n?n.displayName||n.name||void 0:void 0}function o(){var e=g.current;return e&&r(e)||void 0}function i(e,t){e._store.validated||null!=e.key||(e._store.validated=!0,u('Each child in an array or iterator should have a unique "key" prop.',e,t))}function a(e,t,n){x.test(e)&&u("Child objects should have non-numeric keys so ordering is preserved.",t,n)}function u(e,t,n){var i=o(),a="string"==typeof n?n:n.displayName||n.name,u=i||a,s=b[e]||(b[e]={});if(!s.hasOwnProperty(u)){s[u]=!0;var l="";if(t&&t._owner&&t._owner!==g.current){var c=r(t._owner);l=" It was passed a child from "+c+"."}}}function s(e,t){if(Array.isArray(e))for(var n=0;n");var u="";o&&(u=" The element was created by "+o+".")}}function p(e,t){return e!==e?t!==t:0===e&&0===t?1/e===1/t:e===t}function d(e){if(e._store){var t=e._store.originalProps,n=e.props;for(var r in n)n.hasOwnProperty(r)&&(t.hasOwnProperty(r)&&p(t[r],n[r])||(c(r,e),t[r]=n[r]))}}function f(e){if(null!=e.type){var t=y.getComponentClassForElement(e),n=t.displayName||t.name;t.propTypes&&l(n,t.propTypes,e.props,v.prop),"function"==typeof t.getDefaultProps}}var h=e(55),m=e(61),v=e(75),g=(e(74),e(39)),y=e(71),C=e(124),E=e(133),b=(e(150),{}),_={},x=/^\d+$/,D={},M={checkAndWarnForMutatedProps:d,createElement:function(e){var t=h.createElement.apply(this,arguments);if(null==t)return t;for(var n=2;no;o++){t=e.ancestors[o];var a=c.getID(t)||"";m._handleTopLevel(e.topLevelType,t,a,e.nativeEvent)}}function i(e){var t=h(window);e(t)}var a=e(16),u=e(21),s=e(28),l=e(64),c=e(68),p=e(85),d=e(27),f=e(123),h=e(129);d(r.prototype,{destructor:function(){this.topLevelType=null,this.nativeEvent=null,this.ancestors.length=0}}),s.addPoolingTo(r,s.twoArgumentPooler);var m={_enabled:!0,_handleTopLevel:null,WINDOW_HANDLE:u.canUseDOM?window:null,setHandleTopLevel:function(e){m._handleTopLevel=e},setEnabled:function(e){m._enabled=!!e},isEnabled:function(){return m._enabled},trapBubbledEvent:function(e,t,n){var r=n;return r?a.listen(r,t,m.dispatchEvent.bind(null,e)):null},trapCapturedEvent:function(e,t,n){var r=n;return r?a.capture(r,t,m.dispatchEvent.bind(null,e)):null},monitorScrollValue:function(e){var t=i.bind(null,e);a.listen(window,"scroll",t)},dispatchEvent:function(e,t){if(m._enabled){var n=r.getPooled(e,t);try{p.batchedUpdates(o,n)}finally{r.release(n)}}}};t.exports=m},{123:123,129:129,16:16,21:21,27:27,28:28,64:64,68:68,85:85}],61:[function(e,t){"use strict";var n=(e(55),e(150),{create:function(e){return e},extract:function(e){return e},extractIfFragment:function(e){return e}});t.exports=n},{150:150,55:55}],62:[function(e,t){"use strict";var n=e(10),r=e(17),o=e(36),i=e(33),a=e(57),u=e(30),s=e(71),l=e(42),c=e(73),p=e(81),d=e(85),f={Component:o.injection,Class:i.injection,DOMComponent:l.injection,DOMProperty:n.injection,EmptyComponent:a.injection,EventPluginHub:r.injection,EventEmitter:u.injection,NativeComponent:s.injection,Perf:c.injection,RootIndex:p.injection,Updates:d.injection};t.exports=f},{10:10,17:17,30:30,33:33,36:36,42:42,57:57,71:71,73:73,81:81,85:85}],63:[function(e,t){"use strict";function n(e){return o(document.documentElement,e)}var r=e(50),o=e(107),i=e(117),a=e(119),u={hasSelectionCapabilities:function(e){return e&&("INPUT"===e.nodeName&&"text"===e.type||"TEXTAREA"===e.nodeName||"true"===e.contentEditable)},getSelectionInformation:function(){var e=a();return{focusedElem:e,selectionRange:u.hasSelectionCapabilities(e)?u.getSelection(e):null}},restoreSelection:function(e){var t=a(),r=e.focusedElem,o=e.selectionRange;t!==r&&n(r)&&(u.hasSelectionCapabilities(r)&&u.setSelection(r,o),i(r))},getSelection:function(e){var t;if("selectionStart"in e)t={start:e.selectionStart,end:e.selectionEnd};else if(document.selection&&"INPUT"===e.nodeName){var n=document.selection.createRange();n.parentElement()===e&&(t={start:-n.moveStart("character",-e.value.length),end:-n.moveEnd("character",-e.value.length)})}else t=r.getOffsets(e);return t||{start:0,end:0}},setSelection:function(e,t){var n=t.start,o=t.end;if("undefined"==typeof o&&(o=n),"selectionStart"in e)e.selectionStart=n,e.selectionEnd=Math.min(o,e.value.length);else if(document.selection&&"INPUT"===e.nodeName){var i=e.createTextRange();i.collapse(!0),i.moveStart("character",n),i.moveEnd("character",o-n),i.select()}else r.setOffsets(e,t)}};t.exports=u},{107:107,117:117,119:119,50:50}],64:[function(e,t){"use strict";function n(e){return d+e.toString(36)}function r(e,t){return e.charAt(t)===d||t===e.length}function o(e){return""===e||e.charAt(0)===d&&e.charAt(e.length-1)!==d}function i(e,t){return 0===t.indexOf(e)&&r(t,e.length)}function a(e){return e?e.substr(0,e.lastIndexOf(d)):""}function u(e,t){if(p(o(e)&&o(t)),p(i(e,t)),e===t)return e;var n,a=e.length+f;for(n=a;n=a;a++)if(r(e,a)&&r(t,a))i=a;else if(e.charAt(a)!==t.charAt(a))break;var u=e.substr(0,i);return p(o(u)),u}function l(e,t,n,r,o,s){e=e||"",t=t||"",p(e!==t);var l=i(t,e);p(l||i(e,t));for(var c=0,d=l?a:u,f=e;;f=d(f,t)){var m;if(o&&f===e||s&&f===t||(m=n(f,l,r)),m===!1||f===t)break;p(c++1){var t=e.indexOf(d,1);return t>-1?e.substr(0,t):e}return null},traverseEnterLeave:function(e,t,n,r,o){var i=s(e,t);i!==e&&l(e,i,n,r,!1,!0),i!==t&&l(i,t,n,o,!0,!1)},traverseTwoPhase:function(e,t,n){e&&(l("",e,t,n,!0,!1),l(e,"",t,n,!1,!0))},traverseAncestors:function(e,t,n){l("",e,t,n,!0,!1)},_getFirstCommonAncestorID:s,_getNextDescendantID:u,isAncestorIDOf:i,SEPARATOR:d};t.exports=m},{133:133,81:81}],65:[function(e,t){"use strict";var n={remove:function(e){e._reactInternalInstance=void 0},get:function(e){return e._reactInternalInstance},has:function(e){return void 0!==e._reactInternalInstance},set:function(e,t){e._reactInternalInstance=t}};t.exports=n},{}],66:[function(e,t){"use strict";var n={currentlyMountingInstance:null,currentlyUnmountingInstance:null};t.exports=n},{}],67:[function(e,t){"use strict";var n=e(104),r={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=n(e);return e.replace(">"," "+r.CHECKSUM_ATTR_NAME+'="'+t+'">')},canReuseMarkup:function(e,t){var o=t.getAttribute(r.CHECKSUM_ATTR_NAME);o=o&&parseInt(o,10);var i=n(e);return i===o}};t.exports=r},{104:104}],68:[function(e,t){"use strict";function n(e,t){for(var n=Math.min(e.length,t.length),r=0;n>r;r++)if(e.charAt(r)!==t.charAt(r))return r;return e.length===t.length?-1:n}function r(e){var t=T(e);return t&&K.getID(t)}function o(e){var t=i(e);if(t)if(k.hasOwnProperty(t)){var n=k[t];n!==e&&(P(!l(n,t)),k[t]=e)}else k[t]=e;return t}function i(e){return e&&e.getAttribute&&e.getAttribute(A)||""}function a(e,t){var n=i(e);n!==t&&delete k[n],e.setAttribute(A,t),k[t]=e}function u(e){return k.hasOwnProperty(e)&&l(k[e],e)||(k[e]=K.findReactNodeByID(e)),k[e]}function s(e){var t=E.get(e)._rootNodeID;return y.isNullComponentID(t)?null:(k.hasOwnProperty(t)&&l(k[t],t)||(k[t]=K.findReactNodeByID(t)),k[t])}function l(e,t){if(e){P(i(e)===t);var n=K.findReactContainerForID(t);if(n&&I(n,e))return!0}return!1}function c(e){delete k[e]}function p(e){var t=k[e];return t&&l(t,e)?void(j=t):!1}function d(e){j=null,C.traverseAncestors(e,p);var t=j;return j=null,t}function f(e,t,n,r,o){var i=x.mountComponent(e,t,r,N);e._isTopLevel=!0,K._mountImageIntoNode(i,n,o)}function h(e,t,n,r){var o=M.ReactReconcileTransaction.getPooled();o.perform(f,null,e,t,n,o,r),M.ReactReconcileTransaction.release(o)}var m=e(10),v=e(30),g=(e(39),e(55)),y=(e(56),e(57)),C=e(64),E=e(65),b=e(67),_=e(73),x=e(79),D=e(84),M=e(85),N=e(113),I=e(107),T=e(127),R=e(132),P=e(133),w=e(144),O=e(147),S=(e(150),C.SEPARATOR),A=m.ID_ATTRIBUTE_NAME,k={},L=1,U=9,F={},B={},V=[],j=null,K={_instancesByReactRootID:F,scrollMonitor:function(e,t){t()},_updateRootComponent:function(e,t,n,r){return K.scrollMonitor(n,function(){D.enqueueElementInternal(e,t),r&&D.enqueueCallbackInternal(e,r)}),e},_registerComponent:function(e,t){P(t&&(t.nodeType===L||t.nodeType===U)),v.ensureScrollValueMonitoring();var n=K.registerContainer(t);return F[n]=e,n},_renderNewRootComponent:function(e,t,n){var r=R(e,null),o=K._registerComponent(r,t);return M.batchedUpdates(h,r,o,t,n),r},render:function(e,t,n){P(g.isValidElement(e));var o=F[r(t)];if(o){var i=o._currentElement;if(O(i,e))return K._updateRootComponent(o,e,t,n).getPublicInstance();K.unmountComponentAtNode(t)}var a=T(t),u=a&&K.isRenderedByReact(a),s=u&&!o,l=K._renderNewRootComponent(e,t,s).getPublicInstance();return n&&n.call(l),l},constructAndRenderComponent:function(e,t,n){var r=g.createElement(e,t);return K.render(r,n)},constructAndRenderComponentByID:function(e,t,n){var r=document.getElementById(n);return P(r),K.constructAndRenderComponent(e,t,r)},registerContainer:function(e){var t=r(e);return t&&(t=C.getReactRootIDFromNodeID(t)),t||(t=C.createReactRootID()),B[t]=e,t},unmountComponentAtNode:function(e){P(e&&(e.nodeType===L||e.nodeType===U));var t=r(e),n=F[t];return n?(K.unmountComponentFromNode(n,e),delete F[t],delete B[t],!0):!1},unmountComponentFromNode:function(e,t){for(x.unmountComponent(e),t.nodeType===U&&(t=t.documentElement);t.lastChild;)t.removeChild(t.lastChild)},findReactContainerForID:function(e){var t=C.getReactRootIDFromNodeID(e),n=B[t];return n},findReactNodeByID:function(e){var t=K.findReactContainerForID(e);return K.findComponentRoot(t,e)},isRenderedByReact:function(e){if(1!==e.nodeType)return!1;var t=K.getID(e);return t?t.charAt(0)===S:!1},getFirstReactDOM:function(e){for(var t=e;t&&t.parentNode!==t;){if(K.isRenderedByReact(t))return t;t=t.parentNode}return null},findComponentRoot:function(e,t){var n=V,r=0,o=d(t)||e;for(n[0]=o.firstChild,n.length=1;r>",b=a(),_=p(),x={array:r("array"),bool:r("boolean"),func:r("function"),number:r("number"),object:r("object"),string:r("string"),any:o(),arrayOf:i,element:b,instanceOf:u,node:_,objectOf:l,oneOf:s,oneOfType:c,shape:d};t.exports=x},{112:112,55:55,61:61,74:74}],77:[function(e,t){"use strict";function n(){this.listenersToPut=[]}var r=e(28),o=e(30),i=e(27);i(n.prototype,{enqueuePutListener:function(e,t,n){this.listenersToPut.push({rootNodeID:e,propKey:t,propValue:n})},putListeners:function(){for(var e=0;en;n++){var r=v[n],o=r._pendingCallbacks;if(r._pendingCallbacks=null,d.performUpdateIfNecessary(r,e.reconcileTransaction),o)for(var a=0;a":">","<":"<",'"':""","'":"'"},i=/[&><"']/g;t.exports=r},{}],115:[function(e,t){"use strict";function n(e){return null==e?null:a(e)?e:r.has(e)?o.getNodeFromInstance(e):(i(null==e.render||"function"!=typeof e.render),void i(!1))}{var r=(e(39),e(65)),o=e(68),i=e(133),a=e(135);e(150)}t.exports=n},{133:133,135:135,150:150,39:39,65:65,68:68}],116:[function(e,t){"use strict";function n(e,t,n){var r=e,o=!r.hasOwnProperty(n);o&&null!=t&&(r[n]=t)}function r(e){if(null==e)return e;var t={};return o(e,n,t),t}{var o=e(149);e(150)}t.exports=r},{149:149,150:150}],117:[function(e,t){"use strict";function n(e){try{e.focus()}catch(t){}}t.exports=n},{}],118:[function(e,t){"use strict";var n=function(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)};t.exports=n},{}],119:[function(e,t){function n(){try{return document.activeElement||document.body}catch(e){return document.body}}t.exports=n},{}],120:[function(e,t){"use strict";function n(e){var t,n=e.keyCode;return"charCode"in e?(t=e.charCode,0===t&&13===n&&(t=13)):t=n,t>=32||13===t?t:0}t.exports=n},{}],121:[function(e,t){"use strict";function n(e){if(e.key){var t=o[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=r(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?i[e.keyCode]||"Unidentified":""}var r=e(120),o={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},i={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};t.exports=n},{120:120}],122:[function(e,t){"use strict";function n(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var r=o[e];return r?!!n[r]:!1}function r(){return n}var o={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};t.exports=r},{}],123:[function(e,t){"use strict";function n(e){var t=e.target||e.srcElement||window;return 3===t.nodeType?t.parentNode:t}t.exports=n},{}],124:[function(e,t){"use strict";function n(e){var t=e&&(r&&e[r]||e[o]);return"function"==typeof t?t:void 0}var r="function"==typeof Symbol&&Symbol.iterator,o="@@iterator";t.exports=n},{}],125:[function(e,t){function n(e){return o(!!i),p.hasOwnProperty(e)||(e="*"),a.hasOwnProperty(e)||(i.innerHTML="*"===e?"":"<"+e+">",a[e]=!i.firstChild),a[e]?p[e]:null}var r=e(21),o=e(133),i=r.canUseDOM?document.createElement("div"):null,a={circle:!0,defs:!0,ellipse:!0,g:!0,line:!0,linearGradient:!0,path:!0,polygon:!0,polyline:!0,radialGradient:!0,rect:!0,stop:!0,text:!0},u=[1,'"],s=[1,"","
"],l=[3,"","
"],c=[1,"",""],p={"*":[1,"?
","
"],area:[1,"",""],col:[2,"","
"],legend:[1,"
","
"],param:[1,"",""],tr:[2,"","
"],optgroup:u,option:u,caption:s,colgroup:s,tbody:s,tfoot:s,thead:s,td:l,th:l,circle:c,defs:c,ellipse:c,g:c,line:c,linearGradient:c,path:c,polygon:c,polyline:c,radialGradient:c,rect:c,stop:c,text:c};t.exports=n},{133:133,21:21}],126:[function(e,t){"use strict";function n(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function r(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function o(e,t){for(var o=n(e),i=0,a=0;o;){if(3===o.nodeType){if(a=i+o.textContent.length,t>=i&&a>=t)return{node:o,offset:t-i};i=a}o=n(r(o))}}t.exports=o},{}],127:[function(e,t){"use strict";function n(e){return e?e.nodeType===r?e.documentElement:e.firstChild:null}var r=9;t.exports=n},{}],128:[function(e,t){"use strict";function n(){return!o&&r.canUseDOM&&(o="textContent"in document.documentElement?"textContent":"innerText"),o}var r=e(21),o=null;t.exports=n},{21:21}],129:[function(e,t){"use strict";function n(e){return e===window?{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}}t.exports=n},{}],130:[function(e,t){function n(e){return e.replace(r,"-$1").toLowerCase()}var r=/([A-Z])/g;t.exports=n},{}],131:[function(e,t){"use strict";function n(e){return r(e).replace(o,"-ms-")}var r=e(130),o=/^ms-/;t.exports=n},{130:130}],132:[function(e,t){"use strict";function n(e){return"function"==typeof e&&"function"==typeof e.prototype.mountComponent&&"function"==typeof e.prototype.receiveComponent}function r(e,t){var r;if((null===e||e===!1)&&(e=i.emptyElement),"object"==typeof e){var o=e;r=t===o.type&&"string"==typeof o.type?a.createInternalComponent(o):n(o.type)?new o.type(o):new l}else"string"==typeof e||"number"==typeof e?r=a.createInstanceForText(e):s(!1);return r.construct(e),r._mountIndex=0,r._mountImage=null,r}var o=e(37),i=e(57),a=e(71),u=e(27),s=e(133),l=(e(150),function(){});u(l.prototype,o.Mixin,{_instantiateReactComponent:r}),t.exports=r},{133:133,150:150,27:27,37:37,57:57,71:71}],133:[function(e,t){"use strict";var n=function(e,t,n,r,o,i,a,u){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,o,i,a,u],c=0;s=new Error("Invariant Violation: "+t.replace(/%s/g,function(){return l[c++]}))}throw s.framesToPop=1,s}};t.exports=n},{}],134:[function(e,t){"use strict";function n(e,t){if(!o.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,i=n in document;if(!i){var a=document.createElement("div");a.setAttribute(n,"return;"),i="function"==typeof a[n]}return!i&&r&&"wheel"===e&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}var r,o=e(21);o.canUseDOM&&(r=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),t.exports=n},{21:21}],135:[function(e,t){function n(e){return!(!e||!("function"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}t.exports=n},{}],136:[function(e,t){"use strict";function n(e){return e&&("INPUT"===e.nodeName&&r[e.type]||"TEXTAREA"===e.nodeName)}var r={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};t.exports=n},{}],137:[function(e,t){function n(e){return r(e)&&3==e.nodeType}var r=e(135);t.exports=n},{135:135}],138:[function(e,t){"use strict";var n=e(133),r=function(e){var t,r={};n(e instanceof Object&&!Array.isArray(e));for(t in e)e.hasOwnProperty(t)&&(r[t]=t);return r};t.exports=r},{133:133}],139:[function(e,t){var n=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return t;return null};t.exports=n},{}],140:[function(e,t){"use strict";function n(e,t,n){if(!e)return null;var o={};for(var i in e)r.call(e,i)&&(o[i]=t.call(n,e[i],i,e));return o}var r=Object.prototype.hasOwnProperty;t.exports=n},{}],141:[function(e,t){"use strict";function n(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e.call(this,n)),t[n]}}t.exports=n},{}],142:[function(e,t){"use strict";function n(e){return o(r.isValidElement(e)),e}var r=e(55),o=e(133);t.exports=n},{133:133,55:55}],143:[function(e,t){"use strict";function n(e){return'"'+r(e)+'"'}var r=e(114);t.exports=n},{114:114}],144:[function(e,t){"use strict";var n=e(21),r=/^[ \r\n\t\f]/,o=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,i=function(e,t){e.innerHTML=t};if("undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction&&(i=function(e,t){MSApp.execUnsafeLocalFunction(function(){e.innerHTML=t})}),n.canUseDOM){var a=document.createElement("div");a.innerHTML=" ",""===a.innerHTML&&(i=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),r.test(t)||"<"===t[0]&&o.test(t)){e.innerHTML=""+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t})}t.exports=i},{21:21}],145:[function(e,t){"use strict";var n=e(21),r=e(114),o=e(144),i=function(e,t){e.textContent=t};n.canUseDOM&&("textContent"in document.documentElement||(i=function(e,t){o(e,r(t))})),t.exports=i},{114:114,144:144,21:21}],146:[function(e,t){"use strict";function n(e,t){if(e===t)return!0;var n;for(n in e)if(e.hasOwnProperty(n)&&(!t.hasOwnProperty(n)||e[n]!==t[n]))return!1;for(n in t)if(t.hasOwnProperty(n)&&!e.hasOwnProperty(n))return!1;return!0}t.exports=n},{}],147:[function(e,t){"use strict";function n(e,t){if(null!=e&&null!=t){var n=typeof e,r=typeof t;if("string"===n||"number"===n)return"string"===r||"number"===r;if("object"===r&&e.type===t.type&&e.key===t.key){var o=e._owner===t._owner;return o}}return!1}e(150);t.exports=n},{150:150}],148:[function(e,t){function n(e){var t=e.length;if(r(!Array.isArray(e)&&("object"==typeof e||"function"==typeof e)),r("number"==typeof t),r(0===t||t-1 in e),e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch(n){}for(var o=Array(t),i=0;t>i;i++)o[i]=e[i];return o}var r=e(133);t.exports=n},{133:133}],149:[function(e,t){"use strict";function n(e){return m[e]}function r(e,t){return e&&null!=e.key?i(e.key):t.toString(36)}function o(e){return(""+e).replace(v,n)}function i(e){return"$"+o(e)}function a(e,t,n,o,u){var c=typeof e;if(("undefined"===c||"boolean"===c)&&(e=null),null===e||"string"===c||"number"===c||s.isValidElement(e))return o(u,e,""===t?f+r(e,0):t,n),1;var m,v,g,y=0;if(Array.isArray(e))for(var C=0;C>>0),la=0;function ma(a,b,c){return a.call.apply(a.bind,arguments)} +function na(a,b,c){if(!a)throw Error();if(2b?1:0};function va(a,b){for(var c in a)b.call(void 0,a[c],c,a)}function wa(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b}function xa(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b}var ya="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function za(a,b){for(var c,d,e=1;ec?Math.max(0,a.length+c):c;if(ga(a))return ga(b)&&1==b.length?a.indexOf(b,c):-1;for(;cb?null:ga(a)?a.charAt(b):a[b]}function Ka(a){return Fa.concat.apply(Fa,arguments)}function La(a){var b=a.length;if(0b?1:a>>16&65535)*d+c*(b>>>16&65535)<<16>>>0)|0};function Hc(a){a=Gc(a|0,-862048943);return Gc(a<<15|a>>>-15,461845907)}function Ic(a,b){var c=(a|0)^(b|0);return Gc(c<<13|c>>>-13,5)+-430675100|0} +function Jc(a,b){var c=(a|0)^b,c=Gc(c^c>>>16,-2048144789),c=Gc(c^c>>>13,-1028477387);return c^c>>>16}function Kc(a){var b;a:{b=1;for(var c=0;;)if(b>2)}function Rc(a,b){if(a.Aa===b.Aa)return 0;var c=cb(a.za);if(t(c?b.za:c))return-1;if(t(a.za)){if(cb(b.za))return 1;c=Ma(a.za,b.za);return 0===c?Ma(a.name,b.name):c}return Ma(a.name,b.name)}function H(a,b,c,d,e){this.za=a;this.name=b;this.Aa=c;this.Xb=d;this.Ba=e;this.B=2154168321;this.K=4096}h=H.prototype;h.toString=function(){return this.Aa};h.equiv=function(a){return this.G(null,a)};h.G=function(a,b){return b instanceof H?this.Aa===b.Aa:!1}; +h.call=function(){var a=null,a=function(a,c,d){switch(arguments.length){case 2:return Ib.o(c,this,null);case 3:return Ib.o(c,this,d)}throw Error("Invalid arity: "+arguments.length);};a.j=function(a,c){return Ib.o(c,this,null)};a.o=function(a,c,d){return Ib.o(c,this,d)};return a}();h.apply=function(a,b){return this.call.apply(this,[this].concat(hb(b)))};h.h=function(a){return Ib.o(a,this,null)};h.j=function(a,b){return Ib.o(a,this,b)};h.S=function(){return this.Ba}; +h.T=function(a,b){return new H(this.za,this.name,this.Aa,this.Xb,b)};h.P=function(){var a=this.Xb;return null!=a?a:this.Xb=a=Qc(Kc(this.name),Nc(this.za))};h.O=function(a,b){return F(b,this.Aa)};function Sc(a){return a instanceof H?a:Tc(null,a)}function Tc(a,b){var c=null!=a?[x(a),x("/"),x(b)].join(""):b;return new H(a,b,c,null,null)} +function I(a){if(null==a)return null;if(a&&(a.B&8388608||a.xf))return a.Z(null);if(bb(a)||"string"===typeof a)return 0===a.length?null:new y(a,0);if(v(fc,a))return gc(a);throw Error([x(a),x(" is not ISeqable")].join(""));}function z(a){if(null==a)return null;if(a&&(a.B&64||a.zc))return a.ma(null);a=I(a);return null==a?null:Cb(a)}function Uc(a){return null!=a?a&&(a.B&64||a.zc)?a.ta(null):(a=I(a))?Db(a):J:J}function B(a){return null==a?null:a&&(a.B&128||a.Wc)?a.wa(null):I(Uc(a))} +var L=function L(){switch(arguments.length){case 1:return L.h(arguments[0]);case 2:return L.j(arguments[0],arguments[1]);default:return L.v(arguments[0],arguments[1],new y(Array.prototype.slice.call(arguments,2),0))}};L.h=function(){return!0};L.j=function(a,b){return null==a?null==b:a===b||dc(a,b)};L.v=function(a,b,c){for(;;)if(L.j(a,b))if(B(c))a=b,b=z(c),c=B(c);else return L.j(b,z(c));else return!1};L.I=function(a){var b=z(a),c=B(a);a=z(c);c=B(c);return L.v(b,a,c)};L.J=2; +function Vc(a){this.s=a}Vc.prototype.next=function(){if(null!=this.s){var a=z(this.s);this.s=B(this.s);return{value:a,done:!1}}return{value:null,done:!0}};function Wc(a){return new Vc(I(a))}function Xc(a,b){var c=Hc(a),c=Ic(0,c);return Jc(c,b)}function Yc(a){var b=0,c=1;for(a=I(a);;)if(null!=a)b+=1,c=Gc(31,c)+Pc(z(a))|0,a=B(a);else return Xc(c,b)}var Zc=Xc(1,0);function $c(a){var b=0,c=0;for(a=I(a);;)if(null!=a)b+=1,c=c+Pc(z(a))|0,a=B(a);else return Xc(c,b)}var ad=Xc(0,0);vb["null"]=!0; +wb["null"]=function(){return 0};Date.prototype.G=function(a,b){return b instanceof Date&&this.valueOf()===b.valueOf()};Date.prototype.uc=!0;Date.prototype.ac=function(a,b){return Ma(this.valueOf(),b.valueOf())};dc.number=function(a,b){return a===b};rb["function"]=!0;Xb["function"]=!0;Yb["function"]=function(){return null};ec._=function(a){return ia(a)};function bd(a){return a+1}function cd(){return!1}function dd(a){return Vb(a)} +function ed(a,b){var c=wb(a);if(0===c)return b.F?b.F():b.call(null);for(var d=E.j(a,0),e=1;;)if(ea?0:a};h.dc=function(){var a=wb(this);return 0d)c=1;else if(0===c)c=0;else a:for(d=0;;){var e=Rd(xd(a,d),xd(b,d));if(0===e&&d+1>1&1431655765;a=(a&858993459)+(a>>2&858993459);return 16843009*(a+(a>>4)&252645135)>>24}function be(a){var b=1;for(a=I(a);;)if(a&&0a?0:a-1>>>5<<5} +function hf(a,b,c){for(;;){if(0===b)return c;var d=ef(a);d.l[0]=c;c=d;b-=5}}var jf=function jf(b,c,d,e){var f=ff(d),g=b.A-1>>>c&31;5===c?f.l[g]=e:(d=d.l[g],b=null!=d?jf(b,c-5,d,e):hf(null,c-5,e),f.l[g]=b);return f};function kf(a,b){throw Error([x("No item "),x(a),x(" in vector of length "),x(b)].join(""));}function lf(a,b){if(b>=gf(a))return a.U;for(var c=a.root,d=a.shift;;)if(0>>d&31],d=e;else return c.l}function mf(a,b){return 0<=b&&b>>c&31;b=nf(b,c-5,d.l[k],e,f);g.l[k]=b}return g},of=function of(b,c,d){var e=b.A-2>>>c&31;if(5=this.A)return new y(this.U,0);var a;a:{a=this.root;for(var b=this.shift;;)if(0this.A-gf(this)){for(var c=this.U.length,d=Array(c+1),e=0;;)if(e>>5>1<c)return new V(null,c,5,W,d,null);for(var e=32,f=(new V(null,32,5,W,d.slice(0,32),null)).bc(null);;)if(eb||this.end<=this.start+b?kf(b,this.end-this.start):E.j(this.Pa,this.start+b)};h.Ca=function(a,b,c){return 0>b||this.end<=this.start+b?c:E.o(this.Pa,this.start+b,c)};h.Nb=function(a,b,c){var d=this.start+b;a=this.meta;c=S.o(this.Pa,d,c);b=this.start;var e=this.end,d=d+1,d=e>d?e:d;return Ef.ia?Ef.ia(a,c,b,d,null):Ef.call(null,a,c,b,d,null)};h.S=function(){return this.meta};h.Da=function(){return new Df(this.meta,this.Pa,this.start,this.end,this.C)}; +h.ga=function(){return this.end-this.start};h.Eb=function(){return E.j(this.Pa,this.end-1)};h.Fb=function(){if(this.start===this.end)throw Error("Can't pop empty vector");var a=this.meta,b=this.Pa,c=this.start,d=this.end-1;return Ef.ia?Ef.ia(a,b,c,d,null):Ef.call(null,a,b,c,d,null)};h.dc=function(){return this.start!==this.end?new md(this,this.end-this.start-1,null):null};h.P=function(){var a=this.C;return null!=a?a:this.C=a=Yc(this)};h.G=function(a,b){return nd(this,b)}; +h.ha=function(){return pd(vd,this.meta)};h.na=function(a,b){return ed(this,b)};h.oa=function(a,b,c){return fd(this,b,c)};h.Db=function(a,b,c){if("number"===typeof b)return Ub(this,b,c);throw Error("Subvec's key for assoc must be a number.");};h.Z=function(){var a=this;return function(b){return function d(e){return e===a.end?null:M(E.j(a.Pa,e),new le(null,function(){return function(){return d(e+1)}}(b),null,null))}}(this)(a.start)}; +h.T=function(a,b){var c=this.Pa,d=this.start,e=this.end,f=this.C;return Ef.ia?Ef.ia(b,c,d,e,f):Ef.call(null,b,c,d,e,f)};h.ea=function(a,b){var c=this.meta,d=Ub(this.Pa,this.end,b),e=this.start,f=this.end+1;return Ef.ia?Ef.ia(c,d,e,f,null):Ef.call(null,c,d,e,f,null)}; +h.call=function(){var a=null,a=function(a,c,d){switch(arguments.length){case 2:return this.N(null,c);case 3:return this.Ca(null,c,d)}throw Error("Invalid arity: "+arguments.length);};a.j=function(a,c){return this.N(null,c)};a.o=function(a,c,d){return this.Ca(null,c,d)};return a}();h.apply=function(a,b){return this.call.apply(this,[this].concat(hb(b)))};h.h=function(a){return this.N(null,a)};h.j=function(a,b){return this.Ca(null,a,b)};Df.prototype[gb]=function(){return Wc(this)}; +function Ef(a,b,c,d,e){for(;;)if(b instanceof Df)c=b.start+c,d=b.start+d,b=b.Pa;else{var f=O(b);if(0>c||0>d||c>f||d>f)throw Error("Index out of bounds");return new Df(a,b,c,d,e)}}function Bf(){switch(arguments.length){case 2:var a=arguments[0];return Af(a,arguments[1],O(a));case 3:return Af(arguments[0],arguments[1],arguments[2]);default:throw Error([x("Invalid arity: "),x(arguments.length)].join(""));}}function Af(a,b,c){return Ef(null,a,b,c,null)} +function Ff(a,b){return a===b.ca?b:new df(a,hb(b.l))}function rf(a){return new df({},hb(a.l))}function sf(a){var b=[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null];Ld(a,0,b,0,a.length);return b}var Gf=function Gf(b,c,d,e){d=Ff(b.root.ca,d);var f=b.A-1>>>c&31;if(5===c)b=e;else{var g=d.l[f];b=null!=g?Gf(b,c-5,g,e):hf(b.root.ca,c-5,e)}d.l[f]=b;return d}; +function qf(a,b,c,d){this.A=a;this.shift=b;this.root=c;this.U=d;this.K=88;this.B=275}h=qf.prototype; +h.Mb=function(a,b){if(this.root.ca){if(32>this.A-gf(this))this.U[this.A&31]=b;else{var c=new df(this.root.ca,this.U),d=[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null];d[0]=b;this.U=d;if(this.A>>>5>1<>>a&31,p=f(a-5,l.l[q]);l.l[q]=p}return l}}(this).call(null,d.shift,d.root),d.root=a),this;if(b===d.A)return tc(this,c);throw Error([x("Index "),x(b),x(" out of bounds for TransientVector of length"),x(d.A)].join(""));}throw Error("assoc! after persistent!");}; +h.ga=function(){if(this.root.ca)return this.A;throw Error("count after persistent!");};h.N=function(a,b){if(this.root.ca)return mf(this,b)[b&31];throw Error("nth after persistent!");};h.Ca=function(a,b,c){return 0<=b&&b=c)return new n(this.meta,this.A-1,d,null);L.j(b,this.l[e])||(d[f]=this.l[e],d[f+1]=this.l[e+1],f+=2);e+=2}}else return this}; +h.Db=function(a,b,c){a=Rf(this.l,b);if(-1===a){if(this.Ab?4:2*(b+1));Ld(this.l,0,c,0,2*b);return new jg(a,this.ja,c)};h.Jc=function(){var a=this.l;return kg?kg(a):lg.call(null,a)};h.Tb=function(a,b){return ig(this.l,a,b)}; +h.Hb=function(a,b,c,d){var e=1<<(b>>>a&31);if(0===(this.ja&e))return d;var f=ae(this.ja&e-1),e=this.l[2*f],f=this.l[2*f+1];return null==e?f.Hb(a+5,b,c,d):eg(c,e)?f:d}; +h.$a=function(a,b,c,d,e,f){var g=1<<(c>>>b&31),k=ae(this.ja&g-1);if(0===(this.ja&g)){var l=ae(this.ja);if(2*l>>b&31]=mg.$a(a,b+5,c,d,e,f);for(e=d=0;;)if(32>d)0!== +(this.ja>>>d&1)&&(k[d]=null!=this.l[e]?mg.$a(a,b+5,Pc(this.l[e]),this.l[e],this.l[e+1],f):this.l[e+1],e+=2),d+=1;else break;return new ng(a,l+1,k)}b=Array(2*(l+4));Ld(this.l,0,b,0,2*k);b[2*k]=d;b[2*k+1]=e;Ld(this.l,2*k,b,2*(k+1),2*(l-k));f.D=!0;a=this.Ob(a);a.l=b;a.ja|=g;return a}l=this.l[2*k];g=this.l[2*k+1];if(null==l)return l=g.$a(a,b+5,c,d,e,f),l===g?this:hg(this,a,2*k+1,l);if(eg(d,l))return e===g?this:hg(this,a,2*k+1,e);f.D=!0;f=b+5;d=og?og(a,f,l,g,c,d,e):pg.call(null,a,f,l,g,c,d,e);e=2*k;k= +2*k+1;a=this.Ob(a);a.l[e]=null;a.l[k]=d;return a}; +h.Za=function(a,b,c,d,e){var f=1<<(b>>>a&31),g=ae(this.ja&f-1);if(0===(this.ja&f)){var k=ae(this.ja);if(16<=k){g=[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null];g[b>>>a&31]=mg.Za(a+5,b,c,d,e);for(d=c=0;;)if(32>c)0!==(this.ja>>>c&1)&&(g[c]=null!=this.l[d]?mg.Za(a+5,Pc(this.l[d]),this.l[d],this.l[d+1],e):this.l[d+1],d+=2),c+=1;else break;return new ng(null,k+1,g)}a=Array(2*(k+1));Ld(this.l, +0,a,0,2*g);a[2*g]=c;a[2*g+1]=d;Ld(this.l,2*g,a,2*(g+1),2*(k-g));e.D=!0;return new jg(null,this.ja|f,a)}var l=this.l[2*g],f=this.l[2*g+1];if(null==l)return k=f.Za(a+5,b,c,d,e),k===f?this:new jg(null,this.ja,fg(this.l,2*g+1,k));if(eg(c,l))return d===f?this:new jg(null,this.ja,fg(this.l,2*g+1,d));e.D=!0;e=this.ja;k=this.l;a+=5;a=qg?qg(a,l,f,b,c,d):pg.call(null,a,l,f,b,c,d);c=2*g;g=2*g+1;d=hb(k);d[c]=null;d[g]=a;return new jg(null,e,d)}; +h.Kc=function(a,b,c){var d=1<<(b>>>a&31);if(0===(this.ja&d))return this;var e=ae(this.ja&d-1),f=this.l[2*e],g=this.l[2*e+1];return null==f?(a=g.Kc(a+5,b,c),a===g?this:null!=a?new jg(null,this.ja,fg(this.l,2*e+1,a)):this.ja===d?null:new jg(null,this.ja^d,gg(this.l,e))):eg(c,f)?new jg(null,this.ja^d,gg(this.l,e)):this};var mg=new jg(null,0,[]);function ng(a,b,c){this.ca=a;this.A=b;this.l=c}h=ng.prototype;h.Ob=function(a){return a===this.ca?this:new ng(a,this.A,hb(this.l))}; +h.Jc=function(){var a=this.l;return rg?rg(a):sg.call(null,a)};h.Tb=function(a,b){for(var c=this.l.length,d=0,e=b;;)if(d>>a&31];return null!=e?e.Hb(a+5,b,c,d):d};h.$a=function(a,b,c,d,e,f){var g=c>>>b&31,k=this.l[g];if(null==k)return a=hg(this,a,g,mg.$a(a,b+5,c,d,e,f)),a.A+=1,a;b=k.$a(a,b+5,c,d,e,f);return b===k?this:hg(this,a,g,b)}; +h.Za=function(a,b,c,d,e){var f=b>>>a&31,g=this.l[f];if(null==g)return new ng(null,this.A+1,fg(this.l,f,mg.Za(a+5,b,c,d,e)));a=g.Za(a+5,b,c,d,e);return a===g?this:new ng(null,this.A,fg(this.l,f,a))}; +h.Kc=function(a,b,c){var d=b>>>a&31,e=this.l[d];if(null!=e){a=e.Kc(a+5,b,c);if(a===e)d=this;else if(null==a)if(8>=this.A)a:{e=this.l;a=e.length;b=Array(2*(this.A-1));c=0;for(var f=1,g=0;;)if(ca?d:eg(c,this.l[a])?this.l[a+1]:d}; +h.$a=function(a,b,c,d,e,f){if(c===this.xb){b=tg(this.l,this.A,d);if(-1===b){if(this.l.length>2*this.A)return b=2*this.A,c=2*this.A+1,a=this.Ob(a),a.l[b]=d,a.l[c]=e,f.D=!0,a.A+=1,a;c=this.l.length;b=Array(c+2);Ld(this.l,0,b,0,c);b[c]=d;b[c+1]=e;f.D=!0;d=this.A+1;a===this.ca?(this.l=b,this.A=d,a=this):a=new ug(this.ca,this.xb,d,b);return a}return this.l[b+1]===e?this:hg(this,a,b+1,e)}return(new jg(a,1<<(this.xb>>>b&31),[null,this,null,null])).$a(a,b,c,d,e,f)}; +h.Za=function(a,b,c,d,e){return b===this.xb?(a=tg(this.l,this.A,c),-1===a?(a=2*this.A,b=Array(a+2),Ld(this.l,0,b,0,a),b[a]=c,b[a+1]=d,e.D=!0,new ug(null,this.xb,this.A+1,b)):L.j(this.l[a],d)?this:new ug(null,this.xb,this.A,fg(this.l,a+1,d))):(new jg(null,1<<(this.xb>>>a&31),[null,this])).Za(a,b,c,d,e)};h.Kc=function(a,b,c){a=tg(this.l,this.A,c);return-1===a?this:1===this.A?null:new ug(null,this.xb,this.A-1,gg(this.l,$d(a)))}; +function pg(){switch(arguments.length){case 6:return qg(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]);case 7:return og(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6]);default:throw Error([x("Invalid arity: "),x(arguments.length)].join(""));}}function qg(a,b,c,d,e,f){var g=Pc(b);if(g===d)return new ug(null,g,2,[b,c,e,f]);var k=new dg;return mg.Za(a,g,b,c,k).Za(a,d,e,f,k)} +function og(a,b,c,d,e,f,g){var k=Pc(c);if(k===e)return new ug(null,k,2,[c,d,f,g]);var l=new dg;return mg.$a(a,b,k,c,d,l).$a(a,b,e,f,g,l)}function vg(a,b,c,d,e){this.meta=a;this.Ib=b;this.i=c;this.s=d;this.C=e;this.B=32374860;this.K=0}h=vg.prototype;h.toString=function(){return Fc(this)};h.equiv=function(a){return this.G(null,a)};h.S=function(){return this.meta};h.P=function(){var a=this.C;return null!=a?a:this.C=a=Yc(this)};h.G=function(a,b){return nd(this,b)};h.ha=function(){return pd(J,this.meta)}; +h.na=function(a,b){return qd(b,this)};h.oa=function(a,b,c){return sd(b,c,this)};h.ma=function(){return null==this.s?new V(null,2,5,W,[this.Ib[this.i],this.Ib[this.i+1]],null):z(this.s)};h.ta=function(){if(null==this.s){var a=this.Ib,b=this.i+2;return wg?wg(a,b,null):lg.call(null,a,b,null)}var a=this.Ib,b=this.i,c=B(this.s);return wg?wg(a,b,c):lg.call(null,a,b,c)};h.Z=function(){return this};h.T=function(a,b){return new vg(b,this.Ib,this.i,this.s,this.C)};h.ea=function(a,b){return M(b,this)}; +vg.prototype[gb]=function(){return Wc(this)};function lg(){switch(arguments.length){case 1:return kg(arguments[0]);case 3:return wg(arguments[0],arguments[1],arguments[2]);default:throw Error([x("Invalid arity: "),x(arguments.length)].join(""));}}function kg(a){return wg(a,0,null)} +function wg(a,b,c){if(null==c)for(c=a.length;;)if(bthis.A?O(B(this))+1:this.A};h.P=function(){var a=this.C;return null!=a?a:this.C=a=Yc(this)};h.G=function(a,b){return nd(this,b)};h.ha=function(){return pd(J,this.meta)};h.na=function(a,b){return qd(b,this)};h.oa=function(a,b,c){return sd(b,c,this)}; +h.ma=function(){var a=this.stack;return null==a?null:Rb(a)};h.ta=function(){var a=z(this.stack),a=Dg(this.Qc?a.right:a.left,B(this.stack),this.Qc);return null!=a?new Eg(null,a,this.Qc,this.A-1,null):J};h.Z=function(){return this};h.T=function(a,b){return new Eg(b,this.stack,this.Qc,this.A,this.C)};h.ea=function(a,b){return M(b,this)};Eg.prototype[gb]=function(){return Wc(this)};function Fg(a,b,c){return new Eg(null,Dg(a,null,b),b,c,null)} +function Gg(a,b,c,d){return c instanceof Y?c.left instanceof Y?new Y(c.key,c.D,c.left.ib(),new Hg(a,b,c.right,d,null),null):c.right instanceof Y?new Y(c.right.key,c.right.D,new Hg(c.key,c.D,c.left,c.right.left,null),new Hg(a,b,c.right.right,d,null),null):new Hg(a,b,c,d,null):new Hg(a,b,c,d,null)} +function Ig(a,b,c,d){return d instanceof Y?d.right instanceof Y?new Y(d.key,d.D,new Hg(a,b,c,d.left,null),d.right.ib(),null):d.left instanceof Y?new Y(d.left.key,d.left.D,new Hg(a,b,c,d.left.left,null),new Hg(d.key,d.D,d.left.right,d.right,null),null):new Hg(a,b,c,d,null):new Hg(a,b,c,d,null)} +function Jg(a,b,c,d){if(c instanceof Y)return new Y(a,b,c.ib(),d,null);if(d instanceof Hg)return Ig(a,b,c,d.Nc());if(d instanceof Y&&d.left instanceof Hg)return new Y(d.left.key,d.left.D,new Hg(a,b,c,d.left.left,null),Ig(d.key,d.D,d.left.right,d.right.Nc()),null);throw Error("red-black tree invariant violation");}var Kg=function Kg(b,c,d){d=null!=b.left?Kg(b.left,c,d):d;var e=b.key,f=b.D;d=c.o?c.o(d,e,f):c.call(null,d,e,f);return null!=b.right?Kg(b.right,c,d):d}; +function Hg(a,b,c,d,e){this.key=a;this.D=b;this.left=c;this.right=d;this.C=e;this.B=32402207;this.K=0}h=Hg.prototype;h.ge=function(a){return a.ie(this)};h.Nc=function(){return new Y(this.key,this.D,this.left,this.right,null)};h.ib=function(){return this};h.fe=function(a){return a.he(this)};h.replace=function(a,b,c,d){return new Hg(a,b,c,d,null)};h.he=function(a){return new Hg(a.key,a.D,this,a.right,null)};h.ie=function(a){return new Hg(a.key,a.D,a.left,this,null)}; +h.Tb=function(a,b){return Kg(this,a,b)};h.M=function(a,b){return E.o(this,b,null)};h.L=function(a,b,c){return E.o(this,b,c)};h.N=function(a,b){return 0===b?this.key:1===b?this.D:null};h.Ca=function(a,b,c){return 0===b?this.key:1===b?this.D:c};h.Nb=function(a,b,c){return(new V(null,2,5,W,[this.key,this.D],null)).Nb(null,b,c)};h.S=function(){return null};h.ga=function(){return 2};h.xc=function(){return this.key};h.yc=function(){return this.D};h.Eb=function(){return this.D}; +h.Fb=function(){return new V(null,1,5,W,[this.key],null)};h.P=function(){var a=this.C;return null!=a?a:this.C=a=Yc(this)};h.G=function(a,b){return nd(this,b)};h.ha=function(){return vd};h.na=function(a,b){return ed(this,b)};h.oa=function(a,b,c){return fd(this,b,c)};h.Db=function(a,b,c){return S.o(new V(null,2,5,W,[this.key,this.D],null),b,c)};h.Z=function(){return zb(zb(J,this.D),this.key)};h.T=function(a,b){return pd(new V(null,2,5,W,[this.key,this.D],null),b)}; +h.ea=function(a,b){return new V(null,3,5,W,[this.key,this.D,b],null)};h.call=function(){var a=null,a=function(a,c,d){switch(arguments.length){case 2:return this.M(null,c);case 3:return this.L(null,c,d)}throw Error("Invalid arity: "+arguments.length);};a.j=function(a,c){return this.M(null,c)};a.o=function(a,c,d){return this.L(null,c,d)};return a}();h.apply=function(a,b){return this.call.apply(this,[this].concat(hb(b)))};h.h=function(a){return this.M(null,a)}; +h.j=function(a,b){return this.L(null,a,b)};Hg.prototype[gb]=function(){return Wc(this)};function Y(a,b,c,d,e){this.key=a;this.D=b;this.left=c;this.right=d;this.C=e;this.B=32402207;this.K=0}h=Y.prototype;h.ge=function(a){return new Y(this.key,this.D,this.left,a,null)};h.Nc=function(){throw Error("red-black tree invariant violation");};h.ib=function(){return new Hg(this.key,this.D,this.left,this.right,null)};h.fe=function(a){return new Y(this.key,this.D,a,this.right,null)}; +h.replace=function(a,b,c,d){return new Y(a,b,c,d,null)};h.he=function(a){return this.left instanceof Y?new Y(this.key,this.D,this.left.ib(),new Hg(a.key,a.D,this.right,a.right,null),null):this.right instanceof Y?new Y(this.right.key,this.right.D,new Hg(this.key,this.D,this.left,this.right.left,null),new Hg(a.key,a.D,this.right.right,a.right,null),null):new Hg(a.key,a.D,this,a.right,null)}; +h.ie=function(a){return this.right instanceof Y?new Y(this.key,this.D,new Hg(a.key,a.D,a.left,this.left,null),this.right.ib(),null):this.left instanceof Y?new Y(this.left.key,this.left.D,new Hg(a.key,a.D,a.left,this.left.left,null),new Hg(this.key,this.D,this.left.right,this.right,null),null):new Hg(a.key,a.D,a.left,this,null)};h.Tb=function(a,b){return Kg(this,a,b)};h.M=function(a,b){return E.o(this,b,null)};h.L=function(a,b,c){return E.o(this,b,c)}; +h.N=function(a,b){return 0===b?this.key:1===b?this.D:null};h.Ca=function(a,b,c){return 0===b?this.key:1===b?this.D:c};h.Nb=function(a,b,c){return(new V(null,2,5,W,[this.key,this.D],null)).Nb(null,b,c)};h.S=function(){return null};h.ga=function(){return 2};h.xc=function(){return this.key};h.yc=function(){return this.D};h.Eb=function(){return this.D};h.Fb=function(){return new V(null,1,5,W,[this.key],null)};h.P=function(){var a=this.C;return null!=a?a:this.C=a=Yc(this)}; +h.G=function(a,b){return nd(this,b)};h.ha=function(){return vd};h.na=function(a,b){return ed(this,b)};h.oa=function(a,b,c){return fd(this,b,c)};h.Db=function(a,b,c){return S.o(new V(null,2,5,W,[this.key,this.D],null),b,c)};h.Z=function(){return zb(zb(J,this.D),this.key)};h.T=function(a,b){return pd(new V(null,2,5,W,[this.key,this.D],null),b)};h.ea=function(a,b){return new V(null,3,5,W,[this.key,this.D,b],null)}; +h.call=function(){var a=null,a=function(a,c,d){switch(arguments.length){case 2:return this.M(null,c);case 3:return this.L(null,c,d)}throw Error("Invalid arity: "+arguments.length);};a.j=function(a,c){return this.M(null,c)};a.o=function(a,c,d){return this.L(null,c,d)};return a}();h.apply=function(a,b){return this.call.apply(this,[this].concat(hb(b)))};h.h=function(a){return this.M(null,a)};h.j=function(a,b){return this.L(null,a,b)};Y.prototype[gb]=function(){return Wc(this)}; +var Mg=function Mg(b,c,d,e,f){if(null==c)return new Y(d,e,null,null,null);var g;g=c.key;g=b.j?b.j(d,g):b.call(null,d,g);if(0===g)return f[0]=c,null;if(0>g)return b=Mg(b,c.left,d,e,f),null!=b?c.fe(b):null;b=Mg(b,c.right,d,e,f);return null!=b?c.ge(b):null},Ng=function Ng(b,c){if(null==b)return c;if(null==c)return b;if(b instanceof Y){if(c instanceof Y){var d=Ng(b.right,c.left);return d instanceof Y?new Y(d.key,d.D,new Y(b.key,b.D,b.left,d.left,null),new Y(c.key,c.D,d.right,c.right,null),null):new Y(b.key, +b.D,b.left,new Y(c.key,c.D,d,c.right,null),null)}return new Y(b.key,b.D,b.left,Ng(b.right,c),null)}if(c instanceof Y)return new Y(c.key,c.D,Ng(b,c.left),c.right,null);d=Ng(b.right,c.left);return d instanceof Y?new Y(d.key,d.D,new Hg(b.key,b.D,b.left,d.left,null),new Hg(c.key,c.D,d.right,c.right,null),null):Jg(b.key,b.D,b.left,new Hg(c.key,c.D,d,c.right,null))},Og=function Og(b,c,d,e){if(null!=c){var f;f=c.key;f=b.j?b.j(d,f):b.call(null,d,f);if(0===f)return e[0]=c,Ng(c.left,c.right);if(0>f)return b= +Og(b,c.left,d,e),null!=b||null!=e[0]?c.left instanceof Hg?Jg(c.key,c.D,b,c.right):new Y(c.key,c.D,b,c.right,null):null;b=Og(b,c.right,d,e);if(null!=b||null!=e[0])if(c.right instanceof Hg)if(e=c.key,d=c.D,c=c.left,b instanceof Y)c=new Y(e,d,c,b.ib(),null);else if(c instanceof Hg)c=Gg(e,d,c.Nc(),b);else if(c instanceof Y&&c.right instanceof Hg)c=new Y(c.right.key,c.right.D,Gg(c.key,c.D,c.left.Nc(),c.right.left),new Hg(e,d,c.right.right,b,null),null);else throw Error("red-black tree invariant violation"); +else c=new Y(c.key,c.D,c.left,b,null);else c=null;return c}return null},Pg=function Pg(b,c,d,e){var f=c.key,g=b.j?b.j(d,f):b.call(null,d,f);return 0===g?c.replace(f,e,c.left,c.right):0>g?c.replace(f,c.D,Pg(b,c.left,d,e),c.right):c.replace(f,c.D,c.left,Pg(b,c.right,d,e))};function Qg(a,b,c,d,e){this.Oa=a;this.hb=b;this.A=c;this.meta=d;this.C=e;this.B=418776847;this.K=8192}h=Qg.prototype; +h.forEach=function(a){for(var b=I(this),c=null,d=0,e=0;;)if(ed?c.left:c.right}else return null}h.has=function(a){return Qd(this,a)};h.M=function(a,b){return Ib.o(this,b,null)};h.L=function(a,b,c){a=Rg(this,b);return null!=a?a.D:c};h.cc=function(a,b,c){return null!=this.hb?Kg(this.hb,b,c):c};h.S=function(){return this.meta}; +h.Da=function(){return new Qg(this.Oa,this.hb,this.A,this.meta,this.C)};h.ga=function(){return this.A};h.dc=function(){return 0this.end};ch.prototype.next=function(){var a=this.i;this.i+=this.step;return a};function dh(a,b,c,d,e){this.meta=a;this.start=b;this.end=c;this.step=d;this.C=e;this.B=32375006;this.K=8192}h=dh.prototype;h.toString=function(){return Fc(this)}; +h.equiv=function(a){return this.G(null,a)};h.N=function(a,b){if(bthis.end&&0===this.step)return this.start;throw Error("Index out of bounds");};h.Ca=function(a,b,c){return bthis.end&&0===this.step?this.start:c};h.wc=function(){return new ch(this.start,this.end,this.step)};h.S=function(){return this.meta};h.Da=function(){return new dh(this.meta,this.start,this.end,this.step,this.C)}; +h.wa=function(){return 0this.end?new dh(this.meta,this.start+this.step,this.end,this.step,null):null};h.ga=function(){return cb(gc(this))?0:Math.ceil((this.end-this.start)/this.step)};h.P=function(){var a=this.C;return null!=a?a:this.C=a=Yc(this)};h.G=function(a,b){return nd(this,b)};h.ha=function(){return pd(J,this.meta)};h.na=function(a,b){return ed(this,b)}; +h.oa=function(a,b,c){for(a=this.start;;)if(0this.end){var d=a;c=b.j?b.j(c,d):b.call(null,c,d);a+=this.step}else return c};h.ma=function(){return null==gc(this)?null:this.start};h.ta=function(){return null!=gc(this)?new dh(this.meta,this.start+this.step,this.end,this.step,null):J};h.Z=function(){return 0this.end?this:null};h.T=function(a,b){return new dh(b,this.start,this.end,this.step,this.C)}; +h.ea=function(a,b){return M(b,this)};dh.prototype[gb]=function(){return Wc(this)};function eh(a){a:for(var b=a;;)if(I(b))b=B(b);else break a;return a}function fh(a,b){if("string"===typeof b){var c=a.exec(b);return L.j(z(c),b)?1===O(c)?z(c):xf(c):null}throw new TypeError("re-matches must match against a string.");} +function gh(a){if(a instanceof RegExp)return a;var b;var c=/^\(\?([idmsux]*)\)/;if("string"===typeof a)c=c.exec(a),b=null==c?null:1===O(c)?z(c):xf(c);else throw new TypeError("re-find must match against a string.");c=P(b,0);b=P(b,1);c=O(c);return new RegExp(a.substring(c),t(b)?b:"")} +function hh(a,b,c,d,e,f,g){var k=Pa;Pa=null==Pa?null:Pa-1;try{if(null!=Pa&&0>Pa)return F(a,"#");F(a,c);if(0===Ya.h(f))I(g)&&F(a,function(){var a=ih.h(f);return t(a)?a:"..."}());else{if(I(g)){var l=z(g);b.o?b.o(l,a,f):b.call(null,l,a,f)}for(var q=B(g),p=Ya.h(f)-1;;)if(!q||null!=p&&0===p){I(q)&&0===p&&(F(a,d),F(a,function(){var a=ih.h(f);return t(a)?a:"..."}()));break}else{F(a,d);var r=z(q);c=a;g=f;b.o?b.o(r,c,g):b.call(null,r,c,g);var u=B(q);c=p-1;q=u;p=c}}return F(a,e)}finally{Pa=k}} +function jh(a,b){for(var c=I(b),d=null,e=0,f=0;;)if(fparseFloat(a))?String(b):a}(),Ck={}; +function Dk(a){var b;if(!(b=Ck[a])){b=0;for(var c=sa(String(Bk)).split("."),d=sa(String(a)).split("."),e=Math.max(c.length,d.length),f=0;0==b&&f=a.keyCode)a.keyCode=-1}catch(b){}};var Pk="closure_listenable_"+(1E6*Math.random()|0),Qk=0;function Rk(a,b,c,d,e){this.listener=a;this.pd=null;this.src=b;this.type=c;this.Sc=!!d;this.Ka=e;this.key=++Qk;this.nc=this.Rc=!1}function Sk(a){a.nc=!0;a.listener=null;a.pd=null;a.src=null;a.Ka=null};function Tk(a){this.src=a;this.Va={};this.ud=0}Tk.prototype.add=function(a,b,c,d,e){var f=a.toString();a=this.Va[f];a||(a=this.Va[f]=[],this.ud++);var g=Uk(a,b,d,e);-1e.keyCode||void 0!=e.returnValue)){a:{var f=!1;if(0==e.keyCode)try{e.keyCode=-1;break a}catch(g){f=!0}if(f||void 0==e.returnValue)e.returnValue=!0}e=[];for(f=c.currentTarget;f;f=f.parentNode)e.push(f);for(var f=a.type,k=e.length-1;!c.Ub&&0<=k;k--){c.currentTarget=e[k];var l=gl(e[k],f,!0,c),d=d&&l}for(k=0;!c.Ub&& +k>>0);function $k(a){if(ha(a))return a;a[il]||(a[il]=function(b){return a.handleEvent(b)});return a[il]};function jl(){Kk.call(this);this.ic=new Tk(this);this.Me=this;this.Be=null}qa(jl,Kk);jl.prototype[Pk]=!0;jl.prototype.addEventListener=function(a,b,c,d){Zk(this,a,b,c,d)};jl.prototype.removeEventListener=function(a,b,c,d){el(this,a,b,c,d)}; +jl.prototype.dispatchEvent=function(a){var b,c=this.Be;if(c)for(b=[];c;c=c.Be)b.push(c);var c=this.Me,d=a.type||a;if(ga(a))a=new Mk(a,c);else if(a instanceof Mk)a.target=a.target||c;else{var e=a;a=new Mk(d,c);za(a,e)}var e=!0,f;if(b)for(var g=b.length-1;!a.Ub&&0<=g;g--)f=a.currentTarget=b[g],e=kl(f,d,!0,a)&&e;a.Ub||(f=a.currentTarget=c,e=kl(f,d,!0,a)&&e,a.Ub||(e=kl(f,d,!1,a)&&e));if(b)for(g=0;!a.Ub&&g2*this.pa&&zl(this),!0):!1}; +function zl(a){if(a.pa!=a.xa.length){for(var b=0,c=0;b=Kl(this).value)for(ha(b)&&(b=b()),a=new Cl(a,String(b),this.ye),c&&(a.te=c),c="log:"+a.nf,ba.console&&(ba.console.timeStamp?ba.console.timeStamp(c):ba.console.markTimeline&&ba.console.markTimeline(c)),ba.msWriteProfilerMark&&ba.msWriteProfilerMark(c),c=this;c;){b=c;var d=a;if(b.ve)for(var e=0,f=void 0;f=b.ve[e];e++)f(d);c=c.getParent()}};h.info=function(a,b){this.log(Hl,a,b)};var Ll={},Ml=null; +function Nl(a){Ml||(Ml=new El(""),Ll[""]=Ml,Ml.Ie(Il));var b;if(!(b=Ll[a])){b=new El(a);var c=a.lastIndexOf("."),d=a.substr(c+1),c=Nl(a.substr(0,c));c.Hd||(c.Hd={});c.Hd[d]=b;b.nd=c;Ll[a]=b}return b};function Ol(a,b){a&&a.log(Jl,b,void 0)};function Pl(){}Pl.prototype.je=null;function Ql(a){var b;(b=a.je)||(b={},Rl(a)&&(b[0]=!0,b[1]=!0),b=a.je=b);return b};var Sl;function Tl(){}qa(Tl,Pl);function Ul(a){return(a=Rl(a))?new ActiveXObject(a):new XMLHttpRequest}function Rl(a){if(!a.we&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var b=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],c=0;cthis.head?(Fm(this.l,this.U,a,0,this.l.length-this.U),Fm(this.l,0,a,this.l.length-this.U,this.head),this.U=0,this.head=this.length,this.l=a):this.U===this.head?(this.head=this.U=0,this.l=a):null};function Im(a,b){for(var c=a.length,d=0;;)if(d>2)}var Vm={},Wm=0; +function Xm(a){var b=0;if(null!=a.forEach)a.forEach(function(a,c){b=(b+(Ym(c)^Ym(a)))%4503599627370496});else for(var c=Pm(a),d=0;da){var b=an[a];if(b)return b}b=new $m(a|0,0>a?-1:0);-128<=a&&128>a&&(an[a]=b);return b}function cn(a){return isNaN(a)||!isFinite(a)?dn:a<=-en?fn:a+1>=en?gn:0>a?hn(cn(-a)):new $m(a%jn|0,a/jn|0)}function kn(a,b){return new $m(a,b)} +function ln(a,b){if(0==a.length)throw Error("number format error: empty string");var c=b||10;if(2>c||36g?(g=cn(Math.pow(c,g)),e=e.multiply(g).add(cn(k))):(e=e.multiply(d),e=e.add(cn(k)))}return e} +var jn=4294967296,en=jn*jn/2,dn=bn(0),mn=bn(1),nn=bn(-1),gn=kn(-1,2147483647),fn=kn(0,-2147483648),on=bn(16777216);function pn(a){return a.aa*jn+(0<=a.la?a.la:jn+a.la)}h=$m.prototype; +h.toString=function(a){a=a||10;if(2>a||36this.aa){if(this.Fa(fn)){var b=cn(a),c=this.div(b),b=rn(c.multiply(b),this);return c.toString(a)+b.la.toString(a)}return"-"+hn(this).toString(a)}for(var c=cn(Math.pow(a,6)),b=this,d="";;){var e=b.div(c),f=rn(b,e.multiply(c)).la.toString(a),b=e;if(qn(b))return f+d;for(;6>f.length;)f="0"+f;d=""+f+d}};function qn(a){return 0==a.aa&&0==a.la}h.Fa=function(a){return this.aa==a.aa&&this.la==a.la}; +h.compare=function(a){if(this.Fa(a))return 0;var b=0>this.aa,c=0>a.aa;return b&&!c?-1:!b&&c?1:0>rn(this,a).aa?-1:1};function hn(a){return a.Fa(fn)?fn:kn(~a.la,~a.aa).add(mn)}h.add=function(a){var b=this.aa>>>16,c=this.aa&65535,d=this.la>>>16,e=a.aa>>>16,f=a.aa&65535,g=a.la>>>16,k;k=0+((this.la&65535)+(a.la&65535));a=0+(k>>>16);a+=d+g;d=0+(a>>>16);d+=c+f;c=0+(d>>>16);c=c+(b+e)&65535;return kn((a&65535)<<16|k&65535,c<<16|d&65535)};function rn(a,b){return a.add(hn(b))} +h.multiply=function(a){if(qn(this)||qn(a))return dn;if(this.Fa(fn))return 1==(a.la&1)?fn:dn;if(a.Fa(fn))return 1==(this.la&1)?fn:dn;if(0>this.aa)return 0>a.aa?hn(this).multiply(hn(a)):hn(hn(this).multiply(a));if(0>a.aa)return hn(this.multiply(hn(a)));if(0>this.compare(on)&&0>a.compare(on))return cn(pn(this)*pn(a));var b=this.aa>>>16,c=this.aa&65535,d=this.la>>>16,e=this.la&65535,f=a.aa>>>16,g=a.aa&65535,k=a.la>>>16;a=a.la&65535;var l,q,p,r;r=0+e*a;p=0+(r>>>16);p+=d*a;q=0+(p>>>16);p=(p&65535)+e*k; +q+=p>>>16;p&=65535;q+=c*a;l=0+(q>>>16);q=(q&65535)+d*k;l+=q>>>16;q&=65535;q+=e*g;l+=q>>>16;q&=65535;l=l+(b*a+c*k+d*g+e*f)&65535;return kn(p<<16|r&65535,l<<16|q)}; +h.div=function(a){if(qn(a))throw Error("division by zero");if(qn(this))return dn;if(this.Fa(fn)){if(a.Fa(mn)||a.Fa(nn))return fn;if(a.Fa(fn))return mn;var b;b=1;if(0==b)b=this;else{var c=this.aa;b=32>b?kn(this.la>>>b|c<<32-b,c>>b):kn(c>>b-32,0<=c?0:-1)}b=b.div(a).shiftLeft(1);if(b.Fa(dn))return 0>a.aa?mn:nn;c=rn(this,a.multiply(b));return b.add(c.div(a))}if(a.Fa(fn))return dn;if(0>this.aa)return 0>a.aa?hn(this).div(hn(a)):hn(hn(this).div(a));if(0>a.aa)return hn(this.div(hn(a)));for(var d=dn,c=this;0<= +c.compare(a);){b=Math.max(1,Math.floor(pn(c)/pn(a)));for(var e=Math.ceil(Math.log(b)/Math.LN2),e=48>=e?1:Math.pow(2,e-48),f=cn(b),g=f.multiply(a);0>g.aa||0a?kn(b<>>32-a):kn(0,b<b?kn(a.la>>>b|c<<32-b,c>>>b):32==b?kn(c,0):kn(c>>>b-32,0)};function tn(a,b){this.tag=a;this.R=b;this.da=-1}tn.prototype.toString=function(){return"[TaggedValue: "+this.tag+", "+this.R+"]"};tn.prototype.equiv=function(a){return Tm(this,a)};tn.prototype.equiv=tn.prototype.equiv;tn.prototype.Sa=function(a){return a instanceof tn?this.tag===a.tag&&Tm(this.R,a.R):!1};tn.prototype.Ya=function(){-1===this.da&&(this.da=Um(Ym(this.tag),Ym(this.R)));return this.da};function un(a,b){return new tn(a,b)}var vn=ln("9007199254740992"),wn=ln("-9007199254740992"); +$m.prototype.equiv=function(a){return Tm(this,a)};$m.prototype.equiv=$m.prototype.equiv;$m.prototype.Sa=function(a){return a instanceof $m&&this.Fa(a)};$m.prototype.Ya=function(){return this.la};function xn(a){this.name=a;this.da=-1}xn.prototype.toString=function(){return":"+this.name};xn.prototype.equiv=function(a){return Tm(this,a)};xn.prototype.equiv=xn.prototype.equiv;xn.prototype.Sa=function(a){return a instanceof xn&&this.name==a.name}; +xn.prototype.Ya=function(){-1===this.da&&(this.da=Ym(this.name));return this.da};function yn(a){this.name=a;this.da=-1}yn.prototype.toString=function(){return"[Symbol: "+this.name+"]"};yn.prototype.equiv=function(a){return Tm(this,a)};yn.prototype.equiv=yn.prototype.equiv;yn.prototype.Sa=function(a){return a instanceof yn&&this.name==a.name};yn.prototype.Ya=function(){-1===this.da&&(this.da=Ym(this.name));return this.da}; +function zn(a,b,c){var d="";c=c||b+1;for(var e=8*(7-b),f=bn(255).shiftLeft(e);ba.size)return!1;a.ee++;return 32=a.length){if(c){var d=a;a=[];for(c=0;c>(-2*d&6)):0)f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\x3d".indexOf(f); +c=k}d=c.length;e=new Uint8Array(d);for(f=0;fa.compare(wn)?a:pn(a));return a},n:function(a){return un("n",a)},d:function(a){return parseFloat(a)},f:function(a){return un("f",a)},c:function(a){return a},":":function(a){return new xn(a)},$:function(a){return new yn(a)},r:function(a){return un("r",a)},z:function(a){a:switch(a){case "-INF":a= +-Infinity;break a;case "INF":a=Infinity;break a;case "NaN":a=NaN;break a;default:throw Error("Invalid special double value "+a);}return a},"'":function(a){return a},m:function(a){a="number"===typeof a?a:parseInt(a,10);return new Date(a)},t:function(a){return new Date(a)},u:function(a){a=a.replace(/-/g,"");for(var b=null,c=null,d=c=0,e=24,f=0,f=c=0,e=24;8>f;f+=2,e-=8)c|=parseInt(a.substring(f,f+2),16)<f;f+=2,e-=8)d|=parseInt(a.substring(f,f+2),16)<f;f+=2,e-=8)c|=parseInt(a.substring(f,f+2),16)<f;f+=2,e-=8)d|=parseInt(a.substring(f,f+2),16)<a.length&&this.Xa.Qb){d=[];for(c=1;cc.length&&this.Xa.Qb){var f=[];for(d=0;d=b.length&&a.$b.Qb){f=[];for(e=0;e>8-c%1*8)){b=a.charCodeAt(c+=.75);if(255a.Cb.length)a=a.append("0");else{a=a.toString();break a}a=Jp(a);return t(a)?a:0}(),q=(L.j(q,"-")?-1:1)*(60*function(){var a=Jp(p);return t(a)?a:0}()+function(){var a=Jp(r);return t(a)?a:0}());return new V(null,8,5,W,[u,Kp(1,A,12,"timestamp month field must be in range 1..12"),Kp(1,a,function(){var a;a=0===(u%4+4)%4;t(a)&&(a=cb(0===(u%100+100)%100),a=t(a)?a:0===(u%400+400)%400);return Hp.j?Hp.j(A,a):Hp.call(null,A,a)}(),"timestamp day field must be in range 1..last day in month"), +Kp(0,b,23,"timestamp hour field must be in range 0..23"),Kp(0,c,59,"timestamp minute field must be in range 0..59"),Kp(0,C,L.j(c,59)?60:59,"timestamp second field must be in range 0..60"),Kp(0,D,999,"timestamp millisecond field must be in range 0..999"),q],null)} +var Mp,Np=new n(null,4,["inst",function(a){var b;if("string"===typeof a)if(b=Lp(a),t(b)){a=P(b,0);var c=P(b,1),d=P(b,2),e=P(b,3),f=P(b,4),g=P(b,5),k=P(b,6);b=P(b,7);b=new Date(Date.UTC(a,c-1,d,e,f,g,k)-6E4*b)}else b=Vo(N([[x("Unrecognized date/time syntax: "),x(a)].join("")],0));else b=Vo(N(["Instance literal expects a string for its timestamp."],0));return b},"uuid",function(a){return"string"===typeof a?new Dh(a,null):Vo(N(["UUID literal expects a string as its representation."],0))},"queue",function(a){return Id(a)? +$e.j(Jf,a):Vo(N(["Queue literal expects a vector for its elements."],0))},"js",function(a){if(Id(a)){var b=[];a=I(a);for(var c=null,d=0,e=0;;)if(ea)){a+=1;continue}break}Bq=!1;return 0d.Kb.length))throw Error([x("Assert failed: "), +x([x("No more than "),x(1024),x(" pending puts are allowed on a single channel."),x(" Consider using a windowed buffer.")].join("")),x("\n"),x(Re.v(N([fe(new H(null,"\x3c","\x3c",993667236,null),fe(new H(null,".-length",".-length",-280799999,null),new H(null,"puts","puts",-1883877054,null)),new H("impl","MAX-QUEUE-SIZE","impl/MAX-QUEUE-SIZE",1508600732,null))],0)))].join(""));Hm(d.Kb,new Jq(c,b));return null}; +Mq.prototype.Rd=function(a,b){var c=this;if(b.Na(null)){if(null!=c.V&&0c.Vb.length))throw Error([x("Assert failed: "),x([x("No more than "),x(1024),x(" pending takes are allowed on a single channel.")].join("")), +x("\n"),x(Re.v(N([fe(new H(null,"\x3c","\x3c",993667236,null),fe(new H(null,".-length",".-length",-280799999,null),new H(null,"takes","takes",298247964,null)),new H("impl","MAX-QUEUE-SIZE","impl/MAX-QUEUE-SIZE",1508600732,null))],0)))].join(""));Hm(c.Vb,b)}return null}; +Mq.prototype.$c=function(){var a=this;if(!a.closed){a.closed=!0;if(t(function(){var b=a.V;return t(b)?0===a.Kb.length:b}())){var b=a.V;a.Ra.h?a.Ra.h(b):a.Ra.call(null,b)}for(;b=a.Vb.pop(),null!=b;)if(b.Na(null)){var c=b.Ea(null),d=t(function(){var b=a.V;return t(b)?0O(a)?a.toUpperCase():[x(a.substring(0,1).toUpperCase()),x(a.substring(1))].join("")} +function Wq(a){if("string"===typeof a)return a;a=ke(a);var b,c=/-/,c=L.j(""+x(c),"/(?:)/")?td.j(xf(M("",Te.j(x,I(a)))),""):xf((""+x(a)).split(c));if(L.j(0,0))a:for(;;)if(L.j("",null==c?null:Rb(c)))c=null==c?null:Sb(c);else break a;b=c;c=P(b,0);b=be(b);return t(Uq.h?Uq.h(c):Uq.call(null,c))?a:jb(x,c,Te.j(Vq,b))}var Xq=!1;if("undefined"===typeof Yq){var Yq,Zq=Xf;Yq=Ne?Ne(Zq):Me.call(null,Zq)} +function $q(a,b,c){try{var d=Xq;Xq=!0;try{return React.render(a.F?a.F():a.call(null),b,function(){return function(){var d=Xq;Xq=!1;try{return Se.H(Yq,S,b,new V(null,2,5,W,[a,b],null)),null!=c?c.F?c.F():c.call(null):null}finally{Xq=d}}}(d))}finally{Xq=d}}catch(e){if(e instanceof Object)try{React.unmountComponentAtNode(b)}catch(f){if(f instanceof Object)"undefined"!==typeof console&&console.warn([x("Warning: "),x("Error unmounting:")].join("")),"undefined"!==typeof console&&console.log(f);else throw f; +}throw e;}}function ar(a,b){return $q(a,b,null)};var br;if("undefined"===typeof cr)var cr=!1;if("undefined"===typeof dr)var dr=Ne?Ne(0):Me.call(null,0);function er(a,b){b.bd=null;var c=br;br=b;try{return a.F?a.F():a.call(null)}finally{br=c}}function fr(a){var b=a.bd;a.bd=null;return b}function gr(a){var b=br;if(null!=b){var c=b.bd;b.bd=td.j(null==c?ah:c,a)}}function hr(a,b,c,d){this.state=a;this.meta=b;this.pc=c;this.sa=d;this.B=2153938944;this.K=114690}h=hr.prototype;h.O=function(a,b,c){F(b,"#\x3cAtom: ");nh(this.state,b,c);return F(b,"\x3e")}; +h.S=function(){return this.meta};h.P=function(){return ia(this)};h.G=function(a,b){return this===b};h.Md=function(a,b){if(null!=this.pc&&!t(this.pc.h?this.pc.h(b):this.pc.call(null,b)))throw Error([x("Assert failed: "),x("Validator rejected reference state"),x("\n"),x(Re.v(N([fe(new H(null,"validator","validator",-325659154,null),new H(null,"new-value","new-value",-1567397401,null))],0)))].join(""));var c=this.state;this.state=b;null!=this.sa&&oc(this,c,b);return b}; +h.Nd=function(a,b){var c;c=this.state;c=b.h?b.h(c):b.call(null,c);return Bc(this,c)};h.Od=function(a,b,c){a=this.state;b=b.j?b.j(a,c):b.call(null,a,c);return Bc(this,b)};h.Pd=function(a,b,c,d){a=this.state;b=b.o?b.o(a,c,d):b.call(null,a,c,d);return Bc(this,b)};h.Qd=function(a,b,c,d,e){return Bc(this,Ae(b,this.state,c,d,e))};h.Yc=function(a,b,c){return Vd(function(a){return function(e,f,g){g.H?g.H(f,a,b,c):g.call(null,f,a,b,c);return null}}(this),null,this.sa)}; +h.Xc=function(a,b,c){return this.sa=S.o(this.sa,b,c)};h.Zc=function(a,b){return this.sa=Ad.j(this.sa,b)};h.vc=function(){gr(this);return this.state};var ir=function ir(){switch(arguments.length){case 1:return ir.h(arguments[0]);default:return ir.v(arguments[0],new y(Array.prototype.slice.call(arguments,1),0))}};ir.h=function(a){return new hr(a,null,null,null)};ir.v=function(a,b){var c=Nd(b)?U(Oe,b):b,d=R(c,Wa),c=R(c,Pe);return new hr(a,d,c,null)};ir.I=function(a){var b=z(a);a=B(a);return ir.v(b,a)}; +ir.J=1; +var jr=function jr(b){if(b?b.Ee:b)return b.Ee();var c;c=jr[m(null==b?null:b)];if(!c&&(c=jr._,!c))throw w("IDisposable.dispose!",b);return c.call(null,b)},kr=function kr(b){if(b?b.Fe:b)return b.Fe();var c;c=kr[m(null==b?null:b)];if(!c&&(c=kr._,!c))throw w("IRunnable.run",b);return c.call(null,b)},lr=function lr(b,c){if(b?b.ce:b)return b.ce(0,c);var d;d=lr[m(null==b?null:b)];if(!d&&(d=lr._,!d))throw w("IComputedImpl.-update-watching",b);return d.call(null,b,c)},mr=function mr(b,c,d,e){if(b?b.Ce:b)return b.Ce(0, +0,d,e);var f;f=mr[m(null==b?null:b)];if(!f&&(f=mr._,!f))throw w("IComputedImpl.-handle-change",b);return f.call(null,b,c,d,e)},nr=function nr(b){if(b?b.De:b)return b.De();var c;c=nr[m(null==b?null:b)];if(!c&&(c=nr._,!c))throw w("IComputedImpl.-peek-at",b);return c.call(null,b)};function or(a,b,c,d,e,f,g,k,l){this.eb=a;this.state=b;this.Gb=c;this.rc=d;this.Wb=e;this.sa=f;this.Gd=g;this.md=k;this.ld=l;this.B=2153807872;this.K=114690}h=or.prototype; +h.Ce=function(a,b,c,d){var e=this;return t(function(){var a=e.rc;return t(a)?cb(e.Gb)&&c!==d:a}())?(e.Gb=!0,function(){var a=e.Gd;return t(a)?a:kr}().call(null,this)):null}; +h.ce=function(a,b){for(var c=I(b),d=null,e=0,f=0;;)if(f=d&&a.push(Br(c));return a}}(e),[b,c],a))}};function is(){switch(arguments.length){case 2:return js(arguments[0],arguments[1]);case 3:return ks(arguments[0],arguments[1],arguments[2]);default:throw Error([x("Invalid arity: "),x(arguments.length)].join(""));}}function js(a,b){return ks(a,b,null)}function ks(a,b,c){return $q(function(){var b=Bd(a)?a.F?a.F():a.call(null):a;return Br(b)},b,c)} +ca("reagent.core.force_update_all",function(){for(var a=I(Vf(dd.h?dd.h(Yq):dd.call(null,Yq))),b=null,c=0,d=0;;)if(dc)return a;a:for(;;){var e=a.forward[c];if(t(e))if(e.keyMath.random()&&15>d)d+=1;else break a;if(d>this.level){for(var e=this.level+1;;)if(e<=d+1)c[e]=this.header,e+=1;else break;this.level=d}for(d=ms(a,b,Array(d));;)return 0<=this.level?(c=c[0].forward,d.forward[0]=c[0],c[0]=d):null}; +os.prototype.remove=function(a){var b=Array(15),c=ns(this.header,a,this.level,b).forward[0];if(null!=c&&c.key===a){for(a=0;;)if(a<=this.level){var d=b[a].forward;d[a]===c&&(d[a]=c.forward[a]);a+=1}else break;for(;;)if(0d)return c===b.header?null:c;var e;a:for(e=c;;){e=e.forward[d];if(null==e){e=null;break a}if(e.key>=a)break a}null!=e?(--d,c=e):--d}}os.prototype.Z=function(){return function(a){return function c(d){return new le(null,function(){return function(){return null==d?null:M(new V(null,2,5,W,[d.key,d.D],null),c(d.forward[0]))}}(a),null,null)}}(this)(this.header.forward[0])}; +os.prototype.O=function(a,b,c){return hh(b,function(){return function(a){return hh(b,nh,""," ","",c,a)}}(this),"{",", ","}",c,this)};var qs=new os(ms(null,null,0),0);function rs(a){var b=(new Date).valueOf()+a,c=ps(b),d=t(t(c)?c.keyd:f:d)?d+8:d,e=t(t(e)?t(g)?8>e:g:e)?e+8:e,g=t(t(c)?b:c)?cb(l):l,l=t(g)?t(e)?e:"bg":d,d=t(g)?t(d)?d:"fg":e,l=t(l)?[x("fg-"),x(l)].join(""):null,d=t(d)?[x("bg-"),x(d)].join(""):null;return Po(" ",Ze(new V(null,5,5,W,[l,d,t(f)?"bright":null,t(k)?"underline":null,t(c)?"cursor":null],null)))}),Bs=Ch(function(a,b){var c=P(a,0),d=P(a,1);return new V(null,3,5,W,[ok,new n(null, +1,[Mj,As.j?As.j(d,b):As.call(null,d,b)],null),c],null)});function Cs(a,b){return new V(null,2,5,W,[rj,Ke(function(a,d){return pd(new V(null,3,5,W,[Bs,d,b],null),new n(null,1,[Yh,a],null))},a)],null)}function Ds(a,b){var c=P(a,0),d=P(a,1),e=Ue(b,c),e=I(e)?new V(null,2,5,W,[U(x,e),d],null):null,f=S.o(d,Ei,!0),f=cf.o(f,new V(null,1,5,W,[oi],null),cb),f=new V(null,2,5,W,[xd(c,b),f],null),c=Ve(b+1,c),d=I(c)?new V(null,2,5,W,[U(x,c),d],null):null;return Ze(new V(null,3,5,W,[e,f,d],null))} +function Es(a){return[x("font-"),x(a)].join("")}var Fs=new n(null,3,["small",16,"medium",24,"big",32],null);function Gs(a,b,c){return new n(null,2,[xi,[x(a),x("ch")].join(""),nk,[x(b*(Fs.h?Fs.h(c):Fs.call(null,c))),x("px")].join("")],null)} +function Hs(a,b,c,d,e){var f=Nd(e)?U(Oe,e):e,g=R(f,Rj),k=R(f,Fh),l=R(f,ck),q=R(f,Lj);return new V(null,3,5,W,[nj,new n(null,2,[Mj,Es(c),dj,Gs(a,b,c)],null),Te.j(function(a,b,c,d,e,f){return function(a){var b=P(a,0),g=P(a,1),k=t(t(e)?L.j(b,d):e)?c:null;if(t(k))a:for(a=vd;;){var l=z(g),p=P(l,0);P(l,1);p=O(p);if(p<=k)a=td.j(a,l),g=Uc(g),k-=p;else{a=ve.v(a,Ds(l,k),N([Uc(g)],0));break a}}else a=g;return pd(new V(null,3,5,W,[Cs,a,f],null),new n(null,1,[Yh,b],null))}}(e,f,g,k,l,q),d)],null)} +function Is(){return new V(null,2,5,W,[Cj,new n(null,5,[bk,"1.1",Li,"http://www.w3.org/2000/svg",Mi,"0 0 866.0254037844387 866.0254037844387",Mj,"icon",mk,new n(null,1,[Sj,'\x3cdefs\x3e \x3cmask id\x3d"small-triangle-mask"\x3e \x3crect width\x3d"100%" height\x3d"100%" fill\x3d"white"/\x3e \x3cpolygon points\x3d"508.01270189221935 433.01270189221935, 208.0127018922194 259.8076211353316, 208.01270189221927 606.217782649107" fill\x3d"black"\x3e\x3c/polygon\x3e \x3c/mask\x3e \x3c/defs\x3e \x3cpolygon points\x3d"808.0127018922194 433.01270189221935, 58.01270189221947 -1.1368683772161603e-13, 58.01270189221913 866.0254037844386" mask\x3d"url(#small-triangle-mask)" fill\x3d"white"\x3e\x3c/polygon\x3e \x3cpolyline points\x3d"481.2177826491071 333.0127018922194, 134.80762113533166 533.0127018922194" stroke\x3d"white" stroke-width\x3d"90"\x3e\x3c/polyline\x3e'], +null)],null)],null)}function Js(){return new V(null,3,5,W,[Cj,new n(null,4,[bk,"1.1",Li,"http://www.w3.org/2000/svg",Mi,"0 0 12 12",Mj,"icon"],null),new V(null,2,5,W,[Ih,new n(null,1,[Ij,"M1,0 L11,6 L1,12 Z"],null)],null)],null)} +function Ks(){return new V(null,4,5,W,[Cj,new n(null,4,[bk,"1.1",Li,"http://www.w3.org/2000/svg",Mi,"0 0 12 12",Mj,"icon"],null),new V(null,2,5,W,[Ih,new n(null,1,[Ij,"M1,0 L4,0 L4,12 L1,12 Z"],null)],null),new V(null,2,5,W,[Ih,new n(null,1,[Ij,"M8,0 L11,0 L11,12 L8,12 Z"],null)],null)],null)} +function Ls(){return new V(null,4,5,W,[Cj,new n(null,4,[bk,"1.1",Li,"http://www.w3.org/2000/svg",Mi,"0 0 12 12",Mj,"icon"],null),new V(null,2,5,W,[Ih,new n(null,1,[Ij,"M12,0 L7,0 L9,2 L7,4 L8,5 L10,3 L12,5 Z"],null)],null),new V(null,2,5,W,[Ih,new n(null,1,[Ij,"M0,12 L0,7 L2,9 L4,7 L5,8 L3,10 L5,12 Z"],null)],null)],null)} +function Ms(){return new V(null,4,5,W,[Cj,new n(null,4,[bk,"1.1",Li,"http://www.w3.org/2000/svg",Mi,"0 0 12 12",Mj,"icon"],null),new V(null,2,5,W,[Ih,new n(null,1,[Ij,"M7,5 L7,0 L9,2 L11,0 L12,1 L10,3 L12,5 Z"],null)],null),new V(null,2,5,W,[Ih,new n(null,1,[Ij,"M5,7 L0,7 L2,9 L0,11 L1,12 L3,10 L5,12 Z"],null)],null)],null)} +function Ns(a,b){return new V(null,3,5,W,[wi,new n(null,1,[Wi,function(a){a.preventDefault();a=new V(null,1,5,W,[Qj],null);return b.h?b.h(a):b.call(null,a)}],null),new V(null,1,5,W,[t(a)?Ks:Js],null)],null)}function Os(a){return 10>a?[x("0"),x(a)].join(""):a}function Ps(a){var b=Math.floor((a%60+60)%60);return[x(Os(Math.floor(a/60))),x(":"),x(Os(b))].join("")} +function Qs(a,b){var c=W,d=new V(null,2,5,W,[ti,Ps(a)],null),e=W,f;f=[x("-"),x(Ps(b-a))].join("");return new V(null,3,5,c,[Ri,d,new V(null,2,5,e,[hk,f],null)],null)}function Rs(){return new V(null,4,5,W,[Kj,new n(null,1,[Wi,function(a){a.preventDefault();return Rq(a.currentTarget.parentNode.parentNode.parentNode)}],null),new V(null,1,5,W,[Ls],null),new V(null,1,5,W,[Ms],null)],null)} +function Ss(a,b){return new V(null,2,5,W,[Ph,new V(null,3,5,W,[Ji,new n(null,1,[Ui,function(a){a.preventDefault();var d=a.currentTarget.offsetWidth,e=a.currentTarget.getBoundingClientRect();a=Math.min(d,Math.max(a.clientX-e.left,0))/d;a=new V(null,2,5,W,[ak,a],null);return b.h?b.h(a):b.call(null,a)}],null),new V(null,2,5,W,[Gh,new V(null,2,5,W,[ok,new n(null,1,[dj,new n(null,1,[xi,[x(100*a),x("%")].join("")],null)],null)],null)],null)],null)],null)} +function Ts(a,b,c,d){return new V(null,5,5,W,[mi,new V(null,3,5,W,[Ns,a,d],null),new V(null,3,5,W,[Qs,b,c],null),new V(null,1,5,W,[Rs],null),new V(null,3,5,W,[Ss,b/c,d],null)],null)}function Us(a){return new V(null,3,5,W,[Di,new n(null,1,[Wi,function(b){b.preventDefault();b=new V(null,1,5,W,[Qj],null);return a.h?a.h(b):a.call(null,b)}],null),new V(null,2,5,W,[si,new V(null,2,5,W,[gj,new V(null,2,5,W,[ok,new V(null,1,5,W,[Is],null)],null)],null)],null)],null)} +function Vs(){return new V(null,2,5,W,[hi,new V(null,1,5,W,[Oj],null)],null)}function Ws(a,b,c){b=b.h?b.h(c):b.call(null,c);if(t(b)){var d=P(b,0);be(b);c.preventDefault();return L.j(d,Yi)?Rq(c.currentTarget):a.h?a.h(b):a.call(null,b)}return null} +function Xs(a){switch(a.key){case " ":return new V(null,1,5,W,[Qj],null);case "f":return new V(null,1,5,W,[Yi],null);case "0":return new V(null,2,5,W,[ak,0],null);case "1":return new V(null,2,5,W,[ak,.1],null);case "2":return new V(null,2,5,W,[ak,.2],null);case "3":return new V(null,2,5,W,[ak,.3],null);case "4":return new V(null,2,5,W,[ak,.4],null);case "5":return new V(null,2,5,W,[ak,.5],null);case "6":return new V(null,2,5,W,[ak,.6],null);case "7":return new V(null,2,5,W,[ak,.7],null);case "8":return new V(null, +2,5,W,[ak,.8],null);case "9":return new V(null,2,5,W,[ak,.9],null);case "\x3e":return new V(null,1,5,W,[lk],null);case "\x3c":return new V(null,1,5,W,[li],null);default:return null}}function Ys(a){switch(a.which){case 37:return new V(null,1,5,W,[Pi],null);case 39:return new V(null,1,5,W,[Rh],null);default:return null}} +function Zs(a,b){var c=dd.h?dd.h(a):dd.call(null,a),d=Nd(c)?U(Oe,c):c,c=R(d,nk),e=R(d,Oh),f=R(d,ai),g=R(d,ri),k=R(d,xi),l=R(d,zi),q=R(d,Ii),p=R(d,Ei),r=R(d,ej),u=R(d,jj),d=R(d,oj),A=Ie.o(Ws,b,Xs),C=Ie.o(Ws,b,Ys),r=[x("asciinema-theme-"),x(r)].join("");return new V(null,3,5,W,[Vj,new n(null,3,[Jh,-1,Qh,A,dk,C],null),new V(null,6,5,W,[xj,new n(null,2,[Mj,r,dj,Xf],null),new V(null,6,5,W,[Hs,k,c,f,l,p],null),new V(null,5,5,W,[Ts,Od(u),e,q,b],null),t(t(d)?d:g)?null:new V(null,2,5,W,[Us,b],null),t(d)?new V(null, +1,5,W,[Vs],null):null],null)],null)};function $s(a){return((new Date).getTime()-a.getTime())/1E3}function at(a,b){var c=Nd(b)?U(Oe,b):b,d=R(c,zi),c=R(c,Ei);return Yg.v(Xg,N([a,new n(null,2,[zi,d,Ei,c],null)],0))}function bt(a){return ct(a,function(a,c){return c},null)} +function ct(a,b,c){var d=ss(null),e=new Date;b=Je(b,c);c=ss(1);Fq(function(b,c,d,e){return function(){var q=function(){return function(a){return function(){function b(c){for(;;){var d;a:try{for(;;){var e=a(c);if(!ie(e,Z)){d=e;break a}}}catch(f){if(f instanceof Object)c[5]=f,Em(c),d=Z;else throw f;}if(!ie(d,Z))return d}}function c(){var a=[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null];a[0]=d;a[1]=1;return a}var d=null,d=function(a){switch(arguments.length){case 0:return c.call(this); +case 1:return b.call(this,a)}throw Error("Invalid arity: "+arguments.length);};d.F=c;d.h=b;return d}()}(function(b,c,d,e){return function(b){var f=b[1];if(7===f){var g=b[7];b[1]=t(null==g)?10:11;return Z}if(1===f){var k=a,l=$s(d);b[8]=k;b[9]=0;b[7]=null;b[10]=l;b[2]=null;b[1]=2;return Z}if(4===f){var k=b[9],p=b[11],f=b[12],l=b[10],f=b[13],f=P(p,0),p=P(p,1),f=k+f,l=f-l;b[12]=f;b[13]=l;b[14]=p;b[1]=t(0 createMarkupForStyles({width: '200px', height: 0}) - * "width:200px;height:0;" - * - * Undefined values are ignored so that declarative programming is easier. - * - * @param {object} styles - * @return {?string} - */ - createMarkupForStyles: function(styles) { - var serialized = ''; - for (var styleName in styles) { - if (!styles.hasOwnProperty(styleName)) { - continue; - } - var styleValue = styles[styleName]; - if (styleValue != null) { - serialized += processStyleName(styleName) + ':'; - serialized += dangerousStyleValue(styleName, styleValue) + ';'; - } - } - return serialized || null; - }, - - /** - * Sets the value for multiple styles on a node. If a value is specified as - * '' (empty string), the corresponding style property will be unset. - * - * @param {DOMElement} node - * @param {object} styles - */ - setValueForStyles: function(node, styles) { - var style = node.style; - for (var styleName in styles) { - if (!styles.hasOwnProperty(styleName)) { - continue; - } - var styleValue = dangerousStyleValue(styleName, styles[styleName]); - if (styleValue) { - style[styleName] = styleValue; - } else { - var expansion = CSSProperty.shorthandPropertyExpansions[styleName]; - if (expansion) { - // Shorthand property that IE8 won't like unsetting, so unset each - // component to placate it - for (var individualStyleName in expansion) { - style[individualStyleName] = ''; - } - } else { - style[styleName] = ''; - } - } - } - } - -}; - -module.exports = CSSPropertyOperations; - -},{"./CSSProperty":2,"./dangerousStyleValue":95,"./escapeTextForBrowser":98,"./hyphenate":110,"./memoizeStringOnly":120}],4:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @providesModule ChangeEventPlugin - */ - -"use strict"; - -var EventConstants = _dereq_("./EventConstants"); -var EventPluginHub = _dereq_("./EventPluginHub"); -var EventPropagators = _dereq_("./EventPropagators"); -var ExecutionEnvironment = _dereq_("./ExecutionEnvironment"); -var ReactUpdates = _dereq_("./ReactUpdates"); -var SyntheticEvent = _dereq_("./SyntheticEvent"); - -var isEventSupported = _dereq_("./isEventSupported"); -var isTextInputElement = _dereq_("./isTextInputElement"); -var keyOf = _dereq_("./keyOf"); - -var topLevelTypes = EventConstants.topLevelTypes; - -var eventTypes = { - change: { - phasedRegistrationNames: { - bubbled: keyOf({onChange: null}), - captured: keyOf({onChangeCapture: null}) - }, - dependencies: [ - topLevelTypes.topBlur, - topLevelTypes.topChange, - topLevelTypes.topClick, - topLevelTypes.topFocus, - topLevelTypes.topInput, - topLevelTypes.topKeyDown, - topLevelTypes.topKeyUp, - topLevelTypes.topSelectionChange - ] - } -}; - -/** - * For IE shims - */ -var activeElement = null; -var activeElementID = null; -var activeElementValue = null; -var activeElementValueProp = null; - -/** - * SECTION: handle `change` event - */ -function shouldUseChangeEvent(elem) { - return ( - elem.nodeName === 'SELECT' || - (elem.nodeName === 'INPUT' && elem.type === 'file') - ); -} - -var doesChangeEventBubble = false; -if (ExecutionEnvironment.canUseDOM) { - // See `handleChange` comment below - doesChangeEventBubble = isEventSupported('change') && ( - !('documentMode' in document) || document.documentMode > 8 - ); -} - -function manualDispatchChangeEvent(nativeEvent) { - var event = SyntheticEvent.getPooled( - eventTypes.change, - activeElementID, - nativeEvent - ); - EventPropagators.accumulateTwoPhaseDispatches(event); - - // If change and propertychange bubbled, we'd just bind to it like all the - // other events and have it go through ReactEventTopLevelCallback. Since it - // doesn't, we manually listen for the events and so we have to enqueue and - // process the abstract event manually. - // - // Batching is necessary here in order to ensure that all event handlers run - // before the next rerender (including event handlers attached to ancestor - // elements instead of directly on the input). Without this, controlled - // components don't work properly in conjunction with event bubbling because - // the component is rerendered and the value reverted before all the event - // handlers can run. See https://github.com/facebook/react/issues/708. - ReactUpdates.batchedUpdates(runEventInBatch, event); -} - -function runEventInBatch(event) { - EventPluginHub.enqueueEvents(event); - EventPluginHub.processEventQueue(); -} - -function startWatchingForChangeEventIE8(target, targetID) { - activeElement = target; - activeElementID = targetID; - activeElement.attachEvent('onchange', manualDispatchChangeEvent); -} - -function stopWatchingForChangeEventIE8() { - if (!activeElement) { - return; - } - activeElement.detachEvent('onchange', manualDispatchChangeEvent); - activeElement = null; - activeElementID = null; -} - -function getTargetIDForChangeEvent( - topLevelType, - topLevelTarget, - topLevelTargetID) { - if (topLevelType === topLevelTypes.topChange) { - return topLevelTargetID; - } -} -function handleEventsForChangeEventIE8( - topLevelType, - topLevelTarget, - topLevelTargetID) { - if (topLevelType === topLevelTypes.topFocus) { - // stopWatching() should be a noop here but we call it just in case we - // missed a blur event somehow. - stopWatchingForChangeEventIE8(); - startWatchingForChangeEventIE8(topLevelTarget, topLevelTargetID); - } else if (topLevelType === topLevelTypes.topBlur) { - stopWatchingForChangeEventIE8(); - } -} - - -/** - * SECTION: handle `input` event - */ -var isInputEventSupported = false; -if (ExecutionEnvironment.canUseDOM) { - // IE9 claims to support the input event but fails to trigger it when - // deleting text, so we ignore its input events - isInputEventSupported = isEventSupported('input') && ( - !('documentMode' in document) || document.documentMode > 9 - ); -} - -/** - * (For old IE.) Replacement getter/setter for the `value` property that gets - * set on the active element. - */ -var newValueProp = { - get: function() { - return activeElementValueProp.get.call(this); - }, - set: function(val) { - // Cast to a string so we can do equality checks. - activeElementValue = '' + val; - activeElementValueProp.set.call(this, val); - } -}; - -/** - * (For old IE.) Starts tracking propertychange events on the passed-in element - * and override the value property so that we can distinguish user events from - * value changes in JS. - */ -function startWatchingForValueChange(target, targetID) { - activeElement = target; - activeElementID = targetID; - activeElementValue = target.value; - activeElementValueProp = Object.getOwnPropertyDescriptor( - target.constructor.prototype, - 'value' - ); - - Object.defineProperty(activeElement, 'value', newValueProp); - activeElement.attachEvent('onpropertychange', handlePropertyChange); -} - -/** - * (For old IE.) Removes the event listeners from the currently-tracked element, - * if any exists. - */ -function stopWatchingForValueChange() { - if (!activeElement) { - return; - } - - // delete restores the original property definition - delete activeElement.value; - activeElement.detachEvent('onpropertychange', handlePropertyChange); - - activeElement = null; - activeElementID = null; - activeElementValue = null; - activeElementValueProp = null; -} - -/** - * (For old IE.) Handles a propertychange event, sending a `change` event if - * the value of the active element has changed. - */ -function handlePropertyChange(nativeEvent) { - if (nativeEvent.propertyName !== 'value') { - return; - } - var value = nativeEvent.srcElement.value; - if (value === activeElementValue) { - return; - } - activeElementValue = value; - - manualDispatchChangeEvent(nativeEvent); -} - -/** - * If a `change` event should be fired, returns the target's ID. - */ -function getTargetIDForInputEvent( - topLevelType, - topLevelTarget, - topLevelTargetID) { - if (topLevelType === topLevelTypes.topInput) { - // In modern browsers (i.e., not IE8 or IE9), the input event is exactly - // what we want so fall through here and trigger an abstract event - return topLevelTargetID; - } -} - -// For IE8 and IE9. -function handleEventsForInputEventIE( - topLevelType, - topLevelTarget, - topLevelTargetID) { - if (topLevelType === topLevelTypes.topFocus) { - // In IE8, we can capture almost all .value changes by adding a - // propertychange handler and looking for events with propertyName - // equal to 'value' - // In IE9, propertychange fires for most input events but is buggy and - // doesn't fire when text is deleted, but conveniently, selectionchange - // appears to fire in all of the remaining cases so we catch those and - // forward the event if the value has changed - // In either case, we don't want to call the event handler if the value - // is changed from JS so we redefine a setter for `.value` that updates - // our activeElementValue variable, allowing us to ignore those changes - // - // stopWatching() should be a noop here but we call it just in case we - // missed a blur event somehow. - stopWatchingForValueChange(); - startWatchingForValueChange(topLevelTarget, topLevelTargetID); - } else if (topLevelType === topLevelTypes.topBlur) { - stopWatchingForValueChange(); - } -} - -// For IE8 and IE9. -function getTargetIDForInputEventIE( - topLevelType, - topLevelTarget, - topLevelTargetID) { - if (topLevelType === topLevelTypes.topSelectionChange || - topLevelType === topLevelTypes.topKeyUp || - topLevelType === topLevelTypes.topKeyDown) { - // On the selectionchange event, the target is just document which isn't - // helpful for us so just check activeElement instead. - // - // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire - // propertychange on the first input event after setting `value` from a - // script and fires only keydown, keypress, keyup. Catching keyup usually - // gets it and catching keydown lets us fire an event for the first - // keystroke if user does a key repeat (it'll be a little delayed: right - // before the second keystroke). Other input methods (e.g., paste) seem to - // fire selectionchange normally. - if (activeElement && activeElement.value !== activeElementValue) { - activeElementValue = activeElement.value; - return activeElementID; - } - } -} - - -/** - * SECTION: handle `click` event - */ -function shouldUseClickEvent(elem) { - // Use the `click` event to detect changes to checkbox and radio inputs. - // This approach works across all browsers, whereas `change` does not fire - // until `blur` in IE8. - return ( - elem.nodeName === 'INPUT' && - (elem.type === 'checkbox' || elem.type === 'radio') - ); -} - -function getTargetIDForClickEvent( - topLevelType, - topLevelTarget, - topLevelTargetID) { - if (topLevelType === topLevelTypes.topClick) { - return topLevelTargetID; - } -} - -/** - * This plugin creates an `onChange` event that normalizes change events - * across form elements. This event fires at a time when it's possible to - * change the element's value without seeing a flicker. - * - * Supported elements are: - * - input (see `isTextInputElement`) - * - textarea - * - select - */ -var ChangeEventPlugin = { - - eventTypes: eventTypes, - - /** - * @param {string} topLevelType Record from `EventConstants`. - * @param {DOMEventTarget} topLevelTarget The listening component root node. - * @param {string} topLevelTargetID ID of `topLevelTarget`. - * @param {object} nativeEvent Native browser event. - * @return {*} An accumulation of synthetic events. - * @see {EventPluginHub.extractEvents} - */ - extractEvents: function( - topLevelType, - topLevelTarget, - topLevelTargetID, - nativeEvent) { - - var getTargetIDFunc, handleEventFunc; - if (shouldUseChangeEvent(topLevelTarget)) { - if (doesChangeEventBubble) { - getTargetIDFunc = getTargetIDForChangeEvent; - } else { - handleEventFunc = handleEventsForChangeEventIE8; - } - } else if (isTextInputElement(topLevelTarget)) { - if (isInputEventSupported) { - getTargetIDFunc = getTargetIDForInputEvent; - } else { - getTargetIDFunc = getTargetIDForInputEventIE; - handleEventFunc = handleEventsForInputEventIE; - } - } else if (shouldUseClickEvent(topLevelTarget)) { - getTargetIDFunc = getTargetIDForClickEvent; - } - - if (getTargetIDFunc) { - var targetID = getTargetIDFunc( - topLevelType, - topLevelTarget, - topLevelTargetID - ); - if (targetID) { - var event = SyntheticEvent.getPooled( - eventTypes.change, - targetID, - nativeEvent - ); - EventPropagators.accumulateTwoPhaseDispatches(event); - return event; - } - } - - if (handleEventFunc) { - handleEventFunc( - topLevelType, - topLevelTarget, - topLevelTargetID - ); - } - } - -}; - -module.exports = ChangeEventPlugin; - -},{"./EventConstants":14,"./EventPluginHub":16,"./EventPropagators":19,"./ExecutionEnvironment":20,"./ReactUpdates":71,"./SyntheticEvent":78,"./isEventSupported":113,"./isTextInputElement":115,"./keyOf":119}],5:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @providesModule ClientReactRootIndex - * @typechecks - */ - -"use strict"; - -var nextReactRootIndex = 0; - -var ClientReactRootIndex = { - createReactRootIndex: function() { - return nextReactRootIndex++; - } -}; - -module.exports = ClientReactRootIndex; - -},{}],6:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @providesModule CompositionEventPlugin - * @typechecks static-only - */ - -"use strict"; - -var EventConstants = _dereq_("./EventConstants"); -var EventPropagators = _dereq_("./EventPropagators"); -var ExecutionEnvironment = _dereq_("./ExecutionEnvironment"); -var ReactInputSelection = _dereq_("./ReactInputSelection"); -var SyntheticCompositionEvent = _dereq_("./SyntheticCompositionEvent"); - -var getTextContentAccessor = _dereq_("./getTextContentAccessor"); -var keyOf = _dereq_("./keyOf"); - -var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space -var START_KEYCODE = 229; - -var useCompositionEvent = ( - ExecutionEnvironment.canUseDOM && - 'CompositionEvent' in window -); - -// In IE9+, we have access to composition events, but the data supplied -// by the native compositionend event may be incorrect. In Korean, for example, -// the compositionend event contains only one character regardless of -// how many characters have been composed since compositionstart. -// We therefore use the fallback data while still using the native -// events as triggers. -var useFallbackData = ( - !useCompositionEvent || - 'documentMode' in document && document.documentMode > 8 -); - -var topLevelTypes = EventConstants.topLevelTypes; -var currentComposition = null; - -// Events and their corresponding property names. -var eventTypes = { - compositionEnd: { - phasedRegistrationNames: { - bubbled: keyOf({onCompositionEnd: null}), - captured: keyOf({onCompositionEndCapture: null}) - }, - dependencies: [ - topLevelTypes.topBlur, - topLevelTypes.topCompositionEnd, - topLevelTypes.topKeyDown, - topLevelTypes.topKeyPress, - topLevelTypes.topKeyUp, - topLevelTypes.topMouseDown - ] - }, - compositionStart: { - phasedRegistrationNames: { - bubbled: keyOf({onCompositionStart: null}), - captured: keyOf({onCompositionStartCapture: null}) - }, - dependencies: [ - topLevelTypes.topBlur, - topLevelTypes.topCompositionStart, - topLevelTypes.topKeyDown, - topLevelTypes.topKeyPress, - topLevelTypes.topKeyUp, - topLevelTypes.topMouseDown - ] - }, - compositionUpdate: { - phasedRegistrationNames: { - bubbled: keyOf({onCompositionUpdate: null}), - captured: keyOf({onCompositionUpdateCapture: null}) - }, - dependencies: [ - topLevelTypes.topBlur, - topLevelTypes.topCompositionUpdate, - topLevelTypes.topKeyDown, - topLevelTypes.topKeyPress, - topLevelTypes.topKeyUp, - topLevelTypes.topMouseDown - ] - } -}; - -/** - * Translate native top level events into event types. - * - * @param {string} topLevelType - * @return {object} - */ -function getCompositionEventType(topLevelType) { - switch (topLevelType) { - case topLevelTypes.topCompositionStart: - return eventTypes.compositionStart; - case topLevelTypes.topCompositionEnd: - return eventTypes.compositionEnd; - case topLevelTypes.topCompositionUpdate: - return eventTypes.compositionUpdate; - } -} - -/** - * Does our fallback best-guess model think this event signifies that - * composition has begun? - * - * @param {string} topLevelType - * @param {object} nativeEvent - * @return {boolean} - */ -function isFallbackStart(topLevelType, nativeEvent) { - return ( - topLevelType === topLevelTypes.topKeyDown && - nativeEvent.keyCode === START_KEYCODE - ); -} - -/** - * Does our fallback mode think that this event is the end of composition? - * - * @param {string} topLevelType - * @param {object} nativeEvent - * @return {boolean} - */ -function isFallbackEnd(topLevelType, nativeEvent) { - switch (topLevelType) { - case topLevelTypes.topKeyUp: - // Command keys insert or clear IME input. - return (END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1); - case topLevelTypes.topKeyDown: - // Expect IME keyCode on each keydown. If we get any other - // code we must have exited earlier. - return (nativeEvent.keyCode !== START_KEYCODE); - case topLevelTypes.topKeyPress: - case topLevelTypes.topMouseDown: - case topLevelTypes.topBlur: - // Events are not possible without cancelling IME. - return true; - default: - return false; - } -} - -/** - * Helper class stores information about selection and document state - * so we can figure out what changed at a later date. - * - * @param {DOMEventTarget} root - */ -function FallbackCompositionState(root) { - this.root = root; - this.startSelection = ReactInputSelection.getSelection(root); - this.startValue = this.getText(); -} - -/** - * Get current text of input. - * - * @return {string} - */ -FallbackCompositionState.prototype.getText = function() { - return this.root.value || this.root[getTextContentAccessor()]; -}; - -/** - * Text that has changed since the start of composition. - * - * @return {string} - */ -FallbackCompositionState.prototype.getData = function() { - var endValue = this.getText(); - var prefixLength = this.startSelection.start; - var suffixLength = this.startValue.length - this.startSelection.end; - - return endValue.substr( - prefixLength, - endValue.length - suffixLength - prefixLength - ); -}; - -/** - * This plugin creates `onCompositionStart`, `onCompositionUpdate` and - * `onCompositionEnd` events on inputs, textareas and contentEditable - * nodes. - */ -var CompositionEventPlugin = { - - eventTypes: eventTypes, - - /** - * @param {string} topLevelType Record from `EventConstants`. - * @param {DOMEventTarget} topLevelTarget The listening component root node. - * @param {string} topLevelTargetID ID of `topLevelTarget`. - * @param {object} nativeEvent Native browser event. - * @return {*} An accumulation of synthetic events. - * @see {EventPluginHub.extractEvents} - */ - extractEvents: function( - topLevelType, - topLevelTarget, - topLevelTargetID, - nativeEvent) { - - var eventType; - var data; - - if (useCompositionEvent) { - eventType = getCompositionEventType(topLevelType); - } else if (!currentComposition) { - if (isFallbackStart(topLevelType, nativeEvent)) { - eventType = eventTypes.compositionStart; - } - } else if (isFallbackEnd(topLevelType, nativeEvent)) { - eventType = eventTypes.compositionEnd; - } - - if (useFallbackData) { - // The current composition is stored statically and must not be - // overwritten while composition continues. - if (!currentComposition && eventType === eventTypes.compositionStart) { - currentComposition = new FallbackCompositionState(topLevelTarget); - } else if (eventType === eventTypes.compositionEnd) { - if (currentComposition) { - data = currentComposition.getData(); - currentComposition = null; - } - } - } - - if (eventType) { - var event = SyntheticCompositionEvent.getPooled( - eventType, - topLevelTargetID, - nativeEvent - ); - if (data) { - // Inject data generated from fallback path into the synthetic event. - // This matches the property of native CompositionEventInterface. - event.data = data; - } - EventPropagators.accumulateTwoPhaseDispatches(event); - return event; - } - } -}; - -module.exports = CompositionEventPlugin; - -},{"./EventConstants":14,"./EventPropagators":19,"./ExecutionEnvironment":20,"./ReactInputSelection":52,"./SyntheticCompositionEvent":76,"./getTextContentAccessor":108,"./keyOf":119}],7:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @providesModule DOMChildrenOperations - * @typechecks static-only - */ - -"use strict"; - -var Danger = _dereq_("./Danger"); -var ReactMultiChildUpdateTypes = _dereq_("./ReactMultiChildUpdateTypes"); - -var getTextContentAccessor = _dereq_("./getTextContentAccessor"); - -/** - * The DOM property to use when setting text content. - * - * @type {string} - * @private - */ -var textContentAccessor = getTextContentAccessor(); - -/** - * Inserts `childNode` as a child of `parentNode` at the `index`. - * - * @param {DOMElement} parentNode Parent node in which to insert. - * @param {DOMElement} childNode Child node to insert. - * @param {number} index Index at which to insert the child. - * @internal - */ -function insertChildAt(parentNode, childNode, index) { - var childNodes = parentNode.childNodes; - if (childNodes[index] === childNode) { - return; - } - // If `childNode` is already a child of `parentNode`, remove it so that - // computing `childNodes[index]` takes into account the removal. - if (childNode.parentNode === parentNode) { - parentNode.removeChild(childNode); - } - if (index >= childNodes.length) { - parentNode.appendChild(childNode); - } else { - parentNode.insertBefore(childNode, childNodes[index]); - } -} - -var updateTextContent; -if (textContentAccessor === 'textContent') { - /** - * Sets the text content of `node` to `text`. - * - * @param {DOMElement} node Node to change - * @param {string} text New text content - */ - updateTextContent = function(node, text) { - node.textContent = text; - }; -} else { - /** - * Sets the text content of `node` to `text`. - * - * @param {DOMElement} node Node to change - * @param {string} text New text content - */ - updateTextContent = function(node, text) { - // In order to preserve newlines correctly, we can't use .innerText to set - // the contents (see #1080), so we empty the element then append a text node - while (node.firstChild) { - node.removeChild(node.firstChild); - } - if (text) { - var doc = node.ownerDocument || document; - node.appendChild(doc.createTextNode(text)); - } - }; -} - -/** - * Operations for updating with DOM children. - */ -var DOMChildrenOperations = { - - dangerouslyReplaceNodeWithMarkup: Danger.dangerouslyReplaceNodeWithMarkup, - - updateTextContent: updateTextContent, - - /** - * Updates a component's children by processing a series of updates. The - * update configurations are each expected to have a `parentNode` property. - * - * @param {array} updates List of update configurations. - * @param {array} markupList List of markup strings. - * @internal - */ - processUpdates: function(updates, markupList) { - var update; - // Mapping from parent IDs to initial child orderings. - var initialChildren = null; - // List of children that will be moved or removed. - var updatedChildren = null; - - for (var i = 0; update = updates[i]; i++) { - if (update.type === ReactMultiChildUpdateTypes.MOVE_EXISTING || - update.type === ReactMultiChildUpdateTypes.REMOVE_NODE) { - var updatedIndex = update.fromIndex; - var updatedChild = update.parentNode.childNodes[updatedIndex]; - var parentID = update.parentID; - - initialChildren = initialChildren || {}; - initialChildren[parentID] = initialChildren[parentID] || []; - initialChildren[parentID][updatedIndex] = updatedChild; - - updatedChildren = updatedChildren || []; - updatedChildren.push(updatedChild); - } - } - - var renderedMarkup = Danger.dangerouslyRenderMarkup(markupList); - - // Remove updated children first so that `toIndex` is consistent. - if (updatedChildren) { - for (var j = 0; j < updatedChildren.length; j++) { - updatedChildren[j].parentNode.removeChild(updatedChildren[j]); - } - } - - for (var k = 0; update = updates[k]; k++) { - switch (update.type) { - case ReactMultiChildUpdateTypes.INSERT_MARKUP: - insertChildAt( - update.parentNode, - renderedMarkup[update.markupIndex], - update.toIndex - ); - break; - case ReactMultiChildUpdateTypes.MOVE_EXISTING: - insertChildAt( - update.parentNode, - initialChildren[update.parentID][update.fromIndex], - update.toIndex - ); - break; - case ReactMultiChildUpdateTypes.TEXT_CONTENT: - updateTextContent( - update.parentNode, - update.textContent - ); - break; - case ReactMultiChildUpdateTypes.REMOVE_NODE: - // Already removed by the for-loop above. - break; - } - } - } - -}; - -module.exports = DOMChildrenOperations; - -},{"./Danger":10,"./ReactMultiChildUpdateTypes":58,"./getTextContentAccessor":108}],8:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @providesModule DOMProperty - * @typechecks static-only - */ - -/*jslint bitwise: true */ - -"use strict"; - -var invariant = _dereq_("./invariant"); - -var DOMPropertyInjection = { - /** - * Mapping from normalized, camelcased property names to a configuration that - * specifies how the associated DOM property should be accessed or rendered. - */ - MUST_USE_ATTRIBUTE: 0x1, - MUST_USE_PROPERTY: 0x2, - HAS_SIDE_EFFECTS: 0x4, - HAS_BOOLEAN_VALUE: 0x8, - HAS_POSITIVE_NUMERIC_VALUE: 0x10, - - /** - * Inject some specialized knowledge about the DOM. This takes a config object - * with the following properties: - * - * isCustomAttribute: function that given an attribute name will return true - * if it can be inserted into the DOM verbatim. Useful for data-* or aria-* - * attributes where it's impossible to enumerate all of the possible - * attribute names, - * - * Properties: object mapping DOM property name to one of the - * DOMPropertyInjection constants or null. If your attribute isn't in here, - * it won't get written to the DOM. - * - * DOMAttributeNames: object mapping React attribute name to the DOM - * attribute name. Attribute names not specified use the **lowercase** - * normalized name. - * - * DOMPropertyNames: similar to DOMAttributeNames but for DOM properties. - * Property names not specified use the normalized name. - * - * DOMMutationMethods: Properties that require special mutation methods. If - * `value` is undefined, the mutation method should unset the property. - * - * @param {object} domPropertyConfig the config as described above. - */ - injectDOMPropertyConfig: function(domPropertyConfig) { - var Properties = domPropertyConfig.Properties || {}; - var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {}; - var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {}; - var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {}; - - if (domPropertyConfig.isCustomAttribute) { - DOMProperty._isCustomAttributeFunctions.push( - domPropertyConfig.isCustomAttribute - ); - } - - for (var propName in Properties) { - ("production" !== "development" ? invariant( - !DOMProperty.isStandardName[propName], - 'injectDOMPropertyConfig(...): You\'re trying to inject DOM property ' + - '\'%s\' which has already been injected. You may be accidentally ' + - 'injecting the same DOM property config twice, or you may be ' + - 'injecting two configs that have conflicting property names.', - propName - ) : invariant(!DOMProperty.isStandardName[propName])); - - DOMProperty.isStandardName[propName] = true; - - var lowerCased = propName.toLowerCase(); - DOMProperty.getPossibleStandardName[lowerCased] = propName; - - var attributeName = DOMAttributeNames[propName]; - if (attributeName) { - DOMProperty.getPossibleStandardName[attributeName] = propName; - } - - DOMProperty.getAttributeName[propName] = attributeName || lowerCased; - - DOMProperty.getPropertyName[propName] = - DOMPropertyNames[propName] || propName; - - var mutationMethod = DOMMutationMethods[propName]; - if (mutationMethod) { - DOMProperty.getMutationMethod[propName] = mutationMethod; - } - - var propConfig = Properties[propName]; - DOMProperty.mustUseAttribute[propName] = - propConfig & DOMPropertyInjection.MUST_USE_ATTRIBUTE; - DOMProperty.mustUseProperty[propName] = - propConfig & DOMPropertyInjection.MUST_USE_PROPERTY; - DOMProperty.hasSideEffects[propName] = - propConfig & DOMPropertyInjection.HAS_SIDE_EFFECTS; - DOMProperty.hasBooleanValue[propName] = - propConfig & DOMPropertyInjection.HAS_BOOLEAN_VALUE; - DOMProperty.hasPositiveNumericValue[propName] = - propConfig & DOMPropertyInjection.HAS_POSITIVE_NUMERIC_VALUE; - - ("production" !== "development" ? invariant( - !DOMProperty.mustUseAttribute[propName] || - !DOMProperty.mustUseProperty[propName], - 'DOMProperty: Cannot require using both attribute and property: %s', - propName - ) : invariant(!DOMProperty.mustUseAttribute[propName] || - !DOMProperty.mustUseProperty[propName])); - ("production" !== "development" ? invariant( - DOMProperty.mustUseProperty[propName] || - !DOMProperty.hasSideEffects[propName], - 'DOMProperty: Properties that have side effects must use property: %s', - propName - ) : invariant(DOMProperty.mustUseProperty[propName] || - !DOMProperty.hasSideEffects[propName])); - ("production" !== "development" ? invariant( - !DOMProperty.hasBooleanValue[propName] || - !DOMProperty.hasPositiveNumericValue[propName], - 'DOMProperty: Cannot have both boolean and positive numeric value: %s', - propName - ) : invariant(!DOMProperty.hasBooleanValue[propName] || - !DOMProperty.hasPositiveNumericValue[propName])); - } - } -}; -var defaultValueCache = {}; - -/** - * DOMProperty exports lookup objects that can be used like functions: - * - * > DOMProperty.isValid['id'] - * true - * > DOMProperty.isValid['foobar'] - * undefined - * - * Although this may be confusing, it performs better in general. - * - * @see http://jsperf.com/key-exists - * @see http://jsperf.com/key-missing - */ -var DOMProperty = { - - ID_ATTRIBUTE_NAME: 'data-reactid', - - /** - * Checks whether a property name is a standard property. - * @type {Object} - */ - isStandardName: {}, - - /** - * Mapping from lowercase property names to the properly cased version, used - * to warn in the case of missing properties. - * @type {Object} - */ - getPossibleStandardName: {}, - - /** - * Mapping from normalized names to attribute names that differ. Attribute - * names are used when rendering markup or with `*Attribute()`. - * @type {Object} - */ - getAttributeName: {}, - - /** - * Mapping from normalized names to properties on DOM node instances. - * (This includes properties that mutate due to external factors.) - * @type {Object} - */ - getPropertyName: {}, - - /** - * Mapping from normalized names to mutation methods. This will only exist if - * mutation cannot be set simply by the property or `setAttribute()`. - * @type {Object} - */ - getMutationMethod: {}, - - /** - * Whether the property must be accessed and mutated as an object property. - * @type {Object} - */ - mustUseAttribute: {}, - - /** - * Whether the property must be accessed and mutated using `*Attribute()`. - * (This includes anything that fails ` in `.) - * @type {Object} - */ - mustUseProperty: {}, - - /** - * Whether or not setting a value causes side effects such as triggering - * resources to be loaded or text selection changes. We must ensure that - * the value is only set if it has changed. - * @type {Object} - */ - hasSideEffects: {}, - - /** - * Whether the property should be removed when set to a falsey value. - * @type {Object} - */ - hasBooleanValue: {}, - - /** - * Whether the property must be positive numeric or parse as a positive - * numeric and should be removed when set to a falsey value. - * @type {Object} - */ - hasPositiveNumericValue: {}, - - /** - * All of the isCustomAttribute() functions that have been injected. - */ - _isCustomAttributeFunctions: [], - - /** - * Checks whether a property name is a custom attribute. - * @method - */ - isCustomAttribute: function(attributeName) { - for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) { - var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i]; - if (isCustomAttributeFn(attributeName)) { - return true; - } - } - return false; - }, - - /** - * Returns the default property value for a DOM property (i.e., not an - * attribute). Most default values are '' or false, but not all. Worse yet, - * some (in particular, `type`) vary depending on the type of element. - * - * TODO: Is it better to grab all the possible properties when creating an - * element to avoid having to create the same element twice? - */ - getDefaultValueForProperty: function(nodeName, prop) { - var nodeDefaults = defaultValueCache[nodeName]; - var testElement; - if (!nodeDefaults) { - defaultValueCache[nodeName] = nodeDefaults = {}; - } - if (!(prop in nodeDefaults)) { - testElement = document.createElement(nodeName); - nodeDefaults[prop] = testElement[prop]; - } - return nodeDefaults[prop]; - }, - - injection: DOMPropertyInjection -}; - -module.exports = DOMProperty; - -},{"./invariant":112}],9:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @providesModule DOMPropertyOperations - * @typechecks static-only - */ - -"use strict"; - -var DOMProperty = _dereq_("./DOMProperty"); - -var escapeTextForBrowser = _dereq_("./escapeTextForBrowser"); -var memoizeStringOnly = _dereq_("./memoizeStringOnly"); -var warning = _dereq_("./warning"); - -function shouldIgnoreValue(name, value) { - return value == null || - DOMProperty.hasBooleanValue[name] && !value || - DOMProperty.hasPositiveNumericValue[name] && (isNaN(value) || value < 1); -} - -var processAttributeNameAndPrefix = memoizeStringOnly(function(name) { - return escapeTextForBrowser(name) + '="'; -}); - -if ("production" !== "development") { - var reactProps = { - children: true, - dangerouslySetInnerHTML: true, - key: true, - ref: true - }; - var warnedProperties = {}; - - var warnUnknownProperty = function(name) { - if (reactProps[name] || warnedProperties[name]) { - return; - } - - warnedProperties[name] = true; - var lowerCasedName = name.toLowerCase(); - - // data-* attributes should be lowercase; suggest the lowercase version - var standardName = DOMProperty.isCustomAttribute(lowerCasedName) ? - lowerCasedName : DOMProperty.getPossibleStandardName[lowerCasedName]; - - // For now, only warn when we have a suggested correction. This prevents - // logging too much when using transferPropsTo. - ("production" !== "development" ? warning( - standardName == null, - 'Unknown DOM property ' + name + '. Did you mean ' + standardName + '?' - ) : null); - - }; -} - -/** - * Operations for dealing with DOM properties. - */ -var DOMPropertyOperations = { - - /** - * Creates markup for the ID property. - * - * @param {string} id Unescaped ID. - * @return {string} Markup string. - */ - createMarkupForID: function(id) { - return processAttributeNameAndPrefix(DOMProperty.ID_ATTRIBUTE_NAME) + - escapeTextForBrowser(id) + '"'; - }, - - /** - * Creates markup for a property. - * - * @param {string} name - * @param {*} value - * @return {?string} Markup string, or null if the property was invalid. - */ - createMarkupForProperty: function(name, value) { - if (DOMProperty.isStandardName[name]) { - if (shouldIgnoreValue(name, value)) { - return ''; - } - var attributeName = DOMProperty.getAttributeName[name]; - if (DOMProperty.hasBooleanValue[name]) { - return escapeTextForBrowser(attributeName); - } - return processAttributeNameAndPrefix(attributeName) + - escapeTextForBrowser(value) + '"'; - } else if (DOMProperty.isCustomAttribute(name)) { - if (value == null) { - return ''; - } - return processAttributeNameAndPrefix(name) + - escapeTextForBrowser(value) + '"'; - } else if ("production" !== "development") { - warnUnknownProperty(name); - } - return null; - }, - - /** - * Sets the value for a property on a node. - * - * @param {DOMElement} node - * @param {string} name - * @param {*} value - */ - setValueForProperty: function(node, name, value) { - if (DOMProperty.isStandardName[name]) { - var mutationMethod = DOMProperty.getMutationMethod[name]; - if (mutationMethod) { - mutationMethod(node, value); - } else if (shouldIgnoreValue(name, value)) { - this.deleteValueForProperty(node, name); - } else if (DOMProperty.mustUseAttribute[name]) { - node.setAttribute(DOMProperty.getAttributeName[name], '' + value); - } else { - var propName = DOMProperty.getPropertyName[name]; - if (!DOMProperty.hasSideEffects[name] || node[propName] !== value) { - node[propName] = value; - } - } - } else if (DOMProperty.isCustomAttribute(name)) { - if (value == null) { - node.removeAttribute(DOMProperty.getAttributeName[name]); - } else { - node.setAttribute(name, '' + value); - } - } else if ("production" !== "development") { - warnUnknownProperty(name); - } - }, - - /** - * Deletes the value for a property on a node. - * - * @param {DOMElement} node - * @param {string} name - */ - deleteValueForProperty: function(node, name) { - if (DOMProperty.isStandardName[name]) { - var mutationMethod = DOMProperty.getMutationMethod[name]; - if (mutationMethod) { - mutationMethod(node, undefined); - } else if (DOMProperty.mustUseAttribute[name]) { - node.removeAttribute(DOMProperty.getAttributeName[name]); - } else { - var propName = DOMProperty.getPropertyName[name]; - var defaultValue = DOMProperty.getDefaultValueForProperty( - node.nodeName, - propName - ); - if (!DOMProperty.hasSideEffects[name] || - node[propName] !== defaultValue) { - node[propName] = defaultValue; - } - } - } else if (DOMProperty.isCustomAttribute(name)) { - node.removeAttribute(name); - } else if ("production" !== "development") { - warnUnknownProperty(name); - } - } - -}; - -module.exports = DOMPropertyOperations; - -},{"./DOMProperty":8,"./escapeTextForBrowser":98,"./memoizeStringOnly":120,"./warning":134}],10:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @providesModule Danger - * @typechecks static-only - */ - -/*jslint evil: true, sub: true */ - -"use strict"; - -var ExecutionEnvironment = _dereq_("./ExecutionEnvironment"); - -var createNodesFromMarkup = _dereq_("./createNodesFromMarkup"); -var emptyFunction = _dereq_("./emptyFunction"); -var getMarkupWrap = _dereq_("./getMarkupWrap"); -var invariant = _dereq_("./invariant"); - -var OPEN_TAG_NAME_EXP = /^(<[^ \/>]+)/; -var RESULT_INDEX_ATTR = 'data-danger-index'; - -/** - * Extracts the `nodeName` from a string of markup. - * - * NOTE: Extracting the `nodeName` does not require a regular expression match - * because we make assumptions about React-generated markup (i.e. there are no - * spaces surrounding the opening tag and there is at least one attribute). - * - * @param {string} markup String of markup. - * @return {string} Node name of the supplied markup. - * @see http://jsperf.com/extract-nodename - */ -function getNodeName(markup) { - return markup.substring(1, markup.indexOf(' ')); -} - -var Danger = { - - /** - * Renders markup into an array of nodes. The markup is expected to render - * into a list of root nodes. Also, the length of `resultList` and - * `markupList` should be the same. - * - * @param {array} markupList List of markup strings to render. - * @return {array} List of rendered nodes. - * @internal - */ - dangerouslyRenderMarkup: function(markupList) { - ("production" !== "development" ? invariant( - ExecutionEnvironment.canUseDOM, - 'dangerouslyRenderMarkup(...): Cannot render markup in a Worker ' + - 'thread. This is likely a bug in the framework. Please report ' + - 'immediately.' - ) : invariant(ExecutionEnvironment.canUseDOM)); - var nodeName; - var markupByNodeName = {}; - // Group markup by `nodeName` if a wrap is necessary, else by '*'. - for (var i = 0; i < markupList.length; i++) { - ("production" !== "development" ? invariant( - markupList[i], - 'dangerouslyRenderMarkup(...): Missing markup.' - ) : invariant(markupList[i])); - nodeName = getNodeName(markupList[i]); - nodeName = getMarkupWrap(nodeName) ? nodeName : '*'; - markupByNodeName[nodeName] = markupByNodeName[nodeName] || []; - markupByNodeName[nodeName][i] = markupList[i]; - } - var resultList = []; - var resultListAssignmentCount = 0; - for (nodeName in markupByNodeName) { - if (!markupByNodeName.hasOwnProperty(nodeName)) { - continue; - } - var markupListByNodeName = markupByNodeName[nodeName]; - - // This for-in loop skips the holes of the sparse array. The order of - // iteration should follow the order of assignment, which happens to match - // numerical index order, but we don't rely on that. - for (var resultIndex in markupListByNodeName) { - if (markupListByNodeName.hasOwnProperty(resultIndex)) { - var markup = markupListByNodeName[resultIndex]; - - // Push the requested markup with an additional RESULT_INDEX_ATTR - // attribute. If the markup does not start with a < character, it - // will be discarded below (with an appropriate console.error). - markupListByNodeName[resultIndex] = markup.replace( - OPEN_TAG_NAME_EXP, - // This index will be parsed back out below. - '$1 ' + RESULT_INDEX_ATTR + '="' + resultIndex + '" ' - ); - } - } - - // Render each group of markup with similar wrapping `nodeName`. - var renderNodes = createNodesFromMarkup( - markupListByNodeName.join(''), - emptyFunction // Do nothing special with