From 9ca0dcd450209350d1e346a8b8fd7e4dff46063b Mon Sep 17 00:00:00 2001 From: bustardcelly Date: Thu, 7 Jun 2018 16:57:10 -0400 Subject: [PATCH 01/15] getting in basic logging. --- package-lock.json | 35 +++++++++++++++++ package.json | 1 + src/js/index.js | 49 ++++++++++++++++++++++- src/js/log/bunyan-writer.js | 18 +++++++++ src/js/log/index.js | 77 +++++++++++++++++++++++++++++++++++++ webpack.config.babel.js | 4 +- 6 files changed, 181 insertions(+), 3 deletions(-) create mode 100644 src/js/log/bunyan-writer.js create mode 100644 src/js/log/index.js diff --git a/package-lock.json b/package-lock.json index a3f1495..ab48fee 100644 --- a/package-lock.json +++ b/package-lock.json @@ -176,6 +176,30 @@ } } }, + "@browser-bunyan/console-formatted-stream": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@browser-bunyan/console-formatted-stream/-/console-formatted-stream-1.3.0.tgz", + "integrity": "sha1-PcBZqlwbKnofJuJwbiveuaCbvlc=", + "dev": true, + "requires": { + "@browser-bunyan/levels": "^1.3.0" + } + }, + "@browser-bunyan/console-raw-stream": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@browser-bunyan/console-raw-stream/-/console-raw-stream-1.3.0.tgz", + "integrity": "sha1-zPJLVvImUFgpfGUX++zqhOu3gYw=", + "dev": true, + "requires": { + "@browser-bunyan/levels": "^1.3.0" + } + }, + "@browser-bunyan/levels": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@browser-bunyan/levels/-/levels-1.3.0.tgz", + "integrity": "sha1-oFIwOuXRofm2Pus6lElaL0KfSDE=", + "dev": true + }, "@webassemblyjs/ast": { "version": "1.5.10", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.5.10.tgz", @@ -1407,6 +1431,17 @@ "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", "dev": true }, + "browser-bunyan": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/browser-bunyan/-/browser-bunyan-1.3.0.tgz", + "integrity": "sha1-JjeNxY16mAAsyb/Pui6l1xJEmZI=", + "dev": true, + "requires": { + "@browser-bunyan/console-formatted-stream": "^1.3.0", + "@browser-bunyan/console-raw-stream": "^1.3.0", + "@browser-bunyan/levels": "^1.3.0" + } + }, "browserify-aes": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", diff --git a/package.json b/package.json index 84740cf..4796714 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "babel-plugin-transform-runtime": "^6.23.0", "babel-preset-env": "^1.7.0", "babel-preset-es2015": "^6.24.1", + "browser-bunyan": "^1.3.0", "eslint": "^4.19.1", "webpack": "^4.11.1", "webpack-cli": "^3.0.3" diff --git a/src/js/index.js b/src/js/index.js index 7bc4a71..2840305 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -1 +1,48 @@ -console.log('Hello world'); +/** + * Main entry of Stream Manager Extension for Red5 Pro HTML SDK, accessible on the `window` global at `red5prosdk_ext_stream_manager`. + * + * @file red5pro-ext-stream-manager.min.js + * @module red5prosdk_ext_stream_manager + * + * + */ + +// SDK_VERSION, LOG_LEVEL injected from webpack build. +import { LEVELS, establishLogger } from './log' +import { getLogger as _getLogger } from './log' + +establishLogger(`${LOG_LEVEL}` || LEVELS.DEBUG) // eslint-disable-line no-undef + +/** + * Sets the log level for logs from the SDK + * @param {string} level + * The specified log level. + * @see LOG_LEVELS + */ +export const setLogLevel = (level) => { + if (LEVELS.hasOwnProperty(level.toUpperCase())) { + establishLogger(level) + if (console) { + console.log(`Red5 Pro Stream Manager Extension ${SDK_VERSION}`) // eslint-disable-line no-undef,no-console + } + } +} + +/** + * The enumerated log level Strings. + * * `TRACE` + * * `INFO` + * * `DEBUG` + * * `WARN` + * * `ERROR` + * * `FATAL` + */ +export const LOG_LEVELS = LEVELS +/** + * Retrieves the Logger instance used by the SDK. + * + * @returns {Logger} + * The logger. + */ +export const getLogger = _getLogger + diff --git a/src/js/log/bunyan-writer.js b/src/js/log/bunyan-writer.js new file mode 100644 index 0000000..eba10a9 --- /dev/null +++ b/src/js/log/bunyan-writer.js @@ -0,0 +1,18 @@ +import { nameFromLevel } from 'browser-bunyan' + +/** + * Custom logger for bunyon. + * + * @private + */ +export class RawStream { + write (rec) { + console.log('%s - [%s] %s: %s', // eslint-disable-line no-console + rec.time.toISOString(), + rec.name, + nameFromLevel[rec.level], + rec.msg + ) + } +} + diff --git a/src/js/log/index.js b/src/js/log/index.js new file mode 100644 index 0000000..7304744 --- /dev/null +++ b/src/js/log/index.js @@ -0,0 +1,77 @@ +import { createLogger } from 'browser-bunyan' +import { RawStream } from './bunyan-writer' + +let logger + +const formatMessage = (dispatcher) => { + return message => { + return `(${dispatcher}) ${message}` + } +} + +const decorate = (level) => { + return (source, message) => { + logger[level](formatMessage(source)(message)) + } +} + +/* + * The log levels supported. + */ +export const LEVELS = { + TRACE: 'trace', + INFO: 'info', + DEBUG: 'debug', + WARN: 'warn', + ERROR: 'error', + FATAL: 'fatal' +} + +/** + * Establish logger to use at level. + * + * @param {String} level + * The level type from `LEVELS`. + * @param {Array} streamList + * The streamList to use in creating bunyon-based logger. + * + * @private + */ +export const establishLogger = (level, streamList = undefined) => { + let streams = [] + streams.push({ + level: level, + stream: new RawStream(), + type: 'raw' + }) + if (streamList) { + const list = streamList.map(item => { + item.level = level + }) + streams = streams.concat(list) + } + logger = createLogger({ + level: level, + name: 'red5pro-ext-sm', + streams: streams + }) +} + +/** + * Return the determined logger instance. + * + * @return {Object} + * + * @private + */ +export const getLogger = () => { + return logger +} + +/* Quick access to logger level types. */ +export const trace = decorate(LEVELS.TRACE) +export const info = decorate(LEVELS.INFO) +export const debug = decorate(LEVELS.DEBUG) +export const warn = decorate(LEVELS.WARN) +export const error = decorate(LEVELS.ERROR) +export const fatal = decorate(LEVELS.FATAL) diff --git a/webpack.config.babel.js b/webpack.config.babel.js index 0206d71..2f87720 100644 --- a/webpack.config.babel.js +++ b/webpack.config.babel.js @@ -9,8 +9,8 @@ const banner = ` Url: ${pkg.homepage} `; -const buildDir = path.join(process.cwd(), 'build', `red5pro-extension-stream-manager-${pkg.version}`, 'lib', 'red5pro') -const distDir = path.join(process.cwd(), 'dist', `red5pro-extension-stream-manager-${pkg.version}`, 'lib', 'red5pro') +const buildDir = path.join(process.cwd(), 'build', `red5pro-ext-stream-manager-${pkg.version}`, 'lib', 'red5pro') +const distDir = path.join(process.cwd(), 'dist', `red5pro-ext-stream-manager-${pkg.version}`, 'lib', 'red5pro') const PROD = (process.env.NODE_ENV === 'production') const STAGING = (process.env.NODE_ENV === 'staging') From b1637a651bbd05a86d52d2b374b40d2d05c8972a Mon Sep 17 00:00:00 2001 From: bustardcelly Date: Thu, 7 Jun 2018 17:35:26 -0400 Subject: [PATCH 02/15] getting build flow set up and basic init. --- examples/browser/index.html | 19 + examples/browser/lib/red5pro/icons/LICENSE | 21 + .../browser/lib/red5pro/icons/maximize.png | Bin 0 -> 353 bytes .../browser/lib/red5pro/icons/maximize.svg | 3 + .../browser/lib/red5pro/icons/minimize.png | Bin 0 -> 343 bytes .../browser/lib/red5pro/icons/minimize.svg | 3 + examples/browser/lib/red5pro/icons/pause.png | Bin 0 -> 165 bytes examples/browser/lib/red5pro/icons/pause.svg | 4 + examples/browser/lib/red5pro/icons/play.png | Bin 0 -> 416 bytes examples/browser/lib/red5pro/icons/play.svg | 3 + .../browser/lib/red5pro/icons/volume-2.png | Bin 0 -> 695 bytes .../browser/lib/red5pro/icons/volume-2.svg | 4 + .../browser/lib/red5pro/icons/volume-x.png | Bin 0 -> 562 bytes .../browser/lib/red5pro/icons/volume-x.svg | 5 + .../lib/red5pro/red5pro-ext-stream-manager.js | 1490 ++ .../browser/lib/red5pro/red5pro-media.css | 170 + .../browser/lib/red5pro/red5pro-publisher.swf | Bin 0 -> 8672 bytes examples/browser/lib/red5pro/red5pro-sdk.js | 17170 ++++++++++++++++ .../lib/red5pro/red5pro-subscriber.swf | Bin 0 -> 8661 bytes .../browser/lib/red5pro/red5pro-video.css | 165 + .../browser/lib/screenfull/screenfull.min.js | 6 + .../lib/swfobject/playerProductInstall.swf | Bin 0 -> 657 bytes examples/browser/lib/swfobject/swfobject.js | 777 + gulpfile.js | 19 + package-lock.json | 1011 + package.json | 3 + src/js/env/browser.js | 5 + src/js/index.js | 9 + webpack.config.babel.js | 2 +- 29 files changed, 20888 insertions(+), 1 deletion(-) create mode 100644 examples/browser/index.html create mode 100644 examples/browser/lib/red5pro/icons/LICENSE create mode 100644 examples/browser/lib/red5pro/icons/maximize.png create mode 100644 examples/browser/lib/red5pro/icons/maximize.svg create mode 100644 examples/browser/lib/red5pro/icons/minimize.png create mode 100644 examples/browser/lib/red5pro/icons/minimize.svg create mode 100644 examples/browser/lib/red5pro/icons/pause.png create mode 100644 examples/browser/lib/red5pro/icons/pause.svg create mode 100644 examples/browser/lib/red5pro/icons/play.png create mode 100644 examples/browser/lib/red5pro/icons/play.svg create mode 100644 examples/browser/lib/red5pro/icons/volume-2.png create mode 100644 examples/browser/lib/red5pro/icons/volume-2.svg create mode 100644 examples/browser/lib/red5pro/icons/volume-x.png create mode 100644 examples/browser/lib/red5pro/icons/volume-x.svg create mode 100644 examples/browser/lib/red5pro/red5pro-ext-stream-manager.js create mode 100644 examples/browser/lib/red5pro/red5pro-media.css create mode 100644 examples/browser/lib/red5pro/red5pro-publisher.swf create mode 100644 examples/browser/lib/red5pro/red5pro-sdk.js create mode 100644 examples/browser/lib/red5pro/red5pro-subscriber.swf create mode 100644 examples/browser/lib/red5pro/red5pro-video.css create mode 100644 examples/browser/lib/screenfull/screenfull.min.js create mode 100644 examples/browser/lib/swfobject/playerProductInstall.swf create mode 100644 examples/browser/lib/swfobject/swfobject.js create mode 100644 gulpfile.js create mode 100644 src/js/env/browser.js diff --git a/examples/browser/index.html b/examples/browser/index.html new file mode 100644 index 0000000..47ebad6 --- /dev/null +++ b/examples/browser/index.html @@ -0,0 +1,19 @@ + + + + + +
+

Hello, World

+
+ + + + + diff --git a/examples/browser/lib/red5pro/icons/LICENSE b/examples/browser/lib/red5pro/icons/LICENSE new file mode 100644 index 0000000..c2f512f --- /dev/null +++ b/examples/browser/lib/red5pro/icons/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013-2017 Cole Bemis + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/examples/browser/lib/red5pro/icons/maximize.png b/examples/browser/lib/red5pro/icons/maximize.png new file mode 100644 index 0000000000000000000000000000000000000000..fd2d20e81948a6bf10753a17fefa3f2216c06098 GIT binary patch literal 353 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjY)RhkE)4%caKYZ?lYt_f1s;*b zKpodXn9)gNb_Gz7y~NYkmHi<*8@G&w%ktNmK%sY@E{-7{$KOsh^kQ)oaJ_$Dj>pnbZ9iHqJZZVK^tG&1mMd(%8hgR})g}F3n%{?*Hyx zFZCkIH744eH+SNgK8dg4Z@4TX3lArI zru$xIm{V`Wz{jZaHZ=6>hMrqBscGBz?|52yu`QnYN9@3+NB1S}m6uo_b*ryE`8wYq z;eh_3Gc^aFZ{2k6!=(C@50~aX^o!rPNTba9*Pn~&LWSR@J(nL?JoDo6#XGB|*6)|t vl3Ok4gTe~DWM4fL5P*O literal 0 HcmV?d00001 diff --git a/examples/browser/lib/red5pro/icons/maximize.svg b/examples/browser/lib/red5pro/icons/maximize.svg new file mode 100644 index 0000000..928044a --- /dev/null +++ b/examples/browser/lib/red5pro/icons/maximize.svg @@ -0,0 +1,3 @@ + + + diff --git a/examples/browser/lib/red5pro/icons/minimize.png b/examples/browser/lib/red5pro/icons/minimize.png new file mode 100644 index 0000000000000000000000000000000000000000..563718f2c6b2ab23fca36a6bfdb58a5af6256492 GIT binary patch literal 343 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjY)RhkE)4%caKYZ?lYt_f1s;*b zKpodXn9)gNb_Gz7y~NYkmHi<*8?T&*!;zW0fI?3^T^vI^j=!C1=*1i;(6;}h?WMP6 zX3I{vx*W02G2~WyA|NQ(S=Hmpk!iHNL%_y!mB6Lk*{$iHTYBH+w+1@ntoA}1xW(f`5Yw^6Pqo>ik>Wc;ElDB*frW-sar9_Dw-M7->^rpt||9Aru zO5Vu!G%Vkw!~EfnO2N6k%>A*#KkoN!?R?j;w8LhLWXFkGpZv2qrB|X;(&ih=mYGzD hZe9J){>SkjY|@_{xSsuA^b+V_22WQ%mvv4FO#lVkiOc{1 literal 0 HcmV?d00001 diff --git a/examples/browser/lib/red5pro/icons/minimize.svg b/examples/browser/lib/red5pro/icons/minimize.svg new file mode 100644 index 0000000..a2574b3 --- /dev/null +++ b/examples/browser/lib/red5pro/icons/minimize.svg @@ -0,0 +1,3 @@ + + + diff --git a/examples/browser/lib/red5pro/icons/pause.png b/examples/browser/lib/red5pro/icons/pause.png new file mode 100644 index 0000000000000000000000000000000000000000..c215a051dcfab98fa25bef90d3f3dbe53881fc1b GIT binary patch literal 165 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjY)RhkE)4%caKYZ?lYt_f1s;*b zKpodXn9)gNb_Gz7y~NYkmHi<*8?T%p_W|F(Kp`Vf7sn8fBsMzGf|{cB4N>1em7l-tqE6}0=a<<*2ByU3@cA^C{%Cj+7Hyt;OXk;vd$@?2>>?1 BExP~! literal 0 HcmV?d00001 diff --git a/examples/browser/lib/red5pro/icons/pause.svg b/examples/browser/lib/red5pro/icons/pause.svg new file mode 100644 index 0000000..39702a1 --- /dev/null +++ b/examples/browser/lib/red5pro/icons/pause.svg @@ -0,0 +1,4 @@ + + + + diff --git a/examples/browser/lib/red5pro/icons/play.png b/examples/browser/lib/red5pro/icons/play.png new file mode 100644 index 0000000000000000000000000000000000000000..e2112f6997e6e0c733c7eaee80b2dae80676d529 GIT binary patch literal 416 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjY)RhkE)4%caKYZ?lYt_f1s;*b zKpodXn9)gNb_Gz7y~NYkmHi<*8?QW%*JgvY3=E9Ao-U3d9>?EK-RQ;aDA4xbGMs#u^Gm^g);Y}v#+O56z!?BH#oM(@U!QvWsUrd3~N@sN{yW6Dsw#A zj>WW^Vcty3t=IH^3NRelv}&Goa#f(n+g}1#a@ZX|961y2Icd!g0fvUatJ{j#oj>y% zs6l$wuLEbcuMNvS+s?q?5jy!|#+O59uC*^nTexbKt9(;e$GW-2vm>XS>~H<6{73Y_ z#Ez2m*iYhuu`P)^F25|#sXLkMaHBea;EVz?-!R5R|7LM=cWIwO`XZXKv?`K{s+0?cL4slAruw?Lb^>bP0 Hl+XkKsnn;p literal 0 HcmV?d00001 diff --git a/examples/browser/lib/red5pro/icons/play.svg b/examples/browser/lib/red5pro/icons/play.svg new file mode 100644 index 0000000..d34d03d --- /dev/null +++ b/examples/browser/lib/red5pro/icons/play.svg @@ -0,0 +1,3 @@ + + + diff --git a/examples/browser/lib/red5pro/icons/volume-2.png b/examples/browser/lib/red5pro/icons/volume-2.png new file mode 100644 index 0000000000000000000000000000000000000000..66c82e5255b6b8d9759dcaae5011e7a5ce55105d GIT binary patch literal 695 zcmV;o0!aOdP)|6G0Sxe|IA!5+N4ifuNwJHYZ#mc$|eCD1snsb|zUHA(fqq$~CFvEUr5c z4vb(in-~-eHJk|EX(0s8MnxhBHd-EmHAS+U`8K;ph?`5~KrHUV!sqXw|NfizX9n1{ ze`U69o261IH5@l4S)9-3k4h;wgb?eaaxBYw<@^3u+qMt>6@Zj--Y|?NGfxAU9hJw- zK7b>ZWj(QNd(T*aa=C0cjTmYW|oU$zI=C%N?>+Wr}T2&&t1wa$g z?F42yA;g_xu{Z?)l}g2D=4;XK>r%?x7Jv}qtq_9aFAT$90Biu8M08#$buVE{E(5r$ zwSFFNNwr#C1F!}l$IKT88JtcavZ1w}QA({Qu}r7a3cwd;o=&AwSK~MlJ&xRS0ALL+ z@;r|w9m`6k;yaGBKtxZq)>i=Bj{w%0832w?Jf_3q?CbaYi$ny&FdoHm z(=_KI4L%Msc$ZM)q+u9MDdqf#?gbGYBccyM5Ih(fUjTTy#lZ8t+2Mm0hT%g1HZ#AF zQZ7VYVQ?I^))~_@tMz)l7ahJc%sdC6O+?QCfX3WIC1zd*kQz72uInBM!>|e9Fn}AL z=PivDSt+$bL>B;TjuSixf|aQF`*yp%Jn?O+lv>qV&j4rwcrz-Gh_V2_o2GfG(P(sc dU&#N*egj5%=g_<^G3WpQ002ovPDHLkV1j=JAwvKF literal 0 HcmV?d00001 diff --git a/examples/browser/lib/red5pro/icons/volume-2.svg b/examples/browser/lib/red5pro/icons/volume-2.svg new file mode 100644 index 0000000..d6a1393 --- /dev/null +++ b/examples/browser/lib/red5pro/icons/volume-2.svg @@ -0,0 +1,4 @@ + + + + diff --git a/examples/browser/lib/red5pro/icons/volume-x.png b/examples/browser/lib/red5pro/icons/volume-x.png new file mode 100644 index 0000000000000000000000000000000000000000..f5e9ae4ef0ff3270e4215ce938f99535ccaf9746 GIT binary patch literal 562 zcmV-20?qx2P)q z6DpKIJy=pK1ux0LUl1rgNLa{ZKMy9LC25*i5TPFo43GEboA=)LW`HaFYw#jYjYi{E zrBZn(=|`4j50)XYiyY!Ou1iWK-B=}qxdg3N%k+A^my(`dG}Boyvy9DV^LoGEe@pTi zfRg0%RS7HrL{YR4V0&ux-cPqDB;zzqccUoUnRP%EMf;N6cszcT=lK8tf*`nQt^EjK zI4#lkjM%SbSvK13_V@E{D9Mq$XRX}}f}jcj*4jM)cK~$%=s}icOV`>tS1XF*(}d(; zV&0T==$xyYztwq?B&W`~8h~Q}o0E0yoU0{Ca%wJPn2MrUBe^c=*Km>RMNzEHRnamC z!*GLSN79xt=19_!q%D%2Fbp^B8AWK>CX@UC;5LA7qtWQ$?@cE8ewxAO8L@YbG2J+h z>kESPA>H=IzzHsmgRi_T>zb{AMXFdPZ3zN(7t=3bN~PV07*qoM6N<$f>FZy AjQ{`u literal 0 HcmV?d00001 diff --git a/examples/browser/lib/red5pro/icons/volume-x.svg b/examples/browser/lib/red5pro/icons/volume-x.svg new file mode 100644 index 0000000..08ee9bc --- /dev/null +++ b/examples/browser/lib/red5pro/icons/volume-x.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/examples/browser/lib/red5pro/red5pro-ext-stream-manager.js b/examples/browser/lib/red5pro/red5pro-ext-stream-manager.js new file mode 100644 index 0000000..765c872 --- /dev/null +++ b/examples/browser/lib/red5pro/red5pro-ext-stream-manager.js @@ -0,0 +1,1490 @@ +/*! + * + * red5pro-extension-stream-manager - Library extension for Stream Manager support + * Author: + * Version: 1.0.0 + * Url: undefined + * + */ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["red5prosdk_ext_stream_manager"] = factory(); + else + root["red5prosdk_ext_stream_manager"] = factory(); +})(window, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 0); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ "./node_modules/babel-runtime/core-js/object/define-property.js": +/*!**********************************************************************!*\ + !*** ./node_modules/babel-runtime/core-js/object/define-property.js ***! + \**********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(/*! core-js/library/fn/object/define-property */ "./node_modules/core-js/library/fn/object/define-property.js"), __esModule: true }; + +/***/ }), + +/***/ "./node_modules/babel-runtime/helpers/classCallCheck.js": +/*!**************************************************************!*\ + !*** ./node_modules/babel-runtime/helpers/classCallCheck.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +exports.default = function (instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +}; + +/***/ }), + +/***/ "./node_modules/babel-runtime/helpers/createClass.js": +/*!***********************************************************!*\ + !*** ./node_modules/babel-runtime/helpers/createClass.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _defineProperty = __webpack_require__(/*! ../core-js/object/define-property */ "./node_modules/babel-runtime/core-js/object/define-property.js"); + +var _defineProperty2 = _interopRequireDefault(_defineProperty); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + (0, _defineProperty2.default)(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; +}(); + +/***/ }), + +/***/ "./node_modules/browser-bunyan/lib/index.m.js": +/*!****************************************************!*\ + !*** ./node_modules/browser-bunyan/lib/index.m.js ***! + \****************************************************/ +/*! exports provided: TRACE, DEBUG, INFO, WARN, ERROR, FATAL, resolveLevel, levelFromName, nameFromLevel, stdSerializers, Logger, createLogger, safeCycles, ConsoleFormattedStream, ConsoleRawStream */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TRACE", function() { return TRACE; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DEBUG", function() { return DEBUG; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "INFO", function() { return INFO; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WARN", function() { return WARN; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ERROR", function() { return ERROR; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FATAL", function() { return FATAL; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "resolveLevel", function() { return resolveLevel; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "levelFromName", function() { return levelFromName; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "nameFromLevel", function() { return nameFromLevel; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stdSerializers", function() { return stdSerializers; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Logger", function() { return Logger; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createLogger", function() { return createLogger; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "safeCycles", function() { return safeCycles; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConsoleFormattedStream", function() { return ConsoleFormattedStream; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConsoleRawStream", function() { return ConsoleRawStream; }); +var TRACE = 10; +var DEBUG = 20; +var INFO = 30; +var WARN = 40; +var ERROR = 50; +var FATAL = 60; +var levelFromName = { + 'trace': TRACE, + 'debug': DEBUG, + 'info': INFO, + 'warn': WARN, + 'error': ERROR, + 'fatal': FATAL +}; +var nameFromLevel = {}; +Object.keys(levelFromName).forEach(function (name) { + nameFromLevel[levelFromName[name]] = name; +}); +function resolveLevel(nameOrNum) { + return typeof nameOrNum === 'string' ? levelFromName[nameOrNum.toLowerCase()] : nameOrNum; +} + +var CALL_STACK_ERROR = 'call-stack-error'; +function objCopy(obj) { + if (typeof obj === 'undefined' || obj === null) { + return obj; + } else if (Array.isArray(obj)) { + return obj.slice(); + } else if (typeof obj === 'object') { + var copy = {}; + Object.keys(obj).forEach(function (k) { + copy[k] = obj[k]; + }); + return copy; + } else { + return obj; + } +} + +function inspect(obj) { + if (typeof obj === 'undefined') { + return 'undefined'; + } + if (obj === null) { + return 'null'; + } + if (Array.isArray(obj)) { + var items = obj.map(function (obj) { return inspect(obj); }); + return '[ ' + items.join(', ') + ' ]'; + } + if (typeof obj === 'object') { + return JSON.stringify(obj); + } + if (typeof obj === 'function') { + return '[Function: ' + obj.name + ']'; + } + if (typeof obj === 'boolean' || typeof obj === 'number') { + return obj; + } + return '\'' + obj.toString() + '\''; +} + +function format(f) { + var arguments$1 = arguments; + + if (typeof f !== 'string') { + var objects = new Array(arguments.length); + for (var i$1 = 0;i$1 < arguments.length; i$1++) { + objects[i$1] = inspect(arguments$1[i$1]); + } + return objects.join(' '); + } + var formatRegExp = /%[sdj%]/g; + var i = 1; + var args = arguments; + var len = args.length; + var str = String(f).replace(formatRegExp, function (x) { + if (x === '%%') { + return '%'; + } + if (i >= len) { + return x; + } + switch (x) { + case '%s': + return String(args[i++]); + case '%d': + return Number(args[i++]); + case '%j': + try { + return JSON.stringify(args[i++]); + } catch (_) { + return '[Circular]'; + } + default: + return x; + } + }); + for (var x = args[i];i < len; x = args[++i]) { + str += ' ' + x; + } + return str; +} + +function extractSrcFromStacktrace(stack, level) { + var stackLines = stack.split('\n'); + if (stackLines[0] && stackLines[0].indexOf(CALL_STACK_ERROR) >= 0) { + stackLines.shift(); + } + var targetLine = stackLines[level]; + var lineInfo = null; + if (targetLine) { + var execResult = /^\s*(at|.*@)\s*(.+)?$/.exec(targetLine); + if (Array.isArray(execResult) && execResult[2]) { + lineInfo = execResult[2]; + } else { + lineInfo = targetLine; + } + } + return lineInfo; +} + +function _indent(s, indent) { + if (!indent) { + indent = ' '; + } + var lines = s.split(/\r?\n/g); + return indent + lines.join('\n' + indent); +} + +var _warned = {}; +function _warn(msg, dedupKey) { + if (dedupKey) { + if (_warned[dedupKey]) { + return; + } + _warned[dedupKey] = true; + } + console.error(msg + '\n'); +} + +function _haveWarned(dedupKey) { + return _warned[dedupKey]; +} + +function safeCycles() { + var seen = []; + return function (key, val) { + if (!val || typeof val !== 'object') { + return val; + } + if (seen.indexOf(val) !== -1) { + return '[Circular]'; + } + seen.push(val); + return val; + }; +} + +var TRACE$1 = 10; +var DEBUG$1 = 20; +var INFO$1 = 30; +var WARN$1 = 40; +var ERROR$1 = 50; +var FATAL$1 = 60; +var levelFromName$1 = { + 'trace': TRACE$1, + 'debug': DEBUG$1, + 'info': INFO$1, + 'warn': WARN$1, + 'error': ERROR$1, + 'fatal': FATAL$1 +}; +Object.keys(levelFromName$1).forEach(function (name) {}); +var ConsoleRawStream = function ConsoleRawStream() {}; +ConsoleRawStream.prototype.write = function write(rec) { + if (rec.level < INFO$1) { + console.log(rec); + } else if (rec.level < WARN$1) { + console.info(rec); + } else if (rec.level < ERROR$1) { + console.warn(rec); + } else { + console.error(rec); + } + if (rec.err && rec.err.stack) { + console.error(rec.err.stack); + } + if (rec.obj) { + console.log(rec.obj); + } +}; + +var LOG_VERSION = 1; +var Logger = function Logger(options, _childOptions, _childSimple) { + var this$1 = this; + + if (!(this instanceof Logger)) { + return new Logger(options, _childOptions); + } + var parent; + if (_childOptions !== undefined) { + parent = options; + options = _childOptions; + if (!(parent instanceof Logger)) { + throw new TypeError('invalid Logger creation: do not pass a second arg'); + } + } + if (!options) { + throw new TypeError('options (object) is required'); + } + if (!parent) { + if (!options.name) { + throw new TypeError('options.name (string) is required'); + } + } else { + if (options.name) { + throw new TypeError('invalid options.name: child cannot set logger name'); + } + } + if (options.stream && options.streams) { + throw new TypeError('cannot mix "streams" and "stream" options'); + } + if (options.streams && !Array.isArray(options.streams)) { + throw new TypeError('invalid options.streams: must be an array'); + } + if (options.serializers && (typeof options.serializers !== 'object' || Array.isArray(options.serializers))) { + throw new TypeError('invalid options.serializers: must be an object'); + } + var fields, name, i; + if (parent && _childSimple) { + this._level = parent._level; + this.streams = parent.streams; + this.serializers = parent.serializers; + this.src = parent.src; + fields = (this.fields = {}); + var parentFieldNames = Object.keys(parent.fields); + for (i = 0; i < parentFieldNames.length; i++) { + name = parentFieldNames[i]; + fields[name] = parent.fields[name]; + } + var names = Object.keys(options); + for (i = 0; i < names.length; i++) { + name = names[i]; + fields[name] = options[name]; + } + return; + } + if (parent) { + this._level = parent._level; + this.streams = []; + for (i = 0; i < parent.streams.length; i++) { + var s = objCopy(parent.streams[i]); + this$1.streams.push(s); + } + this.serializers = objCopy(parent.serializers); + this.src = parent.src; + this.fields = objCopy(parent.fields); + if (options.level) { + this.level(options.level); + } + } else { + this._level = Number.POSITIVE_INFINITY; + this.streams = []; + this.serializers = null; + this.src = false; + this.fields = {}; + } + if (options.stream) { + this.addStream({ + type: 'stream', + stream: options.stream, + level: options.level + }); + } else if (options.streams) { + options.streams.forEach(function (s) { + this$1.addStream(s, options.level); + }); + } else if (parent && options.level) { + this.level(options.level); + } else if (!parent) { + this.addStream({ + type: 'raw', + stream: new ConsoleRawStream(), + level: options.level + }); + } + if (options.serializers) { + this.addSerializers(options.serializers); + } + if (options.src) { + this.src = true; + } + fields = objCopy(options); + delete fields.stream; + delete fields.level; + delete fields.streams; + delete fields.serializers; + delete fields.src; + if (this.serializers) { + this._applySerializers(fields); + } + Object.keys(fields).forEach(function (k) { + this$1.fields[k] = fields[k]; + }); +}; +Logger.prototype.addStream = function addStream (s, defaultLevel) { + if ( defaultLevel === void 0 ) defaultLevel = INFO; + + s = objCopy(s); + s.type = 'raw'; + s.level = resolveLevel(s.level || defaultLevel); + if (s.level < this._level) { + this._level = s.level; + } + this.streams.push(s); + delete this.haveNonRawStreams; +}; +Logger.prototype.addSerializers = function addSerializers (serializers) { + var this$1 = this; + + if (!this.serializers) { + this.serializers = {}; + } + Object.keys(serializers).forEach(function (field) { + var serializer = serializers[field]; + if (typeof serializer !== 'function') { + throw new TypeError(format('invalid serializer for "%s" field: must be a function', field)); + } + this$1.serializers[field] = serializer; + }); +}; +Logger.prototype.child = function child (options, simple) { + return new this.constructor(this, options || {}, simple); +}; +Logger.prototype.level = function level (value) { + var this$1 = this; + + if (value === undefined) { + return this._level; + } + var newLevel = resolveLevel(value); + var len = this.streams.length; + for (var i = 0;i < len; i++) { + this$1.streams[i].level = newLevel; + } + this._level = newLevel; +}; +Logger.prototype.levels = function levels (name, value) { + var this$1 = this; + + if (name === undefined) { + return this.streams.map(function (s) { return s.level; }); + } + var stream; + if (typeof name === 'number') { + stream = this.streams[name]; + if (stream === undefined) { + throw new Error('invalid stream index: ' + name); + } + } else { + var len = this.streams.length; + for (var i = 0;i < len; i++) { + var s = this$1.streams[i]; + if (s.name === name) { + stream = s; + break; + } + } + if (!stream) { + throw new Error(format('no stream with name "%s"', name)); + } + } + if (value === undefined) { + return stream.level; + } else { + var newLevel = resolveLevel(value); + stream.level = newLevel; + if (newLevel < this._level) { + this._level = newLevel; + } + } +}; +Logger.prototype._applySerializers = function _applySerializers (fields, excludeFields) { + var this$1 = this; + + Object.keys(this.serializers).forEach(function (name) { + if (fields[name] === undefined || excludeFields && excludeFields[name]) { + return; + } + try { + fields[name] = this$1.serializers[name](fields[name]); + } catch (err) { + _warn(format('bunyan: ERROR: Exception thrown from the "%s" ' + 'Bunyan serializer. This should never happen. This is a bug' + 'in that serializer function.\n%s', name, err.stack || err)); + fields[name] = format('(Error in Bunyan log "%s" serializer broke field. See stderr for details.)', name); + } + }); +}; +Logger.prototype._emit = function _emit (rec, noemit) { + var this$1 = this; + + var i; + if (this.haveNonRawStreams === undefined) { + this.haveNonRawStreams = false; + for (i = 0; i < this.streams.length; i++) { + if (!this$1.streams[i].raw) { + this$1.haveNonRawStreams = true; + break; + } + } + } + var str; + if (noemit || this.haveNonRawStreams) { + try { + str = JSON.stringify(rec, safeCycles()) + '\n'; + } catch (e) { + var dedupKey = e.stack.split(/\n/g, 2).join('\n'); + _warn('bunyan: ERROR: Exception in ' + '`JSON.stringify(rec)`. You can install the ' + '"safe-json-stringify" module to have Bunyan fallback ' + 'to safer stringification. Record:\n' + _indent(format('%s\n%s', rec, e.stack)), dedupKey); + str = format('(Exception in JSON.stringify(rec): %j. See stderr for details.)\n', e.message); + } + } + if (noemit) { + return str; + } + var level = rec.level; + for (i = 0; i < this.streams.length; i++) { + var s = this$1.streams[i]; + if (s.level <= level) { + s.stream.write(rec); + } + } + return str; +}; +function mkLogEmitter(minLevel) { + return function () { + var log = this; + function mkRecord(args) { + var excludeFields; + if (args[0] instanceof Error) { + fields = { + err: log.serializers && log.serializers.err ? log.serializers.err(args[0]) : stdSerializers.err(args[0]) + }; + excludeFields = { + err: true + }; + if (args.length === 1) { + msgArgs = [fields.err.message]; + } else { + msgArgs = Array.prototype.slice.call(args, 1); + } + } else if (typeof args[0] !== 'object' && args[0] !== null || Array.isArray(args[0])) { + fields = null; + msgArgs = Array.prototype.slice.call(args); + } else { + fields = args[0]; + if (args.length === 1 && fields.err && fields.err instanceof Error) { + msgArgs = [fields.err.message]; + } else { + msgArgs = Array.prototype.slice.call(args, 1); + } + } + var rec = objCopy(log.fields); + rec.level = minLevel; + var recFields = fields ? objCopy(fields) : null; + if (recFields) { + if (log.serializers) { + log._applySerializers(recFields, excludeFields); + } + Object.keys(recFields).forEach(function (k) { + rec[k] = recFields[k]; + }); + } + rec.levelName = nameFromLevel[minLevel]; + rec.msg = msgArgs.length ? format.apply(log, msgArgs) : ''; + if (!rec.time) { + rec.time = new Date(); + } + if (log.src && !rec.src) { + try { + throw new Error(CALL_STACK_ERROR); + } catch (err) { + var src = extractSrcFromStacktrace(err.stack, 2); + if (!src && !_haveWarned('src')) { + _warn('Unable to determine src line info', 'src'); + } + rec.src = src || ''; + } + } + rec.v = LOG_VERSION; + return rec; + } + + var fields = null; + var msgArgs = arguments; + var rec = null; + if (arguments.length === 0) { + return this._level <= minLevel; + } else if (this._level > minLevel) {} else { + rec = mkRecord(msgArgs); + this._emit(rec); + } + }; +} + +Logger.prototype.trace = mkLogEmitter(TRACE); +Logger.prototype.debug = mkLogEmitter(DEBUG); +Logger.prototype.info = mkLogEmitter(INFO); +Logger.prototype.warn = mkLogEmitter(WARN); +Logger.prototype.error = mkLogEmitter(ERROR); +Logger.prototype.fatal = mkLogEmitter(FATAL); +function getFullErrorStack(ex) { + var ret = ex.stack || ex.toString(); + if (ex.cause && typeof ex.cause === 'function') { + var cex = ex.cause(); + if (cex) { + ret += '\nCaused by: ' + getFullErrorStack(cex); + } + } + return ret; +} + +var stdSerializers = { + err: function (err) { + if (!err || !err.stack) { + return err; + } + return { + message: err.message, + name: err.name, + stack: getFullErrorStack(err), + code: err.code, + signal: err.signal + }; + } +}; +function createLogger() { + var args = [], len = arguments.length; + while ( len-- ) args[ len ] = arguments[ len ]; + + return new (Function.prototype.bind.apply( Logger, [ null ].concat( args) )); +} + +var TRACE$2 = 10; +var DEBUG$2 = 20; +var INFO$2 = 30; +var WARN$2 = 40; +var ERROR$2 = 50; +var FATAL$2 = 60; +var levelFromName$2 = { + 'trace': TRACE$2, + 'debug': DEBUG$2, + 'info': INFO$2, + 'warn': WARN$2, + 'error': ERROR$2, + 'fatal': FATAL$2 +}; +var nameFromLevel$1 = {}; +Object.keys(levelFromName$2).forEach(function (name) { + nameFromLevel$1[levelFromName$2[name]] = name; +}); +var DEFAULT_CSS = { + levels: { + trace: 'color: DeepPink', + debug: 'color: GoldenRod', + info: 'color: DarkTurquoise', + warn: 'color: Purple', + error: 'color: Crimson', + fatal: 'color: Black' + }, + def: 'color: DimGray', + msg: 'color: SteelBlue', + src: 'color: DimGray; font-style: italic; font-size: 0.9em' +}; +var ConsoleFormattedStream = function ConsoleFormattedStream(ref) { + if (ref === void 0) + { ref = {}; } + var logByLevel = ref.logByLevel; + if (logByLevel === void 0) + { logByLevel = false; } + var css = ref.css; + if (css === void 0) + { css = DEFAULT_CSS; } + this.logByLevel = logByLevel; + this.css = css; +}; +ConsoleFormattedStream.prototype.write = function write(rec) { + var levelCss, consoleMethod; + var defaultCss = this.css.def; + var msgCss = this.css.msg; + var srcCss = this.css.src; + var loggerName = rec.childName ? rec.name + '/' + rec.childName : rec.name; + var levelName = nameFromLevel$1[rec.level]; + var formattedLevelName = (Array(6 - levelName.length).join(' ') + levelName).toUpperCase(); + if (this.logByLevel) { + if (rec.level === TRACE$2) { + levelName = 'debug'; + } else if (rec.level === FATAL$2) { + levelName = 'error'; + } + consoleMethod = typeof console[levelName] === 'function' ? console[levelName] : console.log; + } else { + consoleMethod = console.log; + } + if (rec.level < DEBUG$2) { + levelCss = this.css.levels.trace; + } else if (rec.level < INFO$2) { + levelCss = this.css.levels.debug; + } else if (rec.level < WARN$2) { + levelCss = this.css.levels.info; + } else if (rec.level < ERROR$2) { + levelCss = this.css.levels.warn; + } else if (rec.level < FATAL$2) { + levelCss = this.css.levels.error; + } else { + levelCss = this.css.levels.fatal; + } + var padZeros = function (number, len) { + return Array(len + 1 - (number + '').length).join('0') + number; + }; + var logArgs = []; + logArgs.push("[%s:%s:%s:%s] %c%s%c: %s: %c%s " + (rec.src ? '%c%s' : '')); + logArgs.push(padZeros(rec.time.getHours(), 2)); + logArgs.push(padZeros(rec.time.getMinutes(), 2)); + logArgs.push(padZeros(rec.time.getSeconds(), 2)); + logArgs.push(padZeros(rec.time.getMilliseconds(), 4)); + logArgs.push(levelCss); + logArgs.push(formattedLevelName); + logArgs.push(defaultCss); + logArgs.push(loggerName); + logArgs.push(msgCss); + logArgs.push(rec.msg); + if (rec.src) { + logArgs.push(srcCss); + logArgs.push(rec.src); + } + consoleMethod.apply(console, logArgs); + if (rec.err && rec.err.stack) { + consoleMethod.call(console, '%c%s,', levelCss, rec.err.stack); + } + if (rec.obj) { + consoleMethod.call(console, rec.obj); + } +}; +ConsoleFormattedStream.getDefaultCss = function getDefaultCss() { + return DEFAULT_CSS; +}; + + +//# sourceMappingURL=index.m.js.map + + +/***/ }), + +/***/ "./node_modules/core-js/library/fn/object/define-property.js": +/*!*******************************************************************!*\ + !*** ./node_modules/core-js/library/fn/object/define-property.js ***! + \*******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(/*! ../../modules/es6.object.define-property */ "./node_modules/core-js/library/modules/es6.object.define-property.js"); +var $Object = __webpack_require__(/*! ../../modules/_core */ "./node_modules/core-js/library/modules/_core.js").Object; +module.exports = function defineProperty(it, key, desc) { + return $Object.defineProperty(it, key, desc); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_a-function.js": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_a-function.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = function (it) { + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); + return it; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_an-object.js": +/*!************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_an-object.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/library/modules/_is-object.js"); +module.exports = function (it) { + if (!isObject(it)) throw TypeError(it + ' is not an object!'); + return it; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_core.js": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/library/modules/_core.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +var core = module.exports = { version: '2.5.7' }; +if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_ctx.js": +/*!******************************************************!*\ + !*** ./node_modules/core-js/library/modules/_ctx.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// optional / simple context binding +var aFunction = __webpack_require__(/*! ./_a-function */ "./node_modules/core-js/library/modules/_a-function.js"); +module.exports = function (fn, that, length) { + aFunction(fn); + if (that === undefined) return fn; + switch (length) { + case 1: return function (a) { + return fn.call(that, a); + }; + case 2: return function (a, b) { + return fn.call(that, a, b); + }; + case 3: return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); + }; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_descriptors.js": +/*!**************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_descriptors.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// Thank's IE8 for his funny defineProperty +module.exports = !__webpack_require__(/*! ./_fails */ "./node_modules/core-js/library/modules/_fails.js")(function () { + return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; +}); + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_dom-create.js": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_dom-create.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/library/modules/_is-object.js"); +var document = __webpack_require__(/*! ./_global */ "./node_modules/core-js/library/modules/_global.js").document; +// typeof document.createElement is 'object' in old IE +var is = isObject(document) && isObject(document.createElement); +module.exports = function (it) { + return is ? document.createElement(it) : {}; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_export.js": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/library/modules/_export.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/library/modules/_global.js"); +var core = __webpack_require__(/*! ./_core */ "./node_modules/core-js/library/modules/_core.js"); +var ctx = __webpack_require__(/*! ./_ctx */ "./node_modules/core-js/library/modules/_ctx.js"); +var hide = __webpack_require__(/*! ./_hide */ "./node_modules/core-js/library/modules/_hide.js"); +var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/library/modules/_has.js"); +var PROTOTYPE = 'prototype'; + +var $export = function (type, name, source) { + var IS_FORCED = type & $export.F; + var IS_GLOBAL = type & $export.G; + var IS_STATIC = type & $export.S; + var IS_PROTO = type & $export.P; + var IS_BIND = type & $export.B; + var IS_WRAP = type & $export.W; + var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); + var expProto = exports[PROTOTYPE]; + var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]; + var key, own, out; + if (IS_GLOBAL) source = name; + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + if (own && has(exports, key)) continue; + // export native or passed + out = own ? target[key] : source[key]; + // prevent global pollution for namespaces + exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] + // bind timers to global for call from export context + : IS_BIND && own ? ctx(out, global) + // wrap global constructors for prevent change them in library + : IS_WRAP && target[key] == out ? (function (C) { + var F = function (a, b, c) { + if (this instanceof C) { + switch (arguments.length) { + case 0: return new C(); + case 1: return new C(a); + case 2: return new C(a, b); + } return new C(a, b, c); + } return C.apply(this, arguments); + }; + F[PROTOTYPE] = C[PROTOTYPE]; + return F; + // make static versions for prototype methods + })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; + // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% + if (IS_PROTO) { + (exports.virtual || (exports.virtual = {}))[key] = out; + // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% + if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out); + } + } +}; +// type bitmap +$export.F = 1; // forced +$export.G = 2; // global +$export.S = 4; // static +$export.P = 8; // proto +$export.B = 16; // bind +$export.W = 32; // wrap +$export.U = 64; // safe +$export.R = 128; // real proto method for `library` +module.exports = $export; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_fails.js": +/*!********************************************************!*\ + !*** ./node_modules/core-js/library/modules/_fails.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = function (exec) { + try { + return !!exec(); + } catch (e) { + return true; + } +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_global.js": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/library/modules/_global.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 +var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self + // eslint-disable-next-line no-new-func + : Function('return this')(); +if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_has.js": +/*!******************************************************!*\ + !*** ./node_modules/core-js/library/modules/_has.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +var hasOwnProperty = {}.hasOwnProperty; +module.exports = function (it, key) { + return hasOwnProperty.call(it, key); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_hide.js": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/library/modules/_hide.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/library/modules/_object-dp.js"); +var createDesc = __webpack_require__(/*! ./_property-desc */ "./node_modules/core-js/library/modules/_property-desc.js"); +module.exports = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/library/modules/_descriptors.js") ? function (object, key, value) { + return dP.f(object, key, createDesc(1, value)); +} : function (object, key, value) { + object[key] = value; + return object; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_ie8-dom-define.js": +/*!*****************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_ie8-dom-define.js ***! + \*****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = !__webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/library/modules/_descriptors.js") && !__webpack_require__(/*! ./_fails */ "./node_modules/core-js/library/modules/_fails.js")(function () { + return Object.defineProperty(__webpack_require__(/*! ./_dom-create */ "./node_modules/core-js/library/modules/_dom-create.js")('div'), 'a', { get: function () { return 7; } }).a != 7; +}); + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_is-object.js": +/*!************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_is-object.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_object-dp.js": +/*!************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_object-dp.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/library/modules/_an-object.js"); +var IE8_DOM_DEFINE = __webpack_require__(/*! ./_ie8-dom-define */ "./node_modules/core-js/library/modules/_ie8-dom-define.js"); +var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "./node_modules/core-js/library/modules/_to-primitive.js"); +var dP = Object.defineProperty; + +exports.f = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/library/modules/_descriptors.js") ? Object.defineProperty : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (IE8_DOM_DEFINE) try { + return dP(O, P, Attributes); + } catch (e) { /* empty */ } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_property-desc.js": +/*!****************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_property-desc.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_to-primitive.js": +/*!***************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_to-primitive.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.1 ToPrimitive(input [, PreferredType]) +var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/library/modules/_is-object.js"); +// instead of the ES6 spec version, we didn't implement @@toPrimitive case +// and the second argument - flag - preferred type is a string +module.exports = function (it, S) { + if (!isObject(it)) return it; + var fn, val; + if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; + if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + throw TypeError("Can't convert object to primitive value"); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/es6.object.define-property.js": +/*!****************************************************************************!*\ + !*** ./node_modules/core-js/library/modules/es6.object.define-property.js ***! + \****************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/library/modules/_export.js"); +// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) +$export($export.S + $export.F * !__webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/library/modules/_descriptors.js"), 'Object', { defineProperty: __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/library/modules/_object-dp.js").f }); + + +/***/ }), + +/***/ "./src/js/env/browser.js": +/*!*******************************!*\ + !*** ./src/js/env/browser.js ***! + \*******************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = { + getRed5ProSDK: function getRed5ProSDK() { + return window.red5prosdk; + } +}; + +/***/ }), + +/***/ "./src/js/index.js": +/*!*************************!*\ + !*** ./src/js/index.js ***! + \*************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.decorate = exports.getLogger = exports.LOG_LEVELS = exports.setLogLevel = undefined; + +var _log = __webpack_require__(/*! ./log */ "./src/js/log/index.js"); + +var _browser = __webpack_require__(/*! ./env/browser */ "./src/js/env/browser.js"); + +var _browser2 = _interopRequireDefault(_browser); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +(0, _log.establishLogger)('' + "debug" || _log.LEVELS.DEBUG); // eslint-disable-line no-undef + +/** + * Sets the log level for logs from the SDK + * @param {string} level + * The specified log level. + * @see LOG_LEVELS + */ +/** + * Main entry of Stream Manager Extension for Red5 Pro HTML SDK, accessible on the `window` global at `red5prosdk_ext_stream_manager`. + * + * @file red5pro-ext-stream-manager.min.js + * @module red5prosdk_ext_stream_manager + * + * + */ + +// SDK_VERSION, LOG_LEVEL injected from webpack build. +var setLogLevel = exports.setLogLevel = function setLogLevel(level) { + if (_log.LEVELS.hasOwnProperty(level.toUpperCase())) { + (0, _log.establishLogger)(level); + if (console) { + console.log('Red5 Pro Stream Manager Extension ' + "1.0.0"); // eslint-disable-line no-undef,no-console + } + } +}; + +/** + * The enumerated log level Strings. + * * `TRACE` + * * `INFO` + * * `DEBUG` + * * `WARN` + * * `ERROR` + * * `FATAL` + */ +var LOG_LEVELS = exports.LOG_LEVELS = _log.LEVELS; +/** + * Retrieves the Logger instance used by the SDK. + * + * @returns {Logger} + * The logger. + */ +var getLogger = exports.getLogger = _log.getLogger; + +var decorate = exports.decorate = function decorate() { + var red5prosdk = _browser2.default.getRed5ProSDK(); + if (red5prosdk) { + getLogger().debug('Will Decorate U+1F987'); + } else { + getLogger().warn('Could not decorate the red5prosdk global. It does not exist.'); + } +}; + +/***/ }), + +/***/ "./src/js/log/bunyan-writer.js": +/*!*************************************!*\ + !*** ./src/js/log/bunyan-writer.js ***! + \*************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.RawStream = undefined; + +var _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ "./node_modules/babel-runtime/helpers/classCallCheck.js"); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(/*! babel-runtime/helpers/createClass */ "./node_modules/babel-runtime/helpers/createClass.js"); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _browserBunyan = __webpack_require__(/*! browser-bunyan */ "./node_modules/browser-bunyan/lib/index.m.js"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Custom logger for bunyon. + * + * @private + */ +var RawStream = exports.RawStream = function () { + function RawStream() { + (0, _classCallCheck3.default)(this, RawStream); + } + + (0, _createClass3.default)(RawStream, [{ + key: 'write', + value: function write(rec) { + console.log('%s - [%s] %s: %s', // eslint-disable-line no-console + rec.time.toISOString(), rec.name, _browserBunyan.nameFromLevel[rec.level], rec.msg); + } + }]); + return RawStream; +}(); + +/***/ }), + +/***/ "./src/js/log/index.js": +/*!*****************************!*\ + !*** ./src/js/log/index.js ***! + \*****************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.fatal = exports.error = exports.warn = exports.debug = exports.info = exports.trace = exports.getLogger = exports.establishLogger = exports.LEVELS = undefined; + +var _browserBunyan = __webpack_require__(/*! browser-bunyan */ "./node_modules/browser-bunyan/lib/index.m.js"); + +var _bunyanWriter = __webpack_require__(/*! ./bunyan-writer */ "./src/js/log/bunyan-writer.js"); + +var logger = void 0; + +var formatMessage = function formatMessage(dispatcher) { + return function (message) { + return '(' + dispatcher + ') ' + message; + }; +}; + +var decorate = function decorate(level) { + return function (source, message) { + logger[level](formatMessage(source)(message)); + }; +}; + +/* + * The log levels supported. + */ +var LEVELS = exports.LEVELS = { + TRACE: 'trace', + INFO: 'info', + DEBUG: 'debug', + WARN: 'warn', + ERROR: 'error', + FATAL: 'fatal' + + /** + * Establish logger to use at level. + * + * @param {String} level + * The level type from `LEVELS`. + * @param {Array} streamList + * The streamList to use in creating bunyon-based logger. + * + * @private + */ +};var establishLogger = exports.establishLogger = function establishLogger(level) { + var streamList = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; + + var streams = []; + streams.push({ + level: level, + stream: new _bunyanWriter.RawStream(), + type: 'raw' + }); + if (streamList) { + var list = streamList.map(function (item) { + item.level = level; + }); + streams = streams.concat(list); + } + logger = (0, _browserBunyan.createLogger)({ + level: level, + name: 'red5pro-ext-sm', + streams: streams + }); +}; + +/** + * Return the determined logger instance. + * + * @return {Object} + * + * @private + */ +var getLogger = exports.getLogger = function getLogger() { + return logger; +}; + +/* Quick access to logger level types. */ +var trace = exports.trace = decorate(LEVELS.TRACE); +var info = exports.info = decorate(LEVELS.INFO); +var debug = exports.debug = decorate(LEVELS.DEBUG); +var warn = exports.warn = decorate(LEVELS.WARN); +var error = exports.error = decorate(LEVELS.ERROR); +var fatal = exports.fatal = decorate(LEVELS.FATAL); + +/***/ }), + +/***/ 0: +/*!*******************************!*\ + !*** multi ./src/js/index.js ***! + \*******************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(/*! /Users/toddanderson/Documents/Workplace/red5pro/red5pro-extension-stream-manager/src/js/index.js */"./src/js/index.js"); + + +/***/ }) + +/******/ }); +}); +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9yZWQ1cHJvc2RrX2V4dF9zdHJlYW1fbWFuYWdlci93ZWJwYWNrL3VuaXZlcnNhbE1vZHVsZURlZmluaXRpb24iLCJ3ZWJwYWNrOi8vcmVkNXByb3Nka19leHRfc3RyZWFtX21hbmFnZXIvd2VicGFjay9ib290c3RyYXAiLCJ3ZWJwYWNrOi8vcmVkNXByb3Nka19leHRfc3RyZWFtX21hbmFnZXIvLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL29iamVjdC9kZWZpbmUtcHJvcGVydHkuanMiLCJ3ZWJwYWNrOi8vcmVkNXByb3Nka19leHRfc3RyZWFtX21hbmFnZXIvLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9oZWxwZXJzL2NsYXNzQ2FsbENoZWNrLmpzIiwid2VicGFjazovL3JlZDVwcm9zZGtfZXh0X3N0cmVhbV9tYW5hZ2VyLy4vbm9kZV9tb2R1bGVzL2JhYmVsLXJ1bnRpbWUvaGVscGVycy9jcmVhdGVDbGFzcy5qcyIsIndlYnBhY2s6Ly9yZWQ1cHJvc2RrX2V4dF9zdHJlYW1fbWFuYWdlci8uL25vZGVfbW9kdWxlcy9icm93c2VyLWJ1bnlhbi9saWIvaW5kZXgubS5qcyIsIndlYnBhY2s6Ly9yZWQ1cHJvc2RrX2V4dF9zdHJlYW1fbWFuYWdlci8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvZm4vb2JqZWN0L2RlZmluZS1wcm9wZXJ0eS5qcyIsIndlYnBhY2s6Ly9yZWQ1cHJvc2RrX2V4dF9zdHJlYW1fbWFuYWdlci8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkv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cbiAgICAgICAgfVxuICAgICAgICBzd2l0Y2ggKHgpIHtcbiAgICAgICAgICAgIGNhc2UgJyVzJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gU3RyaW5nKGFyZ3NbaSsrXSk7XG4gICAgICAgICAgICBjYXNlICclZCc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIE51bWJlcihhcmdzW2krK10pO1xuICAgICAgICAgICAgY2FzZSAnJWonOlxuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeShhcmdzW2krK10pO1xuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKF8pIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbQ2lyY3VsYXJdJztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgIHJldHVybiB4O1xuICAgICAgICB9XG4gICAgfSk7XG4gICAgZm9yICh2YXIgeCA9IGFyZ3NbaV07aSA8IGxlbjsgeCA9IGFyZ3NbKytpXSkge1xuICAgICAgICBzdHIgKz0gJyAnICsgeDtcbiAgICB9XG4gICAgcmV0dXJuIHN0cjtcbn1cblxuZnVuY3Rpb24gZXh0cmFjdFNyY0Zyb21TdGFja3RyYWNlKHN0YWNrLCBsZXZlbCkge1xuICAgIHZhciBzdGFja0xpbmVzID0gc3RhY2suc3BsaXQoJ1xcbicpO1xuICAgIGlmIChzdGFja0xpbmVzWzBdICYmIHN0YWNrTGluZXNbMF0uaW5kZXhPZihDQUxMX1NUQUNLX0VSUk9SKSA+PSAwKSB7XG4gICAgICAgIHN0YWNrTGluZXMuc2hpZnQoKTtcbiAgICB9XG4gICAgdmFyIHRhcmdldExpbmUgPSBzdGFja0xpbmVzW2xldmVsXTtcbiAgICB2YXIgbGluZUluZm8gPSBudWxsO1xuICAgIGlmICh0YXJnZXRMaW5lKSB7XG4gICAgICAgIHZhciBleGVjUmVzdWx0ID0gL15cXHMqKGF0fC4qQClcXHMqKC4rKT8kLy5leGVjKHRhcmdldExpbmUpO1xuICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShleGVjUmVzdWx0KSAmJiBleGVjUmVzdWx0WzJdKSB7XG4gICAgICAgICAgICBsaW5lSW5mbyA9IGV4ZWNSZXN1bHRbMl07XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBsaW5lSW5mbyA9IHRhcmdldExpbmU7XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIGxpbmVJbmZvO1xufVxuXG5mdW5jdGlvbiBfaW5kZW50KHMsIGluZGVudCkge1xuICAgIGlmICghaW5kZW50KSB7XG4gICAgICAgIGluZGVudCA9ICcgICAgJztcbiAgICB9XG4gICAgdmFyIGxpbmVzID0gcy5zcGxpdCgvXFxyP1xcbi9nKTtcbiAgICByZXR1cm4gaW5kZW50ICsgbGluZXMuam9pbignXFxuJyArIGluZGVudCk7XG59XG5cbnZhciBfd2FybmVkID0ge307XG5mdW5jdGlvbiBfd2Fybihtc2csIGRlZHVwS2V5KSB7XG4gICAgaWYgKGRlZHVwS2V5KSB7XG4gICAgICAgIGlmIChfd2FybmVkW2RlZHVwS2V5XSkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIF93YXJuZWRbZGVkdXBLZXldID0gdHJ1ZTtcbiAgICB9XG4gICAgY29uc29sZS5lcnJvcihtc2cgKyAnXFxuJyk7XG59XG5cbmZ1bmN0aW9uIF9oYXZlV2FybmVkKGRlZHVwS2V5KSB7XG4gICAgcmV0dXJuIF93YXJuZWRbZGVkdXBLZXldO1xufVxuXG5mdW5jdGlvbiBzYWZlQ3ljbGVzKCkge1xuICAgIHZhciBzZWVuID0gW107XG4gICAgcmV0dXJuIGZ1bmN0aW9uIChrZXksIHZhbCkge1xuICAgICAgICBpZiAoIXZhbCB8fCB0eXBlb2YgdmFsICE9PSAnb2JqZWN0Jykge1xuICAgICAgICAgICAgcmV0dXJu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WVsZHMgPSBvYmpDb3B5KHBhcmVudC5maWVsZHMpO1xuICAgICAgICBpZiAob3B0aW9ucy5sZXZlbCkge1xuICAgICAgICAgICAgdGhpcy5sZXZlbChvcHRpb25zLmxldmVsKTtcbiAgICAgICAgfVxuICAgIH0gZWxzZSB7XG4gICAgICAgIHRoaXMuX2xldmVsID0gTnVtYmVyLlBPU0lUSVZFX0lORklOSVRZO1xuICAgICAgICB0aGlzLnN0cmVhbXMgPSBbXTtcbiAgICAgICAgdGhpcy5zZXJpYWxpemVycyA9IG51bGw7XG4gICAgICAgIHRoaXMuc3JjID0gZmFsc2U7XG4gICAgICAgIHRoaXMuZmllbGRzID0ge307XG4gICAgfVxuICAgIGlmIChvcHRpb25zLnN0cmVhbSkge1xuICAgICAgICB0aGlzLmFkZFN0cmVhbSh7XG4gICAgICAgICAgICB0eXBlOiAnc3RyZWFtJyxcbiAgICAgICAgICAgIHN0cmVhbTogb3B0aW9ucy5zdHJlYW0sXG4gICAgICAgICAgICBsZXZlbDogb3B0aW9ucy5sZXZlbFxuICAgICAgICB9KTtcbiAgICB9IGVsc2UgaWYgKG9wdGlvbnMuc3RyZWFtcykge1xuICAgICAgICBvcHRpb25zLnN0cmVhbXMuZm9yRWFjaChmdW5jdGlvbiAocykge1xuICAgICAgICAgICAgdGhpcyQxLmFkZFN0cmVhbShzLCBvcHRpb25zLmxldmVsKTtcbiAgICAgICAgfSk7XG4gICAgfSBlbHNlIGlmIChwYXJlbnQgJiYgb3B0aW9ucy5sZXZlbCkge1xuICAgICAgICB0aGlzLmxldmVsKG9wdGlvbnMubGV2ZWwpO1xuICAgIH0gZWxzZSBpZiAoIXBhcmVudCkge1xuICAgICAgICB0aGlzLmFkZFN0cmVhbSh7XG4gICAgICAgICAgICB0eXBlOiAncmF3JyxcbiAgICAgICAgICAgIHN0cmVhbTogbmV3IENvbnNvbGVSYXdTdHJlYW0oKSxcbiAgICAgICAgICAgIGxldmVsOiBvcHRpb25zLmxldmVsXG4gICAgICAg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B7XG4gICAgICAgIHZhciBsb2cgPSB0aGlzO1xuICAgICAgICBmdW5jdGlvbiBta1JlY29yZChhcmdzKSB7XG4gICAgICAgICAgICB2YXIgZXhjbHVkZUZpZWxkcztcbiAgICAgICAgICAgIGlmIChhcmdzWzBdIGluc3RhbmNlb2YgRXJyb3IpIHtcbiAgICAgICAgICAgICAgICBmaWVsZHMgPSB7XG4gICAgICAgICAgICAgICAgICAgIGVycjogbG9nLnNlcmlhbGl6ZXJzICYmIGxvZy5zZXJpYWxpemVycy5lcnIgPyBsb2cuc2VyaWFsaXplcnMuZXJyKGFyZ3NbMF0pIDogc3RkU2VyaWFsaXplcnMuZXJyKGFyZ3NbMF0pXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICBleGNsdWRlRmllbGRzID0ge1xuICAgICAgICAgICAgICAgICAgICBlcnI6IHRydWVcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIGlmIChhcmdzLmxlbmd0aCA9PT0gMSkge1xuICAgICAgICAgICAgICAgICAgICBtc2dBcmdzID0gW2ZpZWxkcy5lcnIubWVzc2FnZV07XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgbXNnQXJncyA9IEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKGFyZ3MsIDEpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIGFyZ3NbMF0gIT09ICdvYmplY3QnICYmIGFyZ3NbMF0gIT09IG51bGwgfHwgQXJyYXkuaXNBcnJheShhcmdzWzBdKSkge1xuICAgICAgICAgICAgICAgIGZpZWxkcyA9IG51bGw7XG4gICAgICAgICAgICAgICAgbXNnQXJncyA9IEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKGFyZ3MpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBmaWVsZHMgPSBhcmdzWzBdO1xuICAgICAgICAgICAgICAgIGlmIChhcmdzLmxlbmd0aCA9PT0gMSAmJiBmaWVsZHMuZXJyICYmIGZpZWxkcy5lcnIgaW5zdGFuY2VvZiBFcnJvcikge1xuICAgICAgICAgICAgICAgICAgICBtc2dBcmdzID0gW2ZpZWxkcy5lcnIubWVzc2FnZV07XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgbXNnQXJncyA9IEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKGFyZ3MsIDEpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciByZWMgPSBvYmpDb3B5KGxvZy5maWVsZHMpO1xuICAgICAgICAgICAgcmVjLmxldmVsID0gbWluTGV2ZWw7XG4gICAgICAgICAgICB2YXIgcmVjRmllbGRzID0gZmllbGRzID8gb2JqQ29weShmaWVsZHMpIDogbnVsbDtcbiAgICAgICAgICAgIGlmIChyZWNGaWVsZHMpIHtcbiAgICAgICAgICAgICAgICBpZiAobG9nLnNlcmlhbGl6ZXJzKSB7XG4gICAgICAgICAgICAgICAgICAgIGxvZy5fYXBwbHlTZXJpYWxpemVycyhyZWNGaWVsZHMsIGV4Y2x1ZGVGaWVsZHMpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBPYmplY3Qua2V5cyhyZWNGaWVsZHMpLmZvckVhY2goZnVuY3Rpb24gKGspIHtcbiAgICAgICAgICAgICAgICAgICAgcmVjW2tdID0gcmVjRmllbGRzW2tdO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVjLmxldmVsTmFtZSA9IG5hbWVGcm9tTGV2ZWxbbWluTGV2ZWxdO1xuICAgICAgICAgICAgcmVjLm1zZyA9IG1zZ0FyZ3MubGVuZ3RoID8gZm9ybWF0LmFwcGx5KGxvZywgbXNnQXJncykgOiAnJztcbiAgICAgICAgICAgIGlmICghcmVjLnRpbWUpIHtcbiAgICAgICAgICAgICAgICByZWMudGltZSA9IG5ldyBEYXRlKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAobG9nLnNyYyAmJiAhcmVjLnNyYykge1xuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihDQUxMX1NUQUNLX0VSUk9SKTtcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHNyYyA9IGV4dHJhY3RTcmNGcm9tU3RhY2t0cmFjZShlcnIuc3RhY2ssIDIpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIXNyYyAmJiAhX2hhdmVXYXJuZWQoJ3NyYycpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBfd2FybignVW5hYmxlIHRvIGRldGVybWluZSBzcmMgbGluZSBpbmZvJywgJ3NyYycpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJlYy5zcmMgPSBzcmMgfHwgJyc7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVjLnYgPSBMT0dfVkVSU0lPTjtcbiAgICAgICAgICAgIHJldHVybiByZWM7XG4gICAgICAgIH1cbiAgICAgICAgXG4gICAgICAgIHZhciBmaWVsZHMgPSBudWxsO1xuICAgICAgICB2YXIgbXNnQXJncyA9IGFyZ3VtZW50cztcbiAgICAgICAgdmFyIHJlYyA9IG51bGw7XG4gICAgICAgIGlmIChhcmd1bWVudHMubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5fbGV2ZWwgPD0gbWluTGV2ZWw7XG4gICAgICAgIH0gZWxzZSBpZiAodGhpcy5fbGV2ZWwgPiBtaW5MZXZlbCkge30gZWxzZSB7XG4gICAgICAgICAgICByZWMgPSBta1JlY29yZChtc2dBcmdzKTtcbiAgICAgICAgICAgIHRoaXMuX2VtaX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BVEFMKVxuIl0sInNvdXJjZVJvb3QiOiIifQ== \ No newline at end of file diff --git a/examples/browser/lib/red5pro/red5pro-media.css b/examples/browser/lib/red5pro/red5pro-media.css new file mode 100644 index 0000000..fdcdab6 --- /dev/null +++ b/examples/browser/lib/red5pro/red5pro-media.css @@ -0,0 +1,170 @@ +.red5pro-media-container { + display: block; + box-sizing: border-box; + position: relative; + height: 100%; + line-height: 0px; +} + +.red5pro-media { + width: 100%; +} + +.red5pro-media-background { + background-color: #000; +} + +.red5pro-media-container-full-screen { + width: 100% !important; + height: 100% !important; + overflow: hidden !important; +} + +.red5pro-media-control-bar { + font-family: sans-serif; + opacity: 0; + display: flex; + align-items: center; + flex-direction: row; + flex-align: center; + display: -ms-flexbox; + -ms-flex-direction: row; + -ms-flex-align: center; + -ms-flex-pack: justify; + position: absolute; + bottom: 0; + left: 0; + right: 0; + height: 1.5em; + padding: 0.5em; + background-color: rgba(255, 255, 255, 0.9); + color: #595959; + -webkit-transition: opacity 0.5s ease-in-out; + -moz-transition: opacity 0.5s ease-in-out; + -ms-transition: opacity 0.5s ease-in-out; + -o-transition: opacity 0.5s ease-in-out; + transition: opacity 0.5s ease-in-out; +} + +input[type=range][orient=vertical] { + writing-mode: bt-lr; /* IE */ + -webkit-appearance: slider-vertical; /* WebKit */ + width: 8px; + height: 175px; + padding: 0 5px; +} + +.red5pro-media-control-bar-show { + opacity: 1; +} + +.red5pro-media-control-element { + margin: 0 0.5em; + cursor: pointer; +} +.red5pro-media-time-field { + font-size: 0.8em; + line-height: 1em; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -o-user-select: none; + user-select: none; +} + +.red5pro-media-slider { + -webkit-appearance: none !important; /*Needed to reset default slider styles */ + transition: all 0.3s ease; + margin-top: 0.8em; + cursor: pointer; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -o-user-select: none; + user-select: none; +} + +.red5pro-media-slider-track { + background-color: #595959; + height: 0.2em; + position: relative; + display: block; + top: 0.1em +} + +.red5pro-media-slider-progress { + background-color: #4286F4; + height: 0.2em; + position: relative; + display: block; + top: -0.1em; +} + +.red5pro-media-slider-button { + width: 1em; + height: 1em; + max-width: 24px; + max-height: 24px; + top: -0.7em; + position: relative; + display: block; + border-radius: 20px; + background-color: #4286F4; +} + +.red5pro-media-slider-disabled { + background-color: #bbb; + cursor: arrow; +} + +.red5pro-media-volume-slider { + width: 110px; +} + +.red5pro-media-seektime-slider { + flex-grow: 1; + -ms-flex-grow: 1; + -ms-flex-positive: 1; +} + +.red5pro-media-element-button { + width: 24px; + height: 24px; + display: inline-block; + background-size: 100% 100%; + background-position: 50% 50%; + background-color: transparent; + background-repeat: no-repeat; + border: none; + cursor: pointer; +} + +.red5pro-media-element-button-disabled { + cursor: arrow; + opacity: 0.5; +} + +.red5pro-media-play-button { + background-image: url(icons/play.png); +} + +.red5pro-media-pause-button { + background-image: url(icons/pause.png); +} + +.red5pro-media-unmute-button { + background-image: url(icons/volume-2.png); +} + +.red5pro-media-mute-button { + background-image: url(icons/volume-x.png); +} + +.red5pro-media-fullscreen-button { + background-image: url(icons/maximize.png); +} + +.red5pro-media-exit-fullscreen-button { + background-image: url(icons/minimize.png); +} + diff --git a/examples/browser/lib/red5pro/red5pro-publisher.swf b/examples/browser/lib/red5pro/red5pro-publisher.swf new file mode 100644 index 0000000000000000000000000000000000000000..c86a675c376c148a5f4f1e4689dba0c54ea3eba5 GIT binary patch literal 8672 zcmV<6As^mDS5pskIsgE8+Le0=TpP#r|Ge4NjwCP$Fxc_A*!aS0z(;(L*fHj?A%JW! zuHyuoMcTDw3yDa=HaQx{iIX&EleS6kI_cf?Nbf6c(=8Rb<)6%A& z8cHNHjab{hDwfR-H`dpmJbAM2YBVx6=aBz|WF@ni`t^0|aiD0V z(N3j@%XVIU6V{F%D|)fMH=WY= z?CtBL_8C-(mUFdcG^ti7*cMU zPg0SzWoA>eW%68-NSMi^Bj!%>3H&J zvD}$D>jc@)*GjLFZY$fHHM1ibS)Job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^w5Fx^-OfGgMU0;%p z9nF8NNIABZFCTO4fqeP6W1IQ%kYh*kBseLF;7 zA#(Y;_w{C@!Zj`E4BWzV;afRzHu+S|zwP|}#>4PR3UtRl)Yh+@E_HXEk~i}>m7JX$ z!zmmO$w=f-DsIbDiD zJ{G>6QAbk__NYbF#6 z;W)46E{ypW$70BDna+1wIfir*A%!`FIadN%Z5p~pS02gYm;#~O9FsT7@z`-^P{p(; zpAuoiz+C%YM4#;RH2E8*Bf z`51EWHiIGbkC`#~8tGK+`ChADw%4;Wdvy>{R*?t)6I0gLa(S`FEFzpH`(5r2__RBe zyt`nkg9Xho{*AJ)%Eo{B!}%Lh@_zT;e>KCP&Dr=u$*mmY zMLwuf@6e+d(4MOQ;l`w=@M+}$b2X)D2UX)gFn1NXo&5$*zc+H@MrB~DeG?dGltIn7 zN$ErR@S8Y<_R-g)h(OEQZ{}wr{?NsgQ~C$R5>)tJYN(_;(gwdMdji45?-#B` zF}p*vg%UVkAY|iZYLJfmh(P5Ah4C7m4_B$^_F~9nfk1x%Fjxw zUo3p@~G2lAFpJ zjoTEN=w4_eTsz$i#;cSZnrRHPB*<^gglm{_&z-spGV?IbqxHW`V*UW1k(fWgXC~%Y zpPiTwj5w5Mzl9?fzJ^n*?0u;;8)asv*~r=%MuRxU?Mj|8JIzKGPCS)n@0&`q?@)5H yp>3&{8|I%9c-wEme3H~4GCKBnbw--SG literal 0 HcmV?d00001 diff --git a/examples/browser/lib/red5pro/red5pro-sdk.js b/examples/browser/lib/red5pro/red5pro-sdk.js new file mode 100644 index 0000000..cc8605b --- /dev/null +++ b/examples/browser/lib/red5pro/red5pro-sdk.js @@ -0,0 +1,17170 @@ +/*! + * + * red5pro-sdk - Red5 Pro HTML Publisher and Subscriber SDK. + * Author: Infrared5 Inc. + * Version: 4.6.0-RC8 + * Url: https://github.com/red5pro/red5pro-html-sdk#readme + * + */ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["red5prosdk"] = factory(); + else + root["red5prosdk"] = factory(); +})(this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // identity function for calling harmony imports with the correct context +/******/ __webpack_require__.i = function(value) { return value; }; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 208); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +exports.default = function (instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +}; + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _defineProperty = __webpack_require__(90); + +var _defineProperty2 = _interopRequireDefault(_defineProperty); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + (0, _defineProperty2.default)(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; +}(); + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.fatal = exports.error = exports.warn = exports.debug = exports.info = exports.trace = exports.getLogger = exports.establishLogger = exports.LEVELS = undefined; + +var _browserBunyan = __webpack_require__(95); + +var _bunyanWriter = __webpack_require__(118); + +var logger = void 0; + +var formatMessage = function formatMessage(dispatcher) { + return function (message) { + return '(' + dispatcher + ') ' + message; + }; +}; + +var decorate = function decorate(level) { + return function (source, message) { + logger[level](formatMessage(source)(message)); + }; +}; + +/* + * The log levels supported. + */ +var LEVELS = exports.LEVELS = { + TRACE: 'trace', + INFO: 'info', + DEBUG: 'debug', + WARN: 'warn', + ERROR: 'error', + FATAL: 'fatal' + + /** + * Establish logger to use at level. + * + * @param {String} level + * The level type from `LEVELS`. + * @param {Array} streamList + * The streamList to use in creating bunyon-based logger. + * + * @private + */ +};var establishLogger = exports.establishLogger = function establishLogger(level) { + var streamList = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; + + var streams = []; + streams.push({ + level: level, + stream: new _bunyanWriter.RawStream(), + type: 'raw' + }); + if (streamList) { + var list = streamList.map(function (item) { + item.level = level; + }); + streams = streams.concat(list); + } + logger = (0, _browserBunyan.createLogger)({ + level: level, + name: 'red5pro-sdk', + streams: streams + }); +}; + +/** + * Return the determined logger instance. + * + * @return {Object} + * + * @private + */ +var getLogger = exports.getLogger = function getLogger() { + return logger; +}; + +/* Quick access to logger level types. */ +var trace = exports.trace = decorate(LEVELS.TRACE); +var info = exports.info = decorate(LEVELS.INFO); +var debug = exports.debug = decorate(LEVELS.DEBUG); +var warn = exports.warn = decorate(LEVELS.WARN); +var error = exports.error = decorate(LEVELS.ERROR); +var fatal = exports.fatal = decorate(LEVELS.FATAL); + +/***/ }), +/* 3 */ +/***/ (function(module, exports) { + +var core = module.exports = {version: '2.4.0'}; +if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef + +/***/ }), +/* 4 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _typeof2 = __webpack_require__(59); + +var _typeof3 = _interopRequireDefault(_typeof2); + +var _promise = __webpack_require__(5); + +var _errors = __webpack_require__(113); + +var _metadataUtil = __webpack_require__(112); + +var _log = __webpack_require__(2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var rtmpSubscriberAssignments = []; + +/* Properties and methods related to interaction with the screenfull.js library. */ +var fullscreenHandlers = []; +var screenfullHandlerAssigned = false; +function enableScreenfullHandler() { + if (!screenfullHandlerAssigned && window.screenfull && window.screenfull.enabled) { + screenfullHandlerAssigned = true; + window.screenfull.onchange(function () { + var i = void 0, + length = fullscreenHandlers.length; + for (i = 0; i < length; i++) { + fullscreenHandlers[i](window.screenfull.isFullscreen); + } + }); + } +} + +/* Properies and methods related to window close operation. */ +var closeHandlers = []; +function onwindowclose(e) { + // eslint-disable-line no-unused-vars + // closeHandlers.forEach(h => h()) + var i = void 0, + length = closeHandlers.length; + for (i = 0; i < length; i++) { + closeHandlers[i](); + } + // Returning a string value forces a leaving confirmation popup on the browser. + // e.returnValue = 'goodbye' + // return 'goodbye' +} + +/* Check to see what the current flash version is, if plugin is enabled. */ +// https://github.com/videojs/video.js/blob/master/src/js/tech/flash.js#L476 +var flashVersion = function flashVersion() { + var version = '0,0,0'; + // IE + try { + version = new window.ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version').replace(/\D+/g, ',').match(/^,?(.+),?$/)[1]; + + // other browsers + } catch (e) { + try { + if (navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin) { + version = (navigator.plugins['Shockwave Flash 2.0'] || navigator.plugins['Shockwave Flash']).description.replace(/\D+/g, ',').match(/^,?(.+),?$/)[1]; + } + } catch (err) { + // nada + } + } + return version.split(','); +}; + +/* Shim for `requestAnimationFrame` of browser. */ +var requestFrame = function (time) { + return window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame || function (fn) { + return window.setTimeout(fn, time); + }; +}(1000); + +/* Browser test to see if Mozilla-based. */ +var isMoz = !!navigator.mozGetUserMedia; + +/* Determine if current browser has touch capabilities. */ +var _isTouchEnabled = 'ontouchstart' in window || window.DocumentTouch && window.document instanceof window.DocumentTouch; + +// If developer has not used adapter.js. +if (!window.adapter) { + navigator.getUserMedia = navigator.mediaDevices && navigator.mediaDevices.getUserMedia || navigator.getUserMedia || navigator.mozGetUserMedia || navigator.webkitGetUserMedia || navigator.msGetUserMedia; +} + +/* Proxy to browser-based, specific functions. */ +exports.default = { + + requestFrame: requestFrame, + + getIsMoz: function getIsMoz() { + return isMoz; + }, + + isTouchEnabled: function isTouchEnabled() { + return _isTouchEnabled; + }, + + supportsWebSocket: function supportsWebSocket() { + return !!window.WebSocket; + }, + + supportsHLS: function supportsHLS() { + var el = document.createElement('video'); + return el.canPlayType('application/vnd.apple.mpegURL').length > 0 || el.canPlayType('application/x-mpegURL').length > 0 || el.canPlayType('audio/mpegurl').length > 0 || el.canPlayType('audio/x-mpegurl').length > 0; + }, + + supportsFlashVersion: function supportsFlashVersion(version) { + var delimiter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '.'; + + return flashVersion()[0] >= version.split(delimiter)[0]; + }, + + resolveElement: function resolveElement(id) { + try { + var el = document.getElementById(id); + if (!el) { + throw new _errors.NoElementFoundError('Element with id(' + id + ') could not be found.'); + } + return el; + } catch (e) { + throw new _errors.NoElementFoundError('Error in accessing element with id(' + id + '). ' + e.message); + } + }, + + createWebSocket: function createWebSocket(url) { + return new WebSocket(url); + }, + + setVideoSource: function setVideoSource(videoElement, mediaStream) { + var autoplay = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + + videoElement.onloadedmetadata = function () { + (0, _log.debug)('[videoelement:event]', 'loadedmetadata'); + (0, _log.debug)('[video:constraints]', 'Video actual dimensions are: ' + videoElement.videoWidth + ', ' + videoElement.videoHeight); + }; + if ('srcObject' in videoElement) { + videoElement.srcObject = mediaStream; + } else if (isMoz) { + videoElement['mozSrcObject'] = mediaStream; + } else { + videoElement.src = window.URL.createObjectURL(mediaStream); + } + if (autoplay) { + try { + var maybePromise = videoElement.play(); + if (maybePromise) { + maybePromise.then(function () { + return (0, _log.debug)('[setVideoSource:action]', 'play (START)'); + }).catch(function (err) { + return (0, _log.error)('[setVideoSource:action]', 'play (FAULT) ' + (err.message ? err.message : err)); + }); + } + } catch (e) { + // Mobile Browsers: Uncaught (in promise) DOMException: play() can only be initiated by a user gesture. + videoElement.setAttribute('autoplay', false); + videoElement.pause(); + (0, _log.error)('[setVideoSource:action]', 'play (FAULT) ' + e.message); + } + } else { + try { + videoElement.setAttribute('autoplay', false); + videoElement.pause(); + } catch (e) { + // nada. + } + } + }, + + injectScript: function injectScript(url) { + var dfd = new _promise.DeferredPromise(); + var script = document.createElement('script'); + script.type = 'text/javascript'; + script.onload = function () { + dfd.resolve(); + }; + script.onreadystatechange = function () { + if (script.readyState === 'loaded' || script.readyState === 'complete') { + script.onreadystatechange = null; + dfd.resolve(); + } + }; + script.src = url; + document.getElementsByTagName('head')[0].appendChild(script); + return dfd.promise; + }, + + gUM: function gUM(constraints) { + return (navigator.mediaDevices || navigator).getUserMedia(constraints); + }, + + setGlobal: function setGlobal(prop, value) { + window[prop] = value; + }, + + getSwfObject: function getSwfObject() { + return window.swfobject; + }, + + getEmbedObject: function getEmbedObject(id) { + return document.getElementById(id); + }, + + getElementId: function getElementId(el) { + return el.getAttribute('id'); + }, + + addCloseHandler: function addCloseHandler(handler) { + var insertValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : -1; + + closeHandlers.splice(insertValue === -1 ? closeHandlers.length : insertValue, 0, handler); + if (window.onbeforeunload !== onwindowclose) { + window.onbeforeunload = onwindowclose; + window.addEventListener('unload', onwindowclose); + } + }, + + removeCloseHandler: function removeCloseHandler(handler) { + var i = closeHandlers.length; + while (--i > -1) { + if (closeHandlers[i] === handler) { + closeHandlers.slice(i, 1); + break; + } + } + }, + + invoke: function invoke(methodName, data) { + if (window.hasOwnProperty(methodName)) { + window[methodName].call(window, data); + } + }, + + // requires + toggleFullScreen: function toggleFullScreen(element) { + if (window.screenfull && window.screenfull.enabled) { + window.screenfull.toggle(element); + } + }, + + onFullScreenStateChange: function onFullScreenStateChange(cb) { + fullscreenHandlers.push(cb); + enableScreenfullHandler(window.screenfull); + }, + + onOrientationMetadata: _metadataUtil.onOrientationMetadata, + + hasAttributeDefined: function hasAttributeDefined(elem, attribute) { + var att = elem.getAttribute(attribute); + return att !== null && (typeof att === 'undefined' ? 'undefined' : (0, _typeof3.default)(att)) !== undefined && typeof att === 'string' && (att === '' || att === 'true' || att === attribute); + }, + + hasClassDefined: function hasClassDefined(elem, className) { + return elem.classList.contains(className); + }, + + createElement: function createElement(tagName, opts) { + if (tagName === 'text') { + return document.createTextNode(opts.toString()); + } + return document.createElement(tagName, opts); + }, + + addSubscriptionAssignmentHandler: function addSubscriptionAssignmentHandler(fn) { + rtmpSubscriberAssignments.push(fn); + if (window.setSubscriberId === undefined) { + window.setSubscriberId = function (id) { + rtmpSubscriberAssignments.shift()(id); + }; + } + }, + + getMouseXFromEvent: function getMouseXFromEvent(event) { + if (!event) { + event = window.event; + } + + if (event.pageX) { + return event.pageX; + } else if (event.clientX) { + return event.clientX + document.body.scrollLeft + document.documentElement.scrollLeft; + } + + return 0; + }, + + getScrollX: function getScrollX() { + return window.pageXOffset !== undefined ? window.pageXOffset : (document.documentElement || document.body.parentNode || document.body).scrollLeft; + }, + + createEvent: function createEvent(EventType) { + return document.createEvent(EventType); + }, + + getGlobal: function getGlobal() { + return window; + } + +}; + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * A DeferredPromise allows for construction and assignment of a future fullfilment of a `Promise`. + * + * @private + */ + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Future = exports.DeferredPromise = undefined; + +var _promise = __webpack_require__(58); + +var _promise2 = _interopRequireDefault(_promise); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var _DeferredPromise = function _DeferredPromise() { + var _this = this; + + (0, _classCallCheck3.default)(this, _DeferredPromise); + + this.resolve = undefined; + this.reject = undefined; + this.promise = new _promise2.default(function (resolve, reject) { + _this.resolve = resolve; + _this.reject = reject; + }); +}; + +/** + * A Future determines if existant DeferredPromise is available or creates and returns a new one. + * + * @param {DeferredPromise} deferredIfExist + * An object tested for truthy-ness. + * @return {DeferredPromise} + * + * @private + */ + + +var _Future = { + createIfNotExist: function createIfNotExist(deferredIfExist) { + var f = deferredIfExist; + if (!f) { + f = new _DeferredPromise(); + } + return f; + } +}; + +var DeferredPromise = exports.DeferredPromise = _DeferredPromise; +var Future = exports.Future = _Future; + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(157), __esModule: true }; + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _setPrototypeOf = __webpack_require__(139); + +var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf); + +var _create = __webpack_require__(137); + +var _create2 = _interopRequireDefault(_create); + +var _typeof2 = __webpack_require__(59); + +var _typeof3 = _interopRequireDefault(_typeof2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : (0, _typeof3.default)(superClass))); + } + + subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass; +}; + +/***/ }), +/* 8 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _typeof2 = __webpack_require__(59); + +var _typeof3 = _interopRequireDefault(_typeof2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && ((typeof call === "undefined" ? "undefined" : (0, _typeof3.default)(call)) === "object" || typeof call === "function") ? call : self; +}; + +/***/ }), +/* 9 */ +/***/ (function(module, exports, __webpack_require__) { + +var store = __webpack_require__(71)('wks') + , uid = __webpack_require__(52) + , Symbol = __webpack_require__(11).Symbol + , USE_SYMBOL = typeof Symbol == 'function'; + +var $exports = module.exports = function(name){ + return store[name] || (store[name] = + USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); +}; + +$exports.store = store; + +/***/ }), +/* 10 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(11) + , core = __webpack_require__(3) + , ctx = __webpack_require__(19) + , hide = __webpack_require__(21) + , PROTOTYPE = 'prototype'; + +var $export = function(type, name, source){ + var IS_FORCED = type & $export.F + , IS_GLOBAL = type & $export.G + , IS_STATIC = type & $export.S + , IS_PROTO = type & $export.P + , IS_BIND = type & $export.B + , IS_WRAP = type & $export.W + , exports = IS_GLOBAL ? core : core[name] || (core[name] = {}) + , expProto = exports[PROTOTYPE] + , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE] + , key, own, out; + if(IS_GLOBAL)source = name; + for(key in source){ + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + if(own && key in exports)continue; + // export native or passed + out = own ? target[key] : source[key]; + // prevent global pollution for namespaces + exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] + // bind timers to global for call from export context + : IS_BIND && own ? ctx(out, global) + // wrap global constructors for prevent change them in library + : IS_WRAP && target[key] == out ? (function(C){ + var F = function(a, b, c){ + if(this instanceof C){ + switch(arguments.length){ + case 0: return new C; + case 1: return new C(a); + case 2: return new C(a, b); + } return new C(a, b, c); + } return C.apply(this, arguments); + }; + F[PROTOTYPE] = C[PROTOTYPE]; + return F; + // make static versions for prototype methods + })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; + // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% + if(IS_PROTO){ + (exports.virtual || (exports.virtual = {}))[key] = out; + // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% + if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out); + } + } +}; +// type bitmap +$export.F = 1; // forced +$export.G = 2; // global +$export.S = 4; // static +$export.P = 8; // proto +$export.B = 16; // bind +$export.W = 32; // wrap +$export.U = 64; // safe +$export.R = 128; // real proto method for `library` +module.exports = $export; + +/***/ }), +/* 11 */ +/***/ (function(module, exports) { + +// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 +var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); +if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef + +/***/ }), +/* 12 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(148), __esModule: true }; + +/***/ }), +/* 13 */ +/***/ (function(module, exports) { + +module.exports = function(it){ + return typeof it === 'object' ? it !== null : typeof it === 'function'; +}; + +/***/ }), +/* 14 */ +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__(16) + , IE8_DOM_DEFINE = __webpack_require__(99) + , toPrimitive = __webpack_require__(73) + , dP = Object.defineProperty; + +exports.f = __webpack_require__(17) ? Object.defineProperty : function defineProperty(O, P, Attributes){ + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if(IE8_DOM_DEFINE)try { + return dP(O, P, Attributes); + } catch(e){ /* empty */ } + if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!'); + if('value' in Attributes)O[P] = Attributes.value; + return O; +}; + +/***/ }), +/* 15 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.SharedObjectEventTypes = exports.FailoverSubscriberEventTypes = exports.RTMPSubscriberEventTypes = exports.RTCSubscriberEventTypes = exports.SubscriberEventTypes = exports.FailoverPublisherEventTypes = exports.RTMPPublisherEventTypes = exports.RTCPublisherEventTypes = exports.PublisherEventTypes = exports.SharedObjectEvent = exports.SubscriberEvent = exports.PublisherEvent = exports.Event = undefined; + +var _getPrototypeOf = __webpack_require__(6); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _possibleConstructorReturn2 = __webpack_require__(8); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(7); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _publisherEvent = __webpack_require__(79); + +Object.defineProperty(exports, 'PublisherEventTypes', { + enumerable: true, + get: function get() { + return _publisherEvent.PublisherEventTypes; + } +}); +Object.defineProperty(exports, 'RTCPublisherEventTypes', { + enumerable: true, + get: function get() { + return _publisherEvent.RTCPublisherEventTypes; + } +}); +Object.defineProperty(exports, 'RTMPPublisherEventTypes', { + enumerable: true, + get: function get() { + return _publisherEvent.RTMPPublisherEventTypes; + } +}); +Object.defineProperty(exports, 'FailoverPublisherEventTypes', { + enumerable: true, + get: function get() { + return _publisherEvent.FailoverPublisherEventTypes; + } +}); + +var _subscriberEvent = __webpack_require__(80); + +Object.defineProperty(exports, 'SubscriberEventTypes', { + enumerable: true, + get: function get() { + return _subscriberEvent.SubscriberEventTypes; + } +}); +Object.defineProperty(exports, 'RTCSubscriberEventTypes', { + enumerable: true, + get: function get() { + return _subscriberEvent.RTCSubscriberEventTypes; + } +}); +Object.defineProperty(exports, 'RTMPSubscriberEventTypes', { + enumerable: true, + get: function get() { + return _subscriberEvent.RTMPSubscriberEventTypes; + } +}); +Object.defineProperty(exports, 'FailoverSubscriberEventTypes', { + enumerable: true, + get: function get() { + return _subscriberEvent.FailoverSubscriberEventTypes; + } +}); + +var _sharedobjectEvent = __webpack_require__(56); + +Object.defineProperty(exports, 'SharedObjectEventTypes', { + enumerable: true, + get: function get() { + return _sharedobjectEvent.SharedObjectEventTypes; + } +}); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Base class for all events. + */ +var Event = function () { + function Event(type) { + var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; + (0, _classCallCheck3.default)(this, Event); + + this._type = type; + this._data = data; + } + + /** + * Type accessor. + * + * @type {String} + */ + + + (0, _createClass3.default)(Event, [{ + key: 'type', + get: function get() { + return this._type; + } + + /** + * Data related to event. + * + * @type {Object} + */ + + }, { + key: 'data', + get: function get() { + return this._data; + } + }]); + return Event; +}(); + +/** + * Base Publisher-related Event. + * + * @extends Event + */ + + +var PublisherEvent = function (_Event) { + (0, _inherits3.default)(PublisherEvent, _Event); + + function PublisherEvent(type, publisher, data) { + (0, _classCallCheck3.default)(this, PublisherEvent); + + var _this = (0, _possibleConstructorReturn3.default)(this, (PublisherEvent.__proto__ || (0, _getPrototypeOf2.default)(PublisherEvent)).call(this, type, data)); + + _this._publisher = publisher; + return _this; + } + + /** + * The Publisher instance that dispatched the event. + * + * @type {Object} + * + * @see Red5ProPublisher + * @see RTCPublisher + * @see RTMPPublisher + */ + + + (0, _createClass3.default)(PublisherEvent, [{ + key: 'publisher', + get: function get() { + return this._publisher; + } + }]); + return PublisherEvent; +}(Event); + +/** + * Base Subscriber-related Event. + * + * @extends Event + */ + + +var SubscriberEvent = function (_Event2) { + (0, _inherits3.default)(SubscriberEvent, _Event2); + + function SubscriberEvent(type, subscriber, data) { + (0, _classCallCheck3.default)(this, SubscriberEvent); + + var _this2 = (0, _possibleConstructorReturn3.default)(this, (SubscriberEvent.__proto__ || (0, _getPrototypeOf2.default)(SubscriberEvent)).call(this, type, data)); + + _this2._subscriber = subscriber; + return _this2; + } + + /** + * The Subscriber instance that dispatched the event. + * + * @type {Object} + * + * @see Red5ProSubscriber + * @see RTCSubscriber + * @see RTMPSubscriber + * @see HLSubscriber + */ + + + (0, _createClass3.default)(SubscriberEvent, [{ + key: 'subscriber', + get: function get() { + return this._subscriber; + } + }]); + return SubscriberEvent; +}(Event); + +/** + * Base SharedObject-related Event. + * + * @extends Event + */ + + +var SharedObjectEvent = function (_Event3) { + (0, _inherits3.default)(SharedObjectEvent, _Event3); + + function SharedObjectEvent(type, sharedObjectName, data) { + (0, _classCallCheck3.default)(this, SharedObjectEvent); + + var _this3 = (0, _possibleConstructorReturn3.default)(this, (SharedObjectEvent.__proto__ || (0, _getPrototypeOf2.default)(SharedObjectEvent)).call(this, type, data)); + + _this3._name = sharedObjectName; + return _this3; + } + + /** + * The name of the Shared Object. + * + * @type {String} + * + * @see {Red5ProSharedObject} + */ + + + (0, _createClass3.default)(SharedObjectEvent, [{ + key: 'name', + get: function get() { + return this._name; + } + }]); + return SharedObjectEvent; +}(Event); + +exports.Event = Event; +exports.PublisherEvent = PublisherEvent; +exports.SubscriberEvent = SubscriberEvent; +exports.SharedObjectEvent = SharedObjectEvent; + +/***/ }), +/* 16 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(13); +module.exports = function(it){ + if(!isObject(it))throw TypeError(it + ' is not an object!'); + return it; +}; + +/***/ }), +/* 17 */ +/***/ (function(module, exports, __webpack_require__) { + +// Thank's IE8 for his funny defineProperty +module.exports = !__webpack_require__(25)(function(){ + return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7; +}); + +/***/ }), +/* 18 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(155), __esModule: true }; + +/***/ }), +/* 19 */ +/***/ (function(module, exports, __webpack_require__) { + +// optional / simple context binding +var aFunction = __webpack_require__(60); +module.exports = function(fn, that, length){ + aFunction(fn); + if(that === undefined)return fn; + switch(length){ + case 1: return function(a){ + return fn.call(that, a); + }; + case 2: return function(a, b){ + return fn.call(that, a, b); + }; + case 3: return function(a, b, c){ + return fn.call(that, a, b, c); + }; + } + return function(/* ...args */){ + return fn.apply(that, arguments); + }; +}; + +/***/ }), +/* 20 */ +/***/ (function(module, exports) { + +var hasOwnProperty = {}.hasOwnProperty; +module.exports = function(it, key){ + return hasOwnProperty.call(it, key); +}; + +/***/ }), +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(14) + , createDesc = __webpack_require__(37); +module.exports = __webpack_require__(17) ? function(object, key, value){ + return dP.f(object, key, createDesc(1, value)); +} : function(object, key, value){ + object[key] = value; + return object; +}; + +/***/ }), +/* 22 */ +/***/ (function(module, exports, __webpack_require__) { + +// to indexed object, toObject with fallback for non-array-like ES3 strings +var IObject = __webpack_require__(65) + , defined = __webpack_require__(45); +module.exports = function(it){ + return IObject(defined(it)); +}; + +/***/ }), +/* 23 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var WILDCARD = '*'; +var WILDCARD_KEY = 'RED5PRO'; + +/** + * Base class for an Event Emitter. + */ + +var EventEmitter = function () { + function EventEmitter() { + (0, _classCallCheck3.default)(this, EventEmitter); + + this._callbacks = {}; + this._callbacks[WILDCARD_KEY] = []; + } + + /** + * Invokes event handlers. + * + * @param {Array} callbacks + * @param {Event} event + * + * @private + */ + + + (0, _createClass3.default)(EventEmitter, [{ + key: '_notify', + value: function _notify(callbacks, event) { + var i = void 0, + length = callbacks.length; + for (i = 0; i < length; i++) { + callbacks[i](event); + } + } + + /** + * Assign a callback handler to an event type. + * + * @param {String} type + * @param {Function} fn + */ + + }, { + key: 'on', + value: function on(type, fn) { + if (typeof fn !== 'function') { + return; + } + + if (type === WILDCARD) { + this._callbacks[WILDCARD_KEY].push(fn); + return; + } + + if (this._callbacks[type] === undefined) { + this._callbacks[type] = []; + } + + if (this._callbacks[type].indexOf(fn) === -1) { + this._callbacks[type].push(fn); + } + } + + /** + * Remove a callback handler for an event type. + * + * @param {String} type + * @param {Function} fn + */ + + }, { + key: 'off', + value: function off(type, fn) { + var map = this._callbacks[type]; + if (type === WILDCARD) { + map = this._callbacks[WILDCARD_KEY]; + } + if (map) { + var index = map.indexOf(fn); + if (index !== -1) { + map.splice(index, 1); + } + } + } + + /** + * Dispatch an event to be handled by any assigned callbacks. + * + * @param {Event} event + */ + + }, { + key: 'trigger', + value: function trigger(event) { + var type = event.type; + if (this._callbacks[type]) { + this._notify(this._callbacks[type], event); + } + this._notify(this._callbacks[WILDCARD_KEY], event); + } + }]); + return EventEmitter; +}(); + +exports.default = EventEmitter; + +/***/ }), +/* 24 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PlaybackControlsImpl = exports.PlaybackControls = exports.PlaybackController = undefined; + +var _getPrototypeOf = __webpack_require__(6); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(8); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(7); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _eventEmitter = __webpack_require__(23); + +var _eventEmitter2 = _interopRequireDefault(_eventEmitter); + +var _browser = __webpack_require__(4); + +var _browser2 = _interopRequireDefault(_browser); + +var _slider = __webpack_require__(124); + +var _slider2 = _interopRequireDefault(_slider); + +var _event = __webpack_require__(84); + +var _state = __webpack_require__(34); + +var _log = __webpack_require__(2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NAME = 'PlaybackControls'; + +/** + * Interface contract for playback controller actions. + * + * @extends EventEmitter + */ + +var SubscriberPlaybackController = function (_EventEmitter) { + (0, _inherits3.default)(SubscriberPlaybackController, _EventEmitter); + + function SubscriberPlaybackController() { + (0, _classCallCheck3.default)(this, SubscriberPlaybackController); + return (0, _possibleConstructorReturn3.default)(this, (SubscriberPlaybackController.__proto__ || (0, _getPrototypeOf2.default)(SubscriberPlaybackController)).call(this)); + } + + /** + * Request to start playing the stream. + */ + + + (0, _createClass3.default)(SubscriberPlaybackController, [{ + key: 'play', + value: function play() {} + /** + * Request to pause playback of stream. + */ + + }, { + key: 'pause', + value: function pause() {} + /** + * Request to resume playback od stream. + */ + + }, { + key: 'resume', + value: function resume() {} + /** + * Request to stop playback of stream. + */ + + }, { + key: 'stop', + value: function stop() {} + /** + * Request to mute the audio of the stream. + */ + + }, { + key: 'mute', + value: function mute() {} + /** + * Request to unmute the audio of the stream. + */ + + }, { + key: 'unmute', + value: function unmute() {} + /** + * Request to set volume of audio of stream. + * + * @param {Number} value + * From 0..1. + */ + + }, { + key: 'setVolume', + value: function setVolume(value) {} // eslint-disable-line no-unused-vars + /** + * Request to set playback point in time. + * + * @param {Number} value + * Either the percentage of the duration (if provided) or the time in seconds. + * @param {Number} duration + * Optional duration of video (when known through VOD) to use to determine time based on first param passed as percentage. + */ + + }, { + key: 'seekTo', + value: function seekTo(value) { + var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; + } // eslint-disable-line no-unused-vars + /** + * Request to toggle fullscreen state. + */ + + }, { + key: 'toggleFullScreen', + value: function toggleFullScreen() {} + }]); + return SubscriberPlaybackController; +}(_eventEmitter2.default); + +/** + * Interface for PlaybackControls used by Subscribers with `controls` and `class="red5pro-media` defined on target elements. This interface serves as a presentation controller and playback API for target DOM elements. + * + * You can use this as a prototype for creating and providing your own custom Playback Controls. To do so: provide an implementation of this Class as the `controls` property on the initialization configuration map provided in the `init()` call of a Subscriber. + * + * TODO: Fully vet the viability of developers being adhere to this contract for custom controls. + * @private + */ + + +var SubscriberPlaybackControls = function () { + function SubscriberPlaybackControls() { + (0, _classCallCheck3.default)(this, SubscriberPlaybackControls); + } + + /** + * Returns the volume level. + * + * @return {Number} 0..1 + */ + + + (0, _createClass3.default)(SubscriberPlaybackControls, [{ + key: 'getVolume', + value: function getVolume() {} + + /** + * Sets the volume level of playback. + * + * @param {Number} value + * 0..1 + */ + + }, { + key: 'setVolume', + value: function setVolume(value) {} // eslint-disable-line no-unused-vars + + /** + * Request to set playback point in time. + * + * @param {Number} value + * Either the percentage of the duration (if provided) or the time in seconds. + * @param {Number} duration + * Optional duration of video (when known through VOD) to use to determine time based on first param passed as percentage. + */ + + }, { + key: 'setSeekTime', + value: function setSeekTime(value) { + var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + } // eslint-disable-line no-unused-vars + + /** + * Sets the playback duration of the stream, if available from VOD (Video On Demand). + * + * @param {Number} value + * In seconds. + */ + + }, { + key: 'setPlaybackDuration', + value: function setPlaybackDuration(value) {} // eslint-disable-line no-unused-vars + + /** + * Returns the current playback state. + * + * @return {Number} + * @see {PlaybackState} + */ + + }, { + key: 'getState', + value: function getState() {} + + /** + * Set the current playback state. + * + * @param {Number} state + * @see {PlaybackState} + */ + + }, { + key: 'setState', + value: function setState(state) {} // eslint-disable-line no-unused-vars + + /** + * Sets playback as VOD (Video On Demand) type. + * + * @param {Boolean} value + */ + + }, { + key: 'setAsVOD', + value: function setAsVOD(value) {} // eslint-disable-line no-unused-vars + + /** + * Enables controls and event handlers. + * + * @private + */ + + }, { + key: 'enable', + value: function enable(value) {} // eslint-disable-line no-unused-vars + + }]); + return SubscriberPlaybackControls; +}(); + +/** + * Default implementation of `SubscriberPlaybackControls` used internally in the SDK. + * + * @private + */ + + +var SubscriberPlaybackControlsImpl = function (_SubscriberPlaybackCo) { + (0, _inherits3.default)(SubscriberPlaybackControlsImpl, _SubscriberPlaybackCo); + + function SubscriberPlaybackControlsImpl(player, container) { + (0, _classCallCheck3.default)(this, SubscriberPlaybackControlsImpl); + + var _this2 = (0, _possibleConstructorReturn3.default)(this, (SubscriberPlaybackControlsImpl.__proto__ || (0, _getPrototypeOf2.default)(SubscriberPlaybackControlsImpl)).call(this)); + + _this2.player = player; + _this2.container = container; + _this2._controlbar = undefined; + _this2._playPauseButton = undefined; + _this2._muteButton = undefined; + _this2._volumeField = undefined; + _this2._seekTimeField = undefined; + _this2._timeField = undefined; + _this2._fullScreenButton = undefined; + _this2._state = _state.PlaybackState.IDLE; + _this2._mutedState = false; + _this2._resumeAfterSeek = false; + _this2._playbackDuration = 0; + _this2._volumeValue = 1; + _this2._onPlayPauseClickBound = _this2._onPlayPauseClick.bind(_this2); + _this2.decorate(_this2.container); + return _this2; + } + + /** + * Decorates target container with playback control elements. + * + * @param {Element} container + * + * @private + */ + + + (0, _createClass3.default)(SubscriberPlaybackControlsImpl, [{ + key: 'decorate', + value: function decorate(container) { + (0, _log.debug)(NAME, '[decorate]'); + var controlbar = _browser2.default.createElement('div'); + controlbar.classList.add('red5pro-media-control-bar'); + this._playPauseButton = this._createPlayPauseButton(); + this._muteButton = this._createMuteButton(); + this._volumeField = this._createVolumeControl(); + this._seekTimeField = this._createSeekControl(); + this._timeField = this._createPlaybackTime(); + this._fullScreenButton = this._createFullScreenToggle(); + controlbar.appendChild(this._playPauseButton); + controlbar.appendChild(this._timeField); + controlbar.appendChild(this._seekTimeField.view); + controlbar.appendChild(this._muteButton); + controlbar.appendChild(this._volumeField.view); + controlbar.appendChild(this._fullScreenButton); + container.appendChild(controlbar); + this._controlbar = controlbar; + + if (_browser2.default.isTouchEnabled()) { + controlbar.classList.add('red5pro-media-control-bar-show'); + // this.container.addEventListener('click', () => { + // controlbar.classList.toggle('red5pro-media-control-bar-show') + // }) + } else { + this.container.addEventListener('mouseover', function () { + controlbar.classList.add('red5pro-media-control-bar-show'); + }); + this.container.addEventListener('mouseout', function () { + controlbar.classList.remove('red5pro-media-control-bar-show'); + }); + } + + this.setState(_state.PlaybackState.IDLE).onFullScreenChange(false).setSeekTime(0).enable(false); + } + + /** + * Click handler for play/pause control. + * + * @private + */ + + }, { + key: '_onPlayPauseClick', + value: function _onPlayPauseClick() { + if (this.getState() === _state.PlaybackState.PLAYING) { + this.player.pause(); + } else if (this.getState() === _state.PlaybackState.PAUSED) { + this.player.resume(); + } else { + this.player.play(); + } + } + + /** + * Creates play/pause control. + * + * @private + */ + + }, { + key: '_createPlayPauseButton', + value: function _createPlayPauseButton() { + var button = _browser2.default.createElement('button'); + button.setAttribute('aria-label', 'Toggle Playback'); + button.classList.add('red5pro-media-control-element'); + button.classList.add('red5pro-media-element-button'); + button.classList.add('red5pro-media-playpause-button'); + return button; + } + + /** + * Creates mute/unmute control. + * + * @private + */ + + }, { + key: '_createMuteButton', + value: function _createMuteButton() { + var self = this; + var button = _browser2.default.createElement('button'); + button.setAttribute('aria-label', 'Toggle Mute Audio'); + button.classList.add('red5pro-media-control-element'); + button.classList.add('red5pro-media-element-button'); + button.classList.add('red5pro-media-muteunmute-button'); + button.addEventListener('click', function () { + if (self.getMutedState()) { + self.player.unmute(); + self.setMutedState(false); + } else { + self.player.mute(); + self.setMutedState(true); + } + }); + return button; + } + + /** + * Creates volume control. + * + * @private + */ + + }, { + key: '_createVolumeControl', + value: function _createVolumeControl() { + var self = this; + var slider = new _slider2.default('volume'); + slider.view.classList.add('red5pro-media-control-element'); + slider.view.classList.add('red5pro-media-volume-slider'); + slider.view.classList.add('red5pro-media-slider'); + slider.on(_event.SliderEventTypes.CHANGE, function (event) { + var percentage = Number(event.data); + self.player.setVolume(percentage); + }); + return slider; + } + + /** + * Creates seek control. + * + * @private + */ + + }, { + key: '_createSeekControl', + value: function _createSeekControl() { + var self = this; + var slider = new _slider2.default('seek'); + slider.view.classList.add('red5pro-media-control-element'); + slider.view.classList.add('red5pro-media-seektime-slider'); + slider.view.classList.add('red5pro-media-slider'); + slider.on(_event.SliderEventTypes.CHANGE_START, function () { + if (self.getState() === _state.PlaybackState.PLAYING) { + self._resumeAfterSeek = true; + self.player.pause(); + } + }); + slider.on(_event.SliderEventTypes.CHANGE, function (event) { + var percentage = Number(event.data); + self.player.seekTo(percentage, self._playbackDuration === 0 ? undefined : self._playbackDuration); + self.setSeekTime(percentage * self._playbackDuration, self._playbackDuration); + }); + slider.on(_event.SliderEventTypes.CHANGE_COMPLETE, function () { + if (self._resumeAfterSeek && self.getState() === _state.PlaybackState.PAUSED) { + self._resumeAfterSeek = false; + self.player.resume(); + } + }); + return slider; + } + + /** + * Creates playback time field. + * + * @private + */ + + }, { + key: '_createPlaybackTime', + value: function _createPlaybackTime() { + var span = _browser2.default.createElement('span'); + var text = _browser2.default.createElement('text', 'hello!'); + span.classList.add('red5pro-media-control-element'); + span.classList.add('red5pro-media-time-field'); + span.appendChild(text); + return span; + } + + /** + * Create fullscreen toggle control. + * + * @private + */ + + }, { + key: '_createFullScreenToggle', + value: function _createFullScreenToggle() { + var self = this; + var button = _browser2.default.createElement('button'); + button.setAttribute('aria-label', 'Toggle Fullscreen'); + button.classList.add('red5pro-media-control-element'); + button.classList.add('red5pro-media-element-button'); + button.classList.add('red5pro-media-fullscreen-button'); + button.addEventListener('click', function () { + self.player.toggleFullScreen(); + }); + return button; + } + + /** + * Enables controls and event handlers. + * + * @private + */ + + }, { + key: 'enable', + value: function enable(value) { + if (value) { + this._playPauseButton.classList.remove('red5pro-media-element-button-disabled'); + this._playPauseButton.addEventListener('click', this._onPlayPauseClickBound); + } else { + this._playPauseButton.classList.add('red5pro-media-element-button-disabled'); + this._playPauseButton.removeEventListener('click', this._onPlayPauseClickBound); + } + } + + /** + * Formats the time value. + * + * @param {value} Number + * @return {String} + */ + + }, { + key: 'formatTime', + value: function formatTime(value) { + var hrs = 0; + var mins = value === 0 ? 0 : parseInt(value / 60); + var secs = 0; + if (mins >= 60) { + hrs = parseInt(mins / 60); + mins = mins % 60; + } + secs = value === 0 ? 0 : parseInt(value % 60); + + var formattedArr = hrs < 10 ? ['0' + hrs] : [hrs]; + formattedArr.push(mins < 10 ? ['0' + mins] : [mins]); + formattedArr.push(secs < 10 ? ['0' + secs] : [secs]); + return formattedArr.join(':'); + } + + /** + * Returns the volume level. + * + * @return {Number} 0..1 + */ + + }, { + key: 'getVolume', + value: function getVolume() { + return this._volumeValue; + } + + /** + * Sets the volume level of playback. + * + * @param {Number} value + * 0..1 + */ + + }, { + key: 'setVolume', + value: function setVolume(value) { + this._volumeField.value = value; + this._volumeValue = value; + if (value === 0) { + this.setMutedState(true); + } else if (this.getMutedState()) { + this.setMutedState(false); + } + return this; + } + + /** + * Request to set playback point in time. + * + * @param {Number} value + * Either the percentage of the duration (if provided) or the time in seconds. + * @param {Number} duration + * Optional duration of video (when known through VOD) to use to determine time based on first param passed as percentage. + */ + + }, { + key: 'setSeekTime', + value: function setSeekTime(value) { + var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + + this._seekTimeField.value = length === 0 ? 0 : value / length; + if (this._playbackDuration !== 0 && parseInt(this._playbackDuration) <= parseInt(value)) { + this._seekTimeField.value = 1; + } + this._timeField.innerText = this.formatTime(Math.floor(value)); + return this; + } + + /** + * Sets the playback duration of the stream, if available from VOD (Video On Demand). + * + * @param {Number} value + * In seconds. + */ + + }, { + key: 'setPlaybackDuration', + value: function setPlaybackDuration(value) { + (0, _log.debug)(NAME, '[setplaybackduration]: ' + value); + this._playbackDuration = value; + } + + /** + * Returns the current playback state. + * + * @return {Number} + * @see {PlaybackState} + */ + + }, { + key: 'getState', + value: function getState() { + return this._state; + } + + /** + * Set the current playback state. + * + * @param {Number} state + * @see {PlaybackState} + */ + + }, { + key: 'setState', + value: function setState(state) { + (0, _log.debug)(NAME, '[setState]: ' + _state.PlaybackStateReadable[state]); + this._state = state; + this.onStateChange(this._state); + return this; + } + + /** + * Returns the current state of the playback being muted. + * This differs from just the volume level being 0. The controls can be muted, but have a volume level greater than 0 - meaning, unmute will return back to the volume level previously set. + * + * @return {Boolean} + */ + + }, { + key: 'getMutedState', + value: function getMutedState() { + return 'muted' in this.player ? this.player.muted : this._mutedState; + } + + /** + * Sets the muted state of the playback. + * + * @param {Boolean} state + */ + + }, { + key: 'setMutedState', + value: function setMutedState(state) { + this._mutedState = state; + this.onMutedStateChange(this._mutedState); + return this; + } + + /** + * Handler for change in state. + * + * @param {Number} state + * The PlaybackState + * + * @private + */ + + }, { + key: 'onStateChange', + value: function onStateChange(state) { + if (state === _state.PlaybackState.PLAYING) { + this._playPauseButton.classList.remove('red5pro-media-play-button'); + this._playPauseButton.classList.add('red5pro-media-pause-button'); + } else { + this._playPauseButton.classList.add('red5pro-media-play-button'); + this._playPauseButton.classList.remove('red5pro-media-pause-button'); + } + return this; + } + + /** + * Handler for change in mute state. + * + * @param {Boolean} state + * + * @private + */ + + }, { + key: 'onMutedStateChange', + value: function onMutedStateChange(state) { + if (state) { + this._muteButton.classList.add('red5pro-media-mute-button'); + this._muteButton.classList.remove('red5pro-media-unmute-button'); + this._volumeField.value = 0; + } else { + this._muteButton.classList.remove('red5pro-media-mute-button'); + this._muteButton.classList.add('red5pro-media-unmute-button'); + this._volumeField.value = this._volumeValue; + } + } + + /** + * Handler for change in fullscreen state. + * + * @param {Boolean} isFullScreen + * + * @private + */ + + }, { + key: 'onFullScreenChange', + value: function onFullScreenChange(isFullScreen) { + if (isFullScreen) { + this._fullScreenButton.classList.add('red5pro-media-exit-fullscreen-button'); + this._fullScreenButton.classList.remove('red5pro-media-fullscreen-button'); + } else { + this._fullScreenButton.classList.remove('red5pro-media-exit-fullscreen-button'); + this._fullScreenButton.classList.add('red5pro-media-fullscreen-button'); + } + return this; + } + + /** + * Sets playback as VOD (Video On Demand) type. + * + * @param {Boolean} value + */ + + }, { + key: 'setAsVOD', + value: function setAsVOD(isVOD) { + (0, _log.debug)(NAME, '[setAsVOD]: ' + isVOD); + if (!isVOD) { + this._seekTimeField.value = 0; + this._seekTimeField.disabled = true; + } else { + this._seekTimeField.disabled = false; + } + } + + /** + * Request to detach the control bar to provided container. + */ + + }, { + key: 'detach', + value: function detach() { + this.enable(false); + this.container.removeChild(this._controlbar); + } + }]); + return SubscriberPlaybackControlsImpl; +}(SubscriberPlaybackControls); + +var PlaybackController = exports.PlaybackController = SubscriberPlaybackController; +var PlaybackControls = exports.PlaybackControls = SubscriberPlaybackControls; +var PlaybackControlsImpl = exports.PlaybackControlsImpl = SubscriberPlaybackControlsImpl; + +/***/ }), +/* 25 */ +/***/ (function(module, exports) { + +module.exports = function(exec){ + try { + return !!exec(); + } catch(e){ + return true; + } +}; + +/***/ }), +/* 26 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $at = __webpack_require__(181)(true); + +// 21.1.3.27 String.prototype[@@iterator]() +__webpack_require__(66)(String, 'String', function(iterated){ + this._t = String(iterated); // target + this._i = 0; // next index +// 21.1.5.2.1 %StringIteratorPrototype%.next() +}, function(){ + var O = this._t + , index = this._i + , point; + if(index >= O.length)return {value: undefined, done: true}; + point = $at(O, index); + this._i += point.length; + return {value: point, done: false}; +}); + +/***/ }), +/* 27 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(186); +var global = __webpack_require__(11) + , hide = __webpack_require__(21) + , Iterators = __webpack_require__(29) + , TO_STRING_TAG = __webpack_require__(9)('toStringTag'); + +for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){ + var NAME = collections[i] + , Collection = global[NAME] + , proto = Collection && Collection.prototype; + if(proto && !proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = Iterators.Array; +} + +/***/ }), +/* 28 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _assign = __webpack_require__(136); + +var _assign2 = _interopRequireDefault(_assign); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _assign2.default || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; +}; + +/***/ }), +/* 29 */ +/***/ (function(module, exports) { + +module.exports = {}; + +/***/ }), +/* 30 */ +/***/ (function(module, exports, __webpack_require__) { + +var META = __webpack_require__(52)('meta') + , isObject = __webpack_require__(13) + , has = __webpack_require__(20) + , setDesc = __webpack_require__(14).f + , id = 0; +var isExtensible = Object.isExtensible || function(){ + return true; +}; +var FREEZE = !__webpack_require__(25)(function(){ + return isExtensible(Object.preventExtensions({})); +}); +var setMeta = function(it){ + setDesc(it, META, {value: { + i: 'O' + ++id, // object ID + w: {} // weak collections IDs + }}); +}; +var fastKey = function(it, create){ + // return primitive with prefix + if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if(!has(it, META)){ + // can't set metadata to uncaught frozen object + if(!isExtensible(it))return 'F'; + // not necessary to add metadata + if(!create)return 'E'; + // add missing metadata + setMeta(it); + // return object ID + } return it[META].i; +}; +var getWeak = function(it, create){ + if(!has(it, META)){ + // can't set metadata to uncaught frozen object + if(!isExtensible(it))return true; + // not necessary to add metadata + if(!create)return false; + // add missing metadata + setMeta(it); + // return hash weak collections IDs + } return it[META].w; +}; +// add metadata on freeze-family methods calling +var onFreeze = function(it){ + if(FREEZE && meta.NEED && isExtensible(it) && !has(it, META))setMeta(it); + return it; +}; +var meta = module.exports = { + KEY: META, + NEED: false, + fastKey: fastKey, + getWeak: getWeak, + onFreeze: onFreeze +}; + +/***/ }), +/* 31 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.14 / 15.2.3.14 Object.keys(O) +var $keys = __webpack_require__(108) + , enumBugKeys = __webpack_require__(64); + +module.exports = Object.keys || function keys(O){ + return $keys(O, enumBugKeys); +}; + +/***/ }), +/* 32 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.13 ToObject(argument) +var defined = __webpack_require__(45); +module.exports = function(it){ + return Object(defined(it)); +}; + +/***/ }), +/* 33 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PlaybackVideoEncoder = exports.PlaybackAudioEncoder = exports.PlaybackTypes = undefined; + +var _freeze = __webpack_require__(18); + +var _freeze2 = _interopRequireDefault(_freeze); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Enumeration of Playback Types. + */ +var PlaybackTypes = exports.PlaybackTypes = (0, _freeze2.default)({ + RTC: 'rtc', + RTMP: 'rtmp', + HLS: 'hls' +}); + +/** + * Enumeration of Audio Encoder types to request for Playback + */ +var PlaybackAudioEncoder = exports.PlaybackAudioEncoder = (0, _freeze2.default)({ + OPUS: 'Opus', + PCMU: 'PCMU', + PCMA: 'PCMA', + SPEEX: 'Speex', + NONE: 'NONE' +}); + +/** + * Enumeration of Video Encoder types to request for Playback. + */ +var PlaybackVideoEncoder = exports.PlaybackVideoEncoder = (0, _freeze2.default)({ + VP8: 'VP8', + H264: 'H264', + NONE: 'NONE' +}); + +/***/ }), +/* 34 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PlaybackStateReadable = exports.PlaybackState = undefined; + +var _freeze = __webpack_require__(18); + +var _freeze2 = _interopRequireDefault(_freeze); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Enumeration of Playback State. + * + * @see {SubscriberPlaybackControls} + */ +var PlaybackState = exports.PlaybackState = (0, _freeze2.default)({ + UNAVAILABLE: 1000, + AVAILABLE: 0, + IDLE: 1, + PLAYING: 2, + PAUSED: 3 +}); + +/** + * Human readable playback state. + * + * @see {SubscriberPlaybackControls} + * @private + */ +var PlaybackStateReadable = exports.PlaybackStateReadable = (0, _freeze2.default)({ + 1000: 'Playback.UNAVAILABLE', + 0: 'Playback.AVAILABLE', + 1: 'Playback.IDLE', + 2: 'Playback.PLAYING', + 3: 'Playback.PAUSED' +}); + +/***/ }), +/* 35 */ +/***/ (function(module, exports) { + +var toString = {}.toString; + +module.exports = function(it){ + return toString.call(it).slice(8, -1); +}; + +/***/ }), +/* 36 */ +/***/ (function(module, exports, __webpack_require__) { + +var ctx = __webpack_require__(19) + , call = __webpack_require__(102) + , isArrayIter = __webpack_require__(100) + , anObject = __webpack_require__(16) + , toLength = __webpack_require__(51) + , getIterFn = __webpack_require__(76) + , BREAK = {} + , RETURN = {}; +var exports = module.exports = function(iterable, entries, fn, that, ITERATOR){ + var iterFn = ITERATOR ? function(){ return iterable; } : getIterFn(iterable) + , f = ctx(fn, that, entries ? 2 : 1) + , index = 0 + , length, step, iterator, result; + if(typeof iterFn != 'function')throw TypeError(iterable + ' is not iterable!'); + // fast case for arrays with default iterator + if(isArrayIter(iterFn))for(length = toLength(iterable.length); length > index; index++){ + result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); + if(result === BREAK || result === RETURN)return result; + } else for(iterator = iterFn.call(iterable); !(step = iterator.next()).done; ){ + result = call(iterator, f, step.value, entries); + if(result === BREAK || result === RETURN)return result; + } +}; +exports.BREAK = BREAK; +exports.RETURN = RETURN; + +/***/ }), +/* 37 */ +/***/ (function(module, exports) { + +module.exports = function(bitmap, value){ + return { + enumerable : !(bitmap & 1), + configurable: !(bitmap & 2), + writable : !(bitmap & 4), + value : value + }; +}; + +/***/ }), +/* 38 */ +/***/ (function(module, exports, __webpack_require__) { + +var def = __webpack_require__(14).f + , has = __webpack_require__(20) + , TAG = __webpack_require__(9)('toStringTag'); + +module.exports = function(it, tag, stat){ + if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag}); +}; + +/***/ }), +/* 39 */ +/***/ (function(module, exports) { + + + +/***/ }), +/* 40 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.RTCSessionDescription = exports.RTCIceCandidate = exports.RTCPeerConnection = exports.updateBandwidth = exports.forceUserMedia = exports.getUserMedia = exports.isSupported = exports.determineSupportedResolution = exports.quickResolutionSupport = undefined; + +var _stringify = __webpack_require__(12); + +var _stringify2 = _interopRequireDefault(_stringify); + +var _browser = __webpack_require__(4); + +var _browser2 = _interopRequireDefault(_browser); + +var _promise = __webpack_require__(5); + +var _util = __webpack_require__(86); + +var _object = __webpack_require__(41); + +var _log = __webpack_require__(2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// import { NoSupportedCameraResolutionsError } from '../exception/errors' + +// Resolutions borrowed from https://github.com/webrtcHacks/WebRTC-Camera-Resolution/blob/master/js/resolutionScan.js +var formats = [{ + "label": "4K(UHD)", + "width": 3840, + "height": 2160 +}, { + "label": "1080p(FHD)", + "width": 1920, + "height": 1080 +}, { + "label": "UXGA", + "width": 1600, + "height": 1200 +}, { + "label": "720p(HD)", + "width": 1280, + "height": 720 +}, { + "label": "SVGA", + "width": 800, + "height": 600 +}, { + "label": "VGA", + "width": 640, + "height": 480 +}, { + "label": "360p(nHD)", + "width": 640, + "height": 360 +}, { + "label": "CIF", + "width": 352, + "height": 288 +}, { + "label": "QVGA", + "width": 320, + "height": 240 +}, { + "label": "QCIF", + "width": 176, + "height": 144 +}, { + "label": "QQVGA", + "width": 160, + "height": 120 +}]; + +/** + * Detects if resolutions are defined on the provied constraints. + * + * @param {Object} constraints + * The Media Constraints to test against. + * @return {Boolean} + * + * @private + */ +var hasResolutionsDefined = function hasResolutionsDefined(constraints) { + return constraints.hasOwnProperty('video') && (constraints.video.hasOwnProperty('width') || constraints.video.hasOwnProperty('height')); +}; + +/** + * Return value on attribute based on failover test of attribute availability on provided object. + * + * @param {Object} attribute + * @return {Object} + * + * @private + */ +var getValueFromConstraintAttribute = function getValueFromConstraintAttribute(attribute) { + return attribute.exact || attribute.ideal || attribute.max || attribute.min || attribute; +}; + +/** + * Test if video on Media Constraint is either set to `true` or if the constraints and format objects have the same dimension values. + * + * @param {Object} constraints + * @param {Object} format + * @return {Boolean} + * + * @private + */ +var isExact = (0, _util.curry)(function (constraints, format) { + if (typeof constraints.video === 'boolean') { + return true; + } + var w = constraints.video.hasOwnProperty('width') ? getValueFromConstraintAttribute(constraints.video.width) : 0; + var h = constraints.video.hasOwnProperty('height') ? getValueFromConstraintAttribute(constraints.video.height) : 0; + var confirmed = w === format.width && h === format.height; + if (confirmed) { + (0, _log.debug)('[gum:isExact]', 'Found matching resolution for ' + format.width + ', ' + format.height + '.'); + } + return confirmed; +}); + +/** + * Test if the area on the provide format is lower than the area on the Media Constraints. + * This is used in trying to find the next nearest neighbor of dimensions that the browser supports. + * + * @param {Object} constraints + * @param {Object} format + * @return {Boolean} + * + * @private + */ +var isLower = (0, _util.curry)(function (constraints, format) { + var w = constraints.video.hasOwnProperty('width') ? getValueFromConstraintAttribute(constraints.video.width) : 0; + var h = constraints.video.hasOwnProperty('height') ? getValueFromConstraintAttribute(constraints.video.height) : 0; + var desired = w * h; + var dimensions = format.width * format.height; + return dimensions < desired; +}); + +/** + * Returns filtered of Media Constraint format if matching the canned list of support form `formats`. + * + * @param {Array} formatList + * @param {Object} constraints + * @return {Array} + * + * @private + */ +var hasMatchingFormat = (0, _util.curry)(function (formatsList, constraints) { + (0, _log.debug)('[gum:hasMatchingFormat]', 'Filtered list: ' + (0, _stringify2.default)((0, _util.filter)(isExact(constraints))(formatsList), null, 2)); + return (0, _util.filter)(isExact(constraints))(formatsList).length > 0; +}); + +/** + * Returns list of filter lower resolution constraints from the provided Media constraints. + * + * @param {Array} formayList + * @param {Object} constraints + * @return {Array} + * + * @private + */ +var findLowerResolutions = (0, _util.curry)(function (formatsList, constraints) { + var resIsLower = isLower(constraints); + return (0, _util.filter)(resIsLower)(formatsList); +}); + +/** + * Allows the browser to try and determine the resolution to use based on `video: true` attribute in `getUserMedia` call. + * + * @param {Object} data + * The Media Constaints object. + * @param {Promise} p + * The `Promise` to resolve or reject on detemination of allowed Media Constraints on the browser. + * + * @private + */ +var allowBrowserToDefineResolution = function allowBrowserToDefineResolution(data, p) { + // default to `video: true` in hopes the browser can decide on its own. + data.video = true; + _browser2.default.gUM(data).then(function (media) { + p.resolve({ + media: media, + constraints: data + }); + }).catch(function (err) { + // eslint-disable-line no-unused-vars + var msg = typeof err === 'string' ? err : [err.name, err.message].join(': '); + (0, _log.debug)('[gum:getUserMedia]', 'Failure in getUserMedia: ' + msg + '. Attempting other resolution tests...'); + (0, _log.debug)('[gUM:findformat]', 'Constraints declined by browser: ' + (0, _stringify2.default)(data, null, 2)); + p.reject('Could not find proper camera for provided constraints.'); + }); +}; + +/** + * Attempts to select the best resolution based on whether the browser throws an exception when requesting `MediaStream` on `getUserMedia`. + * + * @param {Object} data + * The Media Constaints object. + * @param {Array} selections + * The listing of formats to test on. + * @param {Promise} p + * The `Promise` to resolve or reject on detemination of allowed Media Constraints on the browser. + * + * @private + */ +var findNextSelection = function findNextSelection(data, selections, p) { + if (selections.length == 0) { + // if we got here, there is no support. + allowBrowserToDefineResolution(data, p); + return; + } + var selection = selections.shift(); + data.video.width = { exact: selection.width }; + data.video.height = { exact: selection.height }; + _browser2.default.gUM(data).then(function (media) { + p.resolve({ + media: media, + constraints: data + }); + }).catch(function (err) { + // eslint-disable-line no-unused-vars + var msg = typeof err === 'string' ? err : [err.name, err.message].join(': '); + (0, _log.debug)('[gum:getUserMedia]', 'Failure in getUserMedia: ' + msg + '. Attempting other resolution tests...'); + (0, _log.debug)('[gUM:findformat]', 'Constraints declined by browser: ' + (0, _stringify2.default)(data, null, 2)); + findNextSelection(data, selections, p); + }); +}; + +/** + * Quick test if resolution is supported on the browser. + * + * @param {Object} constraints + * + * @private + */ +var quickResolutionSupport = exports.quickResolutionSupport = function quickResolutionSupport(constraints) { + var data = (0, _object.deepCopy)(constraints); + // if video: `true`, returned unscathed. + if (typeof constraints.video === 'boolean') { + return data; + } + // else, define exact. + if (constraints.video.width) { + data.video.width = { exact: getValueFromConstraintAttribute(constraints.video.width) }; + } + if (constraints.video.height) { + data.video.height = { exact: getValueFromConstraintAttribute(constraints.video.height) }; + } + return data; +}; + +/** + * Detemine the supported resolution on the browser based on the Media Constraints requested. + * + * @param {Object} constraints + * + * @private + */ +var determineSupportedResolution = exports.determineSupportedResolution = function determineSupportedResolution(constraints) { + (0, _log.debug)('[gum:determineSupportedResolution]', 'Determine next neighbor based on constraints: ' + (0, _stringify2.default)(constraints, null, 2)); + var deferred = new _promise.DeferredPromise(); + var selections = findLowerResolutions(formats)(constraints); + var data = (0, _object.deepCopy)(constraints); + findNextSelection(data, selections, deferred); + return deferred.promise; +}; + +/** + * Quick test to see if WebRTC is supported in the current environment. + * + * @return {Boolean} + * + * @private + */ +var isSupported = exports.isSupported = function isSupported() { + return _RTCPeerConnection && _RTCIceCandidate && _RTCSessionDescription; +}; + +/** + * Proxy on `getUserMedia` to try and resolve to the best possible resolution for broadcast based on Media Constraints object provided. + * + * @param {Object} constraints + * @return {Promise} + * The `Promise` will resolve or reject on properly accessing a `MediaStream` from `getUserMedia` on the browser. + * + * @private + */ +var getUserMedia = exports.getUserMedia = function getUserMedia(constraints) { + // Wrapping `getUserMedia` requests in another deferred promise so we can return the selected resolutions if successful. + var dfd = new _promise.DeferredPromise(); + var isAvailableInFormats = hasMatchingFormat(formats); + (0, _log.debug)('[gum:getUserMedia]', 'Is Available in format listing: ' + isAvailableInFormats(constraints)); + var failover = function failover(err) { + if (err) { + var msg = typeof err === 'string' ? err : [err.name, err.message].join(': '); + (0, _log.debug)('[gum:getUserMedia]', 'Failure in getUserMedia: ' + msg + '. Attempting other resolution tests...'); + } + determineSupportedResolution(constraints).then(function (res) { + dfd.resolve({ + media: res.media, + constraints: res.constraints + }); + }).catch(function (error) { + dfd.reject({ + error: error, + constraints: constraints + }); + }); + }; + if (!hasResolutionsDefined(constraints)) { + (0, _log.debug)('[gum:getUserMedia]', 'Constraints were not defined properly. Attempting failover...'); + _browser2.default.gUM(constraints).then(function (media) { + dfd.resolve({ + media: media, + constraints: constraints + }); + }).catch(failover); + } else if (isAvailableInFormats(constraints)) { + (0, _log.debug)('[gum:getUserMedia]', 'Found constraints in list. Checking quick support for faster setup with: ' + (0, _stringify2.default)(constraints, null, 2)); + // Try quick setting of `exact` resolution... + var available = quickResolutionSupport(constraints); + _browser2.default.gUM(available).then(function (media) { + dfd.resolve({ + media: media, + constraints: available + }); + }).catch(failover); + } else { + (0, _log.debug)('[gum:getUserMedia]', 'Could not find contraints in list. Attempting failover...'); + failover(); + } + return dfd.promise; +}; + +/** + * Force to call `getUserMedia` directly on the browser and bypass the resolution detection mechanism provided by other methods on this module. + * + * @private + */ +var forceUserMedia = exports.forceUserMedia = function forceUserMedia(constraints) { + return _browser2.default.gUM(constraints); +}; + +// https://github.com/muaz-khan/WebRTC-Experiment/blob/master/RTCPeerConnection/RTCPeerConnection-v1.6.js#L158 +// Muaz Khan - github.com/muaz-khan +// MIT License - www.WebRTC-Experiment.com/licence +// Documentation - github.com/muaz-khan/WebRTC-Experiment/tree/master/RTCPeerConnection +var updateBandwidth = exports.updateBandwidth = function updateBandwidth(options, sdp) { + if (_browser2.default.getIsMoz()) { + var a_index = void 0, + l_index = void 0, + front = void 0, + back = void 0; + if (options.audio) { + a_index = sdp.indexOf('m=audio'); + l_index = sdp.indexOf('\r\n', a_index); + front = sdp.slice(0, l_index); + back = sdp.slice(l_index + '\r\n'.length, sdp.length); + sdp = [front, 'b=AS:' + options.audio, back].join('\r\n'); + } + if (options.video) { + a_index = sdp.indexOf('m=video'); + l_index = sdp.indexOf('\r\n', a_index); + front = sdp.slice(0, l_index); + back = sdp.slice(l_index + '\r\n'.length, sdp.length); + sdp = [front, 'b=AS:' + options.video, back].join('\r\n'); + } + } else { + sdp = sdp.replace(/b=AS([^\r\n]+\r\n)/g, ''); + if (options.audio) { + sdp = sdp.replace(/a=mid:audio\r\n/g, 'a=mid:audio\r\nb=AS:' + options.audio + '\r\n'); + } + if (options.video) { + sdp = sdp.replace(/a=mid:video\r\n/g, 'a=mid:video\r\nb=AS:' + options.video + '\r\n'); + } + } + return sdp; +}; + +/* -- handled by adapter.js -- */ +var _RTCPeerConnection = window.RTCPeerConnection || window.mozRTCPeerConnection || window.webkitRTCPeerConnection; +var _RTCIceCandidate = window.RTCIceCandidate || window.mozRTCIceCandidate || window.webkitRTCIceCandidate; +var _RTCSessionDescription = window.RTCSessionDescription || window.mozRTCSessionDescription || window.webkitRTCSessionDescription; + +var RTCPeerConnection = exports.RTCPeerConnection = _RTCPeerConnection; +var RTCIceCandidate = exports.RTCIceCandidate = _RTCIceCandidate; +var RTCSessionDescription = exports.RTCSessionDescription = _RTCSessionDescription; + +/***/ }), +/* 41 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Deep-defines an `Object` in place with namespaced attribute value. + * + * @private + */ + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.metadataResolutionToObject = exports.deepCopy = exports.deepDefine = undefined; + +var _stringify = __webpack_require__(12); + +var _stringify2 = _interopRequireDefault(_stringify); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var deepDefine = exports.deepDefine = function deepDefine(object, paths, value) { + var i = 0; + var tail = object; + var prop = paths.pop(); + var length = paths.length; + for (i; i < length; i++) { + var path = paths[i]; + tail[path] = tail[path] || {}; + tail = tail[path]; + } + tail[prop] = value; +}; + +/** + * Deep-copy utilizing JSON API. + * + * @private + */ +var deepCopy = exports.deepCopy = function deepCopy(obj) { + var str = (0, _stringify2.default)(obj); + return JSON.parse(str); +}; + +/** + * Simple util to parse resolution from metadata. + * + * @param {String} value + * The resolution value from metadata: e.g, `640,480`. + * @return {Object} + * The structured dimensions Object with `width` and `height` properties. + * + * @private + */ +var metadataResolutionToObject = exports.metadataResolutionToObject = function metadataResolutionToObject(value) { + if (typeof value === 'string') { + var dims = value.split(','); + return { + width: parseInt(dims[0]), + height: parseInt(dims[1]) + }; + } + return value; +}; + +/***/ }), +/* 42 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PlaybackView = undefined; + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _browser = __webpack_require__(4); + +var _browser2 = _interopRequireDefault(_browser); + +var _log = __webpack_require__(2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NAME = 'R5ProPlaybackView'; +var playbackId = 'red5pro-subscriber'; + +/** + * Bridge between DOM Element view and Subscriber implementation. + * Still used, but internalized as of 4.0.0. Up for deprecation, up for discussion. + * + * @private + */ + +var PlaybackView = exports.PlaybackView = function () { + + /** + * @param {String} elementId + * The element `id` to use for playback display. + * + * @private + */ + function PlaybackView() { + var elementId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : playbackId; + (0, _classCallCheck3.default)(this, PlaybackView); + + try { + // Target video/audio element. + this._targetElement = _browser2.default.resolveElement(elementId); + } catch (e) { + (0, _log.error)(NAME, 'Could not instantiate a new instance of Red5ProSubscriber. Reason: ' + e.message); + throw e; + } + } + + /** + * Associates Subscriber instance with this view manager. + * + * @param {Object} subscriber + * The Subscriber instance. + * + * @private + */ + + + (0, _createClass3.default)(PlaybackView, [{ + key: 'attachSubscriber', + value: function attachSubscriber(subscriber) { + (0, _log.debug)(NAME, '[attachsubscriber]'); + subscriber.setView(this, _browser2.default.getElementId(this._targetElement)); + } + + /** + * Assign the `MediaStream` object to the view. + * + * @param {MediaStream} mediaStream + * + * @private + */ + + }, { + key: 'attachStream', + value: function attachStream(mediaStream) { + var autoplay = this.isAutoplay; + (0, _log.debug)(NAME, '[attachstream]'); + _browser2.default.setVideoSource(this._targetElement, mediaStream, autoplay); + } + + /** + * Returns recognized `autoplay` attribute on the DOM element. + * + * @private + */ + + }, { + key: 'isAutoplay', + get: function get() { + return _browser2.default.hasAttributeDefined(this._targetElement, 'autoplay'); + } + + /** + * Returns the DOM element. + * + * @private + */ + + }, { + key: 'view', + get: function get() { + return this._targetElement; + } + }]); + return PlaybackView; +}(); + +exports.default = PlaybackView; + +/***/ }), +/* 43 */ +/***/ (function(module, exports) { + +module.exports = function(it, Constructor, name, forbiddenField){ + if(!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)){ + throw TypeError(name + ': incorrect invocation!'); + } return it; +}; + +/***/ }), +/* 44 */ +/***/ (function(module, exports, __webpack_require__) { + +// getting tag from 19.1.3.6 Object.prototype.toString() +var cof = __webpack_require__(35) + , TAG = __webpack_require__(9)('toStringTag') + // ES3 wrong here + , ARG = cof(function(){ return arguments; }()) == 'Arguments'; + +// fallback for IE11 Script Access Denied error +var tryGet = function(it, key){ + try { + return it[key]; + } catch(e){ /* empty */ } +}; + +module.exports = function(it){ + var O, T, B; + return it === undefined ? 'Undefined' : it === null ? 'Null' + // @@toStringTag case + : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T + // builtinTag case + : ARG ? cof(O) + // ES3 arguments fallback + : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; +}; + +/***/ }), +/* 45 */ +/***/ (function(module, exports) { + +// 7.2.1 RequireObjectCoercible(argument) +module.exports = function(it){ + if(it == undefined)throw TypeError("Can't call method on " + it); + return it; +}; + +/***/ }), +/* 46 */ +/***/ (function(module, exports) { + +module.exports = true; + +/***/ }), +/* 47 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +var anObject = __webpack_require__(16) + , dPs = __webpack_require__(177) + , enumBugKeys = __webpack_require__(64) + , IE_PROTO = __webpack_require__(70)('IE_PROTO') + , Empty = function(){ /* empty */ } + , PROTOTYPE = 'prototype'; + +// Create object with fake `null` prototype: use iframe Object with cleared prototype +var createDict = function(){ + // Thrash, waste and sodomy: IE GC bug + var iframe = __webpack_require__(63)('iframe') + , i = enumBugKeys.length + , lt = '<' + , gt = '>' + , iframeDocument; + iframe.style.display = 'none'; + __webpack_require__(98).appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); +}; + +module.exports = Object.create || function create(O, Properties){ + var result; + if(O !== null){ + Empty[PROTOTYPE] = anObject(O); + result = new Empty; + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : dPs(result, Properties); +}; + + +/***/ }), +/* 48 */ +/***/ (function(module, exports) { + +exports.f = {}.propertyIsEnumerable; + +/***/ }), +/* 49 */ +/***/ (function(module, exports, __webpack_require__) { + +// most Object methods by ES6 should accept primitives +var $export = __webpack_require__(10) + , core = __webpack_require__(3) + , fails = __webpack_require__(25); +module.exports = function(KEY, exec){ + var fn = (core.Object || {})[KEY] || Object[KEY] + , exp = {}; + exp[KEY] = exec(fn); + $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp); +}; + +/***/ }), +/* 50 */ +/***/ (function(module, exports, __webpack_require__) { + +var hide = __webpack_require__(21); +module.exports = function(target, src, safe){ + for(var key in src){ + if(safe && target[key])target[key] = src[key]; + else hide(target, key, src[key]); + } return target; +}; + +/***/ }), +/* 51 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.15 ToLength +var toInteger = __webpack_require__(72) + , min = Math.min; +module.exports = function(it){ + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 +}; + +/***/ }), +/* 52 */ +/***/ (function(module, exports) { + +var id = 0 + , px = Math.random(); +module.exports = function(key){ + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); +}; + +/***/ }), +/* 53 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.create = exports.isSupported = undefined; + +var _browser = __webpack_require__(4); + +var _browser2 = _interopRequireDefault(_browser); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Test for WebSocket support in environment. + * + * @return {Boolean} + * + * @private + */ +var isSupported = exports.isSupported = function isSupported() { + return _browser2.default.supportsWebSocket(); +}; + +/** + * Attempt at creating new instance of a `WebSocket` at endpoint URL. + * + * @param {String} url + * @return {WebSocket} + * + * @private + */ +var create = exports.create = function create(url) { + return _browser2.default.createWebSocket(url); +}; + +/***/ }), +/* 54 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PublishModeTypes = exports.PublishTypes = undefined; + +var _freeze = __webpack_require__(18); + +var _freeze2 = _interopRequireDefault(_freeze); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var PublishTypes = exports.PublishTypes = (0, _freeze2.default)({ + RTMP: 'rtmp', + RTC: 'rtc' +}); + +var PublishModeTypes = exports.PublishModeTypes = (0, _freeze2.default)({ + LIVE: 'live', + RECORD: 'record', + APPEND: 'append' +}); + +/***/ }), +/* 55 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.IceTransportTypes = undefined; + +var _freeze = __webpack_require__(18); + +var _freeze2 = _interopRequireDefault(_freeze); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Enumeration of Support ICE Transport types. + */ +var IceTransportTypes = exports.IceTransportTypes = (0, _freeze2.default)({ + UDP: 'udp', + TCP: 'tcp' +}); + +/***/ }), +/* 56 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.SharedObjectEventTypes = undefined; + +var _freeze = __webpack_require__(18); + +var _freeze2 = _interopRequireDefault(_freeze); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Common event types on SharedObject. + * + * @see {Red5ProSharedObject} + */ +var SharedObjectEventTypes = exports.SharedObjectEventTypes = (0, _freeze2.default)({ + CONNECT_SUCCESS: 'Connect.Success', + CONNECT_FAILURE: 'Connect.Failure', + PROPERTY_UPDATE: 'SharedObject.PropertyUpdate', + METHOD_UPDATE: 'SharedObject.MethodUpdate' +}); + +/***/ }), +/* 57 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _browser = __webpack_require__(4); + +var _browser2 = _interopRequireDefault(_browser); + +var _log = __webpack_require__(2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NAME = 'R5ProPublishView'; +var publisherId = 'red5pro-publisher'; + +/** + * Bridge between DOM Element view and Publisher implementation. + * Still used, but internalized as of 4.0.0. Up for deprecation, up for discussion. + * + * @private + */ + +var PublishView = function () { + + /** + * @param {String} elementId + * The element `id` to use for playback display. + * @private + */ + function PublishView() { + var elementId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : publisherId; + (0, _classCallCheck3.default)(this, PublishView); + + try { + this._targetElement = _browser2.default.resolveElement(elementId); + } catch (e) { + (0, _log.error)(NAME, 'Could not instantiate a new instance of Red5ProPublisher. Reason: ' + e.message); + throw e; + } + } + + (0, _createClass3.default)(PublishView, [{ + key: 'attachPublisher', + value: function attachPublisher(publisher) { + (0, _log.debug)(NAME, '[attachpublisher]'); + publisher.setView(this, _browser2.default.getElementId(this._targetElement)); + } + }, { + key: 'preview', + value: function preview(mediaStream) { + var autoplay = this.isAutoplay; + (0, _log.debug)(NAME, '[preview]: autoplay(' + autoplay + ')'); + _browser2.default.setVideoSource(this._targetElement, mediaStream, autoplay); + } + }, { + key: 'isAutoplay', + get: function get() { + return _browser2.default.hasAttributeDefined(this._targetElement, 'autoplay'); + } + }, { + key: 'view', + get: function get() { + return this._targetElement; + } + }]); + return PublishView; +}(); + +exports.default = PublishView; + +/***/ }), +/* 58 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(160), __esModule: true }; + +/***/ }), +/* 59 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _iterator = __webpack_require__(141); + +var _iterator2 = _interopRequireDefault(_iterator); + +var _symbol = __webpack_require__(140); + +var _symbol2 = _interopRequireDefault(_symbol); + +var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; }; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) { + return typeof obj === "undefined" ? "undefined" : _typeof(obj); +} : function (obj) { + return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj); +}; + +/***/ }), +/* 60 */ +/***/ (function(module, exports) { + +module.exports = function(it){ + if(typeof it != 'function')throw TypeError(it + ' is not a function!'); + return it; +}; + +/***/ }), +/* 61 */ +/***/ (function(module, exports, __webpack_require__) { + +// 0 -> Array#forEach +// 1 -> Array#map +// 2 -> Array#filter +// 3 -> Array#some +// 4 -> Array#every +// 5 -> Array#find +// 6 -> Array#findIndex +var ctx = __webpack_require__(19) + , IObject = __webpack_require__(65) + , toObject = __webpack_require__(32) + , toLength = __webpack_require__(51) + , asc = __webpack_require__(169); +module.exports = function(TYPE, $create){ + var IS_MAP = TYPE == 1 + , IS_FILTER = TYPE == 2 + , IS_SOME = TYPE == 3 + , IS_EVERY = TYPE == 4 + , IS_FIND_INDEX = TYPE == 6 + , NO_HOLES = TYPE == 5 || IS_FIND_INDEX + , create = $create || asc; + return function($this, callbackfn, that){ + var O = toObject($this) + , self = IObject(O) + , f = ctx(callbackfn, that, 3) + , length = toLength(self.length) + , index = 0 + , result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined + , val, res; + for(;length > index; index++)if(NO_HOLES || index in self){ + val = self[index]; + res = f(val, index, O); + if(TYPE){ + if(IS_MAP)result[index] = res; // map + else if(res)switch(TYPE){ + case 3: return true; // some + case 5: return val; // find + case 6: return index; // findIndex + case 2: result.push(val); // filter + } else if(IS_EVERY)return false; // every + } + } + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; + }; +}; + +/***/ }), +/* 62 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(11) + , $export = __webpack_require__(10) + , meta = __webpack_require__(30) + , fails = __webpack_require__(25) + , hide = __webpack_require__(21) + , redefineAll = __webpack_require__(50) + , forOf = __webpack_require__(36) + , anInstance = __webpack_require__(43) + , isObject = __webpack_require__(13) + , setToStringTag = __webpack_require__(38) + , dP = __webpack_require__(14).f + , each = __webpack_require__(61)(0) + , DESCRIPTORS = __webpack_require__(17); + +module.exports = function(NAME, wrapper, methods, common, IS_MAP, IS_WEAK){ + var Base = global[NAME] + , C = Base + , ADDER = IS_MAP ? 'set' : 'add' + , proto = C && C.prototype + , O = {}; + if(!DESCRIPTORS || typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function(){ + new C().entries().next(); + }))){ + // create collection constructor + C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); + redefineAll(C.prototype, methods); + meta.NEED = true; + } else { + C = wrapper(function(target, iterable){ + anInstance(target, C, NAME, '_c'); + target._c = new Base; + if(iterable != undefined)forOf(iterable, IS_MAP, target[ADDER], target); + }); + each('add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON'.split(','),function(KEY){ + var IS_ADDER = KEY == 'add' || KEY == 'set'; + if(KEY in proto && !(IS_WEAK && KEY == 'clear'))hide(C.prototype, KEY, function(a, b){ + anInstance(this, C, KEY); + if(!IS_ADDER && IS_WEAK && !isObject(a))return KEY == 'get' ? undefined : false; + var result = this._c[KEY](a === 0 ? 0 : a, b); + return IS_ADDER ? this : result; + }); + }); + if('size' in proto)dP(C.prototype, 'size', { + get: function(){ + return this._c.size; + } + }); + } + + setToStringTag(C, NAME); + + O[NAME] = C; + $export($export.G + $export.W + $export.F, O); + + if(!IS_WEAK)common.setStrong(C, NAME, IS_MAP); + + return C; +}; + +/***/ }), +/* 63 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(13) + , document = __webpack_require__(11).document + // in old IE typeof document.createElement is 'object' + , is = isObject(document) && isObject(document.createElement); +module.exports = function(it){ + return is ? document.createElement(it) : {}; +}; + +/***/ }), +/* 64 */ +/***/ (function(module, exports) { + +// IE 8- don't enum bug keys +module.exports = ( + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' +).split(','); + +/***/ }), +/* 65 */ +/***/ (function(module, exports, __webpack_require__) { + +// fallback for non-array-like ES3 and non-enumerable old V8 strings +var cof = __webpack_require__(35); +module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){ + return cof(it) == 'String' ? it.split('') : Object(it); +}; + +/***/ }), +/* 66 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var LIBRARY = __webpack_require__(46) + , $export = __webpack_require__(10) + , redefine = __webpack_require__(69) + , hide = __webpack_require__(21) + , has = __webpack_require__(20) + , Iterators = __webpack_require__(29) + , $iterCreate = __webpack_require__(174) + , setToStringTag = __webpack_require__(38) + , getPrototypeOf = __webpack_require__(107) + , ITERATOR = __webpack_require__(9)('iterator') + , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next` + , FF_ITERATOR = '@@iterator' + , KEYS = 'keys' + , VALUES = 'values'; + +var returnThis = function(){ return this; }; + +module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){ + $iterCreate(Constructor, NAME, next); + var getMethod = function(kind){ + if(!BUGGY && kind in proto)return proto[kind]; + switch(kind){ + case KEYS: return function keys(){ return new Constructor(this, kind); }; + case VALUES: return function values(){ return new Constructor(this, kind); }; + } return function entries(){ return new Constructor(this, kind); }; + }; + var TAG = NAME + ' Iterator' + , DEF_VALUES = DEFAULT == VALUES + , VALUES_BUG = false + , proto = Base.prototype + , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT] + , $default = $native || getMethod(DEFAULT) + , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined + , $anyNative = NAME == 'Array' ? proto.entries || $native : $native + , methods, key, IteratorPrototype; + // Fix native + if($anyNative){ + IteratorPrototype = getPrototypeOf($anyNative.call(new Base)); + if(IteratorPrototype !== Object.prototype){ + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis); + } + } + // fix Array#{values, @@iterator}.name in V8 / FF + if(DEF_VALUES && $native && $native.name !== VALUES){ + VALUES_BUG = true; + $default = function values(){ return $native.call(this); }; + } + // Define iterator + if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){ + hide(proto, ITERATOR, $default); + } + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if(DEFAULT){ + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries + }; + if(FORCED)for(key in methods){ + if(!(key in proto))redefine(proto, key, methods[key]); + } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; +}; + +/***/ }), +/* 67 */ +/***/ (function(module, exports, __webpack_require__) { + +var pIE = __webpack_require__(48) + , createDesc = __webpack_require__(37) + , toIObject = __webpack_require__(22) + , toPrimitive = __webpack_require__(73) + , has = __webpack_require__(20) + , IE8_DOM_DEFINE = __webpack_require__(99) + , gOPD = Object.getOwnPropertyDescriptor; + +exports.f = __webpack_require__(17) ? gOPD : function getOwnPropertyDescriptor(O, P){ + O = toIObject(O); + P = toPrimitive(P, true); + if(IE8_DOM_DEFINE)try { + return gOPD(O, P); + } catch(e){ /* empty */ } + if(has(O, P))return createDesc(!pIE.f.call(O, P), O[P]); +}; + +/***/ }), +/* 68 */ +/***/ (function(module, exports) { + +exports.f = Object.getOwnPropertySymbols; + +/***/ }), +/* 69 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(21); + +/***/ }), +/* 70 */ +/***/ (function(module, exports, __webpack_require__) { + +var shared = __webpack_require__(71)('keys') + , uid = __webpack_require__(52); +module.exports = function(key){ + return shared[key] || (shared[key] = uid(key)); +}; + +/***/ }), +/* 71 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(11) + , SHARED = '__core-js_shared__' + , store = global[SHARED] || (global[SHARED] = {}); +module.exports = function(key){ + return store[key] || (store[key] = {}); +}; + +/***/ }), +/* 72 */ +/***/ (function(module, exports) { + +// 7.1.4 ToInteger +var ceil = Math.ceil + , floor = Math.floor; +module.exports = function(it){ + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); +}; + +/***/ }), +/* 73 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.1 ToPrimitive(input [, PreferredType]) +var isObject = __webpack_require__(13); +// instead of the ES6 spec version, we didn't implement @@toPrimitive case +// and the second argument - flag - preferred type is a string +module.exports = function(it, S){ + if(!isObject(it))return it; + var fn, val; + if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; + if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val; + if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; + throw TypeError("Can't convert object to primitive value"); +}; + +/***/ }), +/* 74 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(11) + , core = __webpack_require__(3) + , LIBRARY = __webpack_require__(46) + , wksExt = __webpack_require__(75) + , defineProperty = __webpack_require__(14).f; +module.exports = function(name){ + var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); + if(name.charAt(0) != '_' && !(name in $Symbol))defineProperty($Symbol, name, {value: wksExt.f(name)}); +}; + +/***/ }), +/* 75 */ +/***/ (function(module, exports, __webpack_require__) { + +exports.f = __webpack_require__(9); + +/***/ }), +/* 76 */ +/***/ (function(module, exports, __webpack_require__) { + +var classof = __webpack_require__(44) + , ITERATOR = __webpack_require__(9)('iterator') + , Iterators = __webpack_require__(29); +module.exports = __webpack_require__(3).getIteratorMethod = function(it){ + if(it != undefined)return it[ITERATOR] + || it['@@iterator'] + || Iterators[classof(it)]; +}; + +/***/ }), +/* 77 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.embedSwfObject = exports.defineEmbedElement = undefined; + +var _browser = __webpack_require__(4); + +var _browser2 = _interopRequireDefault(_browser); + +var _promise = __webpack_require__(5); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Replaces a `video` element with a container for embedding a Flash object. + * + * @param {Element} targetElement + * @param {Element} targetParent + * + * @private + */ +var defineEmbedElement = exports.defineEmbedElement = function defineEmbedElement(targetElement, targetParent) { + var dfd = new _promise.DeferredPromise(); + var elementId = targetElement.id; + if (targetElement.nodeName.toLowerCase() === 'video') { + var div = _browser2.default.createElement('div'); + div.id = elementId + '_rtmp'; + targetParent.appendChild(div); + if (targetElement.parentElement) { + targetElement.parentElement.removeChild(targetElement); + } + dfd.resolve(div.id); + } else { + dfd.resolve(elementId); + } + return dfd.promise; +}; + +/** + * Request to embed a Flash object using SWFObject library. + * + * @param {String} idName + * @param {Object} options + * Initialization configuration map. + * @param {Object} flashvars + * The FlashVars to pass into the embedded object. + * @param {Object} swfobject + * The loaded SWFObject library util. + * @param {String} elementId + * The id of the Element to embed. + * @return {Promise} + * + * @private + */ +var embedSwfObject = exports.embedSwfObject = function embedSwfObject(idName, options, flashvars, swfobject, elementId) { + var dfd = new _promise.DeferredPromise(); + var params = { + quality: 'high', + wmode: 'opaque', + bgcolor: options.backgroundColor || '#000', + allowscriptaccess: 'always', + allowfullscreen: 'true', + allownetworking: 'all' + }; + var attributes = { + id: idName, + name: idName, + align: 'middle' + }; + if (swfobject.hasFlashPlayerVersion(options.minFlashVersion)) { + swfobject.embedSWF(options.swf, elementId, options.embedWidth || 640, options.embedHeight || 480, options.minFlashVersion, options.productInstallURL, flashvars, params, attributes, function (result) { + if (result.success) { + dfd.resolve(); + } else { + dfd.reject('Flash Object embed failed.'); + } + }); + } else { + dfd.reject('Flash Player Version is not supported.'); + } + return dfd.promise; +}; + +/***/ }), +/* 78 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.applyOrientation = undefined; + +var _browser = __webpack_require__(4); + +var _browser2 = _interopRequireDefault(_browser); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var requestFrame = _browser2.default.requestFrame; + +/* || Translation Styles used on Orientation-change metadata from Mobile broadcasters. || */ + +var origin = ['webkitTransformOrigin', 'mozTransformOrigin', 'msTransformOrigin', 'oTransformOrigin', 'transformOrigin']; +var styles = ['webkitTransform', 'mozTransform', 'msTransform', 'oTransform', 'transform']; +var transition = ['webkitTransition', 'mozTransition', 'msTransition', 'oTransition', 'transition']; +var rotationTranslations = { + '0': { + origin: 'center center', + transform: 'rotate(0deg)' + }, + '90': { + origin: 'left top', + transform: 'rotate(90deg) translateY(-100%)' + }, + '180': { + origin: 'center center', + transform: 'rotate(180deg)' + }, + '270': { + origin: 'top left', + transform: 'rotate(270deg) translateX(-100%) translateY(0%)' + }, + '-90': { + origin: 'left top', + transform: 'rotate(-90deg) translateX(-100%)' + }, + '-180': { + origin: 'center center', + transform: 'rotate(-180deg)' + }, + '-270': { + origin: 'top left', + transform: 'rotate(-270deg) translateY(-100%)' + } + + /* Utility method to track and resize an element on enter frame. */ +};var trackResize = function trackResize(element, raf) { + var isRotated = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + + return function () { + var parent = element.parentNode; + if (parent) { + var pwidth = parent.clientWidth; + var pheight = parent.clientHeight; + if (isRotated) { + element.style.width = pheight + 'px'; + } else { + element.style.width = pwidth + 'px'; + } + var ewidth = element.clientWidth; + var eheight = element.clientHeight; + var margin = (isRotated ? pwidth - eheight : pwidth - ewidth) * 0.5; + element.style.position = 'relative'; + element.style.left = margin + 'px'; + } + if (raf) { + raf(trackResize(element, raf, isRotated)); + } + }; +}; + +var applyOrientation = exports.applyOrientation = function applyOrientation(element, value, resolution) { + // eslint-disable-line no-unused-vars + var i = void 0, + length = styles.length; + value = value % 360; + var isRotated = value % 180 !== 0; + var parent = element.parentNode; + var pwidth = element.width ? element.width : parent.clientWidth; + var pheight = element.height ? element.height : parent.clientHeight; + var translations = rotationTranslations[value.toString()]; + for (i = 0; i < length; i++) { + element.style[origin[i]] = translations.origin; + element.style[styles[i]] = translations.transform; + element.style[transition[i]] = 'transform 0.0s linear'; + } + if (isRotated) { + // const scale = pwidth > pheight ? pheight / pwidth : pwidth / pheight + element.style.width = pheight + 'px'; + parent.style.height = pheight + 'px'; + // element.style.height = (pwidth * scale) + 'px' + } else { + element.style.width = pwidth + 'px'; + element.style.height = pheight + 'px'; + // parent.style.width = pwidth + 'px' + } + + if (document.attachEvent) { + parent.attachEvent('resize', trackResize(element, requestFrame, isRotated)); + } else { + trackResize(element, requestFrame, isRotated)(); + } +}; + +/***/ }), +/* 79 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.RTMPPublisherEventTypes = exports.RTCPublisherEventTypes = exports.FailoverPublisherEventTypes = exports.PublisherEventTypes = undefined; + +var _freeze = __webpack_require__(18); + +var _freeze2 = _interopRequireDefault(_freeze); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Common Publisher-based event types. + */ +var PublisherEventTypes = exports.PublisherEventTypes = (0, _freeze2.default)({ + CONNECT_SUCCESS: 'Connect.Success', + CONNECT_FAILURE: 'Connect.Failure', + PUBLISH_START: 'Publish.Start', + PUBLISH_FAIL: 'Publish.Fail', + PUBLISH_INVALID_NAME: 'Publish.InvalidName', + UNPUBLISH_SUCCESS: 'Unpublish.Success', + PUBLISH_METADATA: 'Publish.Metadata', + CONNECTION_CLOSED: 'Publisher.Connection.Closed', + DIMENSION_CHANGE: 'Publisher.Video.DimensionChange' +}); + +/** + * Event types dispacthed from and specific to `Red5ProPublisher`. + * + * @see {Red5ProPublisher} + */ +var FailoverPublisherEventTypes = exports.FailoverPublisherEventTypes = (0, _freeze2.default)({ + PUBLISHER_REJECT: 'Publisher.Reject', + PUBLISHER_ACCEPT: 'Publisher.Accept' +}); + +/** + * Event types dispatched from and specific to `RTCPublisher`. + * + * @see {RTCPublisher} + */ +var RTCPublisherEventTypes = exports.RTCPublisherEventTypes = (0, _freeze2.default)({ + MEDIA_STREAM_AVAILABLE: 'WebRTC.MediaStream.Available', + PEER_CONNECTION_AVAILABLE: 'WebRTC.PeerConnection.Available', + OFFER_START: 'WebRTC.Offer.Start', + OFFER_END: 'WebRTC.Offer.End', + ICE_TRICKLE_COMPLETE: 'WebRTC.IceTrickle.Complete' +}); + +/** + * Event types dispatched from and specific to `RTMPPublisher`. + * + * @see {RTMPPublisher} + */ +var RTMPPublisherEventTypes = exports.RTMPPublisherEventTypes = (0, _freeze2.default)({ + EMBED_SUCCESS: 'FlashPlayer.Embed.Success', + EMBED_FAILURE: 'FlashPlayer.Embed.Failure' +}); + +/***/ }), +/* 80 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.RTMPSubscriberEventTypes = exports.RTCSubscriberEventTypes = exports.FailoverSubscriberEventTypes = exports.SubscriberEventTypes = undefined; + +var _freeze = __webpack_require__(18); + +var _freeze2 = _interopRequireDefault(_freeze); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Common event types on all Subscribers. + */ +var SubscriberEventTypes = exports.SubscriberEventTypes = (0, _freeze2.default)({ + CONNECT_SUCCESS: 'Connect.Success', + CONNECT_FAILURE: 'Connect.Failure', + SUBSCRIBE_START: 'Subscribe.Start', + SUBSCRIBE_STOP: 'Subscribe.Stop', + SUBSCRIBE_FAIL: 'Subscribe.Fail', + SUBSCRIBE_INVALID_NAME: 'Subscribe.InvalidName', + SUBSCRIBE_METADATA: 'Subscribe.Metadata', + SUBSCRIBE_SEND_INVOKE: 'Subscribe.Send.Invoke', + PLAY_UNPUBLISH: 'Subscribe.Play.Unpublish', + CONNECTION_CLOSED: 'Subscribe.Connection.Closed', + ORIENTATION_CHANGE: 'Subscribe.Orientation.Change', + VOLUME_CHANGE: 'Subscribe.Volume.Change', + PLAYBACK_TIME_UPDATE: 'Subscribe.Time.Update', + PLAYBACK_STATE_CHANGE: 'Subscribe.Playback.Change', + FULL_SCREEN_STATE_CHANGE: 'Subscribe.FullScreen.Change' +}); + +/** + * Event types dispatched from and specific to `Red5ProSubscriber`. + * + * @see {Red5ProSubscriber} + */ +var FailoverSubscriberEventTypes = exports.FailoverSubscriberEventTypes = (0, _freeze2.default)({ + SUBSCRIBER_REJECT: 'Subscriber.Reject', + SUBSCRIBER_ACCEPT: 'Subscriber.Accept' +}); + +/** + * Event types dispatched from and specific to `RTCSubscriber`. + * + * @see {RTCSubscriber} + */ +var RTCSubscriberEventTypes = exports.RTCSubscriberEventTypes = (0, _freeze2.default)({ + PEER_CONNECTION_AVAILABLE: 'WebRTC.PeerConnection.Available', + OFFER_START: 'WebRTC.Offer.Start', + OFFER_END: 'WebRTC.Offer.End', + ANSWER_START: 'WebRTC.Answer.Start', + ANSWER_END: 'WebRTC.Answer.End', + CANDIDATE_START: 'WebRTC.Candidate.Start', + CANDIDATE_END: 'WebRTC.Candidate.End', + ICE_TRICKLE_COMPLETE: 'WebRTC.IceTrickle.Complete', + ON_ADD_STREAM: 'WebRTC.Add.Stream' +}); + +/** + * Event type dispatched from and specific to `RTMPSubscriber`. + * + * @see {RTMPSubscriber} + */ +var RTMPSubscriberEventTypes = exports.RTMPSubscriberEventTypes = (0, _freeze2.default)({ + EMBED_SUCCESS: 'FlashPlayer.Embed.Success', + EMBED_FAILURE: 'FlashPlayer.Embed.Failure' +}); + +/***/ }), +/* 81 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _stringify = __webpack_require__(12); + +var _stringify2 = _interopRequireDefault(_stringify); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _browser = __webpack_require__(4); + +var _browser2 = _interopRequireDefault(_browser); + +var _log = __webpack_require__(2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NAME = 'R5ProRTMPSharedObjectHandler'; + +/** + * Flash-based SharedObject handler. + * + * @private + */ + +var RTMPSharedObjectHandler = function () { + function RTMPSharedObjectHandler() { + (0, _classCallCheck3.default)(this, RTMPSharedObjectHandler); + + this._element = undefined; + this._responseHandlers = []; + } + + /** + * Adds a response handler for SharedObject events. + * + * @param {Object} handler + */ + + + (0, _createClass3.default)(RTMPSharedObjectHandler, [{ + key: 'addResponseHandler', + value: function addResponseHandler(handler) { + this._responseHandlers.push(handler); + } + + /** + * Removes a response handler from SharedObject events. + * + * @param {Object} handler + */ + + }, { + key: 'removeResponseHandler', + value: function removeResponseHandler(handler) { + var i = this._responseHandlers.length; + var rHandler = void 0; + while (--i > -1) { + rHandler = this._responseHandlers[i]; + if (rHandler === handler) { + this._responseHandlers.splice(i, 1); + return; + } + } + } + + /** + * Handles an event from a SharedObject. + * + * @param {Object} event + */ + + }, { + key: 'handleSharedObjectEvent', + value: function handleSharedObjectEvent(event) { + (0, _log.debug)(NAME, '[sharedobject:event]'); + var i = void 0; + var length = this._responseHandlers.length; + var handler = void 0; + for (i = 0; i < length; i++) { + handler = this._responseHandlers[i]; + if (handler.respond(JSON.parse(event))) { + break; + } + } + } + + /** + * Assigns a global response handler for SharedObject communication through Flash object over ExternalInterface. + * + * @param {String} name + * @param {Element} el + * The object embed element. + */ + + }, { + key: 'assignSharedObjectResponder', + value: function assignSharedObjectResponder(name, el) { + var _handleSharedObjectEvent = this.handleSharedObjectEvent.bind(this); + var elId = el.id.split('-').join('_'); + var handlerName = ['handleSharedObjectEvent', elId].join('_'); + (0, _log.debug)(NAME, '[assign:sharedobject:responder] :: ' + elId); + (0, _log.debug)(NAME, '[sharedoject:responder] :: ' + handlerName); + el.setSharedObjectResponder(name, handlerName); + _browser2.default.setGlobal(handlerName, _handleSharedObjectEvent); + } + + /** + * Request to connect to SharedObject. + */ + + }, { + key: 'connect', + value: function connect(swfId) { + this._element = _browser2.default.getEmbedObject(swfId); + if (!this._element) { + (0, _log.warn)('Could not locate embedded Flash object for id: ' + swfId); + } + } + + /** + * Request to disconnect to SharedObject. + */ + + }, { + key: 'disconnect', + value: function disconnect() { + while (this._responseHandlers.length > 0) { + this._responseHandlers.shift(); + } + } + + /** + * Attempt to send method update to SharedObject. + * + * @param {String} name + * @param {String} callName + * @param {Object} message + * String or Object that will be serialized to a JSON string. + */ + + }, { + key: 'sendToSharedObject', + value: function sendToSharedObject(name, callName, message) { + (0, _log.debug)(NAME, '[sendToSharedObject]'); + try { + this._element.sharedObjectSend(name, callName, typeof message === 'string' ? message : (0, _stringify2.default)(message)); + } catch (e) { + (0, _log.warn)('Could not send to shared object (' + name + '). Error: ' + e.message); + } + } + + /** + * Attempt to update property on SharedObject. + * + * @param {String} name + * @param {String} key + * @param {Object} value + */ + + }, { + key: 'sendPropertyToSharedObject', + value: function sendPropertyToSharedObject(name, key, value) { + (0, _log.debug)(NAME, '[sendPropertyToSharedObject]'); + try { + this._element.sharedObjectSendProperty(name, key, value); + } catch (e) { + (0, _log.warn)('Could not send to shared object (' + name + '). Error: ' + e.message); + } + } + + /** + * Request to get remote ShareObject by name. + * + * @param {String} sharedObjectName + */ + + }, { + key: 'getRemoteSharedObject', + value: function getRemoteSharedObject(sharedObjectName) { + (0, _log.debug)(NAME, '[getRemoteSharedObject]'); + try { + this.assignSharedObjectResponder(sharedObjectName, this._element); + this._element.getRemoteSharedObject(sharedObjectName); + } catch (e) { + (0, _log.warn)('Could not get remote shared object (' + name + '). Error: ' + e.message); + } + } + + /** + * Request to connect to SharedObject by name. + * + * @param {String} sharedObjectName + */ + + }, { + key: 'connectToSharedObject', + value: function connectToSharedObject(sharedObjectName) { + (0, _log.debug)(NAME, '[connectToSharedObject]'); + try { + this._element.connectToSharedObject(sharedObjectName); + } catch (e) { + (0, _log.warn)('Could not connect to shared object (' + name + '). Error: ' + e.message); + } + } + + /** + * Request to close SharedObject connection by name. + * + * @param {String} sharedObjectName + */ + + }, { + key: 'closeSharedObject', + value: function closeSharedObject(sharedObjectName) { + (0, _log.debug)(NAME, '[disconnectToSharedObject]'); + try { + this._element.disconnectFromSharedObject(sharedObjectName); + } catch (e) { + (0, _log.warn)('Could not disconnect to shared object (' + name + '). Error: ' + e.message); + } + } + }]); + return RTMPSharedObjectHandler; +}(); + +exports.default = RTMPSharedObjectHandler; + +/***/ }), +/* 82 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _stringify = __webpack_require__(12); + +var _stringify2 = _interopRequireDefault(_stringify); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _websocket = __webpack_require__(53); + +var websocket = _interopRequireWildcard(_websocket); + +var _browser = __webpack_require__(4); + +var _browser2 = _interopRequireDefault(_browser); + +var _promise = __webpack_require__(5); + +var _log = __webpack_require__(2); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Base Proxy for communication with WebSocket. + * + * @private + */ +var SocketHelper = function () { + function SocketHelper(responder, name) { + (0, _classCallCheck3.default)(this, SocketHelper); + + this._responder = responder; + this._pendingPostRequests = []; + this._websocket = undefined; + this._connectionPromise = undefined; + this._name = name; + this._responseHandlers = []; + this._isTerminated = false; + this._retryCount = 0; + this._retryLimit = 1; + this._onclose = this.tearDown.bind(this); + + this._asyncTickets = []; + } + + /** + * Removes event handlers from WebSocket. + * + * @param {WebSocket} ws + * + * @private + */ + + + (0, _createClass3.default)(SocketHelper, [{ + key: '_removeSocketHandlers', + value: function _removeSocketHandlers(ws) { + ws.onopen = undefined; + ws.onmessage = undefined; + ws.onerror = undefined; + ws.onclose = undefined; + } + + /** + * Assigns event handler to WebSocket. + * + * @param {WebSocket} ws + * @param {Promise} + * The `Promise` to reject on error in connection to WebSocket. + * + * @private + */ + + }, { + key: '_addSocketHandlers', + value: function _addSocketHandlers(ws, promise) { + var _this = this; + + ws.onopen = function () { + (0, _log.info)(_this._name, '[websocketopen]'); + while (_this._pendingPostRequests.length > 0) { + _this.post(_this._pendingPostRequests.shift()); + } + }; + + ws.onerror = function (error) { + _this.tearDown(); + (0, _log.warn)(_this._name, '[websocketerror]: Error from WebSocket. ' + error.type); + promise.reject(error); + }; + + ws.onmessage = function (message) { + _this.respond(message); + }; + + ws.onclose = function (event) { + (0, _log.warn)(_this._name, '[websocketclose]: ' + event.code); + if (_this._responder) { + _this._responder.onSocketClose(event); + } + _this.tearDown(); + }; + } + + /** + * Handler for unexpected error through WebSocket. + * + * @param {Object} error + * + * @private + */ + + }, { + key: '_onUnexpectedSocketError', + value: function _onUnexpectedSocketError(error) { + if (this._responder) { + this._responder.onSocketClose(error); + } + (0, _log.warn)(this._name, '[websocketerror]: Unexpected Error from WebSocket. ' + error.type + ', ' + error.detail); + this.tearDown(); + } + + /** + * Clears the retry count to allow for single publisher to retry again after an unpublish. + * + * @private + */ + + }, { + key: 'clearRetry', + value: function clearRetry() { + this._retryCount = 0; + } + + /** + * Request to setup WebSocket connection for communication. + * + * @param {String} url + * Endpoint URL of the socket to connect to. + * @param {Promise} setupPromise + * The `Promise` to resolve or reject on success of setup WebSocket connection. + */ + + }, { + key: 'setUp', + value: function setUp(url, setupPromise) { + var _this2 = this; + + var isMoz = _browser2.default.getIsMoz(); + this.tearDown(); + this._isTerminated = false; + this._connectionPromise = setupPromise; + _browser2.default.addCloseHandler(this._onclose); + this._websocket = websocket.create(url); + this._addSocketHandlers(this._websocket, this._connectionPromise); + if (isMoz && this._retryCount++ < this._retryLimit) { + (0, _log.debug)(this._name, 'We have determined it is Firefox and are setting up a retry limit.'); + var timeout = setTimeout(function () { + if (_this2._websocket.readyState === 0) { + (0, _log.debug)(_this2._name, 'Our connection on Firefox to the wss endpoint has timed out. Let\'s try that again.'); + _this2.tearDown(); + _this2.setUp(url, setupPromise); + } + clearTimeout(timeout); + }, 2000); + } + } + + /** + * Request to tear down any WebSocket connection. + */ + + }, { + key: 'tearDown', + value: function tearDown() { + this._pendingPostRequests.length = 0; + if (typeof this._websocket !== 'undefined') { + this._removeSocketHandlers(this._websocket); + this._websocket.close(); + } + this._websocket = undefined; + this._isTerminated = true; + while (this._responseHandlers.length > 0) { + this._responseHandlers.shift(); + } + _browser2.default.removeCloseHandler(this._onclose); + } + + /** + * Request to parse JSON from message received over WebSocket. + * + * @param {Object} message + * String or Object. + */ + + }, { + key: 'getJsonFromSocketMessage', + value: function getJsonFromSocketMessage(message) { + try { + return typeof message.data === 'string' ? JSON.parse(message.data) : message.data; + } catch (e) { + (0, _log.warn)(this._name, 'Could not parse message as JSON. Message= ' + message.data + '. Error= ' + e.message); + } + return null; + } + + /** + * Adds a SharedObject response handler. Handlers are requested to respond to a message in `handleMessageResponse`. + * + * @param {Object} handler + */ + + }, { + key: 'addSharedObjectResponseHandler', + value: function addSharedObjectResponseHandler(handler) { + this._responseHandlers.push(handler); + } + + /** + * Removes a SharedObject response handler. + * + * @param {Object} handler + */ + + }, { + key: 'removeSharedObjectResponseHandler', + value: function removeSharedObjectResponseHandler(handler) { + var i = this._responseHandlers.length; + var rHandler = void 0; + while (--i > -1) { + rHandler = this._responseHandlers[i]; + if (rHandler === handler) { + this._responseHandlers.splice(i, 1); + return; + } + } + } + + /** + * Traverses list of response handlers and returns flag of it being handled within the chain. + * + * @param {Object} message + * @return {Boolean} + */ + + }, { + key: 'handleMessageResponse', + value: function handleMessageResponse(message) { + var i = void 0, + handler = void 0; + var length = this._responseHandlers.length; + for (i = 0; i < length; i++) { + handler = this._responseHandlers[i]; + if (handler.respond(message)) { + return true; + } + } + return false; + } + + /** + * Request to post notification of end of candidates in WebRTC scenario. + */ + + }, { + key: 'postEndOfCandidates', + value: function postEndOfCandidates(streamName) { + this.post({ + handleCandidate: streamName, + data: { + candidate: { + type: 'candidate', + candidate: '' + } + } + }); + } + + /** + * Request to post data over WebSocket connection. + * Queues messages if WebSocket connection is still being established. + * + * @param {Object} sendRequest + */ + + }, { + key: 'post', + value: function post(sendRequest) { + if (this._websocket !== undefined && this._websocket.readyState === 1 /* WebSocket.OPEN */) { + try { + (0, _log.debug)(this._name, '[websocket-post]: ' + (0, _stringify2.default)(sendRequest, null, 2)); + this._websocket.send((0, _stringify2.default)(sendRequest)); + return true; + } catch (e) { + (0, _log.debug)(this._name, 'Could not send request: ' + sendRequest + '. ' + e); + return false; + } + } else if (this._websocket !== undefined && (this._websocket.readyState === 2 || this._websocket.readyState === 3)) /* WebSocket.(CLOSING | CLOSED) */{ + return false; + } else if (this._isTerminated) { + return false; + } else { + this._pendingPostRequests.push(sendRequest); + return true; + } + } + }, { + key: 'postAsync', + value: function postAsync(sendRequest) { + var p = new _promise.DeferredPromise(); + var id = Math.floor(Math.random() * 0x10000).toString(16); + sendRequest.id = id; + sendRequest.async = true; + this._asyncTickets.push({ id: id, promise: p }); + this.post(sendRequest); + return p.promise; + } + + /** + * Responds to messages coming over the WebSocket connection. + * + * @param {Object} message + */ + + }, { + key: 'respond', + value: function respond(message) { + // eslint-disable-line no-unused-vars + var handled = this.handleMessageResponse(message); + if (!handled && message.data) { + var json = this.getJsonFromSocketMessage(message); + if (json === null) { + (0, _log.warn)(this._name, 'Determined websocket response not in correct format. Aborting message handle.'); + return true; + } + (0, _log.debug)(this._name, '[websocket-response]: ' + (0, _stringify2.default)(json, null, 2)); + if (json.isAvailable !== undefined) { + if (typeof json.isAvailable === 'boolean' && json.isAvailable) { + this._responder.onStreamAvailable(json); + return true; + } else { + this._responder.onStreamUnavailable(json); + return true; + } + } else if (json.async && json.id) { + var ticket = this._asyncTickets.find(function (el) { + return el.id === json.id; + }); + var promise = ticket.promise; + + if (promise && json.data) { + promise.resolve(json.data); + } else if (promise && json.error) { + promise.reject(json.error); + } + } else if (json.data !== undefined) { + var data = json.data; + + if (data.message !== undefined) { + if (data.type === 'error') { + this._responder.onSocketMessageError(data.message, data.detail); + return true; + } + } else if (data.type === 'status') { + if (data.code === 'NetConnection.Connect.Success') { + this._websocket.onerror = this._onUnexpectedSocketError.bind(this); + this._connectionPromise.resolve(); + return true; + } else if (data.code === 'NetConnection.Connect.Rejected') { + this._connectionPromise.reject('NetConnection.Connect.Rejected'); + return true; + } + } else if (data.type === 'error') { + if (data.code === 'NetConnection.Connect.Rejected') { + this._connectionPromise.reject('NetConnection.Connect.Rejected'); + return true; + } else if (data.code === 'NetConnection.Connect.Failed') { + this._connectionPromise.reject('NetConnection.Connect.Failed'); + return true; + } + } + } + } + return handled; + } + + /** + * Request to get SharedObject from server over WebSocket. + * + * @param {String} name + */ + + }, { + key: 'getRemoteSharedObject', + value: function getRemoteSharedObject(name) { + this.post({ + sharedObjectGetRemote: { + name: name + } + }); + } + + /** + * Request to connect to SharedObject from server over WebSocket. + * + * @param {String} name + */ + + }, { + key: 'connectToSharedObject', + value: function connectToSharedObject(name) { + this.post({ + sharedObjectConnect: { + name: name + } + }); + } + + /** + * Request to send method call to SharedObject over WebSocket. + * + * @param {String} name + * @param {String} callName + * @param {Object} data + */ + + }, { + key: 'sendToSharedObject', + value: function sendToSharedObject(name, callName, data) { + this.post({ + sharedObjectSend: { + name: name, + call: callName, + params: [data] + } + }); + } + + /** + * Request to update property on SharedObject over WebSocket. + * + * @param {String} name + * @param {String} key + * @param {String} value + */ + + }, { + key: 'sendPropertyToSharedObject', + value: function sendPropertyToSharedObject(name, key, value) { + this.post({ + sharedObjectSetProperty: { + name: name, + key: key, + value: value + } + }); + } + + /** + * Request to close the SharedObject connection over WebSocket. + * + * @param {String} name + */ + + }, { + key: 'closeSharedObject', + value: function closeSharedObject(name) { + this.post({ + sharedObjectClose: { + name: name + } + }); + } + + /** + * Returns flag of socket being closed and temrinated. + * + * @returns {Boolean} + */ + + }, { + key: 'isTerminated', + get: function get() { + return this._isTerminated; + } + }]); + return SocketHelper; +}(); + +exports.default = SocketHelper; + +/***/ }), +/* 83 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Easy decorator for setting a mutable, iteratable property on an object. + * + * @private + */ + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.RTMPMediaConstraint = exports.RTCMediaConstraint = undefined; + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _defineProperty = __webpack_require__(90); + +var _defineProperty2 = _interopRequireDefault(_defineProperty); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var inflate = function inflate(obj, prop, value) { + (0, _defineProperty2.default)(obj, prop, { + value: value, + writable: true, + enumerable: true + }); +}; + +/** + * Default `exact` setting for `video` on `MediaConstraint` for WebRTC broadcast. + * + * @private + */ + +var RTCMediaVideoConstraint = function RTCMediaVideoConstraint() { + (0, _classCallCheck3.default)(this, RTCMediaVideoConstraint); + + inflate(this, 'width', { + exact: 640 + }); + inflate(this, 'height', { + exact: 480 + }); +}; + +/** + * Default RTMP video settings for braodcast. + * + * @private + */ + + +var RTMPMediaVideoConstraint = function RTMPMediaVideoConstraint() { + (0, _classCallCheck3.default)(this, RTMPMediaVideoConstraint); + + inflate(this, 'width', 640); + inflate(this, 'height', 480); + inflate(this, 'force', false); + inflate(this, 'framerate', 15); + inflate(this, 'bandwidth', 50000); + inflate(this, 'quality', 80); + inflate(this, 'profile', 'baseline'); + inflate(this, 'level', 3.1); +}; + +/** + * Default WebRTC media settings for broadcast. + * + * @private + */ + + +var RTCMediaConstraint = function RTCMediaConstraint() { + var audio = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + var video = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; + (0, _classCallCheck3.default)(this, RTCMediaConstraint); + + inflate(this, 'audio', audio); + inflate(this, 'video', video || new RTCMediaVideoConstraint()); +}; + +/** + * Default RTMP media settings for broadcast. + * + * @private + */ + + +var RTMPMediaConstraint = function RTMPMediaConstraint() { + var audio = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + var video = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; + (0, _classCallCheck3.default)(this, RTMPMediaConstraint); + + inflate(this, 'audio', audio); + inflate(this, 'video', video || new RTMPMediaVideoConstraint()); +}; + +exports.RTCMediaConstraint = RTCMediaConstraint; +exports.RTMPMediaConstraint = RTMPMediaConstraint; + +/***/ }), +/* 84 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.SliderEventTypes = exports.SliderEvent = undefined; + +var _freeze = __webpack_require__(18); + +var _freeze2 = _interopRequireDefault(_freeze); + +var _getPrototypeOf = __webpack_require__(6); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(8); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(7); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _event = __webpack_require__(15); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Events for Slider Control. + * + * @see {SliderControl} + * + * @private + */ +var SliderEvent = function (_Event) { + (0, _inherits3.default)(SliderEvent, _Event); + + function SliderEvent(type, control, data) { + (0, _classCallCheck3.default)(this, SliderEvent); + + var _this = (0, _possibleConstructorReturn3.default)(this, (SliderEvent.__proto__ || (0, _getPrototypeOf2.default)(SliderEvent)).call(this, type, data)); + + _this._control = control; + return _this; + } + + (0, _createClass3.default)(SliderEvent, [{ + key: 'control', + get: function get() { + return this._control; + } + }]); + return SliderEvent; +}(_event.Event); + +/** + * Enumeration of Slider Event types. + * + * @private + */ + + +var SliderEventTypes = (0, _freeze2.default)({ + CHANGE_START: 'changestart', + CHANGE: 'change', + CHANGE_COMPLETE: 'changecomplete' +}); + +exports.SliderEvent = SliderEvent; +exports.SliderEventTypes = SliderEventTypes; + +/***/ }), +/* 85 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.ImplFactoryOrder = undefined; + +var _slicedToArray2 = __webpack_require__(143); + +var _slicedToArray3 = _interopRequireDefault(_slicedToArray2); + +var _regenerator = __webpack_require__(144); + +var _regenerator2 = _interopRequireDefault(_regenerator); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _weakMap = __webpack_require__(142); + +var _weakMap2 = _interopRequireDefault(_weakMap); + +var _promise = __webpack_require__(5); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var map = new _weakMap2.default(); + +var pvt = function pvt(ctx) { + if (!map.has(ctx)) { + map.set(ctx, {}); + } + + return map.get(ctx); +}; + +/** + * Implementation Factory. + * + * This is used by the fail-over for Publisher and Subscriber to determine browser support of order list of implementations. + * + * @private + */ + +var ImplFactoryOrder = exports.ImplFactoryOrder = function () { + function ImplFactoryOrder() { + var _this = this; + + (0, _classCallCheck3.default)(this, ImplFactoryOrder); + + this.listorder = function () { + return (/*#__PURE__*/_regenerator2.default.mark(function listorder(list) { + return _regenerator2.default.wrap(function listorder$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + if (!(list.length > 0)) { + _context.next = 5; + break; + } + + _context.next = 3; + return list.shift(); + + case 3: + _context.next = 0; + break; + + case 5: + case 'end': + return _context.stop(); + } + } + }, listorder, this); + }) + ); + }(); + + /** + * Attempt to check support and initialize Class instance within the order. Optionally, can invoke an initialization with configuration object. + * + * @param {Object} iterator + * Iterator used in accessing possible Class instance next in linked list of order. + * @param {Object} map + * Map of order type to Class. + * @param {Object} options + * Map of initialization configurations to types. + * @param {Promise} promise + * The `Promise` instance to use in resolve or reject once either a valid instance is created or order has been exhausted, respectively. + * @param {Function} initFn + * Optional function to invoke upon instantiation attempt. + * @param {String} lastError + * Optional - and compounded - last string error that caused a failure in establishing a supported instance. This error is delivered on the rejection of the `Promise`. + * + * @private + */ + pvt(this).find = function (iterator, map, options, promise) { + var initFn = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null; + var lastError = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null; + + var _pvt$next = pvt(_this).next(iterator, map), + _pvt$next2 = (0, _slicedToArray3.default)(_pvt$next, 2), + type = _pvt$next2[0], + Impl = _pvt$next2[1]; + + if (!Impl) { + promise.reject(lastError); + } else { + var p = void 0; + var src = options[type]; + src = src || options; + if (initFn) { + p = new Impl()[initFn](src); + } else { + p = new Impl(src); + } + p.then(function (concrete) { + promise.resolve(concrete); + }).catch(function (error) { + // eslint-disable-line no-unused-vars + lastError = error; + pvt(_this).find(iterator, map, options, promise, initFn, lastError); + }); + } + }; + + /** + * Iterate next in order. + * + * @private + */ + pvt(this).next = function (order, map) { + var Impl = void 0; + var key = void 0; + var next = order.next(); + if (!next.done) { + key = next.value; + Impl = map.get(key); + } + return [key, Impl]; + }; + } + + /** + * Request to locate supported implementation and initialize it, resolving the `Promise` with the instance. + * + * @param {Array} order + * @param {Object} map + * Map of Class to order type. + * @param {Object} options + * Initialization object to pass to constructor of Class in browser test of support. + * @param {Function} initFn + * Optional initialization function to invoke with the `options` config. + * + * @private + */ + + + (0, _createClass3.default)(ImplFactoryOrder, [{ + key: 'create', + value: function create(order, map, options) { + var initFn = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; + + var promise = new _promise.DeferredPromise(); + pvt(this).find(this.listorder(order.slice()), map, options, promise, initFn); + return promise.promise; + } + }]); + return ImplFactoryOrder; +}(); + +exports.default = ImplFactoryOrder; + +/***/ }), +/* 86 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +// http://blog.carbonfive.com/2015/01/14/gettin-freaky-functional-wcurried-javascript/ +/** + * Basic curry implementation. + * + * @private + */ + +Object.defineProperty(exports, "__esModule", { + value: true +}); +var curry = exports.curry = function curry(fx) { + var arity = fx.length; + return function f1() { + var args = Array.prototype.slice.call(arguments, 0); + if (args.length >= arity) { + return fx.apply(null, args); + } else { + return function f2() { + var args2 = Array.prototype.slice.call(arguments, 0); + return f1.apply(null, args.concat(args2)); + }; + } + }; +}; + +/** + * Basic filter implementation. + * + * @private + */ +var filter = exports.filter = curry(function (fn, list) { + var idx = 0; + var len = list.length; + var result = []; + + while (idx < len) { + if (fn(list[idx])) { + result[result.length] = list[idx]; + } + idx += 1; + } + return result; +}); + +/** + * Converts a value to integer. + * + * @param {Object} value + * @returns {Number} + * + * @private + */ +var toInt = exports.toInt = function toInt(value) { + if (typeof value === 'string') { + return parseInt(value, 10); + } else { + return Math.round(value); + } +}; + +/** + * Checks truthy-ness of `value` and returns default if false. + * + * @param {Object} value + * @param {Object} defaultValue + * + * @private + */ +var getOrElse = exports.getOrElse = function getOrElse(value, defaultValue) { + return value || defaultValue; +}; + +/** + * Checks truthy-ness of `value` as a Number and returns default if false. + * + * @param {Object} value + * @param {Object} defaultValue + * + * @private + */ +var getIntOrElse = exports.getIntOrElse = function getIntOrElse(value, defaultValue) { + return !isNaN(toInt(value)) ? toInt(value) : defaultValue; +}; + +/***/ }), +/* 87 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Encode the value of each key and return a new object. + * + * @param {Object} valueObject + * The object whose values should be encoded. + * @return {Object} + * + * @private + */ + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.rtcSocketEndpointFromOptions = exports.encodeKeyValues = undefined; + +var _extends2 = __webpack_require__(28); + +var _extends3 = _interopRequireDefault(_extends2); + +var _keys = __webpack_require__(91); + +var _keys2 = _interopRequireDefault(_keys); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var encodeKeyValues = exports.encodeKeyValues = function encodeKeyValues(valueObject) { + var encoded = {}; + (0, _keys2.default)(valueObject).forEach(function (key, index) { + // eslint-disable-line no-unused-vars + encoded[key] = encodeURIComponent(valueObject[key]); + }); + return encoded; +}; + +/** + * Construct endpoint to use for WebSocket connection based on configuration object and optional params to append to query. + * + * @param {Object} options + * The configuration options provided in `init()` of WebRTC based publisher or subscriber. + * @param {Object} params + * The optional params to append to the endpoint. Used by server in connection parse. + * @private + */ +var rtcSocketEndpointFromOptions = exports.rtcSocketEndpointFromOptions = function rtcSocketEndpointFromOptions(options) { + var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; + + var protocol = options.wsprotocol || options.protocol; + var port = options.wsport || options.port; + var appEndpoint = options.context ? [options.app, options.context].join('/') : options.app; + var endpoint = protocol + '://' + options.host + ':' + port + '/' + appEndpoint; + if (typeof options.connectionParams !== 'undefined') { + var encodedParams = encodeKeyValues(options.connectionParams); + params = (0, _extends3.default)(params, encodedParams); + } + if (typeof params !== 'undefined') { + var kv = []; + (0, _keys2.default)(params).forEach(function (key, index) { + // eslint-disable-line no-unused-vars + kv.push([key, params[key]].join('=')); + }); + if (kv.length > 0) { + endpoint += '?' + kv.join('&'); + } + } + + return endpoint; +}; + +/***/ }), +/* 88 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(149), __esModule: true }; + +/***/ }), +/* 89 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(150), __esModule: true }; + +/***/ }), +/* 90 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(154), __esModule: true }; + +/***/ }), +/* 91 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(158), __esModule: true }; + +/***/ }), +/* 92 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(161), __esModule: true }; + +/***/ }), +/* 93 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _getPrototypeOf = __webpack_require__(6); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _getOwnPropertyDescriptor = __webpack_require__(138); + +var _getOwnPropertyDescriptor2 = _interopRequireDefault(_getOwnPropertyDescriptor); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function get(object, property, receiver) { + if (object === null) object = Function.prototype; + var desc = (0, _getOwnPropertyDescriptor2.default)(object, property); + + if (desc === undefined) { + var parent = (0, _getPrototypeOf2.default)(object); + + if (parent === null) { + return undefined; + } else { + return get(parent, property, receiver); + } + } else if ("value" in desc) { + return desc.value; + } else { + var getter = desc.get; + + if (getter === undefined) { + return undefined; + } + + return getter.call(receiver); + } +}; + +/***/ }), +/* 94 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _from = __webpack_require__(132); + +var _from2 = _interopRequireDefault(_from); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { + arr2[i] = arr[i]; + } + + return arr2; + } else { + return (0, _from2.default)(arr); + } +}; + +/***/ }), +/* 95 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * !This is a stripped down version of Bunyan targeted specifically for the browser + * + * ------------------------------------------------------------------------------- + * + * Copyright (c) 2014 Trent Mick. All rights reserved. + * Copyright (c) 2014 Joyent Inc. All rights reserved. + * + * The bunyan logging library for node.js. + * + * -*- mode: js -*- + * vim: expandtab:ts=4:sw=4 + */ + + + +var VERSION = '0.2.3'; + +// Bunyan log format version. This becomes the 'v' field on all log records. +// `0` is until I release a version '1.0.0' of node-bunyan. Thereafter, +// starting with `1`, this will be incremented if there is any backward +// incompatible change to the log record format. Details will be in +// 'CHANGES.md' (the change log). +var LOG_VERSION = 0; + +//---- Internal support stuff + +/** + * A shallow copy of an object. Bunyan logging attempts to never cause + * exceptions, so this function attempts to handle non-objects gracefully. + */ +function objCopy(obj) { + if (typeof obj === 'undefined' || obj === null) { // null or undefined + return obj; + } else if (Array.isArray(obj)) { + return obj.slice(); + } else if (typeof (obj) === 'object') { + var copy = {}; + Object.keys(obj).forEach(function (k) { + copy[k] = obj[k]; + }); + return copy; + } else { + return obj; + } +} + +var format = function(f) { + + if(f === null) { + return 'null'; + } + + if(typeof f !== 'string') { + return f.toString(); + } + var formatRegExp = /%[sdj%]/g; + + var i = 1; + var args = arguments; + var len = args.length; + var str = String(f).replace(formatRegExp, function(x) { + if (x === '%%') { + return '%'; + } + if (i >= len) { + return x; + } + switch (x) { + case '%s': return String(args[i++]); + case '%d': return Number(args[i++]); + case '%j': + try { + return JSON.stringify(args[i++]); + } catch (_) { + return '[Circular]'; + } + break; + default: + return x; + } + }); + for (var x = args[i]; i < len; x = args[++i]) { + str += ' ' + x; + } + return str; +}; + +/** + * Gather some caller info 3 stack levels up. + * See . + */ +function getCaller3Info() { + var obj = {}; + var saveLimit = Error.stackTraceLimit; + var savePrepare = Error.prepareStackTrace; + Error.stackTraceLimit = 3; + //Error.captureStackTrace(this, getCaller3Info); + + Error.prepareStackTrace = function (_, stack) { + var caller = stack[2]; + obj.file = caller.getFileName(); + obj.line = caller.getLineNumber(); + var func = caller.getFunctionName(); + if (func) { + obj.func = func; + } + }; + Error.stackTraceLimit = saveLimit; + Error.prepareStackTrace = savePrepare; + return obj; +} + + +function _indent(s, indent) { + if (!indent) { + indent = ' '; + } + var lines = s.split(/\r?\n/g); + return indent + lines.join('\n' + indent); +} + + +/** + * Warn about an bunyan processing error. + * + * @param msg {String} Message with which to warn. + * @param dedupKey {String} Optional. A short string key for this warning to + * have its warning only printed once. + */ +function _warn(msg, dedupKey) { + if (dedupKey) { + if (_warned[dedupKey]) { + return; + } + _warned[dedupKey] = true; + } + console.error(msg + '\n'); +} +function _haveWarned(dedupKey) { + return _warned[dedupKey]; +} +var _warned = {}; + + +function ConsoleRawStream() { +} +ConsoleRawStream.prototype.write = function (rec) { + if (rec.level < INFO) { + console.log(rec); + } else if (rec.level < WARN) { + console.info(rec); + } else if (rec.level < ERROR) { + console.warn(rec); + } else { + console.error(rec); + } + + if(rec.err && rec.err.stack) { + console.error(rec.err.stack); + } +}; + +function ConsoleFormattedStream() {} +ConsoleFormattedStream.prototype.write = function (rec) { + + var levelCss, defaultCss = 'color: DimGray', msgCss = 'color: SteelBlue'; + + if (rec.level < DEBUG) { + levelCss = 'color: DeepPink'; + } else if (rec.level < INFO) { + levelCss = 'color: GoldenRod'; + } else if (rec.level < WARN) { + levelCss = 'color: DarkTurquoise'; + } else if (rec.level < ERROR) { + levelCss = 'color: Purple'; + } else if (rec.level < FATAL) { + levelCss = 'color: Crimson'; + } else { + levelCss = 'color: Black'; + } + + var loggerName = rec.childName ? rec.name + '/' + rec.childName : rec.name; + + //get level name and pad start with spacs + var levelName = nameFromLevel[rec.level].toUpperCase(); + levelName = Array(6 - levelName.length).join(' ') + levelName; + + function padZeros(number, len) { + return Array((len + 1) - (number + '').length).join('0') + number; + } + + console.log('[%s:%s:%s:%s] %c%s%c: %s: %c%s', + padZeros(rec.time.getHours(), 2), padZeros(rec.time.getMinutes(), 2), + padZeros(rec.time.getSeconds(), 2), padZeros(rec.time.getMilliseconds(), 4), + levelCss, levelName, + defaultCss, loggerName, + msgCss, rec.msg); + if(rec.err && rec.err.stack) { + console.log('%c%s,', levelCss, rec.err.stack); + } +}; + +//---- Levels + +var TRACE = 10; +var DEBUG = 20; +var INFO = 30; +var WARN = 40; +var ERROR = 50; +var FATAL = 60; + +var levelFromName = { + 'trace': TRACE, + 'debug': DEBUG, + 'info': INFO, + 'warn': WARN, + 'error': ERROR, + 'fatal': FATAL +}; +var nameFromLevel = {}; +Object.keys(levelFromName).forEach(function (name) { + nameFromLevel[levelFromName[name]] = name; +}); + + +/** + * Resolve a level number, name (upper or lowercase) to a level number value. + * + * @api public + */ +function resolveLevel(nameOrNum) { + var level = (typeof (nameOrNum) === 'string' ? levelFromName[nameOrNum.toLowerCase()] : nameOrNum); + return level; +} + + +//---- Logger class + +/** + * Create a Logger instance. + * + * @param options {Object} See documentation for full details. At minimum + * this must include a 'name' string key. Configuration keys: + * - `streams`: specify the logger output streams. This is an array of + * objects with these fields: + * - `type`: The stream type. See README.md for full details. + * Often this is implied by the other fields. Examples are + * 'file', 'stream' and "raw". + * - `level`: Defaults to 'info'. + * - `path` or `stream`: The specify the file path or writeable + * stream to which log records are written. E.g. + * `stream: process.stdout`. + * - `closeOnExit` (boolean): Optional. Default is true for a + * 'file' stream when `path` is given, false otherwise. + * See README.md for full details. + * - `level`: set the level for a single output stream (cannot be used + * with `streams`) + * - `stream`: the output stream for a logger with just one, e.g. + * `process.stdout` (cannot be used with `streams`) + * - `serializers`: object mapping log record field names to + * serializing functions. See README.md for details. + * - `src`: Boolean (default false). Set true to enable 'src' automatic + * field with log call source info. + * All other keys are log record fields. + * + * An alternative *internal* call signature is used for creating a child: + * new Logger(, [, ]); + * + * @param _childSimple (Boolean) An assertion that the given `_childOptions` + * (a) only add fields (no config) and (b) no serialization handling is + * required for them. IOW, this is a fast path for frequent child + * creation. + */ +function Logger(options, _childOptions, _childSimple) { + if (!(this instanceof Logger)) { + return new Logger(options, _childOptions); + } + + // Input arg validation. + var parent; + if (_childOptions !== undefined) { + parent = options; + options = _childOptions; + if (!(parent instanceof Logger)) { + throw new TypeError( + 'invalid Logger creation: do not pass a second arg'); + } + } + if (!options) { + throw new TypeError('options (object) is required'); + } + if (!parent) { + if (!options.name) { + throw new TypeError('options.name (string) is required'); + } + } else { + if (options.name) { + throw new TypeError( + 'invalid options.name: child cannot set logger name'); + } + } + if (options.stream && options.streams) { + throw new TypeError('cannot mix "streams" and "stream" options'); + } + if (options.streams && !Array.isArray(options.streams)) { + throw new TypeError('invalid options.streams: must be an array'); + } + if (options.serializers && (typeof (options.serializers) !== 'object' || Array.isArray(options.serializers))) { + throw new TypeError('invalid options.serializers: must be an object'); + } + + var fields, name, i; + + // Fast path for simple child creation. + if (parent && _childSimple) { + // `_isSimpleChild` is a signal to stream close handling that this child + // owns none of its streams. + this._isSimpleChild = true; + + this._level = parent._level; + this.streams = parent.streams; + this.serializers = parent.serializers; + this.src = parent.src; + fields = this.fields = {}; + var parentFieldNames = Object.keys(parent.fields); + for (i = 0; i < parentFieldNames.length; i++) { + name = parentFieldNames[i]; + fields[name] = parent.fields[name]; + } + var names = Object.keys(options); + for (i = 0; i < names.length; i++) { + name = names[i]; + fields[name] = options[name]; + } + return; + } + + // Null values. + var self = this; + if (parent) { + this._level = parent._level; + this.streams = []; + for (i = 0; i < parent.streams.length; i++) { + var s = objCopy(parent.streams[i]); + s.closeOnExit = false; // Don't own parent stream. + this.streams.push(s); + } + this.serializers = objCopy(parent.serializers); + this.src = parent.src; + this.fields = objCopy(parent.fields); + if (options.level) { + this.level(options.level); + } + } else { + this._level = Number.POSITIVE_INFINITY; + this.streams = []; + this.serializers = null; + this.src = false; + this.fields = {}; + } + + // Handle *config* options (i.e. options that are not just plain data + // for log records). + if (options.stream) { + self.addStream({ + type: 'stream', + stream: options.stream, + closeOnExit: false, + level: options.level + }); + } else if (options.streams) { + options.streams.forEach(function (s) { + self.addStream(s, options.level); + }); + } else if (parent && options.level) { + this.level(options.level); + } else if (!parent) { + + /* + * In the browser we'll be emitting to console.log by default. + * Any console.log worth its salt these days can nicely render + * and introspect objects (e.g. the Firefox and Chrome console) + * so let's emit the raw log record. Are there browsers for which + * that breaks things? + */ + self.addStream({ + type: 'raw', + stream: new ConsoleRawStream(), + closeOnExit: false, + level: options.level + }); + + } + if (options.serializers) { + self.addSerializers(options.serializers); + } + if (options.src) { + this.src = true; + } + + // Fields. + // These are the default fields for log records (minus the attributes + // removed in this constructor). To allow storing raw log records + // (unrendered), `this.fields` must never be mutated. Create a copy for + // any changes. + fields = objCopy(options); + delete fields.stream; + delete fields.level; + delete fields.streams; + delete fields.serializers; + delete fields.src; + if (this.serializers) { + this._applySerializers(fields); + } + Object.keys(fields).forEach(function (k) { + self.fields[k] = fields[k]; + }); +} + +/** + * Add a stream + * + * @param stream {Object}. Object with these fields: + * - `type`: The stream type. See README.md for full details. + * Often this is implied by the other fields. Examples are + * 'file', 'stream' and "raw". + * - `path` or `stream`: The specify the file path or writeable + * stream to which log records are written. E.g. + * `stream: process.stdout`. + * - `level`: Optional. Falls back to `defaultLevel`. + * - `closeOnExit` (boolean): Optional. Default is true for a + * 'file' stream when `path` is given, false otherwise. + * See README.md for full details. + * @param defaultLevel {Number|String} Optional. A level to use if + * `stream.level` is not set. If neither is given, this defaults to INFO. + */ +Logger.prototype.addStream = function addStream(s, defaultLevel) { + var self = this; + if (defaultLevel === null || defaultLevel === undefined) { + defaultLevel = INFO; + } + + s = objCopy(s); + + // Implicit 'type' from other args. + if (!s.type && s.stream) { + s.type = 'raw'; + } + s.raw = (s.type === 'raw'); // PERF: Allow for faster check in `_emit`. + + if (s.level) { + s.level = resolveLevel(s.level); + } else { + s.level = resolveLevel(defaultLevel); + } + if (s.level < self._level) { + self._level = s.level; + } + + switch (s.type) { + case 'stream': + if (!s.closeOnExit) { + s.closeOnExit = false; + } + break; + case 'raw': + if (!s.closeOnExit) { + s.closeOnExit = false; + } + break; + default: + throw new TypeError('unknown stream type "' + s.type + '"'); + } + + self.streams.push(s); + delete self.haveNonRawStreams; // reset +}; + + +/** + * Add serializers + * + * @param serializers {Object} Optional. Object mapping log record field names + * to serializing functions. See README.md for details. + */ +Logger.prototype.addSerializers = function addSerializers(serializers) { + var self = this; + + if (!self.serializers) { + self.serializers = {}; + } + Object.keys(serializers).forEach(function (field) { + var serializer = serializers[field]; + if (typeof (serializer) !== 'function') { + throw new TypeError(format( + 'invalid serializer for "%s" field: must be a function', + field)); + } else { + self.serializers[field] = serializer; + } + }); +}; + + +/** + * Create a child logger, typically to add a few log record fields. + * + * This can be useful when passing a logger to a sub-component, e.g. a + * 'wuzzle' component of your service: + * + * var wuzzleLog = log.child({component: 'wuzzle'}) + * var wuzzle = new Wuzzle({..., log: wuzzleLog}) + * + * Then log records from the wuzzle code will have the same structure as + * the app log, *plus the component='wuzzle' field*. + * + * @param options {Object} Optional. Set of options to apply to the child. + * All of the same options for a new Logger apply here. Notes: + * - The parent's streams are inherited and cannot be removed in this + * call. Any given `streams` are *added* to the set inherited from + * the parent. + * - The parent's serializers are inherited, though can effectively be + * overwritten by using duplicate keys. + * - Can use `level` to set the level of the streams inherited from + * the parent. The level for the parent is NOT affected. + * @param simple {Boolean} Optional. Set to true to assert that `options` + * (a) only add fields (no config) and (b) no serialization handling is + * required for them. IOW, this is a fast path for frequent child + * creation. See 'tools/timechild.js' for numbers. + */ +Logger.prototype.child = function (options, simple) { + return new (this.constructor)(this, options || {}, simple); +}; + +/** + * Get/set the level of all streams on this logger. + * + * Get Usage: + * // Returns the current log level (lowest level of all its streams). + * log.level() -> INFO + * + * Set Usage: + * log.level(INFO) // set all streams to level INFO + * log.level('info') // can use 'info' et al aliases + */ +Logger.prototype.level = function level(value) { + if (value === undefined) { + return this._level; + } + var newLevel = resolveLevel(value); + var len = this.streams.length; + for (var i = 0; i < len; i++) { + this.streams[i].level = newLevel; + } + this._level = newLevel; +}; + + +/** + * Get/set the level of a particular stream on this logger. + * + * Get Usage: + * // Returns an array of the levels of each stream. + * log.levels() -> [TRACE, INFO] + * + * // Returns a level of the identified stream. + * log.levels(0) -> TRACE // level of stream at index 0 + * log.levels('foo') // level of stream with name 'foo' + * + * Set Usage: + * log.levels(0, INFO) // set level of stream 0 to INFO + * log.levels(0, 'info') // can use 'info' et al aliases + * log.levels('foo', WARN) // set stream named 'foo' to WARN + * + * Stream names: When streams are defined, they can optionally be given + * a name. For example, + * log = new Logger({ + * streams: [ + * { + * name: 'foo', + * path: '/var/log/my-service/foo.log' + * level: 'trace' + * }, + * ... + * + * @param name {String|Number} The stream index or name. + * @param value {Number|String} The level value (INFO) or alias ('info'). + * If not given, this is a 'get' operation. + * @throws {Error} If there is no stream with the given name. + */ +Logger.prototype.levels = function levels(name, value) { + if (name === undefined) { + return this.streams.map( + function (s) { + return s.level; + }); + } + var stream; + if (typeof (name) === 'number') { + stream = this.streams[name]; + if (stream === undefined) { + throw new Error('invalid stream index: ' + name); + } + } else { + var len = this.streams.length; + for (var i = 0; i < len; i++) { + var s = this.streams[i]; + if (s.name === name) { + stream = s; + break; + } + } + if (!stream) { + throw new Error(format('no stream with name "%s"', name)); + } + } + if (value === undefined) { + return stream.level; + } else { + var newLevel = resolveLevel(value); + stream.level = newLevel; + if (newLevel < this._level) { + this._level = newLevel; + } + } +}; + + +/** + * Apply registered serializers to the appropriate keys in the given fields. + * + * Pre-condition: This is only called if there is at least one serializer. + * + * @param fields (Object) The log record fields. + * @param excludeFields (Object) Optional mapping of keys to `true` for + * keys to NOT apply a serializer. + */ +Logger.prototype._applySerializers = function (fields, excludeFields) { + var self = this; + + // Check each serializer against these (presuming number of serializers + // is typically less than number of fields). + Object.keys(this.serializers).forEach(function (name) { + if (fields[name] === undefined || + (excludeFields && excludeFields[name])) { + return; + } + try { + fields[name] = self.serializers[name](fields[name]); + } catch (err) { + _warn(format('bunyan: ERROR: Exception thrown from the "%s" ' + + 'Bunyan serializer. This should never happen. This is a bug' + + 'in that serializer function.\n%s', + name, err.stack || err)); + fields[name] = format('(Error in Bunyan log "%s" serializer broke field. See stderr for details.)', name); + } + }); +}; + + +/** + * Emit a log record. + * + * @param rec {log record} + * @param noemit {Boolean} Optional. Set to true to skip emission + * and just return the JSON string. + */ +Logger.prototype._emit = function (rec, noemit) { + var i; + + // Lazily determine if this Logger has non-'raw' streams. If there are + // any, then we need to stringify the log record. + if (this.haveNonRawStreams === undefined) { + this.haveNonRawStreams = false; + for (i = 0; i < this.streams.length; i++) { + if (!this.streams[i].raw) { + this.haveNonRawStreams = true; + break; + } + } + } + + // Stringify the object. Attempt to warn/recover on error. + var str; + if (noemit || this.haveNonRawStreams) { + try { + str = JSON.stringify(rec, safeCycles()) + '\n'; + } catch (e) { + var dedupKey = e.stack.split(/\n/g, 2).join('\n'); + _warn('bunyan: ERROR: Exception in ' + + '`JSON.stringify(rec)`. You can install the ' + + '"safe-json-stringify" module to have Bunyan fallback ' + + 'to safer stringification. Record:\n' + + _indent(format('%s\n%s', rec, e.stack)), + dedupKey); + str = format('(Exception in JSON.stringify(rec): %j. See stderr for details.)\n', e.message); + + } + } + + if (noemit) { + return str; + } + + + var level = rec.level; + for (i = 0; i < this.streams.length; i++) { + var s = this.streams[i]; + if (s.level <= level) { + s.stream.write(s.raw ? rec : str); + } + } + + return str; +}; + + +/** + * Build a log emitter function for level minLevel. I.e. this is the + * creator of `log.info`, `log.error`, etc. + */ +function mkLogEmitter(minLevel) { + return function () { + var log = this; + + function mkRecord(args) { + var excludeFields; + if (args[0] instanceof Error) { + // `log.(err, ...)` + fields = { + // Use this Logger's err serializer, if defined. + err: (log.serializers && log.serializers.err ? log.serializers.err(args[0]) : Logger.stdSerializers.err(args[0])) + }; + excludeFields = {err: true}; + if (args.length === 1) { + msgArgs = [fields.err.message]; + } else { + msgArgs = Array.prototype.slice.call(args, 1); + } + } else if (typeof (args[0]) !== 'object' && args[0] !== null || + Array.isArray(args[0])) { + // `log.(msg, ...)` + fields = null; + msgArgs = Array.prototype.slice.call(args); + } else { // `log.(fields, msg, ...)` + fields = args[0]; + msgArgs = Array.prototype.slice.call(args, 1); + } + + // Build up the record object. + var rec = objCopy(log.fields); + rec.level = minLevel; + var recFields = (fields ? objCopy(fields) : null); + if (recFields) { + if (log.serializers) { + log._applySerializers(recFields, excludeFields); + } + Object.keys(recFields).forEach(function (k) { + rec[k] = recFields[k]; + }); + } + rec.levelName = nameFromLevel[minLevel]; + rec.msg = format.apply(log, msgArgs); + if (!rec.time) { + rec.time = (new Date()); + } + // Get call source info + if (log.src && !rec.src) { + rec.src = getCaller3Info(); + } + rec.v = LOG_VERSION; + + return rec; + } + + var fields = null; + var msgArgs = arguments; + var rec = null; + if (!this._emit) { + /* + * Show this invalid Bunyan usage warning *once*. + * + * See for + * an example of how this can happen. + */ + var dedupKey = 'unbound'; + if (!_haveWarned[dedupKey]) { + var caller = getCaller3Info(); + _warn(format('bunyan usage error: %s:%s: attempt to log with an unbound log method: `this` is: %s', + caller.file, caller.line, this.toString()), + dedupKey); + } + return; + } else if (arguments.length === 0) { // `log.()` + return (this._level <= minLevel); + } else if (this._level > minLevel) { + /* pass through */ + } else { + rec = mkRecord(msgArgs); + this._emit(rec); + } + }; +} + + +/** + * The functions below log a record at a specific level. + * + * Usages: + * log.() -> boolean is-trace-enabled + * log.( err, [ msg, ...]) + * log.( msg, ...) + * log.( fields, msg, ...) + * + * where is the lowercase version of the log level. E.g.: + * + * log.info() + * + * @params fields {Object} Optional set of additional fields to log. + * @params msg {String} Log message. This can be followed by additional + * arguments that are handled like + * [util.format](http://nodejs.org/docs/latest/api/all.html#util.format). + */ +Logger.prototype.trace = mkLogEmitter(TRACE); +Logger.prototype.debug = mkLogEmitter(DEBUG); +Logger.prototype.info = mkLogEmitter(INFO); +Logger.prototype.warn = mkLogEmitter(WARN); +Logger.prototype.error = mkLogEmitter(ERROR); +Logger.prototype.fatal = mkLogEmitter(FATAL); + + +//---- Standard serializers +// A serializer is a function that serializes a JavaScript object to a +// JSON representation for logging. There is a standard set of presumed +// interesting objects in node.js-land. + +Logger.stdSerializers = {}; + +/* + * This function dumps long stack traces for exceptions having a cause() + * method. The error classes from + * [verror](https://github.com/davepacheco/node-verror) and + * [restify v2.0](https://github.com/mcavage/node-restify) are examples. + * + * Based on `dumpException` in + * https://github.com/davepacheco/node-extsprintf/blob/master/lib/extsprintf.js + */ +function getFullErrorStack(ex) { + var ret = ex.stack || ex.toString(); + if (ex.cause && typeof (ex.cause) === 'function') { + var cex = ex.cause(); + if (cex) { + ret += '\nCaused by: ' + getFullErrorStack(cex); + } + } + return (ret); +} + +// Serialize an Error object +// (Core error properties are enumerable in node 0.4, not in 0.6). +Logger.stdSerializers.err = function(err) { + if (!err || !err.stack) { + return err; + } + + var obj = { + message: err.message, + name: err.name, + stack: getFullErrorStack(err), + code: err.code, + signal: err.signal + }; + return obj; +}; + + +// A JSON stringifier that handles cycles safely. +// Usage: JSON.stringify(obj, safeCycles()) +function safeCycles() { + var seen = []; + return function (key, val) { + if (!val || typeof (val) !== 'object') { + return val; + } + if (seen.indexOf(val) !== -1) { + return '[Circular]'; + } + seen.push(val); + return val; + }; +} + +//---- Exports + +module.exports = Logger; + +module.exports.TRACE = TRACE; +module.exports.DEBUG = DEBUG; +module.exports.INFO = INFO; +module.exports.WARN = WARN; +module.exports.ERROR = ERROR; +module.exports.FATAL = FATAL; +module.exports.resolveLevel = resolveLevel; +module.exports.levelFromName = levelFromName; +module.exports.nameFromLevel = nameFromLevel; + +module.exports.VERSION = VERSION; +module.exports.LOG_VERSION = LOG_VERSION; + +module.exports.createLogger = function createLogger(options) { + return new Logger(options); +}; + +// Useful for custom `type == 'raw'` streams that may do JSON stringification +// of log records themselves. Usage: +// var str = JSON.stringify(rec, bunyan.safeCycles()); +module.exports.safeCycles = safeCycles; + +//streams +module.exports.ConsoleFormattedStream = ConsoleFormattedStream; +module.exports.ConsoleRawStream = ConsoleRawStream; + +/***/ }), +/* 96 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var dP = __webpack_require__(14).f + , create = __webpack_require__(47) + , redefineAll = __webpack_require__(50) + , ctx = __webpack_require__(19) + , anInstance = __webpack_require__(43) + , defined = __webpack_require__(45) + , forOf = __webpack_require__(36) + , $iterDefine = __webpack_require__(66) + , step = __webpack_require__(104) + , setSpecies = __webpack_require__(109) + , DESCRIPTORS = __webpack_require__(17) + , fastKey = __webpack_require__(30).fastKey + , SIZE = DESCRIPTORS ? '_s' : 'size'; + +var getEntry = function(that, key){ + // fast case + var index = fastKey(key), entry; + if(index !== 'F')return that._i[index]; + // frozen object case + for(entry = that._f; entry; entry = entry.n){ + if(entry.k == key)return entry; + } +}; + +module.exports = { + getConstructor: function(wrapper, NAME, IS_MAP, ADDER){ + var C = wrapper(function(that, iterable){ + anInstance(that, C, NAME, '_i'); + that._i = create(null); // index + that._f = undefined; // first entry + that._l = undefined; // last entry + that[SIZE] = 0; // size + if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.1.3.1 Map.prototype.clear() + // 23.2.3.2 Set.prototype.clear() + clear: function clear(){ + for(var that = this, data = that._i, entry = that._f; entry; entry = entry.n){ + entry.r = true; + if(entry.p)entry.p = entry.p.n = undefined; + delete data[entry.i]; + } + that._f = that._l = undefined; + that[SIZE] = 0; + }, + // 23.1.3.3 Map.prototype.delete(key) + // 23.2.3.4 Set.prototype.delete(value) + 'delete': function(key){ + var that = this + , entry = getEntry(that, key); + if(entry){ + var next = entry.n + , prev = entry.p; + delete that._i[entry.i]; + entry.r = true; + if(prev)prev.n = next; + if(next)next.p = prev; + if(that._f == entry)that._f = next; + if(that._l == entry)that._l = prev; + that[SIZE]--; + } return !!entry; + }, + // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) + // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) + forEach: function forEach(callbackfn /*, that = undefined */){ + anInstance(this, C, 'forEach'); + var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3) + , entry; + while(entry = entry ? entry.n : this._f){ + f(entry.v, entry.k, this); + // revert to the last existing entry + while(entry && entry.r)entry = entry.p; + } + }, + // 23.1.3.7 Map.prototype.has(key) + // 23.2.3.7 Set.prototype.has(value) + has: function has(key){ + return !!getEntry(this, key); + } + }); + if(DESCRIPTORS)dP(C.prototype, 'size', { + get: function(){ + return defined(this[SIZE]); + } + }); + return C; + }, + def: function(that, key, value){ + var entry = getEntry(that, key) + , prev, index; + // change existing entry + if(entry){ + entry.v = value; + // create new entry + } else { + that._l = entry = { + i: index = fastKey(key, true), // <- index + k: key, // <- key + v: value, // <- value + p: prev = that._l, // <- previous entry + n: undefined, // <- next entry + r: false // <- removed + }; + if(!that._f)that._f = entry; + if(prev)prev.n = entry; + that[SIZE]++; + // add to index + if(index !== 'F')that._i[index] = entry; + } return that; + }, + getEntry: getEntry, + setStrong: function(C, NAME, IS_MAP){ + // add .keys, .values, .entries, [@@iterator] + // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 + $iterDefine(C, NAME, function(iterated, kind){ + this._t = iterated; // target + this._k = kind; // kind + this._l = undefined; // previous + }, function(){ + var that = this + , kind = that._k + , entry = that._l; + // revert to the last existing entry + while(entry && entry.r)entry = entry.p; + // get next entry + if(!that._t || !(that._l = entry = entry ? entry.n : that._t._f)){ + // or finish the iteration + that._t = undefined; + return step(1); + } + // return step by kind + if(kind == 'keys' )return step(0, entry.k); + if(kind == 'values')return step(0, entry.v); + return step(0, [entry.k, entry.v]); + }, IS_MAP ? 'entries' : 'values' , !IS_MAP, true); + + // add [@@species], 23.1.2.2, 23.2.2.2 + setSpecies(NAME); + } +}; + +/***/ }), +/* 97 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/DavidBruant/Map-Set.prototype.toJSON +var classof = __webpack_require__(44) + , from = __webpack_require__(166); +module.exports = function(NAME){ + return function toJSON(){ + if(classof(this) != NAME)throw TypeError(NAME + "#toJSON isn't generic"); + return from(this); + }; +}; + +/***/ }), +/* 98 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(11).document && document.documentElement; + +/***/ }), +/* 99 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = !__webpack_require__(17) && !__webpack_require__(25)(function(){ + return Object.defineProperty(__webpack_require__(63)('div'), 'a', {get: function(){ return 7; }}).a != 7; +}); + +/***/ }), +/* 100 */ +/***/ (function(module, exports, __webpack_require__) { + +// check on default Array iterator +var Iterators = __webpack_require__(29) + , ITERATOR = __webpack_require__(9)('iterator') + , ArrayProto = Array.prototype; + +module.exports = function(it){ + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); +}; + +/***/ }), +/* 101 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.2.2 IsArray(argument) +var cof = __webpack_require__(35); +module.exports = Array.isArray || function isArray(arg){ + return cof(arg) == 'Array'; +}; + +/***/ }), +/* 102 */ +/***/ (function(module, exports, __webpack_require__) { + +// call something on iterator step with safe closing on error +var anObject = __webpack_require__(16); +module.exports = function(iterator, fn, value, entries){ + try { + return entries ? fn(anObject(value)[0], value[1]) : fn(value); + // 7.4.6 IteratorClose(iterator, completion) + } catch(e){ + var ret = iterator['return']; + if(ret !== undefined)anObject(ret.call(iterator)); + throw e; + } +}; + +/***/ }), +/* 103 */ +/***/ (function(module, exports, __webpack_require__) { + +var ITERATOR = __webpack_require__(9)('iterator') + , SAFE_CLOSING = false; + +try { + var riter = [7][ITERATOR](); + riter['return'] = function(){ SAFE_CLOSING = true; }; + Array.from(riter, function(){ throw 2; }); +} catch(e){ /* empty */ } + +module.exports = function(exec, skipClosing){ + if(!skipClosing && !SAFE_CLOSING)return false; + var safe = false; + try { + var arr = [7] + , iter = arr[ITERATOR](); + iter.next = function(){ return {done: safe = true}; }; + arr[ITERATOR] = function(){ return iter; }; + exec(arr); + } catch(e){ /* empty */ } + return safe; +}; + +/***/ }), +/* 104 */ +/***/ (function(module, exports) { + +module.exports = function(done, value){ + return {value: value, done: !!done}; +}; + +/***/ }), +/* 105 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 19.1.2.1 Object.assign(target, source, ...) +var getKeys = __webpack_require__(31) + , gOPS = __webpack_require__(68) + , pIE = __webpack_require__(48) + , toObject = __webpack_require__(32) + , IObject = __webpack_require__(65) + , $assign = Object.assign; + +// should work with symbols and should have deterministic property order (V8 bug) +module.exports = !$assign || __webpack_require__(25)(function(){ + var A = {} + , B = {} + , S = Symbol() + , K = 'abcdefghijklmnopqrst'; + A[S] = 7; + K.split('').forEach(function(k){ B[k] = k; }); + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; +}) ? function assign(target, source){ // eslint-disable-line no-unused-vars + var T = toObject(target) + , aLen = arguments.length + , index = 1 + , getSymbols = gOPS.f + , isEnum = pIE.f; + while(aLen > index){ + var S = IObject(arguments[index++]) + , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S) + , length = keys.length + , j = 0 + , key; + while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key]; + } return T; +} : $assign; + +/***/ }), +/* 106 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) +var $keys = __webpack_require__(108) + , hiddenKeys = __webpack_require__(64).concat('length', 'prototype'); + +exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O){ + return $keys(O, hiddenKeys); +}; + +/***/ }), +/* 107 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) +var has = __webpack_require__(20) + , toObject = __webpack_require__(32) + , IE_PROTO = __webpack_require__(70)('IE_PROTO') + , ObjectProto = Object.prototype; + +module.exports = Object.getPrototypeOf || function(O){ + O = toObject(O); + if(has(O, IE_PROTO))return O[IE_PROTO]; + if(typeof O.constructor == 'function' && O instanceof O.constructor){ + return O.constructor.prototype; + } return O instanceof Object ? ObjectProto : null; +}; + +/***/ }), +/* 108 */ +/***/ (function(module, exports, __webpack_require__) { + +var has = __webpack_require__(20) + , toIObject = __webpack_require__(22) + , arrayIndexOf = __webpack_require__(167)(false) + , IE_PROTO = __webpack_require__(70)('IE_PROTO'); + +module.exports = function(object, names){ + var O = toIObject(object) + , i = 0 + , result = [] + , key; + for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while(names.length > i)if(has(O, key = names[i++])){ + ~arrayIndexOf(result, key) || result.push(key); + } + return result; +}; + +/***/ }), +/* 109 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(11) + , core = __webpack_require__(3) + , dP = __webpack_require__(14) + , DESCRIPTORS = __webpack_require__(17) + , SPECIES = __webpack_require__(9)('species'); + +module.exports = function(KEY){ + var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY]; + if(DESCRIPTORS && C && !C[SPECIES])dP.f(C, SPECIES, { + configurable: true, + get: function(){ return this; } + }); +}; + +/***/ }), +/* 110 */ +/***/ (function(module, exports, __webpack_require__) { + +var ctx = __webpack_require__(19) + , invoke = __webpack_require__(173) + , html = __webpack_require__(98) + , cel = __webpack_require__(63) + , global = __webpack_require__(11) + , process = global.process + , setTask = global.setImmediate + , clearTask = global.clearImmediate + , MessageChannel = global.MessageChannel + , counter = 0 + , queue = {} + , ONREADYSTATECHANGE = 'onreadystatechange' + , defer, channel, port; +var run = function(){ + var id = +this; + if(queue.hasOwnProperty(id)){ + var fn = queue[id]; + delete queue[id]; + fn(); + } +}; +var listener = function(event){ + run.call(event.data); +}; +// Node.js 0.9+ & IE10+ has setImmediate, otherwise: +if(!setTask || !clearTask){ + setTask = function setImmediate(fn){ + var args = [], i = 1; + while(arguments.length > i)args.push(arguments[i++]); + queue[++counter] = function(){ + invoke(typeof fn == 'function' ? fn : Function(fn), args); + }; + defer(counter); + return counter; + }; + clearTask = function clearImmediate(id){ + delete queue[id]; + }; + // Node.js 0.8- + if(__webpack_require__(35)(process) == 'process'){ + defer = function(id){ + process.nextTick(ctx(run, id, 1)); + }; + // Browsers with MessageChannel, includes WebWorkers + } else if(MessageChannel){ + channel = new MessageChannel; + port = channel.port2; + channel.port1.onmessage = listener; + defer = ctx(port.postMessage, port, 1); + // Browsers with postMessage, skip WebWorkers + // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' + } else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){ + defer = function(id){ + global.postMessage(id + '', '*'); + }; + global.addEventListener('message', listener, false); + // IE8- + } else if(ONREADYSTATECHANGE in cel('script')){ + defer = function(id){ + html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){ + html.removeChild(this); + run.call(id); + }; + }; + // Rest old browsers + } else { + defer = function(id){ + setTimeout(ctx(run, id, 1), 0); + }; + } +} +module.exports = { + set: setTask, + clear: clearTask +}; + +/***/ }), +/* 111 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getLogger = exports.LOG_LEVELS = exports.setLogLevel = exports.IceTransportTypes = exports.PlaybackVideoEncoder = exports.PlaybackAudioEncoder = exports.SharedObjectEventTypes = exports.FailoverSubscriberEventTypes = exports.RTCSubscriberEventTypes = exports.SubscriberEventTypes = exports.FailoverPublisherEventTypes = exports.RTCPublisherEventTypes = exports.PublisherEventTypes = exports.Red5ProSharedObject = exports.PlaybackControls = exports.PublisherView = exports.RTMPPublisher = exports.RTCPublisher = exports.Red5ProPublisher = exports.PlaybackView = exports.HLSSubscriber = exports.RTMPSubscriber = exports.RTCSubscriber = exports.Red5ProSubscriber = undefined; + +var _index = __webpack_require__(24); + +Object.defineProperty(exports, 'PlaybackControls', { + enumerable: true, + get: function get() { + return _index.PlaybackControls; + } +}); + +var _log = __webpack_require__(2); + +var _index2 = __webpack_require__(125); + +var subscriberLib = _interopRequireWildcard(_index2); + +var _index3 = __webpack_require__(119); + +var publisherLib = _interopRequireWildcard(_index3); + +var _index4 = __webpack_require__(123); + +var sharedObjectLib = _interopRequireWildcard(_index4); + +var _playback = __webpack_require__(33); + +var playbackEnum = _interopRequireWildcard(_playback); + +var _webrtc = __webpack_require__(55); + +var webrtcEnum = _interopRequireWildcard(_webrtc); + +var _publisherEvent = __webpack_require__(79); + +var publisherEvent = _interopRequireWildcard(_publisherEvent); + +var _subscriberEvent = __webpack_require__(80); + +var subscriberEvent = _interopRequireWildcard(_subscriberEvent); + +var _sharedobjectEvent = __webpack_require__(56); + +var sharedobjectEvent = _interopRequireWildcard(_sharedobjectEvent); + +var _playback2 = __webpack_require__(42); + +var _playback3 = _interopRequireDefault(_playback2); + +var _publish = __webpack_require__(57); + +var _publish2 = _interopRequireDefault(_publish); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +/* ---------------------------- */ +/* Subscription related references. */ +/* ---------------------------- */ + +/** + * The fail-over enabled Subscriber Factory. + * @see Red5ProSubscriber + */ +/** + * Main entry of SDK, accessible on the `window` global at `red5prosdk`. + * + * @file red5pro.min.js + * @module red5prosdk + * + * + */ + +// SDK_VERSION, LOG_LEVEL injected from webpack build. +var Red5ProSubscriber = exports.Red5ProSubscriber = subscriberLib.Red5ProSubscriber; +/** + * The WebRTC based Subscriber. + * + * An instance of `RTCSubscriber` can be created explicitly using this class, or by the `Red5ProSubscriber` fail-over factory. + * @see RTCSubscriber + */ +var RTCSubscriber = exports.RTCSubscriber = subscriberLib.RTCSubscriber; +/** + * The Flash (utilizing RTMP protocol) based Subscriber. + * + * An instance of `RTMPSubscriber` can be created explicitly using this class, or by the `Red5ProSubscriber` fail-over factory. + * @see RTMPSubscriber + */ +var RTMPSubscriber = exports.RTMPSubscriber = subscriberLib.RTMPSubscriber; +/** + * The HLS (HTTP Live Stream) based Subscriber. + * + * An instance of `HLSSubscriber` can be created explicitly using this class, or by the `Red5ProSubscriber` fail-over factory. + * @see HLSSubscriber + */ +var HLSSubscriber = exports.HLSSubscriber = subscriberLib.HLSSubscriber; +/** + * Still used, but API-deprecated View instance for playback. Has default setup in version 4.0.0. + * @private + */ +exports.PlaybackView = _playback3.default; + +/* ---------------------------- */ +/* Broadcast related references. */ +/* ---------------------------- */ + +/** + * The fail-over enabled Publisher Factory. + * @see Red5ProPublisher + */ + +var Red5ProPublisher = exports.Red5ProPublisher = publisherLib.Red5ProPublisher; +/** + * The WebRTC based Publisher.
An instance of `RTCPublisher` can be created explicitly using this class, or by the `Red5ProPublisher` fail-over factory. + * @see RTCPublisher + */ +var RTCPublisher = exports.RTCPublisher = publisherLib.RTCPublisher; +/** + * The Flash (utilizing RTMP protocol) based Publisher. + * + * An instance of `RTMPPublisher` can be created explicitly using this class, or by the `Red5ProPublisher` fail-over factory. + * @see RTMPPublisher + */ +var RTMPPublisher = exports.RTMPPublisher = publisherLib.RTMPPublisher; +/** + * Still used, but API-deprecated View instance for broadcast/preview. Has default setup in version 4.0.0. + * @private + */ +exports.PublisherView = _publish2.default; + +/* Playback controls interface. */ + +/* Shared Object references. */ +/** + * The ShardObject class. + * @see Red5ProSharedObject + */ +var Red5ProSharedObject = exports.Red5ProSharedObject = sharedObjectLib.Red5ProSharedObject; + +/* Events */ +/** + * Enumeration of common Publisher Events. + */ +var PublisherEventTypes = exports.PublisherEventTypes = publisherEvent.PublisherEventTypes; +/** + * Enueration of events specific to WebRTC-based Publishers. + */ +var RTCPublisherEventTypes = exports.RTCPublisherEventTypes = publisherEvent.RTCPublisherEventTypes; +/** + * Enumeration of events specific to fail-over Publisher factory. + */ +var FailoverPublisherEventTypes = exports.FailoverPublisherEventTypes = publisherEvent.FailoverPublisherEventTypes; +/** + * Enumeraiton of common Subscriber Events. + */ +var SubscriberEventTypes = exports.SubscriberEventTypes = subscriberEvent.SubscriberEventTypes; +/** + * Enumeration of events specific to WebRTC-based Subscribers. + */ +var RTCSubscriberEventTypes = exports.RTCSubscriberEventTypes = subscriberEvent.RTCSubscriberEventTypes; +/** + * Enumeration of events specific to fail-over Subscriber factory. + */ +var FailoverSubscriberEventTypes = exports.FailoverSubscriberEventTypes = subscriberEvent.FailoverSubscriberEventTypes; +/** + * Enumeration of events for Shared Objects. + */ +var SharedObjectEventTypes = exports.SharedObjectEventTypes = sharedobjectEvent.SharedObjectEventTypes; + +/* Enums */ +/** + * Enumerate Audio Encoder options for Subscribers. + * * `OPUS` + * * `PCMU` + * * `PCMA` + * * `SPEEX` + * * `NONE` + */ +var PlaybackAudioEncoder = exports.PlaybackAudioEncoder = playbackEnum.PlaybackAudioEncoder; +/** + * Enumerated Video Encoder options for Subscribers. + * * `VP8` + * * `H264` + * * `NONE` + */ +var PlaybackVideoEncoder = exports.PlaybackVideoEncoder = playbackEnum.PlaybackVideoEncoder; + +/** + * Enumerate ICE Transport options for Publishers and Subscribers. + * * `UDP` + * * `TCP` + */ +var IceTransportTypes = exports.IceTransportTypes = webrtcEnum.IceTransportTypes; + +(0, _log.establishLogger)('' + "debug" || _log.LEVELS.DEBUG); // eslint-disable-line no-undef + +/** + * Sets the log level for logs from the SDK + * @param {string} level + * The specified log level. + * @see LOG_LEVELS + */ +var setLogLevel = exports.setLogLevel = function setLogLevel(level) { + if (_log.LEVELS.hasOwnProperty(level.toUpperCase())) { + (0, _log.establishLogger)(level); + if (console) { + console.log('Red5 Pro SDK Version ' + "4.6.0-RC8"); // eslint-disable-line no-undef,no-console + } + } +}; + +/** + * The enumerated log level Strings. + * * `TRACE` + * * `INFO` + * * `DEBUG` + * * `WARN` + * * `ERROR` + * * `FATAL` + */ +var LOG_LEVELS = exports.LOG_LEVELS = _log.LEVELS; +/** + * Retrieves the Logger instance used by the SDK. + * + * @returns {Logger} + * The logger. + */ +var getLogger = exports.getLogger = _log.getLogger; + +/***/ }), +/* 112 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +var jsonAttr = /['"](.*?)['"]:/gi; +var jsonVal = /:['"](.*?)['"]/gi; + +/** + * Reads the UTF string of the data passed in. + * + * @param {String} data + * @param {Number} start + * @param {Number} len + * + * @return {String} + * The Parsed information. + * + * @private + */ +function readUTF(data, start, len) { + var result = '', + offset = start, + end = start + len; + do { + result += String.fromCharCode(data[offset++]); + } while (offset < end); + return result; +} + +/** + * Parses and interprets the orientation data from passed in JSON string. + * + * @param {String} text + * + * @return {Object} + * The parsed object with an `orientation` property if parsed properly. + * + * @private + */ +function parseJSONForOrientation(text) { + try { + var value = JSON.parse(text); + if (value.hasOwnProperty('orientation')) { + return { + orientation: parseInt(value.orientation) + }; + } + return undefined; + } catch (e) { + var match = jsonAttr.exec(text); + var match2 = void 0; + if (match && match.length > 1) { + match2 = jsonVal.exec(text); + if (match[1] === 'orientation' && match2 && match2.length > 1) { + return { + orientation: parseInt(match2[1]) + }; + } + } + return undefined; + } +} + +/** + * Event handler for metadata related to orientation information. + * + * @param {Element} player + * The media element related to the metadata. + * @param {Function} callback + * The callback to invoke with the parsed orientation information. + * + * @private + */ +var onOrientationMetadata = exports.onOrientationMetadata = function onOrientationMetadata(player, callback) { + + var textTracks = typeof player.textTracks === 'function' ? player.textTracks() : player.textTracks; + + if (textTracks) { + + player.addTextTrack('metadata'); + + textTracks.addEventListener('addtrack', function (addTrackEvent) { + + var track = addTrackEvent.track; + track.mode = 'hidden'; + track.addEventListener('cuechange', function (cueChangeEvent) { + var cues = void 0; + var i = void 0; + // Mostly Chrome. + if (cueChangeEvent && cueChangeEvent.currentTarget) { + cues = cueChangeEvent.currentTarget.cues; + } else if (undefined === undefined) { + cues = track.cues; + cues = cues && cues.length > 0 ? cues : track.activeCues; + } else if (undefined !== undefined) { + // Mostly Firefox & Safari. + cues = cues && cues.length > 0 ? cues : undefined.activeCues; + } + // Mostly failure. + cues = cues || []; + for (i = 0; i < cues.length; i++) { + var data = cues[i]; + if (data.value) { + var text = typeof data.value.data === 'string' ? data.value.data : readUTF(data.value.data, 0, data.size); + var orientation = parseJSONForOrientation(text); + if (typeof orientation !== 'undefined') { + callback(orientation); + break; + } + } + } + }); + }); + } +}; + +/***/ }), +/* 113 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Exception for missing element when assigning Presentation Controllers for Publishers and Subscribers. + */ + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.NoSupportedCameraResolutionsError = exports.NoElementFoundError = undefined; + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NoElementFoundError = exports.NoElementFoundError = function NoElementFoundError(message) { + (0, _classCallCheck3.default)(this, NoElementFoundError); + + this.name = 'NoElementFound'; + this.message = message; +}; + +/** + * Exception when requesting media with a `MediaConstraint` that the browser cannot support. + * WebRTC Only. + */ + + +var NoSupportedCameraResolutionsError = exports.NoSupportedCameraResolutionsError = function NoSupportedCameraResolutionsError(message) { + (0, _classCallCheck3.default)(this, NoSupportedCameraResolutionsError); + + this.name = 'NoSupportedCameraResolutionsError'; + this.message = message; +}; + +/***/ }), +/* 114 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(6); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(8); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _get2 = __webpack_require__(93); + +var _get3 = _interopRequireDefault(_get2); + +var _inherits2 = __webpack_require__(7); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _socketHelper = __webpack_require__(82); + +var _socketHelper2 = _interopRequireDefault(_socketHelper); + +var _log = __webpack_require__(2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NAME = 'R5ProPublisherSocket'; + +/** + * Publisher-based extension of `SocketHelper`. + * + * @extends {SocketHelper} + * + * @private + */ + +var PublisherSocketHelper = function (_SocketHelper) { + (0, _inherits3.default)(PublisherSocketHelper, _SocketHelper); + + function PublisherSocketHelper(responder) { + (0, _classCallCheck3.default)(this, PublisherSocketHelper); + return (0, _possibleConstructorReturn3.default)(this, (PublisherSocketHelper.__proto__ || (0, _getPrototypeOf2.default)(PublisherSocketHelper)).call(this, responder, NAME)); + } + + /** + * Override to respond to messages coming over WebSocket. + */ + + + (0, _createClass3.default)(PublisherSocketHelper, [{ + key: 'respond', + value: function respond(message) { + if (message.data) { + var json = this.getJsonFromSocketMessage(message); + try { + if (!(0, _get3.default)(PublisherSocketHelper.prototype.__proto__ || (0, _getPrototypeOf2.default)(PublisherSocketHelper.prototype), 'respond', this).call(this, message)) { + if (json.data !== undefined) { + if (json.data.sdp !== undefined) { + if (json.data.sdp.type === 'answer') { + this._responder.onSDPAnswer(json.data); + } + } + if (json.data.candidate !== undefined) { + this._responder.onAddIceCandidate(json.data.candidate); + } + if (json.data.type === 'status') { + if (json.data.code === 'NetConnection.ICE.TricleCompleted' || json.data.code === 'NetConnection.ICE.TrickleCompleted') { + this._responder.onSocketIceCandidateEnd(); + } else { + this._responder.onPublisherStatus(json.data); + } + } + } + } + } catch (e) { + (0, _log.error)(NAME, '[ws.onmessage] - Error in accessing message data as JSON. ' + e.message); + this._responder.onSocketMessageError('[ws.onmessage] - Error in accessing message data as JSON. ' + e.message); + } + } else { + (0, _log.warn)(NAME, '[ws.onmessage] - No Message Data.'); + } + } + }]); + return PublisherSocketHelper; +}(_socketHelper2.default); + +exports.default = PublisherSocketHelper; + +/***/ }), +/* 115 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(6); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(8); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _get2 = __webpack_require__(93); + +var _get3 = _interopRequireDefault(_get2); + +var _inherits2 = __webpack_require__(7); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _socketHelper = __webpack_require__(82); + +var _socketHelper2 = _interopRequireDefault(_socketHelper); + +var _log = __webpack_require__(2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NAME = 'R5ProSubscriptionSocket'; + +/** + * Subscriber-based extension of `SocketHelper`. + * + * @extends {SocketHelper} + * + * @private + */ + +var SubscriptionSocketHelper = function (_SocketHelper) { + (0, _inherits3.default)(SubscriptionSocketHelper, _SocketHelper); + + function SubscriptionSocketHelper(responder) { + (0, _classCallCheck3.default)(this, SubscriptionSocketHelper); + return (0, _possibleConstructorReturn3.default)(this, (SubscriptionSocketHelper.__proto__ || (0, _getPrototypeOf2.default)(SubscriptionSocketHelper)).call(this, responder, NAME)); + } + + /** + * Override to respond to messages coming over WebSocket. + */ + + + (0, _createClass3.default)(SubscriptionSocketHelper, [{ + key: 'respond', + value: function respond(message) { + if (message.data) { + var json = this.getJsonFromSocketMessage(message); + try { + if (!(0, _get3.default)(SubscriptionSocketHelper.prototype.__proto__ || (0, _getPrototypeOf2.default)(SubscriptionSocketHelper.prototype), 'respond', this).call(this, message)) { + if (json.data !== undefined) { + if (json.data.sdp !== undefined) { + if (json.data.sdp.type === 'offer') { + this._responder.onSDPOffer(json.data); + } + } + if (json.data.candidate !== undefined) { + this._responder.onAddIceCandidate(json.data.candidate); + } + if (json.data.type === 'status') { + if (json.data.code === 'NetConnection.ICE.TricleCompleted' || json.data.code === 'NetConnection.ICE.TrickleCompleted') { + this._responder.onSocketIceCandidateEnd(); + } else if (json.data.code === 'NetStream.Play.UnpublishNotify') { + this._responder.onUnpublish(); + } else if (json.data.code === 'NetConnection.Connect.Closed') { + this._responder.onConnectionClosed(); + } else { + this._responder.onSubscriberStatus(json.data); + } + } + if (json.data.hasOwnProperty('status')) { + if (json.data.status === 'NetStream.Play.UnpublishNotify') { + this._responder.onUnpublish(); + } + } + if (json.type !== undefined) { + if (json.type === 'metadata') { + // It is a `send` API invocation. + if (json.method !== undefined) { + this._responder.onSendReceived(json.method, json.data); + } + // Else it is normal metadata. + else { + this._responder.onMetaData(json.data); + } + } + } + } else if (json.type !== undefined) { + if (json.type === 'metadata') { + this._responder.onMetaData(json.metadata); + } + } + } + } catch (e) { + (0, _log.error)(NAME, '[ws.onmessage] - Error in accessing message data as JSON. ' + e.message); + this._responder.onSocketMessageError('[ws.onmessage] - Error in accessing message data as JSON. ' + e.message); + } + } else { + (0, _log.warn)(NAME, '[ws.onmessage] - No Message Data.'); + } + } + }]); + return SubscriptionSocketHelper; +}(_socketHelper2.default); + +exports.default = SubscriptionSocketHelper; + +/***/ }), +/* 116 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _stringify = __webpack_require__(12); + +var _stringify2 = _interopRequireDefault(_stringify); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _webrtc = __webpack_require__(40); + +var webrtc = _interopRequireWildcard(_webrtc); + +var _promise = __webpack_require__(5); + +var _log = __webpack_require__(2); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NAME = 'R5ProPublishPeer'; + +/** + * Proxy to Peer Connection for Publishers. + * + * @private + */ + +var PublisherPeerHelper = function () { + function PublisherPeerHelper(responder) { + (0, _classCallCheck3.default)(this, PublisherPeerHelper); + + this._responder = responder; + this._peerConnection = undefined; + } + + /** + * Removes handlers assigned to the peer connection instance. + * + * @param {RTCPeerConnection} connection + */ + + + (0, _createClass3.default)(PublisherPeerHelper, [{ + key: '_removeConnectionHandlers', + value: function _removeConnectionHandlers(connection) { + connection.onconnectionstatechange = undefined; + connection.oniceconnectionstatechange = undefined; + connection.onicecandidate = undefined; + } + + /** + * Assigns handlers to events on the peer connection instance. + * + * @param {RTCPeerConnection} connection + * @param {Promise} promise + * The `Promise` to resolve or reject on success of connection. + */ + + }, { + key: '_addConnectionHandlers', + value: function _addConnectionHandlers(connection, promise) { + var _this = this; + + var reconnectTimeout = void 0; + var timeoutLimit = 5000; + + connection.onconnectionstatechange = function () { + (0, _log.debug)(NAME, '[peer.onconnectionstatechange] - State: ' + connection.connectionState); + if (connection.connectionState === 'connected') { + (0, _log.debug)(NAME, '[peerconnection:open]'); + if (promise) { + promise.resolve(_this); + } + } else if (connection.connectionState === 'failed' || connection.connectionState === 'disconnected') { + (0, _log.warn)(NAME, '[peerconnection:error]'); + if (promise) { + promise.reject(); + } + } else { + (0, _log.debug)(NAME, '[peerconnection:' + connection.connectionState + ']'); + } + }; + + connection.onicecandidate = function (event) { + (0, _log.debug)(NAME, '[peer.onicecandidate] - Peer Candidate: ' + event.candidate); + if (event.candidate) { + _this._responder.onIceCandidate(event.candidate); + } else if (event.candidate === null) { + // null means they have finished sending candidates back and forth? + // Moved to notification from server on trickle end event. + // this._responder.onIceCandidateTrickleEnd() + } + }; + + connection.oniceconnectionstatechange = function (event) { + var state = connection.iceConnectionState; + (0, _log.debug)(NAME, '[peer.oniceconnectionstatechange] - State: ' + state); + if (state === 'failed') { + if (reconnectTimeout) { + clearTimeout(reconnectTimeout); + } + _this._responder.onPeerConnectionClose(event); + } else if (state === 'disconnected') { + // may receive a disconnect temporarily that will then return to a connection. + reconnectTimeout = setTimeout(function () { + (0, _log.debug)(NAME, '[peer.oniceconnectionstatechange] - Reconnect timeout reached. Closing PeerConnection.'); + clearTimeout(reconnectTimeout); + _this._responder.onPeerConnectionClose(event); + }, timeoutLimit); + } else { + if (reconnectTimeout) { + (0, _log.debug)(NAME, '[peer.oniceconnectionstatechange] - Clearing timeout for reconnect.'); + clearTimeout(reconnectTimeout); + } + } + }; + + connection.onsignalingstatechange = function (event) { + // eslint-disable-line no-unused-vars + var state = connection.signalingState; + (0, _log.debug)(NAME, '[peer.onsignalingstatechange] - State: ' + state); + }; + + connection.onicegatheringstatechange = function () { + var state = connection.iceGatheringState; + (0, _log.debug)(NAME, '[peer.onicegatheringstatechange] - State: ' + state); + if (state === 'complete') { + _this._responder.onPeerGatheringComplete(); + } + }; + + connection.onremovestream = function () { + (0, _log.debug)(NAME, '[peer.onremovestream]'); + }; + } + + /** + * Request to `getUserMedia` on browser. + * + * @param {Object} contraints + * The `MediaConstraints` object. + * @return {Promise} + */ + + }, { + key: 'getUserMedia', + value: function getUserMedia(constraints) { + return webrtc.getUserMedia(constraints); + } + + /** + * Request to force `getUserMedia` request using the provided constraints. + * + * @param {Object} constraints + * The `MediaConstraints` to force in request on `getUserMedia`. + * @return {Promise} + */ + + }, { + key: 'forceUserMedia', + value: function forceUserMedia(constraints) { + return webrtc.forceUserMedia(constraints); + } + + /** + * Request to create an Offer through the Peer Connection. + * + * @param {Object} bandwidth + * The optional bandwidth configuration to use in munging SDP before sending offer. + * @param {Promise} promise + * The `Promise` to resolve or reject on success of sending offer on Peer Connection. + * @return {Promise} + */ + + }, { + key: 'createOffer', + value: function createOffer() { + var _this2 = this; + + var bandwidth = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; + var offerPromise = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + + (0, _log.debug)(NAME, '[createoffer]'); + var p = offerPromise || new _promise.DeferredPromise(); + this._peerConnection.createOffer().then(function (sessionDescription) { + _this2.setLocalDescription(sessionDescription, bandwidth).then(function () { + if (bandwidth) { + sessionDescription.sdp = webrtc.updateBandwidth(bandwidth, sessionDescription.sdp); + } + _this2._responder.onSDPSuccess(); + p.resolve(sessionDescription); + }).catch(function (err) { + _this2._responder.onSDPError(err); + p.reject(err); + }); + }).catch(function (err) { + (0, _log.debug)(NAME, '[createoffer:error]'); + p.reject(err); + }); + return p.hasOwnProperty('promise') ? p.promise : p; + } + + /** + * Request to set local description on the Peer Connection. + * + * @param {Object} sessionDescription + * @return {Promise} + */ + + }, { + key: 'setLocalDescription', + value: function setLocalDescription(sessionDescription) { + (0, _log.debug)(NAME, '[setlocaldescription]'); + return this._peerConnection.setLocalDescription(sessionDescription); + } + + /** + * Request to set remote description. + * + * @param {Object} sdp + * The Session Description tot set on the Peer Connection. + * @return {Promise} + */ + + }, { + key: 'setRemoteDescription', + value: function setRemoteDescription(sdp) { + (0, _log.debug)(NAME, '[setremotedescription]'); + return this._peerConnection.setRemoteDescription(new webrtc.RTCSessionDescription(sdp)); + } + + /** + * Request to add ICE candidate to Peer Connection. + * + * @param {Object} candidate + * @return {Promise} + */ + + }, { + key: 'addIceCandidate', + value: function addIceCandidate(candidate) { + (0, _log.debug)(NAME, '[addcandidate]'); + return this._peerConnection.addIceCandidate(candidate); + } + + /** + * Request to setup the proxied Peer Connection instance. + * + * @param {Array} iceServers + * List of ICE servers to use in the connection. + * @param {Promise} setUpPromise + * The `Promise` to resolve or reject on in success in setting up the Peer Connection. + * @param {String} rtcpMuxPolicy + * The type of mux policy to use. + * @return {Promise} + */ + + }, { + key: 'setUp', + value: function setUp(iceServers) { + var setUpPromise = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; + var rtcpMuxPolicy = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined; + + this.tearDown(); + var p = setUpPromise || new _promise.DeferredPromise(); + try { + var peerConfig = { + iceServers: iceServers, + iceCandidatePoolSize: 2, + bundlePolicy: 'max-bundle' + }; + if (typeof rtcpMuxPolicy !== 'undefined') { + peerConfig.rtcpMuxPolicy = rtcpMuxPolicy; + } + (0, _log.debug)(NAME, '[peerconnection:setup]: ' + (0, _stringify2.default)(peerConfig, null, 2)); + var peer = new webrtc.RTCPeerConnection(peerConfig, { + optional: [{ RtpDataChannels: false }, { googCpuOveruseDetection: true }] + }); + this._addConnectionHandlers(peer); + this._peerConnection = peer; + p.resolve(peer); + } catch (e) { + (0, _log.warn)(NAME, 'Could not establish a PeerConnection. ' + e.message); + p.reject(e.message); + } + return p.hasOwnProperty('promise') ? p.promise : p; + } + + /** + * Request to tear down proxied Peer Connection instance. + */ + + }, { + key: 'tearDown', + value: function tearDown() { + (0, _log.debug)(NAME, '[teardown]'); + if (this._peerConnection) { + this._removeConnectionHandlers(this._peerConnection); + try { + this._peerConnection.close(); + } catch (e) { + (0, _log.warn)(NAME, '[peerconnection.close] error: ' + e.message); + } finally { + this._peerConnection = undefined; + } + } + } + + /** + * Accessor for the proxied RTCPeerConnection instance. + * + * @return {RTCPeerConnection} + */ + + }, { + key: 'connection', + get: function get() { + return this._peerConnection; + } + }]); + return PublisherPeerHelper; +}(); + +exports.default = PublisherPeerHelper; + +/***/ }), +/* 117 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _stringify = __webpack_require__(12); + +var _stringify2 = _interopRequireDefault(_stringify); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _webrtc = __webpack_require__(40); + +var webrtc = _interopRequireWildcard(_webrtc); + +var _promise = __webpack_require__(5); + +var _log = __webpack_require__(2); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NAME = 'R5ProSubscriptionPeer'; + +/** + * Utility to check if candidate is empty, and considered the end of the trickle negotiation for a subscriber. + * + * @param {Object} candidate + * + * @private + */ +var isEmptyCandidate = function isEmptyCandidate(candidate) { + return typeof candidate === 'undefined' || typeof candidate === 'string' && candidate.length === 0; +}; + +/** + * Proxy to Peer Connection for Subscribers. + * + * @private + */ + +var SubscriptionPeerHelper = function () { + function SubscriptionPeerHelper(responder) { + (0, _classCallCheck3.default)(this, SubscriptionPeerHelper); + + this._responder = responder; + this._peerConnection = undefined; + this._pendingMediaStream = undefined; + } + + /** + * Removes handlers assigned to the peer connection instance. + * + * @param {RTCPeerConnection} connection + */ + + + (0, _createClass3.default)(SubscriptionPeerHelper, [{ + key: '_removeConnectionHandlers', + value: function _removeConnectionHandlers(connection) { + connection.onconnectionstatechange = undefined; + connection.oniceconnectionstatechange = undefined; + connection.onicecandidate = undefined; + connection.onaddstream = undefined; + connection.ontrack = undefined; + } + + /** + * Assigns handlers to events on the peer connection instance. + * + * @param {RTCPeerConnection} connection + * @param {Promise} promise + * The `Promise` to resolve or reject on success of connection. + */ + + }, { + key: '_addConnectionHandlers', + value: function _addConnectionHandlers(connection, promise) { + var _this = this; + + var reconnectTimeout = void 0; + var timeoutLimit = 5000; + + connection.onconnectionstatechange = function () { + if (connection.connectionState === 'connected') { + (0, _log.debug)(NAME, '[peerconnection:open]'); + if (promise) { + promise.resolve(_this); + } + } else if (connection.connectionState === 'failed' || connection.connectionState === 'disconnected') { + (0, _log.warn)(NAME, '[peerconnection:error]'); + if (promise) { + promise.reject(); + } + } + }; + + connection.onicecandidate = function (event) { + (0, _log.debug)(NAME, '[peer.onicecandidate] - Peer Candidate: ' + event.candidate); + if (event.candidate) { + _this._responder.onIceCandidate(event.candidate); + } else if (event.candidate === null) { + // null means they have finished sending candidates back and forth? + _this._responder.onIceCandidateTrickleEnd(_this._pendingMediaStream); + _this._pendingMediaStream = undefined; + } + }; + + connection.onaddstream = function (event) { + (0, _log.debug)(NAME, '(onaddstream) Peer Add Stream: ' + event.stream); + if (event.stream && _this._pendingMediaStream === undefined) { + _this._pendingMediaStream = event.stream; + _this._responder.onAnswerMediaStream(event.stream); + } + }; + + // Picked up by Firefox, all others use `onaddstream`, but adapter.js will call both, so we limit. + connection.ontrack = function (event) { + (0, _log.debug)(NAME, '(ontrack) Peer Add Stream: ' + event.streams); + if (event.streams && event.streams.length > 0 && _this._pendingMediaStream === undefined) { + _this._pendingMediaStream = event.streams[0]; + _this._responder.onAnswerMediaStream(event.streams[0]); + } + }; + + connection.oniceconnectionstatechange = function (event) { + var state = connection.iceConnectionState; + (0, _log.debug)(NAME, '[peer.oniceconnectionstatechange] - State: ' + state); + if (state === 'failed') { + if (reconnectTimeout) { + clearTimeout(reconnectTimeout); + } + _this._responder.onPeerConnectionClose(event); + } else if (state === 'disconnected') { + // may receive a disconnect temporarily that will then return to a connection. + reconnectTimeout = setTimeout(function () { + (0, _log.debug)(NAME, '[peer.oniceconnectionstatechange] - Reconnect timeout reached. Closing PeerConnection.'); + clearTimeout(reconnectTimeout); + _this._responder.onPeerConnectionClose(event); + }, timeoutLimit); + } else { + if (reconnectTimeout) { + (0, _log.debug)(NAME, '[peer.oniceconnectionstatechange] - Clearing timeout for reconnect.'); + clearTimeout(reconnectTimeout); + } + } + }; + + connection.onicegatheringstatechange = function () { + var state = connection.iceGatheringState; + (0, _log.debug)(NAME, '[peer.onicegatheringstatechange] - State: ' + state); + if (state === 'complete') { + _this._responder.onPeerGatheringComplete(); + } + }; + + connection.onicegatheringstatechange = function () { + var state = connection.iceGatheringState; + (0, _log.debug)(NAME, '[peer.onicegatheringstatechange] - State: ' + state); + if (state === 'complete') { + _this._responder.onPeerGatheringComplete(); + } + }; + + connection.onremovestream = function () { + (0, _log.debug)(NAME, '[peer.onremovestream]'); + }; + } + + /** + * Request to create answer on Peer Connection. + * + * @param {Object} sdp + * The Session Description to set as remote description. + * @return {Promise} + */ + + }, { + key: 'createAnswer', + value: function createAnswer(sdp) { + var _this2 = this; + + (0, _log.debug)(NAME, '[createanswer]'); + var deferred = new _promise.DeferredPromise(); + + this._peerConnection.setRemoteDescription(sdp).then(this._responder.onSDPSuccess).catch(function (err) { + _this2._responder.onSDPError(err); + }); + + this._peerConnection.createAnswer().then(function (sessionDescription) { + _this2._peerConnection.setLocalDescription(sessionDescription).then(_this2._responder.onSDPSuccess).catch(function (err) { + _this2._responder.onSDPError(err); + }); + deferred.resolve(sessionDescription); + }).catch(deferred.reject); + + return deferred.promise; + } + + /** + * Request to add ICE candidate to Peer Connection. + * + * @param {Object} candidate + * @return {Promise} + */ + + }, { + key: 'addIceCandidate', + value: function addIceCandidate(candidate) { + (0, _log.debug)(NAME, 'checking if empty...'); + if (isEmptyCandidate(candidate)) { + (0, _log.debug)(NAME, '[addicecandidate]:: empty'); + } else { + (0, _log.debug)(NAME, '[addicecandidate]'); + var iceCandidate = new webrtc.RTCIceCandidate({ + sdpMLineIndex: candidate.sdpMLineIndex, + candidate: candidate.candidate + }); + this._peerConnection.addIceCandidate(iceCandidate).then(function () { + // nada + }).catch(function (err) { + (0, _log.error)(NAME, 'Error in add of ICE Candidiate + ' + err); + }); + } + } + + /** + * Request to setup the proxied Peer Connection instance. + * + * @param {Array} iceServers + * List of ICE servers to use in the connection. + * @param {Promise} setUpPromise + * The `Promise` to resolve or reject on in success in setting up the Peer Connection. + * @param {String} rtcpMuxPolicy + * The type of mux policy to use. + * @return {Promise} + */ + + }, { + key: 'setUp', + value: function setUp(iceServers) { + var setUpPromise = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; + var rtcpMuxPolicy = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined; + + this.tearDown(); + var p = setUpPromise || new _promise.DeferredPromise(); + try { + var peerConfig = { + iceServers: iceServers, + iceCandidatePoolSize: 2, + bundlePolicy: "max-bundle" + }; + if (typeof rtcpMuxPolicy !== 'undefined') { + peerConfig.rtcpMuxPolicy = rtcpMuxPolicy; + } + (0, _log.debug)(NAME, '[peerconnection:setup]: ' + (0, _stringify2.default)(peerConfig, null, 2)); + var peer = new webrtc.RTCPeerConnection(peerConfig, { + optional: [{ RtpDataChannels: false }, { googCpuOveruseDetection: true }] + }); + this._peerConnection = peer; + this._addConnectionHandlers(peer); + p.resolve(); + } catch (e) { + (0, _log.warn)(NAME, 'Could not create a RTCPeerConnection. Error: ' + e.message); + p.reject(e.message); + } + return p.hasOwnProperty('promise') ? p.promise : p; + } + + /** + * Request to tear down proxied Peer Connection instance. + */ + + }, { + key: 'tearDown', + value: function tearDown() { + (0, _log.debug)(NAME, '[teardown]'); + if (this._peerConnection) { + this._removeConnectionHandlers(this._peerConnection); + try { + this._peerConnection.close(); + } catch (e) { + (0, _log.warn)(NAME, '[peerconnection.close] error: ' + e.message); + } + } + this._pendingMediaStream = undefined; + this._peerConnection = undefined; + } + + /** + * Accessor for the proxied RTCPeerConnection instance. + * + * @return {RTCPeerConnection} + */ + + }, { + key: 'connection', + get: function get() { + return this._peerConnection; + } + }]); + return SubscriptionPeerHelper; +}(); + +exports.default = SubscriptionPeerHelper; + +/***/ }), +/* 118 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.RawStream = undefined; + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _browserBunyan = __webpack_require__(95); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Custom logger for bunyon. + * + * @private + */ +var RawStream = exports.RawStream = function () { + function RawStream() { + (0, _classCallCheck3.default)(this, RawStream); + } + + (0, _createClass3.default)(RawStream, [{ + key: 'write', + value: function write(rec) { + console.log('%s - [%s] %s: %s', // eslint-disable-line no-console + rec.time.toISOString(), rec.name, _browserBunyan.nameFromLevel[rec.level], rec.msg); + } + }]); + return RawStream; +}(); + +/***/ }), +/* 119 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.RTCPublisher = exports.RTMPPublisher = exports.Red5ProPublisher = undefined; + +var _set = __webpack_require__(92); + +var _set2 = _interopRequireDefault(_set); + +var _toConsumableArray2 = __webpack_require__(94); + +var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); + +var _getPrototypeOf = __webpack_require__(6); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(8); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(7); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _map = __webpack_require__(88); + +var _map2 = _interopRequireDefault(_map); + +var _implFactoryOrder = __webpack_require__(85); + +var _implFactoryOrder2 = _interopRequireDefault(_implFactoryOrder); + +var _eventEmitter = __webpack_require__(23); + +var _eventEmitter2 = _interopRequireDefault(_eventEmitter); + +var _red5proRtmp = __webpack_require__(122); + +var _red5proRtmp2 = _interopRequireDefault(_red5proRtmp); + +var _red5proRtc = __webpack_require__(121); + +var _red5proRtc2 = _interopRequireDefault(_red5proRtc); + +var _promise = __webpack_require__(5); + +var _publish = __webpack_require__(54); + +var _log = __webpack_require__(2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NAME = 'Red5ProPublisher'; +var publishFactory = new _implFactoryOrder2.default(); +var publisherImpl = function () { + var map = new _map2.default(); + map.set(_publish.PublishTypes.RTC, _red5proRtc2.default); + map.set(_publish.PublishTypes.RTMP, _red5proRtmp2.default); + return map; +}(); + +/** + * Main entry for failover support of all publisher implementations. + * + * @extends EventEmitter + */ + +var Red5ProPublisher = function (_EventEmitter) { + (0, _inherits3.default)(Red5ProPublisher, _EventEmitter); + + function Red5ProPublisher() { + (0, _classCallCheck3.default)(this, Red5ProPublisher); + + var _this = (0, _possibleConstructorReturn3.default)(this, (Red5ProPublisher.__proto__ || (0, _getPrototypeOf2.default)(Red5ProPublisher)).call(this)); + + _this._options = undefined; + _this._order = [_publish.PublishTypes.RTC, _publish.PublishTypes.RTMP]; + return _this; + } + + /** + * Utilizes Failover Publisher Factory to attempt in determining browser support for Publisher from defined order. + * + * @return {Promise} + * + * @private + */ + + + (0, _createClass3.default)(Red5ProPublisher, [{ + key: '_getPublisherFromOrder', + value: function _getPublisherFromOrder(order, options) { + return publishFactory.create(order, publisherImpl, options, 'init'); + } + + /** + * Returns the specified order for auto-failover. + * + * @return {Array} + * Default: `['rtc', 'rtmp']`. + */ + + }, { + key: 'getPublishOrder', + value: function getPublishOrder() { + return this._order; + } + + /** + * Defines the desired auto-failover order. + * + * @param {Array} order + * The desired order. e.g, `['rtc', 'rtmp']`. + * + * @return {Red5ProPublisher} + * This instance. + */ + + }, { + key: 'setPublishOrder', + value: function setPublishOrder(order) { + // Allow for string value to define single item in order. + order = typeof order === 'string' ? [order] : order; + + // Filter out values not available in enumeration of playback types. + var t = order.filter(function (entry) { + var key = void 0; + for (key in _publish.PublishTypes) { + if (_publish.PublishTypes[key].toLowerCase() === entry.toLowerCase()) { + return true; + } + } + return false; + }).map(function (entry) { + return entry.toLowerCase(); + }); + + // Define new order. + this._order = [].concat((0, _toConsumableArray3.default)(new _set2.default(t))); + (0, _log.debug)(NAME, '[orderupdate]: ' + this._order); + return this; + } + + /** + * Request to initialize and determine the proper Publisher implementation based on configuration. + * The returned `Promise` will either resolve with the determined Publisher instance or reject with an error String in failure to determine Publisher type. + * + * @param {Object} options + * The initialization configuration map for each desired failover tech. + * @return {Promise} + */ + + }, { + key: 'init', + value: function init(options) { + var deferred = new _promise.DeferredPromise(); + (0, _log.debug)(NAME, '[publish]'); + this._options = options; + this._getPublisherFromOrder(this._order, this._options).then(function (publisher) { + deferred.resolve(publisher); + }).catch(function (err) { + (0, _log.warn)(NAME, '[publisherror]: Could not implement a publisher: ' + err); + deferred.reject(err); + }); + return deferred.promise; + } + + /** + * Return enumerated value Publisher types used in failover order. + * @type {Object} + */ + + }, { + key: 'publishTypes', + get: function get() { + return _publish.PublishTypes; + } + }]); + return Red5ProPublisher; +}(_eventEmitter2.default); + +exports.Red5ProPublisher = Red5ProPublisher; +exports.RTMPPublisher = _red5proRtmp2.default; +exports.RTCPublisher = _red5proRtc2.default; + +/***/ }), +/* 120 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _isNan = __webpack_require__(135); + +var _isNan2 = _interopRequireDefault(_isNan); + +var _stringify = __webpack_require__(12); + +var _stringify2 = _interopRequireDefault(_stringify); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _embed = __webpack_require__(77); + +var embed = _interopRequireWildcard(_embed); + +var _browser = __webpack_require__(4); + +var _browser2 = _interopRequireDefault(_browser); + +var _sharedobjectHelperRtmp = __webpack_require__(81); + +var _sharedobjectHelperRtmp2 = _interopRequireDefault(_sharedobjectHelperRtmp); + +var _util = __webpack_require__(86); + +var _object = __webpack_require__(41); + +var _promise = __webpack_require__(5); + +var _log = __webpack_require__(2); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NAME = 'R5ProPublisherSourceHandler'; + +/** + * Determine the video dimensions setting value based on possible definition using `MediaConstraint`. + * @private + */ +var convertDimensionOptions = function convertDimensionOptions(vo) { + return vo.exact || vo.ideal || vo.max || vo.min || vo; +}; + +/** + * Define the audio and video settings for Flash. + * The `width` and `height` attributes relate to video. The `audio` attribute is a boolean flag. + * @private + */ +var mediaConstraintsToFlashvars = function mediaConstraintsToFlashvars(constraints, flashvars) { + var fv = (0, _object.deepCopy)(flashvars); + if (typeof constraints.video === 'boolean') { + fv.video = constraints.video; + } else { + var key = void 0; + for (key in constraints.video) { + fv[key] = convertDimensionOptions(constraints.video[key]); + } + } + fv.audio = constraints.audio; + return fv; +}; + +/** + * The internal Publish Source Handler for an RTMPPublisher. + * @private + */ + +var PublisherSourceHandler = function () { + + /** + * @param {Element} video + * The video DOM Element. + * @param {String} type + * The publisher type: most likely, `RTMP`. + * @param {Object} soResponder + * Optional responder to SharedObject API. If not provided, will generate a `RTMPSharedObjectHandler` instance internally. + * @private + */ + function PublisherSourceHandler(video, type) { + var soResponder = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined; + (0, _classCallCheck3.default)(this, PublisherSourceHandler); + + this.video = video; + this.clone = this.video.cloneNode(true); + this.holder = this.video.parentNode; + this._publisherType = type; + this._swfId = null; + this._embedFuture = undefined; + this._soResponder = soResponder || new _sharedobjectHelperRtmp2.default(); + } + + /** + * Requested and used by RTMPPublisher instance in recognizing completion of embed. + * + * @return {Promise} + * @private + */ + + + (0, _createClass3.default)(PublisherSourceHandler, [{ + key: 'getEmbedOperation', + value: function getEmbedOperation() { + this._embedFuture = _promise.Future.createIfNotExist(this._embedFuture); + return this._embedFuture.promise; + } + + /** + * Clean up of references and modified display. + * @private + */ + + }, { + key: 'cleanUp', + value: function cleanUp() { + // Return to prior DOM manipulation. + this.video.remove(); + this.video = this.clone.cloneNode(true); + this.holder.appendChild(this.video); + this._embedFuture = undefined; + } + + /** + * Request to define the embedding options for a RTMPPublisher. + * + * @param {String} swfId + * The unique id to use in embedding element. + * @param {Object} options + * The initialization configuration to determine flashvars from. + * @param {String} swfUrl + * Optional location of the SWF file to embed. Default is relative path to `red5pro-subscriber.swf`. + * @param {String} minFlashVersion + * Optional semver of minimum Flash version to determine support. Default is `10.0.0`. + * @return {Promise} + * The `Promise` either resolves or rejects the success of embed on page using SWFObject. + * @private + */ + + }, { + key: 'addSource', + value: function addSource(swfId, options) { + var swfUrl = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; + var minFlashVersion = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; + + (0, _log.debug)(NAME, '[addsource]'); + var self = this; + this._swfId = swfId; + this._embedFuture = _promise.Future.createIfNotExist(this._embedFuture); + var deferred = this._embedFuture; + options.swf = swfUrl || options.swf; + options.minFlashVersion = minFlashVersion || options.minFlashVersion; + embed.defineEmbedElement(this.video, this.holder).then(function (elementId) { + (0, _log.debug)(NAME, '[element:complete]'); + var flashvars = { + buffer: options.buffer != null ? options.buffer : 1, + streamMode: options.streamMode, + streamName: options.streamName, + appName: options.app, + host: options.host + }; + if (options.backgroundColor) { + flashvars.backgroundColor = options.backgroundColor; + } + if (options.context) { + flashvars.roomName = options.context; + } + if (options.embedWidth === '100%' || options.embedHeight === '100%') { + flashvars.autosize = true; + } + if (typeof options.connectionParams !== 'undefined') { + flashvars.connectionParams = encodeURIComponent((0, _stringify2.default)(options.connectionParams)); + } + flashvars = mediaConstraintsToFlashvars(options.mediaConstraints, flashvars); + return embed.embedSwfObject(swfId, options, flashvars, _browser2.default.getSwfObject(), elementId); + }).then(function () { + (0, _log.debug)(NAME, '[embed:complete]'); + deferred.resolve(self); + }).catch(function (err) { + return deferred.reject(err); + }); + return deferred.promise; + } + + /** + * Request to connect to server for a broadcast session. + * + * @param {Object} publishOptions + * @private + */ + + }, { + key: 'connect', + value: function connect(publishOptions) { + (0, _log.debug)(NAME, '[connect]'); + var el = _browser2.default.getEmbedObject(this._swfId); + if (el) { + el.connect(publishOptions); + this._soResponder.connect(this._swfId); + } else { + (0, _log.warn)(NAME, 'Could not determine embedded element with swf id: ' + this._swfId + '.'); + } + } + + /** + * Request to disconnect from server. + * + * @private + */ + + }, { + key: 'disconnect', + value: function disconnect() { + (0, _log.debug)(NAME, '[disconnect]'); + try { + var el = _browser2.default.getEmbedObject(this._swfId); + if (el) { + el.disconnect(); + } + } catch (e) { + // nada. + } + this.cleanUp(); + this._soResponder.disconnect(); + } + + /** + * Request to send a message to all subscribers. + * + * @param {String} methodName + * The method name associated with the message to be accepted by all subscribers. + * @param {Object} data + * The data object to send associated with the method name. + * @private + */ + + }, { + key: 'send', + value: function send(methodName, data) { + var el = _browser2.default.getEmbedObject(this._swfId); + if (el) { + el.send(methodName, data); + } + } + + /** + * Adds a response handler on SharedObject channel responder. + * @private + */ + + }, { + key: 'addSharedObjectResponseHandler', + value: function addSharedObjectResponseHandler(handler) { + this._soResponder.addResponseHandler(handler); + } + + /** + * Removes a response handler on SharedObject channel responder. + * @private + */ + + }, { + key: 'removeSharedObjectResponseHandler', + value: function removeSharedObjectResponseHandler(handler) { + this._soResponder.removeResponseHandler(handler); + } + + /** + * Sends message on SharedObject channel responder. + * + * @param {String} name + * The SharedObject name. + * @param {String} callName + * The method name to be invoked. + * @param {String} message + * The structured value to send. + * @private + */ + + }, { + key: 'sendToSharedObject', + value: function sendToSharedObject(name, callName, message) { + this._soResponder.sendToSharedObject(name, callName, message); + } + + /** + * Sends property update on SharedObject channel responder. + * + * @param {String} name + * The SharedObject name. + * @param {String} key + * The property name on the SharedObject. + * @param {String} value + * The structured property value. + * @private + */ + + }, { + key: 'sendPropertyToSharedObject', + value: function sendPropertyToSharedObject(name, key, value) { + this._soResponder.sendPropertyToSharedObject(name, key, value); + } + + /** + * Requests to get SharedObject instance from the SharedObject channel responder. + * @private + */ + + }, { + key: 'getRemoteSharedObject', + value: function getRemoteSharedObject(sharedObjectName) { + this._soResponder.getRemoteSharedObject(sharedObjectName); + } + + /** + * Request to connect to a shared object. + * + * @param {String} sharedObjectName + * The name of the SharedObject. + * @private + */ + + }, { + key: 'connectToSharedObject', + value: function connectToSharedObject(sharedObjectName) { + this._soResponder.connectToSharedObject(sharedObjectName); + } + + /** + * Request to close connection to a shared object. + * + * @param {String} sharedObjectName + * The name of the SharedObject. + * @private + */ + + }, { + key: 'closeSharedObject', + value: function closeSharedObject(sharedObjectName) { + this._soResponder.closeSharedObject(sharedObjectName); + } + + /** + * Deprecated. Request to update broadcast dimensions before a broadcast. + * + * @param {Object} quality + * Expects object with following structur: `{video: {width:Int, heightInt}} + * @private + */ + + }, { + key: 'setMediaQuality', + value: function setMediaQuality(quality) { + var el = _browser2.default.getEmbedObject(this._swfId); + if (el) { + if (quality.video && typeof quality.video !== 'boolean') { + var w = !isNaN(quality.video.width) ? (0, _util.toInt)(quality.video.width) : _isNan2.default; + var h = !isNaN(quality.video.height) ? (0, _util.toInt)(quality.video.height) : _isNan2.default; + el.updateResolution(w, h); + } + } + } + + /** + * Returns the type of implementation: `RTMP`. + * + * @return {String} + * @private + */ + + }, { + key: 'getType', + value: function getType() { + return this._publisherType; + } + }]); + return PublisherSourceHandler; +}(); + +exports.default = PublisherSourceHandler; + +/***/ }), +/* 121 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _promise = __webpack_require__(58); + +var _promise2 = _interopRequireDefault(_promise); + +var _extends2 = __webpack_require__(28); + +var _extends3 = _interopRequireDefault(_extends2); + +var _stringify = __webpack_require__(12); + +var _stringify2 = _interopRequireDefault(_stringify); + +var _getPrototypeOf = __webpack_require__(6); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(8); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(7); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _eventEmitter = __webpack_require__(23); + +var _eventEmitter2 = _interopRequireDefault(_eventEmitter); + +var _webrtc = __webpack_require__(40); + +var webrtc = _interopRequireWildcard(_webrtc); + +var _websocket = __webpack_require__(53); + +var websocket = _interopRequireWildcard(_websocket); + +var _socketHelperPub = __webpack_require__(114); + +var _socketHelperPub2 = _interopRequireDefault(_socketHelperPub); + +var _webrtcHelperPub = __webpack_require__(116); + +var _webrtcHelperPub2 = _interopRequireDefault(_webrtcHelperPub); + +var _publish = __webpack_require__(57); + +var _publish2 = _interopRequireDefault(_publish); + +var _event = __webpack_require__(15); + +var _publish3 = __webpack_require__(54); + +var _webrtc2 = __webpack_require__(55); + +var _promise3 = __webpack_require__(5); + +var _constraint = __webpack_require__(83); + +var _urlEndpoint = __webpack_require__(87); + +var _log = __webpack_require__(2); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var pubStartRegex = /(.*) starting/i; +var pubStopRegex = /(.*) stopping/i; +var NAME = 'RTCPublisher'; +var debug = function debug(message) { + (0, _log.debug)(NAME, message); +}; +var warn = function warn(message) { + (0, _log.warn)(NAME, message); +}; +var error = function error(message) { + (0, _log.error)(NAME, message); +}; + +// Default to secure settings. +var defaultOptions = { + protocol: 'wss', + port: 8083, + app: 'live', + streamMode: _publish3.PublishModeTypes.LIVE, + mediaElementId: 'red5pro-publisher', + iceServers: [{ urls: 'stun:stun2.l.google.com:19302' }], + iceTransport: _webrtc2.IceTransportTypes.UDP, + bandwidth: { + audio: 56, + video: 512 + }, + mediaConstraints: new _constraint.RTCMediaConstraint(), + onGetUserMedia: undefined + + /** + * Main entry for WebRTC-based Publisher. + * + * @extends EventEmitter + */ +}; +var RTCPublisher = function (_EventEmitter) { + (0, _inherits3.default)(RTCPublisher, _EventEmitter); + + function RTCPublisher() { + (0, _classCallCheck3.default)(this, RTCPublisher); + + var _this = (0, _possibleConstructorReturn3.default)(this, (RTCPublisher.__proto__ || (0, _getPrototypeOf2.default)(RTCPublisher)).call(this)); + + _this._options = undefined; + _this._view = undefined; + _this._peerHelper = undefined; + _this._socketHelper = undefined; + _this._mediaStream = undefined; + + _this._streamFuture = undefined; + _this._availableFuture = undefined; + _this._peerFuture = undefined; + _this._offerFuture = undefined; + _this._sendOfferFuture = undefined; + _this._trickleEndFuture = undefined; + _this._publishFuture = undefined; + _this._unpublishFuture = undefined; + return _this; + } + + (0, _createClass3.default)(RTCPublisher, [{ + key: '_getMediaStream', + value: function _getMediaStream() { + this._streamFuture = _promise3.Future.createIfNotExist(this._streamFuture); + return this._streamFuture.promise; + } + }, { + key: '_getTrickleEnd', + value: function _getTrickleEnd() { + return _promise3.Future.createIfNotExist(this._trickleEndFuture); + } + + /** + * Runs internal `getUserMedia` logic to determine broadcast constraints. + * + * @param {Object} options + * The initialization options provided in `init()`. + * + * @private + */ + + }, { + key: '_gum', + value: function _gum(options) { + var _this2 = this; + + if (options.onGetUserMedia !== undefined) { + debug('Requesting gUM from user-defined configuration:onGetUserMedia.'); + options.onGetUserMedia().then(function (media) { + _this2._streamFuture.resolve(media); + }).catch(function (err) { + error('Could not resolve MediaAsset from provided gUM. Error - ' + err); + _this2._streamFuture.reject(err); + }); + } else { + debug('Requesting gUM using mediaConstraints: ' + (0, _stringify2.default)(options.mediaConstraints, null, 2)); + this._peerHelper.getUserMedia(options.mediaConstraints).then(function (res) { + debug('Found valid constraints: ' + (0, _stringify2.default)(res.constraints, null, 2)); + _this2.trigger(new _event.PublisherEvent(_event.PublisherEventTypes.DIMENSION_CHANGE, _this2, res.constraints)); + _this2._streamFuture.resolve(res.media); + }).catch(function (rej) { + debug('Could not find valid constraint resolutions from: ' + (0, _stringify2.default)(rej.constraints, null, 2)); + error('Could not resolve MediaAsset from provided mediaConstraints. Error - ' + rej.error); + debug('Attempting to find resolutions from original provided constraints: ' + (0, _stringify2.default)(rej.constraints, null, 2)); + // allowing to try original constraint requested. + options.onGetUserMedia = function () { + return _this2._peerHelper.forceUserMedia(rej.constraints); + }; + _this2._gum(options); + }); + } + } + + /** + * Invoked upon receipt from `_gum` with MediaStream instance returned from browser. + * + * @param {MediaStream} mediaStream + * The `MediaStream` object. + * + * @private + */ + + }, { + key: '_onMediaStreamReceived', + value: function _onMediaStreamReceived(mediaStream) { + // if (this._socketHelper && !this._socketHelper.isTerminated) { + this._mediaStream = mediaStream; + this.trigger(new _event.PublisherEvent(_event.RTCPublisherEventTypes.MEDIA_STREAM_AVAILABLE, this, mediaStream)); + if (this._view) { + this._view.preview(this._mediaStream); + } + // } + } + + /** + * Still in use, but hold-over of previous 3.x SDK versions designed to pair views and publishers. In 4.0.0 it has been internalized. + * API deprecated. + * + * @private + */ + + }, { + key: '_setViewIfNotExist', + value: function _setViewIfNotExist(currentView) { + var mediaElementId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; + + if (typeof currentView === 'undefined' && mediaElementId !== undefined) { + var view = new _publish2.default(mediaElementId); + view.attachPublisher(this); + } + } + + /** + * Request availability based on unique `streamName`. + * The return from the WebSocket request will either invoke `onStreamAvailable` or `onStreamUnavailable`. + * + * @param {String} streamName + * The unique stream name to check if it is _unavailable_ - meaning free to publish against. + * @return {Promise} + * The promise will resolve/reject the `_availableFuture`. + * + * @private + */ + + }, { + key: '_requestAvailability', + value: function _requestAvailability(streamName) { + debug('[requestavailability]'); + this._availableFuture = undefined; + this._availableFuture = _promise3.Future.createIfNotExist(this._availableFuture); + this._socketHelper.post({ + isAvailable: streamName, + bundle: false + }); + return this._availableFuture.promise; + } + + /** + * Request to setup RTCPeerConnection instance for exchange of SDP locally and remotely. + * + * @param {Array} iceServers + * List of ICE servers + * @return {Promise} + * The promise will resolve/reject the `_peerFuture`. + * + * @private + */ + + }, { + key: '_createPeerConnection', + value: function _createPeerConnection(iceServers) { + debug('[createpeeer]'); + this._peerFuture = undefined; + this._peerFuture = _promise3.Future.createIfNotExist(this._peerFuture); + this._peerHelper.setUp(iceServers, this._peerFuture, this._options.rtcpMuxPolicy); + return this._peerFuture.promise; + } + + /** + * Request to generate offer on Peer Connection instance. + * + * @param {Object} bandwidth + * Optional bandwidth configuration object to munge SDP. + * @return {Promise} + * The promise will resolve/reject a success in creation of the offer through the Peer Connection. + * + * @private + */ + + }, { + key: '_createOffer', + value: function _createOffer() { + var bandwidth = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; + + debug('[createoffer]'); + this._offerFuture = undefined; + this._offerFuture = _promise3.Future.createIfNotExist(this._offerFuture); + this._peerHelper.createOffer(bandwidth, this._offerFuture); + return this._offerFuture.promise; + } + + /** + * Request to set a remote description on Peer Connection instance. + * + * @param {Object} sdp + * Object describing the Session Description. + * @return {Promise} + * The promise will resolve/reject in a success in setting the remote SDP on the Peer Connection. + * + * @private + */ + + }, { + key: '_setRemoteDescription', + value: function _setRemoteDescription(sdp) { + debug('[setremotedescription]'); + return this._peerHelper.setRemoteDescription(sdp); + } + + /** + * Request to send offer on WebSocket instance. + * + * @param {Object} sdp + * Object describing the Session Description. + * @param {string} streamName + * The unique stream name of the broadcast. + * @return {Promise} + * The promise will resolve/reject on the success of delivering an offer over the WebSocket. + * + * @private + */ + + }, { + key: '_sendOffer', + value: function _sendOffer(sdp, streamName, transport) { + debug('[sendoffer]'); + this._sendOfferFuture = undefined; + this._sendOfferFuture = _promise3.Future.createIfNotExist(this._sendOffFuture); + this._socketHelper.post({ + handleOffer: streamName, + transport: transport, + data: { + sdp: sdp + } + }); + return this._sendOfferFuture.promise; + } + + /** + * Request to send ICE candidate over the WebSocket. + * This can happen several times in the ICE negotiation process. + * + * @param {Object} candidate + * The Candidate to send. + * @param {string} streamName + * The associated unique stream name of the broadcast. + * + * @private + */ + + }, { + key: '_sendCandidate', + value: function _sendCandidate(candidate, streamName) { + debug('[sendcandidate]'); + this._socketHelper.post({ + handleCandidate: streamName, + data: { + candidate: candidate + } + }); + } + + /** + * Request on WebSocket to begin publishing. + * + * @param {string} streamName + * The unique stream name of the broadcast. + * @param {string} mode + * The broadcast mode: `live`, `record` or `append`. + * @return {Promise} + * The promise will resolve/reject in the request to being a broadcast. + * + * @private + */ + + }, { + key: '_requestPublish', + value: function _requestPublish(streamName, streamMode) { + debug('[requestpublish]'); + this._publishFuture = undefined; + this._publishFuture = _promise3.Future.createIfNotExist(this._publishFuture); + this._socketHelper.post({ + publish: streamName, + mode: streamMode + }); + return this._publishFuture.promise; + } + + /** + * Request to stop a current broadcast. + * + * @param {String} streamName + * The unique stream name being broadcast on. + * @return {Promise} + * The promise will resolve/reject on success of properly stopping a broadcast. + * + * @private + */ + + }, { + key: '_requestUnpublish', + value: function _requestUnpublish(streamName) { + this._unpublishFuture = undefined; + this._unpublishFuture = _promise3.Future.createIfNotExist(this._unpublishFuture); + // If we get a false response from trying to send a close POST, + // it means that the socket has already been closed by another impetus - + // most likley loss of network or server failure. + if (!this._socketHelper.post({ + unpublish: streamName + })) { + this._unpublishFuture.resolve(); + } + return this._unpublishFuture.promise; + } + + /** + * Request to initialize the WebRTC-based Publisher based on configuration. + * The returned `Promise` will either resolve with a reference to this instance or reject with an error `String` in failure. + * + * @param {Object} options + * The initialization configuration map. + * @return {Promise} + */ + + }, { + key: 'init', + value: function init(options) { + var deferred = new _promise3.DeferredPromise(); + if (!webrtc.isSupported() || !websocket.isSupported()) { + deferred.reject('Cannot create WebRTC playback instance. Your environment does not support WebRTC and/or WebSockets.'); + } else { + this._options = (0, _extends3.default)({}, defaultOptions, options); + this._peerHelper = new _webrtcHelperPub2.default(this); + this._socketHelper = new _socketHelperPub2.default(this); + this._getMediaStream().then(this._onMediaStreamReceived.bind(this)); + this._gum(this._options); + // auto preview. + this._setViewIfNotExist(this._view, this._options.mediaElementId); + deferred.resolve(this); + } + return deferred.promise; + } + + /** + * Still in use for assigning document element view management to this instance. + * API deprecated in 4.0.0. + * + * @private + */ + + }, { + key: 'setView', + value: function setView(view) { + this._view = view; + if (this._mediaStream && this._view) { + this._view.preview(this._mediaStream); + } + return this; + } + + /** + * Still in use for assigning document element view management to this instance. + * API deprecated in 4.0.0. + * + * @private + */ + + }, { + key: 'preview', + value: function preview() { + var _this3 = this; + + debug('[preview]'); + var p = new _promise2.default(function (res) { + res(_this3); + }); + this._setViewIfNotExist(this._view, this._options.mediaElementId); + return p; + } + + /** + * Request to begin a broadcast session after initilization has occured. + * + * @param {String} streamName + * Optional stream name to broadcast on, otherwise defaulting to the `streamName` provided in `init()` configuration. + * @param {Promise} promise + * Optional `Promise` object to resolve/reject on based on sequence of events in establishing a broadcast, otherwise defaulting to `Promise` created internally and returned. + * @return {Promise} + * The returned `Promise` will resolve or reject on successful start of a broadcast.
+ * There are several processes that occur in order to establish a WebRTC broadcast that involve - but are not limited to - ICE communication and assigning of local and remote SDPs on peer connections. + */ + + }, { + key: 'publish', + value: function publish() { + var _this4 = this; + + var streamName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; + var promise = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + + debug('[publish]'); + this._options.streamName = streamName || this._options.streamName; + var p = promise || new _promise3.DeferredPromise(); + var socketPromise = new _promise3.DeferredPromise(); + var socketurl = (0, _urlEndpoint.rtcSocketEndpointFromOptions)(this._options, { + id: this._options.streamName + }); + this._trickleEndFuture = this._getTrickleEnd(); + this._socketHelper.clearRetry(); + this._socketHelper.setUp(socketurl, socketPromise); + // 0. Establish socket connection. + socketPromise.promise + // 1. Wait for stream attach + .then(function () { + _this4.trigger(new _event.PublisherEvent(_event.PublisherEventTypes.CONNECT_SUCCESS, _this4)); + return _this4._getMediaStream(); + }) + // 2. Request available stream to publish on + .then(function () { + return _this4._requestAvailability(_this4._options.streamName, _this4._options.streamType); + }) + // 3. Create Peer Connection + .then(function () { + return _this4._createPeerConnection(_this4._options.iceServers); + }) + // 4. Make Offer on Peer Connection + .then(function (connection) { + connection.addStream(_this4._mediaStream); + _this4.trigger(new _event.PublisherEvent(_event.RTCPublisherEventTypes.PEER_CONNECTION_AVAILABLE, _this4, connection)); + return _this4._createOffer(_this4._options.bandwidth); + }) + // 5. Send Offer + .then(function (sessionDescription) { + _this4.trigger(new _event.PublisherEvent(_event.RTCPublisherEventTypes.OFFER_START, _this4, sessionDescription)); + return _this4._sendOffer(sessionDescription, _this4._options.streamName, _this4._options.iceTransport); + }) + // 6. Set the session description remotely + .then(function (sdp) { + return _this4._setRemoteDescription(sdp.sdp); + }) + // 7. Wait until ice trickle end + .then(function (sdp) { + _this4.trigger(new _event.PublisherEvent(_event.RTCPublisherEventTypes.OFFER_END, _this4, sdp)); + return _this4._getTrickleEnd().promise; + }) + // 8. Request to publish stream + .then(function () { + _this4.trigger(new _event.PublisherEvent(_event.RTCPublisherEventTypes.ICE_TRICKLE_COMPLETE, _this4)); + return _this4._requestPublish(_this4._options.streamName, _this4._options.streamMode); + }) + // 9. Results in socket message of publish (see :onPublishStatus) + .then(function () { + p.resolve(_this4); + _this4.trigger(new _event.PublisherEvent(_event.PublisherEventTypes.PUBLISH_START, _this4)); + }).catch(function (error) { + p.reject(error); + _this4.trigger(new _event.PublisherEvent(_event.PublisherEventTypes.CONNECT_FAILURE, _this4, error)); + }); + return p.hasOwnProperty('promise') ? p.promise : p; + } + + /** + * Request to stop a broadcast. + * The returned `Promise` will either resolve or reject on successful stop of broadcast. + * + * @return {Promise} + */ + + }, { + key: 'unpublish', + value: function unpublish() { + var _this5 = this; + + debug('[unpublish]'); + var clearHelpers = function clearHelpers() { + if (_this5._socketHelper) { + _this5._socketHelper.tearDown(); + } + if (_this5._peerHelper) { + _this5._peerHelper.tearDown(); + } + }; + this._availableFuture = undefined; + this._peerFuture = undefined; + this._offerFuture = undefined; + this._sendOfferFuture = undefined; + this._trickleEndFuture = undefined; + this._publishFuture = undefined; + var f = this._requestUnpublish(this._options.streamName); + f.then(function () { + _this5._unpublishFuture = undefined; + // this._mediaStream = undefined + clearHelpers(); + _this5.trigger(new _event.PublisherEvent(_event.PublisherEventTypes.UNPUBLISH_SUCCESS, _this5)); + }); + return f; + } + + /** + * Deprecated. Use `muteAudio`. + * + * @private + */ + + }, { + key: 'mute', + value: function mute() { + // backward comatibility - to be deprecated. + this.muteAudio(); + } + + /** + * Deprecated. Use `unmuteAudio`. + * + * @private + */ + + }, { + key: 'unmute', + value: function unmute() { + // backward comatibility - to be deprecated. + this.unmuteAudio(); + } + + /** + * Request to mute the audio of the broadcast. + * Can only be called once the broadcast has begun. + */ + + }, { + key: 'muteAudio', + value: function muteAudio() { + this._socketHelper.post({ + mute: { + muteAudio: true + } + }); + } + + /** + * Request to unmute the audio of a broadcast that has been previously muted. + */ + + }, { + key: 'unmuteAudio', + value: function unmuteAudio() { + this._socketHelper.post({ + mute: { + muteAudio: false + } + }); + } + + /** Request to mute (not send) the video of the broadcast. + * Can only be called once the broadcast has begun. + */ + + }, { + key: 'muteVideo', + value: function muteVideo() { + this._socketHelper.post({ + mute: { + muteVideo: true + } + }); + } + + /** + * Request to unmute (resume sending) the video of a previously video-muted broadcast. + */ + + }, { + key: 'unmuteVideo', + value: function unmuteVideo() { + this._socketHelper.post({ + mute: { + muteVideo: false + } + }); + } + + /** + * Request to send a message to all subscribers. + * + * @param {String} methodName + * The method name associated with the message to be accepted by all subscribers. + * @param {Object} data + * The data object to send associated with the method name. + */ + + }, { + key: 'send', + value: function send(methodName, data) { + this._socketHelper.post({ + send: { + method: methodName, + data: typeof data === 'string' ? JSON.parse(data) : data + } + }); + } + + /** + * Request to invoke a method on the Application Adapter related to the `app` config setting. + * + * @param {String} methodName + * The name of the method to invoke on thw Application Adapter + * @param {Array} args + * The ordered list of arguments to invoke on the method. Do not provide anything if the method takes no arguments. + * @return {Promise} + */ + + }, { + key: 'callServer', + value: function callServer(methodName, args) { + return this._socketHelper.postAsync({ + callAdapter: { + method: methodName, + arguments: args + } + }); + } + + /** + * Event handler for availability of stream on request over the socket. + * + * @private + */ + + }, { + key: 'onStreamAvailable', + value: function onStreamAvailable(receipt) { + debug('[onstreamavailable]: ' + (0, _stringify2.default)(receipt, null, 2)); + this._availableFuture = _promise3.Future.createIfNotExist(this._availableFuture); + this._availableFuture.reject('Stream with name ' + this._options.streamName + ' already has a broadcast session.'); + this.trigger(new _event.PublisherEvent(_event.PublisherEventTypes.PUBLISH_INVALID_NAME, this)); + } + + /** + * Event handler for unavailability of stream on request over the socket. + * + * @private + */ + + }, { + key: 'onStreamUnavailable', + value: function onStreamUnavailable(receipt) { + // Being unavailable, is a good thing for allowing to publish using `options.streamName` + debug('Stream ' + this._options.streamName + ' does not exist.'); + debug('[onstreamunavailable]: ' + (0, _stringify2.default)(receipt, null, 2)); + this._availableFuture = _promise3.Future.createIfNotExist(this._availableFuture); + this._availableFuture.resolve(true); + } + + /** + * Event handler for WebSocket errors. + * + * @private + */ + + }, { + key: 'onSocketMessageError', + value: function onSocketMessageError(message) { + var detail = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + + error('Error in stream playback: ' + message + '.\n[Optional detail]: ' + detail); + if (this._publishFuture) { + this.trigger(new _event.PublisherEvent(_event.PublisherEventTypes.PUBLISH_FAIL, this)); + this._publishFuture.reject(message); + } + } + + /** + * Event handler for close of WebSocket. + * + * @private + */ + + }, { + key: 'onSocketClose', + value: function onSocketClose(closeEvent) { + debug(NAME, '[onsocketclose]'); + if (this._peerHelper) { + this._peerHelper.tearDown(); + } + this.trigger(new _event.PublisherEvent(_event.PublisherEventTypes.CONNECTION_CLOSED, this, closeEvent)); + } + + /** + * Event handler for close of Peer Connection. + * + * @private + */ + + }, { + key: 'onPeerConnectionClose', + value: function onPeerConnectionClose(event) { + debug(NAME, '[onpeerconnectionclose]'); + if (this._socketHelper) { + this._socketHelper.tearDown(); + } + this.onSocketClose(event); + } + + /** + * Event handler for success of SDP offer over WebSocket. + * + * @private + */ + + }, { + key: 'onSDPSuccess', + value: function onSDPSuccess(receipt) { + var info = receipt ? ': ' + (0, _stringify2.default)(receipt, null, 2) : ''; + debug('[onsdpsuccess]' + info); + } + + /** + * Event handler for error in SDP offer over WebSocket. + * + * @private + */ + + }, { + key: 'onSDPError', + value: function onSDPError(receipt) { + this.trigger(new _event.PublisherEvent(_event.PublisherEventTypes.PUBLISH_FAIL, this)); + var error = receipt ? ': ' + (0, _stringify2.default)(receipt, null, 2) : ''; + error('[onsdperror]' + error); + } + + /** + * Event handler for success in SDP answer over WebSocket. + * + * @private + */ + + }, { + key: 'onSDPAnswer', + value: function onSDPAnswer(sdp) { + debug('[sdpanswer]:: ' + (0, _stringify2.default)(sdp, null, 2)); + this._sendOfferFuture = _promise3.Future.createIfNotExist(this._sendOfferFuture); + this._sendOfferFuture.resolve(sdp); + } + + /** + * Event handler for request to add ICE candidate on Peer Connection instance. + * + * @private + */ + + }, { + key: 'onAddIceCandidate', + value: function onAddIceCandidate(candidate) { + debug('[addicecandidate]'); + this._peerHelper.addIceCandidate(candidate).then(function () { + debug('[addicecandidate:success]'); + }).catch(function (err) { + warn('[addicecandidate:error] - ' + err); + }); + } + + /** + * Event handler for receipt and request to send ICE candidate. + * + * @private + */ + + }, { + key: 'onIceCandidate', + value: function onIceCandidate(candidate) { + debug('[icecandidatetrickle]'); + this._sendCandidate(candidate, this._options.streamName); + } + + /** + * Event handler for end of ICE trickle negotiation. + * + * @private + */ + + }, { + key: 'onIceCandidateTrickleEnd', + value: function onIceCandidateTrickleEnd() { + debug('[icecandidatetrickle:end]'); + } + + /** + * Event handler for completion of peer ice candidate gathering. + * + * @private + */ + + }, { + key: 'onPeerGatheringComplete', + value: function onPeerGatheringComplete() { + debug('[icecandidategathering:end]'); + if (this._socketHelper) { + this._socketHelper.postEndOfCandidates(this._options.streamName); + } + } + + /** + * Event handler for end of ICE candidate notification over WebSocket. + * + * @private + */ + + }, { + key: 'onSocketIceCandidateEnd', + value: function onSocketIceCandidateEnd() { + debug('[socketicecandidate:end]'); + this._getTrickleEnd().resolve(); + // this._trickleEndFuture = undefined + } + + /** + * Publisher status event handler for start and stop of this Publisher instance. + * + * @private + */ + + }, { + key: 'onPublisherStatus', + value: function onPublisherStatus(status) { + debug('[publisherstatus] - ' + (0, _stringify2.default)(status, null, 2)); + var stopResult = pubStopRegex.exec(status.message); + var startResult = pubStartRegex.exec(status.message); + if (stopResult && stopResult[1] === this._options.streamName) { + this._unpublishFuture.resolve(); + } else if (startResult && startResult[1] === this._options.streamName) { + this._publishFuture.resolve(); + } else { + warn('Publisher status received, but could not handle.'); + } + } + + /** + * Helper method to overlay options over current configuration. + * + * @private + */ + + }, { + key: 'overlayOptions', + value: function overlayOptions(newOptions) { + this._options = (0, _extends3.default)(this._options, newOptions); + } + + /** + * Returns the current WebSocket connection helper if established. + * Used in SharedObject communication. + * + * @return {PublisherSocketHelper} + * + * @private + */ + + }, { + key: 'getConnection', + value: function getConnection() { + return this._socketHelper; + } + + /** + * Returns the current RTCPeerConnection helper if established. + * + * @return {RTCPeerConnection} + */ + + }, { + key: 'getPeerConnection', + value: function getPeerConnection() { + return this._peerHelper ? this._peerHelper.connection : undefined; + } + + /** + * Returns the `MediaStream` instance if generated through `getUserMedia` and exists for broadcast. + * + * @return {MediaStream} + */ + + }, { + key: 'getMediaStream', + value: function getMediaStream() { + return this._mediaStream; + } + + /** + * Returns the initialization configuration used in `init()`. + * + * @return {Object} + */ + + }, { + key: 'getOptions', + value: function getOptions() { + return this._options; + } + + /** + * Returns the type of implementation: `RTC`. + * + * @return {String} + */ + + }, { + key: 'getType', + value: function getType() { + return _publish3.PublishTypes.RTC.toUpperCase(); + } + }]); + return RTCPublisher; +}(_eventEmitter2.default); + +exports.default = RTCPublisher; + +/***/ }), +/* 122 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _stringify = __webpack_require__(12); + +var _stringify2 = _interopRequireDefault(_stringify); + +var _extends2 = __webpack_require__(28); + +var _extends3 = _interopRequireDefault(_extends2); + +var _getPrototypeOf = __webpack_require__(6); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(8); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(7); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _eventEmitter = __webpack_require__(23); + +var _eventEmitter2 = _interopRequireDefault(_eventEmitter); + +var _browser = __webpack_require__(4); + +var _browser2 = _interopRequireDefault(_browser); + +var _pubSourceHandler = __webpack_require__(120); + +var _pubSourceHandler2 = _interopRequireDefault(_pubSourceHandler); + +var _publish = __webpack_require__(57); + +var _publish2 = _interopRequireDefault(_publish); + +var _event = __webpack_require__(15); + +var _promise = __webpack_require__(5); + +var _publish3 = __webpack_require__(54); + +var _constraint = __webpack_require__(83); + +var _log = __webpack_require__(2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NAME = 'RTMPPublisher'; +var defaultOptions = { + protocol: 'rtmp', + port: 1935, + streamMode: 'live', + mediaElementId: 'red5pro-publisher', + embedWidth: '100%', // DOM display style + embedHeight: '100%', // DOM display style + minFlashVersion: '10.0.0', + swf: 'lib/red5pro/red5pro-publisher.swf', + swfobjectURL: 'lib/swfobject/swfobject.js', + productInstallURL: 'lib/swfobject/playerProductInstall.swf', + mediaConstraints: new _constraint.RTMPMediaConstraint() + + /** + * Main entry for Flash-based Publisher. + * + * @extends EventEmitter + */ +}; +var RTMPPublisher = function (_EventEmitter) { + (0, _inherits3.default)(RTMPPublisher, _EventEmitter); + + function RTMPPublisher() { + (0, _classCallCheck3.default)(this, RTMPPublisher); + + var _this = (0, _possibleConstructorReturn3.default)(this, (RTMPPublisher.__proto__ || (0, _getPrototypeOf2.default)(RTMPPublisher)).call(this)); + + _this._options = undefined; + _this._view = undefined; + _this._sourceHandler = undefined; + _this._elementId = undefined; + _this._connectFuture = undefined; + return _this; + } + + /** + * Still in use for assigning document element view management to this instance. + * + * @private + */ + + + (0, _createClass3.default)(RTMPPublisher, [{ + key: '_setViewIfNotExist', + value: function _setViewIfNotExist(currentView) { + var mediaElementId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; + + if (typeof currentView === 'undefined' && mediaElementId !== undefined) { + var view = new _publish2.default(mediaElementId); + view.attachPublisher(this); + } + } + + /** + * Still in use for assigning document element view management to this instance. + * API deprecated in 4.0.0. + * + * @private + */ + + }, { + key: 'setView', + value: function setView(view, elementId) { + var _this2 = this; + + this._view = view; + this._elementId = elementId; + if (this._sourceHandler !== undefined) { + this._sourceHandler.disconnect(); + this._sourceHandler = undefined; + } + if (this._view) { + this._sourceHandler = new _pubSourceHandler2.default(this._view.view, this.getType()); + } + if (this._options && this._sourceHandler) { + this._sourceHandler.addSource(this._elementId, this._options).catch(function (err) { + (0, _log.error)(NAME, 'Could not establish proper RTMP publisher: ' + err); + _this2.trigger(new _event.PublisherEvent(_event.RTMPPublisherEventTypes.EMBED_FAILURE, _this2)); + }); + } + return this; + } + + /** + * Define a window global callback used by Flash publisher to recognize embed complete. + * + * @private + */ + + }, { + key: '_setUpConnectCallback', + value: function _setUpConnectCallback(promise) { + var _this3 = this; + + window.setActiveId = function (successId) { + // successId === _options.streamName + (0, _log.debug)(NAME, 'Embed and connect() complete for publisher swf. successId(' + successId + ').'); + promise.resolve(_this3); + _this3.trigger(new _event.PublisherEvent(_event.RTMPPublisherEventTypes.EMBED_SUCCESS, _this3)); + _this3._tearDownConnectCallback(); + }; + // TODO: Setup timeout to reject? + } + + /** + * Tear down global callback used in Flash publisher recognize of embed. + * + * @private + */ + + }, { + key: '_tearDownConnectCallback', + value: function _tearDownConnectCallback() { + window.setActiveId = undefined; + } + + /** + * Define global function handlers for ExternalInterface to invoke for API communication. + * + * @private + */ + + }, { + key: '_establishExtIntHandlers', + value: function _establishExtIntHandlers() { + var _this4 = this; + + var id = this._options.streamName; + var invokeFn = function invokeFn(label) { + return ['publisher', label, id.split('-').join('_')].join('_'); + }; + window[invokeFn('r5proConnectClosed')] = function () { + _this4.trigger(new _event.PublisherEvent(_event.PublisherEventTypes.CONNECTION_CLOSED, _this4)); + }; + window[invokeFn('r5proConnectSuccess')] = function () { + return _this4.trigger(new _event.PublisherEvent(_event.PublisherEventTypes.CONNECT_SUCCESS, _this4)); + }; + window[invokeFn('r5proUnpublishSuccess')] = function () { + return _this4.trigger(new _event.PublisherEvent(_event.PublisherEventTypes.UNPUBLISH_SUCCESS, _this4)); + }; + window[invokeFn('r5proPublishStart')] = function () { + _this4._connectFuture.resolve(_this4); + _this4.trigger(new _event.PublisherEvent(_event.PublisherEventTypes.PUBLISH_START, _this4)); + }; + window[invokeFn('r5proPublishMetadata')] = function (metadata) { + return _this4.trigger(new _event.PublisherEvent(_event.PublisherEventTypes.PUBLISH_METADATA, _this4, metadata)); + }; + window[invokeFn('r5proConnectFailure')] = function () { + _this4._connectFuture.reject(_event.PublisherEventTypes.CONNECT_FAILURE); + _this4.trigger(new _event.PublisherEvent(_event.PublisherEventTypes.CONNECT_FAILURE, _this4)); + }; + window[invokeFn('r5proPublishFail')] = function () { + _this4._connectFuture.reject(_event.PublisherEventTypes.PUBLISH_FAIL); + _this4.trigger(new _event.PublisherEvent(_event.PublisherEventTypes.PUBLISH_FAIL, _this4)); + }; + window[invokeFn('r5proPublishInvalidName')] = function () { + _this4._connectFuture.reject(_event.PublisherEventTypes.PUBLISH_INVALID_NAME); + _this4.trigger(new _event.PublisherEvent(_event.PublisherEventTypes.PUBLISH_INVALID_NAME, _this4)); + }; + } + + /** + * Request to initialize the Flash-based Publisher based on configuration. + * The returned `Promise` will either resolve with a reference to this instance or reject with an error `String` in failure. + * + * @param {Object} options + * The initialization configuration map. + * @return {Promise} + */ + + }, { + key: 'init', + value: function init(options) { + var self = this; + var deferred = new _promise.DeferredPromise(); + var version = options.minFlashVersion || defaultOptions.minFlashVersion; + if (!_browser2.default.supportsFlashVersion(version)) { + deferred.reject('Could not resolve RTMPPublisher instance. Requires minimum Flash Player install of ' + version); + } else { + this._options = (0, _extends3.default)({}, defaultOptions, options); + try { + _browser2.default.injectScript(this._options.swfobjectURL).then(function () { + (0, _log.debug)(NAME, 'SWFObject embedded.'); + if (self._sourceHandler) { + (0, _log.debug)(NAME, 'Publish handler established.'); + return self._sourceHandler.addSource(self._elementId, self._options); + } else { + (0, _log.debug)(NAME, 'Publish handler not established.'); + return true; + } + }).then(function () { + self._setViewIfNotExist(self._view, self._options.mediaElementId); + deferred.resolve(self); + }).catch(function (err) { + (0, _log.error)(NAME, 'Could not embed Flash-based RTMP Publisher. Reason: ' + err); + if (self._sourceHandler) { + self._sourceHandler.disconnect(); + } + deferred.reject(err); + self.trigger(new _event.PublisherEvent(_event.RTMPPublisherEventTypes.EMBED_FAILURE, self)); + }); + } catch (e) { + deferred.reject('Could not inject Flash-based Publisher into the page. Reason: ' + e.message); + self.trigger(new _event.PublisherEvent(_event.RTMPPublisherEventTypes.EMBED_FAILURE, self)); + } + } + return deferred.promise; + } + + /** + * Request to being a broadcast session after initilization has occured. + * + * @param {String} streamName + * Optional stream name to broadcast on, otherwise defaulting to the `streamName` provided in `init()` configuration. + * @param {Promise} promise + * Optional `Promise` object to resolve/reject on based on sequence of events in establishing a broadcast, otherwise defaulting to `Promise` created internally and returned. + * @return {Promise} + * The returned `Promise` will resolve or reject on successful start of a broadcast.
+ * There are several processes that occur in order to establish a Flash-based broadcast that involve - but are not limited to - proper embed of Flash object on page with flashvars used in establishing RTMP-based NetConnection. + */ + + }, { + key: 'publish', + value: function publish() { + var _this5 = this; + + var streamName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + var promise = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; + // eslint-disable-line no-unused-vars + var dfd = promise || new _promise.DeferredPromise(); + this._setUpConnectCallback(dfd); + this._options.streamName = streamName || this._options.streamName; + var publishOptions = this._options; + try { + var srcHandler = this._sourceHandler; + this._sourceHandler.getEmbedOperation().then(function () { + (0, _log.debug)(NAME, '[handler:embed:complete]'); + var el = _browser2.default.getEmbedObject(_this5._elementId); + if (el) { + _this5._establishExtIntHandlers(); + } + var count = 0; + var limit = 100; + var tryConnect = function tryConnect() { + var timeout = void 0; + timeout = setTimeout(function () { + try { + clearTimeout(timeout); + srcHandler.connect((0, _stringify2.default)(publishOptions)); + } catch (e) { + if (count++ > limit) { + throw e; + } else { + tryConnect(); + } + } + }, 300); + }; + tryConnect(); + }).catch(function (err) { + dfd.reject(err); + _this5.trigger(new _event.PublisherEvent(_event.PublisherEventTypes.CONNECT_FAILURE, _this5)); + }); + } catch (e) { + (0, _log.error)(NAME, '[handler:embed:error]'); + dfd.reject('Could not initiate connection sequence. Reason: ' + e.message); + this.trigger(new _event.PublisherEvent(_event.PublisherEventTypes.CONNECT_FAILURE, this)); + this._tearDownConnectCallback(); + } + this._connectFuture = dfd; + return dfd.promise; + } + + /** + * Request to stop a broadcast. + * The returned `Promise` will either resolve or reject on successful stop of broadcast. + * + * @return {Promise} + */ + + }, { + key: 'unpublish', + value: function unpublish() { + var deferred = new _promise.DeferredPromise(); + try { + _browser2.default.getEmbedObject(this._elementId).unpublish(); + deferred.resolve(); + } catch (e) { + (0, _log.error)(NAME, 'Could not initiate publish sequence. Reason: ' + e.message); + deferred.reject(e.message); + } + this._connectFuture = undefined; + return deferred.promise; + } + + /** + * Request to send a message to all subscribers. + * + * @param {String} methodName + * The method name associated with the message to be accepted by all subscribers. + * @param {Object} data + * The data object to send associated with the method name. + */ + + }, { + key: 'send', + value: function send(methodName, data) { + this._sourceHandler.send(methodName, typeof data === 'string' ? data : (0, _stringify2.default)(data)); + } + + /** + * Deprecated. Request to update broadcast dimensions before a broadcast. + * + * @param {Object} quality + * Expects object with following structur: `{video: {width:Int, heightInt}} + * + * @private + */ + + }, { + key: 'setMediaQuality', + value: function setMediaQuality(quality) { + if (this._sourceHandler) { + this._sourceHandler.setMediaQuality(quality); + } + } + + /** + * Helper method to overlay options over current configuration. + * + * @param {Object} newOptions + * The options to overlay. + * + * @private + */ + + }, { + key: 'overlayOptions', + value: function overlayOptions(newOptions) { + this._options = (0, _extends3.default)(this._options, newOptions); + } + + /** + * Returns the current Flash/RTMP connection helper if established. + * Used in SharedObject communication. + * + * @return {PublisherSourceHandler} + * + * @private + */ + + }, { + key: 'getConnection', + value: function getConnection() { + return this._sourceHandler; + } + + /** + * Returns the initialization configuration used in `init()`. + * + * @return {Object} + */ + + }, { + key: 'getOptions', + value: function getOptions() { + return this._options; + } + + /** + * Returns the type of implementation: `RTMP`. + * + * @return {String} + */ + + }, { + key: 'getType', + value: function getType() { + return _publish3.PublishTypes.RTMP.toUpperCase(); + } + }]); + return RTMPPublisher; +}(_eventEmitter2.default); + +exports.default = RTMPPublisher; + +/***/ }), +/* 123 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Red5ProSharedObject = undefined; + +var _stringify = __webpack_require__(12); + +var _stringify2 = _interopRequireDefault(_stringify); + +var _keys = __webpack_require__(91); + +var _keys2 = _interopRequireDefault(_keys); + +var _getPrototypeOf = __webpack_require__(6); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _possibleConstructorReturn2 = __webpack_require__(8); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(7); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _eventEmitter = __webpack_require__(23); + +var _eventEmitter2 = _interopRequireDefault(_eventEmitter); + +var _browser = __webpack_require__(4); + +var _browser2 = _interopRequireDefault(_browser); + +var _index = __webpack_require__(15); + +var _sharedobjectEvent = __webpack_require__(56); + +var _log = __webpack_require__(2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NAME = 'Red5ProSharedObject'; +var SO_SUBTYPE_PROPERTY = 4; +var SO_SUBTYPE_METHOD = 6; + +var debug = function debug(soName, message) { + (0, _log.debug)([NAME, soName].join(':'), message); +}; +var warn = function warn(soName, message) { + (0, _log.warn)([NAME, soName].join(':'), message); +}; +var error = function error(soName, message) { + (0, _log.error)([NAME, soName].join(':'), message); +}; + +var decodeMessageIfJSONString = function decodeMessageIfJSONString(message) { + return typeof message === 'string' ? JSON.parse(message) : message; +}; + +/** + * Defines the structure of a Property Data notification object. + * + * @private + */ + +var PropertyData = function () { + function PropertyData(key, value) { + (0, _classCallCheck3.default)(this, PropertyData); + + this.key = key; + this.value = value; + } + + (0, _createClass3.default)(PropertyData, [{ + key: 'toObject', + value: function toObject() { + var obj = {}; + obj[this.key] = this.value; + return obj; + } + }]); + return PropertyData; +}(); + +/** + * Defines the structure of a Method Data notification object. + * + * @private + */ + + +var MethodData = function () { + function MethodData(methodName, message) { + (0, _classCallCheck3.default)(this, MethodData); + + this.methodName = methodName; + var messageList = void 0; + if (Object.prototype.toString.call(message) === '[object Array]') { + var i = void 0; + var msg = void 0; + var length = message.length; + messageList = []; + for (i = 0; i < length; i++) { + msg = decodeMessageIfJSONString(message[i]); + if (Object.prototype.toString.call(message) === '[object Array]') { + messageList = messageList.concat(msg); + } else { + messageList.push(msg); + } + } + } else { + messageList = [decodeMessageIfJSONString(message)]; + } + this.message = messageList.length === 1 ? messageList[0] : messageList; + } + + (0, _createClass3.default)(MethodData, [{ + key: 'toObject', + value: function toObject() { + return { + methodName: this.methodName, + message: this.message + }; + } + }]); + return MethodData; +}(); + +/** + * Main entry for Shared Object associated with Publishers and Subscribers. + * + * @extends EventEmitter + */ + + +var Red5ProSharedObject = function (_EventEmitter) { + (0, _inherits3.default)(Red5ProSharedObject, _EventEmitter); + + /** + * The API on this object is limited as it communicates along with message channel connection of a previously established Publisher or Subscriber, of which you provide in the constuctor. + * + * Event handlers should be assigned to new `Red5ProSharedObject` instances in order to handle notifications over the communication channel. + * + * @param {String} name + * The name of the Shared Object to connect to. + * @param {Object} connection + * The connection delegate to send and receive Shared Object notifications on. + * This will either be a previously established Publisher or Subscriber instance. + */ + function Red5ProSharedObject(name, connection) { + (0, _classCallCheck3.default)(this, Red5ProSharedObject); + + var _this = (0, _possibleConstructorReturn3.default)(this, (Red5ProSharedObject.__proto__ || (0, _getPrototypeOf2.default)(Red5ProSharedObject)).call(this)); + + _this._name = name; + _this._socket = connection.getConnection(); + _this._socket.addSharedObjectResponseHandler(_this); + _this._onclose = _this.close.bind(_this); + try { + debug(_this._name, '[sharedobject:connect:attempt]'); + // Immediately invoke request on shared object through the `getConnection()` + // instance of a Publisher or Subscriber (whomever invoked this constructor). + _this._socket.getRemoteSharedObject(_this._name); + _browser2.default.addCloseHandler(_this._onclose, 0); + } catch (e) { + error(_this._name, '[sharedobject:connect:error]: ' + e.message); + } + return _this; + } + + /** + * Attempt to parse message into a Object. + * + * @param {Object} message + * Either a JSON string or object. + * + * @private + */ + + + (0, _createClass3.default)(Red5ProSharedObject, [{ + key: '_getJsonFromSocketMessage', + value: function _getJsonFromSocketMessage(message) { + try { + return typeof message.data === 'string' ? JSON.parse(message.data) : message.data; + } catch (e) { + warn(this._name, 'Could not parse message as JSON. Message= ' + message.data + '. Error= ' + e.message); + } + return null; + } + + /** + * Dispatch of PROPERTY_UPDATE with information. + * + * @param {Object} valueObject + * Optional value object to send in notification. + * + * @private + */ + + }, { + key: '_notifyOfPropertyValues', + value: function _notifyOfPropertyValues(valueObject) { + if ((0, _keys2.default)(valueObject).length === 0) { + this.trigger(new _index.SharedObjectEvent(_sharedobjectEvent.SharedObjectEventTypes.PROPERTY_UPDATE, this._name, {})); + } else { + var key = void 0; + for (key in valueObject) { + this.trigger(new _index.SharedObjectEvent(_sharedobjectEvent.SharedObjectEventTypes.PROPERTY_UPDATE, this._name, new PropertyData(key, valueObject[key]).toObject())); + } + } + } + + /** + * Dispatch of PROPERTY_UPDATE or METHOD_UPDATE based on event(s). + * + * @param {Array} events + * A list of events to iterate through and dispatch notifications from. + * + * @private + */ + + }, { + key: '_notifyOfEvents', + value: function _notifyOfEvents(events) { + var i = void 0, + event = void 0; + var handled = false; + var length = events.length; + for (i = 0; i < length; i++) { + event = events[i]; + switch (event.subtype) { + case SO_SUBTYPE_PROPERTY: + this.trigger(new _index.SharedObjectEvent(_sharedobjectEvent.SharedObjectEventTypes.PROPERTY_UPDATE, this._name, new PropertyData(event.attribute, event.value).toObject())); + handled = true; + break; + case SO_SUBTYPE_METHOD: + this.trigger(new _index.SharedObjectEvent(_sharedobjectEvent.SharedObjectEventTypes.METHOD_UPDATE, this._name, new MethodData(event.method, event.value).toObject())); + handled = true; + break; + } + } + return handled; + } + + /** + * Invoked by connection channel to handle message and dispatch appropriate notifications. + * + * @private + */ + + }, { + key: 'respond', + value: function respond(message) { + if (message.data) { + var json = this._getJsonFromSocketMessage(message); + if (json === null) { + warn(this._name, 'Determined websocket response not in correct format. Aborting message handle.'); + return true; + } + if (json.data !== undefined) { + if (json.data.name === this._name) { + debug(this._name, '[sharedobject-response]: ' + (0, _stringify2.default)(json, null, 2)); + if (json.data.status === 'SharedObject.Status.GetRemote' && json.data.message === 'Success') { + this._socket.connectToSharedObject(this._name); + return true; + } else if (json.data.status === 'SharedObject.Status.GetRemote' && json.data.message === 'Fail') { + this.trigger(new _index.SharedObjectEvent(_sharedobjectEvent.SharedObjectEventTypes.CONNECT_FAILURE, this._name)); + return true; + } else if (json.data.status === 'SharedObject.Status.Connect' && json.data.message === 'Success') { + this.trigger(new _index.SharedObjectEvent(_sharedobjectEvent.SharedObjectEventTypes.CONNECT_SUCCESS, this._name)); + return true; + } else if (json.data.status === 'SharedObject.Status.Connect' && json.data.message === 'Fail') { + this.trigger(new _index.SharedObjectEvent(_sharedobjectEvent.SharedObjectEventTypes.CONNECT_FAILURE, this._name)); + return true; + } else if (json.data.type === 'sharedobject') { + if (json.data.hasOwnProperty('events')) { + return this._notifyOfEvents(json.data.events); + } else if (json.data.hasOwnProperty('value')) { + return this._notifyOfPropertyValues(json.data.value); + } + } + } else { + debug('Unhandled Socket exchange: ' + (0, _stringify2.default)(json, null, 2)); + } + } + } + return false; + } + }, { + key: 'send', + value: function send(messageName, data) { + this._socket.sendToSharedObject(this._name, messageName, data); + } + }, { + key: 'setProperty', + value: function setProperty(key, value) { + this._socket.sendPropertyToSharedObject(this._name, key, value); + } + }, { + key: 'close', + value: function close() { + if (this._socket === undefined) { + warn('Socket no longer exist to close shared object properly.'); + } + this._socket.closeSharedObject(this._name); + if (this._socket) { + this._socket.removeSharedObjectResponseHandler(this); + } + this._socket = undefined; + this._name = undefined; + _browser2.default.removeCloseHandler(this._onclose); + } + }, { + key: 'getName', + value: function getName() { + return this._name; + } + }]); + return Red5ProSharedObject; +}(_eventEmitter2.default); + +exports.Red5ProSharedObject = Red5ProSharedObject; + +/***/ }), +/* 124 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(6); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(8); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(7); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _eventEmitter = __webpack_require__(23); + +var _eventEmitter2 = _interopRequireDefault(_eventEmitter); + +var _browser = __webpack_require__(4); + +var _browser2 = _interopRequireDefault(_browser); + +var _event = __webpack_require__(84); + +var _log = __webpack_require__(2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NAME = 'ControlSlider'; + +/** + * Custom slider control for Playback Controls. + * + * @private + */ + +var ControlSlider = function (_EventEmitter) { + (0, _inherits3.default)(ControlSlider, _EventEmitter); + + function ControlSlider(type) { + (0, _classCallCheck3.default)(this, ControlSlider); + + var _this = (0, _possibleConstructorReturn3.default)(this, (ControlSlider.__proto__ || (0, _getPrototypeOf2.default)(ControlSlider)).call(this)); + + NAME = [NAME, type].join('::'); + (0, _log.debug)(NAME, '[init]'); + _this._container = _browser2.default.createElement('div'); + _this._button = _this.createButton(); + _this._track = _this.createTrack(); + _this._progressBar = _this.createProgressBar(); + _this._container.appendChild(_this._track); + _this._container.appendChild(_this._progressBar); + _this._container.appendChild(_this._button); + _this._value = 0; // 0 - 1 + _this._disabled = false; + _this._eventStartPosition = 0; + _this._layout(); + _this._mouseupHandler = _this._mouseup.bind(_this); + _this._mousedownHandler = _this._mousedown.bind(_this); + _this._mousemoveHandler = _this._mousemove.bind(_this); + _this._touchupHandler = _this._touchproxy.bind(_this); + _this._touchdownHandler = _this._touchproxy.bind(_this); + _this._touchmoveHandler = _this._touchproxy.bind(_this); + _this._updateHandlers(_this._disabled); + return _this; + } + + /** + * Touch event proxy to bubble out mouse events for handling interaction. + * + * @private + */ + + + (0, _createClass3.default)(ControlSlider, [{ + key: '_touchproxy', + value: function _touchproxy(event) { + event.preventDefault(); + if (event.touches.length > 1 || event.type == "touchend" && event.touches.length > 0) { + return; + } + var evt = _browser2.default.createEvent('MouseEvent'); + var type = void 0, + touch = void 0; + var t = event.originalTarget || event.target; + switch (event.type) { + case 'touchstart': + type = 'mousedown'; + touch = event.changedTouches[0]; + break; + case 'touchmove': + type = 'mousemove'; + touch = event.changedTouches[0]; + break; + case 'touchend': + type = 'mouseup'; + touch = event.changedTouches[0]; + break; + } + + evt.initMouseEvent(type, true, true, t.ownerDocument.defaultView, 0, touch.screenX, touch.screenY, touch.clientX, touch.clientY, event.ctrlKey, event.altKey, event.shiftKey, event.metaKey, 0, null); + t.dispatchEvent(evt); + } + + /** + * Event handler for mouse up. + * + * @private + */ + + }, { + key: '_mouseup', + value: function _mouseup() { + this._eventStartPosition = 0; + document.removeEventListener('mousemove', this._mousemoveHandler); + document.removeEventListener('mouseup', this._mouseupHandler); + document.removeEventListener('touchmove', this._touchmoveHandler); + document.removeEventListener('touchup', this._touchupHandler); + this.trigger(new _event.SliderEvent(_event.SliderEventTypes.CHANGE_COMPLETE, this)); + } + + /** + * Event handler for mouse move. + * + * @private + */ + + }, { + key: '_mousemove', + value: function _mousemove(event) { + var positionOffset = _browser2.default.getMouseXFromEvent(event) - this._eventStartPosition; + var rect = this._button.parentNode.getBoundingClientRect(); + var position = this._eventStartPosition + positionOffset - rect.left; // - environment.getScrollX() + position = Math.max(0, position); + position = Math.min(position, rect.width); + var percentage = position / rect.width; + this.trigger(new _event.SliderEvent(_event.SliderEventTypes.CHANGE, this, percentage)); + } + + /** + * Event handler for mouse down. + * + * @private + */ + + }, { + key: '_mousedown', + value: function _mousedown(event) { + this._eventStartPosition = _browser2.default.getMouseXFromEvent(event); + this.trigger(new _event.SliderEvent(_event.SliderEventTypes.CHANGE_START, this)); + document.addEventListener('mousemove', this._mousemoveHandler); + document.addEventListener('mouseup', this._mouseupHandler); + document.addEventListener('touchmove', this._touchmoveHandler); + document.addEventListener('touchup', this._touchupHandler); + } + + /** + * Adds or removes control hanlders based on flag of overall control being disabled. + * + * @param {Boolean} isDisabled + * + * @private + */ + + }, { + key: '_updateHandlers', + value: function _updateHandlers(isDisabled) { + this._eventStartPosition = 0; + if (isDisabled) { + this._track.removeEventListener('click', this._mousemoveHandler); + this._progressBar.removeEventListener('click', this._mousemoveHandler); + this._button.removeEventListener('mousedown', this._mousedownHandler); + document.removeEventListener('mousemove', this._mousemoveHandler); + document.removeEventListener('mouseup', this._mouseupHandler); + document.removeEventListener('touchmove', this._touchmoveHandler); + document.removeEventListener('touchup', this._touchupHandler); + this._track.classList.add('red5pro-media-slider-disabled'); + this._progressBar.classList.add('red5pro-media-slider-disabled'); + this._button.classList.add('red5pro-media-slider-disabled'); + } else { + this._track.addEventListener('click', this._mousemoveHandler); + this._progressBar.addEventListener('click', this._mousemoveHandler); + this._button.addEventListener('mousedown', this._mousedownHandler); + this._button.addEventListener('touchstart', this._touchdownHandler); + this._track.classList.remove('red5pro-media-slider-disabled'); + this._progressBar.classList.remove('red5pro-media-slider-disabled'); + this._button.classList.remove('red5pro-media-slider-disabled'); + } + } + + /** + * Re-layout sub controls. + * + * @private + */ + + }, { + key: '_layout', + value: function _layout() { + var position = this._progressBar.parentNode.clientWidth * this._value; + this._progressBar.style.width = position + 'px'; + this._button.style.left = position - this._button.clientWidth * 0.5 + 'px'; + } + + /** + * Creates the button element. + * + * @private + */ + + }, { + key: 'createButton', + value: function createButton() { + var span = _browser2.default.createElement('span'); + span.classList.add('red5pro-media-slider-button'); + return span; + } + + /** + * Creates the progress bar element. + * + * @private + */ + + }, { + key: 'createProgressBar', + value: function createProgressBar() { + var span = _browser2.default.createElement('span'); + span.classList.add('red5pro-media-slider-progress'); + return span; + } + + /** + * Creates the track element. + * + * @private + */ + + }, { + key: 'createTrack', + value: function createTrack() { + var span = _browser2.default.createElement('span'); + span.classList.add('red5pro-media-slider-track'); + return span; + } + + /** + * Returns the current value. + * + * @return {Number} + */ + + }, { + key: 'value', + get: function get() { + return this._value; + } + + /** + * Sets the current value. + * + * @param {Number} 0..1 + */ + , + set: function set(percentValue /* 0 - 1 */) { + this._value = percentValue; + this._layout(); + } + + /** + * Returns disabled flag. + * + * @return {Boolean} + */ + + }, { + key: 'disabled', + get: function get() { + return this._disabled; + } + + /** + * Sets the disabled flag. + * + * @param {Boolean} bool + */ + , + set: function set(bool) { + this._disabled = bool; + this._updateHandlers(bool); + } + + /** + * Returns the target container this control is assigned to in the DOM. + * + * @return {Element} + */ + + }, { + key: 'view', + get: function get() { + return this._container; + } + }]); + return ControlSlider; +}(_eventEmitter2.default); + +exports.default = ControlSlider; + +/***/ }), +/* 125 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.RTMPSubscriber = exports.HLSSubscriber = exports.RTCSubscriber = exports.Red5ProSubscriber = undefined; + +var _set = __webpack_require__(92); + +var _set2 = _interopRequireDefault(_set); + +var _toConsumableArray2 = __webpack_require__(94); + +var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); + +var _getPrototypeOf = __webpack_require__(6); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(8); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(7); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _map = __webpack_require__(88); + +var _map2 = _interopRequireDefault(_map); + +var _implFactoryOrder = __webpack_require__(85); + +var _implFactoryOrder2 = _interopRequireDefault(_implFactoryOrder); + +var _eventEmitter = __webpack_require__(23); + +var _eventEmitter2 = _interopRequireDefault(_eventEmitter); + +var _red5proRtc = __webpack_require__(127); + +var _red5proRtc2 = _interopRequireDefault(_red5proRtc); + +var _red5proRtmp = __webpack_require__(128); + +var _red5proRtmp2 = _interopRequireDefault(_red5proRtmp); + +var _red5proHls = __webpack_require__(126); + +var _red5proHls2 = _interopRequireDefault(_red5proHls); + +var _promise = __webpack_require__(5); + +var _playback = __webpack_require__(33); + +var _log = __webpack_require__(2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NAME = 'Red5ProSubscriber'; + +var playbackFactory = new _implFactoryOrder2.default(); +var playbackImpl = function () { + var map = new _map2.default(); + map.set(_playback.PlaybackTypes.RTC, _red5proRtc2.default); + map.set(_playback.PlaybackTypes.RTMP, _red5proRtmp2.default); + map.set(_playback.PlaybackTypes.HLS, _red5proHls2.default); + return map; +}(); + +/** + * Main entry for failover support of all subscriber implementations. + * + * @extends EventEmitter + */ + +var Red5ProSubscriber = function (_EventEmitter) { + (0, _inherits3.default)(Red5ProSubscriber, _EventEmitter); + + function Red5ProSubscriber() { + (0, _classCallCheck3.default)(this, Red5ProSubscriber); + + var _this = (0, _possibleConstructorReturn3.default)(this, (Red5ProSubscriber.__proto__ || (0, _getPrototypeOf2.default)(Red5ProSubscriber)).call(this)); + + _this._options = undefined; + _this._order = [_playback.PlaybackTypes.RTC, _playback.PlaybackTypes.RTMP, _playback.PlaybackTypes.HLS]; + return _this; + } + + /** + * Utilizes Failover Publisher Factory to attempt in determining browser support for Publisher from defined order. + * + * @return {Promise} + * + * @private + */ + + + (0, _createClass3.default)(Red5ProSubscriber, [{ + key: '_getPlaybackFromOrder', + value: function _getPlaybackFromOrder(order, options) { + return playbackFactory.create(order, playbackImpl, options, 'init'); + } + + /** + * Returns the specified order for auto-failover. + * + * @return {Array} + * Default: `['rtc', 'rtmp', 'hls']`. + */ + + }, { + key: 'getPlaybackOrder', + value: function getPlaybackOrder() { + return this._order; + } + + /** + * Defines the desired auto-failover order. + * + * @param {Array} order + * The desired order. e.g, `['rtc', 'rtmp', 'hls']`. + */ + + }, { + key: 'setPlaybackOrder', + value: function setPlaybackOrder(order) { + // Allow for string value to define single item in order. + order = typeof order === 'string' ? [order] : order; + + // Filter out values not available in enumeration of playback types. + var t = order.filter(function (entry) { + var key = void 0; + for (key in _playback.PlaybackTypes) { + if (_playback.PlaybackTypes[key].toLowerCase() === entry.toLowerCase()) { + return true; + } + } + return false; + }).map(function (entry) { + return entry.toLowerCase(); + }); + + // Define new order. + this._order = [].concat((0, _toConsumableArray3.default)(new _set2.default(t))); + (0, _log.debug)(NAME, '[orderupdate]: ' + this._order); + return this; + } + + /** + * Request to initialize and determine the proper Subscriber implementation based on configuration. + * + * The returned `Promise` will either resolve with the determined Subscriber instance or reject with an error String in failure to determine Subscriber type. + * + * @param {Object} options + * The initialization configuration map for each desired failover tech. + * @return {Promise} + */ + + }, { + key: 'init', + value: function init(options) { + this._options = options; + var deferred = new _promise.DeferredPromise(); + (0, _log.debug)(NAME, '[init]'); + this._getPlaybackFromOrder(this._order, this._options).then(function (subscriber) { + (0, _log.debug)(NAME, '[init:success]: subscriber found ' + subscriber.getType()); + deferred.resolve(subscriber); + }).catch(function (err) { + (0, _log.warn)(NAME, '[playerror]: Could not implement a subscriber: ' + err); + deferred.reject(err); + }); + return deferred.promise; + } + + /** + * Return enumerated value Subscriber types used in failover order. + * @type {Object} + */ + + }, { + key: 'playbackTypes', + get: function get() { + return _playback.PlaybackTypes; + } + }]); + return Red5ProSubscriber; +}(_eventEmitter2.default); + +exports.Red5ProSubscriber = Red5ProSubscriber; +exports.RTCSubscriber = _red5proRtc2.default; +exports.HLSSubscriber = _red5proHls2.default; +exports.RTMPSubscriber = _red5proRtmp2.default; + +/***/ }), +/* 126 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(28); + +var _extends3 = _interopRequireDefault(_extends2); + +var _getPrototypeOf = __webpack_require__(6); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(8); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(7); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _browser = __webpack_require__(4); + +var _browser2 = _interopRequireDefault(_browser); + +var _red5proSourceHandlerHls = __webpack_require__(129); + +var _red5proSourceHandlerHls2 = _interopRequireDefault(_red5proSourceHandlerHls); + +var _playback = __webpack_require__(42); + +var _playback2 = _interopRequireDefault(_playback); + +var _index = __webpack_require__(24); + +var _event = __webpack_require__(15); + +var _playback3 = __webpack_require__(33); + +var _promise = __webpack_require__(5); + +var _log = __webpack_require__(2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NAME = 'HLSSubscriber'; + +// Default to secure settings. +var defaultOptions = { + protocol: 'https', + port: 443, + app: 'live', + mimeType: 'application/x-mpegURL', + mediaElementId: 'red5pro-subscriber', + autoLayoutOrientation: true + + /** + * Util to return the endpoint for an HLS video file. + * + * @param {Object} options + * The initialization object. + * @return {String} + * + * @private + */ +};var optionsToHlsURL = function optionsToHlsURL(options) { + var protocol = options.hlsprotocol ? options.hlsprotocol : options.protocol; + var port = options.hlsport ? options.hlsport : options.port; + var appEndpoint = options.context ? [options.app, options.context].join('/') : options.app; + return protocol + '://' + options.host + ':' + port + '/' + appEndpoint + '/' + options.streamName + '.m3u8'; +}; + +/** + * Main entry for HLS-based Subscriber. + * + * @extends EventEmitter + * @extends SubscriberPlaybackController + */ + +var HLSSubscriber = function (_PlaybackController) { + (0, _inherits3.default)(HLSSubscriber, _PlaybackController); + + function HLSSubscriber() { + (0, _classCallCheck3.default)(this, HLSSubscriber); + + var _this = (0, _possibleConstructorReturn3.default)(this, (HLSSubscriber.__proto__ || (0, _getPrototypeOf2.default)(HLSSubscriber)).call(this)); + + _this._options = undefined; + _this._view = undefined; + _this._sourceHandler = undefined; + _this._viewResolver = new _promise.DeferredPromise(); + _this._subscriptionResolver = new _promise.DeferredPromise(); + _this._boundBubbleSubscriberEvents = _this.bubbleSubscriberEvents.bind(_this); + return _this; + } + + (0, _createClass3.default)(HLSSubscriber, [{ + key: '_getViewResolverPromise', + value: function _getViewResolverPromise() { + return this._viewResolver.promise; + } + }, { + key: '_getSubscriptionResolverPromise', + value: function _getSubscriptionResolverPromise() { + return this._subscriptionResolver.promise; + } + + /** + * Proxy event bubbler through handler instance. + * + * @private + */ + + }, { + key: 'bubbleSubscriberEvents', + value: function bubbleSubscriberEvents(event) { + if (event.type === _event.SubscriberEventTypes.SUBSCRIBE_START) { + this._subscriptionResolver.resolve(this); + } + this.trigger(new _event.SubscriberEvent(event.type, this, event.data)); + } + + /** + * Gloms the Playback Controls API onto this instance to provide ease in use. + * + * @param {Object} handler + * The method request handler to bind and forward calls on. + * + * @private + */ + + }, { + key: '_glomSourceHandlerAPI', + value: function _glomSourceHandlerAPI(handler) { + var _this2 = this; + + this.play = handler.play.bind(handler); + this.pause = handler.pause.bind(handler); + this.resume = handler.resume.bind(handler); + this.stop = handler.stop.bind(handler); + this.mute = handler.mute.bind(handler); + this.unmute = handler.unmute.bind(handler); + this.setVolume = handler.setVolume.bind(handler); + this.seekTo = handler.seekTo.bind(handler); + this.toggleFullScreen = handler.toggleFullScreen.bind(handler); + handler.on('*', function (event) { + _this2.trigger(new _event.SubscriberEvent(event.type, _this2, event.data)); + }); + } + + /** + * Still in use, but hold-over of previous 3.x SDK versions designed to pair views and subscribers. In 4.0.0 it has been internalized. + * API deprecated. + * + * @private + */ + + }, { + key: '_setViewIfNotExist', + value: function _setViewIfNotExist(currentView) { + var mediaElementId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; + + if (typeof currentView === 'undefined' && mediaElementId !== undefined) { + var view = new _playback2.default(mediaElementId); + view.attachSubscriber(this); + } + } + + /** + * Attempt to initialize the subscription handler for HLS. + * + * @param {Object} options + * The initialization configuration. + * @param {Object} handler + * The handler instance that will manage view interaction and events. + * + * @private + */ + + }, { + key: '_initHandler', + value: function _initHandler(options) { + var _this3 = this; + + var urlRegex = /^http(|s).*\.m3u8/g; + var url = this._options.streamName.match(urlRegex) ? this._options.streamName : optionsToHlsURL(this._options); + this._sourceHandler.on('*', this._boundBubbleSubscriberEvents); + this._sourceHandler.addSource(url, options.mimeType, options).then(function () { + _this3.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.CONNECT_SUCCESS)); + }).catch(function (err) { + (0, _log.error)(NAME, 'Could not establish an HLS Subscriber: ' + err); + _this3.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.CONNECT_FAILURE)); + }); + } + + /** + * Request to initialize the HLS-based Subscriber based on configuration. + * The returned `Promise` will either resolve with a reference to this instance or reject with an error `String` in failure. + * + * @param {Object} options + * The initialization configuration map. + * @return {Promise} + */ + + }, { + key: 'init', + value: function init(options) { + var _this4 = this; + + var deferred = new _promise.DeferredPromise(); + if (!_browser2.default.supportsHLS()) { + (0, _log.warn)(NAME, 'Could not resolve HLSSubscriber instance.'); + deferred.reject('Could not resolve HLSSubscriber instance.'); + } else { + this._options = (0, _extends3.default)({}, defaultOptions, options); + this._setViewIfNotExist(this._view, this._options.mediaElementId); + this._getViewResolverPromise().then(function (view) { + _this4._sourceHandler = new _red5proSourceHandlerHls2.default(view.view, _this4.getType()); + _this4._glomSourceHandlerAPI(_this4._sourceHandler); + if (_this4._options) { + _this4._initHandler(_this4._options); + } + }); + deferred.resolve(this); + } + return deferred.promise; + } + + /** + * Still in use for assigning document element view management to this instance. + * API deprecated in 4.0.0. + * + * @private + */ + + }, { + key: 'setView', + value: function setView(view) { + this._view = view; + this._viewResolver.resolve(view); + return this; + } + + /** + * Request to begin subscribing to a stream. + * + * @return {Promise} + * The returned `Promise` will resolve or reject on successful start of playback. + */ + + }, { + key: 'subscribe', + value: function subscribe() { + return this._getSubscriptionResolverPromise(); + } + + /** + * Request to stop a subscription. + * The returned `Promise` will either resolve or reject on successful stop of subscription. + * + * @return {Promise} + */ + + }, { + key: 'unsubscribe', + value: function unsubscribe() { + (0, _log.debug)(NAME, '[unscubscribe]'); + var deferred = new _promise.DeferredPromise(); + try { + this._sourceHandler.stop(); + this._sourceHandler.disconnect(); + deferred.resolve(); + } catch (e) { + deferred.reject(e.message); + } + return deferred.promise; + } + + /** + * Returns connection handler for playback. + * + * @return {Object} + */ + + }, { + key: 'getConnection', + value: function getConnection() { + return this._sourceHandler; + } + + /** + * Returns reference to playback controls if available. + * + * @return {PlaybackControls} + */ + + }, { + key: 'getControls', + value: function getControls() { + return this._sourceHandler ? this._sourceHandler.getControls() : undefined; + } + + /** + * Returns the initialization configuration used in `init()`. + * + * @return {Object} + */ + + }, { + key: 'getOptions', + value: function getOptions() { + return this._options; + } + + /** + * Returns the target view Element. + * + * @return {Element} + */ + + }, { + key: 'getPlayer', + value: function getPlayer() { + return this._view.view; + } + + /** + * Returns the type of implementation: `RTC`. + * + * @return {String} + */ + + }, { + key: 'getType', + value: function getType() { + return _playback3.PlaybackTypes.HLS.toUpperCase(); + } + }]); + return HLSSubscriber; +}(_index.PlaybackController); + +exports.default = HLSSubscriber; + +/***/ }), +/* 127 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _stringify = __webpack_require__(12); + +var _stringify2 = _interopRequireDefault(_stringify); + +var _extends2 = __webpack_require__(28); + +var _extends3 = _interopRequireDefault(_extends2); + +var _getPrototypeOf = __webpack_require__(6); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(8); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(7); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _browser = __webpack_require__(4); + +var _browser2 = _interopRequireDefault(_browser); + +var _translationUtil = __webpack_require__(78); + +var _webrtc = __webpack_require__(40); + +var webrtc = _interopRequireWildcard(_webrtc); + +var _websocket = __webpack_require__(53); + +var websocket = _interopRequireWildcard(_websocket); + +var _red5proSourceHandlerRtc = __webpack_require__(130); + +var _red5proSourceHandlerRtc2 = _interopRequireDefault(_red5proSourceHandlerRtc); + +var _socketHelperSub = __webpack_require__(115); + +var _socketHelperSub2 = _interopRequireDefault(_socketHelperSub); + +var _webrtcHelperSub = __webpack_require__(117); + +var _webrtcHelperSub2 = _interopRequireDefault(_webrtcHelperSub); + +var _playback = __webpack_require__(42); + +var _playback2 = _interopRequireDefault(_playback); + +var _controls = __webpack_require__(24); + +var _object = __webpack_require__(41); + +var _urlEndpoint = __webpack_require__(87); + +var _event = __webpack_require__(15); + +var _playback3 = __webpack_require__(33); + +var _webrtc2 = __webpack_require__(55); + +var _promise = __webpack_require__(5); + +var _log = __webpack_require__(2); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var subStartRegex = /(.*) starting/i; +var NAME = 'RTCSubscriber'; + +/** + * Simple generation og unique subscriber id. + * + * @return {String} + * + * @private + */ +var generateSubscriptionId = function generateSubscriptionId() { + var id = Math.floor(Math.random() * 0x10000).toString(16); + return 'subscriber-' + id; +}; + +// Default to secure settings. +var defaultOptions = { + protocol: 'wss', + port: 8083, + app: 'live', + autoLayoutOrientation: true, + mediaElementId: 'red5pro-subscriber', + iceServers: [{ urls: 'stun:stun2.l.google.com:19302' }], + iceTransport: _webrtc2.IceTransportTypes.UDP, + maintainConnectionOnSubscribeErrors: false + + /** + * Main entry for WebRTC-based Subscriber. + * + * @extends EventEmitter + * @extends SubscriberPlaybackController + */ +}; +var RTCSubscriber = function (_PlaybackController) { + (0, _inherits3.default)(RTCSubscriber, _PlaybackController); + + function RTCSubscriber() { + (0, _classCallCheck3.default)(this, RTCSubscriber); + + var _this = (0, _possibleConstructorReturn3.default)(this, (RTCSubscriber.__proto__ || (0, _getPrototypeOf2.default)(RTCSubscriber)).call(this)); + + _this._view = undefined; + _this._options = undefined; + _this._peerHelper = undefined; + _this._socketHelper = undefined; + _this._connectionClosed = true; + _this._sourceHandler = undefined; + _this._mediaStream = undefined; + _this._viewResolver = new _promise.DeferredPromise(); + _this._availabilityResolver = new _promise.DeferredPromise(); + _this._subscriptionResolver = new _promise.DeferredPromise(); + _this._orientation = 0; + return _this; + } + + (0, _createClass3.default)(RTCSubscriber, [{ + key: '_getViewResolverPromise', + value: function _getViewResolverPromise() { + return this._viewResolver.promise; + } + }, { + key: '_getAvailabilityResolverPromise', + value: function _getAvailabilityResolverPromise() { + return this._availabilityResolver.promise; + } + }, { + key: '_getSubscriptionResolverPromise', + value: function _getSubscriptionResolverPromise() { + return this._subscriptionResolver.promise; + } + + /** + * Gloms the Playback Controls API onto this instance to provide ease in use. + * + * @param {Object} handler + * The method request handler to bind and forward calls on. + * + * @private + */ + + }, { + key: '_glomSourceHandlerAPI', + value: function _glomSourceHandlerAPI(handler) { + var _this2 = this; + + this.play = handler.play.bind(handler); + this.pause = handler.pause.bind(handler); + this.resume = handler.resume.bind(handler); + this.stop = handler.stop.bind(handler); + this.mute = handler.mute.bind(handler); + this.unmute = handler.unmute.bind(handler); + this.setVolume = handler.setVolume.bind(handler); + this.seekTo = handler.seekTo.bind(handler); + this.toggleFullScreen = handler.toggleFullScreen.bind(handler); + handler.on('*', function (event) { + _this2.trigger(new _event.SubscriberEvent(event.type, _this2, event.data)); + }); + } + + /** + * Still in use, but hold-over of previous 3.x SDK versions designed to pair views and subscribers. In 4.0.0 it has been internalized. + * API deprecated. + * + * @private + */ + + }, { + key: '_setViewIfNotExist', + value: function _setViewIfNotExist(currentView) { + var mediaElementId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; + + if (typeof currentView === 'undefined' && mediaElementId !== undefined) { + var view = new _playback2.default(mediaElementId); + view.attachSubscriber(this); + } + } + + /** + * Attempt to initialize the subscription handler for WebRTC. + * + * @param {Object} options + * The initialization configuration. + * @param {Object} handler + * The handler instance that will manage view interaction and events. + * + * @private + */ + + }, { + key: '_initHandler', + value: function _initHandler(options, handler) { + if (options && handler) { + handler.on('*', this._boundBubbleSubscriberEvents); + handler.addSource(options); + } + } + + /** + * Request available stream by name on server through WebSocket request. + * + * @param {String} streamName + * The name of the stream to look up. + * @private + */ + + }, { + key: '_requestAvailability', + value: function _requestAvailability(streamName) { + (0, _log.debug)(NAME, '[requestavailability]'); + // message on socket returns -> onStream(Un)Available + this._socketHelper.post({ + isAvailable: streamName + }); + } + + /** + * Request offer over WebSocket. + * + * @param {String} streamName + * The name of the stream to subscribe to. + * @param {String} subscriptionId + * The unique id of this subscriber. + * @param {String} vEncoding + * Optional encoding type for video. Defaults to server selection. + * @param {String} aEncoding + * Optional encoding type for audio. Defaults to server selection. + * + * @private + */ + + }, { + key: '_requestOffer', + value: function _requestOffer(streamName, subscriptionId, transport) { + var vEncoding = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : undefined; + var aEncoding = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : undefined; + + (0, _log.debug)(NAME, '[requestoffer]'); + var offer = { + requestOffer: streamName, + requestId: subscriptionId, + transport: transport + }; + if (typeof vEncoding !== 'undefined' && vEncoding !== _playback3.PlaybackVideoEncoder.NONE) { + offer.videoEncoding = vEncoding; + } + if (typeof aEncoding !== 'undefined' && aEncoding !== _playback3.PlaybackAudioEncoder.NONE) { + offer.audioEncoding = aEncoding; + } + this.trigger(new _event.SubscriberEvent(_event.RTCSubscriberEventTypes.OFFER_START, this)); + // message on socket returns -> onSDPOffer + this._socketHelper.post(offer); + } + + /** + * Creates and sends an answer based on provided SDP. + * + * @param {Object} sdp + * The SDP object to use in creating an SDP answer to send back. + * + * @private + */ + + }, { + key: '_requestAnswer', + value: function _requestAnswer(sdp) { + var _this3 = this; + + (0, _log.debug)(NAME, '[requestanswer]'); + // invokes -> sendAnswer + this._peerHelper.createAnswer(sdp).then(function (sessionDescription) { + (0, _log.debug)(NAME, '[onanswercreated]'); + (0, _log.debug)(NAME, '[> sendanswer]'); + _this3._sendAnswer(_this3._options.streamName, _this3._options.subscriptionId, sessionDescription); + }).catch(function (error) { + _this3.onSDPError(error); + }); + } + + /** + * Posts SDP answer to server over WebSocket. + * + * @param {String} streamName + * The target stream name. + * @param {String} subscriptionId + * The unique id of this subscriber. + * @param {Object} sdp + * The SDP to send as an answer. + * + * @private + */ + + }, { + key: '_sendAnswer', + value: function _sendAnswer(streamName, subscriptionId, sdp) { + (0, _log.debug)(NAME, '[sendanswer]: streamname(' + streamName + '), subscriptionid(' + subscriptionId + ')'); + this.trigger(new _event.SubscriberEvent(_event.RTCSubscriberEventTypes.ANSWER_START, this, sdp)); + // message on socket response -> onAddIceCandidate + // message on peer response -> onaddstream + this._socketHelper.post({ + handleAnswer: streamName, + requestId: subscriptionId, + data: { + sdp: sdp + } + }); + } + + /** + * Sends a candidate to the server over WebSocket. + * + * @param {Object} candidate + * The peer candidate description. + * + * @private + */ + + }, { + key: '_sendCandidate', + value: function _sendCandidate(candidate) { + (0, _log.debug)(NAME, '[sendcandidate]'); + this.trigger(new _event.SubscriberEvent(_event.RTCSubscriberEventTypes.CANDIDATE_START, this, candidate)); + // message on peer response -> onicecandidate + this._socketHelper.post({ + handleCandidate: this._options.streamName, + requestId: this._options.subscriptionId, + data: { + candidate: candidate + } + }); + } + + /** + * Setup and connect to begin a subscription. + * This is invoked once the availability of the stream is recognized on the server and notified on this instance. + * + * @param {Array} iceServers + * The ICE server list to use in trickle. + * + * @private + */ + + }, { + key: '_connect', + value: function _connect(iceServers) { + var _this4 = this; + + (0, _log.debug)(NAME, '[connect]'); + this._options.iceServers = iceServers; + var p = this._peerHelper.setUp(this._options.iceServers, undefined, this._options.rtcpMuxPolicy); + p.then(function () { + _this4._requestOffer(_this4._options.streamName, _this4._options.subscriptionId, _this4._options.iceTransport, _this4._options.videoEncoding, _this4._options.audioEncoding); + }).catch(function () { + (0, _log.warn)(NAME, 'Could not establish RTCPeerConnection.'); + _this4.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.CONNECT_FAILURE, _this4)); + }); + // TODO: Normalize returns to either all be chainable or not be chainable + return this; + } + + /** + * Disconnect and teardown after close of subscription. + * + * @private + */ + + }, { + key: '_disconnect', + value: function _disconnect() { + (0, _log.debug)(NAME, '[disconnect]'); + if (this._socketHelper) { + this._socketHelper.tearDown(); + } + if (this._peerHelper) { + this._peerHelper.tearDown(); + } + if (this._sourceHandler) { + this._sourceHandler.disconnect(); + } + this._connectionClosed = true; + } + + /** + * Request to kick off autoplay if setting is flagged. + * + * @param {Object} options + * The initialization object. + * @param {Element} view + * The target element view that will playback the stream. + * + * @private + */ + + }, { + key: '_playIfAutoplaySet', + value: function _playIfAutoplaySet(options, view) { + if (options && view) { + options.autoplay = _browser2.default.hasAttributeDefined(view.view, 'autoplay'); + if (options.autoplay) { + this.play(); + } + } + } + + /** + * Request to begin subscription on server over WebSocket. + * + * @private + */ + + }, { + key: '_sendSubscribe', + value: function _sendSubscribe() { + (0, _log.debug)(NAME, '[sendsubscribe]'); + this._socketHelper.post({ + subscribe: this._options.streamName, + requestId: this._options.subscriptionId + }); + } + + /** + * Request to initialize the WebRTC-based Subscriber based on configuration. + * The returned `Promise` will either resolve with a reference to this instance or reject with an error `String` in failure. + * + * @param {Object} options + * The initialization configuration map. + * @return {Promise} + */ + + }, { + key: 'init', + value: function init(options) { + var _this5 = this; + + var deferred = new _promise.DeferredPromise(); + if (!webrtc.isSupported() || !websocket.isSupported()) { + deferred.reject('Cannot create WebRTC playback instance. Your environment does not support WebRTC and/or WebSockets.'); + } else { + this._disconnect(); + this._options = (0, _extends3.default)({}, defaultOptions, options); + this._options.subscriptionId = this._options.subscriptionId || generateSubscriptionId(); + + this._peerHelper = new _webrtcHelperSub2.default(this); + this._socketHelper = new _socketHelperSub2.default(this); + var socketPromise = new _promise.DeferredPromise(); + var socketurl = (0, _urlEndpoint.rtcSocketEndpointFromOptions)(this._options, { + id: this._options.subscriptionId + }); + + socketPromise.promise.then(function () { + deferred.resolve(_this5); + _this5._connectionClosed = false; + _this5.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.CONNECT_SUCCESS, _this5)); + }).catch(function (error) { + deferred.reject(error); + _this5.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.CONNECT_FAILURE, _this5, error)); + }); + this._socketHelper.setUp(socketurl, socketPromise); + } + return deferred.promise; + } + + /** + * Still in use for assigning document element view management to this instance. + * API deprecated in 4.0.0. + * + * @private + */ + + }, { + key: 'setView', + value: function setView(view) { + this._view = view; + this._viewResolver.resolve(this._view); + return this; + } + + /** + * Request to begin subscribing to a stream. + * + * @return {Promise} + * The returned `Promise` will resolve or reject on successful start of playback. + * There are several processes that occur in order to establish a WebRTC subscription that involve - but are not limited to - ICE communication and assigning of local and remote SDPs on peer connections. + */ + + }, { + key: 'subscribe', + value: function subscribe() { + var _this6 = this; + + this._getViewResolverPromise().then(function (view) { + _this6._sourceHandler = new _red5proSourceHandlerRtc2.default(view.view, _this6.getType()); + _this6._glomSourceHandlerAPI(_this6._sourceHandler); + _this6._initHandler(_this6._options, _this6._sourceHandler); + }); + this._getAvailabilityResolverPromise().then(function () { + _this6._connect(_this6._options.iceServers); + }); + this._setViewIfNotExist(this._view, this._options.mediaElementId); + this._requestAvailability(this._options.streamName, this._options.streamType); + return this._getSubscriptionResolverPromise(); + } + + /** + * Request to stop a subscription. + * The returned `Promise` will either resolve or reject on successful stop of subscription. + * + * @return {Promise} + */ + + }, { + key: 'unsubscribe', + value: function unsubscribe() { + (0, _log.debug)(NAME, '[unsubscribe]'); + var deferred = new _promise.DeferredPromise(); + this.stop(); + this._disconnect(); + this._mediaStream = undefined; + deferred.resolve(this); + this.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.SUBSCRIBE_STOP, this)); + return deferred.promise; + } + + /** + * Event handler for stream being available on server. + * + * @private + */ + + }, { + key: 'onStreamAvailable', + value: function onStreamAvailable(receipt) { + (0, _log.debug)(NAME, '[onstreamavailable]: ' + (0, _stringify2.default)(receipt, null, 2)); + this._availabilityResolver.resolve(this); + } + + /** + * Event handler for stream being unavailable on server. + * + * @private + */ + + }, { + key: 'onStreamUnavailable', + value: function onStreamUnavailable(receipt) { + (0, _log.debug)(NAME, 'Stream ' + this._options.streamName + ' does not exist.'); + (0, _log.debug)(NAME, '[onstreamunavailable]: ' + (0, _stringify2.default)(receipt, null, 2)); + this.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.SUBSCRIBE_INVALID_NAME, this)); + this._availabilityResolver.reject('Stream ' + this._options.streamName + ' does not exist.'); + this._subscriptionResolver.reject('Stream ' + this._options.streamName + ' does not exist.'); + if (!this._options.maintainConnectionOnSubscribeErrors) { + this._disconnect(); + } else { + // Reset promise for possible retry. + this._availabilityResolver = new _promise.DeferredPromise(); + this._subscriptionResolver = new _promise.DeferredPromise(); + } + } + + /** + * Event handler for success of SDP being added remotely and locally through the Peer Connection. + * + * @param {Object} receipt + * + * @private + */ + + }, { + key: 'onSDPSuccess', + value: function onSDPSuccess(receipt) { + (0, _log.debug)(NAME, '[onsdpsuccess]: ' + (0, _stringify2.default)(receipt, null, 2)); + } + + /** + * Event handler for success in SDP offer. + * + * @param {Object} receipt + * The optional successful object. + * + * @private + */ + + }, { + key: 'onSDPOffer', + value: function onSDPOffer(receipt) { + (0, _log.debug)(NAME, '[onsdpoffer]: ' + (0, _stringify2.default)(receipt, null, 2)); + var sdp = new webrtc.RTCSessionDescription(receipt.sdp); + this.trigger(new _event.SubscriberEvent(_event.RTCSubscriberEventTypes.OFFER_END, this)); + this._requestAnswer(sdp); + } + + /** + * Event handler for all errors related to SDP through the Peer Connection. + * + * @param {Object} receipt + * The optional error object. + * + * @private + */ + + }, { + key: 'onSDPError', + value: function onSDPError(receipt) { + this.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.SUBSCRIBE_FAIL, this, receipt)); + this._subscriptionResolver.reject('Invalid SDP.'); + (0, _log.error)(NAME, '[onsdperror]'); + (0, _log.error)(NAME, receipt); + } + + /** + * Event handler for receipt of a `MediaStream`. + * + * @param {MediaStream} stream + * The stream returned on the Peer Connection. + * + * @private + */ + + }, { + key: 'onAnswerMediaStream', + value: function onAnswerMediaStream() { + var stream = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + // eslint-disable-line no-unused-vars + this.trigger(new _event.SubscriberEvent(_event.RTCSubscriberEventTypes.ANSWER_END, this)); + } + + /** + * Event handler on receipt of ICE candidate. + * + * @param {Object} candidate + * The ICE candidate. + * + * @private + */ + + }, { + key: 'onIceCandidate', + value: function onIceCandidate(candidate) { + (0, _log.debug)(NAME, '[onicecandidate]'); + this.trigger(new _event.SubscriberEvent(_event.RTCSubscriberEventTypes.CANDIDATE_END, this)); + this._sendCandidate(candidate); + } + + /** + * Event handler for end of ICE communication (trickle). + * + * @param {MediaStream} stream + * The `MediaStream` that has become available post-trickle. + * + * @private + */ + + }, { + key: 'onIceCandidateTrickleEnd', + value: function onIceCandidateTrickleEnd(stream) { + var _this7 = this; + + (0, _log.debug)(NAME, '[onicetrickleend]'); + this._getViewResolverPromise().then(function (view) { + view.attachStream(stream); + _this7._mediaStream = stream; + _this7.trigger(new _event.SubscriberEvent(_event.RTCSubscriberEventTypes.ON_ADD_STREAM, _this7, _this7._mediaStream)); + }); + } + + /** + * Event handler to add ICE candidate to Peer Connection. + * + * @param {Object} candidate + * + * @private + */ + + }, { + key: 'onAddIceCandidate', + value: function onAddIceCandidate(candidate) { + (0, _log.debug)(NAME, '[onaddicecandidate]'); + this._peerHelper.addIceCandidate(candidate); + } + + /** + * Event handler for completion of peer ice candidate gathering. + * + * @private + */ + + }, { + key: 'onPeerGatheringComplete', + value: function onPeerGatheringComplete() { + (0, _log.debug)('[icecandidategathering:end]'); + if (this._socketHelper) { + this._socketHelper.postEndOfCandidates(this._options.streamName); + } + } + + /** + * Event handler for notification of end in ice candidates over the WebSocket. + * + * @private + */ + + }, { + key: 'onSocketIceCandidateEnd', + value: function onSocketIceCandidateEnd() { + (0, _log.debug)(NAME, '[onsocketicecandidateend]'); + this.trigger(new _event.SubscriberEvent(_event.RTCSubscriberEventTypes.ICE_TRICKLE_COMPLETE, this)); + this._sendSubscribe(); + } + + /** + * General event handler for errors coming over the WebSocket. + * + * @param {String} message + * @param {Object} detail + * Optional additional detail. + * + * @private + */ + + }, { + key: 'onSocketMessageError', + value: function onSocketMessageError(message) { + var detail = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; + + (0, _log.error)(NAME, 'Error in stream subscription: ' + message + '.\n[Optional detail]: ' + detail); + this._subscriptionResolver.reject('Error in stream subscription: ' + message + '.'); + this.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.SUBSCRIBE_FAIL, this, message)); + } + + /** + * Event handler for close on the WebSocket. + * + * @param {Event} closeEvent + * + * @private + */ + + }, { + key: 'onSocketClose', + value: function onSocketClose(closeEvent) { + (0, _log.debug)(NAME, '[onsocketclose]'); + if (this._peerHelper) { + this._peerHelper.tearDown(); + } + this.onConnectionClosed(closeEvent); + } + + /** + * Event handler for close of Peer Connection. + * + * @param {Event} event + * + * @private + */ + + }, { + key: 'onPeerConnectionClose', + value: function onPeerConnectionClose(event) { + (0, _log.debug)(NAME, '[onpeerconnectionclose]'); + if (this._socketHelper) { + this._socketHelper.tearDown(); + } + this.onSocketClose(event); + } + + /** + * Event handler for `Unpublish` of stream subscribed to. Occurs when a broadcaster stops their stream while this subscription stream is open. + * + * @private + */ + + }, { + key: 'onUnpublish', + value: function onUnpublish() { + (0, _log.debug)(NAME, '[onunpublish]'); + if (this._sourceHandler) { + this._sourceHandler.unpublish(); + } + this.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.PLAY_UNPUBLISH, this)); + } + + /** + * Event handler for connection on stream being closed. + * + * @private + */ + + }, { + key: 'onConnectionClosed', + value: function onConnectionClosed() { + var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + + if (!this._connectionClosed) { + (0, _log.debug)(NAME, '[onconnectionclosed]'); + this._disconnect(); + this.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.CONNECTION_CLOSED, this, event)); + } + } + + /** + * Event handler for accepting data through the `send` API of a Publisher. This is the receiving end of the communication channel in which a Publisher can send data to all subscribers. + * + * @param {String} methodName + * The target method name associated with the communication. + * @param {Object} data + * The data being sent. + * + * @private + */ + + }, { + key: 'onSendReceived', + value: function onSendReceived(methodName, data) { + if (methodName === 'onMetaData') { + this.onMetaData(data); + } else { + // environment.invoke(methodName, data) + this.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.SUBSCRIBE_SEND_INVOKE, this, { + methodName: methodName, + data: data + })); + } + } + + /** + * Event handler for status notifications of the subscription stream coming over the WebSocket. + * + * @param {Object} status + * The status object. + * + * @private + */ + + }, { + key: 'onSubscriberStatus', + value: function onSubscriberStatus(status) { + (0, _log.debug)(NAME, '[subscriberstatus] - ' + (0, _stringify2.default)(status, null, 2)); + var startResult = subStartRegex.exec(status.message); + if (startResult && startResult[1] === this._options.streamName) { + this._subscriptionResolver.resolve(this); + this.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.SUBSCRIBE_START, this)); + this._playIfAutoplaySet(this._options, this._view); + } + } + + /** + * Event handler for metadata being sent related to the subscription stream coming over the WebSocket. + * + * @param {Object} metadata + * + * @private + */ + + }, { + key: 'onMetaData', + value: function onMetaData(metadata) { + if (typeof metadata.orientation !== 'undefined' && metadata.orientation !== this._orientation) { + this._orientation = metadata.orientation; + if (this._options.autoLayoutOrientation) { + (0, _translationUtil.applyOrientation)(this._view.view, parseInt(metadata.orientation, 10), (0, _object.metadataResolutionToObject)(metadata.resolution)); + if (this._sourceHandler) { + this._sourceHandler.handleOrientationChange(parseInt(metadata.orientation)); + } + } + this.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.ORIENTATION_CHANGE, this, { + orientation: parseInt(metadata.orientation), + viewElement: this._view.view + })); + } + this.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.SUBSCRIBE_METADATA, this, metadata)); + } + + /** + * Request to invoke a method on the Application Adapter related to the `app` config setting. + * + * @param {String} methodName + * The name of the method to invoke on thw Application Adapter + * @param {Array} args + * The ordered list of arguments to invoke on the method. Do not provide anything if the method takes no arguments. + * @return {Promise} + */ + + }, { + key: 'callServer', + value: function callServer(methodName, args) { + return this._socketHelper.postAsync({ + callAdapter: { + method: methodName, + arguments: args + } + }); + } + + /** + * Enters subscriber into standby mode - keeping connection open but not bothering to consume video or audio. + */ + + }, { + key: 'enableStandby', + value: function enableStandby() { + this._socketHelper.post({ + standby: true + }); + } + + /** + * Removes subscriber from standby mode - turning the audio and video back on and consumable after a mute request. + */ + + }, { + key: 'disableStandby', + value: function disableStandby() { + this._socketHelper.post({ + standby: false + }); + } + + /** + * Returns the current WebSocket connection helper if established. + * Used in SharedObject communication. + * + * @return {PublisherSocketHelper} + * + * @private + */ + + }, { + key: 'getConnection', + value: function getConnection() { + return this._socketHelper; + } + + /** + * Returns the current RTCPeerConnection helper if established. + * + * @return {RTCPeerConnection} + */ + + }, { + key: 'getPeerConnection', + value: function getPeerConnection() { + return this._peerHelper ? this._peerHelper.connection : undefined; + } + + /** + * Returns the `MediaStream` instance if generated through `getUserMedia` and exists for broadcast. + * + * @return {MediaStream} + */ + + }, { + key: 'getMediaStream', + value: function getMediaStream() { + return this._mediaStream; + } + + /** + * Returns reference to playback controls if available. + * + * @return {PlaybackControls} + */ + + }, { + key: 'getControls', + value: function getControls() { + return this._sourceHandler ? this._sourceHandler.getControls() : undefined; + } + + /** + * Returns the target view Element. + * + * @return {Element} + */ + + }, { + key: 'getPlayer', + value: function getPlayer() { + return this._view.view; + } + + /** + * Returns the initialization configuration used in `init()`. + * + * @return {Object} + */ + + }, { + key: 'getOptions', + value: function getOptions() { + return this._options; + } + + /** + * Returns the type of implementation: `RTC`. + * + * @return {String} + */ + + }, { + key: 'getType', + value: function getType() { + return _playback3.PlaybackTypes.RTC.toUpperCase(); + } + }]); + return RTCSubscriber; +}(_controls.PlaybackController); + +exports.default = RTCSubscriber; + +/***/ }), +/* 128 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _promise = __webpack_require__(58); + +var _promise2 = _interopRequireDefault(_promise); + +var _extends2 = __webpack_require__(28); + +var _extends3 = _interopRequireDefault(_extends2); + +var _getPrototypeOf = __webpack_require__(6); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(8); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(7); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _browser = __webpack_require__(4); + +var _browser2 = _interopRequireDefault(_browser); + +var _red5proSourceHandlerRtmp = __webpack_require__(131); + +var _red5proSourceHandlerRtmp2 = _interopRequireDefault(_red5proSourceHandlerRtmp); + +var _playback = __webpack_require__(42); + +var _playback2 = _interopRequireDefault(_playback); + +var _controls = __webpack_require__(24); + +var _event = __webpack_require__(15); + +var _playback3 = __webpack_require__(33); + +var _state = __webpack_require__(34); + +var _promise3 = __webpack_require__(5); + +var _log = __webpack_require__(2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NAME = 'RTMPSubcriber'; + +var defaultOptions = { + protocol: 'rtmp', + port: 1935, + width: 320, // media playback + height: 240, // media playback + embedWidth: '100%', // DOM display style + embedHeight: '100%', // DOM display style + minFlashVersion: '10.0.0', + swf: 'lib/red5pro/red5pro-subscriber.swf', + swfobjectURL: 'lib/swfobject/swfobject.js', + productInstallUrl: 'lib/swfobject/playerProductInstall.swf', + mediaElementId: 'red5pro-subscriber' + + /** + * Main entry for Flash-based Subscriber over RTMP. + * + * @extends EventEmitter + * @extends SubscriberPlaybackController + */ +}; +var RTMPSubscriber = function (_PlaybackController) { + (0, _inherits3.default)(RTMPSubscriber, _PlaybackController); + + function RTMPSubscriber() { + (0, _classCallCheck3.default)(this, RTMPSubscriber); + + var _this = (0, _possibleConstructorReturn3.default)(this, (RTMPSubscriber.__proto__ || (0, _getPrototypeOf2.default)(RTMPSubscriber)).call(this)); + + _this._options = undefined; + _this._view = undefined; + _this._sourceHandler = undefined; + _this._elementId = undefined; + _this._embedPromise = undefined; + _this._getEmbedPromise().then(function () { + _this.onEmbedComplete(); + }).catch(function (err) { + return _this.onEmbedFailure(err); + }); + _this._viewResolver = new _promise3.DeferredPromise(); + _this._subscriptionResolver = new _promise3.DeferredPromise(); + return _this; + } + + (0, _createClass3.default)(RTMPSubscriber, [{ + key: '_getViewResolverPromise', + value: function _getViewResolverPromise() { + return this._viewResolver.promise; + } + }, { + key: '_getSubscriptionResolverPromise', + value: function _getSubscriptionResolverPromise() { + return this._subscriptionResolver.promise; + } + }, { + key: '_getEmbedPromise', + value: function _getEmbedPromise() { + this._embedPromise = _promise3.Future.createIfNotExist(this._embedPromise); + return this._embedPromise.promise; + } + + /** + * Gloms the Playback Controls API onto this instance to provide ease in use. + * + * @param {Object} handler + * The method request handler to bind and forward calls on. + * + * @private + */ + + }, { + key: '_glomSourceHandlerAPI', + value: function _glomSourceHandlerAPI(handler) { + var _this2 = this; + + /* + * || Note || + * play() is not glommed as it needs to be handled differently. + */ + + this.pause = handler.pause.bind(handler); + this.resume = handler.resume.bind(handler); + this.stop = handler.stop.bind(handler); + this.mute = handler.mute.bind(handler); + this.unmute = handler.unmute.bind(handler); + this.setVolume = handler.setVolume.bind(handler); + this.seekTo = handler.seekTo.bind(handler); + this.toggleFullScreen = handler.toggleFullScreen.bind(handler); + handler.on('*', function (event) { + _this2.trigger(new _event.SubscriberEvent(event.type, _this2, event.data)); + }); + } + + /** + * Still in use, but hold-over of previous 3.x SDK versions designed to pair views and subscribers. In 4.0.0 it has been internalized. + * API deprecated. + * + * @private + */ + + }, { + key: '_setViewIfNotExist', + value: function _setViewIfNotExist(currentView) { + var mediaElementId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; + + if (typeof currentView === 'undefined' && mediaElementId !== undefined) { + var view = new _playback2.default(mediaElementId); + view.attachSubscriber(this); + } + } + + /** + * Define global function handlers for ExternalInterface to invoke for API communication. + * + * @private + */ + + }, { + key: '_establishExtIntHandlers', + value: function _establishExtIntHandlers(id) { + var _this3 = this; + + (0, _log.debug)(NAME, 'Subscriber ID provided to client: (' + id + ').'); + var invokeFn = function invokeFn(label) { + return ['subscriber', label, id.split('-').join('_')].join('_'); + }; + window[invokeFn('r5proConnectClosed')] = function () { + return _this3.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.CONNECTION_CLOSED, _this3)); + }; + window[invokeFn('r5proConnectSuccess')] = function () { + return _this3.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.CONNECT_SUCCESS, _this3)); + }; + window[invokeFn('r5proConnectFailure')] = function () { + _this3.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.CONNECT_FAILURE, _this3)); + }; + window[invokeFn('r5proSubscribeStop')] = function () { + return _this3.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.SUBSCRIBE_STOP, _this3)); + }; + window[invokeFn('r5proSubscribeMetadata')] = function (metadata) { + return _this3.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.SUBSCRIBE_METADATA, _this3, JSON.parse(metadata))); + }; + window[invokeFn('r5proSubscribeUnpublish')] = function () { + return _this3.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.PLAY_UNPUBLISH, _this3)); + }; + window[invokeFn('r5proSubscribeSendInvoke')] = function (payload) { + _this3.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.SUBSCRIBE_SEND_INVOKE, _this3, typeof payload === 'string' ? JSON.parse(payload) : payload)); + }; + window[invokeFn('r5proSubscribePlayRequest')] = function () { + _this3.play(); + }; + window[invokeFn('r5proSubscribeStart')] = function () { + _this3._subscriptionResolver.resolve(_this3); + _this3.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.SUBSCRIBE_START, _this3)); + }; + window[invokeFn('r5proSubscribeInvalidName')] = function () { + _this3._subscriptionResolver.reject('NetStream.Play.StreamNotFound', _this3); + _this3.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.SUBSCRIBE_INVALID_NAME, _this3)); + }; + window[invokeFn('r5proSubscribeFail')] = function () { + _this3._subscriptionResolver.reject('NetStream.Failed', _this3); + _this3.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.SUBSCRIBE_FAIL, _this3)); + }; + window[invokeFn('r5proSubscribeVolumeChange')] = function (payload) { + _this3.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.VOLUME_CHANGE, _this3, { + volume: JSON.parse(payload).volume + })); + }; + window[invokeFn('r5proSubscribePlaybackTimeChange')] = function (payload) { + var data = JSON.parse(payload); + _this3.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.PLAYBACK_TIME_UPDATE, _this3, { + time: data.value, + duration: data.duration + })); + }; + window[invokeFn('r5proSubscribePlaybackStateChange')] = function (payload) { + var code = JSON.parse(payload).code; + _this3.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.PLAYBACK_STATE_CHANGE, _this3, { + code: code, + state: _state.PlaybackStateReadable[code] + })); + }; + } + + /** + * Request to initialize the HLS-based Subscriber based on configuration. + * The returned `Promise` will either resolve with a reference to this instance or reject with an error `String` in failure. + * + * @param {Object} options + * The initialization configuration map. + * @return {Promise} + */ + + }, { + key: 'init', + value: function init(options) { + var _this4 = this; + + var deferred = new _promise3.DeferredPromise(); + var version = options.minFlashVersion || defaultOptions.minFlashVersion; + if (!_browser2.default.supportsFlashVersion(version)) { + (0, _log.warn)(NAME, 'Could not resolve RTMPSubscriber instance. Requires minimum Flash Player install of ' + version + '.'); + deferred.reject('Could not resolve RTMPSubscriber instance. Requires minimum Flash Player install of ' + version + '.'); + } else { + this._options = (0, _extends3.default)({}, defaultOptions, options); + var establishSourceHandler = function establishSourceHandler() { + _this4._getViewResolverPromise().then(function (view) { + _this4._sourceHandler = new _red5proSourceHandlerRtmp2.default(_this4, view.view, _this4.getType()); + _this4._glomSourceHandlerAPI(_this4._sourceHandler); + if (_this4._options) { + var dfd = _this4._embedPromise; + _this4._sourceHandler.addSource(_this4._elementId, _this4._options).then(function (subscriberId) { + _this4._establishExtIntHandlers(subscriberId); + dfd.resolve(_this4); + }).catch(function (err) { + return dfd.reject(err); + }); + } + }); + }; + + try { + _browser2.default.injectScript(this._options.swfobjectURL).then(function () { + var embedDfd = _this4._embedPromise; + (0, _log.debug)(NAME, 'SWFObject embedded.'); + if (_this4._sourceHandler) { + _this4._sourceHandler.addSource(_this4._elementId, _this4._options).then(function (subscriberId) { + _this4._establishExtIntHandlers(subscriberId); + embedDfd.resolve(_this4); + }).catch(function (err) { + embedDfd.reject(err); + }); + return _this4._getEmbedPromise(); + } + establishSourceHandler(); + return true; + }).then(function () { + _this4._setViewIfNotExist(_this4._view, _this4._options.mediaElementId); + deferred.resolve(_this4); + }).catch(function (err) { + (0, _log.error)(NAME, 'Could not embed Flash-based RTMP Player. Reason: ' + err); + if (_this4._sourceHandler) { + _this4._sourceHandler.disconnect(); + } + deferred.reject(err); + _this4.trigger(new _event.SubscriberEvent(_event.RTMPSubscriberEventTypes.EMBED_FAILURE, _this4)); + }); + } catch (e) { + deferred.reject('Could not inject Flash-based Player into the page. Reason: ' + e.message); + this.trigger(new _event.SubscriberEvent(_event.RTMPSubscriberEventTypes.EMBED_FAILURE, this)); + } + } + return deferred.promise; + } + + /** + * Still in use for assigning document element view management to this instance. + * API deprecated in 4.0.0. + * + * @private + */ + + }, { + key: 'setView', + value: function setView(view, elementId) { + this._view = view; + this._elementId = elementId; + this._viewResolver.resolve(this._view); + return this; + } + + /** + * Request to begin subscribing to a stream. + * + * @return {Promise} + * The returned `Promise` will resolve or reject on successful start of playback. + */ + + }, { + key: 'subscribe', + value: function subscribe() { + return this._getSubscriptionResolverPromise(); + } + + /** + * Request to stop a subscription. + * The returned `Promise` will either resolve or reject on successful stop of subscription. + * + * @return {Promise} + */ + + }, { + key: 'unsubscribe', + value: function unsubscribe() { + var _this5 = this; + + (0, _log.debug)(NAME, '[unsubscribe]'); + var cb = function cb(resolve, reject) { + try { + _this5._sourceHandler.disconnect(); + resolve(); + } catch (e) { + reject(e.message); + } + }; + return new _promise2.default(cb); + } + + /** + * Request to start playing the stream. + */ + + }, { + key: 'play', + value: function play() { + var _this6 = this; + + (0, _log.debug)(NAME, '[play]'); + this._getEmbedPromise().then(function () { + _this6._sourceHandler.play(); + }); + } + + /** + * Event handler for completion of embedding Flash element into page. + * + * @private + */ + + }, { + key: 'onEmbedComplete', + value: function onEmbedComplete() { + (0, _log.debug)(NAME, '[embed:complete]'); + this.trigger(new _event.SubscriberEvent(_event.RTMPSubscriberEventTypes.EMBED_SUCCESS, this)); + } + + /** + * Event handler for failure in embedding Flash element into page. + * + * @private + */ + + }, { + key: 'onEmbedFailure', + value: function onEmbedFailure(err) { + (0, _log.debug)(NAME, '[embed:failure] - ' + err); + this.trigger(new _event.SubscriberEvent(_event.RTMPSubscriberEventTypes.EMBED_FAILURE, this)); + } + + /** + * Returns connection handler for playback. + * + * @return {Object} + */ + + }, { + key: 'getConnection', + value: function getConnection() { + return this._sourceHandler; + } + + /** + * Returns reference to playback controls if available. + * + * @return {PlaybackControls} + */ + + }, { + key: 'getControls', + value: function getControls() { + return this._sourceHandler ? this._sourceHandler.getControls() : undefined; + } + + /** + * Returns the initialization configuration used in `init()`. + * + * @return {Object} + */ + + }, { + key: 'getOptions', + value: function getOptions() { + return this._options; + } + + /** + * Returns the target view Element. + * + * @return {Element} + */ + + }, { + key: 'getPlayer', + value: function getPlayer() { + return this._sourceHandler ? this._sourceHandler.getEmbeddedView() : undefined; + } + + /** + * Returns the type of implementation: `RTMP`. + * + * @return {String} + */ + + }, { + key: 'getType', + value: function getType() { + return _playback3.PlaybackTypes.RTMP.toUpperCase(); + } + }]); + return RTMPSubscriber; +}(_controls.PlaybackController); + +exports.default = RTMPSubscriber; + +/***/ }), +/* 129 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _stringify = __webpack_require__(12); + +var _stringify2 = _interopRequireDefault(_stringify); + +var _isFinite = __webpack_require__(89); + +var _isFinite2 = _interopRequireDefault(_isFinite); + +var _getPrototypeOf = __webpack_require__(6); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(8); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(7); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _browser = __webpack_require__(4); + +var _browser2 = _interopRequireDefault(_browser); + +var _translationUtil = __webpack_require__(78); + +var _object = __webpack_require__(41); + +var _controls = __webpack_require__(24); + +var _state = __webpack_require__(34); + +var _event = __webpack_require__(15); + +var _promise = __webpack_require__(5); + +var _log = __webpack_require__(2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NAME = 'HLSSourceHandler'; + +/** + * Source Handler for HLS-based Subscribers, which serves as a Presentation Controller between view and subscriber. + * + * @extends EventEmitter + * @extends SubscriberPlaybackController + * + * @private + */ + +var HLSSourceHandler = function (_PlaybackController) { + (0, _inherits3.default)(HLSSourceHandler, _PlaybackController); + + function HLSSourceHandler(media, type) { + (0, _classCallCheck3.default)(this, HLSSourceHandler); + + var _this = (0, _possibleConstructorReturn3.default)(this, (HLSSourceHandler.__proto__ || (0, _getPrototypeOf2.default)(HLSSourceHandler)).call(this)); + + _this.media = media; + _this.clone = _this.media.cloneNode(true); + _this.holder = _this._determineHolder(media); + _this.playerType = type; + _this._isVOD = false; + _this._controls = undefined; + _this._playbackNotificationCenter = _this.media; + _browser2.default.onFullScreenStateChange(_this._handleFullScreenChange.bind(_this)); + return _this; + } + + /** + * Established DOM Element order for playback. + * + * @param {Element} media + * The target media element: e.g., `video` or `audio`. + * + * @private + */ + + + (0, _createClass3.default)(HLSSourceHandler, [{ + key: '_determineHolder', + value: function _determineHolder(media) { + if (media.parentNode.classList.contains('red5pro-media-container')) { + return media.parentNode; + } else { + var parent = media.parentNode; + var div = _browser2.default.createElement('div'); + div.classList.add('red5pro-media-container'); + parent.insertBefore(div, media); + parent.removeChild(media); + div.appendChild(media); + return div; + } + } + + /** + * Clean up of DOM Element order upon stop of playback. + * + * @private + */ + + }, { + key: '_cleanUp', + value: function _cleanUp() { + // Return to prior DOM manipulation. + this.media.remove(); + this.media = this.clone.cloneNode(true); + this.holder.appendChild(this.media); + if (this._controls) { + this._controls.detach(); + } + } + + /** + * Assigns and handlers event notificiations coming from the media notifier (e.g., `video` or `audio` element). + * + * @param {Object} notifier + * + * @private + */ + + }, { + key: '_addPlaybackHandlers', + value: function _addPlaybackHandlers(notifier) { + var _this2 = this; + + var controls = this.getControls(); + var hasControls = typeof controls !== 'undefined'; + + notifier.oncanplay = function () { + if (controls) { + controls.enable(true); + } + _this2.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.PLAYBACK_STATE_CHANGE, undefined, { + code: _state.PlaybackState.AVAILABLE, + state: _state.PlaybackStateReadable[_state.PlaybackState.AVAILABLE] + })); + _this2.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.VOLUME_CHANGE, undefined, { + volume: notifier.volume + })); + }; + notifier.ondurationchange = function (event) { + // eslint-disable-line no-unused-vars + if (!isNaN(notifier.duration) && (0, _isFinite2.default)(notifier.duration)) { + _this2.isVOD = true; + } + if (hasControls) { + controls.setPlaybackDuration(notifier.duration); + } + }; + notifier.onended = function () { + (0, _log.debug)(NAME, '[videoelement:onended]'); + if (hasControls) { + controls.setState(_state.PlaybackState.IDLE); + } + _this2.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.PLAYBACK_STATE_CHANGE, undefined, { + code: _state.PlaybackState.IDLE, + state: _state.PlaybackStateReadable[_state.PlaybackState.IDLE] + })); + }; + notifier.ontimeupdate = function (event) { + // eslint-disable-line no-unused-vars + if (hasControls) { + controls.setSeekTime(notifier.currentTime, self.isVOD ? notifier.duration : undefined); + } + _this2.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.PLAYBACK_TIME_UPDATE, undefined, { + time: notifier.currentTime, + duration: notifier.duration + })); + }; + notifier.onseeked = function (event) {// eslint-disable-line no-unused-vars + // debug(NAME, 'Seeked.') + }; + notifier.onseeking = function (event) {// eslint-disable-line no-unused-vars + // debug(NAME, 'Seeking.') + }; + notifier.onplay = function () { + if (hasControls) { + controls.setState(_state.PlaybackState.PLAYING); + } + _this2.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.PLAYBACK_STATE_CHANGE, undefined, { + code: _state.PlaybackState.PLAYING, + state: _state.PlaybackStateReadable[_state.PlaybackState.PLAYING] + })); + }; + notifier.onpause = function () { + if (hasControls) { + controls.setState(_state.PlaybackState.PAUSED); + } + _this2.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.PLAYBACK_STATE_CHANGE, undefined, { + code: _state.PlaybackState.PAUSED, + state: _state.PlaybackStateReadable[_state.PlaybackState.PAUSED] + })); + }; + notifier.onvolumechange = function (event) { + // eslint-disable-line no-unused-vars + if (hasControls && controls.getVolume() !== _this2.media.volume) { + controls.setVolume(_this2.media.volume); + } + _this2.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.VOLUME_CHANGE, undefined, { + volume: notifier.muted ? 0 : notifier.volume + })); + }; + // for debugging purposes. + notifier.onencrypted = function () { + (0, _log.debug)(NAME, '[videoelement:event] encrypted'); + }; + notifier.onemptied = function () { + (0, _log.debug)(NAME, '[videoelement:event] emptied'); + }; + notifier.onloadeddata = function () { + (0, _log.debug)(NAME, '[videoelement:event] loadeddata'); + }; + notifier.onloadedmetadata = function () { + (0, _log.debug)(NAME, '[videoelement:event] loadedmetadata'); + }; + notifier.onloadstart = function () { + (0, _log.debug)(NAME, '[videoelement:event] loadedstart'); + }; + notifier.onstalled = function () { + (0, _log.debug)(NAME, '[videoelement:event] stalled'); + }; + notifier.onsuspend = function () { + (0, _log.debug)(NAME, '[videoelement:event] suspend'); + }; + notifier.onwaiting = function () { + (0, _log.debug)(NAME, '[videoelement:event] waiting'); + }; + // notifier.onprogress = () => { debug(NAME, '[videoelement:event] progress. Played: ' + notifier.played.length + ', Buffered: ' + notifier.buffered.length + '.') } + } + + /** + * Event handler for change in fullscreen state. + * + * @param {Boolean} isFullScreen + * + * @private + */ + + }, { + key: '_handleFullScreenChange', + value: function _handleFullScreenChange(isFullScreen) { + if (isFullScreen) { + this.holder.classList.add('red5pro-media-container-full-screen'); + this.media.classList.add('red5pro-media-container-full-screen'); + } else { + this.holder.classList.remove('red5pro-media-container-full-screen'); + this.media.classList.remove('red5pro-media-container-full-screen'); + } + this.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.FULL_SCREEN_STATE_CHANGE, undefined, isFullScreen)); + } + + /** + * Define the source element on the HLS playback element. + * + * @param {String} url + * The playback endpoint URL. + * @param {String} type + * The mime type of the playback stream. + * @param {Object} options + * The initialization configuration map. + * + * @private + */ + + }, { + key: '_embedMediaSource', + value: function _embedMediaSource(url, type, options) { + // eslint-disable-line no-unused-vars + var self = this; + var deferred = new _promise.DeferredPromise(); + try { + var source = _browser2.default.createElement('source'); + source.type = type; + source.src = url; + if (this.media.firstChild) { + this.media.insertBefore(source, this.media.firstChild); + } else { + this.media.appendChild(source); + } + self.orientation = 0; + _browser2.default.onOrientationMetadata(this.media, function (metadata) { + (0, _log.debug)(NAME, 'Metadata received: ' + (0, _stringify2.default)(metadata, null, 2)); + if (self.orientation !== metadata.orientation) { + self.orientation = metadata.orientation; + if (options.autoLayoutOrientation) { + (0, _translationUtil.applyOrientation)(self.media, parseInt(metadata.orientation, 10), (0, _object.metadataResolutionToObject)(metadata.resolution)); + self.handleOrientationChange(parseInt(self.orientation)); + } + self.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.ORIENTATION_CHANGE, undefined, { + orientation: parseInt(self.orientation), + viewElement: self.media + })); + self.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.SUBSCRIBE_METADATA, undefined, metadata)); + } + self.orientation = metadata.orientation; + }); + deferred.resolve(); + } catch (e) { + deferred.reject(e.message); + } + return deferred.promise; + } + + /** + * Request to setup the presentation of a playback stream using HLS. + * + * @param {String} url + * The endpoint URL for playback. + * @param {String} type + * The mime type for playback. + * @param {Object} options + * The initialization configuration map. + * + * @returns {Promise} + */ + + }, { + key: 'addSource', + value: function addSource(url, type, options) { + var _this3 = this; + + (0, _log.debug)(NAME, '[addsource]'); + var deferred = new _promise.DeferredPromise(); + var hasDefinedControls = options.controls; + var isMuted = _browser2.default.hasAttributeDefined(this.media, 'muted'); + var usePlaybackControls = _browser2.default.hasAttributeDefined(this.media, 'controls') && _browser2.default.hasClassDefined(this.media, 'red5pro-media'); + this._embedMediaSource(url, type, options).then(function () { + if (hasDefinedControls || usePlaybackControls) { + if (hasDefinedControls) { + _this3._controls = options.controls; + } else { + _this3._controls = new _controls.PlaybackControlsImpl(_this3, _this3.holder); + } + _this3.media.controls = false; + _this3._controls.setAsVOD(_this3.isVOD); + _this3._controls.setMutedState(isMuted); + } + _this3._addPlaybackHandlers(_this3._playbackNotificationCenter); + deferred.resolve(); + }).catch(function (e) { + return deferred.reject(e); + }); + return deferred.promise; + } + + /** + * Request to connect to stream. + */ + + }, { + key: 'connect', + value: function connect() { + (0, _log.debug)(NAME, '[connect]'); + } + }, { + key: 'play', + value: function play() { + (0, _log.debug)(NAME, '[videoelement:action] play'); + try { + var maybePromise = this.media.play(); + if (maybePromise) { + maybePromise.then(function () { + return (0, _log.debug)(NAME, '[videoelement:action] play (START)'); + }).catch(function (err) { + return (0, _log.error)(NAME, '[videoelement:action] play (FAULT) ' + (err.message ? err.message : err)); + }); + } + } catch (e) { + (0, _log.error)(NAME, '[videoelement:action] play (FAULT) - ' + e.message); + } + } + }, { + key: 'pause', + value: function pause() { + (0, _log.debug)(NAME, '[videoelement:action] pause'); + try { + this.media.pause(); + } catch (e) { + (0, _log.debug)(NAME, '[videoelement:action] pause (FAULT) - ' + e.message); + } + } + }, { + key: 'resume', + value: function resume() { + (0, _log.debug)(NAME, '[videoelement:action] resume'); + try { + var maybePromise = this.media.play(); + if (maybePromise) { + maybePromise.then(function () { + return (0, _log.debug)(NAME, '[videoelement:action] play (START)'); + }).catch(function (err) { + return (0, _log.error)(NAME, '[videoelement:action] play (FAULT) ' + (err.message ? err.message : err)); + }); + } + } catch (e) { + (0, _log.error)(NAME, '[videoelement:action] resume (FAULT) - ' + e.message); + } + } + }, { + key: 'stop', + value: function stop() { + try { + this.media.stop(); + } catch (e) { + // ok. + } + } + }, { + key: 'mute', + value: function mute() { + this.media.muted = true; + } + }, { + key: 'unmute', + value: function unmute() { + this.media.muted = false; + } + }, { + key: 'setVolume', + value: function setVolume(value) { + this.unmute(); + this.media.volume = value; + } + }, { + key: 'seekTo', + value: function seekTo(percentage) { + var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; + + this.media.currentTime = duration ? percentage * duration : percentage; + } + }, { + key: 'toggleFullScreen', + value: function toggleFullScreen() { + try { + _browser2.default.toggleFullScreen(this.holder); + } catch (e) { + throw e; + // nada. + } + } + + /** + * Notification of current stream being in an unpublished state. + * The stream enters an unpublished state when the broadcaster stop the stream and the subscriber is still connected. + */ + + }, { + key: 'unpublish', + value: function unpublish() { + try { + this.stop(); + this.media.onended.call(this.media); + } catch (e) { + // nada. + } + } + + /** + * Request to disconnect playback. + */ + + }, { + key: 'disconnect', + value: function disconnect() { + (0, _log.debug)(NAME, '[disconnect]'); + this._cleanUp(); + } + + /** + * Responder to change in orientation received through metadata. + * + * @param {Number} orientation + * The orientation value. + * + * @private + */ + + }, { + key: 'handleOrientationChange', + value: function handleOrientationChange(orientation) { + if (this._controls && orientation % 180 !== 0) { + this.holder.classList.add('red5pro-media-background'); + this.media.classList.remove('red5pro-media-background'); + } + } + + /* + * || SHARED OBJECT INTEGRATION NOT AVAILABLE FOR HLS PLAYBACK || + */ + // eslint-disable-next-line no-unused-vars + + }, { + key: 'addSharedObjectResponseHandler', + value: function addSharedObjectResponseHandler(handler) {} + + // eslint-disable-next-line no-unused-vars + + }, { + key: 'removeSharedObjectResponseHandler', + value: function removeSharedObjectResponseHandler(handler) {} + + // eslint-disable-next-line no-unused-vars + + }, { + key: 'sendToSharedObject', + value: function sendToSharedObject(name, callName, message) {} + + // eslint-disable-next-line no-unused-vars + + }, { + key: 'sendPropertyToSharedObject', + value: function sendPropertyToSharedObject(name, key, value) {} + + // eslint-disable-next-line no-unused-vars + + }, { + key: 'getRemoteSharedObject', + value: function getRemoteSharedObject(sharedObjectName) {} + + // eslint-disable-next-line no-unused-vars + + }, { + key: 'connectToSharedObject', + value: function connectToSharedObject(sharedObjectName) {} + + // eslint-disable-next-line no-unused-vars + + }, { + key: 'closeSharedObject', + value: function closeSharedObject(sharedObjectName) {} + + /** + * Returns playback controls if available. + * + * @returns {PlaybackControls} + */ + + }, { + key: 'getControls', + value: function getControls() { + return this._controls; + } + + /** + * Returns the subscriber type associated with this controller. + * + * @returns {String} + */ + + }, { + key: 'getType', + value: function getType() { + return this.playerType; + } + + /** + * Returns flag of video being recognized as VOD (Video On Demand). + * + * @returns {Boolean} + */ + + }, { + key: 'isVOD', + get: function get() { + return this._isVOD; + } + + /** + * Sets flag of video being considered as VOD (Video On Demand). + * + * @param {Boolean} value + */ + , + set: function set(value) { + this._isVOD = value; + if (this._controls) { + this._controls.setAsVOD(value); + } + } + }]); + return HLSSourceHandler; +}(_controls.PlaybackController); + +exports.default = HLSSourceHandler; + +/***/ }), +/* 130 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _isFinite = __webpack_require__(89); + +var _isFinite2 = _interopRequireDefault(_isFinite); + +var _getPrototypeOf = __webpack_require__(6); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(8); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(7); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _browser = __webpack_require__(4); + +var _browser2 = _interopRequireDefault(_browser); + +var _controls = __webpack_require__(24); + +var _state = __webpack_require__(34); + +var _event = __webpack_require__(15); + +var _promise = __webpack_require__(5); + +var _log = __webpack_require__(2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NAME = 'RTCSourceHandler'; + +/** + * Source Handler for WebRTC-based Subscribers, which serves as a Presentation Controller between view and subscriber. + * + * @extends EventEmitter + * @extends SubscriberPlaybackController + * + * @private + */ + +var RTCSourceHandler = function (_PlaybackController) { + (0, _inherits3.default)(RTCSourceHandler, _PlaybackController); + + function RTCSourceHandler(media, type) { + (0, _classCallCheck3.default)(this, RTCSourceHandler); + + var _this = (0, _possibleConstructorReturn3.default)(this, (RTCSourceHandler.__proto__ || (0, _getPrototypeOf2.default)(RTCSourceHandler)).call(this)); + + _this.media = media; + _this.clone = _this.media.cloneNode(true); + _this.holder = _this._determineHolder(_this.media); + _this.playerType = type; + _this._isVOD = false; + _this._controls = undefined; + _this._playbackNotificationCenter = _this.media; + _browser2.default.onFullScreenStateChange(_this._handleFullScreenChange.bind(_this)); + return _this; + } + + /** + * Established DOM Element order for playback. + * + * @param {Element} media + * The target media element: e.g., `video` or `audio`. + * + * @private + */ + + + (0, _createClass3.default)(RTCSourceHandler, [{ + key: '_determineHolder', + value: function _determineHolder(media) { + if (media.parentNode.classList.contains('red5pro-media-container')) { + return media.parentNode; + } else { + var parent = media.parentNode; + var div = _browser2.default.createElement('div'); + div.classList.add('red5pro-media-container'); + parent.insertBefore(div, media); + parent.removeChild(media); + div.appendChild(media); + return div; + } + } + + /** + * Established DOM Element order for playback. + * + * @param {Element} media + * The target media element: e.g., `video` or `audio`. + * + * @private + */ + + }, { + key: '_cleanUp', + value: function _cleanUp() { + // Return to prior DOM manipulation. + this.media.remove(); + this.media = this.clone.cloneNode(true); + this.holder.appendChild(this.media); + if (this._controls) { + this._controls.detach(); + } + } + + /** + * Assigns and handlers event notificiations coming from the media notifier (e.g., `video` or `audio` element). + * + * @param {Object} notifier + * + * @private + */ + + }, { + key: '_addPlaybackHandlers', + value: function _addPlaybackHandlers(notifier) { + var _this2 = this; + + var controls = this.getControls(); + var hasControls = typeof controls !== 'undefined'; + + notifier.oncanplay = function () { + (0, _log.debug)(NAME, '[videoelement:event] canplay'); + if (controls) { + controls.enable(true); + } + _this2.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.PLAYBACK_STATE_CHANGE, undefined, { + code: _state.PlaybackState.AVAILABLE, + state: _state.PlaybackStateReadable[_state.PlaybackState.AVAILABLE] + })); + _this2.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.VOLUME_CHANGE, undefined, { + volume: notifier.volume + })); + }; + notifier.ondurationchange = function (event) { + // eslint-disable-line no-unused-vars + (0, _log.debug)(NAME, '[videoelement:event] durationchange'); + if (!isNaN(notifier.duration) && (0, _isFinite2.default)(notifier.duration)) { + _this2.isVOD = true; + } + if (hasControls) { + controls.setPlaybackDuration(notifier.duration); + } + }; + notifier.onended = function () { + (0, _log.debug)(NAME, '[videoelement:event] ended'); + if (hasControls) { + controls.setState(_state.PlaybackState.IDLE); + } + _this2.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.PLAYBACK_STATE_CHANGE, undefined, { + code: _state.PlaybackState.IDLE, + state: _state.PlaybackStateReadable[_state.PlaybackState.IDLE] + })); + }; + notifier.ontimeupdate = function (event) { + // eslint-disable-line no-unused-vars + if (hasControls) { + controls.setSeekTime(notifier.currentTime, self.isVOD ? notifier.duration : undefined); + } + _this2.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.PLAYBACK_TIME_UPDATE, undefined, { + time: notifier.currentTime, + duration: notifier.duration + })); + }; + notifier.onseeked = function (event) {// eslint-disable-line no-unused-vars + // debug(NAME, 'Seeked.') + }; + notifier.onseeking = function (event) {// eslint-disable-line no-unused-vars + // debug(NAME, 'Seeking.') + }; + notifier.onplay = function () { + (0, _log.debug)(NAME, '[videoelement:event] play'); + if (hasControls) { + controls.setState(_state.PlaybackState.PLAYING); + } + _this2.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.PLAYBACK_STATE_CHANGE, undefined, { + code: _state.PlaybackState.PLAYING, + state: _state.PlaybackStateReadable[_state.PlaybackState.PLAYING] + })); + }; + notifier.onpause = function () { + (0, _log.debug)(NAME, '[videoelement:event] pause'); + if (hasControls) { + controls.setState(_state.PlaybackState.PAUSED); + } + _this2.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.PLAYBACK_STATE_CHANGE, undefined, { + code: _state.PlaybackState.PAUSED, + state: _state.PlaybackStateReadable[_state.PlaybackState.PAUSED] + })); + }; + notifier.onvolumechange = function (event) { + // eslint-disable-line no-unused-vars + if (hasControls && controls.getVolume() !== _this2.media.volume) { + controls.setVolume(_this2.media.volume); + } + _this2.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.VOLUME_CHANGE, undefined, { + volume: notifier.muted ? 0 : notifier.volume + })); + }; + // for debugging purposes. + notifier.onencrypted = function () { + (0, _log.debug)(NAME, '[videoelement:event] encrypted'); + }; + notifier.onemptied = function () { + (0, _log.debug)(NAME, '[videoelement:event] emptied'); + }; + notifier.onloadeddata = function () { + (0, _log.debug)(NAME, '[videoelement:event] loadeddata'); + }; + notifier.onloadedmetadata = function () { + (0, _log.debug)(NAME, '[videoelement:event] loadedmetadata'); + }; + notifier.onloadstart = function () { + (0, _log.debug)(NAME, '[videoelement:event] loadedstart'); + }; + notifier.onstalled = function () { + (0, _log.debug)(NAME, '[videoelement:event] stalled'); + }; + notifier.onsuspend = function () { + (0, _log.debug)(NAME, '[videoelement:event] suspend'); + }; + notifier.onwaiting = function () { + (0, _log.debug)(NAME, '[videoelement:event] waiting'); + }; + // notifier.onprogress = () => { debug(NAME, '[videoelement:event] progress. Played: ' + notifier.played.length + ', Buffered: ' + notifier.buffered.length + '.') } + } + + /** + * Event handler for change in fullscreen state. + * + * @param {Boolean} isFullScreen + * + * @private + */ + + }, { + key: '_handleFullScreenChange', + value: function _handleFullScreenChange(isFullScreen) { + if (isFullScreen) { + this.holder.classList.add('red5pro-media-container-full-screen'); + this.media.classList.add('red5pro-media-container-full-screen'); + } else { + this.holder.classList.remove('red5pro-media-container-full-screen'); + this.media.classList.remove('red5pro-media-container-full-screen'); + } + this.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.FULL_SCREEN_STATE_CHANGE, undefined, isFullScreen)); + } + + /** + * Request to setup the presentation of a playback stream using WebRTC. + * + * @param {Object} options + * The initialization configuration map. + * + * @returns {Promise} + */ + + }, { + key: 'addSource', + value: function addSource(options) { + (0, _log.debug)(NAME, '[addsource]'); + var deferred = new _promise.DeferredPromise(); + var hasDefinedControls = options.controls; + var isMuted = _browser2.default.hasAttributeDefined(this.media, 'muted'); + var usePlaybackControls = _browser2.default.hasAttributeDefined(this.media, 'controls') && _browser2.default.hasClassDefined(this.media, 'red5pro-media'); + if (hasDefinedControls || usePlaybackControls) { + if (hasDefinedControls) { + this._controls = options.controls; + } else { + this._controls = new _controls.PlaybackControlsImpl(this, this.holder); + } + this.media.controls = false; + this._controls.setAsVOD(this.isVOD); + this._controls.setMutedState(isMuted); + } + this._addPlaybackHandlers(this._playbackNotificationCenter); + deferred.resolve(); + return deferred.promise; + } + + /** + * Request to connect to stream. + */ + + }, { + key: 'connect', + value: function connect() { + (0, _log.debug)(NAME, '[connect]'); + } + }, { + key: 'play', + value: function play() { + (0, _log.debug)(NAME, '[videoelement:action] play'); + try { + var maybePromise = this.media.play(); + if (maybePromise) { + maybePromise.then(function () { + return (0, _log.debug)(NAME, '[videoelement:action] play (START)'); + }).catch(function (err) { + return (0, _log.error)(NAME, '[videoelement:action] play (FAULT) ' + (err.message ? err.message : err)); + }); + } + } catch (e) { + (0, _log.error)(NAME, '[videoelement:action] play (FAULT) - ' + e.message); + } + } + }, { + key: 'pause', + value: function pause() { + (0, _log.debug)(NAME, '[videoelement:action] pause'); + try { + this.media.pause(); + } catch (e) { + (0, _log.error)(NAME, '[videoelement:action] pause (FAULT) - ' + e.message); + } + } + }, { + key: 'resume', + value: function resume() { + (0, _log.debug)(NAME, '[videoelement:action] resume'); + try { + var maybePromise = this.media.play(); + if (maybePromise) { + maybePromise.then(function () { + return (0, _log.debug)(NAME, '[videoelement:action] play (START)'); + }).catch(function (err) { + return (0, _log.error)(NAME, '[videoelement:action] play (FAULT) ' + (err.message ? err.message : err)); + }); + } + } catch (e) { + (0, _log.error)(NAME, '[videoelement:action] resume (FAULT) - ' + e.message); + } + } + }, { + key: 'stop', + value: function stop() { + (0, _log.debug)(NAME, '[videoelement:action] stop'); + try { + this.media.stop(); + } catch (e) { + // ok. + } + } + }, { + key: 'mute', + value: function mute() { + this.media.muted = true; + } + }, { + key: 'unmute', + value: function unmute() { + this.media.muted = false; + } + }, { + key: 'setVolume', + value: function setVolume(value) { + this.unmute(); + this.media.volume = value; + } + }, { + key: 'seekTo', + value: function seekTo(percentage) { + var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; + + this.media.currentTime = duration ? percentage * duration : percentage; + } + }, { + key: 'toggleFullScreen', + value: function toggleFullScreen() { + try { + _browser2.default.toggleFullScreen(this.holder); + } catch (e) { + throw e; + // nada. + } + } + + /** + * Notification of current stream being in an unpublished state. + * The stream enters an unpublished state when the broadcaster stop the stream and the subscriber is still connected. + */ + + }, { + key: 'unpublish', + value: function unpublish() { + try { + this.stop(); + this.media.onended.call(this.media); + } catch (e) { + // nada. + } + } + + /** + * Request to disconnect playback. + */ + + }, { + key: 'disconnect', + value: function disconnect() { + (0, _log.debug)(NAME, '[disconnect]'); + this._cleanUp(); + } + + /** + * Responder to change in orientation received through metadata. + * + * @param {Number} orientation + * The orientation value. + * + * @private + */ + + }, { + key: 'handleOrientationChange', + value: function handleOrientationChange(orientation) { + if (this._controls && orientation % 180 !== 0) { + this.holder.classList.add('red5pro-media-background'); + this.media.classList.remove('red5pro-media-background'); + } + } + + /* + * || SHARED OBJECT INTEGRATION NOT AVAILABLE FOR HLS PLAYBACK || + */ + // eslint-disable-next-line no-unused-vars + + }, { + key: 'addSharedObjectResponseHandler', + value: function addSharedObjectResponseHandler(handler) {} + + // eslint-disable-next-line no-unused-vars + + }, { + key: 'removeSharedObjectResponseHandler', + value: function removeSharedObjectResponseHandler(handler) {} + + // eslint-disable-next-line no-unused-vars + + }, { + key: 'sendToSharedObject', + value: function sendToSharedObject(name, callName, message) {} + + // eslint-disable-next-line no-unused-vars + + }, { + key: 'sendPropertyToSharedObject', + value: function sendPropertyToSharedObject(name, key, value) {} + + // eslint-disable-next-line no-unused-vars + + }, { + key: 'getRemoteSharedObject', + value: function getRemoteSharedObject(sharedObjectName) {} + + // eslint-disable-next-line no-unused-vars + + }, { + key: 'connectToSharedObject', + value: function connectToSharedObject(sharedObjectName) {} + + // eslint-disable-next-line no-unused-vars + + }, { + key: 'closeSharedObject', + value: function closeSharedObject(sharedObjectName) {} + + /** + * Returns playback controls if available. + * + * @returns {PlaybackControls} + */ + + }, { + key: 'getControls', + value: function getControls() { + return this._controls; + } + + /** + * Returns the subscriber type associated with this controller. + * + * @returns {String} + */ + + }, { + key: 'getType', + value: function getType() { + return this.playerType; + } + + /** + * Returns flag of video being recognized as VOD (Video On Demand). + * + * @returns {Boolean} + */ + + }, { + key: 'isVOD', + get: function get() { + return this._isVOD; + } + + /** + * Sets flag of video being considered as VOD (Video On Demand). + * + * @param {Boolean} value + */ + , + set: function set(value) { + this._isVOD = value; + if (this._controls) { + this._controls.setAsVOD(value); + } + } + }]); + return RTCSourceHandler; +}(_controls.PlaybackController); + +exports.default = RTCSourceHandler; + +/***/ }), +/* 131 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _stringify = __webpack_require__(12); + +var _stringify2 = _interopRequireDefault(_stringify); + +var _getPrototypeOf = __webpack_require__(6); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(8); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(7); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _embed = __webpack_require__(77); + +var embed = _interopRequireWildcard(_embed); + +var _browser = __webpack_require__(4); + +var _browser2 = _interopRequireDefault(_browser); + +var _sharedobjectHelperRtmp = __webpack_require__(81); + +var _sharedobjectHelperRtmp2 = _interopRequireDefault(_sharedobjectHelperRtmp); + +var _controls = __webpack_require__(24); + +var _state = __webpack_require__(34); + +var _event = __webpack_require__(15); + +var _promise = __webpack_require__(5); + +var _log = __webpack_require__(2); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NAME = 'RTMPSourceHandler'; + +/** + * Simple util to convert value to Integer. + * @private + */ +var toInt = function toInt(value) { + if (typeof value === 'string') { + return parseInt(value, 10); + } else { + return Math.round(value); + } +}; + +/** + * Quick test if streamName has an extension which infers VOD. + * @param {String} streamName + * @return {Boolean} + * @private + */ +var isVODStreamName = function isVODStreamName(streamName) { + return (/^.*\.(flv|mp4|mp3)/.test(streamName) + ); +}; + +/** + * Source Handler for Flash-based Subscribers, which serves as a Presentation Controller between view and subscriber. + * + * @extends EventEmitter + * @extends SubscriberPlaybackController + * + * @private + */ + +var RTMPSourceHandler = function (_PlaybackController) { + (0, _inherits3.default)(RTMPSourceHandler, _PlaybackController); + + function RTMPSourceHandler(notificationCenter, media, type) { + var soResponder = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : undefined; + (0, _classCallCheck3.default)(this, RTMPSourceHandler); + + var _this = (0, _possibleConstructorReturn3.default)(this, (RTMPSourceHandler.__proto__ || (0, _getPrototypeOf2.default)(RTMPSourceHandler)).call(this)); + + _this.media = media; + _this.clone = _this.media.cloneNode(true); + _this.holder = _this._determineHolder(_this.media); + _this.playerType = type; + _this._swfId = undefined; + _this._controls = undefined; + _this._soResponder = soResponder || new _sharedobjectHelperRtmp2.default(); + _this._playbackNotificationCenter = notificationCenter; + _browser2.default.onFullScreenStateChange(_this._handleFullScreenChange.bind(_this)); + return _this; + } + + /** + * Established DOM Element order for playback. + * + * @param {Element} media + * The target media element: e.g., `video` or `audio`. + * + * @private + */ + + + (0, _createClass3.default)(RTMPSourceHandler, [{ + key: '_determineHolder', + value: function _determineHolder(media) { + if (media.parentNode.classList.contains('red5pro-media-container')) { + return media.parentNode; + } else { + var parent = media.parentNode; + var div = _browser2.default.createElement('div'); + div.classList.add('red5pro-media-container'); + parent.insertBefore(div, media); + parent.removeChild(media); + div.appendChild(media); + return div; + } + } + + /** + * Clean up of DOM Element order upon stop of playback. + * + * @private + */ + + }, { + key: '_cleanUp', + value: function _cleanUp() { + // Return to prior DOM manipulation. + this.media.remove(); + this.media = this.clone.cloneNode(true); + this.holder.appendChild(this.media); + if (this._controls) { + this._controls.detach(); + } + } + + /** + * Assigns and handlers event notificiations coming from the media notifier (e.g., `video` or `audio` element). + * + * @param {Object} notifier + * + * @private + */ + + }, { + key: '_addPlaybackHandlers', + value: function _addPlaybackHandlers(notifier) { + var controls = this.getControls(); + if (typeof controls === 'undefined') { + return; + } + notifier.on(_event.SubscriberEventTypes.SUBSCRIBE_START, function () { + controls.setState(_state.PlaybackState.PLAYING); + }); + notifier.on(_event.SubscriberEventTypes.SUBSCRIBE_STOP, function () { + controls.setState(_state.PlaybackState.IDLE); + }); + notifier.on(_event.SubscriberEventTypes.PLAY_UNPUBLISH, function () { + controls.setState(_state.PlaybackState.IDLE); + }); + notifier.on(_event.SubscriberEventTypes.SUBSCRIBE_METADATA, function (event) { + if (event.data.duration) { + controls.setPlaybackDuration(event.data.duration); + } + }); + notifier.on(_event.SubscriberEventTypes.VOLUME_CHANGE, function (event) { + controls.setVolume(event.data.volume); + }); + notifier.on(_event.SubscriberEventTypes.PLAYBACK_STATE_CHANGE, function (event) { + if (event.data.code === _state.PlaybackState.AVAILABLE) { + controls.enable(true); + } + controls.setState(event.data.code); + }); + notifier.on(_event.SubscriberEventTypes.PLAYBACK_TIME_UPDATE, function (event) { + controls.setSeekTime(event.data.time, event.data.duration); + }); + notifier.on(_event.SubscriberEventTypes.FULL_SCREEN_STATE_CHANGE, function (event) { + controls.onFullScreenChange(event.data); + }); + } + + /** + * Event handler for change in fullscreen state. + * + * @param {Boolean} isFullScreen + * + * @private + */ + + }, { + key: '_handleFullScreenChange', + value: function _handleFullScreenChange(isFullScreen) { + var swfobject = this.getEmbeddedView(); + if (isFullScreen) { + this.holder.classList.add('red5pro-media-container-full-screen'); + swfobject.classList.add('red5pro-media-container-full-screen'); + } else { + this.holder.classList.remove('red5pro-media-container-full-screen'); + swfobject.classList.remove('red5pro-media-container-full-screen'); + } + this.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.FULL_SCREEN_STATE_CHANGE, undefined, isFullScreen)); + } + + /** + * Establishes event handler for recognizing complete on embed and initialization of Flash-based subscriber. + * + * @param {Promise} promise + * The target `Promise` object to resolve or reject upon completion. + * + * @private + */ + + }, { + key: '_setUpInitCallback', + value: function _setUpInitCallback(promise) { + var self = this; + _browser2.default.addSubscriptionAssignmentHandler(function (successId) { + (0, _log.debug)(NAME, 'Embed and init() complete for subscriber swf. successId(' + successId + ').'); + promise.resolve(successId); + self._tearDownInitCallback(); + }); + } + + /** + * Tears down established handler for completion of Flash embed and init. + * + * @private + */ + + }, { + key: '_tearDownInitCallback', + value: function _tearDownInitCallback() {} + + /** + * Request to setup the presentation of a playback stream using HLS. + * + * @param {String} url + * The endpoint URL for playback. + * @param {Object} options + * The initialization configuration map. + * @param {String} swfUrl + * The endpoint url to the SWF to embed. Defaults to relative link to red5pro-subscriber.swf of the SDK distribution. + * @param {String} minFlashVersion + * The minimum Flash version for support of playback. Default: `10.0.0`. + * + * @returns {Promise} + */ + + }, { + key: 'addSource', + value: function addSource(swfId, options) { + var _this2 = this; + + var swfUrl = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; + var minFlashVersion = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; + + (0, _log.debug)(NAME, '[addsource]'); + this._swfId = swfId; + var soResponder = this._soResponder; + var deferred = new _promise.DeferredPromise(); + var hasDefinedControls = options.controls; + var isMuted = _browser2.default.hasAttributeDefined(this.media, 'muted'); + var usePlaybackControls = _browser2.default.hasAttributeDefined(this.media, 'controls') && _browser2.default.hasClassDefined(this.media, 'red5pro-media'); + options.swf = swfUrl || options.swf; + options.minFlashVersion = minFlashVersion || options.minFlashVersion; + this._setUpInitCallback(deferred); + var classList = this.media.classList; + embed.defineEmbedElement(this.media, this.holder).then(function (elementId) { + var flashvars = { + stream: options.streamName, + app: options.context ? options.app + '/' + options.context : options.app, + host: options.host, + muted: _browser2.default.hasAttributeDefined(_this2.media, 'muted'), + autoplay: _browser2.default.hasAttributeDefined(_this2.media, 'autoplay') + }; + if (options.backgroundColor) { + flashvars.backgroundColor = options.backgroundColor; + } + if (options.buffer && !isNaN(Number(options.buffer))) { + flashvars.buffer = options.buffer; + } + if (options.width && !isNaN(options.width)) { + flashvars.width = toInt(options.width); + } + if (options.height && !isNaN(options.height)) { + flashvars.height = toInt(options.height); + } + if (options.embedWidth === '100%' || options.embedHeight === '100%') { + flashvars.autosize = true; + } + _this2._swfId = swfId; + if (typeof options.connectionParams !== 'undefined') { + flashvars.connectionParams = encodeURIComponent((0, _stringify2.default)(options.connectionParams)); + } + return embed.embedSwfObject(swfId, options, flashvars, _browser2.default.getSwfObject(), elementId); + }).then(function () { + if (hasDefinedControls || usePlaybackControls) { + if (hasDefinedControls) { + _this2._controls = options.controls; + } else { + _this2._controls = new _controls.PlaybackControlsImpl(_this2, _this2.holder); + } + _this2.media.controls = false; + _this2._controls.setAsVOD(isVODStreamName(options.streamName)); + _this2._controls.setMutedState(isMuted); + var embedded = _this2.getEmbeddedView(); + var index = classList.length, + clazz = void 0; + while (--index > -1) { + clazz = classList.item(index); + embedded.classList.add(clazz); + } + } + _this2._addPlaybackHandlers(_this2._playbackNotificationCenter); + _this2.trigger(new _event.SubscriberEvent(_event.SubscriberEventTypes.PLAYBACK_STATE_CHANGE, undefined, { + code: _state.PlaybackState.AVAILABLE, + state: _state.PlaybackStateReadable[_state.PlaybackState.AVAILABLE] + })); + return true; + }).then(function () { + soResponder.connect(swfId); + return true; + }).catch(function (e) { + return deferred.reject(e); + }); + return deferred.promise; + } + + /** + * Request to connect to stream. + */ + + }, { + key: 'connect', + value: function connect() { + (0, _log.debug)(NAME, '[connect]'); + try { + this.getEmbeddedView().connect(); + } catch (e) { + throw e; + } + } + }, { + key: 'play', + value: function play() { + try { + this.getEmbeddedView().play(); + } catch (e) { + throw e; + } + } + }, { + key: 'pause', + value: function pause() { + try { + this.getEmbeddedView().pause(); + } catch (e) { + throw e; + } + } + }, { + key: 'resume', + value: function resume() { + try { + this.getEmbeddedView().resume(); + } catch (e) { + throw e; + } + } + }, { + key: 'stop', + value: function stop() { + try { + this.getEmbeddedView().stop(); + } catch (e) { + throw e; + } + } + }, { + key: 'mute', + value: function mute() { + try { + this.getEmbeddedView().mute(); + } catch (e) { + throw e; + } + } + }, { + key: 'unmute', + value: function unmute() { + try { + this.getEmbeddedView().unmute(); + } catch (e) { + throw e; + } + } + }, { + key: 'setVolume', + value: function setVolume(value) { + try { + this.getEmbeddedView().setVolume(value); + } catch (e) { + throw e; + } + } + }, { + key: 'seekTo', + value: function seekTo(value) { + var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; + + try { + this.getEmbeddedView().seekTo(value, duration); + } catch (e) { + throw e; + } + } + }, { + key: 'toggleFullScreen', + value: function toggleFullScreen() { + try { + _browser2.default.toggleFullScreen(this.holder); + } catch (e) { + throw e; + } + } + + /** + * Request to disconnect from the playback stream. + */ + + }, { + key: 'disconnect', + value: function disconnect() { + (0, _log.debug)(NAME, '[disconnect]'); + try { + this.getEmbeddedView().disconnect(); + } catch (e) { + // nada. + } + this._cleanUp(); + this._soResponder.disconnect(); + } + + /** + * Assign response handler for SharedObject communication. + * + * @param {Object} handler + * + * @private + */ + + }, { + key: 'addSharedObjectResponseHandler', + value: function addSharedObjectResponseHandler(handler) { + this._soResponder.addResponseHandler(handler); + } + + /** + * Remove response handler from SharedObject communication. + * + * @param {Object} handler + * + * @private + */ + + }, { + key: 'removeSharedObjectResponseHandler', + value: function removeSharedObjectResponseHandler(handler) { + this._soResponder.removeResponseHandler(handler); + } + + /** + * Send message on SharedObject. + * + * @param {String} name + * The name of the SharedObject. + * @param {String} callName + * The method name to invoke on the SharedObject. + * @param {String} message + * The message to send along. + * + * @private + */ + + }, { + key: 'sendToSharedObject', + value: function sendToSharedObject(name, callName, message) { + this._soResponder.sendToSharedObject(name, callName, message); + } + + /** + * Send property update to SharedObject. + * + * @param {String} name + * The name of the SharedObject. + * @param {String} key + * The property name to update. + * @param {String} value + * The property value to set. + * + * @private + */ + + }, { + key: 'sendPropertyToSharedObject', + value: function sendPropertyToSharedObject(name, key, value) { + this._soResponder.sendPropertyToSharedObject(name, key, value); + } + + /** + * Request to get the remote SharedObject on the server by name. + * + * @param {String} sharedObjectName + * + * @private + */ + + }, { + key: 'getRemoteSharedObject', + value: function getRemoteSharedObject(sharedObjectName) { + this._soResponder.getRemoteSharedObject(sharedObjectName); + } + + /** + * Request to connect to SharedObject by name. + * + * @param {String} sharedObjectName + * + * @private + */ + + }, { + key: 'connectToSharedObject', + value: function connectToSharedObject(sharedObjectName) { + this._soResponder.connectToSharedObject(sharedObjectName); + } + + /** + * Request to close the SharedObject by name. + * + * @param {String} sharedObjectName + * + * @private + */ + + }, { + key: 'closeSharedObject', + value: function closeSharedObject(sharedObjectName) { + this._soResponder.closeSharedObject(sharedObjectName); + } + + /** + * Returns the embedded Flash object if available. + * + * @returns {Element} + */ + + }, { + key: 'getEmbeddedView', + value: function getEmbeddedView() { + return _browser2.default.getEmbedObject(this._swfId); + } + + /** + * Returns playback controls if available. + * + * @returns {PlaybackControls} + */ + + }, { + key: 'getControls', + value: function getControls() { + return this._controls; + } + + /** + * Returns the subscriber type associated with this controller. + * + * @returns {String} + */ + + }, { + key: 'getType', + value: function getType() { + return this.playerType; + } + }]); + return RTMPSourceHandler; +}(_controls.PlaybackController); + +exports.default = RTMPSourceHandler; + +/***/ }), +/* 132 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(145), __esModule: true }; + +/***/ }), +/* 133 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(146), __esModule: true }; + +/***/ }), +/* 134 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(147), __esModule: true }; + +/***/ }), +/* 135 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(151), __esModule: true }; + +/***/ }), +/* 136 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(152), __esModule: true }; + +/***/ }), +/* 137 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(153), __esModule: true }; + +/***/ }), +/* 138 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(156), __esModule: true }; + +/***/ }), +/* 139 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(159), __esModule: true }; + +/***/ }), +/* 140 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(162), __esModule: true }; + +/***/ }), +/* 141 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(163), __esModule: true }; + +/***/ }), +/* 142 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(164), __esModule: true }; + +/***/ }), +/* 143 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _isIterable2 = __webpack_require__(134); + +var _isIterable3 = _interopRequireDefault(_isIterable2); + +var _getIterator2 = __webpack_require__(133); + +var _getIterator3 = _interopRequireDefault(_getIterator2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function () { + function sliceIterator(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + + try { + for (var _i = (0, _getIterator3.default)(arr), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"]) _i["return"](); + } finally { + if (_d) throw _e; + } + } + + return _arr; + } + + return function (arr, i) { + if (Array.isArray(arr)) { + return arr; + } else if ((0, _isIterable3.default)(Object(arr))) { + return sliceIterator(arr, i); + } else { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); + } + }; +}(); + +/***/ }), +/* 144 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(206); + + +/***/ }), +/* 145 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(26); +__webpack_require__(185); +module.exports = __webpack_require__(3).Array.from; + +/***/ }), +/* 146 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(27); +__webpack_require__(26); +module.exports = __webpack_require__(183); + +/***/ }), +/* 147 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(27); +__webpack_require__(26); +module.exports = __webpack_require__(184); + +/***/ }), +/* 148 */ +/***/ (function(module, exports, __webpack_require__) { + +var core = __webpack_require__(3) + , $JSON = core.JSON || (core.JSON = {stringify: JSON.stringify}); +module.exports = function stringify(it){ // eslint-disable-line no-unused-vars + return $JSON.stringify.apply($JSON, arguments); +}; + +/***/ }), +/* 149 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(39); +__webpack_require__(26); +__webpack_require__(27); +__webpack_require__(187); +__webpack_require__(202); +module.exports = __webpack_require__(3).Map; + +/***/ }), +/* 150 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(188); +module.exports = __webpack_require__(3).Number.isFinite; + +/***/ }), +/* 151 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(189); +module.exports = __webpack_require__(3).Number.isNaN; + +/***/ }), +/* 152 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(190); +module.exports = __webpack_require__(3).Object.assign; + +/***/ }), +/* 153 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(191); +var $Object = __webpack_require__(3).Object; +module.exports = function create(P, D){ + return $Object.create(P, D); +}; + +/***/ }), +/* 154 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(192); +var $Object = __webpack_require__(3).Object; +module.exports = function defineProperty(it, key, desc){ + return $Object.defineProperty(it, key, desc); +}; + +/***/ }), +/* 155 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(193); +module.exports = __webpack_require__(3).Object.freeze; + +/***/ }), +/* 156 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(194); +var $Object = __webpack_require__(3).Object; +module.exports = function getOwnPropertyDescriptor(it, key){ + return $Object.getOwnPropertyDescriptor(it, key); +}; + +/***/ }), +/* 157 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(195); +module.exports = __webpack_require__(3).Object.getPrototypeOf; + +/***/ }), +/* 158 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(196); +module.exports = __webpack_require__(3).Object.keys; + +/***/ }), +/* 159 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(197); +module.exports = __webpack_require__(3).Object.setPrototypeOf; + +/***/ }), +/* 160 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(39); +__webpack_require__(26); +__webpack_require__(27); +__webpack_require__(198); +module.exports = __webpack_require__(3).Promise; + +/***/ }), +/* 161 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(39); +__webpack_require__(26); +__webpack_require__(27); +__webpack_require__(199); +__webpack_require__(203); +module.exports = __webpack_require__(3).Set; + +/***/ }), +/* 162 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(200); +__webpack_require__(39); +__webpack_require__(204); +__webpack_require__(205); +module.exports = __webpack_require__(3).Symbol; + +/***/ }), +/* 163 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(26); +__webpack_require__(27); +module.exports = __webpack_require__(75).f('iterator'); + +/***/ }), +/* 164 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(39); +__webpack_require__(27); +__webpack_require__(201); +module.exports = __webpack_require__(3).WeakMap; + +/***/ }), +/* 165 */ +/***/ (function(module, exports) { + +module.exports = function(){ /* empty */ }; + +/***/ }), +/* 166 */ +/***/ (function(module, exports, __webpack_require__) { + +var forOf = __webpack_require__(36); + +module.exports = function(iter, ITERATOR){ + var result = []; + forOf(iter, false, result.push, result, ITERATOR); + return result; +}; + + +/***/ }), +/* 167 */ +/***/ (function(module, exports, __webpack_require__) { + +// false -> Array#indexOf +// true -> Array#includes +var toIObject = __webpack_require__(22) + , toLength = __webpack_require__(51) + , toIndex = __webpack_require__(182); +module.exports = function(IS_INCLUDES){ + return function($this, el, fromIndex){ + var O = toIObject($this) + , length = toLength(O.length) + , index = toIndex(fromIndex, length) + , value; + // Array#includes uses SameValueZero equality algorithm + if(IS_INCLUDES && el != el)while(length > index){ + value = O[index++]; + if(value != value)return true; + // Array#toIndex ignores holes, Array#includes - not + } else for(;length > index; index++)if(IS_INCLUDES || index in O){ + if(O[index] === el)return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; +}; + +/***/ }), +/* 168 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(13) + , isArray = __webpack_require__(101) + , SPECIES = __webpack_require__(9)('species'); + +module.exports = function(original){ + var C; + if(isArray(original)){ + C = original.constructor; + // cross-realm fallback + if(typeof C == 'function' && (C === Array || isArray(C.prototype)))C = undefined; + if(isObject(C)){ + C = C[SPECIES]; + if(C === null)C = undefined; + } + } return C === undefined ? Array : C; +}; + +/***/ }), +/* 169 */ +/***/ (function(module, exports, __webpack_require__) { + +// 9.4.2.3 ArraySpeciesCreate(originalArray, length) +var speciesConstructor = __webpack_require__(168); + +module.exports = function(original, length){ + return new (speciesConstructor(original))(length); +}; + +/***/ }), +/* 170 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var redefineAll = __webpack_require__(50) + , getWeak = __webpack_require__(30).getWeak + , anObject = __webpack_require__(16) + , isObject = __webpack_require__(13) + , anInstance = __webpack_require__(43) + , forOf = __webpack_require__(36) + , createArrayMethod = __webpack_require__(61) + , $has = __webpack_require__(20) + , arrayFind = createArrayMethod(5) + , arrayFindIndex = createArrayMethod(6) + , id = 0; + +// fallback for uncaught frozen keys +var uncaughtFrozenStore = function(that){ + return that._l || (that._l = new UncaughtFrozenStore); +}; +var UncaughtFrozenStore = function(){ + this.a = []; +}; +var findUncaughtFrozen = function(store, key){ + return arrayFind(store.a, function(it){ + return it[0] === key; + }); +}; +UncaughtFrozenStore.prototype = { + get: function(key){ + var entry = findUncaughtFrozen(this, key); + if(entry)return entry[1]; + }, + has: function(key){ + return !!findUncaughtFrozen(this, key); + }, + set: function(key, value){ + var entry = findUncaughtFrozen(this, key); + if(entry)entry[1] = value; + else this.a.push([key, value]); + }, + 'delete': function(key){ + var index = arrayFindIndex(this.a, function(it){ + return it[0] === key; + }); + if(~index)this.a.splice(index, 1); + return !!~index; + } +}; + +module.exports = { + getConstructor: function(wrapper, NAME, IS_MAP, ADDER){ + var C = wrapper(function(that, iterable){ + anInstance(that, C, NAME, '_i'); + that._i = id++; // collection id + that._l = undefined; // leak store for uncaught frozen objects + if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.3.3.2 WeakMap.prototype.delete(key) + // 23.4.3.3 WeakSet.prototype.delete(value) + 'delete': function(key){ + if(!isObject(key))return false; + var data = getWeak(key); + if(data === true)return uncaughtFrozenStore(this)['delete'](key); + return data && $has(data, this._i) && delete data[this._i]; + }, + // 23.3.3.4 WeakMap.prototype.has(key) + // 23.4.3.4 WeakSet.prototype.has(value) + has: function has(key){ + if(!isObject(key))return false; + var data = getWeak(key); + if(data === true)return uncaughtFrozenStore(this).has(key); + return data && $has(data, this._i); + } + }); + return C; + }, + def: function(that, key, value){ + var data = getWeak(anObject(key), true); + if(data === true)uncaughtFrozenStore(that).set(key, value); + else data[that._i] = value; + return that; + }, + ufstore: uncaughtFrozenStore +}; + +/***/ }), +/* 171 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $defineProperty = __webpack_require__(14) + , createDesc = __webpack_require__(37); + +module.exports = function(object, index, value){ + if(index in object)$defineProperty.f(object, index, createDesc(0, value)); + else object[index] = value; +}; + +/***/ }), +/* 172 */ +/***/ (function(module, exports, __webpack_require__) { + +// all enumerable object keys, includes symbols +var getKeys = __webpack_require__(31) + , gOPS = __webpack_require__(68) + , pIE = __webpack_require__(48); +module.exports = function(it){ + var result = getKeys(it) + , getSymbols = gOPS.f; + if(getSymbols){ + var symbols = getSymbols(it) + , isEnum = pIE.f + , i = 0 + , key; + while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))result.push(key); + } return result; +}; + +/***/ }), +/* 173 */ +/***/ (function(module, exports) { + +// fast apply, http://jsperf.lnkit.com/fast-apply/5 +module.exports = function(fn, args, that){ + var un = that === undefined; + switch(args.length){ + case 0: return un ? fn() + : fn.call(that); + case 1: return un ? fn(args[0]) + : fn.call(that, args[0]); + case 2: return un ? fn(args[0], args[1]) + : fn.call(that, args[0], args[1]); + case 3: return un ? fn(args[0], args[1], args[2]) + : fn.call(that, args[0], args[1], args[2]); + case 4: return un ? fn(args[0], args[1], args[2], args[3]) + : fn.call(that, args[0], args[1], args[2], args[3]); + } return fn.apply(that, args); +}; + +/***/ }), +/* 174 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var create = __webpack_require__(47) + , descriptor = __webpack_require__(37) + , setToStringTag = __webpack_require__(38) + , IteratorPrototype = {}; + +// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() +__webpack_require__(21)(IteratorPrototype, __webpack_require__(9)('iterator'), function(){ return this; }); + +module.exports = function(Constructor, NAME, next){ + Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)}); + setToStringTag(Constructor, NAME + ' Iterator'); +}; + +/***/ }), +/* 175 */ +/***/ (function(module, exports, __webpack_require__) { + +var getKeys = __webpack_require__(31) + , toIObject = __webpack_require__(22); +module.exports = function(object, el){ + var O = toIObject(object) + , keys = getKeys(O) + , length = keys.length + , index = 0 + , key; + while(length > index)if(O[key = keys[index++]] === el)return key; +}; + +/***/ }), +/* 176 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(11) + , macrotask = __webpack_require__(110).set + , Observer = global.MutationObserver || global.WebKitMutationObserver + , process = global.process + , Promise = global.Promise + , isNode = __webpack_require__(35)(process) == 'process'; + +module.exports = function(){ + var head, last, notify; + + var flush = function(){ + var parent, fn; + if(isNode && (parent = process.domain))parent.exit(); + while(head){ + fn = head.fn; + head = head.next; + try { + fn(); + } catch(e){ + if(head)notify(); + else last = undefined; + throw e; + } + } last = undefined; + if(parent)parent.enter(); + }; + + // Node.js + if(isNode){ + notify = function(){ + process.nextTick(flush); + }; + // browsers with MutationObserver + } else if(Observer){ + var toggle = true + , node = document.createTextNode(''); + new Observer(flush).observe(node, {characterData: true}); // eslint-disable-line no-new + notify = function(){ + node.data = toggle = !toggle; + }; + // environments with maybe non-completely correct, but existent Promise + } else if(Promise && Promise.resolve){ + var promise = Promise.resolve(); + notify = function(){ + promise.then(flush); + }; + // for other environments - macrotask based on: + // - setImmediate + // - MessageChannel + // - window.postMessag + // - onreadystatechange + // - setTimeout + } else { + notify = function(){ + // strange IE + webpack dev server bug - use .call(global) + macrotask.call(global, flush); + }; + } + + return function(fn){ + var task = {fn: fn, next: undefined}; + if(last)last.next = task; + if(!head){ + head = task; + notify(); + } last = task; + }; +}; + +/***/ }), +/* 177 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(14) + , anObject = __webpack_require__(16) + , getKeys = __webpack_require__(31); + +module.exports = __webpack_require__(17) ? Object.defineProperties : function defineProperties(O, Properties){ + anObject(O); + var keys = getKeys(Properties) + , length = keys.length + , i = 0 + , P; + while(length > i)dP.f(O, P = keys[i++], Properties[P]); + return O; +}; + +/***/ }), +/* 178 */ +/***/ (function(module, exports, __webpack_require__) { + +// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window +var toIObject = __webpack_require__(22) + , gOPN = __webpack_require__(106).f + , toString = {}.toString; + +var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) : []; + +var getWindowNames = function(it){ + try { + return gOPN(it); + } catch(e){ + return windowNames.slice(); + } +}; + +module.exports.f = function getOwnPropertyNames(it){ + return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); +}; + + +/***/ }), +/* 179 */ +/***/ (function(module, exports, __webpack_require__) { + +// Works with __proto__ only. Old v8 can't work with null proto objects. +/* eslint-disable no-proto */ +var isObject = __webpack_require__(13) + , anObject = __webpack_require__(16); +var check = function(O, proto){ + anObject(O); + if(!isObject(proto) && proto !== null)throw TypeError(proto + ": can't set as prototype!"); +}; +module.exports = { + set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line + function(test, buggy, set){ + try { + set = __webpack_require__(19)(Function.call, __webpack_require__(67).f(Object.prototype, '__proto__').set, 2); + set(test, []); + buggy = !(test instanceof Array); + } catch(e){ buggy = true; } + return function setPrototypeOf(O, proto){ + check(O, proto); + if(buggy)O.__proto__ = proto; + else set(O, proto); + return O; + }; + }({}, false) : undefined), + check: check +}; + +/***/ }), +/* 180 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.3.20 SpeciesConstructor(O, defaultConstructor) +var anObject = __webpack_require__(16) + , aFunction = __webpack_require__(60) + , SPECIES = __webpack_require__(9)('species'); +module.exports = function(O, D){ + var C = anObject(O).constructor, S; + return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); +}; + +/***/ }), +/* 181 */ +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__(72) + , defined = __webpack_require__(45); +// true -> String#at +// false -> String#codePointAt +module.exports = function(TO_STRING){ + return function(that, pos){ + var s = String(defined(that)) + , i = toInteger(pos) + , l = s.length + , a, b; + if(i < 0 || i >= l)return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING ? s.charAt(i) : a + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; + }; +}; + +/***/ }), +/* 182 */ +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__(72) + , max = Math.max + , min = Math.min; +module.exports = function(index, length){ + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); +}; + +/***/ }), +/* 183 */ +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__(16) + , get = __webpack_require__(76); +module.exports = __webpack_require__(3).getIterator = function(it){ + var iterFn = get(it); + if(typeof iterFn != 'function')throw TypeError(it + ' is not iterable!'); + return anObject(iterFn.call(it)); +}; + +/***/ }), +/* 184 */ +/***/ (function(module, exports, __webpack_require__) { + +var classof = __webpack_require__(44) + , ITERATOR = __webpack_require__(9)('iterator') + , Iterators = __webpack_require__(29); +module.exports = __webpack_require__(3).isIterable = function(it){ + var O = Object(it); + return O[ITERATOR] !== undefined + || '@@iterator' in O + || Iterators.hasOwnProperty(classof(O)); +}; + +/***/ }), +/* 185 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var ctx = __webpack_require__(19) + , $export = __webpack_require__(10) + , toObject = __webpack_require__(32) + , call = __webpack_require__(102) + , isArrayIter = __webpack_require__(100) + , toLength = __webpack_require__(51) + , createProperty = __webpack_require__(171) + , getIterFn = __webpack_require__(76); + +$export($export.S + $export.F * !__webpack_require__(103)(function(iter){ Array.from(iter); }), 'Array', { + // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) + from: function from(arrayLike/*, mapfn = undefined, thisArg = undefined*/){ + var O = toObject(arrayLike) + , C = typeof this == 'function' ? this : Array + , aLen = arguments.length + , mapfn = aLen > 1 ? arguments[1] : undefined + , mapping = mapfn !== undefined + , index = 0 + , iterFn = getIterFn(O) + , length, result, step, iterator; + if(mapping)mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); + // if object isn't iterable or it's array with default iterator - use simple case + if(iterFn != undefined && !(C == Array && isArrayIter(iterFn))){ + for(iterator = iterFn.call(O), result = new C; !(step = iterator.next()).done; index++){ + createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); + } + } else { + length = toLength(O.length); + for(result = new C(length); length > index; index++){ + createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); + } + } + result.length = index; + return result; + } +}); + + +/***/ }), +/* 186 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var addToUnscopables = __webpack_require__(165) + , step = __webpack_require__(104) + , Iterators = __webpack_require__(29) + , toIObject = __webpack_require__(22); + +// 22.1.3.4 Array.prototype.entries() +// 22.1.3.13 Array.prototype.keys() +// 22.1.3.29 Array.prototype.values() +// 22.1.3.30 Array.prototype[@@iterator]() +module.exports = __webpack_require__(66)(Array, 'Array', function(iterated, kind){ + this._t = toIObject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind +// 22.1.5.2.1 %ArrayIteratorPrototype%.next() +}, function(){ + var O = this._t + , kind = this._k + , index = this._i++; + if(!O || index >= O.length){ + this._t = undefined; + return step(1); + } + if(kind == 'keys' )return step(0, index); + if(kind == 'values')return step(0, O[index]); + return step(0, [index, O[index]]); +}, 'values'); + +// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) +Iterators.Arguments = Iterators.Array; + +addToUnscopables('keys'); +addToUnscopables('values'); +addToUnscopables('entries'); + +/***/ }), +/* 187 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var strong = __webpack_require__(96); + +// 23.1 Map Objects +module.exports = __webpack_require__(62)('Map', function(get){ + return function Map(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); }; +}, { + // 23.1.3.6 Map.prototype.get(key) + get: function get(key){ + var entry = strong.getEntry(this, key); + return entry && entry.v; + }, + // 23.1.3.9 Map.prototype.set(key, value) + set: function set(key, value){ + return strong.def(this, key === 0 ? 0 : key, value); + } +}, strong, true); + +/***/ }), +/* 188 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.2 Number.isFinite(number) +var $export = __webpack_require__(10) + , _isFinite = __webpack_require__(11).isFinite; + +$export($export.S, 'Number', { + isFinite: function isFinite(it){ + return typeof it == 'number' && _isFinite(it); + } +}); + +/***/ }), +/* 189 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.4 Number.isNaN(number) +var $export = __webpack_require__(10); + +$export($export.S, 'Number', { + isNaN: function isNaN(number){ + return number != number; + } +}); + +/***/ }), +/* 190 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.3.1 Object.assign(target, source) +var $export = __webpack_require__(10); + +$export($export.S + $export.F, 'Object', {assign: __webpack_require__(105)}); + +/***/ }), +/* 191 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(10) +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +$export($export.S, 'Object', {create: __webpack_require__(47)}); + +/***/ }), +/* 192 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(10); +// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) +$export($export.S + $export.F * !__webpack_require__(17), 'Object', {defineProperty: __webpack_require__(14).f}); + +/***/ }), +/* 193 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.5 Object.freeze(O) +var isObject = __webpack_require__(13) + , meta = __webpack_require__(30).onFreeze; + +__webpack_require__(49)('freeze', function($freeze){ + return function freeze(it){ + return $freeze && isObject(it) ? $freeze(meta(it)) : it; + }; +}); + +/***/ }), +/* 194 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) +var toIObject = __webpack_require__(22) + , $getOwnPropertyDescriptor = __webpack_require__(67).f; + +__webpack_require__(49)('getOwnPropertyDescriptor', function(){ + return function getOwnPropertyDescriptor(it, key){ + return $getOwnPropertyDescriptor(toIObject(it), key); + }; +}); + +/***/ }), +/* 195 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.9 Object.getPrototypeOf(O) +var toObject = __webpack_require__(32) + , $getPrototypeOf = __webpack_require__(107); + +__webpack_require__(49)('getPrototypeOf', function(){ + return function getPrototypeOf(it){ + return $getPrototypeOf(toObject(it)); + }; +}); + +/***/ }), +/* 196 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.14 Object.keys(O) +var toObject = __webpack_require__(32) + , $keys = __webpack_require__(31); + +__webpack_require__(49)('keys', function(){ + return function keys(it){ + return $keys(toObject(it)); + }; +}); + +/***/ }), +/* 197 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.3.19 Object.setPrototypeOf(O, proto) +var $export = __webpack_require__(10); +$export($export.S, 'Object', {setPrototypeOf: __webpack_require__(179).set}); + +/***/ }), +/* 198 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var LIBRARY = __webpack_require__(46) + , global = __webpack_require__(11) + , ctx = __webpack_require__(19) + , classof = __webpack_require__(44) + , $export = __webpack_require__(10) + , isObject = __webpack_require__(13) + , aFunction = __webpack_require__(60) + , anInstance = __webpack_require__(43) + , forOf = __webpack_require__(36) + , speciesConstructor = __webpack_require__(180) + , task = __webpack_require__(110).set + , microtask = __webpack_require__(176)() + , PROMISE = 'Promise' + , TypeError = global.TypeError + , process = global.process + , $Promise = global[PROMISE] + , process = global.process + , isNode = classof(process) == 'process' + , empty = function(){ /* empty */ } + , Internal, GenericPromiseCapability, Wrapper; + +var USE_NATIVE = !!function(){ + try { + // correct subclassing with @@species support + var promise = $Promise.resolve(1) + , FakePromise = (promise.constructor = {})[__webpack_require__(9)('species')] = function(exec){ exec(empty, empty); }; + // unhandled rejections tracking support, NodeJS Promise without it fails @@species test + return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise; + } catch(e){ /* empty */ } +}(); + +// helpers +var sameConstructor = function(a, b){ + // with library wrapper special case + return a === b || a === $Promise && b === Wrapper; +}; +var isThenable = function(it){ + var then; + return isObject(it) && typeof (then = it.then) == 'function' ? then : false; +}; +var newPromiseCapability = function(C){ + return sameConstructor($Promise, C) + ? new PromiseCapability(C) + : new GenericPromiseCapability(C); +}; +var PromiseCapability = GenericPromiseCapability = function(C){ + var resolve, reject; + this.promise = new C(function($$resolve, $$reject){ + if(resolve !== undefined || reject !== undefined)throw TypeError('Bad Promise constructor'); + resolve = $$resolve; + reject = $$reject; + }); + this.resolve = aFunction(resolve); + this.reject = aFunction(reject); +}; +var perform = function(exec){ + try { + exec(); + } catch(e){ + return {error: e}; + } +}; +var notify = function(promise, isReject){ + if(promise._n)return; + promise._n = true; + var chain = promise._c; + microtask(function(){ + var value = promise._v + , ok = promise._s == 1 + , i = 0; + var run = function(reaction){ + var handler = ok ? reaction.ok : reaction.fail + , resolve = reaction.resolve + , reject = reaction.reject + , domain = reaction.domain + , result, then; + try { + if(handler){ + if(!ok){ + if(promise._h == 2)onHandleUnhandled(promise); + promise._h = 1; + } + if(handler === true)result = value; + else { + if(domain)domain.enter(); + result = handler(value); + if(domain)domain.exit(); + } + if(result === reaction.promise){ + reject(TypeError('Promise-chain cycle')); + } else if(then = isThenable(result)){ + then.call(result, resolve, reject); + } else resolve(result); + } else reject(value); + } catch(e){ + reject(e); + } + }; + while(chain.length > i)run(chain[i++]); // variable length - can't use forEach + promise._c = []; + promise._n = false; + if(isReject && !promise._h)onUnhandled(promise); + }); +}; +var onUnhandled = function(promise){ + task.call(global, function(){ + var value = promise._v + , abrupt, handler, console; + if(isUnhandled(promise)){ + abrupt = perform(function(){ + if(isNode){ + process.emit('unhandledRejection', value, promise); + } else if(handler = global.onunhandledrejection){ + handler({promise: promise, reason: value}); + } else if((console = global.console) && console.error){ + console.error('Unhandled promise rejection', value); + } + }); + // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should + promise._h = isNode || isUnhandled(promise) ? 2 : 1; + } promise._a = undefined; + if(abrupt)throw abrupt.error; + }); +}; +var isUnhandled = function(promise){ + if(promise._h == 1)return false; + var chain = promise._a || promise._c + , i = 0 + , reaction; + while(chain.length > i){ + reaction = chain[i++]; + if(reaction.fail || !isUnhandled(reaction.promise))return false; + } return true; +}; +var onHandleUnhandled = function(promise){ + task.call(global, function(){ + var handler; + if(isNode){ + process.emit('rejectionHandled', promise); + } else if(handler = global.onrejectionhandled){ + handler({promise: promise, reason: promise._v}); + } + }); +}; +var $reject = function(value){ + var promise = this; + if(promise._d)return; + promise._d = true; + promise = promise._w || promise; // unwrap + promise._v = value; + promise._s = 2; + if(!promise._a)promise._a = promise._c.slice(); + notify(promise, true); +}; +var $resolve = function(value){ + var promise = this + , then; + if(promise._d)return; + promise._d = true; + promise = promise._w || promise; // unwrap + try { + if(promise === value)throw TypeError("Promise can't be resolved itself"); + if(then = isThenable(value)){ + microtask(function(){ + var wrapper = {_w: promise, _d: false}; // wrap + try { + then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); + } catch(e){ + $reject.call(wrapper, e); + } + }); + } else { + promise._v = value; + promise._s = 1; + notify(promise, false); + } + } catch(e){ + $reject.call({_w: promise, _d: false}, e); // wrap + } +}; + +// constructor polyfill +if(!USE_NATIVE){ + // 25.4.3.1 Promise(executor) + $Promise = function Promise(executor){ + anInstance(this, $Promise, PROMISE, '_h'); + aFunction(executor); + Internal.call(this); + try { + executor(ctx($resolve, this, 1), ctx($reject, this, 1)); + } catch(err){ + $reject.call(this, err); + } + }; + Internal = function Promise(executor){ + this._c = []; // <- awaiting reactions + this._a = undefined; // <- checked in isUnhandled reactions + this._s = 0; // <- state + this._d = false; // <- done + this._v = undefined; // <- value + this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled + this._n = false; // <- notify + }; + Internal.prototype = __webpack_require__(50)($Promise.prototype, { + // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) + then: function then(onFulfilled, onRejected){ + var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); + reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; + reaction.fail = typeof onRejected == 'function' && onRejected; + reaction.domain = isNode ? process.domain : undefined; + this._c.push(reaction); + if(this._a)this._a.push(reaction); + if(this._s)notify(this, false); + return reaction.promise; + }, + // 25.4.5.1 Promise.prototype.catch(onRejected) + 'catch': function(onRejected){ + return this.then(undefined, onRejected); + } + }); + PromiseCapability = function(){ + var promise = new Internal; + this.promise = promise; + this.resolve = ctx($resolve, promise, 1); + this.reject = ctx($reject, promise, 1); + }; +} + +$export($export.G + $export.W + $export.F * !USE_NATIVE, {Promise: $Promise}); +__webpack_require__(38)($Promise, PROMISE); +__webpack_require__(109)(PROMISE); +Wrapper = __webpack_require__(3)[PROMISE]; + +// statics +$export($export.S + $export.F * !USE_NATIVE, PROMISE, { + // 25.4.4.5 Promise.reject(r) + reject: function reject(r){ + var capability = newPromiseCapability(this) + , $$reject = capability.reject; + $$reject(r); + return capability.promise; + } +}); +$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { + // 25.4.4.6 Promise.resolve(x) + resolve: function resolve(x){ + // instanceof instead of internal slot check because we should fix it without replacement native Promise core + if(x instanceof $Promise && sameConstructor(x.constructor, this))return x; + var capability = newPromiseCapability(this) + , $$resolve = capability.resolve; + $$resolve(x); + return capability.promise; + } +}); +$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(103)(function(iter){ + $Promise.all(iter)['catch'](empty); +})), PROMISE, { + // 25.4.4.1 Promise.all(iterable) + all: function all(iterable){ + var C = this + , capability = newPromiseCapability(C) + , resolve = capability.resolve + , reject = capability.reject; + var abrupt = perform(function(){ + var values = [] + , index = 0 + , remaining = 1; + forOf(iterable, false, function(promise){ + var $index = index++ + , alreadyCalled = false; + values.push(undefined); + remaining++; + C.resolve(promise).then(function(value){ + if(alreadyCalled)return; + alreadyCalled = true; + values[$index] = value; + --remaining || resolve(values); + }, reject); + }); + --remaining || resolve(values); + }); + if(abrupt)reject(abrupt.error); + return capability.promise; + }, + // 25.4.4.4 Promise.race(iterable) + race: function race(iterable){ + var C = this + , capability = newPromiseCapability(C) + , reject = capability.reject; + var abrupt = perform(function(){ + forOf(iterable, false, function(promise){ + C.resolve(promise).then(capability.resolve, reject); + }); + }); + if(abrupt)reject(abrupt.error); + return capability.promise; + } +}); + +/***/ }), +/* 199 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var strong = __webpack_require__(96); + +// 23.2 Set Objects +module.exports = __webpack_require__(62)('Set', function(get){ + return function Set(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); }; +}, { + // 23.2.3.1 Set.prototype.add(value) + add: function add(value){ + return strong.def(this, value = value === 0 ? 0 : value, value); + } +}, strong); + +/***/ }), +/* 200 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// ECMAScript 6 symbols shim +var global = __webpack_require__(11) + , has = __webpack_require__(20) + , DESCRIPTORS = __webpack_require__(17) + , $export = __webpack_require__(10) + , redefine = __webpack_require__(69) + , META = __webpack_require__(30).KEY + , $fails = __webpack_require__(25) + , shared = __webpack_require__(71) + , setToStringTag = __webpack_require__(38) + , uid = __webpack_require__(52) + , wks = __webpack_require__(9) + , wksExt = __webpack_require__(75) + , wksDefine = __webpack_require__(74) + , keyOf = __webpack_require__(175) + , enumKeys = __webpack_require__(172) + , isArray = __webpack_require__(101) + , anObject = __webpack_require__(16) + , toIObject = __webpack_require__(22) + , toPrimitive = __webpack_require__(73) + , createDesc = __webpack_require__(37) + , _create = __webpack_require__(47) + , gOPNExt = __webpack_require__(178) + , $GOPD = __webpack_require__(67) + , $DP = __webpack_require__(14) + , $keys = __webpack_require__(31) + , gOPD = $GOPD.f + , dP = $DP.f + , gOPN = gOPNExt.f + , $Symbol = global.Symbol + , $JSON = global.JSON + , _stringify = $JSON && $JSON.stringify + , PROTOTYPE = 'prototype' + , HIDDEN = wks('_hidden') + , TO_PRIMITIVE = wks('toPrimitive') + , isEnum = {}.propertyIsEnumerable + , SymbolRegistry = shared('symbol-registry') + , AllSymbols = shared('symbols') + , OPSymbols = shared('op-symbols') + , ObjectProto = Object[PROTOTYPE] + , USE_NATIVE = typeof $Symbol == 'function' + , QObject = global.QObject; +// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 +var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; + +// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 +var setSymbolDesc = DESCRIPTORS && $fails(function(){ + return _create(dP({}, 'a', { + get: function(){ return dP(this, 'a', {value: 7}).a; } + })).a != 7; +}) ? function(it, key, D){ + var protoDesc = gOPD(ObjectProto, key); + if(protoDesc)delete ObjectProto[key]; + dP(it, key, D); + if(protoDesc && it !== ObjectProto)dP(ObjectProto, key, protoDesc); +} : dP; + +var wrap = function(tag){ + var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); + sym._k = tag; + return sym; +}; + +var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function(it){ + return typeof it == 'symbol'; +} : function(it){ + return it instanceof $Symbol; +}; + +var $defineProperty = function defineProperty(it, key, D){ + if(it === ObjectProto)$defineProperty(OPSymbols, key, D); + anObject(it); + key = toPrimitive(key, true); + anObject(D); + if(has(AllSymbols, key)){ + if(!D.enumerable){ + if(!has(it, HIDDEN))dP(it, HIDDEN, createDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false; + D = _create(D, {enumerable: createDesc(0, false)}); + } return setSymbolDesc(it, key, D); + } return dP(it, key, D); +}; +var $defineProperties = function defineProperties(it, P){ + anObject(it); + var keys = enumKeys(P = toIObject(P)) + , i = 0 + , l = keys.length + , key; + while(l > i)$defineProperty(it, key = keys[i++], P[key]); + return it; +}; +var $create = function create(it, P){ + return P === undefined ? _create(it) : $defineProperties(_create(it), P); +}; +var $propertyIsEnumerable = function propertyIsEnumerable(key){ + var E = isEnum.call(this, key = toPrimitive(key, true)); + if(this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return false; + return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; +}; +var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){ + it = toIObject(it); + key = toPrimitive(key, true); + if(it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return; + var D = gOPD(it, key); + if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true; + return D; +}; +var $getOwnPropertyNames = function getOwnPropertyNames(it){ + var names = gOPN(toIObject(it)) + , result = [] + , i = 0 + , key; + while(names.length > i){ + if(!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META)result.push(key); + } return result; +}; +var $getOwnPropertySymbols = function getOwnPropertySymbols(it){ + var IS_OP = it === ObjectProto + , names = gOPN(IS_OP ? OPSymbols : toIObject(it)) + , result = [] + , i = 0 + , key; + while(names.length > i){ + if(has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true))result.push(AllSymbols[key]); + } return result; +}; + +// 19.4.1.1 Symbol([description]) +if(!USE_NATIVE){ + $Symbol = function Symbol(){ + if(this instanceof $Symbol)throw TypeError('Symbol is not a constructor!'); + var tag = uid(arguments.length > 0 ? arguments[0] : undefined); + var $set = function(value){ + if(this === ObjectProto)$set.call(OPSymbols, value); + if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, createDesc(1, value)); + }; + if(DESCRIPTORS && setter)setSymbolDesc(ObjectProto, tag, {configurable: true, set: $set}); + return wrap(tag); + }; + redefine($Symbol[PROTOTYPE], 'toString', function toString(){ + return this._k; + }); + + $GOPD.f = $getOwnPropertyDescriptor; + $DP.f = $defineProperty; + __webpack_require__(106).f = gOPNExt.f = $getOwnPropertyNames; + __webpack_require__(48).f = $propertyIsEnumerable; + __webpack_require__(68).f = $getOwnPropertySymbols; + + if(DESCRIPTORS && !__webpack_require__(46)){ + redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); + } + + wksExt.f = function(name){ + return wrap(wks(name)); + } +} + +$export($export.G + $export.W + $export.F * !USE_NATIVE, {Symbol: $Symbol}); + +for(var symbols = ( + // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' +).split(','), i = 0; symbols.length > i; )wks(symbols[i++]); + +for(var symbols = $keys(wks.store), i = 0; symbols.length > i; )wksDefine(symbols[i++]); + +$export($export.S + $export.F * !USE_NATIVE, 'Symbol', { + // 19.4.2.1 Symbol.for(key) + 'for': function(key){ + return has(SymbolRegistry, key += '') + ? SymbolRegistry[key] + : SymbolRegistry[key] = $Symbol(key); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor(key){ + if(isSymbol(key))return keyOf(SymbolRegistry, key); + throw TypeError(key + ' is not a symbol!'); + }, + useSetter: function(){ setter = true; }, + useSimple: function(){ setter = false; } +}); + +$export($export.S + $export.F * !USE_NATIVE, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols +}); + +// 24.3.2 JSON.stringify(value [, replacer [, space]]) +$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function(){ + var S = $Symbol(); + // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}'; +})), 'JSON', { + stringify: function stringify(it){ + if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined + var args = [it] + , i = 1 + , replacer, $replacer; + while(arguments.length > i)args.push(arguments[i++]); + replacer = args[1]; + if(typeof replacer == 'function')$replacer = replacer; + if($replacer || !isArray(replacer))replacer = function(key, value){ + if($replacer)value = $replacer.call(this, key, value); + if(!isSymbol(value))return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + } +}); + +// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) +$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(21)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); +// 19.4.3.5 Symbol.prototype[@@toStringTag] +setToStringTag($Symbol, 'Symbol'); +// 20.2.1.9 Math[@@toStringTag] +setToStringTag(Math, 'Math', true); +// 24.3.3 JSON[@@toStringTag] +setToStringTag(global.JSON, 'JSON', true); + +/***/ }), +/* 201 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var each = __webpack_require__(61)(0) + , redefine = __webpack_require__(69) + , meta = __webpack_require__(30) + , assign = __webpack_require__(105) + , weak = __webpack_require__(170) + , isObject = __webpack_require__(13) + , getWeak = meta.getWeak + , isExtensible = Object.isExtensible + , uncaughtFrozenStore = weak.ufstore + , tmp = {} + , InternalMap; + +var wrapper = function(get){ + return function WeakMap(){ + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; +}; + +var methods = { + // 23.3.3.3 WeakMap.prototype.get(key) + get: function get(key){ + if(isObject(key)){ + var data = getWeak(key); + if(data === true)return uncaughtFrozenStore(this).get(key); + return data ? data[this._i] : undefined; + } + }, + // 23.3.3.5 WeakMap.prototype.set(key, value) + set: function set(key, value){ + return weak.def(this, key, value); + } +}; + +// 23.3 WeakMap Objects +var $WeakMap = module.exports = __webpack_require__(62)('WeakMap', wrapper, methods, weak, true, true); + +// IE11 WeakMap frozen keys fix +if(new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7){ + InternalMap = weak.getConstructor(wrapper); + assign(InternalMap.prototype, methods); + meta.NEED = true; + each(['delete', 'has', 'get', 'set'], function(key){ + var proto = $WeakMap.prototype + , method = proto[key]; + redefine(proto, key, function(a, b){ + // store frozen objects on internal weakmap shim + if(isObject(a) && !isExtensible(a)){ + if(!this._f)this._f = new InternalMap; + var result = this._f[key](a, b); + return key == 'set' ? this : result; + // store all the rest on native weakmap + } return method.call(this, a, b); + }); + }); +} + +/***/ }), +/* 202 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/DavidBruant/Map-Set.prototype.toJSON +var $export = __webpack_require__(10); + +$export($export.P + $export.R, 'Map', {toJSON: __webpack_require__(97)('Map')}); + +/***/ }), +/* 203 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/DavidBruant/Map-Set.prototype.toJSON +var $export = __webpack_require__(10); + +$export($export.P + $export.R, 'Set', {toJSON: __webpack_require__(97)('Set')}); + +/***/ }), +/* 204 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(74)('asyncIterator'); + +/***/ }), +/* 205 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(74)('observable'); + +/***/ }), +/* 206 */ +/***/ (function(module, exports, __webpack_require__) { + +// This method of obtaining a reference to the global object needs to be +// kept identical to the way it is obtained in runtime.js +var g = (function() { return this })() || Function("return this")(); + +// Use `getOwnPropertyNames` because not all browsers support calling +// `hasOwnProperty` on the global `self` object in a worker. See #183. +var hadRuntime = g.regeneratorRuntime && + Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0; + +// Save the old regeneratorRuntime in case it needs to be restored later. +var oldRuntime = hadRuntime && g.regeneratorRuntime; + +// Force reevalutation of runtime.js. +g.regeneratorRuntime = undefined; + +module.exports = __webpack_require__(207); + +if (hadRuntime) { + // Restore the original runtime. + g.regeneratorRuntime = oldRuntime; +} else { + // Remove the global property added by runtime.js. + try { + delete g.regeneratorRuntime; + } catch(e) { + g.regeneratorRuntime = undefined; + } +} + + +/***/ }), +/* 207 */ +/***/ (function(module, exports) { + +/** + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * https://raw.github.com/facebook/regenerator/master/LICENSE file. An + * additional grant of patent rights can be found in the PATENTS file in + * the same directory. + */ + +!(function(global) { + "use strict"; + + var Op = Object.prototype; + var hasOwn = Op.hasOwnProperty; + var undefined; // More compressible than void 0. + var $Symbol = typeof Symbol === "function" ? Symbol : {}; + var iteratorSymbol = $Symbol.iterator || "@@iterator"; + var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator"; + var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; + + var inModule = typeof module === "object"; + var runtime = global.regeneratorRuntime; + if (runtime) { + if (inModule) { + // If regeneratorRuntime is defined globally and we're in a module, + // make the exports object identical to regeneratorRuntime. + module.exports = runtime; + } + // Don't bother evaluating the rest of this file if the runtime was + // already defined globally. + return; + } + + // Define the runtime globally (as expected by generated code) as either + // module.exports (if we're in a module) or a new, empty object. + runtime = global.regeneratorRuntime = inModule ? module.exports : {}; + + function wrap(innerFn, outerFn, self, tryLocsList) { + // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator. + var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; + var generator = Object.create(protoGenerator.prototype); + var context = new Context(tryLocsList || []); + + // The ._invoke method unifies the implementations of the .next, + // .throw, and .return methods. + generator._invoke = makeInvokeMethod(innerFn, self, context); + + return generator; + } + runtime.wrap = wrap; + + // Try/catch helper to minimize deoptimizations. Returns a completion + // record like context.tryEntries[i].completion. This interface could + // have been (and was previously) designed to take a closure to be + // invoked without arguments, but in all the cases we care about we + // already have an existing method we want to call, so there's no need + // to create a new function object. We can even get away with assuming + // the method takes exactly one argument, since that happens to be true + // in every case, so we don't have to touch the arguments object. The + // only additional allocation required is the completion record, which + // has a stable shape and so hopefully should be cheap to allocate. + function tryCatch(fn, obj, arg) { + try { + return { type: "normal", arg: fn.call(obj, arg) }; + } catch (err) { + return { type: "throw", arg: err }; + } + } + + var GenStateSuspendedStart = "suspendedStart"; + var GenStateSuspendedYield = "suspendedYield"; + var GenStateExecuting = "executing"; + var GenStateCompleted = "completed"; + + // Returning this object from the innerFn has the same effect as + // breaking out of the dispatch switch statement. + var ContinueSentinel = {}; + + // Dummy constructor functions that we use as the .constructor and + // .constructor.prototype properties for functions that return Generator + // objects. For full spec compliance, you may wish to configure your + // minifier not to mangle the names of these two functions. + function Generator() {} + function GeneratorFunction() {} + function GeneratorFunctionPrototype() {} + + // This is a polyfill for %IteratorPrototype% for environments that + // don't natively support it. + var IteratorPrototype = {}; + IteratorPrototype[iteratorSymbol] = function () { + return this; + }; + + var getProto = Object.getPrototypeOf; + var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); + if (NativeIteratorPrototype && + NativeIteratorPrototype !== Op && + hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { + // This environment has a native %IteratorPrototype%; use it instead + // of the polyfill. + IteratorPrototype = NativeIteratorPrototype; + } + + var Gp = GeneratorFunctionPrototype.prototype = + Generator.prototype = Object.create(IteratorPrototype); + GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; + GeneratorFunctionPrototype.constructor = GeneratorFunction; + GeneratorFunctionPrototype[toStringTagSymbol] = + GeneratorFunction.displayName = "GeneratorFunction"; + + // Helper for defining the .next, .throw, and .return methods of the + // Iterator interface in terms of a single ._invoke method. + function defineIteratorMethods(prototype) { + ["next", "throw", "return"].forEach(function(method) { + prototype[method] = function(arg) { + return this._invoke(method, arg); + }; + }); + } + + runtime.isGeneratorFunction = function(genFun) { + var ctor = typeof genFun === "function" && genFun.constructor; + return ctor + ? ctor === GeneratorFunction || + // For the native GeneratorFunction constructor, the best we can + // do is to check its .name property. + (ctor.displayName || ctor.name) === "GeneratorFunction" + : false; + }; + + runtime.mark = function(genFun) { + if (Object.setPrototypeOf) { + Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); + } else { + genFun.__proto__ = GeneratorFunctionPrototype; + if (!(toStringTagSymbol in genFun)) { + genFun[toStringTagSymbol] = "GeneratorFunction"; + } + } + genFun.prototype = Object.create(Gp); + return genFun; + }; + + // Within the body of any async function, `await x` is transformed to + // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test + // `hasOwn.call(value, "__await")` to determine if the yielded value is + // meant to be awaited. + runtime.awrap = function(arg) { + return { __await: arg }; + }; + + function AsyncIterator(generator) { + function invoke(method, arg, resolve, reject) { + var record = tryCatch(generator[method], generator, arg); + if (record.type === "throw") { + reject(record.arg); + } else { + var result = record.arg; + var value = result.value; + if (value && + typeof value === "object" && + hasOwn.call(value, "__await")) { + return Promise.resolve(value.__await).then(function(value) { + invoke("next", value, resolve, reject); + }, function(err) { + invoke("throw", err, resolve, reject); + }); + } + + return Promise.resolve(value).then(function(unwrapped) { + // When a yielded Promise is resolved, its final value becomes + // the .value of the Promise<{value,done}> result for the + // current iteration. If the Promise is rejected, however, the + // result for this iteration will be rejected with the same + // reason. Note that rejections of yielded Promises are not + // thrown back into the generator function, as is the case + // when an awaited Promise is rejected. This difference in + // behavior between yield and await is important, because it + // allows the consumer to decide what to do with the yielded + // rejection (swallow it and continue, manually .throw it back + // into the generator, abandon iteration, whatever). With + // await, by contrast, there is no opportunity to examine the + // rejection reason outside the generator function, so the + // only option is to throw it from the await expression, and + // let the generator function handle the exception. + result.value = unwrapped; + resolve(result); + }, reject); + } + } + + var previousPromise; + + function enqueue(method, arg) { + function callInvokeWithMethodAndArg() { + return new Promise(function(resolve, reject) { + invoke(method, arg, resolve, reject); + }); + } + + return previousPromise = + // If enqueue has been called before, then we want to wait until + // all previous Promises have been resolved before calling invoke, + // so that results are always delivered in the correct order. If + // enqueue has not been called before, then it is important to + // call invoke immediately, without waiting on a callback to fire, + // so that the async generator function has the opportunity to do + // any necessary setup in a predictable way. This predictability + // is why the Promise constructor synchronously invokes its + // executor callback, and why async functions synchronously + // execute code before the first await. Since we implement simple + // async functions in terms of async generators, it is especially + // important to get this right, even though it requires care. + previousPromise ? previousPromise.then( + callInvokeWithMethodAndArg, + // Avoid propagating failures to Promises returned by later + // invocations of the iterator. + callInvokeWithMethodAndArg + ) : callInvokeWithMethodAndArg(); + } + + // Define the unified helper method that is used to implement .next, + // .throw, and .return (see defineIteratorMethods). + this._invoke = enqueue; + } + + defineIteratorMethods(AsyncIterator.prototype); + AsyncIterator.prototype[asyncIteratorSymbol] = function () { + return this; + }; + runtime.AsyncIterator = AsyncIterator; + + // Note that simple async functions are implemented on top of + // AsyncIterator objects; they just return a Promise for the value of + // the final result produced by the iterator. + runtime.async = function(innerFn, outerFn, self, tryLocsList) { + var iter = new AsyncIterator( + wrap(innerFn, outerFn, self, tryLocsList) + ); + + return runtime.isGeneratorFunction(outerFn) + ? iter // If outerFn is a generator, return the full iterator. + : iter.next().then(function(result) { + return result.done ? result.value : iter.next(); + }); + }; + + function makeInvokeMethod(innerFn, self, context) { + var state = GenStateSuspendedStart; + + return function invoke(method, arg) { + if (state === GenStateExecuting) { + throw new Error("Generator is already running"); + } + + if (state === GenStateCompleted) { + if (method === "throw") { + throw arg; + } + + // Be forgiving, per 25.3.3.3.3 of the spec: + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume + return doneResult(); + } + + context.method = method; + context.arg = arg; + + while (true) { + var delegate = context.delegate; + if (delegate) { + var delegateResult = maybeInvokeDelegate(delegate, context); + if (delegateResult) { + if (delegateResult === ContinueSentinel) continue; + return delegateResult; + } + } + + if (context.method === "next") { + // Setting context._sent for legacy support of Babel's + // function.sent implementation. + context.sent = context._sent = context.arg; + + } else if (context.method === "throw") { + if (state === GenStateSuspendedStart) { + state = GenStateCompleted; + throw context.arg; + } + + context.dispatchException(context.arg); + + } else if (context.method === "return") { + context.abrupt("return", context.arg); + } + + state = GenStateExecuting; + + var record = tryCatch(innerFn, self, context); + if (record.type === "normal") { + // If an exception is thrown from innerFn, we leave state === + // GenStateExecuting and loop back for another invocation. + state = context.done + ? GenStateCompleted + : GenStateSuspendedYield; + + if (record.arg === ContinueSentinel) { + continue; + } + + return { + value: record.arg, + done: context.done + }; + + } else if (record.type === "throw") { + state = GenStateCompleted; + // Dispatch the exception by looping back around to the + // context.dispatchException(context.arg) call above. + context.method = "throw"; + context.arg = record.arg; + } + } + }; + } + + // Call delegate.iterator[context.method](context.arg) and handle the + // result, either by returning a { value, done } result from the + // delegate iterator, or by modifying context.method and context.arg, + // setting context.delegate to null, and returning the ContinueSentinel. + function maybeInvokeDelegate(delegate, context) { + var method = delegate.iterator[context.method]; + if (method === undefined) { + // A .throw or .return when the delegate iterator has no .throw + // method always terminates the yield* loop. + context.delegate = null; + + if (context.method === "throw") { + if (delegate.iterator.return) { + // If the delegate iterator has a return method, give it a + // chance to clean up. + context.method = "return"; + context.arg = undefined; + maybeInvokeDelegate(delegate, context); + + if (context.method === "throw") { + // If maybeInvokeDelegate(context) changed context.method from + // "return" to "throw", let that override the TypeError below. + return ContinueSentinel; + } + } + + context.method = "throw"; + context.arg = new TypeError( + "The iterator does not provide a 'throw' method"); + } + + return ContinueSentinel; + } + + var record = tryCatch(method, delegate.iterator, context.arg); + + if (record.type === "throw") { + context.method = "throw"; + context.arg = record.arg; + context.delegate = null; + return ContinueSentinel; + } + + var info = record.arg; + + if (! info) { + context.method = "throw"; + context.arg = new TypeError("iterator result is not an object"); + context.delegate = null; + return ContinueSentinel; + } + + if (info.done) { + // Assign the result of the finished delegate to the temporary + // variable specified by delegate.resultName (see delegateYield). + context[delegate.resultName] = info.value; + + // Resume execution at the desired location (see delegateYield). + context.next = delegate.nextLoc; + + // If context.method was "throw" but the delegate handled the + // exception, let the outer generator proceed normally. If + // context.method was "next", forget context.arg since it has been + // "consumed" by the delegate iterator. If context.method was + // "return", allow the original .return call to continue in the + // outer generator. + if (context.method !== "return") { + context.method = "next"; + context.arg = undefined; + } + + } else { + // Re-yield the result returned by the delegate method. + return info; + } + + // The delegate iterator is finished, so forget it and continue with + // the outer generator. + context.delegate = null; + return ContinueSentinel; + } + + // Define Generator.prototype.{next,throw,return} in terms of the + // unified ._invoke helper method. + defineIteratorMethods(Gp); + + Gp[toStringTagSymbol] = "Generator"; + + // A Generator should always return itself as the iterator object when the + // @@iterator function is called on it. Some browsers' implementations of the + // iterator prototype chain incorrectly implement this, causing the Generator + // object to not be returned from this call. This ensures that doesn't happen. + // See https://github.com/facebook/regenerator/issues/274 for more details. + Gp[iteratorSymbol] = function() { + return this; + }; + + Gp.toString = function() { + return "[object Generator]"; + }; + + function pushTryEntry(locs) { + var entry = { tryLoc: locs[0] }; + + if (1 in locs) { + entry.catchLoc = locs[1]; + } + + if (2 in locs) { + entry.finallyLoc = locs[2]; + entry.afterLoc = locs[3]; + } + + this.tryEntries.push(entry); + } + + function resetTryEntry(entry) { + var record = entry.completion || {}; + record.type = "normal"; + delete record.arg; + entry.completion = record; + } + + function Context(tryLocsList) { + // The root entry object (effectively a try statement without a catch + // or a finally block) gives us a place to store values thrown from + // locations where there is no enclosing try statement. + this.tryEntries = [{ tryLoc: "root" }]; + tryLocsList.forEach(pushTryEntry, this); + this.reset(true); + } + + runtime.keys = function(object) { + var keys = []; + for (var key in object) { + keys.push(key); + } + keys.reverse(); + + // Rather than returning an object with a next method, we keep + // things simple and return the next function itself. + return function next() { + while (keys.length) { + var key = keys.pop(); + if (key in object) { + next.value = key; + next.done = false; + return next; + } + } + + // To avoid creating an additional object, we just hang the .value + // and .done properties off the next function object itself. This + // also ensures that the minifier will not anonymize the function. + next.done = true; + return next; + }; + }; + + function values(iterable) { + if (iterable) { + var iteratorMethod = iterable[iteratorSymbol]; + if (iteratorMethod) { + return iteratorMethod.call(iterable); + } + + if (typeof iterable.next === "function") { + return iterable; + } + + if (!isNaN(iterable.length)) { + var i = -1, next = function next() { + while (++i < iterable.length) { + if (hasOwn.call(iterable, i)) { + next.value = iterable[i]; + next.done = false; + return next; + } + } + + next.value = undefined; + next.done = true; + + return next; + }; + + return next.next = next; + } + } + + // Return an iterator with no values. + return { next: doneResult }; + } + runtime.values = values; + + function doneResult() { + return { value: undefined, done: true }; + } + + Context.prototype = { + constructor: Context, + + reset: function(skipTempReset) { + this.prev = 0; + this.next = 0; + // Resetting context._sent for legacy support of Babel's + // function.sent implementation. + this.sent = this._sent = undefined; + this.done = false; + this.delegate = null; + + this.method = "next"; + this.arg = undefined; + + this.tryEntries.forEach(resetTryEntry); + + if (!skipTempReset) { + for (var name in this) { + // Not sure about the optimal order of these conditions: + if (name.charAt(0) === "t" && + hasOwn.call(this, name) && + !isNaN(+name.slice(1))) { + this[name] = undefined; + } + } + } + }, + + stop: function() { + this.done = true; + + var rootEntry = this.tryEntries[0]; + var rootRecord = rootEntry.completion; + if (rootRecord.type === "throw") { + throw rootRecord.arg; + } + + return this.rval; + }, + + dispatchException: function(exception) { + if (this.done) { + throw exception; + } + + var context = this; + function handle(loc, caught) { + record.type = "throw"; + record.arg = exception; + context.next = loc; + + if (caught) { + // If the dispatched exception was caught by a catch block, + // then let that catch block handle the exception normally. + context.method = "next"; + context.arg = undefined; + } + + return !! caught; + } + + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + var record = entry.completion; + + if (entry.tryLoc === "root") { + // Exception thrown outside of any try block that could handle + // it, so set the completion value of the entire function to + // throw the exception. + return handle("end"); + } + + if (entry.tryLoc <= this.prev) { + var hasCatch = hasOwn.call(entry, "catchLoc"); + var hasFinally = hasOwn.call(entry, "finallyLoc"); + + if (hasCatch && hasFinally) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } else if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + + } else if (hasCatch) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } + + } else if (hasFinally) { + if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + + } else { + throw new Error("try statement without catch or finally"); + } + } + } + }, + + abrupt: function(type, arg) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc <= this.prev && + hasOwn.call(entry, "finallyLoc") && + this.prev < entry.finallyLoc) { + var finallyEntry = entry; + break; + } + } + + if (finallyEntry && + (type === "break" || + type === "continue") && + finallyEntry.tryLoc <= arg && + arg <= finallyEntry.finallyLoc) { + // Ignore the finally entry if control is not jumping to a + // location outside the try/catch block. + finallyEntry = null; + } + + var record = finallyEntry ? finallyEntry.completion : {}; + record.type = type; + record.arg = arg; + + if (finallyEntry) { + this.method = "next"; + this.next = finallyEntry.finallyLoc; + return ContinueSentinel; + } + + return this.complete(record); + }, + + complete: function(record, afterLoc) { + if (record.type === "throw") { + throw record.arg; + } + + if (record.type === "break" || + record.type === "continue") { + this.next = record.arg; + } else if (record.type === "return") { + this.rval = this.arg = record.arg; + this.method = "return"; + this.next = "end"; + } else if (record.type === "normal" && afterLoc) { + this.next = afterLoc; + } + + return ContinueSentinel; + }, + + finish: function(finallyLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.finallyLoc === finallyLoc) { + this.complete(entry.completion, entry.afterLoc); + resetTryEntry(entry); + return ContinueSentinel; + } + } + }, + + "catch": function(tryLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc === tryLoc) { + var record = entry.completion; + if (record.type === "throw") { + var thrown = record.arg; + resetTryEntry(entry); + } + return thrown; + } + } + + // The context.catch method must only be called with a location + // argument that corresponds to a known catch block. + throw new Error("illegal catch attempt"); + }, + + delegateYield: function(iterable, resultName, nextLoc) { + this.delegate = { + iterator: values(iterable), + resultName: resultName, + nextLoc: nextLoc + }; + + if (this.method === "next") { + // Deliberately forget the last sent value so that we don't + // accidentally pass it on to the delegate. + this.arg = undefined; + } + + return ContinueSentinel; + } + }; +})( + // In sloppy mode, unbound `this` refers to the global object, fallback to + // Function constructor if we're in global strict mode. That is sadly a form + // of indirect eval which violates Content Security Policy. + (function() { return this })() || Function("return this")() +); + + +/***/ }), +/* 208 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(111); + + +/***/ }) +/******/ ]); +}); +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay91bml2ZXJzYWxNb2R1bGVEZWZpbml0aW9uIiwid2VicGFjazovLy93ZWJwYWNrL2Jvb3RzdHJhcCBjMzJmZTA2YWU0NDExYWU5ZDFhZiIsIndlYnBhY2s6Ly8vLi9+L2JhYmVsLXJ1bnRpbWUvaGVscGVycy9jbGFzc0NhbGxDaGVjay5qcyIsIndlYnBhY2s6Ly8vLi9+L2JhYmVsLXJ1bnRpbWUvaGVscGVycy9jcmVhdGVDbGFzc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ganNvbi5lcnJvcikge1xuICAgICAgICAgIHByb21pc2UucmVqZWN0KGpzb24uZXJyb3IpXG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSBpZiAoanNvbi5kYXRhICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgY29uc3QgeyBkYXRhIH0gPSBqc29uXG4gICAgICAgIGlmIChkYXRhLm1lc3NhZ2UgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgIGlmIChkYXRhLnR5cGUgPT09ICdlcnJvcicpIHtcbiAgICAgICAgICAgIHRoaXMuX3Jlc3BvbmRlci5vblNvY2tldE1lc3NhZ2VFcnJvcihkYXRhLm1lc3NhZ2UsIGRhdGEuZGV0YWlsKVxuICAgICAgICAgICAgcmV0dXJuIHRydWVcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAoZGF0YS50eXBlID09PSAnc3RhdHVzJykge1xuICAgICAgICAgIGlmIChkYXRhLmNvZGUgPT09ICdOZXRDb25uZWN0aW9uLkNvbm5lY3QuU3VjY2VzcycpIHtcbiAgICAgICAgICAgIHRoaXMuX3dlYnNvY2tldC5vbmVycm9yID0gdGhpcy5fb25VbmV4cGVjdGVkU29ja2V0RXJyb3IuYmluZCh0aGlzKVxuICAgICAgICAgICAgdGhpcy5fY29ubmVjdGlvblByb21pc2UucmVzb2x2ZSgpXG4gICAgICAgICAgICByZXR1cm4gdHJ1ZVxuICAgICAgICAgIH0gZWxzZSBpZiAoZGF0YS5jb2RlID09PSAnTmV0Q29ubmVjdGlvbi5Db25uZWN0LlJlamVjdGVkJykge1xuICAgICAgICAgICAgdGhpcy5fY29ubmVjdGlvblByb21pc2UucmVqZWN0KCdOZXRDb25uZWN0aW9uLkNvbm5lY3QuUmVqZWN0ZWQnKVxuICAgICAgICAgICAgcmV0dXJuIHRydWVcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAoZGF0YS50eXBlID09PSAnZXJyb3InKSB7XG4gICAgICAgICAgaWYgKGRhdGE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AgICAgICByZXR1cm4gb2JqLnNsaWNlKCk7XG4gICAgfSBlbHNlIGlmICh0eXBlb2YgKG9iaikgPT09ICdvYmplY3QnKSB7XG4gICAgICAgIHZhciBjb3B5ID0ge307XG4gICAgICAgIE9iamVjdC5rZXlzKG9iaikuZm9yRWFjaChmdW5jdGlvbiAoaykge1xuICAgICAgICAgICAgY29weVtrXSA9IG9ialtrXTtcbiAgICAgICAgfSk7XG4gICAgICAgIHJldHVybiBjb3B5O1xuICAgIH0gZWxzZSB7XG4gICAgICAgIHJldHVybiBvYmo7XG4gICAgfVxufVxuXG52YXIgZm9ybWF0ID0gZnVuY3Rpb24oZikge1xuXG4gICAgaWYoZiA9PT0gbnVsbCkge1xuICAgICAgICByZXR1cm4gJ251bGwnO1xuICAgIH1cblxuICAgIGlmKHR5cGVvZiBmICE9PSAnc3RyaW5nJykge1xuICAgICAgICByZXR1cm4gZi50b1N0cmluZygpO1xuICAgIH1cbiAgICB2YXIgZm9ybWF0UmVnRXhwID0gLyVbc2RqJV0vZztcblxuICAgIHZhciBpID0gMTtcbiAgICB2YXIgYXJncyA9IGFyZ3VtZW50cztcbiAgICB2YXIgbGVuID0gYXJncy5sZW5ndGg7XG4gICAgdmFyIHN0ciA9IFN0cmluZyhmKS5yZXBsYWNlKGZvcm1hdFJlZ0V4cCwgZnVuY3Rpb24oeCkge1xuICAgICAgICBpZiAoeCA9PT0gJyUlJykge1xuICAgICAgICAgICAgcmV0dXJuICclJztcbiAgICAgICAgfVxuICAgICAgICBpZiAoaSA+PSBsZW4pIHtcbiAgICAgICAgICAgIHJldHVybiB4O1xuICAgICAgICB9XG4gICAgICAgIHN3aXRjaCAoeCkge1xuICAgICAgICAgICAgY2FzZSAnJXMnOiByZXR1cm4gU3RyaW5nKGFyZ3NbaSsrXSk7XG4gICAgICAgICAgICBjYXNlICclZCc6IHJldHVybiBOdW1iZXIoYXJnc1tpKytdKTtcbiAgICAgICAgICAgIGNhc2UgJyVqJzpcbiAgICAgICAgICAg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fTtcbiAgICAgICAgICAgICAgICBpZiAoYXJncy5sZW5ndGggPT09IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgbXNnQXJncyA9IFtmaWVsZHMuZXJyLm1lc3NhZ2VdO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIG1zZ0FyZ3MgPSBBcnJheS5wcm90b3R5cGUuc2xpY2UuY2FsbChhcmdzLCAxKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHR5cGVvZiAoYXJnc1swXSkgIT09ICdvYmplY3QnICYmIGFyZ3NbMF0gIT09IG51bGwgfHxcbiAgICAgICAgICAgICAgICBBcnJheS5pc0FycmF5KGFyZ3NbMF0pKSB7XG4gICAgICAgICAgICAgICAgLy8gYGxvZy48bGV2ZWw+KG1zZywgLi4uKWBcbiAgICAgICAgICAgICAgICBmaWVsZHMgPSBudWxsO1xuICAgICAgICAgICAgICAgIG1zZ0FyZ3MgPSBBcnJheS5wcm90b3R5cGUuc2xpY2UuY2FsbChhcmdzKTtcbiAgICAgICAgICAgIH0gZWxzZSB7ICAvLyBgbG9nLjxsZXZlbD4oZmllbGRzLCBtc2csIC4uLilgXG4gICAgICAgICAgICAgICAgZmllbGRzID0gYXJnc1swXTtcbiAgICAgICAgICAgICAgICBtc2dBcmdzID0gQXJyYXkucHJvdG90eXBlLnNsaWNlLmNhbGwoYXJncywgMSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vIEJ1aWxkIHVwIHRoZSByZWNvcmQgb2JqZWN0LlxuICAgICAgICAgICAgdmFyIHJlYyA9IG9iakNvcHkobG9nLmZpZWxkcyk7XG4gICAgICAgICAgICByZWMubGV2ZWwgPSBtaW5MZXZlbDtcbiAgICAgICAgICAgIHZhciByZWNGaWVsZHMgPSAoZmllbGRzID8gb2JqQ29weShmaWVsZHMpIDogbnVsbCk7XG4gICAgICAgICAgICBpZiAocmVjRmllbGRzKSB7XG4gICAgICAgICAgICAgICAgaWYgKGxvZy5zZXJpYWxpemVycykge1xuICAgICAgICAgICAgICAgICAgICBsb2cuX2FwcGx5U2VyaWFsaXplcnMocmVjRmllbGRzLCBleGNsdWRlRmllbGRzKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgT2JqZWN0LmtleXMocmVjRmllbGRzKS5mb3JFYWNoKGZ1bmN0aW9uIChrKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlY1trXSA9IHJlY0ZpZWxkc1trXTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYy5sZXZlbE5hbWUgPSBuYW1lRnJvbUxldmVsW21pbkxldmVsXTtcbiAgICAgICAgICAgIHJlYy5tc2cgPSBmb3JtYXQuYXBwbHkobG9nLCBtc2dBcmdzKTtcbiAgICAgICAgICAgIGlmICghcmVjLnRpbWUpIHtcbiAgICAgICAgICAgICAgICByZWMudGltZSA9IChuZXcgRGF0ZSgpKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIEdldCBjYWxsIHNvdXJjZSBpbmZvXG4gICAgICAgICAgICBpZiAobG9nLnNyYyAmJiAhcmVjLnNyYykge1xuICAgICAgICAgICAgICAgIHJlYy5zcmMgPSBnZXRDYWxsZXIzSW5mbygpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVjLnYgPSBMT0dfVkVSU0lPTjtcblxuICAgICAgICAgICAgcmV0dXJuIHJlYztcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBmaWVsZHMgPSBudWxsO1xuICAgICAgICB2YXIgbXNnQXJncyA9IGFyZ3VtZW50cztcbiAgICAgICAgdmFyIHJlYyA9IG51bGw7XG4gICAgICAgIGlmICghdGhpcy5fZW1pdCkge1xuICAgICAgICAgICAgLypcbiAgICAgICAgICAgICAqIFNob3cgdGhpcyBpbnZhbGlkIEJ1bnlhbiB1c2FnZSB3YXJuaW5nICpvbmNlKi5cbiAgICAgICAgICAgICAqXG4gICAgICAgICAgICAgKiBTZWUgPGh0dHBzOi8vZ2l0aHViLmNvbS90cmVudG0vbm9kZS1idW55YW4vaXNzdWVzLzEwMD4gZm9yXG4gICAgICAgICAgICAgKiBhbiBleGFtcGxlIG9mIGhvdyB0aGlzIGNhbiBoYXBwZW4uXG4gICAgICAgICAgICAgKi9cbiAgICAgICAgICAgIHZhciBkZWR1cEtleSA9ICd1bmJvdW5kJztcbiAgICAgICAgICAgIGlmICghX2hhdmVXYXJuZWRbZGVkdXBLZXldKSB7XG4gICAgICAgICAgICAgICAgdmFyIGNhbGxlciA9IGdldENhbGxlcjNJbmZvKCk7XG4gICAgICAgICAgICAgICAgX3dhcm4oZm9ybWF0KCdidW55YW4gdXNhZ2UgZXJyb3I6ICVzOiVzOiBhdHRlbXB0IHRvIGxvZyB3aXRoIGFuIHVuYm91bmQgbG9nIG1ldGhvZDogYHRoaXNgIGlzOiAlcycsXG4gICAgICAgICAgICAgICAgICAgICAgICBjYWxsZXIuZmlsZSwgY2FsbGVyLmxpbmUsIHRoaXMudG9TdHJpbmcoKSksXG4gICAgICAgICAgICAgICAgICAgIGRlZHVwS2V5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfSBlbHNlIGlmIChhcmd1bWVudHMubGVuZ3RoID09PSAwKSB7ICAgLy8gYGxvZy48bGV2ZWw+KClgXG4gICAgICAgICAgICByZXR1cm4gKHRoaXMuX2xldmVsIDw9IG1pbkxldmVsKTtcbiAgICAgICAgfSBlbHNlIGlmICh0aGlzLl9sZXZlbCA+IG1pbkxldmVsKSB7XG4gICAgICAgICAgICAvKiBwYXNzIHRocm91Z2ggKi9cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJlYyA9IG1rUmVjb3JkKG1zZ0FyZ3MpO1xuICAgICAgICAgICAgdGhpcy5fZW1pdChyZWMpO1xuICAgICAgICB9XG4gICAgfTtcbn1cblxuXG4vKipc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lwZS5oYXMoa2V5KVxuICAgICAgLy8gMjMuMi4zLjcgU2V0LnByb3RvdHlwZS5oYXModmFsdWUpXG4gICAgICBoYXM6IGZ1bmN0aW9uIGhhcyhrZXkpe1xuICAgICAgICByZXR1cm4gISFnZXRFbnRyeSh0aGlzLCBrZXkpO1xuICAgICAgfVxuICAgIH0pO1xuICAgIGlmKERFU0NSSVBUT1JTKWRQKEMucHJvdG90eXBlLCAnc2l6ZScsIHtcbiAgICAgIGdldDogZnVuY3Rpb24oKXtcbiAgICAgICAgcmV0dXJuIGRlZmluZWQodGhpc1tTSVpFXSk7XG4gICAgICB9XG4gICAgfSk7XG4gICAgcmV0dXJuIEM7XG4gIH0sXG4gIGRlZjogZnVuY3Rpb24odGhhdCwga2V5LCB2YWx1ZSl7XG4gICAgdmFyIGVudHJ5ID0gZ2V0RW50cnkodGhhdCwga2V5KVxuICAgICAgLCBwcmV2LCBpbmRleDtcbiAgICAvLyBjaGFuZ2UgZXhpc3RpbmcgZW50cnlcbiAgICBpZihlbnRyeSl7XG4gICAgICBlbnRyeS52ID0gdmFsdWU7XG4gICAgLy8gY3JlYXRlIG5ldyBlbnRyeVxuICAgIH0gZWxzZSB7XG4gICAgICB0aGF0Ll9sID0gZW50cnkgPSB7XG4gICAgICAgIGk6IGluZGV4ID0gZmFzdEtleShrZXksIHRydWUpLCAvLyA8LSBpbmRleFxuICAgICAgICBrOiBrZXksICAgICAgICAgICAgICAgICAgICAgICAgLy8gPC0ga2V5XG4gICAgICAgIHY6IHZhbHVlLCAgICAgICAgICAgICAgICAgICAgICAvLyA8LSB2YWx1ZVxuICAgICAgICBwOiBwcmV2ID0gdGhhdC5fbCwgICAgICAgICAgICAgLy8gPC0gcHJldmlvdXMgZW50cnlcbiAgICAgICAgbjogdW5kZWZpbmVkLCAgICAgICAgICAgICAgICAgIC8vIDwtIG5leHQgZW50cnlcbiAgICAgICAgcjogZmFsc2UgICAgICAgICAgICAgICAgICAgICAgIC8vIDwtIHJlbW92ZWR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gICAgICAgaWYgKGpzb24uZGF0YS5zZHAgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICBpZiAoanNvbi5kYXRhLnNkcC50eXBlID09PSAnb2ZmZXInKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5fcmVzcG9uZGVyLm9uU0RQT2ZmZXIoanNvbi5kYXRhKVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoanNvbi5kYXRhLmNhbmRpZGF0ZSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgIHRoaXMuX3Jlc3BvbmRlci5vbkFkZEljZUNhbmRpZGF0ZShqc29uLmRhdGEuY2FuZGlkYXRlKVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKGpzb24uZGF0YS50eXBlID09PSAnc3RhdHVzJykge1xuICAgICAgICAgICAgICBpZiAoanNvbi5kYXRhLmNvZGUgPT09ICdOZXRDb25uZWN0aW9uLklDRS5UcmljbGVDb21wbGV0ZWQnIHx8XG4gICAgICAgICAgICAgICAgIGpzb24uZGF0YS5jb2RlID09PSAnTmV0Q29ubmVjdGlvbi5JQ0UuVHJpY2tsZUNvbXBsZXRlZCcpIHtcbiAgICAgICAgICAgICAgICB0aGlzLl9yZXNwb25kZXIub25Tb2NrZXRJY2VDYW5kaWRhdGVFbmQoKVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGVsc2UgaWYgKGpzb24uZGF0YS5jb2RlID09PSAnTmV0U3RyZWFtLlBsYXkuVW5wdWJsaXNoTm90aWZ5Jykge1xuICAgICAgICAgICAgICAgIHRoaXMuX3Jlc3BvbmRlci5vblVucHVibGlzaCgpXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgZWxzZSBpZiAoanNvbi5kYXRhLmNvZGUgPT09ICdOZXRDb25uZWN0aW9uLkNvbm5lY3QuQ2xvc2VkJykge1xuICAgICAgICAgICAgICAgIHRoaXMuX3Jlc3BvbmRlci5vbkNvbm5lY3Rpb25DbG9zZWQoKVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIHRoaXMuX3Jlc3BvbmRlci5vblN1YnNjcmliZXJTdGF0dXMoanNvbi5kYXRhKVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoanNvbi5kYXRhLmhhc093blByb3BlcnR5KCdzdGF0dXMnKSkge1xuICAgICAgICAgICAgICBpZiAoanNvbi5kYXRhLnN0YXR1cyA9PT0gJ05ldFN0cmVhbS5QbGF5LlVucHVibGlzaE5vdGlmeScpIHtcbiAgICAgICAgICAgICAgICB0aGlzLl9yZXNwb25kZXIub25VbnB1Ymxpc2goKVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoanNvbi50eXBlICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgaWYgKGpzb24udHlwZSA9PT0gJ21ldGFkYXRhJykge1xuICAgICAgICAgICAgICAgIC8vIEl0IGlzIGEgYHNlbmRgIEFQSSBpbnZvY2F0aW9uLlxuICAgICAgICAgICAgICAgIGlmIChqc29uLm1ldGhvZCAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgICB0aGlzLl9yZXNwb25kZXIub25TZW5kUmVjZWl2ZWQoanNvbi5tZXRob2QsIGpzb24uZGF0YSlcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgLy8gRWxzZSBpdCBpcyBub3JtYWwgbWV0YWRhdGEuXG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICB0aGlzLl9yZXNwb25kZXIub25NZXRhRGF0YShqc29uLmRhdGEpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgICBlbHNlIGlmIChqc29uLnR5cGUgIT09IHVuZGV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AgIHJldHVybiB0cnVlXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSlcbiAgICAgICAgICAudGhlbigoKSA9PiB7XG4gICAgICAgICAgICBzZWxmLl9zZXRWaWV3SWZOb3RFeGlzdChzZWxmLl92aWV3LCBzZWxmLl9vcHRpb25zLm1lZGlhRWxlbWVudElkKVxuICAgICAgICAgICAgZGVmZXJyZWQucmVzb2x2ZShzZWxmKVxuICAgICAgICAgIH0pXG4gICAgICAgICAgLmNhdGNoKGVyciA9PiB7XG4gICAgICAgICAgICBlcnJvcihOQU1FLCBgQ291bGQgbm90IGVtYmVkIEZsYXNoLWJhc2VkIFJUTVAgUHVibGlzaGVyLiBSZWFzb246ICR7ZXJyfWApXG4gICAgICAgICAgICBpZiAoc2VsZi5fc291cmNlSGFuZGxlcikge1xuICAgICAgICAgICAgICBzZWxmLl9zb3VyY2VIYW5kbGVyLmRpc2Nvbm5lY3QoKVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZGVmZXJyZWQucmVqZWN0KGVycilcbiAgICAgICAgICAgIHNlbGYudHJpZ2dlcihuZXcgUHVibGlzaGVyRXZlbnQoUlRNUFB1Ymxpc2hlckV2ZW50VHlwZXMuRU1CRURfRkFJTFVSRSwgc2VsZikpXG4gICAgICAgICAgfSlcbiAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgZGVmZXJyZWQucmVqZWN0KGBDb3VsZCBub3QgaW5qZWN0IEZsYXNoLWJhc2VkIFB1Ymxpc2hlciBpbnRvIHRoZSBwYWdlLiBSZWFzb246ICR7ZS5tZXNzYWdlfWApXG4gICAgICAgIHNlbGYudHJpZ2dlcihuZXcgUHVibGlzaGVyRXZlbnQoUlRNUFB1Ymxpc2hlckV2ZW50VHlwZXMuRU1CRURfRkFJTFVSRSwgc2VsZikpXG4gICAgICB9XG4gICAgfVxuICAgIHJldHVybiBkZWZlcnJlZC5wcm9taXNlXG4gIH1cblxuICAvKipcbiAgICogUmVxdWVzdCB0byBiZWluZy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V0KHRpbWVvdXQpXG4gICAgICAgICAgICAgICAgc3JjSGFuZGxlci5jb25uZWN0KEpTT04uc3RyaW5naWZ5KHB1Ymxpc2hPcHRpb25zKSlcbiAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgIGlmIChjb3VudCsrID4gbGltaXQpIHtcbiAgICAgICAgICAgICAgICAgIHRocm93IGVcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgdHJ5Q29ubmVjdCgpXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LCAzMDApXG4gICAgICAgICAgfVxuICAgICAgICAgIHRyeUNvbm5lY3QoKVxuICAgICAgICB9KVxuICAgICAgICAuY2F0Y2goZXJyID0+IHtcbiAgICAgICAgICBkZmQucmVqZWN0KGVycilcbiAgICAgICAgICB0aGlzLnRyaWdnZXIobmV3IFB1Ymxpc2hlckV2ZW50KFB1Ymxpc2hlckV2ZW50VHlwZXMuQ09OTkVDVF9GQUlMVVJFLCB0aGlzKSlcbiAgICAgICAgfSlcbiAgICB9IGNhdGNoIChlKSB7XG4gICAgICBlcnJvcihOQU1FLCAnW2hhbmRsZXI6ZW1iZWQ6ZXJyb3JdJylcbiAgICAgIGRmZC5yZWplY3QoYENvdWxkIG5vdCBpbml0aWF0ZSBjb25uZWN0aW9uIHNlcXVlbmNlLiBSZWFzb246ICR7ZS5tZXNzYWdlfWApXG4gICAgICB0aGlzLnRyaWdnZXIobmV3IFB1Ymxpc2hlckV2ZW50KFB1Ymxpc2hlckV2ZW50VHlwZXMuQ09OTkVDVF9GQUlMVVJFLCB0aGlzKSlcbiAgICAgIHRoaXMuX3RlYXJEb3duQ29ubmVjdENhbGxiYWNrKClcbiAgICB9XG4gICAgdGhpcy5fY29ubmVjdEZ1dHVyZSA9IGRmZFxuICAgIHJldHVybiBkZmQucHJvbWlzZVxuICB9XG5cbiAgLyoqXG4gICAqIFJlcXVlc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pXG4gICAgICAgICAgfVxuICAgICAgICB9KVxuICAgICAgfVxuXG4gICAgICB0cnkge1xuICAgICAgICBlbnZpcm9ubWVudC5pbmplY3RTY3JpcHQodGhpcy5fb3B0aW9ucy5zd2ZvYmplY3RVUkwpXG4gICAgICAgICAgLnRoZW4oKCkgPT4ge1xuICAgICAgICAgICAgY29uc3QgZW1iZWREZmQgPSB0aGlzLl9lbWJlZFByb21pc2VcbiAgICAgICAgICAgIGRlYnVnKE5BTUUsICdTV0ZPYmplY3QgZW1iZWRkZWQuJylcbiAgICAgICAgICAgIGlmICh0aGlzLl9zb3VyY2VIYW5kbGVyKSB7XG4gICAgICAgICAgICAgIHRoaXMuX3NvdXJjZUhhbmRsZXIuYWRkU291cmNlKHRoaXMuX2VsZW1lbnRJZCwgdGhpcy5fb3B0aW9ucylcbiAgICAgICAgICAgICAgICAudGhlbihzdWJzY3JpYmVySWQgPT4ge1xuICAgICAgICAgICAgICAgICAgdGhpcy5fZXN0YWJsaXNoRXh0SW50SGFuZGxlcnMoc3Vic2NyaWJlcklkKVxuICAgICAgICAgICAgICAgICAgZW1iZWREZmQucmVzb2x2ZSh0aGlzKVxuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgLmNhdGNoKGVyciA9PiB7XG4gICAgICAgICAgICAgICAgICBlbWJlZERmZC5yZWplY3QoZXJyKVxuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgIHJldHVybiB0aGlzLl9nZXRFbWJlZFByb21pc2UoKVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZXN0YWJsaXNoU291cmNlSGFuZGxlcigpXG4gICAgICAgICAgICByZXR1cm4gdHJ1ZVxuICAgICAgICAgIH0pXG4gICAgICAgICAgLnRoZW4oKCkgPT4ge1xuICAgICAgICAgICAgdGhpcy5fc2V0Vmlld0lmTm90RXhpc3QodGhpcy5fdmlldywgdGhpcy5fb3B0aW9ucy5tZWRpYUVsZW1lbnRJZClcbiAgICAgICAgICAgIG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AgICBjb25zdCBoYXNEZWZpbmVkQ29udHJvbHMgPSBvcHRpb25zLmNvbnRyb2xzXG4gICAgY29uc3QgaXNNdXRlZCA9IGVudmlyb25tZW50Lmhhc0F0dHJpYnV0ZURlZmluZWQodGhpcy5tZWRpYSwgJ211dGVkJylcbiAgICBjb25zdCB1c2VQbGF5YmFja0NvbnRyb2xzID0gZW52aXJvbm1lbnQuaGFzQXR0cmlidXRlRGVmaW5lZCh0aGlzLm1lZGlhLCAnY29udHJvbHMnKSAmJiBlbnZpcm9ubWVudC5oYXNDbGFzc0RlZmluZWQodGhpcy5tZWRpYSwgJ3JlZDVwcm8tbWVkaWEnKVxuICAgIHRoaXMuX2VtYmVkTWVkaWFTb3VyY2UodXJsLCB0eXBlLCBvcHRpb25zKVxuICAgICAgLnRoZW4oICgpID0+IHtcbiAgICAgICAgaWYgKGhhc0RlZmluZWRDb250cm9scyB8fCB1c2VQbGF5YmFja0NvbnRyb2xzKSB7XG4gICAgICAgICAgaWYgKGhhc0RlZmluZWRDb250cm9scykge1xuICAgICAgICAgICAgdGhpcy5fY29udHJvbHMgPSBvcHRpb25zLmNvbnRyb2xzXG4gICAgICAgICAgfVxuICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgdGhpcy5fY29udHJvbHMgPSBuZXcgUGxheWJhY2tDb250cm9sc0ltcGwodGhpcywgdGhpcy5ob2xkZXIpXG4gICAgICAgICAgfVxuICAgICAgICAgIHRoaXMubWVkaWEuY29udHJvbHMgPSBmYWxzZVxuICAgICAgICAgIHRoaXMuX2NvbnRyb2xzLnNldEFzVk9EKHRoaXMuaXNWT0QpXG4gICAgICAgICAgdGhpcy5fY29udHJvbHMuc2V0TXV0ZWRTdGF0ZShpc011dGVkKVxuICAgICAgICB9XG4gICAgICAgIHRoaXMuX2FkZFBsYXliYWNrSGFuZGxlcnModGhpcy5fcGxheWJhY2tOb3RpZmljYXRpb25DZW50ZXIpXG4gICAgICAgIGRlZmVycmVkLnJlc29sdmUoKVxuIC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AgICAgIGlmICh0eXBlb2Ygb3B0aW9ucy5jb25uZWN0aW9uUGFyYW1zICE9PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgIGZsYXNodmFycy5jb25uZWN0aW9uUGFyYW1zID0gZW5jb2RlVVJJQ29tcG9uZW50KEpTT04uc3RyaW5naWZ5KG9wdGlvbnMuY29ubmVjdGlvblBhcmFtcykpXG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGVtYmVkLmVtYmVkU3dmT2JqZWN0KHN3ZklkLCBvcHRpb25zLCBmbGFzaHZhcnMsIGVudmlyb25tZW50LmdldFN3Zk9iamVjdCgpLCBlbGVtZW50SWQpXG4gICAgICB9KVxuICAgICAgLnRoZW4oICgpID0+IHtcbiAgICAgICAgaWYgKGhhc0RlZmluZWRDb250cm9scyB8fCB1c2VQbGF5YmFja0NvbnRyb2xzKSB7XG4gICAgICAgICAgaWYgKGhhc0RlZmluZWRDb250cm9scykge1xuICAgICAgICAgICAgdGhpcy5fY29udHJvbHMgPSBvcHRpb25zLmNvbnRyb2xzXG4gICAgICAgICAgfVxuICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgdGhpcy5fY29udHJvbHMgPSBuZXcgUGxheWJhY2tDb250cm9sc0ltcGwodGhpcywgdGhpcy5ob2xkZXIpXG4gICAgICAgICAgfVxuICAgICAgICAgIHRoaXMubWVkaWEuY29udHJvbHMgPSBmYWxzZVxuICAgICAgICAgIHRoaXMuX2NvbnRyb2xzLnNldEFzVk9EKGlzVk9EU3RyZWFtTmFtZShvcHRpb25zLnN0cmVhbU5hbWUpKVxuICAgICAgICAgIHRoaXMuX2NvbnRyb2xzLnNldE11dGVkU3RhdGUoaXNNdXRlZClcbiAgICAgICAgICBjb25zdCBlbWJlZGRlZCA9IHRoaXMuZ2V0RW1iZWRkZWRWaWV3KClcbiAgICAgICAgICBsZXQgaW5kZXggPSBjbGFzc0xpc3QubGVuZ3RoLCBjbGF6elxuICAgICAgICAgIHdoaWxlICgtLWluZGV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ylcbiAgLCBpc0FycmF5ICAgICAgICA9IHJlcXVpcmUoJy4vX2lzLWFycmF5JylcbiAgLCBhbk9iamVjdCAgICAgICA9IHJlcXVpcmUoJy4vX2FuLW9iamVjdCcpXG4gICwgdG9JT2JqZWN0ICAgICAgPSByZXF1aXJlKCcuL190by1pb2JqZWN0JylcbiAgLCB0b1ByaW1pdGl2ZSAgICA9IHJlcXVpcmUoJy4vX3RvLXByaW1pdGl2ZScpXG4gICwgY3JlYXRlRGVzYyAgICAgPSByZXF1aXJlKCcuL19wcm9wZXJ0eS1kZXNjJylcbiAgLCBfY3JlYXRlICAgICAgICA9IHJlcXVpcmUoJy4vX29iamVjdC1jcmVhdGUnKVxuICAsIGdPUE5FeHQgICAgICAgID0gcmVxdWlyZSgnLi9fb2JqZWN0LWdvcG4tZXh0JylcbiAgLCAkR09QRCAgICAgICAgICA9IHJlcXVpcmUoJy4vX29iamVjdC1nb3BkJylcbiAgLCAkRFAgICAgICAgICAgICA9IHJlcXVpcmUoJy4vX29iamVjdC1kcCcpXG4gICwgJGtleXMgICAgICAgICAgPSByZXF1aXJlKCcuL19vYmplY3Qta2V5cycpXG4gICwgZ09QRCAgICAgICAgICAgPSAkR09QRC5mXG4gICwgZFAgICAgICAgICAgICAgPSAkRFAuZlxuICAsIGdPUE4gICAgICAgICAgID0gZ09QTkV4dC5mXG4gICwgJFN5bWJvbCAgICAgICAgPSBnbG9iYWwuU3ltYm9sXG4gICwgJEpTT04gICAgICAgICAgPSBnbG9iYWwuSlNPTlxuICAsIF9zdHJpbmdpZnkgICAgID0gJEpTT04gJiYgJEpTT04uc3RyaW5naWZ5XG4gICwgUFJPVE9UWVBFICAgICAgPSAncHJvdG90eXBlJ1xuICAsIEhJRERFTiAgICAgICAgID0gd2tzKCdfaGlkZGVuJylcbiAgLCBUT19QUklNSVRJVkUgICA9IHdrcygndG9QcmltaXRpdmUnKVxuICAsIGlzRW51bSAgICAgICAgID0ge30ucHJvcGVydHlJc0VudW1lcmFibGVc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HJvdyBjb250ZXh0LmFyZztcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBjb250ZXh0LmRpc3BhdGNoRXhjZXB0aW9uKGNvbnRleHQuYXJnKTtcblxuICAgICAgICB9IGVsc2UgaWYgKGNvbnRleHQubWV0aG9kID09PSBcInJldHVyblwiKSB7XG4gICAgICAgICAgY29udGV4dC5hYnJ1cHQoXCJyZXR1cm5cIiwgY29udGV4dC5hcmcpO1xuICAgICAgICB9XG5cbiAgICAgICAgc3RhdGUgPSBHZW5TdGF0ZUV4ZWN1dGluZztcblxuICAgICAgICB2YXIgcmVjb3JkID0gdHJ5Q2F0Y2goaW5uZXJGbiwgc2VsZiwgY29udGV4dCk7XG4gICAgICAgIGlmIChyZWNvcmQudHlwZSA9PT0gXCJub3JtYWxcIikge1xuICAgICAgICAgIC8vIElmIGFuIGV4Y2VwdGlvbiBpcyB0aHJvd24gZnJvbSBpbm5lckZuLCB3ZSBsZWF2ZSBzdGF0ZSA9PT1cbiAgICAgICAgICAvLyBHZW5TdGF0ZUV4ZWN1dGluZyBhbmQgbG9vcCBiYWNrIGZvciBhbm90aGVyIGludm9jYXRpb24uXG4gICAgICAgICAgc3RhdGUgPSBjb250ZXh0LmRvbmVcbiAgICAgICAgICAgID8gR2VuU3RhdGVDb21wbGV0ZWRcbiAgICAgICAgICAgIDogR2VuU3RhdGVTdXNwZW5kZWRZaWVsZDtcblxuICAgICAgICAgIGlmIChyZWNvcmQuYXJnID09PSBDb250aW51ZVNlbnRpbmVsKSB7XG4gICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgdmFsdWU6IHJlY29yZC5hcmcsXG4gICAgICAgICAgICBkb25lOiBjb250ZXh0LmRvbmVcbiAgICAgICAgICB9O1xuXG4gICAgICAgIH0gZWxzZSBpZiAocmVjb3JkLnR5cGUgPT09IFwidGhyb3dcIikge1xuICAgICAgICAgIHN0YXRlID0gR2VuU3Rhd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bGVnYXRlID0gbnVsbDtcblxuICAgICAgaWYgKGNvbnRleHQubWV0aG9kID09PSBcInRocm93XCIpIHtcbiAgICAgICAgaWYgKGRlbGVnYXRlLml0ZXJhdG9yLnJldHVybikge1xuICAgICAgICAgIC8vIElmIHRoZSBkZWxlZ2F0ZSBpdGVyYXRvciBoYXMgYSByZXR1cm4gbWV0aG9kLCBnaXZlIGl0IGFcbiAgICAgICAgICAvLyBjaGFuY2UgdG8gY2xlYW4gdXAuXG4gICAgICAgICAgY29udGV4dC5tZXRob2QgPSBcInJldHVyblwiO1xuICAgICAgICAgIGNvbnRleHQuYXJnID0gdW5kZWZpbmVkO1xuICAgICAgICAgIG1heWJlSW52b2tlRGVsZWdhdGUoZGVsZWdhdGUsIGNvbnRleHQpO1xuXG4gICAgICAgICAgaWYgKGNvbnRleHQubWV0aG9kID09PSBcInRocm93XCIpIHtcbiAgICAgICAgICAgIC8vIElmIG1heWJlSW52b2tlRGVsZWdhdGUoY29udGV4dCkgY2hhbmdlZCBjb250ZXh0Lm1ldGhvZCBmcm9tXG4gICAgICAgICAgICAvLyBcInJldHVyblwiIHRvIFwidGhyb3dcIiwgbGV0IHRoYXQgb3ZlcnJpZGUgdGhlIFR5cGVFcnJvciBiZWxvdy5cbiAgICAgICAgICAgIHJldHVybiBDb250aW51ZVNlbnRpbmVsO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnRleHQubWV0aG9kID0gXCJ0aHJvd1wiO1xuICAgICAgICBjb250ZXh0LmFyZyA9IG5ldyBUeXBlRXJyb3IoXG4gICAgICAgICAgXCJUaGUgaXRlcmF0b3IgZG9lcyBub3QgcHJvdmlkZSBhICd0aHJvdycgbWV0aG9kXCIpO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gQ29udGludWVTZW50aW5lbDtcbiAgICB9XG5cbiAgICB2YXIgcmVjb3JkID0gdHJ5Q2F0Y2gobWV0aG9kLCBkZWxlZ2F0ZS5pdGVyYXRvciwgY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HtcbiAgICAgICAgICAvLyBFeGNlcHRpb24gdGhyb3duIG91dHNpZGUgb2YgYW55IHRyeSBibG9jayB0aGF0IGNvdWxkIGhhbmRsZVxuICAgICAgICAgIC8vIGl0LCBzbyBzZXQgdGhlIGNvbXBsZXRpb24gdmFsdWUgb2YgdGhlIGVudGlyZSBmdW5jdGlvbiB0b1xuICAgICAgICAgIC8vIHRocm93IHRoZSBleGNlcHRpb24uXG4gICAgICAgICAgcmV0dXJuIGhhbmRsZShcImVuZFwiKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChlbnRyeS50cnlMb2MgPD0gdGhpcy5wcmV2KSB7XG4gICAgICAgICAgdmFyIGhhc0NhdGNoID0gaGFzT3duLmNhbGwoZW50cnksIFwiY2F0Y2hMb2NcIik7XG4gICAgICAgICAgdmFyIGhhc0ZpbmFsbHkgPSBoYXNPd24uY2FsbChlbnRyeSwgXCJmaW5hbGx5TG9jXCIpO1xuXG4gICAgICAgICAgaWYgKGhhc0NhdGNoICYmIGhhc0ZpbmFsbHkpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnByZXYgPCBlbnRyeS5jYXRjaExvYykge1xuICAgICAgICAgICAgICByZXR1cm4gaGFuZGxlKGVudHJ5LmNhdGNoTG9jLCB0cnVlKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAodGhpcy5wcmV2IDwgZW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAgICAgICByZXR1cm4gaGFuZGxlKGVudHJ5LmZpbmFsbHlMb2MpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgfSBlbHNlIGlmIChoYXNDYXRjaCkge1xuICAgICAgICAgICAgaWYgKHRoaXMucHJldiA8IGVudHJ5LmNhdGNoTG9jKSB7XG4gICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuY2F0Y2hMb2MsIHRydWUpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgfSBlbHNlIGlmIChoYXNGaW5hbGx5KSB7XG4gICAgICAgICAgICBpZiAodGhpcy5wcmV2IDwgZW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAgICAgICByZXR1cm4gaGFuZGxlKGVudHJ5LmZpbmFsbHlMb2MpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcInRyeSBzdGF0ZW1lbnQgd2l0aG91dCBjYXRjaCBvciBmaW5hbGx5XCIpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0sXG5cbiAgICBhYnJ1cHQ6IGZ1bmN0aW9uKHR5cGUsIGFyZykge1xuICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG4gICAgICAgIGlmIChlbnRyeS50cnlMb2MgPD0gdGhpcy5wcmV2ICYmXG4gICAgICAgICAgICBoYXNPd24uY2FsbChlbnRyeSwgXCJmaW5hbGx5TG9jXCIpICYmXG4gICAgICAgICAgICB0aGlzLnByZXYgPCBlbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgICAgdmFyIGZpbmFsbHlFbnRyeSA9IGVudHJ5O1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIGlmIChmaW5hbGx5RW50cnkgJiZcbiAgICAgICAgICAodHlwZSA9PT0gXCJicmVha1wiIHx8XG4gICAgICAgICAgIHR5cGUgPT09IFwiY29udGludWVcIikgJiZcbiAgICAgICAgICBmaW5hbGx5RW50cnkudHJ5TG9jIDw9IGFyZyAmJlxuICAgICAgICAgIGFyZyA8PSBmaW5hbGx5RW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAvLyBJZ25vcmUgdGhlIGZpbmFsbHkgZW50cnkgaWYgY29udHJvbCBpcyBub3QganVtcGluZyB0byBhXG4gICA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doaWNoIHZpb2xhdGVzIENvbnRlbnQgU2VjdXJpdHkgUG9saWN5LlxuICAoZnVuY3Rpb24oKSB7IHJldHVybiB0aGlzIH0pKCkgfHwgRnVuY3Rpb24oXCJyZXR1cm4gdGhpc1wiKSgpXG4pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9+L3JlZ2VuZXJhdG9yLXJ1bnRpbWUvcnVudGltZS5qc1xuLy8gbW9kdWxlIGlkID0gMjA3XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJzb3VyY2VSb290IjoiIn0= \ No newline at end of file diff --git a/examples/browser/lib/red5pro/red5pro-subscriber.swf b/examples/browser/lib/red5pro/red5pro-subscriber.swf new file mode 100644 index 0000000000000000000000000000000000000000..d31a2224694c11d1d54401d8c1d8657cea433f2f GIT binary patch literal 8661 zcmV;`Au8TOS5ptnI{*N9+Lb#8cpSym^Je#U?oP!g$(DuO)>xJcYe_B`EWoxb>1+vG zXH*OUBwj-{?{ty{ z-~ao&*?sfo&6_v#>a0E=VcK@asz1+I9k7n73m9X!)O-^dyF3%KT6;T!`jOFOD%*;^ zD^|sGxv|#f=EH{%Hyz&Cl+KJauivs|OLNPH<_#OxA;r4v(Nr#cWL+w|V%1j3pu@~Y zGl{WWBAwEyAC9EQb62cd<#LThi%iGHGfBxZ7Hu|@=BSymCKDu1lbl*Qff$U9N0Nzb+{|q4N?Dn326;%jX*^LyGiErK zo=sE05=Anc8W|6dm|Jg5rlaAcd9$P_Vx_F%oVm4oJf&Y^=o?zrU+Tz1$jh5&owkcX z1#V>>fnO_^vvxi;HFd3DK@DrzRPB*#nf!P6-&(#OMU6k@@4dKhJVGoYW`=!k{(V~* zLp(!?N6qytz?ztk9rHY=09RCvsm}C&-r~IfxXpP#x9u*4sfW^um==m0FrzuGFPBNA zM#PSEI%$Se&#Pbai2v%FL{THjbEkuyDq5-~Gf=Eyo~ z#u8!AKEi16bP}cXrR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D!LeBLn3>sCtF{3u|J9y?`}w1>5Xb zwK6Qe!z_%@&RRl zu6<)fR_7B|5~(JsBA*Cl z(3OYsI+{Cjxg5ZwX?Bb8TaG4wMZs;4aW~jsca4H>y8$V;qJC5-9&h79QIFD*k}IBs zsE0~N4Wn@0SYzGFDM&let_kZnN2G$JoidpwLlN${gZ>Z{Kt3nr!SHL;CGi7@ z@0`weL5_Z1M&TlywkN_VMD5hjKK2yC*+EQ!Xgf)HKb(w@+7T7gVj(5sz;KOq2Nq|C zrZ0!d;c5#ns@8bPH{@L^IQCgG!MSlwQ&S&FyZlJngrtpe3|JVC(gjDdt%Kx8f0^l+ zcX2YT?!v59FFEVSGiO~%(Xy7T_^(*&-p#F(TxO9_j?Qnl*XPmhQ3@u5sSW|nHvW#Z z_wYi>A=vmQFBXksr<|`&S-fhT$y@jGWAo1jT7i7mx{q7;lV#b)zo{6<*@4fXSG%JA zgB$;G1%83=V~(V>Y(zEw%jd5mv$G!H^m~vS=lJjj>mD$sctkUvg8`%uy^=%VD!SuD z1)i++DtdUL}7LxpHZ0I$7dF1*q>dP4Ij3t&U!V+ zcz72lU%BeV$}FUrU1lL_`(8W{+qgq1AZC|Yh{A=7Wma#o%(_#_&!W#4)+m-)&SWgJ n9^x-qX7v@~^=o*s%<^EouAr|vHT2iw8UIUjJ0kuUhrOCG5MSS^ literal 0 HcmV?d00001 diff --git a/examples/browser/lib/red5pro/red5pro-video.css b/examples/browser/lib/red5pro/red5pro-video.css new file mode 100644 index 0000000..e30ab94 --- /dev/null +++ b/examples/browser/lib/red5pro/red5pro-video.css @@ -0,0 +1,165 @@ +.red5pro-video-container { + display: block; + box-sizing: border-box; + position: relative; + height: 100%; +} + +.red5pro-video { + width: 100%; +} + +.red5pro-video-background { + background-color: #000; +} + +.red5pro-video-container-full-screen { + width: 100% !important; + height: 100% !important; + overflow: hidden !important; +} + +.red5pro-video-object { + position: absolute; + top: 0; + left: 0; +} + +.red5pro-video-control-bar { + font-family: sans-serif; + opacity: 0; + display: flex; + align-items: center; + flex-direction: row; + flex-align: center; + display: -ms-flexbox; + -ms-flex-direction: row; + -ms-flex-align: center; + -ms-flex-pack: justify; + position: absolute; + bottom: 0; + left: 0; + right: 0; + height: 1.5em; + padding: 0.5em; + background-color: rgba(255, 255, 255, 0.9); + color: #595959; + -webkit-transition: opacity 0.5s ease-in-out; + -moz-transition: opacity 0.5s ease-in-out; + -ms-transition: opacity 0.5s ease-in-out; + -o-transition: opacity 0.5s ease-in-out; + transition: opacity 0.5s ease-in-out; +} + +input[type=range][orient=vertical] { + writing-mode: bt-lr; /* IE */ + -webkit-appearance: slider-vertical; /* WebKit */ + width: 8px; + height: 175px; + padding: 0 5px; +} + +.red5pro-video-control-bar-show { + opacity: 1; +} + +.red5pro-video-control-element { + margin: 0 0.5em; + cursor: pointer; +} +.red5pro-video-time-field { + font-size: 0.8em; + line-height: 1em; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -o-user-select: none; + user-select: none; +} + +.red5pro-video-slider { + flex-grow: 1; + -webkit-appearance: none !important; /*Needed to reset default slider styles */ + transition: all 0.3s ease; + margin-top: 0.8em; + cursor: pointer; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -o-user-select: none; + user-select: none; +} + +.red5pro-video-volume-slider { + max-width: 110px;} + +.red5pro-video-seektime-slider { +} + +.red5pro-video-slider-track { + background-color: #595959; + height: 0.2em; + position: relative; + display: block; + top: 0.1em +} + +.red5pro-video-slider-progress { + background-color: #4286F4; + height: 0.2em; + position: absolute; + display: block; + top: 1.2em; +} + +.red5pro-video-slider-button { + width: 1em; + height: 1em; + top: -0.5em; + position: relative; + display: block; + border-radius: 20px; + background-color: #4286F4; +} + +.red5pro-video-slider-disabled { + background-color: #bbb; + cursor: arrow; +} + +.red5pro-video-element-button { + width: 24px; + height: 24px; + display: inline-block; + background-size: 100% 100%; + background-position: 50% 50%; + background-color: transparent; + background-repeat: no-repeat; + border: none; + cursor: pointer; +} + +.red5pro-video-play-button { + background-image: url(icons/play.png); +} + +.red5pro-video-pause-button { + background-image: url(icons/pause.png); +} + +.red5pro-video-unmute-button { + background-image: url(icons/volume-2.png); +} + +.red5pro-video-mute-button { + background-image: url(icons/volume-x.png); +} + +.red5pro-video-fullscreen-button { + background-image: url(icons/maximize.png); +} + +.red5pro-video-exit-fullscreen-button { + background-image: url(icons/minimize.png); +} + diff --git a/examples/browser/lib/screenfull/screenfull.min.js b/examples/browser/lib/screenfull/screenfull.min.js new file mode 100644 index 0000000..e08c0a2 --- /dev/null +++ b/examples/browser/lib/screenfull/screenfull.min.js @@ -0,0 +1,6 @@ +/*! +* screenfull +* v3.2.0 - 2017-04-16 +* (c) Sindre Sorhus; MIT License +*/ +!function(){"use strict";var a="undefined"==typeof window?{}:window.document,b="undefined"!=typeof module&&module.exports,c="undefined"!=typeof Element&&"ALLOW_KEYBOARD_INPUT"in Element,d=function(){for(var b,c=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],d=0,e=c.length,f={};dGCuViByG~|XgJ(bJp~q+`f){V4c=Tk!n-K9Tcv0|Qh}4-)Z5q%$%)ak4^FGh} zG4mKh>p=QFFsz{%nRVYDpaejJ54{eo7BqCbU1T$6A?_UfdU|tzr7->Edg5~QJ`!s!OO;20fpVHsv=YsdQ{lvI<6(v2yrdS7`6LQi8#uy`}SX?Ni6O)r6`%Pye4YxmY_|vs1r$ zYS62JJit*Qq5)1^TgC)o6KZQEG=%VHP4mC>rXSoh>x{G-y~501s42xbb%oj5teYed zUazfuM*8z%%PQW6Lm}m@hf8V%w#-l*H+45VumzOSNh6MI zfwTnD68J}cRU>5EordGe5i?c`=PYmF$$^*q^20~+G3o1>u%sdEL~sE;XrvE~96_TY z1oQ%v(6hbD$HElG!xl|cjZOyoWIw@E;qK|`oT|Xk&*+o6#W@8T{oeJ8I9m-_V~Lc) rrowHdr=QEu;UGRC%}bhmYZ>GFiMOQQ+m?EJQA~aL;e`Gll9T{P!97I~ literal 0 HcmV?d00001 diff --git a/examples/browser/lib/swfobject/swfobject.js b/examples/browser/lib/swfobject/swfobject.js new file mode 100644 index 0000000..bf35c07 --- /dev/null +++ b/examples/browser/lib/swfobject/swfobject.js @@ -0,0 +1,777 @@ +/*! SWFObject v2.2 + is released under the MIT License +*/ + +var swfobject = function() { + + var UNDEF = "undefined", + OBJECT = "object", + SHOCKWAVE_FLASH = "Shockwave Flash", + SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash", + FLASH_MIME_TYPE = "application/x-shockwave-flash", + EXPRESS_INSTALL_ID = "SWFObjectExprInst", + ON_READY_STATE_CHANGE = "onreadystatechange", + + win = window, + doc = document, + nav = navigator, + + plugin = false, + domLoadFnArr = [main], + regObjArr = [], + objIdArr = [], + listenersArr = [], + storedAltContent, + storedAltContentId, + storedCallbackFn, + storedCallbackObj, + isDomLoaded = false, + isExpressInstallActive = false, + dynamicStylesheet, + dynamicStylesheetMedia, + autoHideShow = true, + + /* Centralized function for browser feature detection + - User agent string detection is only used when no good alternative is possible + - Is executed directly for optimal performance + */ + ua = function() { + var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF, + u = nav.userAgent.toLowerCase(), + p = nav.platform.toLowerCase(), + windows = p ? /win/.test(p) : /win/.test(u), + mac = p ? /mac/.test(p) : /mac/.test(u), + webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit + ie = !+"\v1", // feature detection based on Andrea Giammarchi's solution: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html + playerVersion = [0,0,0], + d = null; + if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) { + d = nav.plugins[SHOCKWAVE_FLASH].description; + if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+ + plugin = true; + ie = false; // cascaded feature detection for Internet Explorer + d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1"); + playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10); + playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10); + playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0; + } + } + else if (typeof win.ActiveXObject != UNDEF) { + try { + var a = new ActiveXObject(SHOCKWAVE_FLASH_AX); + if (a) { // a will return null when ActiveX is disabled + d = a.GetVariable("$version"); + if (d) { + ie = true; // cascaded feature detection for Internet Explorer + d = d.split(" ")[1].split(","); + playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)]; + } + } + } + catch(e) {} + } + return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac }; + }(), + + /* Cross-browser onDomLoad + - Will fire an event as soon as the DOM of a web page is loaded + - Internet Explorer workaround based on Diego Perini's solution: http://javascript.nwbox.com/IEContentLoaded/ + - Regular onload serves as fallback + */ + onDomLoad = function() { + if (!ua.w3) { return; } + if ((typeof doc.readyState != UNDEF && doc.readyState == "complete") || (typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { // function is fired after onload, e.g. when script is inserted dynamically + callDomLoadFunctions(); + } + if (!isDomLoaded) { + if (typeof doc.addEventListener != UNDEF) { + doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, false); + } + if (ua.ie && ua.win) { + doc.attachEvent(ON_READY_STATE_CHANGE, function() { + if (doc.readyState == "complete") { + doc.detachEvent(ON_READY_STATE_CHANGE, arguments.callee); + callDomLoadFunctions(); + } + }); + if (win == top) { // if not inside an iframe + (function(){ + if (isDomLoaded) { return; } + try { + doc.documentElement.doScroll("left"); + } + catch(e) { + setTimeout(arguments.callee, 0); + return; + } + callDomLoadFunctions(); + })(); + } + } + if (ua.wk) { + (function(){ + if (isDomLoaded) { return; } + if (!/loaded|complete/.test(doc.readyState)) { + setTimeout(arguments.callee, 0); + return; + } + callDomLoadFunctions(); + })(); + } + addLoadEvent(callDomLoadFunctions); + } + }(); + + function callDomLoadFunctions() { + if (isDomLoaded) { return; } + try { // test if we can really add/remove elements to/from the DOM; we don't want to fire it too early + var t = doc.getElementsByTagName("body")[0].appendChild(createElement("span")); + t.parentNode.removeChild(t); + } + catch (e) { return; } + isDomLoaded = true; + var dl = domLoadFnArr.length; + for (var i = 0; i < dl; i++) { + domLoadFnArr[i](); + } + } + + function addDomLoadEvent(fn) { + if (isDomLoaded) { + fn(); + } + else { + domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+ + } + } + + /* Cross-browser onload + - Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/ + - Will fire an event as soon as a web page including all of its assets are loaded + */ + function addLoadEvent(fn) { + if (typeof win.addEventListener != UNDEF) { + win.addEventListener("load", fn, false); + } + else if (typeof doc.addEventListener != UNDEF) { + doc.addEventListener("load", fn, false); + } + else if (typeof win.attachEvent != UNDEF) { + addListener(win, "onload", fn); + } + else if (typeof win.onload == "function") { + var fnOld = win.onload; + win.onload = function() { + fnOld(); + fn(); + }; + } + else { + win.onload = fn; + } + } + + /* Main function + - Will preferably execute onDomLoad, otherwise onload (as a fallback) + */ + function main() { + if (plugin) { + testPlayerVersion(); + } + else { + matchVersions(); + } + } + + /* Detect the Flash Player version for non-Internet Explorer browsers + - Detecting the plug-in version via the object element is more precise than using the plugins collection item's description: + a. Both release and build numbers can be detected + b. Avoid wrong descriptions by corrupt installers provided by Adobe + c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports + - Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available + */ + function testPlayerVersion() { + var b = doc.getElementsByTagName("body")[0]; + var o = createElement(OBJECT); + o.setAttribute("type", FLASH_MIME_TYPE); + var t = b.appendChild(o); + if (t) { + var counter = 0; + (function(){ + if (typeof t.GetVariable != UNDEF) { + var d = t.GetVariable("$version"); + if (d) { + d = d.split(" ")[1].split(","); + ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)]; + } + } + else if (counter < 10) { + counter++; + setTimeout(arguments.callee, 10); + return; + } + b.removeChild(o); + t = null; + matchVersions(); + })(); + } + else { + matchVersions(); + } + } + + /* Perform Flash Player and SWF version matching; static publishing only + */ + function matchVersions() { + var rl = regObjArr.length; + if (rl > 0) { + for (var i = 0; i < rl; i++) { // for each registered object element + var id = regObjArr[i].id; + var cb = regObjArr[i].callbackFn; + var cbObj = {success:false, id:id}; + if (ua.pv[0] > 0) { + var obj = getElementById(id); + if (obj) { + if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { // Flash Player version >= published SWF version: Houston, we have a match! + setVisibility(id, true); + if (cb) { + cbObj.success = true; + cbObj.ref = getObjectById(id); + cb(cbObj); + } + } + else if (regObjArr[i].expressInstall && canExpressInstall()) { // show the Adobe Express Install dialog if set by the web page author and if supported + var att = {}; + att.data = regObjArr[i].expressInstall; + att.width = obj.getAttribute("width") || "0"; + att.height = obj.getAttribute("height") || "0"; + if (obj.getAttribute("class")) { att.styleclass = obj.getAttribute("class"); } + if (obj.getAttribute("align")) { att.align = obj.getAttribute("align"); } + // parse HTML object param element's name-value pairs + var par = {}; + var p = obj.getElementsByTagName("param"); + var pl = p.length; + for (var j = 0; j < pl; j++) { + if (p[j].getAttribute("name").toLowerCase() != "movie") { + par[p[j].getAttribute("name")] = p[j].getAttribute("value"); + } + } + showExpressInstall(att, par, id, cb); + } + else { // Flash Player and SWF version mismatch or an older Webkit engine that ignores the HTML object element's nested param elements: display alternative content instead of SWF + displayAltContent(obj); + if (cb) { cb(cbObj); } + } + } + } + else { // if no Flash Player is installed or the fp version cannot be detected we let the HTML object element do its job (either show a SWF or alternative content) + setVisibility(id, true); + if (cb) { + var o = getObjectById(id); // test whether there is an HTML object element or not + if (o && typeof o.SetVariable != UNDEF) { + cbObj.success = true; + cbObj.ref = o; + } + cb(cbObj); + } + } + } + } + } + + function getObjectById(objectIdStr) { + var r = null; + var o = getElementById(objectIdStr); + if (o && o.nodeName == "OBJECT") { + if (typeof o.SetVariable != UNDEF) { + r = o; + } + else { + var n = o.getElementsByTagName(OBJECT)[0]; + if (n) { + r = n; + } + } + } + return r; + } + + /* Requirements for Adobe Express Install + - only one instance can be active at a time + - fp 6.0.65 or higher + - Win/Mac OS only + - no Webkit engines older than version 312 + */ + function canExpressInstall() { + return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312); + } + + /* Show the Adobe Express Install dialog + - Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75 + */ + function showExpressInstall(att, par, replaceElemIdStr, callbackFn) { + isExpressInstallActive = true; + storedCallbackFn = callbackFn || null; + storedCallbackObj = {success:false, id:replaceElemIdStr}; + var obj = getElementById(replaceElemIdStr); + if (obj) { + if (obj.nodeName == "OBJECT") { // static publishing + storedAltContent = abstractAltContent(obj); + storedAltContentId = null; + } + else { // dynamic publishing + storedAltContent = obj; + storedAltContentId = replaceElemIdStr; + } + att.id = EXPRESS_INSTALL_ID; + if (typeof att.width == UNDEF || (!/%$/.test(att.width) && parseInt(att.width, 10) < 310)) { att.width = "310"; } + if (typeof att.height == UNDEF || (!/%$/.test(att.height) && parseInt(att.height, 10) < 137)) { att.height = "137"; } + doc.title = doc.title.slice(0, 47) + " - Flash Player Installation"; + var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn", + fv = "MMredirectURL=" + encodeURI(window.location).toString().replace(/&/g,"%26") + "&MMplayerType=" + pt + "&MMdoctitle=" + doc.title; + if (typeof par.flashvars != UNDEF) { + par.flashvars += "&" + fv; + } + else { + par.flashvars = fv; + } + // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it, + // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work + if (ua.ie && ua.win && obj.readyState != 4) { + var newObj = createElement("div"); + replaceElemIdStr += "SWFObjectNew"; + newObj.setAttribute("id", replaceElemIdStr); + obj.parentNode.insertBefore(newObj, obj); // insert placeholder div that will be replaced by the object element that loads expressinstall.swf + obj.style.display = "none"; + (function(){ + if (obj.readyState == 4) { + obj.parentNode.removeChild(obj); + } + else { + setTimeout(arguments.callee, 10); + } + })(); + } + createSWF(att, par, replaceElemIdStr); + } + } + + /* Functions to abstract and display alternative content + */ + function displayAltContent(obj) { + if (ua.ie && ua.win && obj.readyState != 4) { + // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it, + // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work + var el = createElement("div"); + obj.parentNode.insertBefore(el, obj); // insert placeholder div that will be replaced by the alternative content + el.parentNode.replaceChild(abstractAltContent(obj), el); + obj.style.display = "none"; + (function(){ + if (obj.readyState == 4) { + obj.parentNode.removeChild(obj); + } + else { + setTimeout(arguments.callee, 10); + } + })(); + } + else { + obj.parentNode.replaceChild(abstractAltContent(obj), obj); + } + } + + function abstractAltContent(obj) { + var ac = createElement("div"); + if (ua.win && ua.ie) { + ac.innerHTML = obj.innerHTML; + } + else { + var nestedObj = obj.getElementsByTagName(OBJECT)[0]; + if (nestedObj) { + var c = nestedObj.childNodes; + if (c) { + var cl = c.length; + for (var i = 0; i < cl; i++) { + if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) { + ac.appendChild(c[i].cloneNode(true)); + } + } + } + } + } + return ac; + } + + /* Cross-browser dynamic SWF creation + */ + function createSWF(attObj, parObj, id) { + var r, el = getElementById(id); + if (ua.wk && ua.wk < 312) { return r; } + if (el) { + if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content + attObj.id = id; + } + if (ua.ie && ua.win) { // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML + var att = ""; + for (var i in attObj) { + if (attObj[i] != Object.prototype[i]) { // filter out prototype additions from other potential libraries + if (i.toLowerCase() == "data") { + parObj.movie = attObj[i]; + } + else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword + att += ' class="' + attObj[i] + '"'; + } + else if (i.toLowerCase() != "classid") { + att += ' ' + i + '="' + attObj[i] + '"'; + } + } + } + var par = ""; + for (var j in parObj) { + if (parObj[j] != Object.prototype[j]) { // filter out prototype additions from other potential libraries + par += ''; + } + } + el.outerHTML = '' + par + ''; + objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only) + r = getElementById(attObj.id); + } + else { // well-behaving browsers + var o = createElement(OBJECT); + o.setAttribute("type", FLASH_MIME_TYPE); + for (var m in attObj) { + if (attObj[m] != Object.prototype[m]) { // filter out prototype additions from other potential libraries + if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword + o.setAttribute("class", attObj[m]); + } + else if (m.toLowerCase() != "classid") { // filter out IE specific attribute + o.setAttribute(m, attObj[m]); + } + } + } + for (var n in parObj) { + if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // filter out prototype additions from other potential libraries and IE specific param element + createObjParam(o, n, parObj[n]); + } + } + el.parentNode.replaceChild(o, el); + r = o; + } + } + return r; + } + + function createObjParam(el, pName, pValue) { + var p = createElement("param"); + p.setAttribute("name", pName); + p.setAttribute("value", pValue); + el.appendChild(p); + } + + /* Cross-browser SWF removal + - Especially needed to safely and completely remove a SWF in Internet Explorer + */ + function removeSWF(id) { + var obj = getElementById(id); + if (obj && obj.nodeName == "OBJECT") { + if (ua.ie && ua.win) { + obj.style.display = "none"; + (function(){ + if (obj.readyState == 4) { + removeObjectInIE(id); + } + else { + setTimeout(arguments.callee, 10); + } + })(); + } + else { + obj.parentNode.removeChild(obj); + } + } + } + + function removeObjectInIE(id) { + var obj = getElementById(id); + if (obj) { + for (var i in obj) { + if (typeof obj[i] == "function") { + obj[i] = null; + } + } + obj.parentNode.removeChild(obj); + } + } + + /* Functions to optimize JavaScript compression + */ + function getElementById(id) { + var el = null; + try { + el = doc.getElementById(id); + } + catch (e) {} + return el; + } + + function createElement(el) { + return doc.createElement(el); + } + + /* Updated attachEvent function for Internet Explorer + - Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks + */ + function addListener(target, eventType, fn) { + target.attachEvent(eventType, fn); + listenersArr[listenersArr.length] = [target, eventType, fn]; + } + + /* Flash Player and SWF content version matching + */ + function hasPlayerVersion(rv) { + var pv = ua.pv, v = rv.split("."); + v[0] = parseInt(v[0], 10); + v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0" + v[2] = parseInt(v[2], 10) || 0; + return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false; + } + + /* Cross-browser dynamic CSS creation + - Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php + */ + function createCSS(sel, decl, media, newStyle) { + if (ua.ie && ua.mac) { return; } + var h = doc.getElementsByTagName("head")[0]; + if (!h) { return; } // to also support badly authored HTML pages that lack a head element + var m = (media && typeof media == "string") ? media : "screen"; + if (newStyle) { + dynamicStylesheet = null; + dynamicStylesheetMedia = null; + } + if (!dynamicStylesheet || dynamicStylesheetMedia != m) { + // create dynamic stylesheet + get a global reference to it + var s = createElement("style"); + s.setAttribute("type", "text/css"); + s.setAttribute("media", m); + dynamicStylesheet = h.appendChild(s); + if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) { + dynamicStylesheet = doc.styleSheets[doc.styleSheets.length - 1]; + } + dynamicStylesheetMedia = m; + } + // add style rule + if (ua.ie && ua.win) { + if (dynamicStylesheet && typeof dynamicStylesheet.addRule == OBJECT) { + dynamicStylesheet.addRule(sel, decl); + } + } + else { + if (dynamicStylesheet && typeof doc.createTextNode != UNDEF) { + dynamicStylesheet.appendChild(doc.createTextNode(sel + " {" + decl + "}")); + } + } + } + + function setVisibility(id, isVisible) { + if (!autoHideShow) { return; } + var v = isVisible ? "visible" : "hidden"; + if (isDomLoaded && getElementById(id)) { + getElementById(id).style.visibility = v; + } + else { + createCSS("#" + id, "visibility:" + v); + } + } + + /* Filter to avoid XSS attacks + */ + function urlEncodeIfNecessary(s) { + var regex = /[\\\"<>\.;]/; + var hasBadChars = regex.exec(s) != null; + return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s; + } + + /* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only) + */ + var cleanup = function() { + if (ua.ie && ua.win) { + window.attachEvent("onunload", function() { + // remove listeners to avoid memory leaks + var ll = listenersArr.length; + for (var i = 0; i < ll; i++) { + listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]); + } + // cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect + var il = objIdArr.length; + for (var j = 0; j < il; j++) { + removeSWF(objIdArr[j]); + } + // cleanup library's main closures to avoid memory leaks + for (var k in ua) { + ua[k] = null; + } + ua = null; + for (var l in swfobject) { + swfobject[l] = null; + } + swfobject = null; + }); + } + }(); + + return { + /* Public API + - Reference: http://code.google.com/p/swfobject/wiki/documentation + */ + registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) { + if (ua.w3 && objectIdStr && swfVersionStr) { + var regObj = {}; + regObj.id = objectIdStr; + regObj.swfVersion = swfVersionStr; + regObj.expressInstall = xiSwfUrlStr; + regObj.callbackFn = callbackFn; + regObjArr[regObjArr.length] = regObj; + setVisibility(objectIdStr, false); + } + else if (callbackFn) { + callbackFn({success:false, id:objectIdStr}); + } + }, + + getObjectById: function(objectIdStr) { + if (ua.w3) { + return getObjectById(objectIdStr); + } + }, + + embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) { + var callbackObj = {success:false, id:replaceElemIdStr}; + if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) { + setVisibility(replaceElemIdStr, false); + addDomLoadEvent(function() { + widthStr += ""; // auto-convert to string + heightStr += ""; + var att = {}; + if (attObj && typeof attObj === OBJECT) { + for (var i in attObj) { // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs + att[i] = attObj[i]; + } + } + att.data = swfUrlStr; + att.width = widthStr; + att.height = heightStr; + var par = {}; + if (parObj && typeof parObj === OBJECT) { + for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs + par[j] = parObj[j]; + } + } + if (flashvarsObj && typeof flashvarsObj === OBJECT) { + for (var k in flashvarsObj) { // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs + if (typeof par.flashvars != UNDEF) { + par.flashvars += "&" + k + "=" + flashvarsObj[k]; + } + else { + par.flashvars = k + "=" + flashvarsObj[k]; + } + } + } + if (hasPlayerVersion(swfVersionStr)) { // create SWF + var obj = createSWF(att, par, replaceElemIdStr); + if (att.id == replaceElemIdStr) { + setVisibility(replaceElemIdStr, true); + } + callbackObj.success = true; + callbackObj.ref = obj; + } + else if (xiSwfUrlStr && canExpressInstall()) { // show Adobe Express Install + att.data = xiSwfUrlStr; + showExpressInstall(att, par, replaceElemIdStr, callbackFn); + return; + } + else { // show alternative content + setVisibility(replaceElemIdStr, true); + } + if (callbackFn) { callbackFn(callbackObj); } + }); + } + else if (callbackFn) { callbackFn(callbackObj); } + }, + + switchOffAutoHideShow: function() { + autoHideShow = false; + }, + + ua: ua, + + getFlashPlayerVersion: function() { + return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] }; + }, + + hasFlashPlayerVersion: hasPlayerVersion, + + createSWF: function(attObj, parObj, replaceElemIdStr) { + if (ua.w3) { + return createSWF(attObj, parObj, replaceElemIdStr); + } + else { + return undefined; + } + }, + + showExpressInstall: function(att, par, replaceElemIdStr, callbackFn) { + if (ua.w3 && canExpressInstall()) { + showExpressInstall(att, par, replaceElemIdStr, callbackFn); + } + }, + + removeSWF: function(objElemIdStr) { + if (ua.w3) { + removeSWF(objElemIdStr); + } + }, + + createCSS: function(selStr, declStr, mediaStr, newStyleBoolean) { + if (ua.w3) { + createCSS(selStr, declStr, mediaStr, newStyleBoolean); + } + }, + + addDomLoadEvent: addDomLoadEvent, + + addLoadEvent: addLoadEvent, + + getQueryParamValue: function(param) { + var q = doc.location.search || doc.location.hash; + if (q) { + if (/\?/.test(q)) { q = q.split("?")[1]; } // strip question mark + if (param == null) { + return urlEncodeIfNecessary(q); + } + var pairs = q.split("&"); + for (var i = 0; i < pairs.length; i++) { + if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) { + return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1))); + } + } + } + return ""; + }, + + // For internal usage only + expressInstallCallback: function() { + if (isExpressInstallActive) { + var obj = getElementById(EXPRESS_INSTALL_ID); + if (obj && storedAltContent) { + obj.parentNode.replaceChild(storedAltContent, obj); + if (storedAltContentId) { + setVisibility(storedAltContentId, true); + if (ua.ie && ua.win) { storedAltContent.style.display = "block"; } + } + if (storedCallbackFn) { storedCallbackFn(storedCallbackObj); } + } + isExpressInstallActive = false; + } + } + }; +}(); diff --git a/gulpfile.js b/gulpfile.js new file mode 100644 index 0000000..0010b07 --- /dev/null +++ b/gulpfile.js @@ -0,0 +1,19 @@ +/* eslint no-console: 0 */ +var path = require('path'); +var gulp = require('gulp'); +var pkg = path.join(process.cwd(), 'package.json') +var version = require(pkg).version; + +require('colors'); + +var buildLibDir = path.join(process.cwd(), 'build', 'red5pro-ext-stream-manager-' + version, 'lib'); +var buildDir = path.join(buildLibDir, 'red5pro'); +var examplesDir = path.join(process.cwd(), 'examples', 'browser'); + +console.log('Current version is ' + version.white + '.'); + +// eslint-disable-next-line no-unused-vars +gulp.task('move-build-to-examples', [], function(cb) { + return gulp.src([path.join(buildDir, '**', '*')]).pipe(gulp.dest(path.join(examplesDir, 'lib', 'red5pro'))); +}); + diff --git a/package-lock.json b/package-lock.json index ab48fee..f61c9fa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -440,6 +440,15 @@ "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", "dev": true }, + "ansi-gray": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz", + "integrity": "sha1-KWLPVOyXksSFEKPetSRDaGHvclE=", + "dev": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", @@ -452,6 +461,12 @@ "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", "dev": true }, + "ansi-wrap": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz", + "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=", + "dev": true + }, "anymatch": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", @@ -468,6 +483,12 @@ "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", "dev": true }, + "archy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", + "dev": true + }, "argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", @@ -495,6 +516,24 @@ "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", "dev": true }, + "array-differ": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", + "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=", + "dev": true + }, + "array-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", + "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=", + "dev": true + }, + "array-slice": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", + "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", + "dev": true + }, "array-union": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", @@ -1362,6 +1401,12 @@ "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", "dev": true }, + "beeper": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz", + "integrity": "sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak=", + "dev": true + }, "big.js": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", @@ -1749,6 +1794,18 @@ } } }, + "clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", + "dev": true + }, + "clone-stats": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", + "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=", + "dev": true + }, "co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", @@ -1786,6 +1843,18 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, + "color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", + "dev": true + }, + "colors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.3.0.tgz", + "integrity": "sha512-EDpX3a7wHMWFA7PUHWPHNWqOxIIRSJetuwl0AS5Oi/5FMV8kWm69RTlgm00GKjBO1xFHMtBbL49yRtMMdticBw==", + "dev": true + }, "commander": { "version": "2.13.0", "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz", @@ -1954,6 +2023,12 @@ "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", "dev": true }, + "dateformat": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.2.0.tgz", + "integrity": "sha1-QGXiATz5+5Ft39gu+1Bq1MZ2kGI=", + "dev": true + }, "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", @@ -1981,6 +2056,15 @@ "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", "dev": true }, + "defaults": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", + "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", + "dev": true, + "requires": { + "clone": "^1.0.2" + } + }, "define-property": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", @@ -2045,6 +2129,12 @@ } } }, + "deprecated": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/deprecated/-/deprecated-0.0.1.tgz", + "integrity": "sha1-+cmvVGSvoeepcUWKi97yqpTVuxk=", + "dev": true + }, "des.js": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", @@ -2055,6 +2145,12 @@ "minimalistic-assert": "^1.0.0" } }, + "detect-file": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", + "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=", + "dev": true + }, "detect-indent": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", @@ -2090,6 +2186,41 @@ "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", "dev": true }, + "duplexer2": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz", + "integrity": "sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds=", + "dev": true, + "requires": { + "readable-stream": "~1.1.9" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + } + } + }, "duplexify": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.6.0.tgz", @@ -2417,6 +2548,21 @@ } } }, + "expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", + "dev": true, + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, + "extend": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=", + "dev": true + }, "extend-shallow": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", @@ -2514,6 +2660,17 @@ } } }, + "fancy-log": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.2.tgz", + "integrity": "sha1-9BEl49hPLn2JpD0G2VjI94vha+E=", + "dev": true, + "requires": { + "ansi-gray": "^0.1.1", + "color-support": "^1.1.3", + "time-stamp": "^1.0.0" + } + }, "fast-deep-equal": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", @@ -2585,6 +2742,12 @@ "pkg-dir": "^2.0.0" } }, + "find-index": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/find-index/-/find-index-0.1.1.tgz", + "integrity": "sha1-Z101iyyjiS15Whq0cjL4tuLg3eQ=", + "dev": true + }, "find-up": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", @@ -2594,6 +2757,54 @@ "locate-path": "^2.0.0" } }, + "findup-sync": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz", + "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=", + "dev": true, + "requires": { + "detect-file": "^1.0.0", + "is-glob": "^3.1.0", + "micromatch": "^3.0.4", + "resolve-dir": "^1.0.1" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "fined": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fined/-/fined-1.1.0.tgz", + "integrity": "sha1-s33IRLdqL15wgeiE98CuNE8VNHY=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.2", + "is-plain-object": "^2.0.3", + "object.defaults": "^1.1.0", + "object.pick": "^1.2.0", + "parse-filepath": "^1.0.1" + } + }, + "first-chunk-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz", + "integrity": "sha1-Wb+1DNkF9g18OUzT2ayqtOatk04=", + "dev": true + }, + "flagged-respawn": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.0.tgz", + "integrity": "sha1-Tnmumy6zi/hrO7Vr8+ClaqX8q9c=", + "dev": true + }, "flat-cache": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.0.tgz", @@ -2622,6 +2833,15 @@ "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", "dev": true }, + "for-own": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", + "dev": true, + "requires": { + "for-in": "^1.0.1" + } + }, "fragment-cache": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", @@ -3194,6 +3414,15 @@ "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", "dev": true }, + "gaze": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/gaze/-/gaze-0.5.2.tgz", + "integrity": "sha1-QLcJU30k0dRXZ9takIaJ3+aaxE8=", + "dev": true, + "requires": { + "globule": "~0.1.0" + } + }, "get-caller-file": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", @@ -3247,12 +3476,125 @@ } } }, + "glob-stream": { + "version": "3.1.18", + "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-3.1.18.tgz", + "integrity": "sha1-kXCl8St5Awb9/lmPMT+PeVT9FDs=", + "dev": true, + "requires": { + "glob": "^4.3.1", + "glob2base": "^0.0.12", + "minimatch": "^2.0.1", + "ordered-read-streams": "^0.1.0", + "through2": "^0.6.1", + "unique-stream": "^1.0.0" + }, + "dependencies": { + "glob": { + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz", + "integrity": "sha1-xstz0yJsHv7wTePFbQEvAzd+4V8=", + "dev": true, + "requires": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^2.0.1", + "once": "^1.3.0" + } + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "minimatch": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", + "integrity": "sha1-jQh8OcazjAAbl/ynzm0OHoCvusc=", + "dev": true, + "requires": { + "brace-expansion": "^1.0.0" + } + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "dev": true, + "requires": { + "readable-stream": ">=1.0.33-1 <1.1.0-0", + "xtend": ">=4.0.0 <4.1.0-0" + } + } + } + }, + "glob-watcher": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-0.0.6.tgz", + "integrity": "sha1-uVtKjfdLOcgymLDAXJeLTZo7cQs=", + "dev": true, + "requires": { + "gaze": "^0.5.1" + } + }, + "glob2base": { + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/glob2base/-/glob2base-0.0.12.tgz", + "integrity": "sha1-nUGbPijxLoOjYhZKJ3BVkiycDVY=", + "dev": true, + "requires": { + "find-index": "^0.1.1" + } + }, + "global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "dev": true, + "requires": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + } + }, "global-modules-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/global-modules-path/-/global-modules-path-2.1.0.tgz", "integrity": "sha512-3DrmGj2TP+96cABk9TfMp6f3knH/Y46dqvWznTU3Tf6/bDGLDAn15tFluQ7BcloykOcdY16U0WGq0BQblYOxJQ==", "dev": true }, + "global-prefix": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + } + }, "globals": { "version": "9.18.0", "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", @@ -3281,12 +3623,163 @@ } } }, + "globule": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/globule/-/globule-0.1.0.tgz", + "integrity": "sha1-2cjt3h2nnRJaFRt5UzuXhnY0auU=", + "dev": true, + "requires": { + "glob": "~3.1.21", + "lodash": "~1.0.1", + "minimatch": "~0.2.11" + }, + "dependencies": { + "glob": { + "version": "3.1.21", + "resolved": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz", + "integrity": "sha1-0p4KBV3qUTj00H7UDomC6DwgZs0=", + "dev": true, + "requires": { + "graceful-fs": "~1.2.0", + "inherits": "1", + "minimatch": "~0.2.11" + } + }, + "graceful-fs": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz", + "integrity": "sha1-FaSAaldUfLLS2/J/QuiajDRRs2Q=", + "dev": true + }, + "inherits": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz", + "integrity": "sha1-ykMJ2t7mtUzAuNJH6NfHoJdb3Js=", + "dev": true + }, + "lodash": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-1.0.2.tgz", + "integrity": "sha1-j1dWDIO1n8JwvT1WG2kAQ0MOJVE=", + "dev": true + }, + "lru-cache": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", + "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=", + "dev": true + }, + "minimatch": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz", + "integrity": "sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=", + "dev": true, + "requires": { + "lru-cache": "2", + "sigmund": "~1.0.0" + } + } + } + }, + "glogg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.1.tgz", + "integrity": "sha512-ynYqXLoluBKf9XGR1gA59yEJisIL7YHEH4xr3ZziHB5/yl4qWfaK8Js9jGe6gBGCSCKVqiyO30WnRZADvemUNw==", + "dev": true, + "requires": { + "sparkles": "^1.0.0" + } + }, "graceful-fs": { "version": "4.1.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", "dev": true }, + "gulp": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/gulp/-/gulp-3.9.1.tgz", + "integrity": "sha1-VxzkWSjdQK9lFPxAEYZgFsE4RbQ=", + "dev": true, + "requires": { + "archy": "^1.0.0", + "chalk": "^1.0.0", + "deprecated": "^0.0.1", + "gulp-util": "^3.0.0", + "interpret": "^1.0.0", + "liftoff": "^2.1.0", + "minimist": "^1.1.0", + "orchestrator": "^0.3.0", + "pretty-hrtime": "^1.0.0", + "semver": "^4.1.0", + "tildify": "^1.0.0", + "v8flags": "^2.0.2", + "vinyl-fs": "^0.3.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "semver": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz", + "integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=", + "dev": true + } + } + }, + "gulp-util": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.8.tgz", + "integrity": "sha1-AFTh50RQLifATBh8PsxQXdVLu08=", + "dev": true, + "requires": { + "array-differ": "^1.0.0", + "array-uniq": "^1.0.2", + "beeper": "^1.0.0", + "chalk": "^1.0.0", + "dateformat": "^2.0.0", + "fancy-log": "^1.1.0", + "gulplog": "^1.0.0", + "has-gulplog": "^0.1.0", + "lodash._reescape": "^3.0.0", + "lodash._reevaluate": "^3.0.0", + "lodash._reinterpolate": "^3.0.0", + "lodash.template": "^3.0.0", + "minimist": "^1.1.0", + "multipipe": "^0.1.2", + "object-assign": "^3.0.0", + "replace-ext": "0.0.1", + "through2": "^2.0.0", + "vinyl": "^0.5.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "object-assign": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz", + "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=", + "dev": true + } + } + }, + "gulplog": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", + "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=", + "dev": true, + "requires": { + "glogg": "^1.0.0" + } + }, "has-ansi": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", @@ -3302,6 +3795,15 @@ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, + "has-gulplog": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz", + "integrity": "sha1-ZBTIKRNpfaUVkDl9r7EvIpZ4Ec4=", + "dev": true, + "requires": { + "sparkles": "^1.0.0" + } + }, "has-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", @@ -3375,6 +3877,15 @@ "os-tmpdir": "^1.0.1" } }, + "homedir-polyfill": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz", + "integrity": "sha1-TCu8inWJmP7r9e1oWA921GdotLw=", + "dev": true, + "requires": { + "parse-passwd": "^1.0.0" + } + }, "https-browserify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", @@ -3446,6 +3957,12 @@ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "dev": true }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "dev": true + }, "inquirer": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz", @@ -3535,6 +4052,16 @@ "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", "dev": true }, + "is-absolute": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", + "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", + "dev": true, + "requires": { + "is-relative": "^1.0.0", + "is-windows": "^1.0.1" + } + }, "is-accessor-descriptor": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", @@ -3721,6 +4248,15 @@ "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", "dev": true }, + "is-relative": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", + "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", + "dev": true, + "requires": { + "is-unc-path": "^1.0.0" + } + }, "is-resolvable": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", @@ -3733,6 +4269,21 @@ "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", "dev": true }, + "is-unc-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", + "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", + "dev": true, + "requires": { + "unc-path-regex": "^0.1.2" + } + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, "is-windows": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", @@ -3834,6 +4385,22 @@ "type-check": "~0.3.2" } }, + "liftoff": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-2.5.0.tgz", + "integrity": "sha1-IAkpG7Mc6oYbvxCnwVooyvdcMew=", + "dev": true, + "requires": { + "extend": "^3.0.0", + "findup-sync": "^2.0.0", + "fined": "^1.0.1", + "flagged-respawn": "^1.0.0", + "is-plain-object": "^2.0.4", + "object.map": "^1.0.0", + "rechoir": "^0.6.2", + "resolve": "^1.1.7" + } + }, "loader-runner": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.3.0.tgz", @@ -3867,6 +4434,125 @@ "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==", "dev": true }, + "lodash._basecopy": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", + "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=", + "dev": true + }, + "lodash._basetostring": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz", + "integrity": "sha1-0YYdh3+CSlL2aYMtyvPuFVZqB9U=", + "dev": true + }, + "lodash._basevalues": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz", + "integrity": "sha1-W3dXYoAr3j0yl1A+JjAIIP32Ybc=", + "dev": true + }, + "lodash._getnative": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", + "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=", + "dev": true + }, + "lodash._isiterateecall": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz", + "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=", + "dev": true + }, + "lodash._reescape": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz", + "integrity": "sha1-Kx1vXf4HyKNVdT5fJ/rH8c3hYWo=", + "dev": true + }, + "lodash._reevaluate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz", + "integrity": "sha1-WLx0xAZklTrgsSTYBpltrKQx4u0=", + "dev": true + }, + "lodash._reinterpolate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", + "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", + "dev": true + }, + "lodash._root": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz", + "integrity": "sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI=", + "dev": true + }, + "lodash.escape": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz", + "integrity": "sha1-mV7g3BjBtIzJLv+ucaEKq1tIdpg=", + "dev": true, + "requires": { + "lodash._root": "^3.0.0" + } + }, + "lodash.isarguments": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", + "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=", + "dev": true + }, + "lodash.isarray": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", + "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=", + "dev": true + }, + "lodash.keys": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", + "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", + "dev": true, + "requires": { + "lodash._getnative": "^3.0.0", + "lodash.isarguments": "^3.0.0", + "lodash.isarray": "^3.0.0" + } + }, + "lodash.restparam": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", + "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=", + "dev": true + }, + "lodash.template": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-3.6.2.tgz", + "integrity": "sha1-+M3sxhaaJVvpCYrosMU9N4kx0U8=", + "dev": true, + "requires": { + "lodash._basecopy": "^3.0.0", + "lodash._basetostring": "^3.0.0", + "lodash._basevalues": "^3.0.0", + "lodash._isiterateecall": "^3.0.0", + "lodash._reinterpolate": "^3.0.0", + "lodash.escape": "^3.0.0", + "lodash.keys": "^3.0.0", + "lodash.restparam": "^3.0.0", + "lodash.templatesettings": "^3.0.0" + } + }, + "lodash.templatesettings": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz", + "integrity": "sha1-+zB4RHU7Zrnxr6VOJix0UwfbqOU=", + "dev": true, + "requires": { + "lodash._reinterpolate": "^3.0.0", + "lodash.escape": "^3.0.0" + } + }, "long": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", @@ -3901,6 +4587,15 @@ "pify": "^3.0.0" } }, + "make-iterator": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", + "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", + "dev": true, + "requires": { + "kind-of": "^6.0.2" + } + }, "mamacro": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/mamacro/-/mamacro-0.0.3.tgz", @@ -4083,6 +4778,15 @@ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true }, + "multipipe": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz", + "integrity": "sha1-Ko8t33Du1WTf8tV/HhoTfZ8FB4s=", + "dev": true, + "requires": { + "duplexer2": "0.0.2" + } + }, "mute-stream": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", @@ -4116,6 +4820,12 @@ "to-regex": "^3.0.1" } }, + "natives": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/natives/-/natives-1.1.4.tgz", + "integrity": "sha512-Q29yeg9aFKwhLVdkTAejM/HvYG0Y1Am1+HUkFQGn5k2j8GS+v60TVmZh6nujpEAj/qql+wGUrlryO8bF+b1jEg==", + "dev": true + }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -4243,6 +4953,28 @@ "isobject": "^3.0.0" } }, + "object.defaults": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", + "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=", + "dev": true, + "requires": { + "array-each": "^1.0.1", + "array-slice": "^1.0.0", + "for-own": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "object.map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", + "integrity": "sha1-z4Plncj8wK1fQlDh94s7gb2AHTc=", + "dev": true, + "requires": { + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + } + }, "object.pick": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", @@ -4284,6 +5016,43 @@ "wordwrap": "~1.0.0" } }, + "orchestrator": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/orchestrator/-/orchestrator-0.3.8.tgz", + "integrity": "sha1-FOfp4nZPcxX7rBhOUGx6pt+UrX4=", + "dev": true, + "requires": { + "end-of-stream": "~0.1.5", + "sequencify": "~0.0.7", + "stream-consume": "~0.1.0" + }, + "dependencies": { + "end-of-stream": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-0.1.5.tgz", + "integrity": "sha1-jhdyBsPICDfYVjLouTWd/osvbq8=", + "dev": true, + "requires": { + "once": "~1.3.0" + } + }, + "once": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz", + "integrity": "sha1-suJhVXzkwxTsgwTz+oJmPkKXyiA=", + "dev": true, + "requires": { + "wrappy": "1" + } + } + } + }, + "ordered-read-streams": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-0.1.0.tgz", + "integrity": "sha1-/VZamvjrRHO6abbtijQ1LLVS8SY=", + "dev": true + }, "os-browserify": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", @@ -4373,6 +5142,23 @@ "pbkdf2": "^3.0.3" } }, + "parse-filepath": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", + "integrity": "sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE=", + "dev": true, + "requires": { + "is-absolute": "^1.0.0", + "map-cache": "^0.2.0", + "path-root": "^0.1.1" + } + }, + "parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", + "dev": true + }, "pascalcase": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", @@ -4415,6 +5201,27 @@ "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", "dev": true }, + "path-parse": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", + "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=", + "dev": true + }, + "path-root": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", + "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=", + "dev": true, + "requires": { + "path-root-regex": "^0.1.0" + } + }, + "path-root-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", + "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=", + "dev": true + }, "pbkdf2": { "version": "3.0.16", "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.16.tgz", @@ -4476,6 +5283,12 @@ "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", "dev": true }, + "pretty-hrtime": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", + "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=", + "dev": true + }, "private": { "version": "0.1.8", "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", @@ -4616,6 +5429,15 @@ "set-immediate-shim": "^1.0.1" } }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "dev": true, + "requires": { + "resolve": "^1.1.6" + } + }, "regenerate": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", @@ -4716,6 +5538,12 @@ "is-finite": "^1.0.0" } }, + "replace-ext": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", + "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=", + "dev": true + }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -4738,6 +5566,15 @@ "resolve-from": "^1.0.0" } }, + "resolve": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.7.1.tgz", + "integrity": "sha512-c7rwLofp8g1U+h1KNyHL/jicrKg1Ek4q+Lr33AL65uZTinUZHe30D5HlyN5V9NW0JX1D5dXQ4jqW5l7Sy/kGfw==", + "dev": true, + "requires": { + "path-parse": "^1.0.5" + } + }, "resolve-cwd": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", @@ -4755,6 +5592,16 @@ } } }, + "resolve-dir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + } + }, "resolve-from": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", @@ -4881,6 +5728,12 @@ "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", "dev": true }, + "sequencify": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/sequencify/-/sequencify-0.0.7.tgz", + "integrity": "sha1-kM/xnQLgcCf9dn9erT57ldHnOAw=", + "dev": true + }, "serialize-javascript": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.5.0.tgz", @@ -4953,6 +5806,12 @@ "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", "dev": true }, + "sigmund": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", + "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=", + "dev": true + }, "signal-exit": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", @@ -5130,6 +5989,12 @@ "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", "dev": true }, + "sparkles": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.1.tgz", + "integrity": "sha512-dSO0DDYUahUt/0/pD/Is3VIm5TGJjludZ0HVymmhYF6eNA53PVLhnUk0znSYbH8IYBuJdCE+1luR22jNLMaQdw==", + "dev": true + }, "split-string": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", @@ -5185,6 +6050,12 @@ "readable-stream": "^2.0.2" } }, + "stream-consume": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/stream-consume/-/stream-consume-0.1.1.tgz", + "integrity": "sha512-tNa3hzgkjEP7XbCkbRXe1jpg+ievoa0O4SCFlMOYEscGSS4JJsckGL8swUyAa/ApGU3Ae4t6Honor4HhL+tRyg==", + "dev": true + }, "stream-each": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.2.tgz", @@ -5259,6 +6130,16 @@ "ansi-regex": "^2.0.0" } }, + "strip-bom": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-1.0.0.tgz", + "integrity": "sha1-hbiGLzhEtabV7IRnqTWYFzo295Q=", + "dev": true, + "requires": { + "first-chunk-stream": "^1.0.0", + "is-utf8": "^0.2.0" + } + }, "strip-eof": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", @@ -5374,6 +6255,21 @@ "xtend": "~4.0.1" } }, + "tildify": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/tildify/-/tildify-1.2.0.tgz", + "integrity": "sha1-3OwD9V3Km3qj5bBPIYF+tW5jWIo=", + "dev": true, + "requires": { + "os-homedir": "^1.0.0" + } + }, + "time-stamp": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz", + "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=", + "dev": true + }, "timers-browserify": { "version": "2.0.10", "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz", @@ -5521,6 +6417,12 @@ } } }, + "unc-path-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", + "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", + "dev": true + }, "union-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", @@ -5574,6 +6476,12 @@ "imurmurhash": "^0.1.4" } }, + "unique-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-1.0.0.tgz", + "integrity": "sha1-1ZpKdUJ0R9mqbJHnAmP40mpLEEs=", + "dev": true + }, "unset-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", @@ -5662,6 +6570,12 @@ "kind-of": "^6.0.2" } }, + "user-home": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz", + "integrity": "sha1-K1viOjK2Onyd640PKNSFcko98ZA=", + "dev": true + }, "util": { "version": "0.10.4", "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", @@ -5683,6 +6597,103 @@ "integrity": "sha512-qNdTUMaCjPs4eEnM3W9H94R3sU70YCuT+/ST7nUf+id1bVOrdjrpUaeZLqPBPRph3hsgn4a4BvwpxhHZx+oSDg==", "dev": true }, + "v8flags": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-2.1.1.tgz", + "integrity": "sha1-qrGh+jDUX4jdMhFIh1rALAtV5bQ=", + "dev": true, + "requires": { + "user-home": "^1.1.1" + } + }, + "vinyl": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz", + "integrity": "sha1-sEVbOPxeDPMNQyUTLkYZcMIJHN4=", + "dev": true, + "requires": { + "clone": "^1.0.0", + "clone-stats": "^0.0.1", + "replace-ext": "0.0.1" + } + }, + "vinyl-fs": { + "version": "0.3.14", + "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-0.3.14.tgz", + "integrity": "sha1-mmhRzhysHBzqX+hsCTHWIMLPqeY=", + "dev": true, + "requires": { + "defaults": "^1.0.0", + "glob-stream": "^3.1.5", + "glob-watcher": "^0.0.6", + "graceful-fs": "^3.0.0", + "mkdirp": "^0.5.0", + "strip-bom": "^1.0.0", + "through2": "^0.6.1", + "vinyl": "^0.4.0" + }, + "dependencies": { + "clone": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz", + "integrity": "sha1-xhJqkK1Pctv1rNskPMN3JP6T/B8=", + "dev": true + }, + "graceful-fs": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.11.tgz", + "integrity": "sha1-dhPHeKGv6mLyXGMKCG1/Osu92Bg=", + "dev": true, + "requires": { + "natives": "^1.1.0" + } + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "dev": true, + "requires": { + "readable-stream": ">=1.0.33-1 <1.1.0-0", + "xtend": ">=4.0.0 <4.1.0-0" + } + }, + "vinyl": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.6.tgz", + "integrity": "sha1-LzVsh6VQolVGHza76ypbqL94SEc=", + "dev": true, + "requires": { + "clone": "^0.2.0", + "clone-stats": "^0.0.1" + } + } + } + }, "vm-browserify": { "version": "0.0.4", "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", diff --git a/package.json b/package.json index 4796714..1ecab9f 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "webpack:build": "webpack", "webpack:build-min": "NODE_ENV=staging webpack", "webpack:dist": "NODE_ENV=production webpack", + "postwebpack:build": "gulp move-build-to-examples", "lint": "eslint ./src --ext .js", "test": "test" }, @@ -21,7 +22,9 @@ "babel-preset-env": "^1.7.0", "babel-preset-es2015": "^6.24.1", "browser-bunyan": "^1.3.0", + "colors": "^1.3.0", "eslint": "^4.19.1", + "gulp": "^3.9.1", "webpack": "^4.11.1", "webpack-cli": "^3.0.3" }, diff --git a/src/js/env/browser.js b/src/js/env/browser.js new file mode 100644 index 0000000..87be76b --- /dev/null +++ b/src/js/env/browser.js @@ -0,0 +1,5 @@ +export default { + getRed5ProSDK: () => { + return window.red5prosdk + } +} diff --git a/src/js/index.js b/src/js/index.js index 2840305..1c4a823 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -10,6 +10,7 @@ // SDK_VERSION, LOG_LEVEL injected from webpack build. import { LEVELS, establishLogger } from './log' import { getLogger as _getLogger } from './log' +import environment from './env/browser' establishLogger(`${LOG_LEVEL}` || LEVELS.DEBUG) // eslint-disable-line no-undef @@ -46,3 +47,11 @@ export const LOG_LEVELS = LEVELS */ export const getLogger = _getLogger +export const decorate = () => { + const red5prosdk = environment.getRed5ProSDK() + if (red5prosdk) { + getLogger().debug('Will Decorate') + } else { + getLogger().warn('Could not decorate the red5prosdk global. It does not exist.') + } +} diff --git a/webpack.config.babel.js b/webpack.config.babel.js index 2f87720..808799a 100644 --- a/webpack.config.babel.js +++ b/webpack.config.babel.js @@ -36,7 +36,7 @@ export default { library: 'red5prosdk_ext_stream_manager', libraryTarget: 'umd', path: PROD ? distDir : buildDir, - filename: (PROD || STAGING) ? 'red5pro-extension-stream-manager.min.js' : 'red5pro-extension-stream-manager.js' + filename: (PROD || STAGING) ? 'red5pro-ext-stream-manager.min.js' : 'red5pro-ext-stream-manager.js' }, devtool: (PROD || STAGING) ? '' : '#inline-source-map', module: { From b907ace729b627fbb1287e2ab47c3a9b3ddc44a5 Mon Sep 17 00:00:00 2001 From: bustardcelly Date: Mon, 11 Jun 2018 09:44:44 -0400 Subject: [PATCH 03/15] testing out implementation through examples. --- .babelrc | 10 +- .../lib/red5pro/red5pro-ext-stream-manager.js | 3688 ++++++++++++++++- examples/browser/publisher-failover.html | 65 + package-lock.json | 2560 ++++++------ package.json | 10 +- src/js/autoscale/index.js | 93 + src/js/autoscale/request.js | 59 + src/js/env/browser.js | 6 +- src/js/index.js | 19 +- webpack.config.babel.js | 11 +- 10 files changed, 5186 insertions(+), 1335 deletions(-) create mode 100644 examples/browser/publisher-failover.html create mode 100644 src/js/autoscale/index.js create mode 100644 src/js/autoscale/request.js diff --git a/.babelrc b/.babelrc index 8d76f21..1730958 100644 --- a/.babelrc +++ b/.babelrc @@ -1,4 +1,10 @@ { - "presets": ["es2015"], - "plugins": ["transform-object-assign", "transform-runtime"] + "presets": ["es2015", "es2017"], + "plugins": [ + "syntax-async-functions", + "transform-async-to-generator", + "transform-object-assign", + "transform-runtime", + "transform-object-rest-spread" + ] } diff --git a/examples/browser/lib/red5pro/red5pro-ext-stream-manager.js b/examples/browser/lib/red5pro/red5pro-ext-stream-manager.js index 765c872..2455973 100644 --- a/examples/browser/lib/red5pro/red5pro-ext-stream-manager.js +++ b/examples/browser/lib/red5pro/red5pro-ext-stream-manager.js @@ -104,6 +104,28 @@ return /******/ (function(modules) { // webpackBootstrap /************************************************************************/ /******/ ({ +/***/ "./node_modules/babel-runtime/core-js/json/stringify.js": +/*!**************************************************************!*\ + !*** ./node_modules/babel-runtime/core-js/json/stringify.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(/*! core-js/library/fn/json/stringify */ "./node_modules/core-js/library/fn/json/stringify.js"), __esModule: true }; + +/***/ }), + +/***/ "./node_modules/babel-runtime/core-js/object/assign.js": +/*!*************************************************************!*\ + !*** ./node_modules/babel-runtime/core-js/object/assign.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(/*! core-js/library/fn/object/assign */ "./node_modules/core-js/library/fn/object/assign.js"), __esModule: true }; + +/***/ }), + /***/ "./node_modules/babel-runtime/core-js/object/define-property.js": /*!**********************************************************************!*\ !*** ./node_modules/babel-runtime/core-js/object/define-property.js ***! @@ -115,6 +137,77 @@ module.exports = { "default": __webpack_require__(/*! core-js/library/fn/object/ /***/ }), +/***/ "./node_modules/babel-runtime/core-js/object/keys.js": +/*!***********************************************************!*\ + !*** ./node_modules/babel-runtime/core-js/object/keys.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(/*! core-js/library/fn/object/keys */ "./node_modules/core-js/library/fn/object/keys.js"), __esModule: true }; + +/***/ }), + +/***/ "./node_modules/babel-runtime/core-js/promise.js": +/*!*******************************************************!*\ + !*** ./node_modules/babel-runtime/core-js/promise.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(/*! core-js/library/fn/promise */ "./node_modules/core-js/library/fn/promise.js"), __esModule: true }; + +/***/ }), + +/***/ "./node_modules/babel-runtime/helpers/asyncToGenerator.js": +/*!****************************************************************!*\ + !*** ./node_modules/babel-runtime/helpers/asyncToGenerator.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _promise = __webpack_require__(/*! ../core-js/promise */ "./node_modules/babel-runtime/core-js/promise.js"); + +var _promise2 = _interopRequireDefault(_promise); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (fn) { + return function () { + var gen = fn.apply(this, arguments); + return new _promise2.default(function (resolve, reject) { + function step(key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + + if (info.done) { + resolve(value); + } else { + return _promise2.default.resolve(value).then(function (value) { + step("next", value); + }, function (err) { + step("throw", err); + }); + } + } + + return step("next"); + }); + }; +}; + +/***/ }), + /***/ "./node_modules/babel-runtime/helpers/classCallCheck.js": /*!**************************************************************!*\ !*** ./node_modules/babel-runtime/helpers/classCallCheck.js ***! @@ -171,6 +264,52 @@ exports.default = function () { }; }(); +/***/ }), + +/***/ "./node_modules/babel-runtime/helpers/extends.js": +/*!*******************************************************!*\ + !*** ./node_modules/babel-runtime/helpers/extends.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _assign = __webpack_require__(/*! ../core-js/object/assign */ "./node_modules/babel-runtime/core-js/object/assign.js"); + +var _assign2 = _interopRequireDefault(_assign); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _assign2.default || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; +}; + +/***/ }), + +/***/ "./node_modules/babel-runtime/regenerator/index.js": +/*!*********************************************************!*\ + !*** ./node_modules/babel-runtime/regenerator/index.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(/*! regenerator-runtime */ "./node_modules/regenerator-runtime/runtime-module.js"); + + /***/ }), /***/ "./node_modules/browser-bunyan/lib/index.m.js": @@ -848,6 +987,35 @@ ConsoleFormattedStream.getDefaultCss = function getDefaultCss() { //# sourceMappingURL=index.m.js.map +/***/ }), + +/***/ "./node_modules/core-js/library/fn/json/stringify.js": +/*!***********************************************************!*\ + !*** ./node_modules/core-js/library/fn/json/stringify.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var core = __webpack_require__(/*! ../../modules/_core */ "./node_modules/core-js/library/modules/_core.js"); +var $JSON = core.JSON || (core.JSON = { stringify: JSON.stringify }); +module.exports = function stringify(it) { // eslint-disable-line no-unused-vars + return $JSON.stringify.apply($JSON, arguments); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/fn/object/assign.js": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/library/fn/object/assign.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(/*! ../../modules/es6.object.assign */ "./node_modules/core-js/library/modules/es6.object.assign.js"); +module.exports = __webpack_require__(/*! ../../modules/_core */ "./node_modules/core-js/library/modules/_core.js").Object.assign; + + /***/ }), /***/ "./node_modules/core-js/library/fn/object/define-property.js": @@ -864,6 +1032,37 @@ module.exports = function defineProperty(it, key, desc) { }; +/***/ }), + +/***/ "./node_modules/core-js/library/fn/object/keys.js": +/*!********************************************************!*\ + !*** ./node_modules/core-js/library/fn/object/keys.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(/*! ../../modules/es6.object.keys */ "./node_modules/core-js/library/modules/es6.object.keys.js"); +module.exports = __webpack_require__(/*! ../../modules/_core */ "./node_modules/core-js/library/modules/_core.js").Object.keys; + + +/***/ }), + +/***/ "./node_modules/core-js/library/fn/promise.js": +/*!****************************************************!*\ + !*** ./node_modules/core-js/library/fn/promise.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(/*! ../modules/es6.object.to-string */ "./node_modules/core-js/library/modules/es6.object.to-string.js"); +__webpack_require__(/*! ../modules/es6.string.iterator */ "./node_modules/core-js/library/modules/es6.string.iterator.js"); +__webpack_require__(/*! ../modules/web.dom.iterable */ "./node_modules/core-js/library/modules/web.dom.iterable.js"); +__webpack_require__(/*! ../modules/es6.promise */ "./node_modules/core-js/library/modules/es6.promise.js"); +__webpack_require__(/*! ../modules/es7.promise.finally */ "./node_modules/core-js/library/modules/es7.promise.finally.js"); +__webpack_require__(/*! ../modules/es7.promise.try */ "./node_modules/core-js/library/modules/es7.promise.try.js"); +module.exports = __webpack_require__(/*! ../modules/_core */ "./node_modules/core-js/library/modules/_core.js").Promise; + + /***/ }), /***/ "./node_modules/core-js/library/modules/_a-function.js": @@ -879,6 +1078,34 @@ module.exports = function (it) { }; +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_add-to-unscopables.js": +/*!*********************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_add-to-unscopables.js ***! + \*********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = function () { /* empty */ }; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_an-instance.js": +/*!**************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_an-instance.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = function (it, Constructor, name, forbiddenField) { + if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) { + throw TypeError(name + ': incorrect invocation!'); + } return it; +}; + + /***/ }), /***/ "./node_modules/core-js/library/modules/_an-object.js": @@ -895,6 +1122,90 @@ module.exports = function (it) { }; +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_array-includes.js": +/*!*****************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_array-includes.js ***! + \*****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// false -> Array#indexOf +// true -> Array#includes +var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/library/modules/_to-iobject.js"); +var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/library/modules/_to-length.js"); +var toAbsoluteIndex = __webpack_require__(/*! ./_to-absolute-index */ "./node_modules/core-js/library/modules/_to-absolute-index.js"); +module.exports = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIObject($this); + var length = toLength(O.length); + var index = toAbsoluteIndex(fromIndex, length); + var value; + // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare + if (IS_INCLUDES && el != el) while (length > index) { + value = O[index++]; + // eslint-disable-next-line no-self-compare + if (value != value) return true; + // Array#indexOf ignores holes, Array#includes - not + } else for (;length > index; index++) if (IS_INCLUDES || index in O) { + if (O[index] === el) return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_classof.js": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/library/modules/_classof.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// getting tag from 19.1.3.6 Object.prototype.toString() +var cof = __webpack_require__(/*! ./_cof */ "./node_modules/core-js/library/modules/_cof.js"); +var TAG = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/library/modules/_wks.js")('toStringTag'); +// ES3 wrong here +var ARG = cof(function () { return arguments; }()) == 'Arguments'; + +// fallback for IE11 Script Access Denied error +var tryGet = function (it, key) { + try { + return it[key]; + } catch (e) { /* empty */ } +}; + +module.exports = function (it) { + var O, T, B; + return it === undefined ? 'Undefined' : it === null ? 'Null' + // @@toStringTag case + : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T + // builtinTag case + : ARG ? cof(O) + // ES3 arguments fallback + : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_cof.js": +/*!******************************************************!*\ + !*** ./node_modules/core-js/library/modules/_cof.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +var toString = {}.toString; + +module.exports = function (it) { + return toString.call(it).slice(8, -1); +}; + + /***/ }), /***/ "./node_modules/core-js/library/modules/_core.js": @@ -939,6 +1250,22 @@ module.exports = function (fn, that, length) { }; +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_defined.js": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/library/modules/_defined.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +// 7.2.1 RequireObjectCoercible(argument) +module.exports = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; +}; + + /***/ }), /***/ "./node_modules/core-js/library/modules/_descriptors.js": @@ -972,6 +1299,21 @@ module.exports = function (it) { }; +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_enum-bug-keys.js": +/*!****************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_enum-bug-keys.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +// IE 8- don't enum bug keys +module.exports = ( + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' +).split(','); + + /***/ }), /***/ "./node_modules/core-js/library/modules/_export.js": @@ -1063,6 +1405,42 @@ module.exports = function (exec) { }; +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_for-of.js": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/library/modules/_for-of.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var ctx = __webpack_require__(/*! ./_ctx */ "./node_modules/core-js/library/modules/_ctx.js"); +var call = __webpack_require__(/*! ./_iter-call */ "./node_modules/core-js/library/modules/_iter-call.js"); +var isArrayIter = __webpack_require__(/*! ./_is-array-iter */ "./node_modules/core-js/library/modules/_is-array-iter.js"); +var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/library/modules/_an-object.js"); +var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/library/modules/_to-length.js"); +var getIterFn = __webpack_require__(/*! ./core.get-iterator-method */ "./node_modules/core-js/library/modules/core.get-iterator-method.js"); +var BREAK = {}; +var RETURN = {}; +var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { + var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable); + var f = ctx(fn, that, entries ? 2 : 1); + var index = 0; + var length, step, iterator, result; + if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); + // fast case for arrays with default iterator + if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) { + result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); + if (result === BREAK || result === RETURN) return result; + } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) { + result = call(iterator, f, step.value, entries); + if (result === BREAK || result === RETURN) return result; + } +}; +exports.BREAK = BREAK; +exports.RETURN = RETURN; + + /***/ }), /***/ "./node_modules/core-js/library/modules/_global.js": @@ -1114,6 +1492,19 @@ module.exports = __webpack_require__(/*! ./_descriptors */ "./node_modules/core- }; +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_html.js": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/library/modules/_html.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var document = __webpack_require__(/*! ./_global */ "./node_modules/core-js/library/modules/_global.js").document; +module.exports = document && document.documentElement; + + /***/ }), /***/ "./node_modules/core-js/library/modules/_ie8-dom-define.js": @@ -1130,100 +1521,3241 @@ module.exports = !__webpack_require__(/*! ./_descriptors */ "./node_modules/core /***/ }), -/***/ "./node_modules/core-js/library/modules/_is-object.js": -/*!************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_is-object.js ***! - \************************************************************/ +/***/ "./node_modules/core-js/library/modules/_invoke.js": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/library/modules/_invoke.js ***! + \*********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { -module.exports = function (it) { - return typeof it === 'object' ? it !== null : typeof it === 'function'; +// fast apply, http://jsperf.lnkit.com/fast-apply/5 +module.exports = function (fn, args, that) { + var un = that === undefined; + switch (args.length) { + case 0: return un ? fn() + : fn.call(that); + case 1: return un ? fn(args[0]) + : fn.call(that, args[0]); + case 2: return un ? fn(args[0], args[1]) + : fn.call(that, args[0], args[1]); + case 3: return un ? fn(args[0], args[1], args[2]) + : fn.call(that, args[0], args[1], args[2]); + case 4: return un ? fn(args[0], args[1], args[2], args[3]) + : fn.call(that, args[0], args[1], args[2], args[3]); + } return fn.apply(that, args); }; /***/ }), -/***/ "./node_modules/core-js/library/modules/_object-dp.js": -/*!************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_object-dp.js ***! - \************************************************************/ +/***/ "./node_modules/core-js/library/modules/_iobject.js": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/library/modules/_iobject.js ***! + \**********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/library/modules/_an-object.js"); -var IE8_DOM_DEFINE = __webpack_require__(/*! ./_ie8-dom-define */ "./node_modules/core-js/library/modules/_ie8-dom-define.js"); -var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "./node_modules/core-js/library/modules/_to-primitive.js"); -var dP = Object.defineProperty; - -exports.f = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/library/modules/_descriptors.js") ? Object.defineProperty : function defineProperty(O, P, Attributes) { - anObject(O); - P = toPrimitive(P, true); - anObject(Attributes); - if (IE8_DOM_DEFINE) try { - return dP(O, P, Attributes); - } catch (e) { /* empty */ } - if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); - if ('value' in Attributes) O[P] = Attributes.value; - return O; +// fallback for non-array-like ES3 and non-enumerable old V8 strings +var cof = __webpack_require__(/*! ./_cof */ "./node_modules/core-js/library/modules/_cof.js"); +// eslint-disable-next-line no-prototype-builtins +module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { + return cof(it) == 'String' ? it.split('') : Object(it); }; /***/ }), -/***/ "./node_modules/core-js/library/modules/_property-desc.js": +/***/ "./node_modules/core-js/library/modules/_is-array-iter.js": /*!****************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_property-desc.js ***! + !*** ./node_modules/core-js/library/modules/_is-array-iter.js ***! \****************************************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { -module.exports = function (bitmap, value) { - return { - enumerable: !(bitmap & 1), - configurable: !(bitmap & 2), - writable: !(bitmap & 4), - value: value +// check on default Array iterator +var Iterators = __webpack_require__(/*! ./_iterators */ "./node_modules/core-js/library/modules/_iterators.js"); +var ITERATOR = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/library/modules/_wks.js")('iterator'); +var ArrayProto = Array.prototype; + +module.exports = function (it) { + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_is-object.js": +/*!************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_is-object.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_iter-call.js": +/*!************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_iter-call.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// call something on iterator step with safe closing on error +var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/library/modules/_an-object.js"); +module.exports = function (iterator, fn, value, entries) { + try { + return entries ? fn(anObject(value)[0], value[1]) : fn(value); + // 7.4.6 IteratorClose(iterator, completion) + } catch (e) { + var ret = iterator['return']; + if (ret !== undefined) anObject(ret.call(iterator)); + throw e; + } +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_iter-create.js": +/*!**************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_iter-create.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var create = __webpack_require__(/*! ./_object-create */ "./node_modules/core-js/library/modules/_object-create.js"); +var descriptor = __webpack_require__(/*! ./_property-desc */ "./node_modules/core-js/library/modules/_property-desc.js"); +var setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ "./node_modules/core-js/library/modules/_set-to-string-tag.js"); +var IteratorPrototype = {}; + +// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() +__webpack_require__(/*! ./_hide */ "./node_modules/core-js/library/modules/_hide.js")(IteratorPrototype, __webpack_require__(/*! ./_wks */ "./node_modules/core-js/library/modules/_wks.js")('iterator'), function () { return this; }); + +module.exports = function (Constructor, NAME, next) { + Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); + setToStringTag(Constructor, NAME + ' Iterator'); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_iter-define.js": +/*!**************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_iter-define.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var LIBRARY = __webpack_require__(/*! ./_library */ "./node_modules/core-js/library/modules/_library.js"); +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/library/modules/_export.js"); +var redefine = __webpack_require__(/*! ./_redefine */ "./node_modules/core-js/library/modules/_redefine.js"); +var hide = __webpack_require__(/*! ./_hide */ "./node_modules/core-js/library/modules/_hide.js"); +var Iterators = __webpack_require__(/*! ./_iterators */ "./node_modules/core-js/library/modules/_iterators.js"); +var $iterCreate = __webpack_require__(/*! ./_iter-create */ "./node_modules/core-js/library/modules/_iter-create.js"); +var setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ "./node_modules/core-js/library/modules/_set-to-string-tag.js"); +var getPrototypeOf = __webpack_require__(/*! ./_object-gpo */ "./node_modules/core-js/library/modules/_object-gpo.js"); +var ITERATOR = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/library/modules/_wks.js")('iterator'); +var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` +var FF_ITERATOR = '@@iterator'; +var KEYS = 'keys'; +var VALUES = 'values'; + +var returnThis = function () { return this; }; + +module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { + $iterCreate(Constructor, NAME, next); + var getMethod = function (kind) { + if (!BUGGY && kind in proto) return proto[kind]; + switch (kind) { + case KEYS: return function keys() { return new Constructor(this, kind); }; + case VALUES: return function values() { return new Constructor(this, kind); }; + } return function entries() { return new Constructor(this, kind); }; + }; + var TAG = NAME + ' Iterator'; + var DEF_VALUES = DEFAULT == VALUES; + var VALUES_BUG = false; + var proto = Base.prototype; + var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; + var $default = $native || getMethod(DEFAULT); + var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; + var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; + var methods, key, IteratorPrototype; + // Fix native + if ($anyNative) { + IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); + if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis); + } + } + // fix Array#{values, @@iterator}.name in V8 / FF + if (DEF_VALUES && $native && $native.name !== VALUES) { + VALUES_BUG = true; + $default = function values() { return $native.call(this); }; + } + // Define iterator + if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { + hide(proto, ITERATOR, $default); + } + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if (DEFAULT) { + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries + }; + if (FORCED) for (key in methods) { + if (!(key in proto)) redefine(proto, key, methods[key]); + } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_iter-detect.js": +/*!**************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_iter-detect.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var ITERATOR = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/library/modules/_wks.js")('iterator'); +var SAFE_CLOSING = false; + +try { + var riter = [7][ITERATOR](); + riter['return'] = function () { SAFE_CLOSING = true; }; + // eslint-disable-next-line no-throw-literal + Array.from(riter, function () { throw 2; }); +} catch (e) { /* empty */ } + +module.exports = function (exec, skipClosing) { + if (!skipClosing && !SAFE_CLOSING) return false; + var safe = false; + try { + var arr = [7]; + var iter = arr[ITERATOR](); + iter.next = function () { return { done: safe = true }; }; + arr[ITERATOR] = function () { return iter; }; + exec(arr); + } catch (e) { /* empty */ } + return safe; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_iter-step.js": +/*!************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_iter-step.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = function (done, value) { + return { value: value, done: !!done }; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_iterators.js": +/*!************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_iterators.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = {}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_library.js": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/library/modules/_library.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = true; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_microtask.js": +/*!************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_microtask.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/library/modules/_global.js"); +var macrotask = __webpack_require__(/*! ./_task */ "./node_modules/core-js/library/modules/_task.js").set; +var Observer = global.MutationObserver || global.WebKitMutationObserver; +var process = global.process; +var Promise = global.Promise; +var isNode = __webpack_require__(/*! ./_cof */ "./node_modules/core-js/library/modules/_cof.js")(process) == 'process'; + +module.exports = function () { + var head, last, notify; + + var flush = function () { + var parent, fn; + if (isNode && (parent = process.domain)) parent.exit(); + while (head) { + fn = head.fn; + head = head.next; + try { + fn(); + } catch (e) { + if (head) notify(); + else last = undefined; + throw e; + } + } last = undefined; + if (parent) parent.enter(); + }; + + // Node.js + if (isNode) { + notify = function () { + process.nextTick(flush); + }; + // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339 + } else if (Observer && !(global.navigator && global.navigator.standalone)) { + var toggle = true; + var node = document.createTextNode(''); + new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new + notify = function () { + node.data = toggle = !toggle; + }; + // environments with maybe non-completely correct, but existent Promise + } else if (Promise && Promise.resolve) { + // Promise.resolve without an argument throws an error in LG WebOS 2 + var promise = Promise.resolve(undefined); + notify = function () { + promise.then(flush); + }; + // for other environments - macrotask based on: + // - setImmediate + // - MessageChannel + // - window.postMessag + // - onreadystatechange + // - setTimeout + } else { + notify = function () { + // strange IE + webpack dev server bug - use .call(global) + macrotask.call(global, flush); + }; + } + + return function (fn) { + var task = { fn: fn, next: undefined }; + if (last) last.next = task; + if (!head) { + head = task; + notify(); + } last = task; }; }; /***/ }), -/***/ "./node_modules/core-js/library/modules/_to-primitive.js": -/*!***************************************************************!*\ - !*** ./node_modules/core-js/library/modules/_to-primitive.js ***! - \***************************************************************/ +/***/ "./node_modules/core-js/library/modules/_new-promise-capability.js": +/*!*************************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_new-promise-capability.js ***! + \*************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 25.4.1.5 NewPromiseCapability(C) +var aFunction = __webpack_require__(/*! ./_a-function */ "./node_modules/core-js/library/modules/_a-function.js"); + +function PromiseCapability(C) { + var resolve, reject; + this.promise = new C(function ($$resolve, $$reject) { + if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor'); + resolve = $$resolve; + reject = $$reject; + }); + this.resolve = aFunction(resolve); + this.reject = aFunction(reject); +} + +module.exports.f = function (C) { + return new PromiseCapability(C); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_object-assign.js": +/*!****************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_object-assign.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 19.1.2.1 Object.assign(target, source, ...) +var getKeys = __webpack_require__(/*! ./_object-keys */ "./node_modules/core-js/library/modules/_object-keys.js"); +var gOPS = __webpack_require__(/*! ./_object-gops */ "./node_modules/core-js/library/modules/_object-gops.js"); +var pIE = __webpack_require__(/*! ./_object-pie */ "./node_modules/core-js/library/modules/_object-pie.js"); +var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/library/modules/_to-object.js"); +var IObject = __webpack_require__(/*! ./_iobject */ "./node_modules/core-js/library/modules/_iobject.js"); +var $assign = Object.assign; + +// should work with symbols and should have deterministic property order (V8 bug) +module.exports = !$assign || __webpack_require__(/*! ./_fails */ "./node_modules/core-js/library/modules/_fails.js")(function () { + var A = {}; + var B = {}; + // eslint-disable-next-line no-undef + var S = Symbol(); + var K = 'abcdefghijklmnopqrst'; + A[S] = 7; + K.split('').forEach(function (k) { B[k] = k; }); + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; +}) ? function assign(target, source) { // eslint-disable-line no-unused-vars + var T = toObject(target); + var aLen = arguments.length; + var index = 1; + var getSymbols = gOPS.f; + var isEnum = pIE.f; + while (aLen > index) { + var S = IObject(arguments[index++]); + var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); + var length = keys.length; + var j = 0; + var key; + while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key]; + } return T; +} : $assign; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_object-create.js": +/*!****************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_object-create.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/library/modules/_an-object.js"); +var dPs = __webpack_require__(/*! ./_object-dps */ "./node_modules/core-js/library/modules/_object-dps.js"); +var enumBugKeys = __webpack_require__(/*! ./_enum-bug-keys */ "./node_modules/core-js/library/modules/_enum-bug-keys.js"); +var IE_PROTO = __webpack_require__(/*! ./_shared-key */ "./node_modules/core-js/library/modules/_shared-key.js")('IE_PROTO'); +var Empty = function () { /* empty */ }; +var PROTOTYPE = 'prototype'; + +// Create object with fake `null` prototype: use iframe Object with cleared prototype +var createDict = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = __webpack_require__(/*! ./_dom-create */ "./node_modules/core-js/library/modules/_dom-create.js")('iframe'); + var i = enumBugKeys.length; + var lt = '<'; + var gt = '>'; + var iframeDocument; + iframe.style.display = 'none'; + __webpack_require__(/*! ./_html */ "./node_modules/core-js/library/modules/_html.js").appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); +}; + +module.exports = Object.create || function create(O, Properties) { + var result; + if (O !== null) { + Empty[PROTOTYPE] = anObject(O); + result = new Empty(); + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : dPs(result, Properties); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_object-dp.js": +/*!************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_object-dp.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/library/modules/_an-object.js"); +var IE8_DOM_DEFINE = __webpack_require__(/*! ./_ie8-dom-define */ "./node_modules/core-js/library/modules/_ie8-dom-define.js"); +var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "./node_modules/core-js/library/modules/_to-primitive.js"); +var dP = Object.defineProperty; + +exports.f = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/library/modules/_descriptors.js") ? Object.defineProperty : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (IE8_DOM_DEFINE) try { + return dP(O, P, Attributes); + } catch (e) { /* empty */ } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_object-dps.js": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_object-dps.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/library/modules/_object-dp.js"); +var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/library/modules/_an-object.js"); +var getKeys = __webpack_require__(/*! ./_object-keys */ "./node_modules/core-js/library/modules/_object-keys.js"); + +module.exports = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/library/modules/_descriptors.js") ? Object.defineProperties : function defineProperties(O, Properties) { + anObject(O); + var keys = getKeys(Properties); + var length = keys.length; + var i = 0; + var P; + while (length > i) dP.f(O, P = keys[i++], Properties[P]); + return O; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_object-gops.js": +/*!**************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_object-gops.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +exports.f = Object.getOwnPropertySymbols; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_object-gpo.js": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_object-gpo.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) +var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/library/modules/_has.js"); +var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/library/modules/_to-object.js"); +var IE_PROTO = __webpack_require__(/*! ./_shared-key */ "./node_modules/core-js/library/modules/_shared-key.js")('IE_PROTO'); +var ObjectProto = Object.prototype; + +module.exports = Object.getPrototypeOf || function (O) { + O = toObject(O); + if (has(O, IE_PROTO)) return O[IE_PROTO]; + if (typeof O.constructor == 'function' && O instanceof O.constructor) { + return O.constructor.prototype; + } return O instanceof Object ? ObjectProto : null; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_object-keys-internal.js": +/*!***********************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_object-keys-internal.js ***! + \***********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/library/modules/_has.js"); +var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/library/modules/_to-iobject.js"); +var arrayIndexOf = __webpack_require__(/*! ./_array-includes */ "./node_modules/core-js/library/modules/_array-includes.js")(false); +var IE_PROTO = __webpack_require__(/*! ./_shared-key */ "./node_modules/core-js/library/modules/_shared-key.js")('IE_PROTO'); + +module.exports = function (object, names) { + var O = toIObject(object); + var i = 0; + var result = []; + var key; + for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while (names.length > i) if (has(O, key = names[i++])) { + ~arrayIndexOf(result, key) || result.push(key); + } + return result; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_object-keys.js": +/*!**************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_object-keys.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.14 / 15.2.3.14 Object.keys(O) +var $keys = __webpack_require__(/*! ./_object-keys-internal */ "./node_modules/core-js/library/modules/_object-keys-internal.js"); +var enumBugKeys = __webpack_require__(/*! ./_enum-bug-keys */ "./node_modules/core-js/library/modules/_enum-bug-keys.js"); + +module.exports = Object.keys || function keys(O) { + return $keys(O, enumBugKeys); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_object-pie.js": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_object-pie.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +exports.f = {}.propertyIsEnumerable; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_object-sap.js": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_object-sap.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// most Object methods by ES6 should accept primitives +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/library/modules/_export.js"); +var core = __webpack_require__(/*! ./_core */ "./node_modules/core-js/library/modules/_core.js"); +var fails = __webpack_require__(/*! ./_fails */ "./node_modules/core-js/library/modules/_fails.js"); +module.exports = function (KEY, exec) { + var fn = (core.Object || {})[KEY] || Object[KEY]; + var exp = {}; + exp[KEY] = exec(fn); + $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_perform.js": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/library/modules/_perform.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = function (exec) { + try { + return { e: false, v: exec() }; + } catch (e) { + return { e: true, v: e }; + } +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_promise-resolve.js": +/*!******************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_promise-resolve.js ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/library/modules/_an-object.js"); +var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/library/modules/_is-object.js"); +var newPromiseCapability = __webpack_require__(/*! ./_new-promise-capability */ "./node_modules/core-js/library/modules/_new-promise-capability.js"); + +module.exports = function (C, x) { + anObject(C); + if (isObject(x) && x.constructor === C) return x; + var promiseCapability = newPromiseCapability.f(C); + var resolve = promiseCapability.resolve; + resolve(x); + return promiseCapability.promise; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_property-desc.js": +/*!****************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_property-desc.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_redefine-all.js": +/*!***************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_redefine-all.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var hide = __webpack_require__(/*! ./_hide */ "./node_modules/core-js/library/modules/_hide.js"); +module.exports = function (target, src, safe) { + for (var key in src) { + if (safe && target[key]) target[key] = src[key]; + else hide(target, key, src[key]); + } return target; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_redefine.js": +/*!***********************************************************!*\ + !*** ./node_modules/core-js/library/modules/_redefine.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(/*! ./_hide */ "./node_modules/core-js/library/modules/_hide.js"); + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_set-species.js": +/*!**************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_set-species.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/library/modules/_global.js"); +var core = __webpack_require__(/*! ./_core */ "./node_modules/core-js/library/modules/_core.js"); +var dP = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/library/modules/_object-dp.js"); +var DESCRIPTORS = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/library/modules/_descriptors.js"); +var SPECIES = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/library/modules/_wks.js")('species'); + +module.exports = function (KEY) { + var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY]; + if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, { + configurable: true, + get: function () { return this; } + }); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_set-to-string-tag.js": +/*!********************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_set-to-string-tag.js ***! + \********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var def = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/library/modules/_object-dp.js").f; +var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/library/modules/_has.js"); +var TAG = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/library/modules/_wks.js")('toStringTag'); + +module.exports = function (it, tag, stat) { + if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_shared-key.js": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_shared-key.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var shared = __webpack_require__(/*! ./_shared */ "./node_modules/core-js/library/modules/_shared.js")('keys'); +var uid = __webpack_require__(/*! ./_uid */ "./node_modules/core-js/library/modules/_uid.js"); +module.exports = function (key) { + return shared[key] || (shared[key] = uid(key)); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_shared.js": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/library/modules/_shared.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var core = __webpack_require__(/*! ./_core */ "./node_modules/core-js/library/modules/_core.js"); +var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/library/modules/_global.js"); +var SHARED = '__core-js_shared__'; +var store = global[SHARED] || (global[SHARED] = {}); + +(module.exports = function (key, value) { + return store[key] || (store[key] = value !== undefined ? value : {}); +})('versions', []).push({ + version: core.version, + mode: __webpack_require__(/*! ./_library */ "./node_modules/core-js/library/modules/_library.js") ? 'pure' : 'global', + copyright: '© 2018 Denis Pushkarev (zloirock.ru)' +}); + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_species-constructor.js": +/*!**********************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_species-constructor.js ***! + \**********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.3.20 SpeciesConstructor(O, defaultConstructor) +var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/library/modules/_an-object.js"); +var aFunction = __webpack_require__(/*! ./_a-function */ "./node_modules/core-js/library/modules/_a-function.js"); +var SPECIES = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/library/modules/_wks.js")('species'); +module.exports = function (O, D) { + var C = anObject(O).constructor; + var S; + return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_string-at.js": +/*!************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_string-at.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__(/*! ./_to-integer */ "./node_modules/core-js/library/modules/_to-integer.js"); +var defined = __webpack_require__(/*! ./_defined */ "./node_modules/core-js/library/modules/_defined.js"); +// true -> String#at +// false -> String#codePointAt +module.exports = function (TO_STRING) { + return function (that, pos) { + var s = String(defined(that)); + var i = toInteger(pos); + var l = s.length; + var a, b; + if (i < 0 || i >= l) return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING ? s.charAt(i) : a + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; + }; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_task.js": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/library/modules/_task.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var ctx = __webpack_require__(/*! ./_ctx */ "./node_modules/core-js/library/modules/_ctx.js"); +var invoke = __webpack_require__(/*! ./_invoke */ "./node_modules/core-js/library/modules/_invoke.js"); +var html = __webpack_require__(/*! ./_html */ "./node_modules/core-js/library/modules/_html.js"); +var cel = __webpack_require__(/*! ./_dom-create */ "./node_modules/core-js/library/modules/_dom-create.js"); +var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/library/modules/_global.js"); +var process = global.process; +var setTask = global.setImmediate; +var clearTask = global.clearImmediate; +var MessageChannel = global.MessageChannel; +var Dispatch = global.Dispatch; +var counter = 0; +var queue = {}; +var ONREADYSTATECHANGE = 'onreadystatechange'; +var defer, channel, port; +var run = function () { + var id = +this; + // eslint-disable-next-line no-prototype-builtins + if (queue.hasOwnProperty(id)) { + var fn = queue[id]; + delete queue[id]; + fn(); + } +}; +var listener = function (event) { + run.call(event.data); +}; +// Node.js 0.9+ & IE10+ has setImmediate, otherwise: +if (!setTask || !clearTask) { + setTask = function setImmediate(fn) { + var args = []; + var i = 1; + while (arguments.length > i) args.push(arguments[i++]); + queue[++counter] = function () { + // eslint-disable-next-line no-new-func + invoke(typeof fn == 'function' ? fn : Function(fn), args); + }; + defer(counter); + return counter; + }; + clearTask = function clearImmediate(id) { + delete queue[id]; + }; + // Node.js 0.8- + if (__webpack_require__(/*! ./_cof */ "./node_modules/core-js/library/modules/_cof.js")(process) == 'process') { + defer = function (id) { + process.nextTick(ctx(run, id, 1)); + }; + // Sphere (JS game engine) Dispatch API + } else if (Dispatch && Dispatch.now) { + defer = function (id) { + Dispatch.now(ctx(run, id, 1)); + }; + // Browsers with MessageChannel, includes WebWorkers + } else if (MessageChannel) { + channel = new MessageChannel(); + port = channel.port2; + channel.port1.onmessage = listener; + defer = ctx(port.postMessage, port, 1); + // Browsers with postMessage, skip WebWorkers + // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' + } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) { + defer = function (id) { + global.postMessage(id + '', '*'); + }; + global.addEventListener('message', listener, false); + // IE8- + } else if (ONREADYSTATECHANGE in cel('script')) { + defer = function (id) { + html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () { + html.removeChild(this); + run.call(id); + }; + }; + // Rest old browsers + } else { + defer = function (id) { + setTimeout(ctx(run, id, 1), 0); + }; + } +} +module.exports = { + set: setTask, + clear: clearTask +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_to-absolute-index.js": +/*!********************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_to-absolute-index.js ***! + \********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__(/*! ./_to-integer */ "./node_modules/core-js/library/modules/_to-integer.js"); +var max = Math.max; +var min = Math.min; +module.exports = function (index, length) { + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_to-integer.js": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_to-integer.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +// 7.1.4 ToInteger +var ceil = Math.ceil; +var floor = Math.floor; +module.exports = function (it) { + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_to-iobject.js": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_to-iobject.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// to indexed object, toObject with fallback for non-array-like ES3 strings +var IObject = __webpack_require__(/*! ./_iobject */ "./node_modules/core-js/library/modules/_iobject.js"); +var defined = __webpack_require__(/*! ./_defined */ "./node_modules/core-js/library/modules/_defined.js"); +module.exports = function (it) { + return IObject(defined(it)); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_to-length.js": +/*!************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_to-length.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.15 ToLength +var toInteger = __webpack_require__(/*! ./_to-integer */ "./node_modules/core-js/library/modules/_to-integer.js"); +var min = Math.min; +module.exports = function (it) { + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_to-object.js": +/*!************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_to-object.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.13 ToObject(argument) +var defined = __webpack_require__(/*! ./_defined */ "./node_modules/core-js/library/modules/_defined.js"); +module.exports = function (it) { + return Object(defined(it)); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_to-primitive.js": +/*!***************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_to-primitive.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.1 ToPrimitive(input [, PreferredType]) +var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/library/modules/_is-object.js"); +// instead of the ES6 spec version, we didn't implement @@toPrimitive case +// and the second argument - flag - preferred type is a string +module.exports = function (it, S) { + if (!isObject(it)) return it; + var fn, val; + if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; + if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + throw TypeError("Can't convert object to primitive value"); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_uid.js": +/*!******************************************************!*\ + !*** ./node_modules/core-js/library/modules/_uid.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +var id = 0; +var px = Math.random(); +module.exports = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_user-agent.js": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_user-agent.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/library/modules/_global.js"); +var navigator = global.navigator; + +module.exports = navigator && navigator.userAgent || ''; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/_wks.js": +/*!******************************************************!*\ + !*** ./node_modules/core-js/library/modules/_wks.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var store = __webpack_require__(/*! ./_shared */ "./node_modules/core-js/library/modules/_shared.js")('wks'); +var uid = __webpack_require__(/*! ./_uid */ "./node_modules/core-js/library/modules/_uid.js"); +var Symbol = __webpack_require__(/*! ./_global */ "./node_modules/core-js/library/modules/_global.js").Symbol; +var USE_SYMBOL = typeof Symbol == 'function'; + +var $exports = module.exports = function (name) { + return store[name] || (store[name] = + USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); +}; + +$exports.store = store; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/core.get-iterator-method.js": +/*!**************************************************************************!*\ + !*** ./node_modules/core-js/library/modules/core.get-iterator-method.js ***! + \**************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var classof = __webpack_require__(/*! ./_classof */ "./node_modules/core-js/library/modules/_classof.js"); +var ITERATOR = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/library/modules/_wks.js")('iterator'); +var Iterators = __webpack_require__(/*! ./_iterators */ "./node_modules/core-js/library/modules/_iterators.js"); +module.exports = __webpack_require__(/*! ./_core */ "./node_modules/core-js/library/modules/_core.js").getIteratorMethod = function (it) { + if (it != undefined) return it[ITERATOR] + || it['@@iterator'] + || Iterators[classof(it)]; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/es6.array.iterator.js": +/*!********************************************************************!*\ + !*** ./node_modules/core-js/library/modules/es6.array.iterator.js ***! + \********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var addToUnscopables = __webpack_require__(/*! ./_add-to-unscopables */ "./node_modules/core-js/library/modules/_add-to-unscopables.js"); +var step = __webpack_require__(/*! ./_iter-step */ "./node_modules/core-js/library/modules/_iter-step.js"); +var Iterators = __webpack_require__(/*! ./_iterators */ "./node_modules/core-js/library/modules/_iterators.js"); +var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/library/modules/_to-iobject.js"); + +// 22.1.3.4 Array.prototype.entries() +// 22.1.3.13 Array.prototype.keys() +// 22.1.3.29 Array.prototype.values() +// 22.1.3.30 Array.prototype[@@iterator]() +module.exports = __webpack_require__(/*! ./_iter-define */ "./node_modules/core-js/library/modules/_iter-define.js")(Array, 'Array', function (iterated, kind) { + this._t = toIObject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind +// 22.1.5.2.1 %ArrayIteratorPrototype%.next() +}, function () { + var O = this._t; + var kind = this._k; + var index = this._i++; + if (!O || index >= O.length) { + this._t = undefined; + return step(1); + } + if (kind == 'keys') return step(0, index); + if (kind == 'values') return step(0, O[index]); + return step(0, [index, O[index]]); +}, 'values'); + +// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) +Iterators.Arguments = Iterators.Array; + +addToUnscopables('keys'); +addToUnscopables('values'); +addToUnscopables('entries'); + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/es6.object.assign.js": +/*!*******************************************************************!*\ + !*** ./node_modules/core-js/library/modules/es6.object.assign.js ***! + \*******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.3.1 Object.assign(target, source) +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/library/modules/_export.js"); + +$export($export.S + $export.F, 'Object', { assign: __webpack_require__(/*! ./_object-assign */ "./node_modules/core-js/library/modules/_object-assign.js") }); + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/es6.object.define-property.js": +/*!****************************************************************************!*\ + !*** ./node_modules/core-js/library/modules/es6.object.define-property.js ***! + \****************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/library/modules/_export.js"); +// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) +$export($export.S + $export.F * !__webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/library/modules/_descriptors.js"), 'Object', { defineProperty: __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/library/modules/_object-dp.js").f }); + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/es6.object.keys.js": +/*!*****************************************************************!*\ + !*** ./node_modules/core-js/library/modules/es6.object.keys.js ***! + \*****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.14 Object.keys(O) +var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/library/modules/_to-object.js"); +var $keys = __webpack_require__(/*! ./_object-keys */ "./node_modules/core-js/library/modules/_object-keys.js"); + +__webpack_require__(/*! ./_object-sap */ "./node_modules/core-js/library/modules/_object-sap.js")('keys', function () { + return function keys(it) { + return $keys(toObject(it)); + }; +}); + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/es6.object.to-string.js": +/*!**********************************************************************!*\ + !*** ./node_modules/core-js/library/modules/es6.object.to-string.js ***! + \**********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/es6.promise.js": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/library/modules/es6.promise.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var LIBRARY = __webpack_require__(/*! ./_library */ "./node_modules/core-js/library/modules/_library.js"); +var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/library/modules/_global.js"); +var ctx = __webpack_require__(/*! ./_ctx */ "./node_modules/core-js/library/modules/_ctx.js"); +var classof = __webpack_require__(/*! ./_classof */ "./node_modules/core-js/library/modules/_classof.js"); +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/library/modules/_export.js"); +var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/library/modules/_is-object.js"); +var aFunction = __webpack_require__(/*! ./_a-function */ "./node_modules/core-js/library/modules/_a-function.js"); +var anInstance = __webpack_require__(/*! ./_an-instance */ "./node_modules/core-js/library/modules/_an-instance.js"); +var forOf = __webpack_require__(/*! ./_for-of */ "./node_modules/core-js/library/modules/_for-of.js"); +var speciesConstructor = __webpack_require__(/*! ./_species-constructor */ "./node_modules/core-js/library/modules/_species-constructor.js"); +var task = __webpack_require__(/*! ./_task */ "./node_modules/core-js/library/modules/_task.js").set; +var microtask = __webpack_require__(/*! ./_microtask */ "./node_modules/core-js/library/modules/_microtask.js")(); +var newPromiseCapabilityModule = __webpack_require__(/*! ./_new-promise-capability */ "./node_modules/core-js/library/modules/_new-promise-capability.js"); +var perform = __webpack_require__(/*! ./_perform */ "./node_modules/core-js/library/modules/_perform.js"); +var userAgent = __webpack_require__(/*! ./_user-agent */ "./node_modules/core-js/library/modules/_user-agent.js"); +var promiseResolve = __webpack_require__(/*! ./_promise-resolve */ "./node_modules/core-js/library/modules/_promise-resolve.js"); +var PROMISE = 'Promise'; +var TypeError = global.TypeError; +var process = global.process; +var versions = process && process.versions; +var v8 = versions && versions.v8 || ''; +var $Promise = global[PROMISE]; +var isNode = classof(process) == 'process'; +var empty = function () { /* empty */ }; +var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper; +var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f; + +var USE_NATIVE = !!function () { + try { + // correct subclassing with @@species support + var promise = $Promise.resolve(1); + var FakePromise = (promise.constructor = {})[__webpack_require__(/*! ./_wks */ "./node_modules/core-js/library/modules/_wks.js")('species')] = function (exec) { + exec(empty, empty); + }; + // unhandled rejections tracking support, NodeJS Promise without it fails @@species test + return (isNode || typeof PromiseRejectionEvent == 'function') + && promise.then(empty) instanceof FakePromise + // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables + // https://bugs.chromium.org/p/chromium/issues/detail?id=830565 + // we can't detect it synchronously, so just check versions + && v8.indexOf('6.6') !== 0 + && userAgent.indexOf('Chrome/66') === -1; + } catch (e) { /* empty */ } +}(); + +// helpers +var isThenable = function (it) { + var then; + return isObject(it) && typeof (then = it.then) == 'function' ? then : false; +}; +var notify = function (promise, isReject) { + if (promise._n) return; + promise._n = true; + var chain = promise._c; + microtask(function () { + var value = promise._v; + var ok = promise._s == 1; + var i = 0; + var run = function (reaction) { + var handler = ok ? reaction.ok : reaction.fail; + var resolve = reaction.resolve; + var reject = reaction.reject; + var domain = reaction.domain; + var result, then, exited; + try { + if (handler) { + if (!ok) { + if (promise._h == 2) onHandleUnhandled(promise); + promise._h = 1; + } + if (handler === true) result = value; + else { + if (domain) domain.enter(); + result = handler(value); // may throw + if (domain) { + domain.exit(); + exited = true; + } + } + if (result === reaction.promise) { + reject(TypeError('Promise-chain cycle')); + } else if (then = isThenable(result)) { + then.call(result, resolve, reject); + } else resolve(result); + } else reject(value); + } catch (e) { + if (domain && !exited) domain.exit(); + reject(e); + } + }; + while (chain.length > i) run(chain[i++]); // variable length - can't use forEach + promise._c = []; + promise._n = false; + if (isReject && !promise._h) onUnhandled(promise); + }); +}; +var onUnhandled = function (promise) { + task.call(global, function () { + var value = promise._v; + var unhandled = isUnhandled(promise); + var result, handler, console; + if (unhandled) { + result = perform(function () { + if (isNode) { + process.emit('unhandledRejection', value, promise); + } else if (handler = global.onunhandledrejection) { + handler({ promise: promise, reason: value }); + } else if ((console = global.console) && console.error) { + console.error('Unhandled promise rejection', value); + } + }); + // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should + promise._h = isNode || isUnhandled(promise) ? 2 : 1; + } promise._a = undefined; + if (unhandled && result.e) throw result.v; + }); +}; +var isUnhandled = function (promise) { + return promise._h !== 1 && (promise._a || promise._c).length === 0; +}; +var onHandleUnhandled = function (promise) { + task.call(global, function () { + var handler; + if (isNode) { + process.emit('rejectionHandled', promise); + } else if (handler = global.onrejectionhandled) { + handler({ promise: promise, reason: promise._v }); + } + }); +}; +var $reject = function (value) { + var promise = this; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + promise._v = value; + promise._s = 2; + if (!promise._a) promise._a = promise._c.slice(); + notify(promise, true); +}; +var $resolve = function (value) { + var promise = this; + var then; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + try { + if (promise === value) throw TypeError("Promise can't be resolved itself"); + if (then = isThenable(value)) { + microtask(function () { + var wrapper = { _w: promise, _d: false }; // wrap + try { + then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); + } catch (e) { + $reject.call(wrapper, e); + } + }); + } else { + promise._v = value; + promise._s = 1; + notify(promise, false); + } + } catch (e) { + $reject.call({ _w: promise, _d: false }, e); // wrap + } +}; + +// constructor polyfill +if (!USE_NATIVE) { + // 25.4.3.1 Promise(executor) + $Promise = function Promise(executor) { + anInstance(this, $Promise, PROMISE, '_h'); + aFunction(executor); + Internal.call(this); + try { + executor(ctx($resolve, this, 1), ctx($reject, this, 1)); + } catch (err) { + $reject.call(this, err); + } + }; + // eslint-disable-next-line no-unused-vars + Internal = function Promise(executor) { + this._c = []; // <- awaiting reactions + this._a = undefined; // <- checked in isUnhandled reactions + this._s = 0; // <- state + this._d = false; // <- done + this._v = undefined; // <- value + this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled + this._n = false; // <- notify + }; + Internal.prototype = __webpack_require__(/*! ./_redefine-all */ "./node_modules/core-js/library/modules/_redefine-all.js")($Promise.prototype, { + // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) + then: function then(onFulfilled, onRejected) { + var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); + reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; + reaction.fail = typeof onRejected == 'function' && onRejected; + reaction.domain = isNode ? process.domain : undefined; + this._c.push(reaction); + if (this._a) this._a.push(reaction); + if (this._s) notify(this, false); + return reaction.promise; + }, + // 25.4.5.1 Promise.prototype.catch(onRejected) + 'catch': function (onRejected) { + return this.then(undefined, onRejected); + } + }); + OwnPromiseCapability = function () { + var promise = new Internal(); + this.promise = promise; + this.resolve = ctx($resolve, promise, 1); + this.reject = ctx($reject, promise, 1); + }; + newPromiseCapabilityModule.f = newPromiseCapability = function (C) { + return C === $Promise || C === Wrapper + ? new OwnPromiseCapability(C) + : newGenericPromiseCapability(C); + }; +} + +$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise }); +__webpack_require__(/*! ./_set-to-string-tag */ "./node_modules/core-js/library/modules/_set-to-string-tag.js")($Promise, PROMISE); +__webpack_require__(/*! ./_set-species */ "./node_modules/core-js/library/modules/_set-species.js")(PROMISE); +Wrapper = __webpack_require__(/*! ./_core */ "./node_modules/core-js/library/modules/_core.js")[PROMISE]; + +// statics +$export($export.S + $export.F * !USE_NATIVE, PROMISE, { + // 25.4.4.5 Promise.reject(r) + reject: function reject(r) { + var capability = newPromiseCapability(this); + var $$reject = capability.reject; + $$reject(r); + return capability.promise; + } +}); +$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { + // 25.4.4.6 Promise.resolve(x) + resolve: function resolve(x) { + return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x); + } +}); +$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(/*! ./_iter-detect */ "./node_modules/core-js/library/modules/_iter-detect.js")(function (iter) { + $Promise.all(iter)['catch'](empty); +})), PROMISE, { + // 25.4.4.1 Promise.all(iterable) + all: function all(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var resolve = capability.resolve; + var reject = capability.reject; + var result = perform(function () { + var values = []; + var index = 0; + var remaining = 1; + forOf(iterable, false, function (promise) { + var $index = index++; + var alreadyCalled = false; + values.push(undefined); + remaining++; + C.resolve(promise).then(function (value) { + if (alreadyCalled) return; + alreadyCalled = true; + values[$index] = value; + --remaining || resolve(values); + }, reject); + }); + --remaining || resolve(values); + }); + if (result.e) reject(result.v); + return capability.promise; + }, + // 25.4.4.4 Promise.race(iterable) + race: function race(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var reject = capability.reject; + var result = perform(function () { + forOf(iterable, false, function (promise) { + C.resolve(promise).then(capability.resolve, reject); + }); + }); + if (result.e) reject(result.v); + return capability.promise; + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/es6.string.iterator.js": +/*!*********************************************************************!*\ + !*** ./node_modules/core-js/library/modules/es6.string.iterator.js ***! + \*********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $at = __webpack_require__(/*! ./_string-at */ "./node_modules/core-js/library/modules/_string-at.js")(true); + +// 21.1.3.27 String.prototype[@@iterator]() +__webpack_require__(/*! ./_iter-define */ "./node_modules/core-js/library/modules/_iter-define.js")(String, 'String', function (iterated) { + this._t = String(iterated); // target + this._i = 0; // next index +// 21.1.5.2.1 %StringIteratorPrototype%.next() +}, function () { + var O = this._t; + var index = this._i; + var point; + if (index >= O.length) return { value: undefined, done: true }; + point = $at(O, index); + this._i += point.length; + return { value: point, done: false }; +}); + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/es7.promise.finally.js": +/*!*********************************************************************!*\ + !*** ./node_modules/core-js/library/modules/es7.promise.finally.js ***! + \*********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// https://github.com/tc39/proposal-promise-finally + +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/library/modules/_export.js"); +var core = __webpack_require__(/*! ./_core */ "./node_modules/core-js/library/modules/_core.js"); +var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/library/modules/_global.js"); +var speciesConstructor = __webpack_require__(/*! ./_species-constructor */ "./node_modules/core-js/library/modules/_species-constructor.js"); +var promiseResolve = __webpack_require__(/*! ./_promise-resolve */ "./node_modules/core-js/library/modules/_promise-resolve.js"); + +$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) { + var C = speciesConstructor(this, core.Promise || global.Promise); + var isFunction = typeof onFinally == 'function'; + return this.then( + isFunction ? function (x) { + return promiseResolve(C, onFinally()).then(function () { return x; }); + } : onFinally, + isFunction ? function (e) { + return promiseResolve(C, onFinally()).then(function () { throw e; }); + } : onFinally + ); +} }); + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/es7.promise.try.js": +/*!*****************************************************************!*\ + !*** ./node_modules/core-js/library/modules/es7.promise.try.js ***! + \*****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/tc39/proposal-promise-try +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/library/modules/_export.js"); +var newPromiseCapability = __webpack_require__(/*! ./_new-promise-capability */ "./node_modules/core-js/library/modules/_new-promise-capability.js"); +var perform = __webpack_require__(/*! ./_perform */ "./node_modules/core-js/library/modules/_perform.js"); + +$export($export.S, 'Promise', { 'try': function (callbackfn) { + var promiseCapability = newPromiseCapability.f(this); + var result = perform(callbackfn); + (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v); + return promiseCapability.promise; +} }); + + +/***/ }), + +/***/ "./node_modules/core-js/library/modules/web.dom.iterable.js": +/*!******************************************************************!*\ + !*** ./node_modules/core-js/library/modules/web.dom.iterable.js ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(/*! ./es6.array.iterator */ "./node_modules/core-js/library/modules/es6.array.iterator.js"); +var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/library/modules/_global.js"); +var hide = __webpack_require__(/*! ./_hide */ "./node_modules/core-js/library/modules/_hide.js"); +var Iterators = __webpack_require__(/*! ./_iterators */ "./node_modules/core-js/library/modules/_iterators.js"); +var TO_STRING_TAG = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/library/modules/_wks.js")('toStringTag'); + +var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + + 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + + 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' + + 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' + + 'TextTrackList,TouchList').split(','); + +for (var i = 0; i < DOMIterables.length; i++) { + var NAME = DOMIterables[i]; + var Collection = global[NAME]; + var proto = Collection && Collection.prototype; + if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = Iterators.Array; +} + + +/***/ }), + +/***/ "./node_modules/regenerator-runtime/runtime-module.js": +/*!************************************************************!*\ + !*** ./node_modules/regenerator-runtime/runtime-module.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * Copyright (c) 2014-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +// This method of obtaining a reference to the global object needs to be +// kept identical to the way it is obtained in runtime.js +var g = (function() { return this })() || Function("return this")(); + +// Use `getOwnPropertyNames` because not all browsers support calling +// `hasOwnProperty` on the global `self` object in a worker. See #183. +var hadRuntime = g.regeneratorRuntime && + Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0; + +// Save the old regeneratorRuntime in case it needs to be restored later. +var oldRuntime = hadRuntime && g.regeneratorRuntime; + +// Force reevalutation of runtime.js. +g.regeneratorRuntime = undefined; + +module.exports = __webpack_require__(/*! ./runtime */ "./node_modules/regenerator-runtime/runtime.js"); + +if (hadRuntime) { + // Restore the original runtime. + g.regeneratorRuntime = oldRuntime; +} else { + // Remove the global property added by runtime.js. + try { + delete g.regeneratorRuntime; + } catch(e) { + g.regeneratorRuntime = undefined; + } +} + + +/***/ }), + +/***/ "./node_modules/regenerator-runtime/runtime.js": +/*!*****************************************************!*\ + !*** ./node_modules/regenerator-runtime/runtime.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * Copyright (c) 2014-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +!(function(global) { + "use strict"; + + var Op = Object.prototype; + var hasOwn = Op.hasOwnProperty; + var undefined; // More compressible than void 0. + var $Symbol = typeof Symbol === "function" ? Symbol : {}; + var iteratorSymbol = $Symbol.iterator || "@@iterator"; + var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator"; + var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; + + var inModule = typeof module === "object"; + var runtime = global.regeneratorRuntime; + if (runtime) { + if (inModule) { + // If regeneratorRuntime is defined globally and we're in a module, + // make the exports object identical to regeneratorRuntime. + module.exports = runtime; + } + // Don't bother evaluating the rest of this file if the runtime was + // already defined globally. + return; + } + + // Define the runtime globally (as expected by generated code) as either + // module.exports (if we're in a module) or a new, empty object. + runtime = global.regeneratorRuntime = inModule ? module.exports : {}; + + function wrap(innerFn, outerFn, self, tryLocsList) { + // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator. + var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; + var generator = Object.create(protoGenerator.prototype); + var context = new Context(tryLocsList || []); + + // The ._invoke method unifies the implementations of the .next, + // .throw, and .return methods. + generator._invoke = makeInvokeMethod(innerFn, self, context); + + return generator; + } + runtime.wrap = wrap; + + // Try/catch helper to minimize deoptimizations. Returns a completion + // record like context.tryEntries[i].completion. This interface could + // have been (and was previously) designed to take a closure to be + // invoked without arguments, but in all the cases we care about we + // already have an existing method we want to call, so there's no need + // to create a new function object. We can even get away with assuming + // the method takes exactly one argument, since that happens to be true + // in every case, so we don't have to touch the arguments object. The + // only additional allocation required is the completion record, which + // has a stable shape and so hopefully should be cheap to allocate. + function tryCatch(fn, obj, arg) { + try { + return { type: "normal", arg: fn.call(obj, arg) }; + } catch (err) { + return { type: "throw", arg: err }; + } + } + + var GenStateSuspendedStart = "suspendedStart"; + var GenStateSuspendedYield = "suspendedYield"; + var GenStateExecuting = "executing"; + var GenStateCompleted = "completed"; + + // Returning this object from the innerFn has the same effect as + // breaking out of the dispatch switch statement. + var ContinueSentinel = {}; + + // Dummy constructor functions that we use as the .constructor and + // .constructor.prototype properties for functions that return Generator + // objects. For full spec compliance, you may wish to configure your + // minifier not to mangle the names of these two functions. + function Generator() {} + function GeneratorFunction() {} + function GeneratorFunctionPrototype() {} + + // This is a polyfill for %IteratorPrototype% for environments that + // don't natively support it. + var IteratorPrototype = {}; + IteratorPrototype[iteratorSymbol] = function () { + return this; + }; + + var getProto = Object.getPrototypeOf; + var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); + if (NativeIteratorPrototype && + NativeIteratorPrototype !== Op && + hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { + // This environment has a native %IteratorPrototype%; use it instead + // of the polyfill. + IteratorPrototype = NativeIteratorPrototype; + } + + var Gp = GeneratorFunctionPrototype.prototype = + Generator.prototype = Object.create(IteratorPrototype); + GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; + GeneratorFunctionPrototype.constructor = GeneratorFunction; + GeneratorFunctionPrototype[toStringTagSymbol] = + GeneratorFunction.displayName = "GeneratorFunction"; + + // Helper for defining the .next, .throw, and .return methods of the + // Iterator interface in terms of a single ._invoke method. + function defineIteratorMethods(prototype) { + ["next", "throw", "return"].forEach(function(method) { + prototype[method] = function(arg) { + return this._invoke(method, arg); + }; + }); + } + + runtime.isGeneratorFunction = function(genFun) { + var ctor = typeof genFun === "function" && genFun.constructor; + return ctor + ? ctor === GeneratorFunction || + // For the native GeneratorFunction constructor, the best we can + // do is to check its .name property. + (ctor.displayName || ctor.name) === "GeneratorFunction" + : false; + }; + + runtime.mark = function(genFun) { + if (Object.setPrototypeOf) { + Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); + } else { + genFun.__proto__ = GeneratorFunctionPrototype; + if (!(toStringTagSymbol in genFun)) { + genFun[toStringTagSymbol] = "GeneratorFunction"; + } + } + genFun.prototype = Object.create(Gp); + return genFun; + }; + + // Within the body of any async function, `await x` is transformed to + // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test + // `hasOwn.call(value, "__await")` to determine if the yielded value is + // meant to be awaited. + runtime.awrap = function(arg) { + return { __await: arg }; + }; + + function AsyncIterator(generator) { + function invoke(method, arg, resolve, reject) { + var record = tryCatch(generator[method], generator, arg); + if (record.type === "throw") { + reject(record.arg); + } else { + var result = record.arg; + var value = result.value; + if (value && + typeof value === "object" && + hasOwn.call(value, "__await")) { + return Promise.resolve(value.__await).then(function(value) { + invoke("next", value, resolve, reject); + }, function(err) { + invoke("throw", err, resolve, reject); + }); + } + + return Promise.resolve(value).then(function(unwrapped) { + // When a yielded Promise is resolved, its final value becomes + // the .value of the Promise<{value,done}> result for the + // current iteration. If the Promise is rejected, however, the + // result for this iteration will be rejected with the same + // reason. Note that rejections of yielded Promises are not + // thrown back into the generator function, as is the case + // when an awaited Promise is rejected. This difference in + // behavior between yield and await is important, because it + // allows the consumer to decide what to do with the yielded + // rejection (swallow it and continue, manually .throw it back + // into the generator, abandon iteration, whatever). With + // await, by contrast, there is no opportunity to examine the + // rejection reason outside the generator function, so the + // only option is to throw it from the await expression, and + // let the generator function handle the exception. + result.value = unwrapped; + resolve(result); + }, reject); + } + } + + var previousPromise; + + function enqueue(method, arg) { + function callInvokeWithMethodAndArg() { + return new Promise(function(resolve, reject) { + invoke(method, arg, resolve, reject); + }); + } + + return previousPromise = + // If enqueue has been called before, then we want to wait until + // all previous Promises have been resolved before calling invoke, + // so that results are always delivered in the correct order. If + // enqueue has not been called before, then it is important to + // call invoke immediately, without waiting on a callback to fire, + // so that the async generator function has the opportunity to do + // any necessary setup in a predictable way. This predictability + // is why the Promise constructor synchronously invokes its + // executor callback, and why async functions synchronously + // execute code before the first await. Since we implement simple + // async functions in terms of async generators, it is especially + // important to get this right, even though it requires care. + previousPromise ? previousPromise.then( + callInvokeWithMethodAndArg, + // Avoid propagating failures to Promises returned by later + // invocations of the iterator. + callInvokeWithMethodAndArg + ) : callInvokeWithMethodAndArg(); + } + + // Define the unified helper method that is used to implement .next, + // .throw, and .return (see defineIteratorMethods). + this._invoke = enqueue; + } + + defineIteratorMethods(AsyncIterator.prototype); + AsyncIterator.prototype[asyncIteratorSymbol] = function () { + return this; + }; + runtime.AsyncIterator = AsyncIterator; + + // Note that simple async functions are implemented on top of + // AsyncIterator objects; they just return a Promise for the value of + // the final result produced by the iterator. + runtime.async = function(innerFn, outerFn, self, tryLocsList) { + var iter = new AsyncIterator( + wrap(innerFn, outerFn, self, tryLocsList) + ); + + return runtime.isGeneratorFunction(outerFn) + ? iter // If outerFn is a generator, return the full iterator. + : iter.next().then(function(result) { + return result.done ? result.value : iter.next(); + }); + }; + + function makeInvokeMethod(innerFn, self, context) { + var state = GenStateSuspendedStart; + + return function invoke(method, arg) { + if (state === GenStateExecuting) { + throw new Error("Generator is already running"); + } + + if (state === GenStateCompleted) { + if (method === "throw") { + throw arg; + } + + // Be forgiving, per 25.3.3.3.3 of the spec: + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume + return doneResult(); + } + + context.method = method; + context.arg = arg; + + while (true) { + var delegate = context.delegate; + if (delegate) { + var delegateResult = maybeInvokeDelegate(delegate, context); + if (delegateResult) { + if (delegateResult === ContinueSentinel) continue; + return delegateResult; + } + } + + if (context.method === "next") { + // Setting context._sent for legacy support of Babel's + // function.sent implementation. + context.sent = context._sent = context.arg; + + } else if (context.method === "throw") { + if (state === GenStateSuspendedStart) { + state = GenStateCompleted; + throw context.arg; + } + + context.dispatchException(context.arg); + + } else if (context.method === "return") { + context.abrupt("return", context.arg); + } + + state = GenStateExecuting; + + var record = tryCatch(innerFn, self, context); + if (record.type === "normal") { + // If an exception is thrown from innerFn, we leave state === + // GenStateExecuting and loop back for another invocation. + state = context.done + ? GenStateCompleted + : GenStateSuspendedYield; + + if (record.arg === ContinueSentinel) { + continue; + } + + return { + value: record.arg, + done: context.done + }; + + } else if (record.type === "throw") { + state = GenStateCompleted; + // Dispatch the exception by looping back around to the + // context.dispatchException(context.arg) call above. + context.method = "throw"; + context.arg = record.arg; + } + } + }; + } + + // Call delegate.iterator[context.method](context.arg) and handle the + // result, either by returning a { value, done } result from the + // delegate iterator, or by modifying context.method and context.arg, + // setting context.delegate to null, and returning the ContinueSentinel. + function maybeInvokeDelegate(delegate, context) { + var method = delegate.iterator[context.method]; + if (method === undefined) { + // A .throw or .return when the delegate iterator has no .throw + // method always terminates the yield* loop. + context.delegate = null; + + if (context.method === "throw") { + if (delegate.iterator.return) { + // If the delegate iterator has a return method, give it a + // chance to clean up. + context.method = "return"; + context.arg = undefined; + maybeInvokeDelegate(delegate, context); + + if (context.method === "throw") { + // If maybeInvokeDelegate(context) changed context.method from + // "return" to "throw", let that override the TypeError below. + return ContinueSentinel; + } + } + + context.method = "throw"; + context.arg = new TypeError( + "The iterator does not provide a 'throw' method"); + } + + return ContinueSentinel; + } + + var record = tryCatch(method, delegate.iterator, context.arg); + + if (record.type === "throw") { + context.method = "throw"; + context.arg = record.arg; + context.delegate = null; + return ContinueSentinel; + } + + var info = record.arg; + + if (! info) { + context.method = "throw"; + context.arg = new TypeError("iterator result is not an object"); + context.delegate = null; + return ContinueSentinel; + } + + if (info.done) { + // Assign the result of the finished delegate to the temporary + // variable specified by delegate.resultName (see delegateYield). + context[delegate.resultName] = info.value; + + // Resume execution at the desired location (see delegateYield). + context.next = delegate.nextLoc; + + // If context.method was "throw" but the delegate handled the + // exception, let the outer generator proceed normally. If + // context.method was "next", forget context.arg since it has been + // "consumed" by the delegate iterator. If context.method was + // "return", allow the original .return call to continue in the + // outer generator. + if (context.method !== "return") { + context.method = "next"; + context.arg = undefined; + } + + } else { + // Re-yield the result returned by the delegate method. + return info; + } + + // The delegate iterator is finished, so forget it and continue with + // the outer generator. + context.delegate = null; + return ContinueSentinel; + } + + // Define Generator.prototype.{next,throw,return} in terms of the + // unified ._invoke helper method. + defineIteratorMethods(Gp); + + Gp[toStringTagSymbol] = "Generator"; + + // A Generator should always return itself as the iterator object when the + // @@iterator function is called on it. Some browsers' implementations of the + // iterator prototype chain incorrectly implement this, causing the Generator + // object to not be returned from this call. This ensures that doesn't happen. + // See https://github.com/facebook/regenerator/issues/274 for more details. + Gp[iteratorSymbol] = function() { + return this; + }; + + Gp.toString = function() { + return "[object Generator]"; + }; + + function pushTryEntry(locs) { + var entry = { tryLoc: locs[0] }; + + if (1 in locs) { + entry.catchLoc = locs[1]; + } + + if (2 in locs) { + entry.finallyLoc = locs[2]; + entry.afterLoc = locs[3]; + } + + this.tryEntries.push(entry); + } + + function resetTryEntry(entry) { + var record = entry.completion || {}; + record.type = "normal"; + delete record.arg; + entry.completion = record; + } + + function Context(tryLocsList) { + // The root entry object (effectively a try statement without a catch + // or a finally block) gives us a place to store values thrown from + // locations where there is no enclosing try statement. + this.tryEntries = [{ tryLoc: "root" }]; + tryLocsList.forEach(pushTryEntry, this); + this.reset(true); + } + + runtime.keys = function(object) { + var keys = []; + for (var key in object) { + keys.push(key); + } + keys.reverse(); + + // Rather than returning an object with a next method, we keep + // things simple and return the next function itself. + return function next() { + while (keys.length) { + var key = keys.pop(); + if (key in object) { + next.value = key; + next.done = false; + return next; + } + } + + // To avoid creating an additional object, we just hang the .value + // and .done properties off the next function object itself. This + // also ensures that the minifier will not anonymize the function. + next.done = true; + return next; + }; + }; + + function values(iterable) { + if (iterable) { + var iteratorMethod = iterable[iteratorSymbol]; + if (iteratorMethod) { + return iteratorMethod.call(iterable); + } + + if (typeof iterable.next === "function") { + return iterable; + } + + if (!isNaN(iterable.length)) { + var i = -1, next = function next() { + while (++i < iterable.length) { + if (hasOwn.call(iterable, i)) { + next.value = iterable[i]; + next.done = false; + return next; + } + } + + next.value = undefined; + next.done = true; + + return next; + }; + + return next.next = next; + } + } + + // Return an iterator with no values. + return { next: doneResult }; + } + runtime.values = values; + + function doneResult() { + return { value: undefined, done: true }; + } + + Context.prototype = { + constructor: Context, + + reset: function(skipTempReset) { + this.prev = 0; + this.next = 0; + // Resetting context._sent for legacy support of Babel's + // function.sent implementation. + this.sent = this._sent = undefined; + this.done = false; + this.delegate = null; + + this.method = "next"; + this.arg = undefined; + + this.tryEntries.forEach(resetTryEntry); + + if (!skipTempReset) { + for (var name in this) { + // Not sure about the optimal order of these conditions: + if (name.charAt(0) === "t" && + hasOwn.call(this, name) && + !isNaN(+name.slice(1))) { + this[name] = undefined; + } + } + } + }, + + stop: function() { + this.done = true; + + var rootEntry = this.tryEntries[0]; + var rootRecord = rootEntry.completion; + if (rootRecord.type === "throw") { + throw rootRecord.arg; + } + + return this.rval; + }, + + dispatchException: function(exception) { + if (this.done) { + throw exception; + } + + var context = this; + function handle(loc, caught) { + record.type = "throw"; + record.arg = exception; + context.next = loc; + + if (caught) { + // If the dispatched exception was caught by a catch block, + // then let that catch block handle the exception normally. + context.method = "next"; + context.arg = undefined; + } + + return !! caught; + } + + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + var record = entry.completion; + + if (entry.tryLoc === "root") { + // Exception thrown outside of any try block that could handle + // it, so set the completion value of the entire function to + // throw the exception. + return handle("end"); + } + + if (entry.tryLoc <= this.prev) { + var hasCatch = hasOwn.call(entry, "catchLoc"); + var hasFinally = hasOwn.call(entry, "finallyLoc"); + + if (hasCatch && hasFinally) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } else if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + + } else if (hasCatch) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } + + } else if (hasFinally) { + if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + + } else { + throw new Error("try statement without catch or finally"); + } + } + } + }, + + abrupt: function(type, arg) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc <= this.prev && + hasOwn.call(entry, "finallyLoc") && + this.prev < entry.finallyLoc) { + var finallyEntry = entry; + break; + } + } + + if (finallyEntry && + (type === "break" || + type === "continue") && + finallyEntry.tryLoc <= arg && + arg <= finallyEntry.finallyLoc) { + // Ignore the finally entry if control is not jumping to a + // location outside the try/catch block. + finallyEntry = null; + } + + var record = finallyEntry ? finallyEntry.completion : {}; + record.type = type; + record.arg = arg; + + if (finallyEntry) { + this.method = "next"; + this.next = finallyEntry.finallyLoc; + return ContinueSentinel; + } + + return this.complete(record); + }, + + complete: function(record, afterLoc) { + if (record.type === "throw") { + throw record.arg; + } + + if (record.type === "break" || + record.type === "continue") { + this.next = record.arg; + } else if (record.type === "return") { + this.rval = this.arg = record.arg; + this.method = "return"; + this.next = "end"; + } else if (record.type === "normal" && afterLoc) { + this.next = afterLoc; + } + + return ContinueSentinel; + }, + + finish: function(finallyLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.finallyLoc === finallyLoc) { + this.complete(entry.completion, entry.afterLoc); + resetTryEntry(entry); + return ContinueSentinel; + } + } + }, + + "catch": function(tryLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc === tryLoc) { + var record = entry.completion; + if (record.type === "throw") { + var thrown = record.arg; + resetTryEntry(entry); + } + return thrown; + } + } + + // The context.catch method must only be called with a location + // argument that corresponds to a known catch block. + throw new Error("illegal catch attempt"); + }, + + delegateYield: function(iterable, resultName, nextLoc) { + this.delegate = { + iterator: values(iterable), + resultName: resultName, + nextLoc: nextLoc + }; + + if (this.method === "next") { + // Deliberately forget the last sent value so that we don't + // accidentally pass it on to the delegate. + this.arg = undefined; + } + + return ContinueSentinel; + } + }; +})( + // In sloppy mode, unbound `this` refers to the global object, fallback to + // Function constructor if we're in global strict mode. That is sadly a form + // of indirect eval which violates Content Security Policy. + (function() { return this })() || Function("return this")() +); + + +/***/ }), + +/***/ "./node_modules/whatwg-fetch/fetch.js": +/*!********************************************!*\ + !*** ./node_modules/whatwg-fetch/fetch.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +(function(self) { + 'use strict'; + + if (self.fetch) { + return + } + + var support = { + searchParams: 'URLSearchParams' in self, + iterable: 'Symbol' in self && 'iterator' in Symbol, + blob: 'FileReader' in self && 'Blob' in self && (function() { + try { + new Blob() + return true + } catch(e) { + return false + } + })(), + formData: 'FormData' in self, + arrayBuffer: 'ArrayBuffer' in self + } + + if (support.arrayBuffer) { + var viewClasses = [ + '[object Int8Array]', + '[object Uint8Array]', + '[object Uint8ClampedArray]', + '[object Int16Array]', + '[object Uint16Array]', + '[object Int32Array]', + '[object Uint32Array]', + '[object Float32Array]', + '[object Float64Array]' + ] + + var isDataView = function(obj) { + return obj && DataView.prototype.isPrototypeOf(obj) + } + + var isArrayBufferView = ArrayBuffer.isView || function(obj) { + return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1 + } + } + + function normalizeName(name) { + if (typeof name !== 'string') { + name = String(name) + } + if (/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(name)) { + throw new TypeError('Invalid character in header field name') + } + return name.toLowerCase() + } + + function normalizeValue(value) { + if (typeof value !== 'string') { + value = String(value) + } + return value + } + + // Build a destructive iterator for the value list + function iteratorFor(items) { + var iterator = { + next: function() { + var value = items.shift() + return {done: value === undefined, value: value} + } + } + + if (support.iterable) { + iterator[Symbol.iterator] = function() { + return iterator + } + } + + return iterator + } + + function Headers(headers) { + this.map = {} + + if (headers instanceof Headers) { + headers.forEach(function(value, name) { + this.append(name, value) + }, this) + } else if (Array.isArray(headers)) { + headers.forEach(function(header) { + this.append(header[0], header[1]) + }, this) + } else if (headers) { + Object.getOwnPropertyNames(headers).forEach(function(name) { + this.append(name, headers[name]) + }, this) + } + } + + Headers.prototype.append = function(name, value) { + name = normalizeName(name) + value = normalizeValue(value) + var oldValue = this.map[name] + this.map[name] = oldValue ? oldValue+','+value : value + } + + Headers.prototype['delete'] = function(name) { + delete this.map[normalizeName(name)] + } + + Headers.prototype.get = function(name) { + name = normalizeName(name) + return this.has(name) ? this.map[name] : null + } + + Headers.prototype.has = function(name) { + return this.map.hasOwnProperty(normalizeName(name)) + } + + Headers.prototype.set = function(name, value) { + this.map[normalizeName(name)] = normalizeValue(value) + } + + Headers.prototype.forEach = function(callback, thisArg) { + for (var name in this.map) { + if (this.map.hasOwnProperty(name)) { + callback.call(thisArg, this.map[name], name, this) + } + } + } + + Headers.prototype.keys = function() { + var items = [] + this.forEach(function(value, name) { items.push(name) }) + return iteratorFor(items) + } + + Headers.prototype.values = function() { + var items = [] + this.forEach(function(value) { items.push(value) }) + return iteratorFor(items) + } + + Headers.prototype.entries = function() { + var items = [] + this.forEach(function(value, name) { items.push([name, value]) }) + return iteratorFor(items) + } + + if (support.iterable) { + Headers.prototype[Symbol.iterator] = Headers.prototype.entries + } + + function consumed(body) { + if (body.bodyUsed) { + return Promise.reject(new TypeError('Already read')) + } + body.bodyUsed = true + } + + function fileReaderReady(reader) { + return new Promise(function(resolve, reject) { + reader.onload = function() { + resolve(reader.result) + } + reader.onerror = function() { + reject(reader.error) + } + }) + } + + function readBlobAsArrayBuffer(blob) { + var reader = new FileReader() + var promise = fileReaderReady(reader) + reader.readAsArrayBuffer(blob) + return promise + } + + function readBlobAsText(blob) { + var reader = new FileReader() + var promise = fileReaderReady(reader) + reader.readAsText(blob) + return promise + } + + function readArrayBufferAsText(buf) { + var view = new Uint8Array(buf) + var chars = new Array(view.length) + + for (var i = 0; i < view.length; i++) { + chars[i] = String.fromCharCode(view[i]) + } + return chars.join('') + } + + function bufferClone(buf) { + if (buf.slice) { + return buf.slice(0) + } else { + var view = new Uint8Array(buf.byteLength) + view.set(new Uint8Array(buf)) + return view.buffer + } + } + + function Body() { + this.bodyUsed = false + + this._initBody = function(body) { + this._bodyInit = body + if (!body) { + this._bodyText = '' + } else if (typeof body === 'string') { + this._bodyText = body + } else if (support.blob && Blob.prototype.isPrototypeOf(body)) { + this._bodyBlob = body + } else if (support.formData && FormData.prototype.isPrototypeOf(body)) { + this._bodyFormData = body + } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) { + this._bodyText = body.toString() + } else if (support.arrayBuffer && support.blob && isDataView(body)) { + this._bodyArrayBuffer = bufferClone(body.buffer) + // IE 10-11 can't handle a DataView body. + this._bodyInit = new Blob([this._bodyArrayBuffer]) + } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) { + this._bodyArrayBuffer = bufferClone(body) + } else { + throw new Error('unsupported BodyInit type') + } + + if (!this.headers.get('content-type')) { + if (typeof body === 'string') { + this.headers.set('content-type', 'text/plain;charset=UTF-8') + } else if (this._bodyBlob && this._bodyBlob.type) { + this.headers.set('content-type', this._bodyBlob.type) + } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) { + this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8') + } + } + } + + if (support.blob) { + this.blob = function() { + var rejected = consumed(this) + if (rejected) { + return rejected + } + + if (this._bodyBlob) { + return Promise.resolve(this._bodyBlob) + } else if (this._bodyArrayBuffer) { + return Promise.resolve(new Blob([this._bodyArrayBuffer])) + } else if (this._bodyFormData) { + throw new Error('could not read FormData body as blob') + } else { + return Promise.resolve(new Blob([this._bodyText])) + } + } + + this.arrayBuffer = function() { + if (this._bodyArrayBuffer) { + return consumed(this) || Promise.resolve(this._bodyArrayBuffer) + } else { + return this.blob().then(readBlobAsArrayBuffer) + } + } + } + + this.text = function() { + var rejected = consumed(this) + if (rejected) { + return rejected + } + + if (this._bodyBlob) { + return readBlobAsText(this._bodyBlob) + } else if (this._bodyArrayBuffer) { + return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer)) + } else if (this._bodyFormData) { + throw new Error('could not read FormData body as text') + } else { + return Promise.resolve(this._bodyText) + } + } + + if (support.formData) { + this.formData = function() { + return this.text().then(decode) + } + } + + this.json = function() { + return this.text().then(JSON.parse) + } + + return this + } + + // HTTP methods whose capitalization should be normalized + var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'] + + function normalizeMethod(method) { + var upcased = method.toUpperCase() + return (methods.indexOf(upcased) > -1) ? upcased : method + } + + function Request(input, options) { + options = options || {} + var body = options.body + + if (input instanceof Request) { + if (input.bodyUsed) { + throw new TypeError('Already read') + } + this.url = input.url + this.credentials = input.credentials + if (!options.headers) { + this.headers = new Headers(input.headers) + } + this.method = input.method + this.mode = input.mode + if (!body && input._bodyInit != null) { + body = input._bodyInit + input.bodyUsed = true + } + } else { + this.url = String(input) + } + + this.credentials = options.credentials || this.credentials || 'omit' + if (options.headers || !this.headers) { + this.headers = new Headers(options.headers) + } + this.method = normalizeMethod(options.method || this.method || 'GET') + this.mode = options.mode || this.mode || null + this.referrer = null + + if ((this.method === 'GET' || this.method === 'HEAD') && body) { + throw new TypeError('Body not allowed for GET or HEAD requests') + } + this._initBody(body) + } + + Request.prototype.clone = function() { + return new Request(this, { body: this._bodyInit }) + } + + function decode(body) { + var form = new FormData() + body.trim().split('&').forEach(function(bytes) { + if (bytes) { + var split = bytes.split('=') + var name = split.shift().replace(/\+/g, ' ') + var value = split.join('=').replace(/\+/g, ' ') + form.append(decodeURIComponent(name), decodeURIComponent(value)) + } + }) + return form + } + + function parseHeaders(rawHeaders) { + var headers = new Headers() + // Replace instances of \r\n and \n followed by at least one space or horizontal tab with a space + // https://tools.ietf.org/html/rfc7230#section-3.2 + var preProcessedHeaders = rawHeaders.replace(/\r?\n[\t ]+/g, ' ') + preProcessedHeaders.split(/\r?\n/).forEach(function(line) { + var parts = line.split(':') + var key = parts.shift().trim() + if (key) { + var value = parts.join(':').trim() + headers.append(key, value) + } + }) + return headers + } + + Body.call(Request.prototype) + + function Response(bodyInit, options) { + if (!options) { + options = {} + } + + this.type = 'default' + this.status = options.status === undefined ? 200 : options.status + this.ok = this.status >= 200 && this.status < 300 + this.statusText = 'statusText' in options ? options.statusText : 'OK' + this.headers = new Headers(options.headers) + this.url = options.url || '' + this._initBody(bodyInit) + } + + Body.call(Response.prototype) + + Response.prototype.clone = function() { + return new Response(this._bodyInit, { + status: this.status, + statusText: this.statusText, + headers: new Headers(this.headers), + url: this.url + }) + } + + Response.error = function() { + var response = new Response(null, {status: 0, statusText: ''}) + response.type = 'error' + return response + } + + var redirectStatuses = [301, 302, 303, 307, 308] + + Response.redirect = function(url, status) { + if (redirectStatuses.indexOf(status) === -1) { + throw new RangeError('Invalid status code') + } + + return new Response(null, {status: status, headers: {location: url}}) + } + + self.Headers = Headers + self.Request = Request + self.Response = Response + + self.fetch = function(input, init) { + return new Promise(function(resolve, reject) { + var request = new Request(input, init) + var xhr = new XMLHttpRequest() + + xhr.onload = function() { + var options = { + status: xhr.status, + statusText: xhr.statusText, + headers: parseHeaders(xhr.getAllResponseHeaders() || '') + } + options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL') + var body = 'response' in xhr ? xhr.response : xhr.responseText + resolve(new Response(body, options)) + } + + xhr.onerror = function() { + reject(new TypeError('Network request failed')) + } + + xhr.ontimeout = function() { + reject(new TypeError('Network request failed')) + } + + xhr.open(request.method, request.url, true) + + if (request.credentials === 'include') { + xhr.withCredentials = true + } else if (request.credentials === 'omit') { + xhr.withCredentials = false + } + + if ('responseType' in xhr && support.blob) { + xhr.responseType = 'blob' + } + + request.headers.forEach(function(value, name) { + xhr.setRequestHeader(name, value) + }) + + xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit) + }) + } + self.fetch.polyfill = true +})(typeof self !== 'undefined' ? self : this); + + +/***/ }), + +/***/ "./src/js/autoscale/index.js": +/*!***********************************!*\ + !*** ./src/js/autoscale/index.js ***! + \***********************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -// 7.1.1 ToPrimitive(input [, PreferredType]) -var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/library/modules/_is-object.js"); -// instead of the ES6 spec version, we didn't implement @@toPrimitive case -// and the second argument - flag - preferred type is a string -module.exports = function (it, S) { - if (!isObject(it)) return it; - var fn, val; - if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; - if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; - if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; - throw TypeError("Can't convert object to primitive value"); +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Decorate = exports.Autoscale = exports.autoscaleInit = undefined; + +var _stringify = __webpack_require__(/*! babel-runtime/core-js/json/stringify */ "./node_modules/babel-runtime/core-js/json/stringify.js"); + +var _stringify2 = _interopRequireDefault(_stringify); + +var _keys = __webpack_require__(/*! babel-runtime/core-js/object/keys */ "./node_modules/babel-runtime/core-js/object/keys.js"); + +var _keys2 = _interopRequireDefault(_keys); + +var _regenerator = __webpack_require__(/*! babel-runtime/regenerator */ "./node_modules/babel-runtime/regenerator/index.js"); + +var _regenerator2 = _interopRequireDefault(_regenerator); + +var _asyncToGenerator2 = __webpack_require__(/*! babel-runtime/helpers/asyncToGenerator */ "./node_modules/babel-runtime/helpers/asyncToGenerator.js"); + +var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2); + +var _extends2 = __webpack_require__(/*! babel-runtime/helpers/extends */ "./node_modules/babel-runtime/helpers/extends.js"); + +var _extends3 = _interopRequireDefault(_extends2); + +var _request = __webpack_require__(/*! ./request.js */ "./src/js/autoscale/request.js"); + +var _request2 = _interopRequireDefault(_request); + +var _log = __webpack_require__(/*! ../log */ "./src/js/log/index.js"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NAME = 'Red5ProStreamManagerExt'; +var isFailoverConfig = /(rtc|rtmp|hls)/; +var isRTC = /(wss|ws)/; +// const isRTMP = /(rtmps|rtmp)/ +// const isHLS = /(https|http)/ + +var modifyInitConfigWithResponse = function modifyInitConfigWithResponse(config, response, autoscaleConfig) { + var c = void 0; + if (autoscaleConfig.useProxy && isRTC.test(config.protocol)) { + (0, _log.debug)(NAME, '[modify-config]:: useProxy'); + var connParams = { + host: response.serverAddress, + app: response.scope.substr(1, response.scope.length - 1) + }; + c = (0, _extends3.default)({}, config, { + protocol: config.protocol, + port: config.port, + streamName: response.name, + host: autoscaleConfig.host, + app: 'streammanager', + connectionParams: config.connectionParams ? (0, _extends3.default)({}, config.connectionParams, { connParams: connParams }) : connParams + }); + } else { + (0, _log.debug)(NAME, '[modify-config]:: Do Not useProxy'); + c = (0, _extends3.default)({}, config, { + host: response.serverAddress, + app: response.scope, + streamName: response.name + }); + } + return c; +}; + +var execute = function () { + var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(config, count, limit) { + var onfailure, response; + return _regenerator2.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + onfailure = function onfailure() { + if (++count < limit) { + var timeout = setTimeout(function () { + clearTimeout(timeout); + execute(config, count, limit); + }, 1000); + return true; + } + return false; + }; + + _context.prev = 1; + _context.next = 4; + return (0, _request2.default)(config); + + case 4: + response = _context.sent; + return _context.abrupt('return', response); + + case 8: + _context.prev = 8; + _context.t0 = _context['catch'](1); + + if (onfailure()) { + _context.next = 12; + break; + } + + throw _context.t0; + + case 12: + case 'end': + return _context.stop(); + } + } + }, _callee, undefined, [[1, 8]]); + })); + + return function execute(_x, _x2, _x3) { + return _ref.apply(this, arguments); + }; +}(); + +var autoscaleInit = exports.autoscaleInit = function () { + var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(proxy, autoscaleConfig, initConfig) { + var retryCount, retryLimit, response, keys, key; + return _regenerator2.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + retryCount = 0; + retryLimit = autoscaleConfig.retryLimit; + response = void 0; + _context2.prev = 3; + _context2.next = 6; + return execute(autoscaleConfig, retryCount, retryLimit); + + case 6: + response = _context2.sent; + keys = (0, _keys2.default)(initConfig); + + if (isFailoverConfig.test(keys.toString())) { + key = void 0; + + for (key in initConfig) { + initConfig[key] = modifyInitConfigWithResponse(initConfig[key], response, autoscaleConfig); + } + } else { + initConfig = modifyInitConfigWithResponse(initConfig, response, autoscaleConfig); + } + (0, _log.debug)(NAME, '[init-config]:: ' + (0, _stringify2.default)(initConfig, null, 2)); + return _context2.abrupt('return', proxy.init(initConfig)); + + case 13: + _context2.prev = 13; + _context2.t0 = _context2['catch'](3); + throw _context2.t0; + + case 16: + case 'end': + return _context2.stop(); + } + } + }, _callee2, undefined, [[3, 13]]); + })); + + return function autoscaleInit(_x4, _x5, _x6) { + return _ref2.apply(this, arguments); + }; +}(); + +var Autoscale = exports.Autoscale = function Autoscale(proxy) { + return { + init: function init(autoscaleConfig, initConfig) { + return autoscaleInit(proxy, autoscaleConfig, initConfig); + } + }; }; +var Decorate = exports.Decorate = function Decorate(clazz) { + var fn = function fn(autoscaleConfig, initConfig) { + return autoscaleInit(this, autoscaleConfig, initConfig); + }; + Object.defineProperty(clazz.prototype, 'autoscale', { + value: fn + }); +}; /***/ }), -/***/ "./node_modules/core-js/library/modules/es6.object.define-property.js": -/*!****************************************************************************!*\ - !*** ./node_modules/core-js/library/modules/es6.object.define-property.js ***! - \****************************************************************************/ +/***/ "./src/js/autoscale/request.js": +/*!*************************************!*\ + !*** ./src/js/autoscale/request.js ***! + \*************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/library/modules/_export.js"); -// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) -$export($export.S + $export.F * !__webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/library/modules/_descriptors.js"), 'Object', { defineProperty: __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/library/modules/_object-dp.js").f }); +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _regenerator = __webpack_require__(/*! babel-runtime/regenerator */ "./node_modules/babel-runtime/regenerator/index.js"); + +var _regenerator2 = _interopRequireDefault(_regenerator); + +var _extends2 = __webpack_require__(/*! babel-runtime/helpers/extends */ "./node_modules/babel-runtime/helpers/extends.js"); + +var _extends3 = _interopRequireDefault(_extends2); + +var _asyncToGenerator2 = __webpack_require__(/*! babel-runtime/helpers/asyncToGenerator */ "./node_modules/babel-runtime/helpers/asyncToGenerator.js"); + +var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2); + +var _browser = __webpack_require__(/*! ../env/browser */ "./src/js/env/browser.js"); + +var _browser2 = _interopRequireDefault(_browser); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var defaultConfig = { + action: undefined, // required + protocol: 'https', // required, default=https + host: undefined, // required + port: undefined, // optional + scope: 'live', // optional, default=live + streamName: undefined, // required + apiVersion: '3.0', // required, default=3.0 + region: undefined, // optional + accessToken: undefined, // optional + retryLimit: 0, // optional, default (no retry) + useProxy: true // optional, default=true. Enforces connection proxy for WebRTC clients +}; + +var endpointFromConfiguration = function endpointFromConfiguration(configuration) { + var action = configuration.action, + protocol = configuration.protocol, + host = configuration.host, + port = configuration.port, + scope = configuration.scope, + streamName = configuration.streamName, + apiVersion = configuration.apiVersion, + region = configuration.region, + accessToken = configuration.accessToken; + + var portURI = port ? ':' + port : ''; + var url = protocol + '://' + host + portURI + '/streammanager/api/' + apiVersion + '/event/' + scope + '/' + streamName + '?action=' + action; + if (region) { + url += '®ion=' + region; + } + if (accessToken) { + url += '&accessToken=' + accessToken; + } + return url; +}; + +var request = function () { + var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(config) { + var configuration, url, response, payload, error; + return _regenerator2.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + configuration = (0, _extends3.default)({}, defaultConfig, config); + url = endpointFromConfiguration(configuration); + _context.next = 4; + return _browser2.default.fetch(url); + + case 4: + response = _context.sent; + + if (!(response.status >= 200 && response.status < 300 && response.headers.get('content-type') && response.headers.get('content-type').toLowerCase().indexOf('application/json') >= 0)) { + _context.next = 12; + break; + } + + _context.next = 8; + return response.json(); + + case 8: + payload = _context.sent; + return _context.abrupt('return', payload); + + case 12: + error = new Error('Could not properly parse response from ' + url + '.'); + + error.response = response; + throw error; + + case 15: + case 'end': + return _context.stop(); + } + } + }, _callee, undefined); + })); + + return function request(_x) { + return _ref.apply(this, arguments); + }; +}(); +exports.default = request; /***/ }), @@ -1240,10 +4772,15 @@ $export($export.S + $export.F * !__webpack_require__(/*! ./_descriptors */ "./no Object.defineProperty(exports, "__esModule", { value: true }); + +__webpack_require__(/*! whatwg-fetch */ "./node_modules/whatwg-fetch/fetch.js"); + exports.default = { getRed5ProSDK: function getRed5ProSDK() { return window.red5prosdk; - } + }, + + fetch: window.fetch.bind(window) }; /***/ }), @@ -1269,26 +4806,27 @@ var _browser = __webpack_require__(/*! ./env/browser */ "./src/js/env/browser.js var _browser2 = _interopRequireDefault(_browser); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _autoscale = __webpack_require__(/*! ./autoscale */ "./src/js/autoscale/index.js"); -(0, _log.establishLogger)('' + "debug" || _log.LEVELS.DEBUG); // eslint-disable-line no-undef +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -/** - * Sets the log level for logs from the SDK - * @param {string} level - * The specified log level. - * @see LOG_LEVELS - */ /** * Main entry of Stream Manager Extension for Red5 Pro HTML SDK, accessible on the `window` global at `red5prosdk_ext_stream_manager`. * * @file red5pro-ext-stream-manager.min.js * @module red5prosdk_ext_stream_manager * - * */ // SDK_VERSION, LOG_LEVEL injected from webpack build. +(0, _log.establishLogger)('' + "debug" || _log.LEVELS.DEBUG); // eslint-disable-line no-undef + +/** + * Sets the log level for logs from the SDK + * @param {string} level + * The specified log level. + * @see LOG_LEVELS + */ var setLogLevel = exports.setLogLevel = function setLogLevel(level) { if (_log.LEVELS.hasOwnProperty(level.toUpperCase())) { (0, _log.establishLogger)(level); @@ -1319,7 +4857,21 @@ var getLogger = exports.getLogger = _log.getLogger; var decorate = exports.decorate = function decorate() { var red5prosdk = _browser2.default.getRed5ProSDK(); if (red5prosdk) { - getLogger().debug('Will Decorate U+1F987'); + var Red5ProSubscriber = red5prosdk.Red5ProSubscriber, + RTCSubscriber = red5prosdk.RTCSubscriber, + HLSSubscriber = red5prosdk.HLSSubscriber, + RTMPSubscriber = red5prosdk.RTMPSubscriber, + Red5ProPublisher = red5prosdk.Red5ProPublisher, + RTCPublisher = red5prosdk.RTCPublisher, + RTMPPublisher = red5prosdk.RTMPPublisher; + + (0, _autoscale.Decorate)(Red5ProSubscriber); + (0, _autoscale.Decorate)(RTCSubscriber); + (0, _autoscale.Decorate)(HLSSubscriber); + (0, _autoscale.Decorate)(RTMPSubscriber); + (0, _autoscale.Decorate)(Red5ProPublisher); + (0, _autoscale.Decorate)(RTCPublisher); + (0, _autoscale.Decorate)(RTMPPublisher); } else { getLogger().warn('Could not decorate the red5prosdk global. It does not exist.'); } @@ -1487,4 +5039,4 @@ module.exports = __webpack_require__(/*! /Users/toddanderson/Documents/Workplace /******/ }); }); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9yZWQ1cHJvc2RrX2V4dF9zdHJlYW1fbWFuYWdlci93ZWJwYWNrL3VuaXZlcnNhbE1vZHVsZURlZmluaXRpb24iLCJ3ZWJwYWNrOi8vcmVkNXBy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IHJldHVybiAnXFwnJyArIG9iai50b1N0cmluZygpICsgJ1xcJyc7XG59XG5cbmZ1bmN0aW9uIGZvcm1hdChmKSB7XG4gICAgdmFyIGFyZ3VtZW50cyQxID0gYXJndW1lbnRzO1xuXG4gICAgaWYgKHR5cGVvZiBmICE9PSAnc3RyaW5nJykge1xuICAgICAgICB2YXIgb2JqZWN0cyA9IG5ldyBBcnJheShhcmd1bWVudHMubGVuZ3RoKTtcbiAgICAgICAgZm9yICh2YXIgaSQxID0gMDtpJDEgPCBhcmd1bWVudHMubGVuZ3RoOyBpJDErKykge1xuICAgICAgICAgICAgb2JqZWN0c1tpJDFdID0gaW5zcGVjdChhcmd1bWVudHMkMVtpJDFdKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gb2JqZWN0cy5qb2luKCcgJyk7XG4gICAgfVxuICAgIHZhciBmb3JtYXRSZWdFeHAgPSAvJVtzZGolXS9nO1xuICAgIHZhciBpID0gMTtcbiAgICB2YXIgYXJncyA9IGFyZ3VtZW50cztcbiAgICB2YXIgbGVuID0gYXJncy5sZW5ndGg7XG4gICAgdmFyIHN0ciA9IFN0cmluZyhmKS5yZXBsYWNlKGZvcm1hdFJlZ0V4cCwgZnVuY3Rpb24gKHgpIHtcbiAgICAgICAgaWYgKHggPT09ICclJScpIHtcbiAgICAgICAgICAgIHJldHVybiAnJSc7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGkgPj0gbGVuKSB7XG4gICAgICAgICAgICByZXR1cm4geDtcbiAgICAgICAgfVxuICAgICAgICBzd2l0Y2ggKHgpIHtcbiAgICAgICAgICAgIGNhc2UgJyVzJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gU3RyaW5nKGFyZ3NbaSsrXSk7XG4gICAgICAgICAgICBjYXNlICclZCc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIE51bWJlcihhcmdzW2krK10pO1xuICAgICAgICAgICAgY2FzZSAnJWonOlxuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeShhcmdzW2krK10pO1xuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKF8pIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbQ2lyY3VsYXJdJztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgIHJldHVybiB4O1xuICAgICAgICB9XG4gICAgfSk7XG4gICAgZm9yICh2YXIgeCA9IGFyZ3NbaV07aSA8IGxlbjsgeCA9IGFyZ3NbKytpXSkge1xuICAgICAgICBzdHIgKz0gJyAnICsgeDtcbiAgICB9XG4gICAgcmV0dXJuIHN0cjtcbn1cblxuZnVuY3Rpb24gZXh0cmFjdFNyY0Zyb21TdGFja3RyYWNlKHN0YWNrLCBsZXZlbCkge1xuICAgIHZhciBzdGFja0xpbmVzID0gc3RhY2suc3BsaXQoJ1xcbicpO1xuICAgIGlmIChzdGFja0xpbmVzWzBdICYmIHN0YWNrTGluZXNbMF0uaW5kZXhPZihDQUxMX1NUQUNLX0VSUk9SKSA+PSAwKSB7XG4gICAgICAgIHN0YWNrTGluZXMuc2hpZnQoKTtcbiAgICB9XG4gICAgdmFyIHRhcmdldExpbmUgPSBzdGFja0xpbmVzW2xldmVsXTtcbiAgICB2YXIgbGluZUluZm8gPSBudWxsO1xuICAgIGlmICh0YXJnZXRMaW5lKSB7XG4gICAgICAgIHZhciBleGVjUmVzdWx0ID0gL15cXHMqKGF0fC4qQClcXHMqKC4rKT8kLy5leGVjKHRhcmdldExpbmUpO1xuICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShleGVjUmVzdWx0KSAmJiBleGVjUmVzdWx0WzJdKSB7XG4gICAgICAgICAgICBsaW5lSW5mbyA9IGV4ZWNSZXN1bHRbMl07XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBsaW5lSW5mbyA9IHRhcmdldExpbmU7XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIGxpbmVJbmZvO1xufVxuXG5mdW5jdGlvbiBfaW5kZW50KHMsIGluZGVudCkge1xuICAgIGlmICghaW5kZW50KSB7XG4gICAgICAgIGluZGVudCA9ICcgICAgJztcbiAgICB9XG4gICAgdmFyIGxpbmVzID0gcy5zcGxpdCgvXFxyP1xcbi9nKTtcbiAgICByZXR1cm4gaW5kZW50ICsgbGluZXMuam9pbignXFxuJyArIGluZGVudCk7XG59XG5cbnZhciBfd2FybmVkID0ge307XG5mdW5jdGlvbiBfd2Fybihtc2csIGRlZHVwS2V5KSB7XG4gICAgaWYgKGRlZHVwS2V5KSB7XG4gICAgICAgIGlmIChfd2FybmVkW2RlZHVwS2V5XSkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIF93YXJuZWRbZGVkdXBLZXldID0gdHJ1ZTtcbiAgICB9XG4gICAgY29uc29sZS5lcnJvcihtc2cgKyAnXFxuJyk7XG59XG5cbmZ1bmN0aW9uIF9oYXZlV2FybmVkKGRlZHVwS2V5KSB7XG4gICAgcmV0dXJuIF93YXJuZWRbZGVkdXBLZXldO1xufVxuXG5mdW5jdGlvbiBzYWZlQ3ljbGVzKCkge1xuICAgIHZhciBzZWVuID0gW107XG4gICAgcmV0dXJuIGZ1bmN0aW9uIChrZXksIHZhbCkge1xuICAgICAgICBpZiAoIXZhbCB8fCB0eXBlb2YgdmFsICE9PSAnb2JqZWN0Jykge1xuICAgICAgICAgICAgcmV0dXJuIHZhbDtcbiAgICAgICAgfVxuICAgICAgICBpZiAoc2Vlbi5pbmRleE9mKHZhbCkgIT09IC0xKSB7XG4gICAgICAgICAgICByZXR1cm4gJ1tDaXJjdWxhcl0nO1xuICAgICAgICB9XG4gICAgICAgIHNlZW4ucHVzaCh2YWwpO1xuICAgICAgICByZXR1cm4gdmFsO1xuICAgIH07XG59XG5cbnZhciBUUkFDRSQxID0gMTA7XG52YXIgREVCVUckMSA9IDIwO1xudmFyIElORk8kMSA9I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iAgICAgICAgICAgIG5hbWUgPSBwYXJlbnRGaWVsZE5hbWVzW2ldO1xuICAgICAgICAgICAgZmllbGRzW25hbWVdID0gcGFyZW50LmZpZWxkc1tuYW1lXTtcbiAgICAgICAgfVxuICAgICAgICB2YXIgbmFtZXMgPSBPYmplY3Qua2V5cyhvcHRpb25zKTtcbiAgICAgICAgZm9yIChpID0gMDsgaSA8IG5hbWVzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICBuYW1lID0gbmFtZXNbaV07XG4gICAgICAgICAgICBmaWVsZHNbbmFtZV0gPSBvcHRpb25zW25hbWVdO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybjtcbiAgICB9XG4gICAgaWYgKHBhcmVudCkge1xuICAgICAgICB0aGlzLl9sZXZlbCA9IHBhcmVudC5fbGV2ZWw7XG4gICAgICAgIHRoaXMuc3RyZWFtcyA9IFtdO1xuICAgICAgICBmb3IgKGkgPSAwOyBpIDwgcGFyZW50LnN0cmVhbXMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIHZhciBzID0gb2JqQ29weShwYXJlbnQuc3RyZWFtc1tpXSk7XG4gICAgICAgICAgICB0aGlzJDEuc3RyZWFtcy5wdXNoKHMpO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMuc2VyaWFsaXplcnMgPSBvYmpDb3B5KHBhcmVudC5zZXJpYWxpemVycyk7XG4gICAgICAgIHRoaXMuc3JjID0gcGFyZW50LnNyYztcbiAgICAgICAgdGhpcy5maWVsZHMgPSBvYmpDb3B5KHBhcmVudC5maWVsZHMpO1xuICAgICAgICBpZiAob3B0aW9ucy5sZXZlbCkge1xuICAgICAgICAgICAgdGhpcy5sZXZlbChvcHRpb25zLmxldmVsKTtcbiAgICAgICAgfVxuICAgIH0gZWxzZSB7XG4gICAgICAgIHRoaXMuX2xldmVsID0gTnVtYmVyLlBPU0lUSVZFX0lORklOSVRZO1xuICAgICAgICB0aGlzLnN0cmVhbXMgPSBbXTtcbiAgICAgICAgdGhpcy5zZXJpYWxpemVycyA9IG51bGw7XG4gICAgICAgIHRoaXMuc3JjID0gZmFsc2U7XG4gICAgICAgIHRoaXMuZmllbGRzID0ge307XG4gICAgfVxuICAgIGlmIChvcHRpb25zLnN0cmVhbSkge1xuICAgICAgICB0aGlzLmFkZFN0cmVhbSh7XG4gICAgICAgICAgICB0eXBlOiAnc3RyZWFtJyxcbiAgICAgICAgICAgIHN0cmVhbTogb3B0aW9ucy5zdHJlYW0sXG4gICAgICAgICAgICBsZXZlbDogb3B0aW9ucy5sZXZlbFxuICAgICAgICB9KTtcbiAgICB9IGVsc2UgaWYgKG9wdGlvbnMuc3RyZWFtcykge1xuICAgICAgICBvcHRpb25zLnN0cmVhbXMuZm9yRWFjaChmdW5jdGlvbiAocykge1xuICAgICAgICAgICAgdGhpcyQxLmFkZFN0cmVhbShzLCBvcHRpb25zLmxldmVsKTtcbiAgICAgICAgfSk7XG4gICAgfSBlbHNlIGlmIChwYXJlbnQgJiYgb3B0aW9ucy5sZXZlbCkge1xuICAgICAgICB0aGlzLmxldmVsKG9wdGlvbnMubGV2ZWwpO1xuICAgIH0gZWxzZSBpZiAoIXBhcmVudCkge1xuICAgICAgICB0aGlzLmFkZFN0cmVhbSh7XG4gICAgICAgICAgICB0eXBlOiAncmF3JyxcbiAgICAgICAgICAgIHN0cmVhbTogbmV3IENvbnNvbGVSYXdTdHJlYW0oKSxcbiAgICAgICAgICAgIGxldmVsOiBvcHRpb25zLmxldmVsXG4gICAgICAgIH0pO1xuICAgIH1cbiAgICBpZiAob3B0aW9ucy5zZXJpYWxpemVycykge1xuICAgICAgICB0aGlzLmFkZFNlcmlhbGl6ZXJzKG9wdGlvbnMuc2VyaWFsaXplcnMpO1xuICAgIH1cbiAgICBpZiAob3B0aW9ucy5zcmMpIHtcbiAgICAgICAgdGhpcy5zcmMgPSB0cnVlO1xuICAgIH1cbiAgICBmaWVsZHMgPSBvYmpDb3B5KG9wdGlvbnMpO1xuICAgIGRlbGV0ZSBm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y5zZXJpYWxpemVycy5lcnIgPyBsb2cuc2VyaWFsaXplcnMuZXJyKGFyZ3NbMF0pIDogc3RkU2VyaWFsaXplcnMuZXJyKGFyZ3NbMF0pXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICBleGNsdWRlRmllbGRzID0ge1xuICAgICAgICAgICAgICAgICAgICBlcnI6IHRydWVcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIGlmIChhcmdzLmxlbmd0aCA9PT0gMSkge1xuICAgICAgICAgICAgICAgICAgICBtc2dBcmdzID0gW2ZpZWxkcy5lcnIubWVzc2FnZV07XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgbXNnQXJncyA9IEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKGFyZ3MsIDEpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIGFyZ3NbMF0gIT09ICdvYmplY3QnICYmIGFyZ3NbMF0gIT09IG51bGwgfHwgQXJyYXkuaXNBcnJheShhcmdzWzBdKSkge1xuICAgICAgICAgICAgICAgIGZpZWxkcyA9IG51bGw7XG4gICAgICAgICAgICAgICAgbXNnQXJncyA9IEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKGFyZ3MpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBmaWVsZHMgPSBhcmdzWzBdO1xuICAgICAgICAgICAgICAgIGlmIChhcmdzLmxlbmd0aCA9PT0gMSAmJiBmaWVsZHMuZXJyICYmIGZpZWxkcy5lcnIgaW5zdGFuY2VvZiBFcnJvcikge1xuICAgICAgICAgICAgICAgICAgICBtc2dBcmdzID0gW2ZpZWxkcy5lcnIubWVzc2FnZV07XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgbXNnQXJncyA9IEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKGFyZ3MsIDEpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciByZWMgPSBvYmpDb3B5KGxvZy5maWVsZHMpO1xuICAgICAgICAgICAgcmVjLmxldmVsID0gbWluTGV2ZWw7XG4gICAgICAgICAgICB2YXIgcmVjRmllbGRzID0gZmllbGRzID8gb2JqQ29weShmaWVsZHMpIDogbnVsbDtcbiAgICAgICAgICAgIGlmIChyZWNGaWVsZHMpIHtcbiAgICAgICAgICAgICAgICBpZiAobG9nLnNlcmlhbGl6ZXJzKSB7XG4gICAgICAgICAgICAgICAgICAgIGxvZy5fYXBwbHlTZXJpYWxpemVycyhyZWNGaWVsZHMsIGV4Y2x1ZGVGaWVsZHMpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBPYmplY3Qua2V5cyhyZWNGaWVsZHMpLmZvckVhY2goZnVuY3Rpb24gKGspIHtcbiAgICAgICAgICAgICAgICAgICAgcmVjW2tdID0gcmVjRmllbGRzW2tdO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVjLmxldmVsTmFtZSA9IG5hbWVGcm9tTGV2ZWxbbWluTGV2ZWxdO1xuICAgICAgICAgICAgcmVjLm1zZyA9IG1zZ0FyZ3MubGVuZ3RoID8gZm9ybWF0LmFwcGx5KGxvZywgbXNnQXJncykgOiAnJztcbiAgICAgICAgICAgIGlmICghcmVjLnRpbWUpIHtcbiAgICAgICAgICAgICAgICByZWMudGltZSA9IG5ldyBEYXRlKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAobG9nLnNyYyAmJiAhcmVjLnNyYykge1xuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihDQUxMX1NUQUNLX0VSUk9SKTtcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHNyYyA9IGV4dHJhY3RTcmNGcm9tU3RhY2t0cmFjZShlcnIuc3RhY2ssIDIpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIXNyYyAmJiAhX2hhdmVXYXJuZWQoJ3NyYycpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBfd2FybignVW5hYmxlIHRvIGRldGVybWluZSBzcmMgbGluZSBpbmZvJywgJ3NyYycpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJlYy5zcmMgPSBzcmMgfHwgJyc7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVjLnYgPSBMT0dfVkVSU0lPTjtcbiAgICAgICAgICAgIHJldHVybiByZWM7XG4gICAgICAgIH1cbiAgICAgICAgXG4gICAgICAgIHZhciBmaWVsZHMgPSBudWxsO1xuICAgICAgICB2YXIgbXNnQXJncyA9IGFyZ3VtZW50cztcbiAgICAgICAgdmFyIHJlYyA9IG51bGw7XG4gICAgICAgIGlmIChhcmd1bWVudHMubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5fbGV2ZWwgPD0gbWluTGV2ZWw7XG4gICAgICAgIH0gZWxzZSBpZiAodGhpcy5fbGV2ZWwgPiBtaW5MZXZlbCkge30gZWxzZSB7XG4gICAgICAgICAgICByZWMgPSBta1JlY29yZChtc2dBcmdzKTtcbiAgICAgICAgICAgIHRoaXMuX2VtaXQocmVjKTtcbiAgICAgICAgfVxuICAgIH07XG59XG5cbkxvZ2dlci5wcm90b3R5cGUudHJhY2UgPSBta0xvZ0VtaXR0ZXIoVFJBQ0UpO1xuTG9nZ2VyLnByb3RvdHlwZS5kZWJ1ZyA9IG1rTG9nRW1pdHRlcihERUJVRyk7XG5Mb2dnZXIucHJvdG90eXBlLmluZm8gPSBta0xvZ0VtaXR0ZXIoSU5GTyk7XG5Mb2dnZXIucHJvdG90eXBlLndhcm4gPSBta0x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2Z1bmN0aW9uJykge1xuICAgICAgICByZXR1cm4gJ1tGdW5jdGlvbjogJyArIG9iai5uYW1lICsgJ10nO1xuICAgIH1cbiAgICBpZiAodHlwZW9mIG9iaiA9PT0gJ2Jvb2xlYW4nIHx8IHR5cGVvZiBvYmogPT09ICdudW1iZXInKSB7XG4gICAgICAgIHJldHVybiBvYmo7XG4gICAgfVxuICAgIHJldHVybiAnXFwnJyArIG9iai50b1N0cmluZygpICsgJ1xcJyc7XG59XG5cbmZ1bmN0aW9uIGZvcm1hdChmKSB7XG4gICAgdmFyIGFyZ3VtZW50cyQxID0gYXJndW1lbnRzO1xuXG4gICAgaWYgKHR5cGVvZiBmICE9PSAnc3RyaW5nJykge1xuICAgICAgICB2YXIgb2JqZWN0cyA9IG5ldyBBcnJheShhcmd1bWVudHMubGVuZ3RoKTtcbiAgICAgICAgZm9yICh2YXIgaSQxID0gMDtpJDEgPCBhcmd1bWVudHMubGVuZ3RoOyBpJDErKykge1xuICAgICAgICAgICAgb2JqZWN0c1tpJDFdID0gaW5zcGVjdChhcmd1bWVudHMkMVtpJDFdKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gb2JqZWN0cy5qb2luKCcgJyk7XG4gICAgfVxuICAgIHZhciBmb3JtYXRSZWdFeHAgPSAvJVtzZGolXS9nO1xuICAgIHZhciBpID0gMTtcbiAgICB2YXIgYXJncyA9IGFyZ3VtZW50cztcbiAgICB2YXIgbGVuID0gYXJncy5sZW5ndGg7XG4gICAgdmFyIHN0ciA9IFN0cmluZyhmKS5yZXBsYWNlKGZvcm1hdFJlZ0V4cCwgZnVuY3Rpb24gKHgpIHtcbiAgICAgICAgaWYgKHggPT09ICclJScpIHtcbiAgICAgICAgICAgIHJldHVybiAnJSc7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGkgPj0gbGVuKSB7XG4gICAgICAgICAgICByZXR1cm4geDtcbiAgICAgICAgfVxuICAgICAgICBzd2l0Y2ggKHgpIHtcbiAgICAgICAgICAgIGNhc2UgJyVzJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gU3RyaW5nKGFyZ3NbaSsrXSk7XG4gICAgICAgICAgICBjYXNlICclZCc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIE51bWJlcihhcmdzW2krK10pO1xuICAgICAgICAgICAgY2FzZSAnJWonOlxuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeShhcmdzW2krK10pO1xuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKF8pIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbQ2lyY3VsYXJdJztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgIHJldHVybiB4O1xuICAgICAgICB9XG4gICAgfSk7XG4gICAgZm9yICh2YXIgeCA9IGFyZ3NbaV07aSA8IGxlbjsgeCA9IGFyZ3NbKytpXSkge1xuICAgICAgICBzdHIgKz0gJyAnICsgeDtcbiAgICB9XG4gICAgcmV0dXJuIHN0cjtcbn1cblxuZnVuY3Rpb24gZXh0cmFjdFNyY0Zyb21TdGFja3RyYWNlKHN0YWNrLCBsZXZlbCkge1xuICAgIHZhciBzdGFja0xpbmVzID0gc3RhY2suc3BsaXQoJ1xcbicpO1xuICAgIGlmIChzdGFja0xpbmVzWzBdICYmIHN0YWNrTGluZXNbMF0uaW5kZXhPZihDQUxMX1NUQUNLX0VSUk9SKSA+PSAwKSB7XG4gICAgICAgIHN0YWNrTGluZXMuc2hpZnQoKTtcbiAgICB9XG4gICAgdmFyIHRhcmdldExpbmUgPSBzdGFja0xpbmVzW2xldmVsXTtcbiAgICB2YXIgbGluZUluZm8gPSBudWxsO1xuICAgIGlmICh0YXJnZXRMaW5lKSB7XG4gICAgICAgIHZhciBleGVjUmVzdWx0ID0gL15cXHMqKGF0fC4qQClcXHMqKC4rKT8kLy5leGVjKHRhcmdldExpbmUpO1xuICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShleGVjUmVzdWx0KSAmJiBleGVjUmVzdWx0WzJdKSB7XG4gICAgICAgICAgICBsaW5lSW5mbyA9IGV4ZWNSZXN1bHRbMl07XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBsaW5lSW5mbyA9IHRhcmdldExpbmU7XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIGxpbmVJbmZvO1xufVxuXG5mdW5jdGlvbiBfaW5kZW50KHMsIGluZGVudCkge1xuICAgIGlmICghaW5kZW50KSB7XG4gICAgICAgIGluZGVudCA9ICcgICAgJztcbiAgICB9XG4gICAgdmFyIGxpbmVzID0gcy5zcGxpdCgvXFxyP1xcbi9nKTtcbiAgICByZXR1cm4gaW5kZW50ICsgbGluZXMuam9pbignXFxuJyArIGluZGVudCk7XG59XG5cbnZhciBfd2FybmVkID0ge307XG5mdW5jdGlvbiBfd2Fybihtc2csIGRlZHVwS2V5KSB7XG4gICAgaWYgKGRlZHVwS2V5KSB7XG4gICAgICAgIGlmIChfd2FybmVkW2RlZHVwS2V5XSkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIF93YXJuZWRbZGVkdXBLZXldID0gdHJ1ZTtcbiAgICB9XG4gICAgY29uc29sZS5lcnJvcihtc2cgKyAnXFxuJyk7XG59XG5cbmZ1bmN0aW9uIF9oYXZlV2FybmVkKGRlZHVwS2V5KSB7XG4gICAgcmV0dXJuIF93YXJuZWRbZGVkdXBLZXldO1xufVxuXG5mdW5jdGlvbiBzYWZlQ3ljbGVzKCkge1xuICAgIHZhciBzZWVuID0gW107XG4gICAgcmV0dXJuIGZ1bmN0aW9uIChrZXksIHZhbCkge1xuICAgICAgICBpZiAoIXZhbCB8fCB0eXBlb2YgdmFsICE9PSAnb2JqZWN0Jykge1xuICAgICAgICAgICAgcmV0dXJuIHZhbDtcbiAgICAgICAgfVxuICAgICAgICBpZiAoc2Vlbi5pbmRleE9mKHZ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3B0aW9ucy5sZXZlbCkge1xuICAgICAgICAgICAgdGhpcy5sZXZlbChvcHRpb25zLmxldmVsKTtcbiAgICAgICAgfVxuICAgIH0gZWxzZSB7XG4gICAgICAgIHRoaXMuX2xldmVsID0gTnVtYmVyLlBPU0lUSVZFX0lORklOSVRZO1xuICAgICAgICB0aGlzLnN0cmVhbXMgPSBbXTtcbiAgICAgICAgdGhpcy5zZXJpYWxpemVycyA9IG51bGw7XG4gICAgICAgIHRoaXMuc3JjID0gZmFsc2U7XG4gICAgICAgIHRoaXMuZmllbGRzID0ge307XG4gICAgfVxuICAgIGlmIChvcHRpb25zLnN0cmVhbSkge1xuICAgICAgICB0aGlzLmFkZFN0cmVhbSh7XG4gICAgICAgICAgICB0eXBlOiAnc3RyZWFtJyxcbiAgICAgICAgICAgIHN0cmVhbTogb3B0aW9ucy5zdHJlYW0sXG4gICAgICAgICAgICBsZXZlbDogb3B0aW9ucy5sZXZlbFxuICAgICAgICB9KTtcbiAgICB9IGVsc2UgaWYgKG9wdGlvbnMuc3RyZWFtcykge1xuICAgICAgICBvcHRpb25zLnN0cmVhbXMuZm9yRWFjaChmdW5jdGlvbiAocykge1xuICAgICAgICAgICAgdGhpcyQxLmFkZFN0cmVhbShzLCBvcHRpb25zLmxldmVsKTtcbiAgICAgICAgfSk7XG4gICAgfSBlbHNlIGlmIChwYXJlbnQgJiYgb3B0aW9ucy5sZXZlbCkge1xuICAgICAgICB0aGlzLmxldmVsKG9wdGlvbnMubGV2ZWwpO1xuICAgIH0gZWxzZSBpZiAoIXBhcmVudCkge1xuICAgICAgICB0aGlzLmFkZFN0cmVhbSh7XG4gICAgICAgICAgICB0eXBlOiAncmF3JyxcbiAgICAgICAgICAgIHN0cmVhbTogbmV3IENvbnNvbGVSYXdTdHJlYW0oKSxcbiAgICAgICAgICAgIGxldmVsOiBvcHRpb25zLmxldmVsXG4gICAgICAgIH0pO1xuICAgIH1cbiAgICBpZiAob3B0aW9ucy5zZXJpYWxpemVycykge1xuIC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Bta1JlY29yZChhcmdzKSB7XG4gICAgICAgICAgICB2YXIgZXhjbHVkZUZpZWxkcztcbiAgICAgICAgICAgIGlmIChhcmdzWzBdIGluc3RhbmNlb2YgRXJyb3IpIHtcbiAgICAgICAgICAgICAgICBmaWVsZHMgPSB7XG4gICAgICAgICAgICAgICAgICAgIGVycjogbG9nLnNlcmlhbGl6ZXJzICYmIGxvZy5zZXJpYWxpemVycy5lcnIgPyBsb2cuc2VyaWFsaXplcnMuZXJyKGFyZ3NbMF0pIDogc3RkU2VyaWFsaXplcnMuZXJyKGFyZ3NbMF0pXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICBleGNsdWRlRmllbGRzID0ge1xuICAgICAgICAgICAgICAgICAgICBlcnI6IHRydWVcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIGlmIChhcmdzLmxlbmd0aCA9PT0gMSkge1xuICAgICAgICAgICAgICAgICAgICBtc2dBcmdzID0gW2ZpZWxkcy5lcnIubWVzc2FnZV07XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgbXNnQXJncyA9IEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKGFyZ3MsIDEpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIGFyZ3NbMF0gIT09ICdvYmplY3QnICYmIGFyZ3NbMF0gIT09IG51bGwgfHwgQXJyYXkuaXNBcnJheShhcmdzWzBdKSkge1xuICAgICAgICAgICAgICAgIGZpZWxkcyA9IG51bGw7XG4gICAgICAgICAgICAgICAgbXNnQXJncyA9IEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKGFyZ3MpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBmaWVsZHMgPSBhcmdzWzBdO1xuICAgICAgICAgICAgICAgIGlmIChhcmdzLmxlbmd0aCA9PT0gMSAmJiBmaWVsZHMuZXJyICYmIGZpZWxkcy5lcnIgaW5zdGFuY2VvZiBFcnJvcikge1xuICAgICAgICAgICAgICAgICAgICBtc2dBcmdzID0gW2ZpZWxkcy5lcnIubWVzc2FnZV07XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgbXNnQXJncyA9IEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKGFyZ3MsIDEpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciByZWMgPSBvYmpDb3B5KGxvZy5maWVsZHMpO1xuICAgICAgICAgICAgcmVjLmxldmVsID0gbWluTGV2ZWw7XG4gICAgICAgICAgICB2YXIgcmVjRmllbGRzID0gZmllbGRzID8gb2JqQ29weShmaWVsZHMpIDogbnVsbDtcbiAgICAgICAgICAgIGlmIChyZWNGaWVsZHMpIHtcbiAgICAgICAgICAgICAgICBpZiAobG9nLnNlcmlhbGl6ZXJzKSB7XG4gICAgICAgICAgICAgICAgICAgIGxvZy5fYXBwbHlTZXJpYWxpemVycyhyZWNGaWVsZHMsIGV4Y2x1ZGVGaWVsZHMpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBPYmplY3Qua2V5cyhyZWNGaWVsZHMpLmZvckVhY2goZnVuY3Rpb24gKGspIHtcbiAgICAgICAgICAgICAgICAgICAgcmVjW2tdID0gcmVjRmllbGRzW2tdO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVjLmxldmVsTmFtZSA9IG5hbWVGcm9tTGV2ZWxbbWluTGV2ZWxdO1xuICAgICAgICAgICAgcmVjLm1zZyA9IG1zZ0FyZ3MubGVuZ3RoID8gZm9ybWF0LmFwcGx5KGxvZywgbXNnQXJncykgOiAnJztcbiAgICAgICAgICAgIGlmICghcmVjLnRpbWUpIHtcbiAgICAgICAgICAgICAgICByZWMudGltZSA9IG5ldyBEYXRlKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAobG9nLnNyYyAmJiAhcmVjLnNyYykge1xuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihDQUxMX1NUQUNLX0VSUk9SKTtcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHNyYyA9IGV4dHJhY3RTcmNGcm9tU3RhY2t0cmFjZShlcnIuc3RhY2ssIDIpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIXNyYyAmJiAhX2hhdmVXYXJuZWQoJ3NyYycpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBfd2FybignVW5hYmxlIHRvIGRldGVybWluZSBzcmMgbGluZSBpbmZvJywgJ3NyYycpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJlYy5zcmMgPSBzcmMgfHwgJyc7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVjLnYgPSBMT0dfVkVSU0lPTjtcbiAgICAgICAgICAgIHJldHVybiByZWM7XG4gICAgICAgIH1cbiAgICAgICAgXG4gICAgICAgIHZhciBmaWVsZHMgPSBudWxsO1xuICAgICAgICB2YXIgbXNnQXJncyA9IGFyZ3VtZW50cztcbiAgICAgICAgdmFyIHJlYyA9IG51bGw7XG4gICAgICAgIGlmIChhcmd1bWVudHMubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5fbGV2ZWwgPD0gbWluTGV2ZWw7XG4gICAgICAgIH0gZWxzZSBpZiAodGhpcy5fbGV2ZWwgPiBtaW5MZXZlbCkge30gZWxzZSB7XG4gICAgICAgICAgICByZWMgPSBta1JlY29yZChtc2dBcmdzKTtcbiAgICAgICAgICAgIHRoaXMuX2VtaXQocmVjKTtcbiAgICAgICAgfVxuICAgIH07XG59XG5cbkxvZ2dlci5wcm90b3R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duIGZyb20gaW5uZXJGbiwgd2UgbGVhdmUgc3RhdGUgPT09XG4gICAgICAgICAgLy8gR2VuU3RhdGVFeGVjdXRpbmcgYW5kIGxvb3AgYmFjayBmb3IgYW5vdGhlciBpbnZvY2F0aW9uLlxuICAgICAgICAgIHN0YXRlID0gY29udGV4dC5kb25lXG4gICAgICAgICAgICA/IEdlblN0YXRlQ29tcGxldGVkXG4gICAgICAgICAgICA6IEdlblN0YXRlU3VzcGVuZGVkWWllbGQ7XG5cbiAgICAgICAgICBpZiAocmVjb3JkLmFyZyA9PT0gQ29udGludWVTZW50aW5lbCkge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHZhbHVlOiByZWNvcmQuYXJnLFxuICAgICAgICAgICAgZG9uZTogY29udGV4dC5kb25lXG4gICAgICAgICAgfTtcblxuICAgICAgICB9IGVsc2UgaWYgKHJlY29yZC50eXBlID09PSBcInRocm93XCIpIHtcbiAgICAgICAgICBzdGF0ZSA9IEdlblN0YXRlQ29tcGxldGVkO1xuICAgICAgICAgIC8vIERpc3BhdGNoIHRoZSBleGNlcHRpb24gYnkgbG9vcGluZyBiYWNrIGFyb3VuZCB0byB0aGVcbiAgICAgICAgICAvLyBjb250ZXh0LmRpc3BhdGNoRXhjZXB0aW9uKGNvbnRleHQuYXJnKSBjYWxsIGFib3ZlLlxuICAgICAgICAgIGNvbnRleHQubWV0aG9kID0gXCJ0aHJvd1wiO1xuICAgICAgICAgIGNvbnRleHQuYXJnID0gcmVjb3JkLmFyZztcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH07XG4gIH1cblxuICAvLyBDYWxsIGRlbGVnYXRlLml0ZXJhdG9yW2NvbnRleHQubWV0aG9kXShjb250ZXh0LmFyZykgYW5kIGhhbmRsZSB0aGVcbiAgLy8gcmVzdWx0LCBlaXRoZXIgYnkgcmV0dXJuaW5nIGEgeyB2YWx1ZSwgZG9uZSB9I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cykge1xuICAgICAgICAgIC8vIE5vdCBzdXJlIGFib3V0IHRoZSBvcHRpbWFsIG9yZGVyIG9mIHRoZXNlIGNvbmRpdGlvbnM6XG4gICAgICAgICAgaWYgKG5hbWUuY2hhckF0KDApID09PSBcInRcIiAmJlxuICAgICAgICAgICAgICBoYXNPd24uY2FsbCh0aGlzLCBuYW1lKSAmJlxuICAgICAgICAgICAgICAhaXNOYU4oK25hbWUuc2xpY2UoMSkpKSB7XG4gICAgICAgICAgICB0aGlzW25hbWVdID0gdW5kZWZpbmVkO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0sXG5cbiAgICBzdG9wOiBmdW5jdGlvbigpIHtcbiAgICAgIHRoaXMuZG9uZSA9IHRydWU7XG5cbiAgICAgIHZhciByb290RW50cnkgPSB0aGlzLnRyeUVudHJpZXNbMF07XG4gICAgICB2YXIgcm9vdFJlY29yZCA9IHJvb3RFbnRyeS5jb21wbGV0aW9uO1xuICAgICAgaWYgKHJvb3RSZWNvcmQudHlwZSA9PT0gXCJ0aHJvd1wiKSB7XG4gICAgICAgIHRocm93IHJvb3RSZWNvcmQuYXJnO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gdGhpcy5ydmFsO1xuICAgIH0sXG5cbiAgICBkaXNwYXRjaEV4Y2VwdGlvbjogZnVuY3Rpb24oZXhjZXB0aW9uKSB7XG4gICAgICBpZiAodGhpcy5kb25lKSB7XG4gICAgICAgIHRocm93IGV4Y2VwdGlvbjtcbiAgICAgIH1cblxuICAgICAgdmFyIGNvbnRleHQgPSB0aGlzO1xuICAgICAgZnVuY3Rpb24gaGFuZGxlKGxvYywgY2F1Z2h0KSB7XG4gICAgICAgIHJlY29yZC50eXBlID0gXCJ0aHJvd1wiO1xuICAgICAgICByZWNvcmQuYXJnID0gZXhjZXB0aW9uO1xuICAgICAgICBjb250ZXh0Lm5leHQgPSBsb2M7XG5cbiAgICAgICAgaWYgKGNhdWdodCkge1xuICAgICAgICAgIC8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AgICBpZiAoZW50cnkudHJ5TG9jIDw9IHRoaXMucHJldiAmJlxuICAgICAgICAgICAgaGFzT3duLmNhbGwoZW50cnksIFwiZmluYWxseUxvY1wiKSAmJlxuICAgICAgICAgICAgdGhpcy5wcmV2IDwgZW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAgIHZhciBmaW5hbGx5RW50cnkgPSBlbnRyeTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBpZiAoZmluYWxseUVudHJ5ICYmXG4gICAgICAgICAgKHR5cGUgPT09IFwiYnJlYWtcIiB8fFxuICAgICAgICAgICB0eXBlID09PSBcImNvbnRpbnVlXCIpICYmXG4gICAgICAgICAgZmluYWxseUVudHJ5LnRyeUxvYyA8PSBhcmcgJiZcbiAgICAgICAgICBhcmcgPD0gZmluYWxseUVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgLy8gSWdub3JlIHRoZSBmaW5hbGx5IGVudHJ5IGlmIGNvbnRyb2wgaXMgbm90IGp1bXBpbmcgdG8gYVxuICAgICAgICAvLyBsb2NhdGlvbiBvdXRzaWRlIHRoZSB0cnkvY2F0Y2ggYmxvY2suXG4gICAgICAgIGZpbmFsbHlFbnRyeSA9IG51bGw7XG4gICAgICB9XG5cbiAgICAgIHZhciByZWNvcmQgPSBmaW5hbGx5RW50cnkgPyBmaW5hbGx5RW50cnkuY29tcGxldGlvbiA6IHt9O1xuICAgICAgcmVjb3JkLnR5cGUgPSB0eXBlO1xuICAgICAgcmVjb3JkLmFyZyA9IGFyZztcblxuICAgICAgaWYgKGZpbmFsbHlFbnRyeSkge1xuICAgICAgICB0aGlzLm1ldGhvZCA9IFwibmV4dFwiO1xuICAgICAgICB0aGlzLm5leHQgPSBmaW5hbGx5RW50cnkuZmluYWxseUxvYztcbiAgICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiB0aGlzLmNvbXBsZXRlKH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amVjdH1cbiAqXG4gKiBAcHJpdmF0ZVxuICovXG5leHBvcnQgY29uc3QgZ2V0TG9nZ2VyID0gKCkgPT4ge1xuICByZXR1cm4gbG9nZ2VyXG59XG5cbi8qIFF1aWNrIGFjY2VzcyB0byBsb2dnZXIgbGV2ZWwgdHlwZXMuICovXG5leHBvcnQgY29uc3QgdHJhY2UgPSBkZWNvcmF0ZShMRVZFTFMuVFJBQ0UpXG5leHBvcnQgY29uc3QgaW5mbyA9IGRlY29yYXRlKExFVkVMUy5JTkZPKVxuZXhwb3J0IGNvbnN0IGRlYnVnID0gZGVjb3JhdGUoTEVWRUxTLkRFQlVHKVxuZXhwb3J0IGNvbnN0IHdhcm4gPSBkZWNvcmF0ZShMRVZFTFMuV0FSTilcbmV4cG9ydCBjb25zdCBlcnJvciA9IGRlY29yYXRlKExFVkVMUy5FUlJPUilcbmV4cG9ydCBjb25zdCBmYXRhbCA9IGRlY29yYXRlKExFVkVMUy5GQVRBTClcbiJdLCJzb3VyY2VSb290IjoiIn0= \ No newline at end of file diff --git a/examples/browser/publisher-failover.html b/examples/browser/publisher-failover.html new file mode 100644 index 0000000..c406a89 --- /dev/null +++ b/examples/browser/publisher-failover.html @@ -0,0 +1,65 @@ + + + + + + +
+ +
+ + + + + diff --git a/package-lock.json b/package-lock.json index f61c9fa..4f218a7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,10 +20,10 @@ "dev": true, "requires": { "@babel/types": "7.0.0-beta.44", - "jsesc": "^2.5.1", - "lodash": "^4.2.0", - "source-map": "^0.5.0", - "trim-right": "^1.0.1" + "jsesc": "2.5.1", + "lodash": "4.17.10", + "source-map": "0.5.7", + "trim-right": "1.0.1" }, "dependencies": { "jsesc": { @@ -69,9 +69,9 @@ "integrity": "sha512-Il19yJvy7vMFm8AVAh6OZzaFoAd0hbkeMZiX3P5HGD+z7dyI7RzndHB0dg6Urh/VAFfHtpOIzDUSxmY6coyZWQ==", "dev": true, "requires": { - "chalk": "^2.0.0", - "esutils": "^2.0.2", - "js-tokens": "^3.0.0" + "chalk": "2.4.1", + "esutils": "2.0.2", + "js-tokens": "3.0.2" }, "dependencies": { "ansi-styles": { @@ -80,7 +80,7 @@ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { - "color-convert": "^1.9.0" + "color-convert": "1.9.1" } }, "chalk": { @@ -89,9 +89,9 @@ "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" } }, "supports-color": { @@ -100,7 +100,7 @@ "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "has-flag": "3.0.0" } } } @@ -114,7 +114,7 @@ "@babel/code-frame": "7.0.0-beta.44", "@babel/types": "7.0.0-beta.44", "babylon": "7.0.0-beta.44", - "lodash": "^4.2.0" + "lodash": "4.17.10" }, "dependencies": { "babylon": { @@ -137,10 +137,10 @@ "@babel/helper-split-export-declaration": "7.0.0-beta.44", "@babel/types": "7.0.0-beta.44", "babylon": "7.0.0-beta.44", - "debug": "^3.1.0", - "globals": "^11.1.0", - "invariant": "^2.2.0", - "lodash": "^4.2.0" + "debug": "3.1.0", + "globals": "11.5.0", + "invariant": "2.2.4", + "lodash": "4.17.10" }, "dependencies": { "babylon": { @@ -163,9 +163,9 @@ "integrity": "sha512-5eTV4WRmqbaFM3v9gHAIljEQJU4Ssc6fxL61JN+Oe2ga/BwyjzjamwkCVVAQjHGuAX8i0BWo42dshL8eO5KfLQ==", "dev": true, "requires": { - "esutils": "^2.0.2", - "lodash": "^4.2.0", - "to-fast-properties": "^2.0.0" + "esutils": "2.0.2", + "lodash": "4.17.10", + "to-fast-properties": "2.0.0" }, "dependencies": { "to-fast-properties": { @@ -180,25 +180,22 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/@browser-bunyan/console-formatted-stream/-/console-formatted-stream-1.3.0.tgz", "integrity": "sha1-PcBZqlwbKnofJuJwbiveuaCbvlc=", - "dev": true, "requires": { - "@browser-bunyan/levels": "^1.3.0" + "@browser-bunyan/levels": "1.3.0" } }, "@browser-bunyan/console-raw-stream": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/@browser-bunyan/console-raw-stream/-/console-raw-stream-1.3.0.tgz", "integrity": "sha1-zPJLVvImUFgpfGUX++zqhOu3gYw=", - "dev": true, "requires": { - "@browser-bunyan/levels": "^1.3.0" + "@browser-bunyan/levels": "1.3.0" } }, "@browser-bunyan/levels": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/@browser-bunyan/levels/-/levels-1.3.0.tgz", - "integrity": "sha1-oFIwOuXRofm2Pus6lElaL0KfSDE=", - "dev": true + "integrity": "sha1-oFIwOuXRofm2Pus6lElaL0KfSDE=" }, "@webassemblyjs/ast": { "version": "1.5.10", @@ -209,8 +206,8 @@ "@webassemblyjs/helper-module-context": "1.5.10", "@webassemblyjs/helper-wasm-bytecode": "1.5.10", "@webassemblyjs/wast-parser": "1.5.10", - "debug": "^3.1.0", - "mamacro": "^0.0.3" + "debug": "3.1.0", + "mamacro": "0.0.3" } }, "@webassemblyjs/floating-point-hex-parser": { @@ -231,7 +228,7 @@ "integrity": "sha512-soggPYDku3gDl+zV1TVle3zLWgiU1Kli4QJdWCoeyX95RhGtF2A5tP7U3ypLlBb74SdoYYFVn3Fm7HXIWj1wzA==", "dev": true, "requires": { - "debug": "^3.1.0" + "debug": "3.1.0" } }, "@webassemblyjs/helper-code-frame": { @@ -255,7 +252,7 @@ "integrity": "sha512-ce2KTWDlSCHhJZMOX+bgHGIKwYsx27MWySqffl8pqu9K+M1G4TlZCfRlN1dV85rAhn5OknOAHRBmRtceklY2/g==", "dev": true, "requires": { - "mamacro": "^0.0.3" + "mamacro": "0.0.3" } }, "@webassemblyjs/helper-wasm-bytecode": { @@ -274,7 +271,7 @@ "@webassemblyjs/helper-buffer": "1.5.10", "@webassemblyjs/helper-wasm-bytecode": "1.5.10", "@webassemblyjs/wasm-gen": "1.5.10", - "debug": "^3.1.0" + "debug": "3.1.0" } }, "@webassemblyjs/ieee754": { @@ -283,7 +280,7 @@ "integrity": "sha512-WWlO5quQd3qOUT4wJiuodh5E1A8BfXYkOueuZZjEPL3budH5snqdWsPDieTqkBJnfCZGwRkRSn14OH4OPY1hsw==", "dev": true, "requires": { - "ieee754": "^1.1.11" + "ieee754": "1.1.11" } }, "@webassemblyjs/leb128": { @@ -292,7 +289,7 @@ "integrity": "sha512-b+DWTy6RsRznpCKvsP3V5yNkk6YWs+7kLOJ3GU1ITyz846VIzVJda+K0mr31fgXzob/QWToWEx8ajk+PrOegkQ==", "dev": true, "requires": { - "leb": "^0.3.0" + "leb": "0.3.0" } }, "@webassemblyjs/utf8": { @@ -315,7 +312,7 @@ "@webassemblyjs/wasm-opt": "1.5.10", "@webassemblyjs/wasm-parser": "1.5.10", "@webassemblyjs/wast-printer": "1.5.10", - "debug": "^3.1.0" + "debug": "3.1.0" } }, "@webassemblyjs/wasm-gen": { @@ -341,7 +338,7 @@ "@webassemblyjs/helper-buffer": "1.5.10", "@webassemblyjs/wasm-gen": "1.5.10", "@webassemblyjs/wasm-parser": "1.5.10", - "debug": "^3.1.0" + "debug": "3.1.0" } }, "@webassemblyjs/wasm-parser": { @@ -369,8 +366,8 @@ "@webassemblyjs/helper-api-error": "1.5.10", "@webassemblyjs/helper-code-frame": "1.5.10", "@webassemblyjs/helper-fsm": "1.5.10", - "long": "^3.2.0", - "mamacro": "^0.0.3" + "long": "3.2.0", + "mamacro": "0.0.3" } }, "@webassemblyjs/wast-printer": { @@ -381,7 +378,7 @@ "requires": { "@webassemblyjs/ast": "1.5.10", "@webassemblyjs/wast-parser": "1.5.10", - "long": "^3.2.0" + "long": "3.2.0" } }, "acorn": { @@ -396,7 +393,7 @@ "integrity": "sha512-zVWV8Z8lislJoOKKqdNMOB+s6+XV5WERty8MnKBeFgwA+19XJjJHs2RP5dzM57FftIs+jQnRToLiWazKr6sSWg==", "dev": true, "requires": { - "acorn": "^5.0.0" + "acorn": "5.6.2" } }, "acorn-jsx": { @@ -405,7 +402,7 @@ "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", "dev": true, "requires": { - "acorn": "^3.0.4" + "acorn": "3.3.0" }, "dependencies": { "acorn": { @@ -422,10 +419,10 @@ "integrity": "sha512-VDUX1oSajablmiyFyED9L1DFndg0P9h7p1F+NO8FkIzei6EPrR6Zu1n18rd5P8PqaSRd/FrWv3G1TVBqpM83gA==", "dev": true, "requires": { - "fast-deep-equal": "^2.0.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0", - "uri-js": "^4.2.1" + "fast-deep-equal": "2.0.1", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1", + "uri-js": "4.2.2" } }, "ajv-keywords": { @@ -473,8 +470,8 @@ "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", "dev": true, "requires": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" + "micromatch": "3.1.10", + "normalize-path": "2.1.1" } }, "aproba": { @@ -495,7 +492,7 @@ "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, "requires": { - "sprintf-js": "~1.0.2" + "sprintf-js": "1.0.3" } }, "arr-diff": { @@ -540,7 +537,7 @@ "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", "dev": true, "requires": { - "array-uniq": "^1.0.1" + "array-uniq": "1.0.3" } }, "array-uniq": { @@ -567,9 +564,9 @@ "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", "dev": true, "requires": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" + "bn.js": "4.11.8", + "inherits": "2.0.3", + "minimalistic-assert": "1.0.1" } }, "assert": { @@ -622,9 +619,9 @@ "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", "dev": true, "requires": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" + "chalk": "1.1.3", + "esutils": "2.0.2", + "js-tokens": "3.0.2" } }, "babel-core": { @@ -633,25 +630,25 @@ "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==", "dev": true, "requires": { - "babel-code-frame": "^6.26.0", - "babel-generator": "^6.26.0", - "babel-helpers": "^6.24.1", - "babel-messages": "^6.23.0", - "babel-register": "^6.26.0", - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "convert-source-map": "^1.5.1", - "debug": "^2.6.9", - "json5": "^0.5.1", - "lodash": "^4.17.4", - "minimatch": "^3.0.4", - "path-is-absolute": "^1.0.1", - "private": "^0.1.8", - "slash": "^1.0.0", - "source-map": "^0.5.7" + "babel-code-frame": "6.26.0", + "babel-generator": "6.26.1", + "babel-helpers": "6.24.1", + "babel-messages": "6.23.0", + "babel-register": "6.26.0", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "convert-source-map": "1.5.1", + "debug": "2.6.9", + "json5": "0.5.1", + "lodash": "4.17.10", + "minimatch": "3.0.4", + "path-is-absolute": "1.0.1", + "private": "0.1.8", + "slash": "1.0.0", + "source-map": "0.5.7" }, "dependencies": { "debug": { @@ -675,8 +672,8 @@ "@babel/traverse": "7.0.0-beta.44", "@babel/types": "7.0.0-beta.44", "babylon": "7.0.0-beta.44", - "eslint-scope": "~3.7.1", - "eslint-visitor-keys": "^1.0.0" + "eslint-scope": "3.7.1", + "eslint-visitor-keys": "1.0.0" }, "dependencies": { "babylon": { @@ -693,14 +690,14 @@ "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", "dev": true, "requires": { - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "detect-indent": "^4.0.0", - "jsesc": "^1.3.0", - "lodash": "^4.17.4", - "source-map": "^0.5.7", - "trim-right": "^1.0.1" + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "detect-indent": "4.0.0", + "jsesc": "1.3.0", + "lodash": "4.17.10", + "source-map": "0.5.7", + "trim-right": "1.0.1" } }, "babel-helper-builder-binary-assignment-operator-visitor": { @@ -709,9 +706,9 @@ "integrity": "sha1-zORReto1b0IgvK6KAsKzRvmlZmQ=", "dev": true, "requires": { - "babel-helper-explode-assignable-expression": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "babel-helper-explode-assignable-expression": "6.24.1", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helper-call-delegate": { @@ -720,10 +717,10 @@ "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=", "dev": true, "requires": { - "babel-helper-hoist-variables": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" + "babel-helper-hoist-variables": "6.24.1", + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helper-define-map": { @@ -732,10 +729,10 @@ "integrity": "sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8=", "dev": true, "requires": { - "babel-helper-function-name": "^6.24.1", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "lodash": "^4.17.4" + "babel-helper-function-name": "6.24.1", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "lodash": "4.17.10" } }, "babel-helper-explode-assignable-expression": { @@ -744,9 +741,9 @@ "integrity": "sha1-8luCz33BBDPFX3BZLVdGQArCLKo=", "dev": true, "requires": { - "babel-runtime": "^6.22.0", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helper-function-name": { @@ -755,11 +752,11 @@ "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=", "dev": true, "requires": { - "babel-helper-get-function-arity": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" + "babel-helper-get-function-arity": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helper-get-function-arity": { @@ -768,8 +765,8 @@ "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=", "dev": true, "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helper-hoist-variables": { @@ -778,8 +775,8 @@ "integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=", "dev": true, "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helper-optimise-call-expression": { @@ -788,8 +785,8 @@ "integrity": "sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc=", "dev": true, "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helper-regex": { @@ -798,9 +795,9 @@ "integrity": "sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI=", "dev": true, "requires": { - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "lodash": "^4.17.4" + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "lodash": "4.17.10" } }, "babel-helper-remap-async-to-generator": { @@ -809,11 +806,11 @@ "integrity": "sha1-XsWBgnrXI/7N04HxySg5BnbkVRs=", "dev": true, "requires": { - "babel-helper-function-name": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" + "babel-helper-function-name": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helper-replace-supers": { @@ -822,12 +819,12 @@ "integrity": "sha1-v22/5Dk40XNpohPKiov3S2qQqxo=", "dev": true, "requires": { - "babel-helper-optimise-call-expression": "^6.24.1", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" + "babel-helper-optimise-call-expression": "6.24.1", + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helpers": { @@ -836,8 +833,8 @@ "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", "dev": true, "requires": { - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" } }, "babel-loader": { @@ -846,9 +843,9 @@ "integrity": "sha512-/hbyEvPzBJuGpk9o80R0ZyTej6heEOr59GoEUtn8qFKbnx4cJm9FWES6J/iv644sYgrtVw9JJQkjaLW/bqb5gw==", "dev": true, "requires": { - "find-cache-dir": "^1.0.0", - "loader-utils": "^1.0.2", - "mkdirp": "^0.5.1" + "find-cache-dir": "1.0.0", + "loader-utils": "1.1.0", + "mkdirp": "0.5.1" } }, "babel-messages": { @@ -857,7 +854,7 @@ "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-check-es2015-constants": { @@ -866,7 +863,7 @@ "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-syntax-async-functions": { @@ -881,6 +878,12 @@ "integrity": "sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4=", "dev": true }, + "babel-plugin-syntax-object-rest-spread": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz", + "integrity": "sha1-/WU28rzhODb/o6VFjEkDpZe7O/U=", + "dev": true + }, "babel-plugin-syntax-trailing-function-commas": { "version": "6.22.0", "resolved": "https://registry.npmjs.org/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz", @@ -893,9 +896,9 @@ "integrity": "sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E=", "dev": true, "requires": { - "babel-helper-remap-async-to-generator": "^6.24.1", - "babel-plugin-syntax-async-functions": "^6.8.0", - "babel-runtime": "^6.22.0" + "babel-helper-remap-async-to-generator": "6.24.1", + "babel-plugin-syntax-async-functions": "6.13.0", + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-es2015-arrow-functions": { @@ -904,7 +907,7 @@ "integrity": "sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-es2015-block-scoped-functions": { @@ -913,7 +916,7 @@ "integrity": "sha1-u8UbSflk1wy42OC5ToICRs46YUE=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-es2015-block-scoping": { @@ -922,11 +925,11 @@ "integrity": "sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8=", "dev": true, "requires": { - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "lodash": "^4.17.4" + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "lodash": "4.17.10" } }, "babel-plugin-transform-es2015-classes": { @@ -935,15 +938,15 @@ "integrity": "sha1-WkxYpQyclGHlZLSyo7+ryXolhNs=", "dev": true, "requires": { - "babel-helper-define-map": "^6.24.1", - "babel-helper-function-name": "^6.24.1", - "babel-helper-optimise-call-expression": "^6.24.1", - "babel-helper-replace-supers": "^6.24.1", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" + "babel-helper-define-map": "6.26.0", + "babel-helper-function-name": "6.24.1", + "babel-helper-optimise-call-expression": "6.24.1", + "babel-helper-replace-supers": "6.24.1", + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" } }, "babel-plugin-transform-es2015-computed-properties": { @@ -952,8 +955,8 @@ "integrity": "sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM=", "dev": true, "requires": { - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" } }, "babel-plugin-transform-es2015-destructuring": { @@ -962,7 +965,7 @@ "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-es2015-duplicate-keys": { @@ -971,8 +974,8 @@ "integrity": "sha1-c+s9MQypaePvnskcU3QabxV2Qj4=", "dev": true, "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, "babel-plugin-transform-es2015-for-of": { @@ -981,7 +984,7 @@ "integrity": "sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-es2015-function-name": { @@ -990,9 +993,9 @@ "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=", "dev": true, "requires": { - "babel-helper-function-name": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "babel-helper-function-name": "6.24.1", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, "babel-plugin-transform-es2015-literals": { @@ -1001,7 +1004,7 @@ "integrity": "sha1-T1SgLWzWbPkVKAAZox0xklN3yi4=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-es2015-modules-amd": { @@ -1010,9 +1013,9 @@ "integrity": "sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ=", "dev": true, "requires": { - "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" + "babel-plugin-transform-es2015-modules-commonjs": "6.26.2", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" } }, "babel-plugin-transform-es2015-modules-commonjs": { @@ -1021,10 +1024,10 @@ "integrity": "sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q==", "dev": true, "requires": { - "babel-plugin-transform-strict-mode": "^6.24.1", - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-types": "^6.26.0" + "babel-plugin-transform-strict-mode": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-types": "6.26.0" } }, "babel-plugin-transform-es2015-modules-systemjs": { @@ -1033,9 +1036,9 @@ "integrity": "sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM=", "dev": true, "requires": { - "babel-helper-hoist-variables": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" + "babel-helper-hoist-variables": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" } }, "babel-plugin-transform-es2015-modules-umd": { @@ -1044,9 +1047,9 @@ "integrity": "sha1-rJl+YoXNGO1hdq22B9YCNErThGg=", "dev": true, "requires": { - "babel-plugin-transform-es2015-modules-amd": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" + "babel-plugin-transform-es2015-modules-amd": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" } }, "babel-plugin-transform-es2015-object-super": { @@ -1055,8 +1058,8 @@ "integrity": "sha1-JM72muIcuDp/hgPa0CH1cusnj40=", "dev": true, "requires": { - "babel-helper-replace-supers": "^6.24.1", - "babel-runtime": "^6.22.0" + "babel-helper-replace-supers": "6.24.1", + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-es2015-parameters": { @@ -1065,12 +1068,12 @@ "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=", "dev": true, "requires": { - "babel-helper-call-delegate": "^6.24.1", - "babel-helper-get-function-arity": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" + "babel-helper-call-delegate": "6.24.1", + "babel-helper-get-function-arity": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" } }, "babel-plugin-transform-es2015-shorthand-properties": { @@ -1079,8 +1082,8 @@ "integrity": "sha1-JPh11nIch2YbvZmkYi5R8U3jiqA=", "dev": true, "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, "babel-plugin-transform-es2015-spread": { @@ -1089,7 +1092,7 @@ "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-es2015-sticky-regex": { @@ -1098,9 +1101,9 @@ "integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=", "dev": true, "requires": { - "babel-helper-regex": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "babel-helper-regex": "6.26.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, "babel-plugin-transform-es2015-template-literals": { @@ -1109,7 +1112,7 @@ "integrity": "sha1-qEs0UPfp+PH2g51taH2oS7EjbY0=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-es2015-typeof-symbol": { @@ -1118,7 +1121,7 @@ "integrity": "sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-es2015-unicode-regex": { @@ -1127,9 +1130,9 @@ "integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=", "dev": true, "requires": { - "babel-helper-regex": "^6.24.1", - "babel-runtime": "^6.22.0", - "regexpu-core": "^2.0.0" + "babel-helper-regex": "6.26.0", + "babel-runtime": "6.26.0", + "regexpu-core": "2.0.0" } }, "babel-plugin-transform-exponentiation-operator": { @@ -1138,9 +1141,9 @@ "integrity": "sha1-KrDJx/MJj6SJB3cruBP+QejeOg4=", "dev": true, "requires": { - "babel-helper-builder-binary-assignment-operator-visitor": "^6.24.1", - "babel-plugin-syntax-exponentiation-operator": "^6.8.0", - "babel-runtime": "^6.22.0" + "babel-helper-builder-binary-assignment-operator-visitor": "6.24.1", + "babel-plugin-syntax-exponentiation-operator": "6.13.0", + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-object-assign": { @@ -1149,7 +1152,17 @@ "integrity": "sha1-+Z0vZvGgsNSY40bFNZaEdAyqILo=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-object-rest-spread": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz", + "integrity": "sha1-DzZpLVD+9rfi1LOsFHgTepY7ewY=", + "dev": true, + "requires": { + "babel-plugin-syntax-object-rest-spread": "6.13.0", + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-regenerator": { @@ -1158,7 +1171,7 @@ "integrity": "sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8=", "dev": true, "requires": { - "regenerator-transform": "^0.10.0" + "regenerator-transform": "0.10.1" } }, "babel-plugin-transform-runtime": { @@ -1167,7 +1180,7 @@ "integrity": "sha1-iEkNRGUC6puOfvsP4J7E2ZR5se4=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-strict-mode": { @@ -1176,8 +1189,27 @@ "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=", "dev": true, "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-polyfill": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.26.0.tgz", + "integrity": "sha1-N5k3q8Z9eJWXCtxiHyhM2WbPIVM=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "core-js": "2.5.7", + "regenerator-runtime": "0.10.5" + }, + "dependencies": { + "regenerator-runtime": { + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz", + "integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg=", + "dev": true + } } }, "babel-preset-env": { @@ -1186,36 +1218,36 @@ "integrity": "sha512-9OR2afuKDneX2/q2EurSftUYM0xGu4O2D9adAhVfADDhrYDaxXV0rBbevVYoY9n6nyX1PmQW/0jtpJvUNr9CHg==", "dev": true, "requires": { - "babel-plugin-check-es2015-constants": "^6.22.0", - "babel-plugin-syntax-trailing-function-commas": "^6.22.0", - "babel-plugin-transform-async-to-generator": "^6.22.0", - "babel-plugin-transform-es2015-arrow-functions": "^6.22.0", - "babel-plugin-transform-es2015-block-scoped-functions": "^6.22.0", - "babel-plugin-transform-es2015-block-scoping": "^6.23.0", - "babel-plugin-transform-es2015-classes": "^6.23.0", - "babel-plugin-transform-es2015-computed-properties": "^6.22.0", - "babel-plugin-transform-es2015-destructuring": "^6.23.0", - "babel-plugin-transform-es2015-duplicate-keys": "^6.22.0", - "babel-plugin-transform-es2015-for-of": "^6.23.0", - "babel-plugin-transform-es2015-function-name": "^6.22.0", - "babel-plugin-transform-es2015-literals": "^6.22.0", - "babel-plugin-transform-es2015-modules-amd": "^6.22.0", - "babel-plugin-transform-es2015-modules-commonjs": "^6.23.0", - "babel-plugin-transform-es2015-modules-systemjs": "^6.23.0", - "babel-plugin-transform-es2015-modules-umd": "^6.23.0", - "babel-plugin-transform-es2015-object-super": "^6.22.0", - "babel-plugin-transform-es2015-parameters": "^6.23.0", - "babel-plugin-transform-es2015-shorthand-properties": "^6.22.0", - "babel-plugin-transform-es2015-spread": "^6.22.0", - "babel-plugin-transform-es2015-sticky-regex": "^6.22.0", - "babel-plugin-transform-es2015-template-literals": "^6.22.0", - "babel-plugin-transform-es2015-typeof-symbol": "^6.23.0", - "babel-plugin-transform-es2015-unicode-regex": "^6.22.0", - "babel-plugin-transform-exponentiation-operator": "^6.22.0", - "babel-plugin-transform-regenerator": "^6.22.0", - "browserslist": "^3.2.6", - "invariant": "^2.2.2", - "semver": "^5.3.0" + "babel-plugin-check-es2015-constants": "6.22.0", + "babel-plugin-syntax-trailing-function-commas": "6.22.0", + "babel-plugin-transform-async-to-generator": "6.24.1", + "babel-plugin-transform-es2015-arrow-functions": "6.22.0", + "babel-plugin-transform-es2015-block-scoped-functions": "6.22.0", + "babel-plugin-transform-es2015-block-scoping": "6.26.0", + "babel-plugin-transform-es2015-classes": "6.24.1", + "babel-plugin-transform-es2015-computed-properties": "6.24.1", + "babel-plugin-transform-es2015-destructuring": "6.23.0", + "babel-plugin-transform-es2015-duplicate-keys": "6.24.1", + "babel-plugin-transform-es2015-for-of": "6.23.0", + "babel-plugin-transform-es2015-function-name": "6.24.1", + "babel-plugin-transform-es2015-literals": "6.22.0", + "babel-plugin-transform-es2015-modules-amd": "6.24.1", + "babel-plugin-transform-es2015-modules-commonjs": "6.26.2", + "babel-plugin-transform-es2015-modules-systemjs": "6.24.1", + "babel-plugin-transform-es2015-modules-umd": "6.24.1", + "babel-plugin-transform-es2015-object-super": "6.24.1", + "babel-plugin-transform-es2015-parameters": "6.24.1", + "babel-plugin-transform-es2015-shorthand-properties": "6.24.1", + "babel-plugin-transform-es2015-spread": "6.22.0", + "babel-plugin-transform-es2015-sticky-regex": "6.24.1", + "babel-plugin-transform-es2015-template-literals": "6.22.0", + "babel-plugin-transform-es2015-typeof-symbol": "6.23.0", + "babel-plugin-transform-es2015-unicode-regex": "6.24.1", + "babel-plugin-transform-exponentiation-operator": "6.24.1", + "babel-plugin-transform-regenerator": "6.26.0", + "browserslist": "3.2.8", + "invariant": "2.2.4", + "semver": "5.5.0" } }, "babel-preset-es2015": { @@ -1224,30 +1256,40 @@ "integrity": "sha1-1EBQ1rwsn+6nAqrzjXJ6AhBTiTk=", "dev": true, "requires": { - "babel-plugin-check-es2015-constants": "^6.22.0", - "babel-plugin-transform-es2015-arrow-functions": "^6.22.0", - "babel-plugin-transform-es2015-block-scoped-functions": "^6.22.0", - "babel-plugin-transform-es2015-block-scoping": "^6.24.1", - "babel-plugin-transform-es2015-classes": "^6.24.1", - "babel-plugin-transform-es2015-computed-properties": "^6.24.1", - "babel-plugin-transform-es2015-destructuring": "^6.22.0", - "babel-plugin-transform-es2015-duplicate-keys": "^6.24.1", - "babel-plugin-transform-es2015-for-of": "^6.22.0", - "babel-plugin-transform-es2015-function-name": "^6.24.1", - "babel-plugin-transform-es2015-literals": "^6.22.0", - "babel-plugin-transform-es2015-modules-amd": "^6.24.1", - "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", - "babel-plugin-transform-es2015-modules-systemjs": "^6.24.1", - "babel-plugin-transform-es2015-modules-umd": "^6.24.1", - "babel-plugin-transform-es2015-object-super": "^6.24.1", - "babel-plugin-transform-es2015-parameters": "^6.24.1", - "babel-plugin-transform-es2015-shorthand-properties": "^6.24.1", - "babel-plugin-transform-es2015-spread": "^6.22.0", - "babel-plugin-transform-es2015-sticky-regex": "^6.24.1", - "babel-plugin-transform-es2015-template-literals": "^6.22.0", - "babel-plugin-transform-es2015-typeof-symbol": "^6.22.0", - "babel-plugin-transform-es2015-unicode-regex": "^6.24.1", - "babel-plugin-transform-regenerator": "^6.24.1" + "babel-plugin-check-es2015-constants": "6.22.0", + "babel-plugin-transform-es2015-arrow-functions": "6.22.0", + "babel-plugin-transform-es2015-block-scoped-functions": "6.22.0", + "babel-plugin-transform-es2015-block-scoping": "6.26.0", + "babel-plugin-transform-es2015-classes": "6.24.1", + "babel-plugin-transform-es2015-computed-properties": "6.24.1", + "babel-plugin-transform-es2015-destructuring": "6.23.0", + "babel-plugin-transform-es2015-duplicate-keys": "6.24.1", + "babel-plugin-transform-es2015-for-of": "6.23.0", + "babel-plugin-transform-es2015-function-name": "6.24.1", + "babel-plugin-transform-es2015-literals": "6.22.0", + "babel-plugin-transform-es2015-modules-amd": "6.24.1", + "babel-plugin-transform-es2015-modules-commonjs": "6.26.2", + "babel-plugin-transform-es2015-modules-systemjs": "6.24.1", + "babel-plugin-transform-es2015-modules-umd": "6.24.1", + "babel-plugin-transform-es2015-object-super": "6.24.1", + "babel-plugin-transform-es2015-parameters": "6.24.1", + "babel-plugin-transform-es2015-shorthand-properties": "6.24.1", + "babel-plugin-transform-es2015-spread": "6.22.0", + "babel-plugin-transform-es2015-sticky-regex": "6.24.1", + "babel-plugin-transform-es2015-template-literals": "6.22.0", + "babel-plugin-transform-es2015-typeof-symbol": "6.23.0", + "babel-plugin-transform-es2015-unicode-regex": "6.24.1", + "babel-plugin-transform-regenerator": "6.26.0" + } + }, + "babel-preset-es2017": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-preset-es2017/-/babel-preset-es2017-6.24.1.tgz", + "integrity": "sha1-WXvq37n38gi8/YoS6bKym4svFNE=", + "dev": true, + "requires": { + "babel-plugin-syntax-trailing-function-commas": "6.22.0", + "babel-plugin-transform-async-to-generator": "6.24.1" } }, "babel-register": { @@ -1256,13 +1298,13 @@ "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", "dev": true, "requires": { - "babel-core": "^6.26.0", - "babel-runtime": "^6.26.0", - "core-js": "^2.5.0", - "home-or-tmp": "^2.0.0", - "lodash": "^4.17.4", - "mkdirp": "^0.5.1", - "source-map-support": "^0.4.15" + "babel-core": "6.26.3", + "babel-runtime": "6.26.0", + "core-js": "2.5.7", + "home-or-tmp": "2.0.0", + "lodash": "4.17.10", + "mkdirp": "0.5.1", + "source-map-support": "0.4.18" } }, "babel-runtime": { @@ -1271,8 +1313,8 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" + "core-js": "2.5.7", + "regenerator-runtime": "0.11.1" } }, "babel-template": { @@ -1281,11 +1323,11 @@ "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", "dev": true, "requires": { - "babel-runtime": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "lodash": "^4.17.4" + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "lodash": "4.17.10" } }, "babel-traverse": { @@ -1294,15 +1336,15 @@ "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", "dev": true, "requires": { - "babel-code-frame": "^6.26.0", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "debug": "^2.6.8", - "globals": "^9.18.0", - "invariant": "^2.2.2", - "lodash": "^4.17.4" + "babel-code-frame": "6.26.0", + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "debug": "2.6.9", + "globals": "9.18.0", + "invariant": "2.2.4", + "lodash": "4.17.10" }, "dependencies": { "debug": { @@ -1322,10 +1364,10 @@ "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", "dev": true, "requires": { - "babel-runtime": "^6.26.0", - "esutils": "^2.0.2", - "lodash": "^4.17.4", - "to-fast-properties": "^1.0.3" + "babel-runtime": "6.26.0", + "esutils": "2.0.2", + "lodash": "4.17.10", + "to-fast-properties": "1.0.3" } }, "babylon": { @@ -1346,13 +1388,13 @@ "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", "dev": true, "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" + "cache-base": "1.0.1", + "class-utils": "0.3.6", + "component-emitter": "1.2.1", + "define-property": "1.0.0", + "isobject": "3.0.1", + "mixin-deep": "1.3.1", + "pascalcase": "0.1.1" }, "dependencies": { "define-property": { @@ -1361,7 +1403,7 @@ "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "dev": true, "requires": { - "is-descriptor": "^1.0.0" + "is-descriptor": "1.0.2" } }, "is-accessor-descriptor": { @@ -1370,7 +1412,7 @@ "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "dev": true, "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-data-descriptor": { @@ -1379,7 +1421,7 @@ "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "dev": true, "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-descriptor": { @@ -1388,9 +1430,9 @@ "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "dev": true, "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" } } } @@ -1437,7 +1479,7 @@ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "requires": { - "balanced-match": "^1.0.0", + "balanced-match": "1.0.0", "concat-map": "0.0.1" } }, @@ -1447,16 +1489,16 @@ "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", "dev": true, "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" + "arr-flatten": "1.1.0", + "array-unique": "0.3.2", + "extend-shallow": "2.0.1", + "fill-range": "4.0.0", + "isobject": "3.0.1", + "repeat-element": "1.1.2", + "snapdragon": "0.8.2", + "snapdragon-node": "2.1.1", + "split-string": "3.1.0", + "to-regex": "3.0.2" }, "dependencies": { "extend-shallow": { @@ -1465,7 +1507,7 @@ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } } } @@ -1480,11 +1522,10 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/browser-bunyan/-/browser-bunyan-1.3.0.tgz", "integrity": "sha1-JjeNxY16mAAsyb/Pui6l1xJEmZI=", - "dev": true, "requires": { - "@browser-bunyan/console-formatted-stream": "^1.3.0", - "@browser-bunyan/console-raw-stream": "^1.3.0", - "@browser-bunyan/levels": "^1.3.0" + "@browser-bunyan/console-formatted-stream": "1.3.0", + "@browser-bunyan/console-raw-stream": "1.3.0", + "@browser-bunyan/levels": "1.3.0" } }, "browserify-aes": { @@ -1493,12 +1534,12 @@ "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", "dev": true, "requires": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "buffer-xor": "1.0.3", + "cipher-base": "1.0.4", + "create-hash": "1.2.0", + "evp_bytestokey": "1.0.3", + "inherits": "2.0.3", + "safe-buffer": "5.1.2" } }, "browserify-cipher": { @@ -1507,9 +1548,9 @@ "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", "dev": true, "requires": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" + "browserify-aes": "1.2.0", + "browserify-des": "1.0.1", + "evp_bytestokey": "1.0.3" } }, "browserify-des": { @@ -1518,9 +1559,9 @@ "integrity": "sha512-zy0Cobe3hhgpiOM32Tj7KQ3Vl91m0njwsjzZQK1L+JDf11dzP9qIvjreVinsvXrgfjhStXwUWAEpB9D7Gwmayw==", "dev": true, "requires": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1" + "cipher-base": "1.0.4", + "des.js": "1.0.0", + "inherits": "2.0.3" } }, "browserify-rsa": { @@ -1529,8 +1570,8 @@ "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", "dev": true, "requires": { - "bn.js": "^4.1.0", - "randombytes": "^2.0.1" + "bn.js": "4.11.8", + "randombytes": "2.0.6" } }, "browserify-sign": { @@ -1539,13 +1580,13 @@ "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", "dev": true, "requires": { - "bn.js": "^4.1.1", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.2", - "elliptic": "^6.0.0", - "inherits": "^2.0.1", - "parse-asn1": "^5.0.0" + "bn.js": "4.11.8", + "browserify-rsa": "4.0.1", + "create-hash": "1.2.0", + "create-hmac": "1.1.7", + "elliptic": "6.4.0", + "inherits": "2.0.3", + "parse-asn1": "5.1.1" } }, "browserify-zlib": { @@ -1554,7 +1595,7 @@ "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", "dev": true, "requires": { - "pako": "~1.0.5" + "pako": "1.0.6" } }, "browserslist": { @@ -1563,8 +1604,8 @@ "integrity": "sha512-WHVocJYavUwVgVViC0ORikPHQquXwVh939TaelZ4WDqpWgTX/FsGhl/+P4qBUAGcRvtOgDgC+xftNWWp2RUTAQ==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30000844", - "electron-to-chromium": "^1.3.47" + "caniuse-lite": "1.0.30000850", + "electron-to-chromium": "1.3.48" } }, "buffer": { @@ -1573,9 +1614,9 @@ "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", "dev": true, "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" + "base64-js": "1.3.0", + "ieee754": "1.1.11", + "isarray": "1.0.0" } }, "buffer-from": { @@ -1602,19 +1643,19 @@ "integrity": "sha512-Dph0MzuH+rTQzGPNT9fAnrPmMmjKfST6trxJeK7NQuHRaVw24VzPRWTmg9MpcwOVQZO0E1FBICUlFeNaKPIfHA==", "dev": true, "requires": { - "bluebird": "^3.5.1", - "chownr": "^1.0.1", - "glob": "^7.1.2", - "graceful-fs": "^4.1.11", - "lru-cache": "^4.1.1", - "mississippi": "^2.0.0", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "promise-inflight": "^1.0.1", - "rimraf": "^2.6.2", - "ssri": "^5.2.4", - "unique-filename": "^1.1.0", - "y18n": "^4.0.0" + "bluebird": "3.5.1", + "chownr": "1.0.1", + "glob": "7.1.2", + "graceful-fs": "4.1.11", + "lru-cache": "4.1.3", + "mississippi": "2.0.0", + "mkdirp": "0.5.1", + "move-concurrently": "1.0.1", + "promise-inflight": "1.0.1", + "rimraf": "2.6.2", + "ssri": "5.3.0", + "unique-filename": "1.1.0", + "y18n": "4.0.0" } }, "cache-base": { @@ -1623,15 +1664,15 @@ "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", "dev": true, "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" + "collection-visit": "1.0.0", + "component-emitter": "1.2.1", + "get-value": "2.0.6", + "has-value": "1.0.0", + "isobject": "3.0.1", + "set-value": "2.0.0", + "to-object-path": "0.3.0", + "union-value": "1.0.0", + "unset-value": "1.0.0" } }, "caller-path": { @@ -1640,7 +1681,7 @@ "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", "dev": true, "requires": { - "callsites": "^0.2.0" + "callsites": "0.2.0" } }, "callsites": { @@ -1667,11 +1708,11 @@ "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" } }, "chardet": { @@ -1686,18 +1727,18 @@ "integrity": "sha512-zW8iXYZtXMx4kux/nuZVXjkLP+CyIK5Al5FHnj1OgTKGZfp4Oy6/ymtMSKFv3GD8DviEmUPmJg9eFdJ/JzudMg==", "dev": true, "requires": { - "anymatch": "^2.0.0", - "async-each": "^1.0.0", - "braces": "^2.3.0", - "fsevents": "^1.1.2", - "glob-parent": "^3.1.0", - "inherits": "^2.0.1", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "normalize-path": "^2.1.1", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.0.0", - "upath": "^1.0.0" + "anymatch": "2.0.0", + "async-each": "1.0.1", + "braces": "2.3.2", + "fsevents": "1.2.4", + "glob-parent": "3.1.0", + "inherits": "2.0.3", + "is-binary-path": "1.0.1", + "is-glob": "4.0.0", + "normalize-path": "2.1.1", + "path-is-absolute": "1.0.1", + "readdirp": "2.1.0", + "upath": "1.1.0" } }, "chownr": { @@ -1718,8 +1759,8 @@ "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", "dev": true, "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "inherits": "2.0.3", + "safe-buffer": "5.1.2" } }, "circular-json": { @@ -1734,10 +1775,10 @@ "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", "dev": true, "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" + "arr-union": "3.1.0", + "define-property": "0.2.5", + "isobject": "3.0.1", + "static-extend": "0.1.2" }, "dependencies": { "define-property": { @@ -1746,7 +1787,7 @@ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "dev": true, "requires": { - "is-descriptor": "^0.1.0" + "is-descriptor": "0.1.6" } } } @@ -1757,7 +1798,7 @@ "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", "dev": true, "requires": { - "restore-cursor": "^2.0.0" + "restore-cursor": "2.0.0" } }, "cli-width": { @@ -1772,9 +1813,9 @@ "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", "dev": true, "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" + "string-width": "2.1.1", + "strip-ansi": "4.0.0", + "wrap-ansi": "2.1.0" }, "dependencies": { "ansi-regex": { @@ -1789,7 +1830,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "3.0.0" } } } @@ -1824,8 +1865,8 @@ "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", "dev": true, "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" + "map-visit": "1.0.0", + "object-visit": "1.0.1" } }, "color-convert": { @@ -1834,7 +1875,7 @@ "integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==", "dev": true, "requires": { - "color-name": "^1.1.1" + "color-name": "1.1.3" } }, "color-name": { @@ -1885,10 +1926,10 @@ "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", "dev": true, "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" + "buffer-from": "1.1.0", + "inherits": "2.0.3", + "readable-stream": "2.3.6", + "typedarray": "0.0.6" } }, "console-browserify": { @@ -1897,7 +1938,7 @@ "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", "dev": true, "requires": { - "date-now": "^0.1.4" + "date-now": "0.1.4" } }, "constants-browserify": { @@ -1918,12 +1959,12 @@ "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", "dev": true, "requires": { - "aproba": "^1.1.1", - "fs-write-stream-atomic": "^1.0.8", - "iferr": "^0.1.5", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", - "run-queue": "^1.0.0" + "aproba": "1.2.0", + "fs-write-stream-atomic": "1.0.10", + "iferr": "0.1.5", + "mkdirp": "0.5.1", + "rimraf": "2.6.2", + "run-queue": "1.0.3" } }, "copy-descriptor": { @@ -1950,8 +1991,8 @@ "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", "dev": true, "requires": { - "bn.js": "^4.1.0", - "elliptic": "^6.0.0" + "bn.js": "4.11.8", + "elliptic": "6.4.0" } }, "create-hash": { @@ -1960,11 +2001,11 @@ "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", "dev": true, "requires": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" + "cipher-base": "1.0.4", + "inherits": "2.0.3", + "md5.js": "1.3.4", + "ripemd160": "2.0.2", + "sha.js": "2.4.11" } }, "create-hmac": { @@ -1973,12 +2014,12 @@ "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", "dev": true, "requires": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" + "cipher-base": "1.0.4", + "create-hash": "1.2.0", + "inherits": "2.0.3", + "ripemd160": "2.0.2", + "safe-buffer": "5.1.2", + "sha.js": "2.4.11" } }, "cross-spawn": { @@ -1987,9 +2028,9 @@ "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", "dev": true, "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "lru-cache": "4.1.3", + "shebang-command": "1.2.0", + "which": "1.3.1" } }, "crypto-browserify": { @@ -1998,17 +2039,17 @@ "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", "dev": true, "requires": { - "browserify-cipher": "^1.0.0", - "browserify-sign": "^4.0.0", - "create-ecdh": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.0", - "diffie-hellman": "^5.0.0", - "inherits": "^2.0.1", - "pbkdf2": "^3.0.3", - "public-encrypt": "^4.0.0", - "randombytes": "^2.0.0", - "randomfill": "^1.0.3" + "browserify-cipher": "1.0.1", + "browserify-sign": "4.0.4", + "create-ecdh": "4.0.3", + "create-hash": "1.2.0", + "create-hmac": "1.1.7", + "diffie-hellman": "5.0.3", + "inherits": "2.0.3", + "pbkdf2": "3.0.16", + "public-encrypt": "4.0.2", + "randombytes": "2.0.6", + "randomfill": "1.0.4" } }, "cyclist": { @@ -2062,7 +2103,7 @@ "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", "dev": true, "requires": { - "clone": "^1.0.2" + "clone": "1.0.4" } }, "define-property": { @@ -2071,8 +2112,8 @@ "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", "dev": true, "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" + "is-descriptor": "1.0.2", + "isobject": "3.0.1" }, "dependencies": { "is-accessor-descriptor": { @@ -2081,7 +2122,7 @@ "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "dev": true, "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-data-descriptor": { @@ -2090,7 +2131,7 @@ "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "dev": true, "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-descriptor": { @@ -2099,9 +2140,9 @@ "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "dev": true, "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" } } } @@ -2112,13 +2153,13 @@ "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", "dev": true, "requires": { - "globby": "^5.0.0", - "is-path-cwd": "^1.0.0", - "is-path-in-cwd": "^1.0.0", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "rimraf": "^2.2.8" + "globby": "5.0.0", + "is-path-cwd": "1.0.0", + "is-path-in-cwd": "1.0.1", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "rimraf": "2.6.2" }, "dependencies": { "pify": { @@ -2141,8 +2182,8 @@ "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", "dev": true, "requires": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" + "inherits": "2.0.3", + "minimalistic-assert": "1.0.1" } }, "detect-file": { @@ -2157,7 +2198,7 @@ "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", "dev": true, "requires": { - "repeating": "^2.0.0" + "repeating": "2.0.1" } }, "diffie-hellman": { @@ -2166,9 +2207,9 @@ "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", "dev": true, "requires": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" + "bn.js": "4.11.8", + "miller-rabin": "4.0.1", + "randombytes": "2.0.6" } }, "doctrine": { @@ -2177,7 +2218,7 @@ "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "dev": true, "requires": { - "esutils": "^2.0.2" + "esutils": "2.0.2" } }, "domain-browser": { @@ -2192,7 +2233,7 @@ "integrity": "sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds=", "dev": true, "requires": { - "readable-stream": "~1.1.9" + "readable-stream": "1.1.14" }, "dependencies": { "isarray": { @@ -2207,10 +2248,10 @@ "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", "dev": true, "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", + "core-util-is": "1.0.2", + "inherits": "2.0.3", "isarray": "0.0.1", - "string_decoder": "~0.10.x" + "string_decoder": "0.10.31" } }, "string_decoder": { @@ -2227,10 +2268,10 @@ "integrity": "sha512-fO3Di4tBKJpYTFHAxTU00BcfWMY9w24r/x21a6rZRbsD/ToUgGxsMbiGRmB7uVAXeGKXD9MwiLZa5E97EVgIRQ==", "dev": true, "requires": { - "end-of-stream": "^1.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.0.0", - "stream-shift": "^1.0.0" + "end-of-stream": "1.4.1", + "inherits": "2.0.3", + "readable-stream": "2.3.6", + "stream-shift": "1.0.0" } }, "electron-to-chromium": { @@ -2245,13 +2286,13 @@ "integrity": "sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=", "dev": true, "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" + "bn.js": "4.11.8", + "brorand": "1.1.0", + "hash.js": "1.1.3", + "hmac-drbg": "1.0.1", + "inherits": "2.0.3", + "minimalistic-assert": "1.0.1", + "minimalistic-crypto-utils": "1.0.1" } }, "emojis-list": { @@ -2266,7 +2307,7 @@ "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", "dev": true, "requires": { - "once": "^1.4.0" + "once": "1.4.0" } }, "enhanced-resolve": { @@ -2275,9 +2316,9 @@ "integrity": "sha512-jox/62b2GofV1qTUQTMPEJSDIGycS43evqYzD/KVtEb9OCoki9cnacUPxCrZa7JfPzZSYOCZhu9O9luaMxAX8g==", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "memory-fs": "^0.4.0", - "tapable": "^1.0.0" + "graceful-fs": "4.1.11", + "memory-fs": "0.4.1", + "tapable": "1.0.0" } }, "errno": { @@ -2286,7 +2327,7 @@ "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", "dev": true, "requires": { - "prr": "~1.0.1" + "prr": "1.0.1" } }, "escape-string-regexp": { @@ -2301,44 +2342,44 @@ "integrity": "sha512-bT3/1x1EbZB7phzYu7vCr1v3ONuzDtX8WjuM9c0iYxe+cq+pwcKEoQjl7zd3RpC6YOLgnSy3cTN58M2jcoPDIQ==", "dev": true, "requires": { - "ajv": "^5.3.0", - "babel-code-frame": "^6.22.0", - "chalk": "^2.1.0", - "concat-stream": "^1.6.0", - "cross-spawn": "^5.1.0", - "debug": "^3.1.0", - "doctrine": "^2.1.0", - "eslint-scope": "^3.7.1", - "eslint-visitor-keys": "^1.0.0", - "espree": "^3.5.4", - "esquery": "^1.0.0", - "esutils": "^2.0.2", - "file-entry-cache": "^2.0.0", - "functional-red-black-tree": "^1.0.1", - "glob": "^7.1.2", - "globals": "^11.0.1", - "ignore": "^3.3.3", - "imurmurhash": "^0.1.4", - "inquirer": "^3.0.6", - "is-resolvable": "^1.0.0", - "js-yaml": "^3.9.1", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", - "lodash": "^4.17.4", - "minimatch": "^3.0.2", - "mkdirp": "^0.5.1", - "natural-compare": "^1.4.0", - "optionator": "^0.8.2", - "path-is-inside": "^1.0.2", - "pluralize": "^7.0.0", - "progress": "^2.0.0", - "regexpp": "^1.0.1", - "require-uncached": "^1.0.3", - "semver": "^5.3.0", - "strip-ansi": "^4.0.0", - "strip-json-comments": "~2.0.1", + "ajv": "5.5.2", + "babel-code-frame": "6.26.0", + "chalk": "2.4.1", + "concat-stream": "1.6.2", + "cross-spawn": "5.1.0", + "debug": "3.1.0", + "doctrine": "2.1.0", + "eslint-scope": "3.7.1", + "eslint-visitor-keys": "1.0.0", + "espree": "3.5.4", + "esquery": "1.0.1", + "esutils": "2.0.2", + "file-entry-cache": "2.0.0", + "functional-red-black-tree": "1.0.1", + "glob": "7.1.2", + "globals": "11.5.0", + "ignore": "3.3.8", + "imurmurhash": "0.1.4", + "inquirer": "3.3.0", + "is-resolvable": "1.1.0", + "js-yaml": "3.12.0", + "json-stable-stringify-without-jsonify": "1.0.1", + "levn": "0.3.0", + "lodash": "4.17.10", + "minimatch": "3.0.4", + "mkdirp": "0.5.1", + "natural-compare": "1.4.0", + "optionator": "0.8.2", + "path-is-inside": "1.0.2", + "pluralize": "7.0.0", + "progress": "2.0.0", + "regexpp": "1.1.0", + "require-uncached": "1.0.3", + "semver": "5.5.0", + "strip-ansi": "4.0.0", + "strip-json-comments": "2.0.1", "table": "4.0.2", - "text-table": "~0.2.0" + "text-table": "0.2.0" }, "dependencies": { "ajv": { @@ -2347,10 +2388,10 @@ "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", "dev": true, "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" + "co": "4.6.0", + "fast-deep-equal": "1.1.0", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1" } }, "ansi-regex": { @@ -2365,7 +2406,7 @@ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { - "color-convert": "^1.9.0" + "color-convert": "1.9.1" } }, "chalk": { @@ -2374,9 +2415,9 @@ "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" } }, "fast-deep-equal": { @@ -2397,7 +2438,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "3.0.0" } }, "supports-color": { @@ -2406,7 +2447,7 @@ "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "has-flag": "3.0.0" } } } @@ -2417,8 +2458,8 @@ "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", "dev": true, "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" + "esrecurse": "4.2.1", + "estraverse": "4.2.0" } }, "eslint-visitor-keys": { @@ -2433,8 +2474,8 @@ "integrity": "sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A==", "dev": true, "requires": { - "acorn": "^5.5.0", - "acorn-jsx": "^3.0.0" + "acorn": "5.6.2", + "acorn-jsx": "3.0.1" } }, "esprima": { @@ -2449,7 +2490,7 @@ "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", "dev": true, "requires": { - "estraverse": "^4.0.0" + "estraverse": "4.2.0" } }, "esrecurse": { @@ -2458,7 +2499,7 @@ "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", "dev": true, "requires": { - "estraverse": "^4.1.0" + "estraverse": "4.2.0" } }, "estraverse": { @@ -2485,8 +2526,8 @@ "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", "dev": true, "requires": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" + "md5.js": "1.3.4", + "safe-buffer": "5.1.2" } }, "execa": { @@ -2495,13 +2536,13 @@ "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", "dev": true, "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" + "cross-spawn": "5.1.0", + "get-stream": "3.0.0", + "is-stream": "1.1.0", + "npm-run-path": "2.0.2", + "p-finally": "1.0.0", + "signal-exit": "3.0.2", + "strip-eof": "1.0.0" } }, "expand-brackets": { @@ -2510,13 +2551,13 @@ "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", "dev": true, "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "posix-character-classes": "0.1.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" }, "dependencies": { "debug": { @@ -2534,7 +2575,7 @@ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "dev": true, "requires": { - "is-descriptor": "^0.1.0" + "is-descriptor": "0.1.6" } }, "extend-shallow": { @@ -2543,7 +2584,7 @@ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } } } @@ -2554,7 +2595,7 @@ "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", "dev": true, "requires": { - "homedir-polyfill": "^1.0.1" + "homedir-polyfill": "1.0.1" } }, "extend": { @@ -2569,8 +2610,8 @@ "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", "dev": true, "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" + "assign-symbols": "1.0.0", + "is-extendable": "1.0.1" }, "dependencies": { "is-extendable": { @@ -2579,7 +2620,7 @@ "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "dev": true, "requires": { - "is-plain-object": "^2.0.4" + "is-plain-object": "2.0.4" } } } @@ -2590,9 +2631,9 @@ "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", "dev": true, "requires": { - "chardet": "^0.4.0", - "iconv-lite": "^0.4.17", - "tmp": "^0.0.33" + "chardet": "0.4.2", + "iconv-lite": "0.4.23", + "tmp": "0.0.33" } }, "extglob": { @@ -2601,14 +2642,14 @@ "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", "dev": true, "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" + "array-unique": "0.3.2", + "define-property": "1.0.0", + "expand-brackets": "2.1.4", + "extend-shallow": "2.0.1", + "fragment-cache": "0.2.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" }, "dependencies": { "define-property": { @@ -2617,7 +2658,7 @@ "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "dev": true, "requires": { - "is-descriptor": "^1.0.0" + "is-descriptor": "1.0.2" } }, "extend-shallow": { @@ -2626,7 +2667,7 @@ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } }, "is-accessor-descriptor": { @@ -2635,7 +2676,7 @@ "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "dev": true, "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-data-descriptor": { @@ -2644,7 +2685,7 @@ "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "dev": true, "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-descriptor": { @@ -2653,9 +2694,9 @@ "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "dev": true, "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" } } } @@ -2666,9 +2707,9 @@ "integrity": "sha1-9BEl49hPLn2JpD0G2VjI94vha+E=", "dev": true, "requires": { - "ansi-gray": "^0.1.1", - "color-support": "^1.1.3", - "time-stamp": "^1.0.0" + "ansi-gray": "0.1.1", + "color-support": "1.1.3", + "time-stamp": "1.1.0" } }, "fast-deep-equal": { @@ -2695,7 +2736,7 @@ "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", "dev": true, "requires": { - "escape-string-regexp": "^1.0.5" + "escape-string-regexp": "1.0.5" } }, "file-entry-cache": { @@ -2704,8 +2745,8 @@ "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", "dev": true, "requires": { - "flat-cache": "^1.2.1", - "object-assign": "^4.0.1" + "flat-cache": "1.3.0", + "object-assign": "4.1.1" } }, "fill-range": { @@ -2714,10 +2755,10 @@ "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", "dev": true, "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" + "extend-shallow": "2.0.1", + "is-number": "3.0.0", + "repeat-string": "1.6.1", + "to-regex-range": "2.1.1" }, "dependencies": { "extend-shallow": { @@ -2726,7 +2767,7 @@ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } } } @@ -2737,9 +2778,9 @@ "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", "dev": true, "requires": { - "commondir": "^1.0.1", - "make-dir": "^1.0.0", - "pkg-dir": "^2.0.0" + "commondir": "1.0.1", + "make-dir": "1.3.0", + "pkg-dir": "2.0.0" } }, "find-index": { @@ -2754,7 +2795,7 @@ "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "dev": true, "requires": { - "locate-path": "^2.0.0" + "locate-path": "2.0.0" } }, "findup-sync": { @@ -2763,10 +2804,10 @@ "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=", "dev": true, "requires": { - "detect-file": "^1.0.0", - "is-glob": "^3.1.0", - "micromatch": "^3.0.4", - "resolve-dir": "^1.0.1" + "detect-file": "1.0.0", + "is-glob": "3.1.0", + "micromatch": "3.1.10", + "resolve-dir": "1.0.1" }, "dependencies": { "is-glob": { @@ -2775,7 +2816,7 @@ "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", "dev": true, "requires": { - "is-extglob": "^2.1.0" + "is-extglob": "2.1.1" } } } @@ -2786,11 +2827,11 @@ "integrity": "sha1-s33IRLdqL15wgeiE98CuNE8VNHY=", "dev": true, "requires": { - "expand-tilde": "^2.0.2", - "is-plain-object": "^2.0.3", - "object.defaults": "^1.1.0", - "object.pick": "^1.2.0", - "parse-filepath": "^1.0.1" + "expand-tilde": "2.0.2", + "is-plain-object": "2.0.4", + "object.defaults": "1.1.0", + "object.pick": "1.3.0", + "parse-filepath": "1.0.2" } }, "first-chunk-stream": { @@ -2811,10 +2852,10 @@ "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", "dev": true, "requires": { - "circular-json": "^0.3.1", - "del": "^2.0.2", - "graceful-fs": "^4.1.2", - "write": "^0.2.1" + "circular-json": "0.3.3", + "del": "2.2.2", + "graceful-fs": "4.1.11", + "write": "0.2.1" } }, "flush-write-stream": { @@ -2823,8 +2864,8 @@ "integrity": "sha512-calZMC10u0FMUqoiunI2AiGIIUtUIvifNwkHhNupZH4cbNnW1Itkoh/Nf5HFYmDrwWPjrUxpkZT0KhuCq0jmGw==", "dev": true, "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.4" + "inherits": "2.0.3", + "readable-stream": "2.3.6" } }, "for-in": { @@ -2839,7 +2880,7 @@ "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", "dev": true, "requires": { - "for-in": "^1.0.1" + "for-in": "1.0.2" } }, "fragment-cache": { @@ -2848,7 +2889,7 @@ "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", "dev": true, "requires": { - "map-cache": "^0.2.2" + "map-cache": "0.2.2" } }, "from2": { @@ -2857,8 +2898,8 @@ "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", "dev": true, "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.0" + "inherits": "2.0.3", + "readable-stream": "2.3.6" } }, "fs-write-stream-atomic": { @@ -2867,10 +2908,10 @@ "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "iferr": "^0.1.5", - "imurmurhash": "^0.1.4", - "readable-stream": "1 || 2" + "graceful-fs": "4.1.11", + "iferr": "0.1.5", + "imurmurhash": "0.1.4", + "readable-stream": "2.3.6" } }, "fs.realpath": { @@ -2886,8 +2927,8 @@ "dev": true, "optional": true, "requires": { - "nan": "^2.9.2", - "node-pre-gyp": "^0.10.0" + "nan": "2.10.0", + "node-pre-gyp": "0.10.0" }, "dependencies": { "abbrev": { @@ -2913,8 +2954,8 @@ "dev": true, "optional": true, "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" + "delegates": "1.0.0", + "readable-stream": "2.3.6" } }, "balanced-match": { @@ -2927,7 +2968,7 @@ "bundled": true, "dev": true, "requires": { - "balanced-match": "^1.0.0", + "balanced-match": "1.0.0", "concat-map": "0.0.1" } }, @@ -2991,7 +3032,7 @@ "dev": true, "optional": true, "requires": { - "minipass": "^2.2.1" + "minipass": "2.2.4" } }, "fs.realpath": { @@ -3006,14 +3047,14 @@ "dev": true, "optional": true, "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" + "aproba": "1.2.0", + "console-control-strings": "1.1.0", + "has-unicode": "2.0.1", + "object-assign": "4.1.1", + "signal-exit": "3.0.2", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wide-align": "1.1.2" } }, "glob": { @@ -3022,12 +3063,12 @@ "dev": true, "optional": true, "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" } }, "has-unicode": { @@ -3042,7 +3083,7 @@ "dev": true, "optional": true, "requires": { - "safer-buffer": "^2.1.0" + "safer-buffer": "2.1.2" } }, "ignore-walk": { @@ -3051,7 +3092,7 @@ "dev": true, "optional": true, "requires": { - "minimatch": "^3.0.4" + "minimatch": "3.0.4" } }, "inflight": { @@ -3060,8 +3101,8 @@ "dev": true, "optional": true, "requires": { - "once": "^1.3.0", - "wrappy": "1" + "once": "1.4.0", + "wrappy": "1.0.2" } }, "inherits": { @@ -3080,7 +3121,7 @@ "bundled": true, "dev": true, "requires": { - "number-is-nan": "^1.0.0" + "number-is-nan": "1.0.1" } }, "isarray": { @@ -3094,7 +3135,7 @@ "bundled": true, "dev": true, "requires": { - "brace-expansion": "^1.1.7" + "brace-expansion": "1.1.11" } }, "minimist": { @@ -3107,8 +3148,8 @@ "bundled": true, "dev": true, "requires": { - "safe-buffer": "^5.1.1", - "yallist": "^3.0.0" + "safe-buffer": "5.1.1", + "yallist": "3.0.2" } }, "minizlib": { @@ -3117,7 +3158,7 @@ "dev": true, "optional": true, "requires": { - "minipass": "^2.2.1" + "minipass": "2.2.4" } }, "mkdirp": { @@ -3140,9 +3181,9 @@ "dev": true, "optional": true, "requires": { - "debug": "^2.1.2", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" + "debug": "2.6.9", + "iconv-lite": "0.4.21", + "sax": "1.2.4" } }, "node-pre-gyp": { @@ -3151,16 +3192,16 @@ "dev": true, "optional": true, "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.0", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.1.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4" + "detect-libc": "1.0.3", + "mkdirp": "0.5.1", + "needle": "2.2.0", + "nopt": "4.0.1", + "npm-packlist": "1.1.10", + "npmlog": "4.1.2", + "rc": "1.2.7", + "rimraf": "2.6.2", + "semver": "5.5.0", + "tar": "4.4.1" } }, "nopt": { @@ -3169,8 +3210,8 @@ "dev": true, "optional": true, "requires": { - "abbrev": "1", - "osenv": "^0.1.4" + "abbrev": "1.1.1", + "osenv": "0.1.5" } }, "npm-bundled": { @@ -3185,8 +3226,8 @@ "dev": true, "optional": true, "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" + "ignore-walk": "3.0.1", + "npm-bundled": "1.0.3" } }, "npmlog": { @@ -3195,10 +3236,10 @@ "dev": true, "optional": true, "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" + "are-we-there-yet": "1.1.4", + "console-control-strings": "1.1.0", + "gauge": "2.7.4", + "set-blocking": "2.0.0" } }, "number-is-nan": { @@ -3217,7 +3258,7 @@ "bundled": true, "dev": true, "requires": { - "wrappy": "1" + "wrappy": "1.0.2" } }, "os-homedir": { @@ -3238,8 +3279,8 @@ "dev": true, "optional": true, "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" } }, "path-is-absolute": { @@ -3260,10 +3301,10 @@ "dev": true, "optional": true, "requires": { - "deep-extend": "^0.5.1", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" + "deep-extend": "0.5.1", + "ini": "1.3.5", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" }, "dependencies": { "minimist": { @@ -3280,13 +3321,13 @@ "dev": true, "optional": true, "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.1", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" } }, "rimraf": { @@ -3295,7 +3336,7 @@ "dev": true, "optional": true, "requires": { - "glob": "^7.0.5" + "glob": "7.1.2" } }, "safe-buffer": { @@ -3338,9 +3379,9 @@ "bundled": true, "dev": true, "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" } }, "string_decoder": { @@ -3349,7 +3390,7 @@ "dev": true, "optional": true, "requires": { - "safe-buffer": "~5.1.0" + "safe-buffer": "5.1.1" } }, "strip-ansi": { @@ -3357,7 +3398,7 @@ "bundled": true, "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "ansi-regex": "2.1.1" } }, "strip-json-comments": { @@ -3372,13 +3413,13 @@ "dev": true, "optional": true, "requires": { - "chownr": "^1.0.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.2.4", - "minizlib": "^1.1.0", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.1", - "yallist": "^3.0.2" + "chownr": "1.0.1", + "fs-minipass": "1.2.5", + "minipass": "2.2.4", + "minizlib": "1.1.0", + "mkdirp": "0.5.1", + "safe-buffer": "5.1.1", + "yallist": "3.0.2" } }, "util-deprecate": { @@ -3393,7 +3434,7 @@ "dev": true, "optional": true, "requires": { - "string-width": "^1.0.2" + "string-width": "1.0.2" } }, "wrappy": { @@ -3420,7 +3461,7 @@ "integrity": "sha1-QLcJU30k0dRXZ9takIaJ3+aaxE8=", "dev": true, "requires": { - "globule": "~0.1.0" + "globule": "0.1.0" } }, "get-caller-file": { @@ -3447,12 +3488,12 @@ "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "dev": true, "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" } }, "glob-parent": { @@ -3461,8 +3502,8 @@ "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", "dev": true, "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" + "is-glob": "3.1.0", + "path-dirname": "1.0.2" }, "dependencies": { "is-glob": { @@ -3471,7 +3512,7 @@ "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", "dev": true, "requires": { - "is-extglob": "^2.1.0" + "is-extglob": "2.1.1" } } } @@ -3482,12 +3523,12 @@ "integrity": "sha1-kXCl8St5Awb9/lmPMT+PeVT9FDs=", "dev": true, "requires": { - "glob": "^4.3.1", - "glob2base": "^0.0.12", - "minimatch": "^2.0.1", - "ordered-read-streams": "^0.1.0", - "through2": "^0.6.1", - "unique-stream": "^1.0.0" + "glob": "4.5.3", + "glob2base": "0.0.12", + "minimatch": "2.0.10", + "ordered-read-streams": "0.1.0", + "through2": "0.6.5", + "unique-stream": "1.0.0" }, "dependencies": { "glob": { @@ -3496,10 +3537,10 @@ "integrity": "sha1-xstz0yJsHv7wTePFbQEvAzd+4V8=", "dev": true, "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^2.0.1", - "once": "^1.3.0" + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "2.0.10", + "once": "1.4.0" } }, "isarray": { @@ -3514,7 +3555,7 @@ "integrity": "sha1-jQh8OcazjAAbl/ynzm0OHoCvusc=", "dev": true, "requires": { - "brace-expansion": "^1.0.0" + "brace-expansion": "1.1.11" } }, "readable-stream": { @@ -3523,10 +3564,10 @@ "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", "dev": true, "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", + "core-util-is": "1.0.2", + "inherits": "2.0.3", "isarray": "0.0.1", - "string_decoder": "~0.10.x" + "string_decoder": "0.10.31" } }, "string_decoder": { @@ -3541,8 +3582,8 @@ "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", "dev": true, "requires": { - "readable-stream": ">=1.0.33-1 <1.1.0-0", - "xtend": ">=4.0.0 <4.1.0-0" + "readable-stream": "1.0.34", + "xtend": "4.0.1" } } } @@ -3553,7 +3594,7 @@ "integrity": "sha1-uVtKjfdLOcgymLDAXJeLTZo7cQs=", "dev": true, "requires": { - "gaze": "^0.5.1" + "gaze": "0.5.2" } }, "glob2base": { @@ -3562,7 +3603,7 @@ "integrity": "sha1-nUGbPijxLoOjYhZKJ3BVkiycDVY=", "dev": true, "requires": { - "find-index": "^0.1.1" + "find-index": "0.1.1" } }, "global-modules": { @@ -3571,9 +3612,9 @@ "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", "dev": true, "requires": { - "global-prefix": "^1.0.1", - "is-windows": "^1.0.1", - "resolve-dir": "^1.0.0" + "global-prefix": "1.0.2", + "is-windows": "1.0.2", + "resolve-dir": "1.0.1" } }, "global-modules-path": { @@ -3588,11 +3629,11 @@ "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", "dev": true, "requires": { - "expand-tilde": "^2.0.2", - "homedir-polyfill": "^1.0.1", - "ini": "^1.3.4", - "is-windows": "^1.0.1", - "which": "^1.2.14" + "expand-tilde": "2.0.2", + "homedir-polyfill": "1.0.1", + "ini": "1.3.5", + "is-windows": "1.0.2", + "which": "1.3.1" } }, "globals": { @@ -3607,12 +3648,12 @@ "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", "dev": true, "requires": { - "array-union": "^1.0.1", - "arrify": "^1.0.0", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" + "array-union": "1.0.2", + "arrify": "1.0.1", + "glob": "7.1.2", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" }, "dependencies": { "pify": { @@ -3629,9 +3670,9 @@ "integrity": "sha1-2cjt3h2nnRJaFRt5UzuXhnY0auU=", "dev": true, "requires": { - "glob": "~3.1.21", - "lodash": "~1.0.1", - "minimatch": "~0.2.11" + "glob": "3.1.21", + "lodash": "1.0.2", + "minimatch": "0.2.14" }, "dependencies": { "glob": { @@ -3640,9 +3681,9 @@ "integrity": "sha1-0p4KBV3qUTj00H7UDomC6DwgZs0=", "dev": true, "requires": { - "graceful-fs": "~1.2.0", - "inherits": "1", - "minimatch": "~0.2.11" + "graceful-fs": "1.2.3", + "inherits": "1.0.2", + "minimatch": "0.2.14" } }, "graceful-fs": { @@ -3675,8 +3716,8 @@ "integrity": "sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=", "dev": true, "requires": { - "lru-cache": "2", - "sigmund": "~1.0.0" + "lru-cache": "2.7.3", + "sigmund": "1.0.1" } } } @@ -3687,7 +3728,7 @@ "integrity": "sha512-ynYqXLoluBKf9XGR1gA59yEJisIL7YHEH4xr3ZziHB5/yl4qWfaK8Js9jGe6gBGCSCKVqiyO30WnRZADvemUNw==", "dev": true, "requires": { - "sparkles": "^1.0.0" + "sparkles": "1.0.1" } }, "graceful-fs": { @@ -3702,19 +3743,19 @@ "integrity": "sha1-VxzkWSjdQK9lFPxAEYZgFsE4RbQ=", "dev": true, "requires": { - "archy": "^1.0.0", - "chalk": "^1.0.0", - "deprecated": "^0.0.1", - "gulp-util": "^3.0.0", - "interpret": "^1.0.0", - "liftoff": "^2.1.0", - "minimist": "^1.1.0", - "orchestrator": "^0.3.0", - "pretty-hrtime": "^1.0.0", - "semver": "^4.1.0", - "tildify": "^1.0.0", - "v8flags": "^2.0.2", - "vinyl-fs": "^0.3.0" + "archy": "1.0.0", + "chalk": "1.1.3", + "deprecated": "0.0.1", + "gulp-util": "3.0.8", + "interpret": "1.1.0", + "liftoff": "2.5.0", + "minimist": "1.2.0", + "orchestrator": "0.3.8", + "pretty-hrtime": "1.0.3", + "semver": "4.3.6", + "tildify": "1.2.0", + "v8flags": "2.1.1", + "vinyl-fs": "0.3.14" }, "dependencies": { "minimist": { @@ -3737,24 +3778,24 @@ "integrity": "sha1-AFTh50RQLifATBh8PsxQXdVLu08=", "dev": true, "requires": { - "array-differ": "^1.0.0", - "array-uniq": "^1.0.2", - "beeper": "^1.0.0", - "chalk": "^1.0.0", - "dateformat": "^2.0.0", - "fancy-log": "^1.1.0", - "gulplog": "^1.0.0", - "has-gulplog": "^0.1.0", - "lodash._reescape": "^3.0.0", - "lodash._reevaluate": "^3.0.0", - "lodash._reinterpolate": "^3.0.0", - "lodash.template": "^3.0.0", - "minimist": "^1.1.0", - "multipipe": "^0.1.2", - "object-assign": "^3.0.0", + "array-differ": "1.0.0", + "array-uniq": "1.0.3", + "beeper": "1.1.1", + "chalk": "1.1.3", + "dateformat": "2.2.0", + "fancy-log": "1.3.2", + "gulplog": "1.0.0", + "has-gulplog": "0.1.0", + "lodash._reescape": "3.0.0", + "lodash._reevaluate": "3.0.0", + "lodash._reinterpolate": "3.0.0", + "lodash.template": "3.6.2", + "minimist": "1.2.0", + "multipipe": "0.1.2", + "object-assign": "3.0.0", "replace-ext": "0.0.1", - "through2": "^2.0.0", - "vinyl": "^0.5.0" + "through2": "2.0.3", + "vinyl": "0.5.3" }, "dependencies": { "minimist": { @@ -3777,7 +3818,7 @@ "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=", "dev": true, "requires": { - "glogg": "^1.0.0" + "glogg": "1.0.1" } }, "has-ansi": { @@ -3786,7 +3827,7 @@ "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "ansi-regex": "2.1.1" } }, "has-flag": { @@ -3801,7 +3842,7 @@ "integrity": "sha1-ZBTIKRNpfaUVkDl9r7EvIpZ4Ec4=", "dev": true, "requires": { - "sparkles": "^1.0.0" + "sparkles": "1.0.1" } }, "has-value": { @@ -3810,9 +3851,9 @@ "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", "dev": true, "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" + "get-value": "2.0.6", + "has-values": "1.0.0", + "isobject": "3.0.1" } }, "has-values": { @@ -3821,8 +3862,8 @@ "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", "dev": true, "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" + "is-number": "3.0.0", + "kind-of": "4.0.0" }, "dependencies": { "kind-of": { @@ -3831,7 +3872,7 @@ "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", "dev": true, "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -3842,8 +3883,8 @@ "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", "dev": true, "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "inherits": "2.0.3", + "safe-buffer": "5.1.2" } }, "hash.js": { @@ -3852,8 +3893,8 @@ "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", "dev": true, "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.0" + "inherits": "2.0.3", + "minimalistic-assert": "1.0.1" } }, "hmac-drbg": { @@ -3862,9 +3903,9 @@ "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", "dev": true, "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" + "hash.js": "1.1.3", + "minimalistic-assert": "1.0.1", + "minimalistic-crypto-utils": "1.0.1" } }, "home-or-tmp": { @@ -3873,8 +3914,8 @@ "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", "dev": true, "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.1" + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" } }, "homedir-polyfill": { @@ -3883,7 +3924,7 @@ "integrity": "sha1-TCu8inWJmP7r9e1oWA921GdotLw=", "dev": true, "requires": { - "parse-passwd": "^1.0.0" + "parse-passwd": "1.0.0" } }, "https-browserify": { @@ -3898,7 +3939,7 @@ "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", "dev": true, "requires": { - "safer-buffer": ">= 2.1.2 < 3" + "safer-buffer": "2.1.2" } }, "ieee754": { @@ -3925,8 +3966,8 @@ "integrity": "sha512-vAaZHieK9qjGo58agRBg+bhHX3hoTZU/Oa3GESWLz7t1U62fk63aHuDJJEteXoDeTCcPmUT+z38gkHPZkkmpmQ==", "dev": true, "requires": { - "pkg-dir": "^2.0.0", - "resolve-cwd": "^2.0.0" + "pkg-dir": "2.0.0", + "resolve-cwd": "2.0.0" } }, "imurmurhash": { @@ -3947,8 +3988,8 @@ "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, "requires": { - "once": "^1.3.0", - "wrappy": "1" + "once": "1.4.0", + "wrappy": "1.0.2" } }, "inherits": { @@ -3969,20 +4010,20 @@ "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", "dev": true, "requires": { - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.0", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^2.0.4", - "figures": "^2.0.0", - "lodash": "^4.3.0", + "ansi-escapes": "3.1.0", + "chalk": "2.4.1", + "cli-cursor": "2.1.0", + "cli-width": "2.2.0", + "external-editor": "2.2.0", + "figures": "2.0.0", + "lodash": "4.17.10", "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rx-lite": "^4.0.8", - "rx-lite-aggregates": "^4.0.8", - "string-width": "^2.1.0", - "strip-ansi": "^4.0.0", - "through": "^2.3.6" + "run-async": "2.3.0", + "rx-lite": "4.0.8", + "rx-lite-aggregates": "4.0.8", + "string-width": "2.1.1", + "strip-ansi": "4.0.0", + "through": "2.3.8" }, "dependencies": { "ansi-regex": { @@ -3997,7 +4038,7 @@ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { - "color-convert": "^1.9.0" + "color-convert": "1.9.1" } }, "chalk": { @@ -4006,9 +4047,9 @@ "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" } }, "strip-ansi": { @@ -4017,7 +4058,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "3.0.0" } }, "supports-color": { @@ -4026,7 +4067,7 @@ "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "has-flag": "3.0.0" } } } @@ -4043,7 +4084,7 @@ "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", "dev": true, "requires": { - "loose-envify": "^1.0.0" + "loose-envify": "1.3.1" } }, "invert-kv": { @@ -4058,8 +4099,8 @@ "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", "dev": true, "requires": { - "is-relative": "^1.0.0", - "is-windows": "^1.0.1" + "is-relative": "1.0.0", + "is-windows": "1.0.2" } }, "is-accessor-descriptor": { @@ -4068,7 +4109,7 @@ "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", "dev": true, "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" }, "dependencies": { "kind-of": { @@ -4077,7 +4118,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -4088,7 +4129,7 @@ "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", "dev": true, "requires": { - "binary-extensions": "^1.0.0" + "binary-extensions": "1.11.0" } }, "is-buffer": { @@ -4103,7 +4144,7 @@ "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", "dev": true, "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" }, "dependencies": { "kind-of": { @@ -4112,7 +4153,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -4123,9 +4164,9 @@ "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", "dev": true, "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" }, "dependencies": { "kind-of": { @@ -4154,7 +4195,7 @@ "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", "dev": true, "requires": { - "number-is-nan": "^1.0.0" + "number-is-nan": "1.0.1" } }, "is-fullwidth-code-point": { @@ -4169,7 +4210,7 @@ "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", "dev": true, "requires": { - "is-extglob": "^2.1.1" + "is-extglob": "2.1.1" } }, "is-number": { @@ -4178,7 +4219,7 @@ "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "dev": true, "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" }, "dependencies": { "kind-of": { @@ -4187,7 +4228,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -4198,7 +4239,7 @@ "integrity": "sha512-OTiixgpZAT1M4NHgS5IguFp/Vz2VI3U7Goh4/HA1adtwyLtSBrxYlcSYkhpAE07s4fKEcjrFxyvtQBND4vFQyQ==", "dev": true, "requires": { - "is-number": "^4.0.0" + "is-number": "4.0.0" }, "dependencies": { "is-number": { @@ -4221,7 +4262,7 @@ "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", "dev": true, "requires": { - "is-path-inside": "^1.0.0" + "is-path-inside": "1.0.1" } }, "is-path-inside": { @@ -4230,7 +4271,7 @@ "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", "dev": true, "requires": { - "path-is-inside": "^1.0.1" + "path-is-inside": "1.0.2" } }, "is-plain-object": { @@ -4239,7 +4280,7 @@ "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "dev": true, "requires": { - "isobject": "^3.0.1" + "isobject": "3.0.1" } }, "is-promise": { @@ -4254,7 +4295,7 @@ "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", "dev": true, "requires": { - "is-unc-path": "^1.0.0" + "is-unc-path": "1.0.0" } }, "is-resolvable": { @@ -4275,7 +4316,7 @@ "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", "dev": true, "requires": { - "unc-path-regex": "^0.1.2" + "unc-path-regex": "0.1.2" } }, "is-utf8": { @@ -4320,8 +4361,8 @@ "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", "dev": true, "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "argparse": "1.0.10", + "esprima": "4.0.0" } }, "jsesc": { @@ -4366,7 +4407,7 @@ "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", "dev": true, "requires": { - "invert-kv": "^1.0.0" + "invert-kv": "1.0.0" } }, "leb": { @@ -4381,8 +4422,8 @@ "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", "dev": true, "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" + "prelude-ls": "1.1.2", + "type-check": "0.3.2" } }, "liftoff": { @@ -4391,14 +4432,14 @@ "integrity": "sha1-IAkpG7Mc6oYbvxCnwVooyvdcMew=", "dev": true, "requires": { - "extend": "^3.0.0", - "findup-sync": "^2.0.0", - "fined": "^1.0.1", - "flagged-respawn": "^1.0.0", - "is-plain-object": "^2.0.4", - "object.map": "^1.0.0", - "rechoir": "^0.6.2", - "resolve": "^1.1.7" + "extend": "3.0.1", + "findup-sync": "2.0.0", + "fined": "1.1.0", + "flagged-respawn": "1.0.0", + "is-plain-object": "2.0.4", + "object.map": "1.0.1", + "rechoir": "0.6.2", + "resolve": "1.7.1" } }, "loader-runner": { @@ -4413,9 +4454,9 @@ "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", "dev": true, "requires": { - "big.js": "^3.1.3", - "emojis-list": "^2.0.0", - "json5": "^0.5.0" + "big.js": "3.2.0", + "emojis-list": "2.1.0", + "json5": "0.5.1" } }, "locate-path": { @@ -4424,8 +4465,8 @@ "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", "dev": true, "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" + "p-locate": "2.0.0", + "path-exists": "3.0.0" } }, "lodash": { @@ -4494,7 +4535,7 @@ "integrity": "sha1-mV7g3BjBtIzJLv+ucaEKq1tIdpg=", "dev": true, "requires": { - "lodash._root": "^3.0.0" + "lodash._root": "3.0.1" } }, "lodash.isarguments": { @@ -4515,9 +4556,9 @@ "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", "dev": true, "requires": { - "lodash._getnative": "^3.0.0", - "lodash.isarguments": "^3.0.0", - "lodash.isarray": "^3.0.0" + "lodash._getnative": "3.9.1", + "lodash.isarguments": "3.1.0", + "lodash.isarray": "3.0.4" } }, "lodash.restparam": { @@ -4532,15 +4573,15 @@ "integrity": "sha1-+M3sxhaaJVvpCYrosMU9N4kx0U8=", "dev": true, "requires": { - "lodash._basecopy": "^3.0.0", - "lodash._basetostring": "^3.0.0", - "lodash._basevalues": "^3.0.0", - "lodash._isiterateecall": "^3.0.0", - "lodash._reinterpolate": "^3.0.0", - "lodash.escape": "^3.0.0", - "lodash.keys": "^3.0.0", - "lodash.restparam": "^3.0.0", - "lodash.templatesettings": "^3.0.0" + "lodash._basecopy": "3.0.1", + "lodash._basetostring": "3.0.1", + "lodash._basevalues": "3.0.0", + "lodash._isiterateecall": "3.0.9", + "lodash._reinterpolate": "3.0.0", + "lodash.escape": "3.2.0", + "lodash.keys": "3.1.2", + "lodash.restparam": "3.6.1", + "lodash.templatesettings": "3.1.1" } }, "lodash.templatesettings": { @@ -4549,8 +4590,8 @@ "integrity": "sha1-+zB4RHU7Zrnxr6VOJix0UwfbqOU=", "dev": true, "requires": { - "lodash._reinterpolate": "^3.0.0", - "lodash.escape": "^3.0.0" + "lodash._reinterpolate": "3.0.0", + "lodash.escape": "3.2.0" } }, "long": { @@ -4565,7 +4606,7 @@ "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", "dev": true, "requires": { - "js-tokens": "^3.0.0" + "js-tokens": "3.0.2" } }, "lru-cache": { @@ -4574,8 +4615,8 @@ "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", "dev": true, "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" + "pseudomap": "1.0.2", + "yallist": "2.1.2" } }, "make-dir": { @@ -4584,7 +4625,7 @@ "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", "dev": true, "requires": { - "pify": "^3.0.0" + "pify": "3.0.0" } }, "make-iterator": { @@ -4593,7 +4634,7 @@ "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", "dev": true, "requires": { - "kind-of": "^6.0.2" + "kind-of": "6.0.2" } }, "mamacro": { @@ -4614,7 +4655,7 @@ "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", "dev": true, "requires": { - "object-visit": "^1.0.0" + "object-visit": "1.0.1" } }, "md5.js": { @@ -4623,8 +4664,8 @@ "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=", "dev": true, "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" + "hash-base": "3.0.4", + "inherits": "2.0.3" } }, "mem": { @@ -4633,7 +4674,7 @@ "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", "dev": true, "requires": { - "mimic-fn": "^1.0.0" + "mimic-fn": "1.2.0" } }, "memory-fs": { @@ -4642,8 +4683,8 @@ "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", "dev": true, "requires": { - "errno": "^0.1.3", - "readable-stream": "^2.0.1" + "errno": "0.1.7", + "readable-stream": "2.3.6" } }, "micromatch": { @@ -4652,19 +4693,19 @@ "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", "dev": true, "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "braces": "2.3.2", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "extglob": "2.0.4", + "fragment-cache": "0.2.1", + "kind-of": "6.0.2", + "nanomatch": "1.2.9", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" } }, "miller-rabin": { @@ -4673,8 +4714,8 @@ "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", "dev": true, "requires": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" + "bn.js": "4.11.8", + "brorand": "1.1.0" } }, "mimic-fn": { @@ -4701,7 +4742,7 @@ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "requires": { - "brace-expansion": "^1.1.7" + "brace-expansion": "1.1.11" } }, "minimist": { @@ -4716,16 +4757,16 @@ "integrity": "sha512-zHo8v+otD1J10j/tC+VNoGK9keCuByhKovAvdn74dmxJl9+mWHnx6EMsDN4lgRoMI/eYo2nchAxniIbUPb5onw==", "dev": true, "requires": { - "concat-stream": "^1.5.0", - "duplexify": "^3.4.2", - "end-of-stream": "^1.1.0", - "flush-write-stream": "^1.0.0", - "from2": "^2.1.0", - "parallel-transform": "^1.1.0", - "pump": "^2.0.1", - "pumpify": "^1.3.3", - "stream-each": "^1.1.0", - "through2": "^2.0.0" + "concat-stream": "1.6.2", + "duplexify": "3.6.0", + "end-of-stream": "1.4.1", + "flush-write-stream": "1.0.3", + "from2": "2.3.0", + "parallel-transform": "1.1.0", + "pump": "2.0.1", + "pumpify": "1.5.1", + "stream-each": "1.2.2", + "through2": "2.0.3" } }, "mixin-deep": { @@ -4734,8 +4775,8 @@ "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", "dev": true, "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" + "for-in": "1.0.2", + "is-extendable": "1.0.1" }, "dependencies": { "is-extendable": { @@ -4744,7 +4785,7 @@ "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "dev": true, "requires": { - "is-plain-object": "^2.0.4" + "is-plain-object": "2.0.4" } } } @@ -4764,12 +4805,12 @@ "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", "dev": true, "requires": { - "aproba": "^1.1.1", - "copy-concurrently": "^1.0.0", - "fs-write-stream-atomic": "^1.0.8", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", - "run-queue": "^1.0.3" + "aproba": "1.2.0", + "copy-concurrently": "1.0.5", + "fs-write-stream-atomic": "1.0.10", + "mkdirp": "0.5.1", + "rimraf": "2.6.2", + "run-queue": "1.0.3" } }, "ms": { @@ -4806,18 +4847,18 @@ "integrity": "sha512-n8R9bS8yQ6eSXaV6jHUpKzD8gLsin02w1HSFiegwrs9E098Ylhw5jdyKPaYqvHknHaSCKTPp7C8dGCQ0q9koXA==", "dev": true, "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-odd": "^2.0.0", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "fragment-cache": "0.2.1", + "is-odd": "2.0.0", + "is-windows": "1.0.2", + "kind-of": "6.0.2", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" } }, "natives": { @@ -4850,28 +4891,28 @@ "integrity": "sha512-5AzFzdoIMb89hBGMZglEegffzgRg+ZFoUmisQ8HI4j1KDdpx13J0taNp2y9xPbur6W61gepGDDotGBVQ7mfUCg==", "dev": true, "requires": { - "assert": "^1.1.1", - "browserify-zlib": "^0.2.0", - "buffer": "^4.3.0", - "console-browserify": "^1.1.0", - "constants-browserify": "^1.0.0", - "crypto-browserify": "^3.11.0", - "domain-browser": "^1.1.1", - "events": "^1.0.0", - "https-browserify": "^1.0.0", - "os-browserify": "^0.3.0", + "assert": "1.4.1", + "browserify-zlib": "0.2.0", + "buffer": "4.9.1", + "console-browserify": "1.1.0", + "constants-browserify": "1.0.0", + "crypto-browserify": "3.12.0", + "domain-browser": "1.2.0", + "events": "1.1.1", + "https-browserify": "1.0.0", + "os-browserify": "0.3.0", "path-browserify": "0.0.0", - "process": "^0.11.10", - "punycode": "^1.2.4", - "querystring-es3": "^0.2.0", - "readable-stream": "^2.3.3", - "stream-browserify": "^2.0.1", - "stream-http": "^2.7.2", - "string_decoder": "^1.0.0", - "timers-browserify": "^2.0.4", + "process": "0.11.10", + "punycode": "1.4.1", + "querystring-es3": "0.2.1", + "readable-stream": "2.3.6", + "stream-browserify": "2.0.1", + "stream-http": "2.8.3", + "string_decoder": "1.1.1", + "timers-browserify": "2.0.10", "tty-browserify": "0.0.0", - "url": "^0.11.0", - "util": "^0.10.3", + "url": "0.11.0", + "util": "0.10.4", "vm-browserify": "0.0.4" }, "dependencies": { @@ -4889,7 +4930,7 @@ "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", "dev": true, "requires": { - "remove-trailing-separator": "^1.0.1" + "remove-trailing-separator": "1.1.0" } }, "npm-run-path": { @@ -4898,7 +4939,7 @@ "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", "dev": true, "requires": { - "path-key": "^2.0.0" + "path-key": "2.0.1" } }, "number-is-nan": { @@ -4919,9 +4960,9 @@ "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", "dev": true, "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" + "copy-descriptor": "0.1.1", + "define-property": "0.2.5", + "kind-of": "3.2.2" }, "dependencies": { "define-property": { @@ -4930,7 +4971,7 @@ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "dev": true, "requires": { - "is-descriptor": "^0.1.0" + "is-descriptor": "0.1.6" } }, "kind-of": { @@ -4939,7 +4980,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -4950,7 +4991,7 @@ "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", "dev": true, "requires": { - "isobject": "^3.0.0" + "isobject": "3.0.1" } }, "object.defaults": { @@ -4959,10 +5000,10 @@ "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=", "dev": true, "requires": { - "array-each": "^1.0.1", - "array-slice": "^1.0.0", - "for-own": "^1.0.0", - "isobject": "^3.0.0" + "array-each": "1.0.1", + "array-slice": "1.1.0", + "for-own": "1.0.0", + "isobject": "3.0.1" } }, "object.map": { @@ -4971,8 +5012,8 @@ "integrity": "sha1-z4Plncj8wK1fQlDh94s7gb2AHTc=", "dev": true, "requires": { - "for-own": "^1.0.0", - "make-iterator": "^1.0.0" + "for-own": "1.0.0", + "make-iterator": "1.0.1" } }, "object.pick": { @@ -4981,7 +5022,7 @@ "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", "dev": true, "requires": { - "isobject": "^3.0.1" + "isobject": "3.0.1" } }, "once": { @@ -4990,7 +5031,7 @@ "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "requires": { - "wrappy": "1" + "wrappy": "1.0.2" } }, "onetime": { @@ -4999,7 +5040,7 @@ "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", "dev": true, "requires": { - "mimic-fn": "^1.0.0" + "mimic-fn": "1.2.0" } }, "optionator": { @@ -5008,12 +5049,12 @@ "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", "dev": true, "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.4", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "wordwrap": "~1.0.0" + "deep-is": "0.1.3", + "fast-levenshtein": "2.0.6", + "levn": "0.3.0", + "prelude-ls": "1.1.2", + "type-check": "0.3.2", + "wordwrap": "1.0.0" } }, "orchestrator": { @@ -5022,9 +5063,9 @@ "integrity": "sha1-FOfp4nZPcxX7rBhOUGx6pt+UrX4=", "dev": true, "requires": { - "end-of-stream": "~0.1.5", - "sequencify": "~0.0.7", - "stream-consume": "~0.1.0" + "end-of-stream": "0.1.5", + "sequencify": "0.0.7", + "stream-consume": "0.1.1" }, "dependencies": { "end-of-stream": { @@ -5033,7 +5074,7 @@ "integrity": "sha1-jhdyBsPICDfYVjLouTWd/osvbq8=", "dev": true, "requires": { - "once": "~1.3.0" + "once": "1.3.3" } }, "once": { @@ -5042,7 +5083,7 @@ "integrity": "sha1-suJhVXzkwxTsgwTz+oJmPkKXyiA=", "dev": true, "requires": { - "wrappy": "1" + "wrappy": "1.0.2" } } } @@ -5071,9 +5112,9 @@ "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", "dev": true, "requires": { - "execa": "^0.7.0", - "lcid": "^1.0.0", - "mem": "^1.1.0" + "execa": "0.7.0", + "lcid": "1.0.0", + "mem": "1.1.0" } }, "os-tmpdir": { @@ -5094,7 +5135,7 @@ "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", "dev": true, "requires": { - "p-try": "^1.0.0" + "p-try": "1.0.0" } }, "p-locate": { @@ -5103,7 +5144,7 @@ "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", "dev": true, "requires": { - "p-limit": "^1.1.0" + "p-limit": "1.3.0" } }, "p-try": { @@ -5124,9 +5165,9 @@ "integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=", "dev": true, "requires": { - "cyclist": "~0.2.2", - "inherits": "^2.0.3", - "readable-stream": "^2.1.5" + "cyclist": "0.2.2", + "inherits": "2.0.3", + "readable-stream": "2.3.6" } }, "parse-asn1": { @@ -5135,11 +5176,11 @@ "integrity": "sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==", "dev": true, "requires": { - "asn1.js": "^4.0.0", - "browserify-aes": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3" + "asn1.js": "4.10.1", + "browserify-aes": "1.2.0", + "create-hash": "1.2.0", + "evp_bytestokey": "1.0.3", + "pbkdf2": "3.0.16" } }, "parse-filepath": { @@ -5148,9 +5189,9 @@ "integrity": "sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE=", "dev": true, "requires": { - "is-absolute": "^1.0.0", - "map-cache": "^0.2.0", - "path-root": "^0.1.1" + "is-absolute": "1.0.0", + "map-cache": "0.2.2", + "path-root": "0.1.1" } }, "parse-passwd": { @@ -5213,7 +5254,7 @@ "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=", "dev": true, "requires": { - "path-root-regex": "^0.1.0" + "path-root-regex": "0.1.2" } }, "path-root-regex": { @@ -5228,11 +5269,11 @@ "integrity": "sha512-y4CXP3thSxqf7c0qmOF+9UeOTrifiVTIM+u7NWlq+PRsHbr7r7dpCmvzrZxa96JJUNi0Y5w9VqG5ZNeCVMoDcA==", "dev": true, "requires": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" + "create-hash": "1.2.0", + "create-hmac": "1.1.7", + "ripemd160": "2.0.2", + "safe-buffer": "5.1.2", + "sha.js": "2.4.11" } }, "pify": { @@ -5253,7 +5294,7 @@ "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "dev": true, "requires": { - "pinkie": "^2.0.0" + "pinkie": "2.0.4" } }, "pkg-dir": { @@ -5262,7 +5303,7 @@ "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", "dev": true, "requires": { - "find-up": "^2.1.0" + "find-up": "2.1.0" } }, "pluralize": { @@ -5337,11 +5378,11 @@ "integrity": "sha512-4kJ5Esocg8X3h8YgJsKAuoesBgB7mqH3eowiDzMUPKiRDDE7E/BqqZD1hnTByIaAFiwAw246YEltSq7tdrOH0Q==", "dev": true, "requires": { - "bn.js": "^4.1.0", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1" + "bn.js": "4.11.8", + "browserify-rsa": "4.0.1", + "create-hash": "1.2.0", + "parse-asn1": "5.1.1", + "randombytes": "2.0.6" } }, "pump": { @@ -5350,8 +5391,8 @@ "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", "dev": true, "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" + "end-of-stream": "1.4.1", + "once": "1.4.0" } }, "pumpify": { @@ -5360,9 +5401,9 @@ "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", "dev": true, "requires": { - "duplexify": "^3.6.0", - "inherits": "^2.0.3", - "pump": "^2.0.0" + "duplexify": "3.6.0", + "inherits": "2.0.3", + "pump": "2.0.1" } }, "punycode": { @@ -5389,7 +5430,7 @@ "integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==", "dev": true, "requires": { - "safe-buffer": "^5.1.0" + "safe-buffer": "5.1.2" } }, "randomfill": { @@ -5398,8 +5439,8 @@ "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", "dev": true, "requires": { - "randombytes": "^2.0.5", - "safe-buffer": "^5.1.0" + "randombytes": "2.0.6", + "safe-buffer": "5.1.2" } }, "readable-stream": { @@ -5408,13 +5449,13 @@ "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.2", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" } }, "readdirp": { @@ -5423,10 +5464,10 @@ "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "minimatch": "^3.0.2", - "readable-stream": "^2.0.2", - "set-immediate-shim": "^1.0.1" + "graceful-fs": "4.1.11", + "minimatch": "3.0.4", + "readable-stream": "2.3.6", + "set-immediate-shim": "1.0.1" } }, "rechoir": { @@ -5435,7 +5476,7 @@ "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", "dev": true, "requires": { - "resolve": "^1.1.6" + "resolve": "1.7.1" } }, "regenerate": { @@ -5456,9 +5497,9 @@ "integrity": "sha512-PJepbvDbuK1xgIgnau7Y90cwaAmO/LCLMI2mPvaXq2heGMR3aWW5/BQvYrhJ8jgmQjXewXvBjzfqKcVOmhjZ6Q==", "dev": true, "requires": { - "babel-runtime": "^6.18.0", - "babel-types": "^6.19.0", - "private": "^0.1.6" + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "private": "0.1.8" } }, "regex-not": { @@ -5467,8 +5508,8 @@ "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", "dev": true, "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" + "extend-shallow": "3.0.2", + "safe-regex": "1.1.0" } }, "regexpp": { @@ -5483,9 +5524,9 @@ "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", "dev": true, "requires": { - "regenerate": "^1.2.1", - "regjsgen": "^0.2.0", - "regjsparser": "^0.1.4" + "regenerate": "1.4.0", + "regjsgen": "0.2.0", + "regjsparser": "0.1.5" } }, "regjsgen": { @@ -5500,7 +5541,7 @@ "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", "dev": true, "requires": { - "jsesc": "~0.5.0" + "jsesc": "0.5.0" }, "dependencies": { "jsesc": { @@ -5535,7 +5576,7 @@ "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", "dev": true, "requires": { - "is-finite": "^1.0.0" + "is-finite": "1.0.2" } }, "replace-ext": { @@ -5562,8 +5603,8 @@ "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", "dev": true, "requires": { - "caller-path": "^0.1.0", - "resolve-from": "^1.0.0" + "caller-path": "0.1.0", + "resolve-from": "1.0.1" } }, "resolve": { @@ -5572,7 +5613,7 @@ "integrity": "sha512-c7rwLofp8g1U+h1KNyHL/jicrKg1Ek4q+Lr33AL65uZTinUZHe30D5HlyN5V9NW0JX1D5dXQ4jqW5l7Sy/kGfw==", "dev": true, "requires": { - "path-parse": "^1.0.5" + "path-parse": "1.0.5" } }, "resolve-cwd": { @@ -5581,7 +5622,7 @@ "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", "dev": true, "requires": { - "resolve-from": "^3.0.0" + "resolve-from": "3.0.0" }, "dependencies": { "resolve-from": { @@ -5598,8 +5639,8 @@ "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", "dev": true, "requires": { - "expand-tilde": "^2.0.0", - "global-modules": "^1.0.0" + "expand-tilde": "2.0.2", + "global-modules": "1.0.0" } }, "resolve-from": { @@ -5620,8 +5661,8 @@ "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", "dev": true, "requires": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" + "onetime": "2.0.1", + "signal-exit": "3.0.2" } }, "ret": { @@ -5636,7 +5677,7 @@ "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", "dev": true, "requires": { - "glob": "^7.0.5" + "glob": "7.1.2" } }, "ripemd160": { @@ -5645,8 +5686,8 @@ "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", "dev": true, "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" + "hash-base": "3.0.4", + "inherits": "2.0.3" } }, "run-async": { @@ -5655,7 +5696,7 @@ "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", "dev": true, "requires": { - "is-promise": "^2.1.0" + "is-promise": "2.1.0" } }, "run-queue": { @@ -5664,7 +5705,7 @@ "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", "dev": true, "requires": { - "aproba": "^1.1.1" + "aproba": "1.2.0" } }, "rx-lite": { @@ -5679,7 +5720,7 @@ "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", "dev": true, "requires": { - "rx-lite": "*" + "rx-lite": "4.0.8" } }, "rxjs": { @@ -5688,7 +5729,7 @@ "integrity": "sha512-qBzf5uu6eOKiCZuAE0SgZ0/Qp+l54oeVxFfC2t+mJ2SFI6IB8gmMdJHs5DUMu5kqifqcCtsKS2XHjhZu6RKvAw==", "dev": true, "requires": { - "tslib": "^1.9.0" + "tslib": "1.9.2" } }, "safe-buffer": { @@ -5703,7 +5744,7 @@ "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", "dev": true, "requires": { - "ret": "~0.1.10" + "ret": "0.1.15" } }, "safer-buffer": { @@ -5718,8 +5759,8 @@ "integrity": "sha512-yYrjb9TX2k/J1Y5UNy3KYdZq10xhYcF8nMpAW6o3hy6Q8WSIEf9lJHG/ePnOBfziPM3fvQwfOwa13U/Fh8qTfA==", "dev": true, "requires": { - "ajv": "^6.1.0", - "ajv-keywords": "^3.1.0" + "ajv": "6.5.0", + "ajv-keywords": "3.2.0" } }, "semver": { @@ -5758,10 +5799,10 @@ "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", "dev": true, "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" + "extend-shallow": "2.0.1", + "is-extendable": "0.1.1", + "is-plain-object": "2.0.4", + "split-string": "3.1.0" }, "dependencies": { "extend-shallow": { @@ -5770,7 +5811,7 @@ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } } } @@ -5787,8 +5828,8 @@ "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", "dev": true, "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "inherits": "2.0.3", + "safe-buffer": "5.1.2" } }, "shebang-command": { @@ -5797,7 +5838,7 @@ "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", "dev": true, "requires": { - "shebang-regex": "^1.0.0" + "shebang-regex": "1.0.0" } }, "shebang-regex": { @@ -5830,7 +5871,7 @@ "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0" + "is-fullwidth-code-point": "2.0.0" } }, "snapdragon": { @@ -5839,14 +5880,14 @@ "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", "dev": true, "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" + "base": "0.11.2", + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "map-cache": "0.2.2", + "source-map": "0.5.7", + "source-map-resolve": "0.5.2", + "use": "3.1.0" }, "dependencies": { "debug": { @@ -5864,7 +5905,7 @@ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "dev": true, "requires": { - "is-descriptor": "^0.1.0" + "is-descriptor": "0.1.6" } }, "extend-shallow": { @@ -5873,7 +5914,7 @@ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } } } @@ -5884,9 +5925,9 @@ "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", "dev": true, "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" + "define-property": "1.0.0", + "isobject": "3.0.1", + "snapdragon-util": "3.0.1" }, "dependencies": { "define-property": { @@ -5895,7 +5936,7 @@ "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "dev": true, "requires": { - "is-descriptor": "^1.0.0" + "is-descriptor": "1.0.2" } }, "is-accessor-descriptor": { @@ -5904,7 +5945,7 @@ "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "dev": true, "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-data-descriptor": { @@ -5913,7 +5954,7 @@ "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "dev": true, "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-descriptor": { @@ -5922,9 +5963,9 @@ "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "dev": true, "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" } } } @@ -5935,7 +5976,7 @@ "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", "dev": true, "requires": { - "kind-of": "^3.2.0" + "kind-of": "3.2.2" }, "dependencies": { "kind-of": { @@ -5944,7 +5985,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -5967,11 +6008,11 @@ "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", "dev": true, "requires": { - "atob": "^2.1.1", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" + "atob": "2.1.1", + "decode-uri-component": "0.2.0", + "resolve-url": "0.2.1", + "source-map-url": "0.4.0", + "urix": "0.1.0" } }, "source-map-support": { @@ -5980,7 +6021,7 @@ "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", "dev": true, "requires": { - "source-map": "^0.5.6" + "source-map": "0.5.7" } }, "source-map-url": { @@ -6001,7 +6042,7 @@ "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", "dev": true, "requires": { - "extend-shallow": "^3.0.0" + "extend-shallow": "3.0.2" } }, "sprintf-js": { @@ -6016,7 +6057,7 @@ "integrity": "sha512-XRSIPqLij52MtgoQavH/x/dU1qVKtWUAAZeOHsR9c2Ddi4XerFy3mc1alf+dLJKl9EUIm/Ht+EowFkTUOA6GAQ==", "dev": true, "requires": { - "safe-buffer": "^5.1.1" + "safe-buffer": "5.1.2" } }, "static-extend": { @@ -6025,8 +6066,8 @@ "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", "dev": true, "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" + "define-property": "0.2.5", + "object-copy": "0.1.0" }, "dependencies": { "define-property": { @@ -6035,7 +6076,7 @@ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "dev": true, "requires": { - "is-descriptor": "^0.1.0" + "is-descriptor": "0.1.6" } } } @@ -6046,8 +6087,8 @@ "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", "dev": true, "requires": { - "inherits": "~2.0.1", - "readable-stream": "^2.0.2" + "inherits": "2.0.3", + "readable-stream": "2.3.6" } }, "stream-consume": { @@ -6062,8 +6103,8 @@ "integrity": "sha512-mc1dbFhGBxvTM3bIWmAAINbqiuAk9TATcfIQC8P+/+HJefgaiTlMn2dHvkX8qlI12KeYKSQ1Ua9RrIqrn1VPoA==", "dev": true, "requires": { - "end-of-stream": "^1.1.0", - "stream-shift": "^1.0.0" + "end-of-stream": "1.4.1", + "stream-shift": "1.0.0" } }, "stream-http": { @@ -6072,11 +6113,11 @@ "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", "dev": true, "requires": { - "builtin-status-codes": "^3.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.3.6", - "to-arraybuffer": "^1.0.0", - "xtend": "^4.0.0" + "builtin-status-codes": "3.0.0", + "inherits": "2.0.3", + "readable-stream": "2.3.6", + "to-arraybuffer": "1.0.1", + "xtend": "4.0.1" } }, "stream-shift": { @@ -6091,8 +6132,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" }, "dependencies": { "ansi-regex": { @@ -6107,7 +6148,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "3.0.0" } } } @@ -6118,7 +6159,7 @@ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { - "safe-buffer": "~5.1.0" + "safe-buffer": "5.1.2" } }, "strip-ansi": { @@ -6127,7 +6168,7 @@ "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "ansi-regex": "2.1.1" } }, "strip-bom": { @@ -6136,8 +6177,8 @@ "integrity": "sha1-hbiGLzhEtabV7IRnqTWYFzo295Q=", "dev": true, "requires": { - "first-chunk-stream": "^1.0.0", - "is-utf8": "^0.2.0" + "first-chunk-stream": "1.0.0", + "is-utf8": "0.2.1" } }, "strip-eof": { @@ -6164,12 +6205,12 @@ "integrity": "sha512-UUkEAPdSGxtRpiV9ozJ5cMTtYiqz7Ni1OGqLXRCynrvzdtR1p+cfOWe2RJLwvUG8hNanaSRjecIqwOjqeatDsA==", "dev": true, "requires": { - "ajv": "^5.2.3", - "ajv-keywords": "^2.1.0", - "chalk": "^2.1.0", - "lodash": "^4.17.4", + "ajv": "5.5.2", + "ajv-keywords": "2.1.1", + "chalk": "2.4.1", + "lodash": "4.17.10", "slice-ansi": "1.0.0", - "string-width": "^2.1.1" + "string-width": "2.1.1" }, "dependencies": { "ajv": { @@ -6178,10 +6219,10 @@ "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", "dev": true, "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" + "co": "4.6.0", + "fast-deep-equal": "1.1.0", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1" } }, "ajv-keywords": { @@ -6196,7 +6237,7 @@ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { - "color-convert": "^1.9.0" + "color-convert": "1.9.1" } }, "chalk": { @@ -6205,9 +6246,9 @@ "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" } }, "fast-deep-equal": { @@ -6222,7 +6263,7 @@ "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "has-flag": "3.0.0" } } } @@ -6251,8 +6292,8 @@ "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", "dev": true, "requires": { - "readable-stream": "^2.1.5", - "xtend": "~4.0.1" + "readable-stream": "2.3.6", + "xtend": "4.0.1" } }, "tildify": { @@ -6261,7 +6302,7 @@ "integrity": "sha1-3OwD9V3Km3qj5bBPIYF+tW5jWIo=", "dev": true, "requires": { - "os-homedir": "^1.0.0" + "os-homedir": "1.0.2" } }, "time-stamp": { @@ -6276,7 +6317,7 @@ "integrity": "sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==", "dev": true, "requires": { - "setimmediate": "^1.0.4" + "setimmediate": "1.0.5" } }, "tmp": { @@ -6285,7 +6326,7 @@ "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", "dev": true, "requires": { - "os-tmpdir": "~1.0.2" + "os-tmpdir": "1.0.2" } }, "to-arraybuffer": { @@ -6306,7 +6347,7 @@ "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", "dev": true, "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" }, "dependencies": { "kind-of": { @@ -6315,7 +6356,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -6326,10 +6367,10 @@ "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", "dev": true, "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "regex-not": "1.0.2", + "safe-regex": "1.1.0" } }, "to-regex-range": { @@ -6338,8 +6379,8 @@ "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", "dev": true, "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" + "is-number": "3.0.0", + "repeat-string": "1.6.1" } }, "trim-right": { @@ -6366,7 +6407,7 @@ "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", "dev": true, "requires": { - "prelude-ls": "~1.1.2" + "prelude-ls": "1.1.2" } }, "typedarray": { @@ -6381,8 +6422,8 @@ "integrity": "sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ==", "dev": true, "requires": { - "commander": "~2.13.0", - "source-map": "~0.6.1" + "commander": "2.13.0", + "source-map": "0.6.1" }, "dependencies": { "source-map": { @@ -6399,14 +6440,14 @@ "integrity": "sha512-hIQJ1yxAPhEA2yW/i7Fr+SXZVMp+VEI3d42RTHBgQd2yhp/1UdBcR3QEWPV5ahBxlqQDMEMTuTEvDHSFINfwSw==", "dev": true, "requires": { - "cacache": "^10.0.4", - "find-cache-dir": "^1.0.0", - "schema-utils": "^0.4.5", - "serialize-javascript": "^1.4.0", - "source-map": "^0.6.1", - "uglify-es": "^3.3.4", - "webpack-sources": "^1.1.0", - "worker-farm": "^1.5.2" + "cacache": "10.0.4", + "find-cache-dir": "1.0.0", + "schema-utils": "0.4.5", + "serialize-javascript": "1.5.0", + "source-map": "0.6.1", + "uglify-es": "3.3.9", + "webpack-sources": "1.1.0", + "worker-farm": "1.6.0" }, "dependencies": { "source-map": { @@ -6429,10 +6470,10 @@ "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", "dev": true, "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^0.4.3" + "arr-union": "3.1.0", + "get-value": "2.0.6", + "is-extendable": "0.1.1", + "set-value": "0.4.3" }, "dependencies": { "extend-shallow": { @@ -6441,7 +6482,7 @@ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } }, "set-value": { @@ -6450,10 +6491,10 @@ "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", "dev": true, "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.1", - "to-object-path": "^0.3.0" + "extend-shallow": "2.0.1", + "is-extendable": "0.1.1", + "is-plain-object": "2.0.4", + "to-object-path": "0.3.0" } } } @@ -6464,7 +6505,7 @@ "integrity": "sha1-0F8v5AMlYIcfMOk8vnNe6iAVFPM=", "dev": true, "requires": { - "unique-slug": "^2.0.0" + "unique-slug": "2.0.0" } }, "unique-slug": { @@ -6473,7 +6514,7 @@ "integrity": "sha1-22Z258fMBimHj/GWCXx4hVrp9Ks=", "dev": true, "requires": { - "imurmurhash": "^0.1.4" + "imurmurhash": "0.1.4" } }, "unique-stream": { @@ -6488,8 +6529,8 @@ "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", "dev": true, "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" + "has-value": "0.3.1", + "isobject": "3.0.1" }, "dependencies": { "has-value": { @@ -6498,9 +6539,9 @@ "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", "dev": true, "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" + "get-value": "2.0.6", + "has-values": "0.1.4", + "isobject": "2.1.0" }, "dependencies": { "isobject": { @@ -6534,7 +6575,7 @@ "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", "dev": true, "requires": { - "punycode": "^2.1.0" + "punycode": "2.1.1" } }, "urix": { @@ -6567,7 +6608,7 @@ "integrity": "sha512-6UJEQM/L+mzC3ZJNM56Q4DFGLX/evKGRg15UJHGB9X5j5Z3AFbgZvjUh2yq/UJUY4U5dh7Fal++XbNg1uzpRAw==", "dev": true, "requires": { - "kind-of": "^6.0.2" + "kind-of": "6.0.2" } }, "user-home": { @@ -6603,7 +6644,7 @@ "integrity": "sha1-qrGh+jDUX4jdMhFIh1rALAtV5bQ=", "dev": true, "requires": { - "user-home": "^1.1.1" + "user-home": "1.1.1" } }, "vinyl": { @@ -6612,8 +6653,8 @@ "integrity": "sha1-sEVbOPxeDPMNQyUTLkYZcMIJHN4=", "dev": true, "requires": { - "clone": "^1.0.0", - "clone-stats": "^0.0.1", + "clone": "1.0.4", + "clone-stats": "0.0.1", "replace-ext": "0.0.1" } }, @@ -6623,14 +6664,14 @@ "integrity": "sha1-mmhRzhysHBzqX+hsCTHWIMLPqeY=", "dev": true, "requires": { - "defaults": "^1.0.0", - "glob-stream": "^3.1.5", - "glob-watcher": "^0.0.6", - "graceful-fs": "^3.0.0", - "mkdirp": "^0.5.0", - "strip-bom": "^1.0.0", - "through2": "^0.6.1", - "vinyl": "^0.4.0" + "defaults": "1.0.3", + "glob-stream": "3.1.18", + "glob-watcher": "0.0.6", + "graceful-fs": "3.0.11", + "mkdirp": "0.5.1", + "strip-bom": "1.0.0", + "through2": "0.6.5", + "vinyl": "0.4.6" }, "dependencies": { "clone": { @@ -6645,7 +6686,7 @@ "integrity": "sha1-dhPHeKGv6mLyXGMKCG1/Osu92Bg=", "dev": true, "requires": { - "natives": "^1.1.0" + "natives": "1.1.4" } }, "isarray": { @@ -6660,10 +6701,10 @@ "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", "dev": true, "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", + "core-util-is": "1.0.2", + "inherits": "2.0.3", "isarray": "0.0.1", - "string_decoder": "~0.10.x" + "string_decoder": "0.10.31" } }, "string_decoder": { @@ -6678,8 +6719,8 @@ "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", "dev": true, "requires": { - "readable-stream": ">=1.0.33-1 <1.1.0-0", - "xtend": ">=4.0.0 <4.1.0-0" + "readable-stream": "1.0.34", + "xtend": "4.0.1" } }, "vinyl": { @@ -6688,8 +6729,8 @@ "integrity": "sha1-LzVsh6VQolVGHza76ypbqL94SEc=", "dev": true, "requires": { - "clone": "^0.2.0", - "clone-stats": "^0.0.1" + "clone": "0.2.0", + "clone-stats": "0.0.1" } } } @@ -6709,9 +6750,9 @@ "integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==", "dev": true, "requires": { - "chokidar": "^2.0.2", - "graceful-fs": "^4.1.2", - "neo-async": "^2.5.0" + "chokidar": "2.0.3", + "graceful-fs": "4.1.11", + "neo-async": "2.5.1" } }, "webpack": { @@ -6725,26 +6766,26 @@ "@webassemblyjs/wasm-edit": "1.5.10", "@webassemblyjs/wasm-opt": "1.5.10", "@webassemblyjs/wasm-parser": "1.5.10", - "acorn": "^5.0.0", - "acorn-dynamic-import": "^3.0.0", - "ajv": "^6.1.0", - "ajv-keywords": "^3.1.0", - "chrome-trace-event": "^0.1.1", - "enhanced-resolve": "^4.0.0", - "eslint-scope": "^3.7.1", - "json-parse-better-errors": "^1.0.2", - "loader-runner": "^2.3.0", - "loader-utils": "^1.1.0", - "memory-fs": "~0.4.1", - "micromatch": "^3.1.8", - "mkdirp": "~0.5.0", - "neo-async": "^2.5.0", - "node-libs-browser": "^2.0.0", - "schema-utils": "^0.4.4", - "tapable": "^1.0.0", - "uglifyjs-webpack-plugin": "^1.2.4", - "watchpack": "^1.5.0", - "webpack-sources": "^1.0.1" + "acorn": "5.6.2", + "acorn-dynamic-import": "3.0.0", + "ajv": "6.5.0", + "ajv-keywords": "3.2.0", + "chrome-trace-event": "0.1.3", + "enhanced-resolve": "4.0.0", + "eslint-scope": "3.7.1", + "json-parse-better-errors": "1.0.2", + "loader-runner": "2.3.0", + "loader-utils": "1.1.0", + "memory-fs": "0.4.1", + "micromatch": "3.1.10", + "mkdirp": "0.5.1", + "neo-async": "2.5.1", + "node-libs-browser": "2.1.0", + "schema-utils": "0.4.5", + "tapable": "1.0.0", + "uglifyjs-webpack-plugin": "1.2.5", + "watchpack": "1.6.0", + "webpack-sources": "1.1.0" } }, "webpack-cli": { @@ -6753,17 +6794,17 @@ "integrity": "sha512-65a3T3SDIozJjRU4UJMdK+LXJt73gNs2qpdjsOeq6jIrfBvAKApy59Glof1qDG3wYEo38HRxb+KrwsrsAtsaiA==", "dev": true, "requires": { - "chalk": "^2.4.1", - "cross-spawn": "^6.0.5", - "enhanced-resolve": "^4.0.0", - "global-modules-path": "^2.1.0", - "import-local": "^1.0.0", - "inquirer": "^6.0.0", - "interpret": "^1.1.0", - "loader-utils": "^1.1.0", - "supports-color": "^5.4.0", - "v8-compile-cache": "^2.0.0", - "yargs": "^11.1.0" + "chalk": "2.4.1", + "cross-spawn": "6.0.5", + "enhanced-resolve": "4.0.0", + "global-modules-path": "2.1.0", + "import-local": "1.0.0", + "inquirer": "6.0.0", + "interpret": "1.1.0", + "loader-utils": "1.1.0", + "supports-color": "5.4.0", + "v8-compile-cache": "2.0.0", + "yargs": "11.1.0" }, "dependencies": { "ansi-regex": { @@ -6778,7 +6819,7 @@ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { - "color-convert": "^1.9.0" + "color-convert": "1.9.1" } }, "chalk": { @@ -6787,9 +6828,9 @@ "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" } }, "chardet": { @@ -6804,11 +6845,11 @@ "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", "dev": true, "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "nice-try": "1.0.4", + "path-key": "2.0.1", + "semver": "5.5.0", + "shebang-command": "1.2.0", + "which": "1.3.1" } }, "external-editor": { @@ -6817,9 +6858,9 @@ "integrity": "sha512-mpkfj0FEdxrIhOC04zk85X7StNtr0yXnG7zCb+8ikO8OJi2jsHh5YGoknNTyXgsbHOf1WOOcVU3kPFWT2WgCkQ==", "dev": true, "requires": { - "chardet": "^0.5.0", - "iconv-lite": "^0.4.22", - "tmp": "^0.0.33" + "chardet": "0.5.0", + "iconv-lite": "0.4.23", + "tmp": "0.0.33" } }, "inquirer": { @@ -6828,19 +6869,19 @@ "integrity": "sha512-tISQWRwtcAgrz+SHPhTH7d3e73k31gsOy6i1csonLc0u1dVK/wYvuOnFeiWqC5OXFIYbmrIFInef31wbT8MEJg==", "dev": true, "requires": { - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.0", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^3.0.0", - "figures": "^2.0.0", - "lodash": "^4.3.0", + "ansi-escapes": "3.1.0", + "chalk": "2.4.1", + "cli-cursor": "2.1.0", + "cli-width": "2.2.0", + "external-editor": "3.0.0", + "figures": "2.0.0", + "lodash": "4.17.10", "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rxjs": "^6.1.0", - "string-width": "^2.1.0", - "strip-ansi": "^4.0.0", - "through": "^2.3.6" + "run-async": "2.3.0", + "rxjs": "6.2.0", + "string-width": "2.1.1", + "strip-ansi": "4.0.0", + "through": "2.3.8" } }, "strip-ansi": { @@ -6849,7 +6890,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "3.0.0" } }, "supports-color": { @@ -6858,7 +6899,7 @@ "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "has-flag": "3.0.0" } } } @@ -6869,8 +6910,8 @@ "integrity": "sha512-aqYp18kPphgoO5c/+NaUvEeACtZjMESmDChuD3NBciVpah3XpMEU9VAAtIaB1BsfJWWTSdv8Vv1m3T0aRk2dUw==", "dev": true, "requires": { - "source-list-map": "^2.0.0", - "source-map": "~0.6.1" + "source-list-map": "2.0.0", + "source-map": "0.6.1" }, "dependencies": { "source-map": { @@ -6881,13 +6922,18 @@ } } }, + "whatwg-fetch": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz", + "integrity": "sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng==" + }, "which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, "requires": { - "isexe": "^2.0.0" + "isexe": "2.0.0" } }, "which-module": { @@ -6908,7 +6954,7 @@ "integrity": "sha512-6w+3tHbM87WnSWnENBUvA2pxJPLhQUg5LKwUQHq3r+XPhIM+Gh2R5ycbwPCyuGbNg+lPgdcnQUhuC02kJCvffQ==", "dev": true, "requires": { - "errno": "~0.1.7" + "errno": "0.1.7" } }, "wrap-ansi": { @@ -6917,8 +6963,8 @@ "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "dev": true, "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" + "string-width": "1.0.2", + "strip-ansi": "3.0.1" }, "dependencies": { "is-fullwidth-code-point": { @@ -6927,7 +6973,7 @@ "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, "requires": { - "number-is-nan": "^1.0.0" + "number-is-nan": "1.0.1" } }, "string-width": { @@ -6936,9 +6982,9 @@ "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" } } } @@ -6955,7 +7001,7 @@ "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", "dev": true, "requires": { - "mkdirp": "^0.5.1" + "mkdirp": "0.5.1" } }, "xtend": { @@ -6982,18 +7028,18 @@ "integrity": "sha512-NwW69J42EsCSanF8kyn5upxvjp5ds+t3+udGBeTbFnERA+lF541DDpMawzo4z6W/QrzNM18D+BPMiOBibnFV5A==", "dev": true, "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.1.1", - "find-up": "^2.1.0", - "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^9.0.2" + "cliui": "4.1.0", + "decamelize": "1.2.0", + "find-up": "2.1.0", + "get-caller-file": "1.0.2", + "os-locale": "2.1.0", + "require-directory": "2.1.1", + "require-main-filename": "1.0.1", + "set-blocking": "2.0.0", + "string-width": "2.1.1", + "which-module": "2.0.0", + "y18n": "3.2.1", + "yargs-parser": "9.0.2" }, "dependencies": { "y18n": { @@ -7010,7 +7056,7 @@ "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", "dev": true, "requires": { - "camelcase": "^4.1.0" + "camelcase": "4.1.0" } } } diff --git a/package.json b/package.json index 1ecab9f..503b80e 100644 --- a/package.json +++ b/package.json @@ -17,16 +17,22 @@ "babel-core": "^6.26.3", "babel-eslint": "^8.2.3", "babel-loader": "^7.1.4", + "babel-plugin-transform-async-to-generator": "^6.24.1", "babel-plugin-transform-object-assign": "^6.22.0", + "babel-plugin-transform-object-rest-spread": "^6.26.0", "babel-plugin-transform-runtime": "^6.23.0", + "babel-polyfill": "^6.26.0", "babel-preset-env": "^1.7.0", "babel-preset-es2015": "^6.24.1", - "browser-bunyan": "^1.3.0", + "babel-preset-es2017": "^6.24.1", "colors": "^1.3.0", "eslint": "^4.19.1", "gulp": "^3.9.1", "webpack": "^4.11.1", "webpack-cli": "^3.0.3" }, - "dependencies": {} + "dependencies": { + "browser-bunyan": "^1.3.0", + "whatwg-fetch": "^2.0.4" + } } diff --git a/src/js/autoscale/index.js b/src/js/autoscale/index.js new file mode 100644 index 0000000..5f800ed --- /dev/null +++ b/src/js/autoscale/index.js @@ -0,0 +1,93 @@ +import request from './request.js' +import { debug } from '../log' + +const NAME = 'Red5ProStreamManagerExt' +const isFailoverConfig = /(rtc|rtmp|hls)/ +const isRTC = /(wss|ws)/ +// const isRTMP = /(rtmps|rtmp)/ +// const isHLS = /(https|http)/ + +const modifyInitConfigWithResponse = (config, response, autoscaleConfig) => { + let c + if (autoscaleConfig.useProxy && isRTC.test(config.protocol)) { + const connParams = { + host: response.serverAddress, + app: response.scope.substr(1, response.scope.length-1) + } + c = {...config, + protocol: config.protocol, + port: config.port, + streamName: response.name, + host: autoscaleConfig.host, + app: 'streammanager', + connectionParams: config.connectionParams ? {...config.connectionParams, connParams} : connParams + } + } else { + c = {...config, + host: response.serverAddress, + app: response.scope, + streamName: response.name + } + } + return c +} + +const execute = async (config, count, limit) => { + const onfailure = () => { + if (++count < limit) { + let timeout = setTimeout(() => { + clearTimeout(timeout) + execute(config, count, limit) + }, 1000) + return true + } + return false + } + + try { + let response = await request(config) + return response + } catch (e) { + if (!onfailure()) throw e + } +} + +export const autoscaleInit = async (proxy, autoscaleConfig, initConfig) => { + let retryCount = 0 + const { retryLimit } = autoscaleConfig + let response + + try { + response = await execute(autoscaleConfig, retryCount, retryLimit) + const keys = Object.keys(initConfig) + if (isFailoverConfig.test(keys.toString())) { + let key + for (key in initConfig) { + initConfig[key] = modifyInitConfigWithResponse(initConfig[key], response, autoscaleConfig) + } + } else { + initConfig = modifyInitConfigWithResponse(initConfig, response, autoscaleConfig) + } + debug(NAME, `[init-config]:: ${JSON.stringify(initConfig, null, 2)}`) + return proxy.init(initConfig) + } catch (e) { + throw e + } +} + +export const Autoscale = (proxy) => { + return { + init: (autoscaleConfig, initConfig) => { + return autoscaleInit(proxy, autoscaleConfig, initConfig) + } + } +} + +export const Decorate = (clazz) => { + let fn = function(autoscaleConfig, initConfig) { + return autoscaleInit(this, autoscaleConfig, initConfig) + } + Object.defineProperty(clazz.prototype, 'autoscale', { + value: fn + }) +} diff --git a/src/js/autoscale/request.js b/src/js/autoscale/request.js new file mode 100644 index 0000000..e5114bb --- /dev/null +++ b/src/js/autoscale/request.js @@ -0,0 +1,59 @@ +import environment from '../env/browser' + +const defaultConfig = { + action: undefined, // required + protocol: 'https', // required, default=https + host: undefined, // required + port: undefined, // optional + scope: 'live', // optional, default=live + streamName: undefined, // required + apiVersion: '3.0', // required, default=3.0 + region: undefined, // optional + accessToken: undefined, // optional + retryLimit: 0, // optional, default (no retry) + useProxy: true // optional, default=true. Enforces connection proxy for WebRTC clients +} + +const endpointFromConfiguration = (configuration) => { + const { + action, + protocol, + host, + port, + scope, + streamName, + apiVersion, + region, + accessToken + } = configuration + const portURI = port ? ':' + port : '' + let url = `${protocol}://${host}${portURI}/streammanager/api/${apiVersion}/event/${scope}/${streamName}?action=${action}` + if (region) { + url += `®ion=${region}` + } + if (accessToken) { + url += `&accessToken=${accessToken}` + } + return url +} + +const request = async (config) => { + const configuration = Object.assign({}, defaultConfig, config) + const url = endpointFromConfiguration(configuration) + + let response = await environment.fetch(url) + if ((response.status >= 200 && response.status < 300) && + (response.headers.get('content-type') && + response.headers.get('content-type').toLowerCase().indexOf('application/json') >= 0)) { + + let payload = await response.json() + return payload + + } else { + let error = new Error(`Could not properly parse response from ${url}.`) + error.response = response + throw error + } +} + +export default request diff --git a/src/js/env/browser.js b/src/js/env/browser.js index 87be76b..386cef7 100644 --- a/src/js/env/browser.js +++ b/src/js/env/browser.js @@ -1,5 +1,9 @@ +import 'whatwg-fetch' + export default { getRed5ProSDK: () => { return window.red5prosdk - } + }, + + fetch: window.fetch.bind(window) } diff --git a/src/js/index.js b/src/js/index.js index 1c4a823..25ccf51 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -4,13 +4,13 @@ * @file red5pro-ext-stream-manager.min.js * @module red5prosdk_ext_stream_manager * - * */ // SDK_VERSION, LOG_LEVEL injected from webpack build. import { LEVELS, establishLogger } from './log' import { getLogger as _getLogger } from './log' import environment from './env/browser' +import { Decorate } from './autoscale' establishLogger(`${LOG_LEVEL}` || LEVELS.DEBUG) // eslint-disable-line no-undef @@ -50,7 +50,22 @@ export const getLogger = _getLogger export const decorate = () => { const red5prosdk = environment.getRed5ProSDK() if (red5prosdk) { - getLogger().debug('Will Decorate') + const { + Red5ProSubscriber, + RTCSubscriber, + HLSSubscriber, + RTMPSubscriber, + Red5ProPublisher, + RTCPublisher, + RTMPPublisher + } = red5prosdk + Decorate(Red5ProSubscriber) + Decorate(RTCSubscriber) + Decorate(HLSSubscriber) + Decorate(RTMPSubscriber) + Decorate(Red5ProPublisher) + Decorate(RTCPublisher) + Decorate(RTMPPublisher) } else { getLogger().warn('Could not decorate the red5prosdk global. It does not exist.') } diff --git a/webpack.config.babel.js b/webpack.config.babel.js index 808799a..2cee8bb 100644 --- a/webpack.config.babel.js +++ b/webpack.config.babel.js @@ -22,16 +22,21 @@ let plugins = [ }) ] +/* if(PROD || STAGING) { plugins.push(new webpack.optimize.UglifyJsPlugin({ minimize: true, debug: false })) } +*/ export default { mode: process.env.NODE_ENV || 'development', entry: [path.join(process.cwd(), 'src', 'js', 'index.js')], + optimization: { + minimize: PROD || STAGING + }, output: { library: 'red5prosdk_ext_stream_manager', libraryTarget: 'umd', @@ -44,9 +49,9 @@ export default { { test: /\.js$/, exclude: /node_modules/, - use: { - loader: 'babel-loader' - } + use: [ + {loader: 'babel-loader'} + ] } ] }, From 441814d3c310ea144de618d155aeceff9d6a3f8a Mon Sep 17 00:00:00 2001 From: bustardcelly Date: Mon, 11 Jun 2018 09:51:45 -0400 Subject: [PATCH 04/15] cleanup. --- .../lib/red5pro/red5pro-ext-stream-manager.js | 8 ++++---- examples/browser/publisher-failover.html | 19 +++++++++++++++++-- src/js/index.js | 4 +++- 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/examples/browser/lib/red5pro/red5pro-ext-stream-manager.js b/examples/browser/lib/red5pro/red5pro-ext-stream-manager.js index 2455973..2c811d6 100644 --- a/examples/browser/lib/red5pro/red5pro-ext-stream-manager.js +++ b/examples/browser/lib/red5pro/red5pro-ext-stream-manager.js @@ -4500,7 +4500,6 @@ var isRTC = /(wss|ws)/; var modifyInitConfigWithResponse = function modifyInitConfigWithResponse(config, response, autoscaleConfig) { var c = void 0; if (autoscaleConfig.useProxy && isRTC.test(config.protocol)) { - (0, _log.debug)(NAME, '[modify-config]:: useProxy'); var connParams = { host: response.serverAddress, app: response.scope.substr(1, response.scope.length - 1) @@ -4514,7 +4513,6 @@ var modifyInitConfigWithResponse = function modifyInitConfigWithResponse(config, connectionParams: config.connectionParams ? (0, _extends3.default)({}, config.connectionParams, { connParams: connParams }) : connParams }); } else { - (0, _log.debug)(NAME, '[modify-config]:: Do Not useProxy'); c = (0, _extends3.default)({}, config, { host: response.serverAddress, app: response.scope, @@ -4798,7 +4796,7 @@ exports.default = { Object.defineProperty(exports, "__esModule", { value: true }); -exports.decorate = exports.getLogger = exports.LOG_LEVELS = exports.setLogLevel = undefined; +exports.Autoscale = exports.decorate = exports.getLogger = exports.LOG_LEVELS = exports.setLogLevel = undefined; var _log = __webpack_require__(/*! ./log */ "./src/js/log/index.js"); @@ -4877,6 +4875,8 @@ var decorate = exports.decorate = function decorate() { } }; +exports.Autoscale = _autoscale.Autoscale; + /***/ }), /***/ "./src/js/log/bunyan-writer.js": @@ -5039,4 +5039,4 @@ module.exports = __webpack_require__(/*! /Users/toddanderson/Documents/Workplace /******/ }); }); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9yZWQ1cHJvc2RrX2V4dF9zdHJlYW1fbWFuYWdlci93ZWJwYWNrL3VuaXZlcnNhbE1vZHVsZURlZmluaXRpb24iLCJ3ZWJwYWNrOi8vcmVkNXByb3Nka19leHRfc3RyZWFtX21hbmFnZXIvd2VicGFjay9ib290c3RyYXAiLCJ3ZWJwYWNrOi8vcmVkNXByb3Nka19leHRfc3RyZWFtX21hbmFnZXIvLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL2pzb24vc3RyaW5naWZ5LmpzIiwid2VicGFjazovL3JlZDVwcm9zZGtfZXh0X3N0cmVhbV9tYW5hZ2VyLy4vbm9kZV9tb2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XFwnJyArIG9iai50b1N0cmluZygpICsgJ1xcJyc7XG59XG5cbmZ1bmN0aW9uIGZvcm1hdChmKSB7XG4gICAgdmFyIGFyZ3VtZW50cyQxID0gYXJndW1lbnRzO1xuXG4gICAgaWYgKHR5cGVvZiBmICE9PSAnc3RyaW5nJykge1xuICAgICAgICB2YXIgb2JqZWN0cyA9IG5ldyBBcnJheShhcmd1bWVudHMubGVuZ3RoKTtcbiAgICAgICAgZm9yICh2YXIgaSQxID0gMDtpJDEgPCBhcmd1bWVudHMubGVuZ3RoOyBpJDErKykge1xuICAgICAgICAgICAgb2JqZWN0c1tpJDFdID0gaW5zcGVjdChhcmd1bWVudHMkMVtpJDFdKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gb2JqZWN0cy5qb2luKCcgJyk7XG4gICAgfVxuICAgIHZhciBmb3JtYXRSZWdFeHAgPSAvJVtzZGolXS9nO1xuICAgIHZhciBpID0gMTtcbiAgICB2YXIgYXJncyA9IGFyZ3VtZW50cztcbiAgICB2YXIgbGVuID0gYXJncy5sZW5ndGg7XG4gICAgdmFyIHN0ciA9IFN0cmluZyhmKS5yZXBsYWNlKGZvcm1hdFJlZ0V4cCwgZnVuY3Rpb24gKHgpIHtcbiAgICAgICAgaWYgKHggPT09ICclJScpIHtcbiAgICAgICAgICAgIHJldHVybiAnJSc7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGkgPj0gbGVuKSB7XG4gICAgICAgICAgICByZXR1cm4geDtcbiAgICAgICAgfVxuICAgICAgICBzd2l0Y2ggKHgpIHtcbiAgICAgICAgICAgIGNhc2UgJyVzJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gU3RyaW5nKGFyZ3NbaSsrXSk7XG4gICAgICAgICAgICBjYXNlICclZCc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIE51bWJlcihhcmdzW2krK10pO1xuICAgICAgICAgICAgY2FzZSAnJWonOlxuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeShhcmdzW2krK10pO1xuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKF8pIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbQ2lyY3VsYXJdJztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgIHJldHVybiB4O1xuICAgICAgICB9XG4gICAgfSk7XG4gICAgZm9yICh2YXIgeCA9IGFyZ3NbaV07aSA8IGxlbjsgeCA9IGFyZ3NbKytpXSkge1xuICAgICAgICBzdHIgKz0gJyAnICsgeDtcbiAgICB9XG4gICAgcmV0dXJuIHN0cjtcbn1cblxuZnVuY3Rpb24gZXh0cmFjdFNyY0Zyb21TdGFja3RyYWNlKHN0YWNrLCBsZXZlbCkge1xuICAgIHZhciBzdGFja0xpbmVzID0gc3RhY2suc3BsaXQoJ1xcbicpO1xuICAgIGlmIChzdGFja0xpbmVzWzBdICYmIHN0YWNrTGluZXNbMF0uaW5kZXhPZihDQUxMX1NUQUNLX0VSUk9SKSA+PSAwKSB7XG4gICAgICAgIHN0YWNrTGluZXMuc2hpZnQoKTtcbiAgICB9XG4gICAgdmFyIHRhcmdldExpbmUgPSBzdGFja0xpbmVzW2xldmVsXTtcbiAgICB2YXIgbGluZUluZm8gPSBudWxsO1xuICAgIGlmICh0YXJnZXRMaW5lKSB7XG4gICAgICAgIHZhciBleGVjUmVzdWx0ID0gL15cXHMqKGF0fC4qQClcXHMqKC4rKT8kLy5leGVjKHRhcmdldExpbmUpO1xuICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShleGVjUmVzdWx0KSAmJiBleGVjUmVzdWx0WzJdKSB7XG4gICAgICAgICAgICBsaW5lSW5mbyA9IGV4ZWNSZXN1bHRbMl07XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBsaW5lSW5mbyA9IHRhcmdldExpbmU7XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIGxpbmVJbmZvO1xufVxuXG5mdW5jdGlvbiBfaW5kZW50KHMsIGluZGVudCkge1xuICAgIGlmICghaW5kZW50KSB7XG4gICAgICAgIGluZGVudCA9ICcgICAgJztcbiAgICB9XG4gICAgdmFyIGxpbmVzID0gcy5zcGxpdCgvXFxyP1xcbi9nKTtcbiAgICByZXR1cm4gaW5kZW50ICsgbGluZXMuam9pbignXFxuJyArIGluZGVudCk7XG59XG5cbnZhciBfd2FybmVkID0ge307XG5mdW5jdGlvbiBfd2Fybihtc2csIGRlZHVwS2V5KSB7XG4gICAgaWYgKGRlZHVwS2V5KSB7XG4gICAgICAgIGlmIChfd2FybmVkW2RlZHVwS2V5XSkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIF93YXJuZWRbZGVkdXBLZXldID0gdHJ1ZTtcbiAgICB9XG4gICAgY29uc29sZS5lcnJvcihtc2cgKyAnXFxuJyk7XG59XG5cbmZ1bmN0aW9uIF9oYXZlV2FybmVkKGRlZHVwS2V5KSB7XG4gICAgcmV0dXJuIF93YXJuZWRbZGVkdXBLZXldO1xufVxuXG5mdW5jdGlvbiBzYWZlQ3ljbGVzKCkge1xuICAgIHZhciBzZWVuID0gW107XG4gICAgcmV0dXJuIGZ1bmN0aW9uIChrZXksIHZhbCkge1xuICAgICAgICBpZiAoIXZhbCB8fCB0eXBlb2YgdmFsICE9PSAnb2JqZWN0Jykge1xuICAgICAgICAgICAgcmV0dXJuIHZhbDtcbiAgICAgICAgfVxuICAgICAgICBpZiAoc2Vlbi5pbmRleE9mKHZhbCkgIT09IC0xKSB7XG4gICAgICAgICAgICByZXR1cm4gJ1tDaXJjdWxhcl0nO1xuICAgICAgICB9XG4gICAgICAgIHNlZW4ucHVzaCh2YWwpO1xuICAgICAgICByZXR1cm4gdmFsO1xuICAgIH07XG59XG5cbnZhciBUUkFDRSQxID0gMTA7XG52YXIgREVCVUckMSA9IDIwO1xudmFyIElORk8kMSA9IDMwO1xudmFy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AgIG5hbWUgPSBwYXJlbnRGaWVsZE5hbWVzW2ldO1xuICAgICAgICAgICAgZmllbGRzW25hbWVdID0gcGFyZW50LmZpZWxkc1tuYW1lXTtcbiAgICAgICAgfVxuICAgICAgICB2YXIgbmFtZXMgPSBPYmplY3Qua2V5cyhvcHRpb25zKTtcbiAgICAgICAgZm9yIChpID0gMDsgaSA8IG5hbWVzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICBuYW1lID0gbmFtZXNbaV07XG4gICAgICAgICAgICBmaWVsZHNbbmFtZV0gPSBvcHRpb25zW25hbWVdO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybjtcbiAgICB9XG4gICAgaWYgKHBhcmVudCkge1xuICAgICAgICB0aGlzLl9sZXZlbCA9IHBhcmVudC5fbGV2ZWw7XG4gICAgICAgIHRoaXMuc3RyZWFtcyA9IFtdO1xuICAgICAgICBmb3IgKGkgPSAwOyBpIDwgcGFyZW50LnN0cmVhbXMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIHZhciBzID0gb2JqQ29weShwYXJlbnQuc3RyZWFtc1tpXSk7XG4gICAgICAgICAgICB0aGlzJDEuc3RyZWFtcy5wdXNoKHMpO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMuc2VyaWFsaXplcnMgPSBvYmpDb3B5KHBhcmVudC5zZXJpYWxpemVycyk7XG4gICAgICAgIHRoaXMuc3JjID0gcGFyZW50LnNyYztcbiAgICAgICAgdGhpcy5maWVsZHMgPSBvYmpDb3B5KHBhcmVudC5maWVsZHMpO1xuICAgICAgICBpZiAob3B0aW9ucy5sZXZlbCkge1xuICAgICAgICAgICAgdGhpcy5sZXZlbChvcHRpb25zLmxldmVsKTtcbiAgICAgICAgfVxuICAgIH0gZWxzZSB7XG4gICAgICAgIHRoaXMuX2xldmVsID0gTnVtYmVyLlBPU0lUSVZFX0lORklOSVRZO1xuICAgICAgICB0aGlzLnN0cmVhbXMgPSBbXTtcbiAgICAgICAgdGhpcy5zZXJpYWxpemVycyA9IG51bGw7XG4gICAgICAgIHRoaXMuc3JjID0gZmFsc2U7XG4gICAgICAgIHRoaXMuZmllbGRzID0ge307XG4gICAgfVxuICAgIGlmIChvcHRpb25zLnN0cmVhbSkge1xuICAgICAgICB0aGlzLmFkZFN0cmVhbSh7XG4gICAgICAgICAgICB0eXBlOiAnc3RyZWFtJyxcbiAgICAgICAgICAgIHN0cmVhbTogb3B0aW9ucy5zdHJlYW0sXG4gICAgICAgICAgICBsZXZlbDogb3B0aW9ucy5sZXZlbFxuICAgICAgICB9KTtcbiAgICB9IGVsc2UgaWYgKG9wdGlvbnMuc3RyZWFtcykge1xuICAgICAgICBvcHRpb25zLnN0cmVhbXMuZm9yRWFjaChmdW5jdGlvbiAocykge1xuICAgICAgICAgICAgdGhpcyQxLmFkZFN0cmVhbShzLCBvcHRpb25zLmxldmVsKTtcbiAgICAgICAgfSk7XG4gICAgfSBlbHNlIGlmIChwYXJlbnQgJiYgb3B0aW9ucy5sZXZlbCkge1xuICAgICAgICB0aGlzLmxldmVsKG9wdGlvbnMubGV2ZWwpO1xuICAgIH0gZWxzZSBpZiAoIXBhcmVudCkge1xuICAgICAgICB0aGlzLmFkZFN0cmVhbSh7XG4gICAgICAgICAgICB0eXBlOiAncmF3JyxcbiAgICAgICAgICAgIHN0cmVhbTogbmV3IENvbnNvbGVSYXdTdHJlYW0oKSxcbiAgICAgICAgICAgIGxldmVsOiBvcHRpb25zLmxldmVsXG4gICAgICAgIH0pO1xuICAgIH1cbiAgICBpZiAob3B0aW9ucy5zZXJpYWxpemVycykge1xuICAgICAgICB0aGlzLmFkZFNlcmlhbGl6ZXJzKG9wdGlvbnMuc2VyaWFsaXplcnMpO1xuICAgIH1cbiAgICBpZiAob3B0aW9ucy5zcmMpIHtcbiAgICAgICAgdGhpcy5zcmMgPSB0cnVlO1xuICAgIH1cbiAgICBmaWVsZHMgPSBvYmpDb3B5KG9wdGlvbnMpO1xuICAgIGRlbGV0ZSBmaWVsZHMuc3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pemVycy5lcnIgPyBsb2cuc2VyaWFsaXplcnMuZXJyKGFyZ3NbMF0pIDogc3RkU2VyaWFsaXplcnMuZXJyKGFyZ3NbMF0pXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICBleGNsdWRlRmllbGRzID0ge1xuICAgICAgICAgICAgICAgICAgICBlcnI6IHRydWVcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIGlmIChhcmdzLmxlbmd0aCA9PT0gMSkge1xuICAgICAgICAgICAgICAgICAgICBtc2dBcmdzID0gW2ZpZWxkcy5lcnIubWVzc2FnZV07XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgbXNnQXJncyA9IEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKGFyZ3MsIDEpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIGFyZ3NbMF0gIT09ICdvYmplY3QnICYmIGFyZ3NbMF0gIT09IG51bGwgfHwgQXJyYXkuaXNBcnJheShhcmdzWzBdKSkge1xuICAgICAgICAgICAgICAgIGZpZWxkcyA9IG51bGw7XG4gICAgICAgICAgICAgICAgbXNnQXJncyA9IEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKGFyZ3MpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBmaWVsZHMgPSBhcmdzWzBdO1xuICAgICAgICAgICAgICAgIGlmIChhcmdzLmxlbmd0aCA9PT0gMSAmJiBmaWVsZHMuZXJyICYmIGZpZWxkcy5lcnIgaW5zdGFuY2VvZiBFcnJvcikge1xuICAgICAgICAgICAgICAgICAgICBtc2dBcmdzID0gW2ZpZWxkcy5lcnIubWVzc2FnZV07XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgbXNnQXJncyA9IEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKGFyZ3MsIDEpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciByZWMgPSBvYmpDb3B5KGxvZy5maWVsZHMpO1xuICAgICAgICAgICAgcmVjLmxldmVsID0gbWluTGV2ZWw7XG4gICAgICAgICAgICB2YXIgcmVjRmllbGRzID0gZmllbGRzID8gb2JqQ29weShmaWVsZHMpIDogbnVsbDtcbiAgICAgICAgICAgIGlmIChyZWNGaWVsZHMpIHtcbiAgICAgICAgICAgICAgICBpZiAobG9nLnNlcmlhbGl6ZXJzKSB7XG4gICAgICAgICAgICAgICAgICAgIGxvZy5fYXBwbHlTZXJpYWxpemVycyhyZWNGaWVsZHMsIGV4Y2x1ZGVGaWVsZHMpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBPYmplY3Qua2V5cyhyZWNGaWVsZHMpLmZvckVhY2goZnVuY3Rpb24gKGspIHtcbiAgICAgICAgICAgICAgICAgICAgcmVjW2tdID0gcmVjRmllbGRzW2tdO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVjLmxldmVsTmFtZSA9IG5hbWVGcm9tTGV2ZWxbbWluTGV2ZWxdO1xuICAgICAgICAgICAgcmVjLm1zZyA9IG1zZ0FyZ3MubGVuZ3RoID8gZm9ybWF0LmFwcGx5KGxvZywgbXNnQXJncykgOiAnJztcbiAgICAgICAgICAgIGlmICghcmVjLnRpbWUpIHtcbiAgICAgICAgICAgICAgICByZWMudGltZSA9IG5ldyBEYXRlKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAobG9nLnNyYyAmJiAhcmVjLnNyYykge1xuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihDQUxMX1NUQUNLX0VSUk9SKTtcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHNyYyA9IGV4dHJhY3RTcmNGcm9tU3RhY2t0cmFjZShlcnIuc3RhY2ssIDIpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIXNyYyAmJiAhX2hhdmVXYXJuZWQoJ3NyYycpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBfd2FybignVW5hYmxlIHRvIGRldGVybWluZSBzcmMgbGluZSBpbmZvJywgJ3NyYycpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJlYy5zcmMgPSBzcmMgfHwgJyc7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVjLnYgPSBMT0dfVkVSU0lPTjtcbiAgICAgICAgICAgIHJldHVybiByZWM7XG4gICAgICAgIH1cbiAgICAgICAgXG4gICAgICAgIHZhciBmaWVsZHMgPSBudWxsO1xuICAgICAgICB2YXIgbXNnQXJncyA9IGFyZ3VtZW50cztcbiAgICAgICAgdmFyIHJlYyA9IG51bGw7XG4gICAgICAgIGlmIChhcmd1bWVudHMubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5fbGV2ZWwgPD0gbWluTGV2ZWw7XG4gICAgICAgIH0gZWxzZSBpZiAodGhpcy5fbGV2ZWwgPiBtaW5MZXZlbCkge30gZWxzZSB7XG4gICAgICAgICAgICByZWMgPSBta1JlY29yZChtc2dBcmdzKTtcbiAgICAgICAgICAgIHRoaXMuX2VtaXQocmVjKTtcbiAgICAgICAgfVxuICAgIH07XG59XG5cbkxvZ2dlci5wcm90b3R5cGUudHJhY2UgPSBta0xvZ0VtaXR0ZXIoVFJBQ0UpO1xuTG9nZ2VyLnByb3RvdHlwZS5kZWJ1ZyA9IG1rTG9nRW1pdHRlcihERUJVRyk7XG5Mb2dnZXIucHJvdG90eXBlLmluZm8gPSBta0xvZ0VtaXR0ZXIoSU5GTyk7XG5Mb2dnZXIucHJvdG90eXBlLndhcm4gPSBta0xvZ0VtaXR0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FwiO1xuICAgICAgICAgIGNvbnRleHQuYXJnID0gdW5kZWZpbmVkO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuICEhIGNhdWdodDtcbiAgICAgIH1cblxuICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG4gICAgICAgIHZhciByZWNvcmQgPSBlbnRyeS5jb21wbGV0aW9uO1xuXG4gICAgICAgIGlmIChlbnRyeS50cnlMb2MgPT09IFwicm9vdFwiKSB7XG4gICAgICAgICAgLy8gRXhjZXB0aW9uIHRocm93biBvdXRzaWRlIG9mIGFueSB0cnkgYmxvY2sgdGhhdCBjb3VsZCBoYW5kbGVcbiAgICAgICAgICAvLyBpdCwgc28gc2V0IHRoZSBjb21wbGV0aW9uIHZhbHVlIG9mIHRoZSBlbnRpcmUgZnVuY3Rpb24gdG9cbiAgICAgICAgICAvLyB0aHJvdyB0aGUgZXhjZXB0aW9uLlxuICAgICAgICAgIHJldHVybiBoYW5kbGUoXCJlbmRcIik7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoZW50cnkudHJ5TG9jIDw9IHRoaXMucHJldikge1xuICAgICAgICAgIHZhciBoYXNDYXRjaCA9IGhhc093bi5jYWxsKGVudHJ5LCBcImNhdGNoTG9jXCIpO1xuICAgICAgICAgIHZhciBoYXNGaW5hbGx5ID0gaGFzT3duLmNhbGwoZW50cnksIFwiZmluYWxseUxvY1wiKTtcblxuICAgICAgICAgIGlmIChoYXNDYXRjaCAmJiBoYXNGaW5hbGx5KSB7XG4gICAgICAgICAgICBpZiAodGhpcy5wcmV2IDwgZW50cnkuY2F0Y2hMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5jYXRjaExvYywgdHJ1ZSk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5maW5hbGx5TG9jKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIH0gZWxzZSBpZiAoaGFzQ2F0Y2gpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnByZXYgPCBlbnRyeS5jYXRjaExvYykge1xuICAgICAgICAgICAgICByZXR1cm4gaGFuZGxlKGVudHJ5LmNhdGNoTG9jLCB0cnVlKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIH0gZWxzZSBpZiAoaGFzRmluYWxseSkge1xuICAgICAgICAgICAgaWYgKHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5maW5hbGx5TG9jKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCJ0cnkgc3RhdGVtZW50IHdpdGhvdXQgY2F0Y2ggb3IgZmluYWxseVwiKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9LFxuXG4gICAgYWJydXB0OiBmdW5jdGlvbih0eXBlLCBhcmcpIHtcbiAgICAgIGZvciAodmFyIGkgPSB0aGlzLnRyeUVudHJpZXMubGVuZ3RoIC0gMTsgaSA+PSAwOyAtLWkpIHtcbiAgICAgICAgdmFyIGVudHJ5ID0gdGhpcy50cnlFbnRyaWVzW2ldO1xuICAgICAgICBpZiAoZW50cnkudHJ5TG9jIDw9IHRoaXMucHJldiAmJlxuICAgICAgICAgICAgaGFzT3duLmNhbGwoZW50cnksIFwiZmluYWxseUxvY1wiKSAmJlxuICAgICAgICAgICAgdGhpcy5wcmV2IDwgZW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAgIHZhciBmaW5hbGx5RW50cnkgPSBlbnRyeTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBpZiAoZmluYWxseUVudHJ5ICYmXG4gICAgICAgICAgKHR5cGUgPT09IFwiYnJlYWtcIiB8fFxuICAgICAgICAgICB0eXBlID09PSBcImNvbnRpbnVlXCIpICYmXG4gICAgICAgICAgZmluYWxseUVudHJ5LnRyeUxvYyA8PSBhcmcgJiZcbiAgICAgICAgICBhcmcgPD0gZmluYWxseUVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgLy8gSWdub3JlIHRoZSBmaW5hbGx5IGVudHJ5IGlmIGNvbnRyb2wgaXMgbm90IGp1bXBpbmcgdG8gYVxuICAgICAgICAvLyBsb2NhdGlvbiBvdXRzaWRlIHRoZSB0cnkvY2F0Y2ggYmxvY2suXG4gICAgICAgIGZpbmFsbHlFbnRyeSA9IG51bGw7XG4gICAgICB9XG5cbiAgICAgIHZhciByZWNvcmQgPSBmaW5hbGx5RW50cnkgPyBmaW5hbGx5RW50cnkuY29tcGxldGlvbiA6IHt9O1xuICAgICAgcmVjb3JkLnR5cGUgPSB0eXBlO1xuICAgICAgcmVjb3JkLmFyZyA9IGFyZztcblxuICAgICAgaWYgKGZpbmFsbHlFbnRyeSkge1xuICAgICAgICB0aGlzLm1ldGhvZCA9IFwibmV4dFwiO1xuICAgICAgICB0aGlzLm5leHQgPSBmaW5hbGx5RW50cnkuZmluYWxseUxvYztcbiAgICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiB0aGlzLmNvbXBsZXRlKHJlY29yZCk7XG4gICAgfSxcblxuICAgIGNvbXBsZXRlOiBmdW5jdGlvbihyZWNvcmQsIGFmdGVyTG9jKSB7XG4gICAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwidGhyb3dcIikge1xuICAgICAgICB0aHJvdyByZWNvcmQuYXJnO1xuICAgICAgfVxuXG4gICAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwiYnJlYWt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LFxuICAgICd3YXJuJzogV0FSTixcbiAgICAnZXJyb3InOiBFUlJPUixcbiAgICAnZmF0YWwnOiBGQVRBTFxufTtcbnZhciBuYW1lRnJvbUxldmVsID0ge307XG5PYmplY3Qua2V5cyhsZXZlbEZyb21OYW1lKS5mb3JFYWNoKGZ1bmN0aW9uIChuYW1lKSB7XG4gICAgbmFtZUZyb21MZXZlbFtsZXZlbEZyb21OYW1lW25hbWVdXSA9IG5hbWU7XG59KTtcbmZ1bmN0aW9uIHJlc29sdmVMZXZlbChuYW1lT3JOdW0pIHtcbiAgICByZXR1cm4gdHlwZW9mIG5hbWVPck51bSA9PT0gJ3N0cmluZycgPyBsZXZlbEZyb21OYW1lW25hbWVPck51bS50b0xvd2VyQ2FzZSgpXSA6IG5hbWVPck51bTtcbn1cblxudmFyIENBTExfU1RBQ0tfRVJST1IgPSAnY2FsbC1zdGFjay1lcnJvcic7XG5mdW5jdGlvbiBvYmpDb3B5KG9iaikge1xuICAgIGlmICh0eXBlb2Ygb2JqID09PSAndW5kZWZpbmVkJyB8fCBvYmogPT09IG51bGwpIHtcbiAgICAgICAgcmV0dXJuIG9iajtcbiAgICB9IGVsc2UgaWYgKEFycmF5LmlzQXJyYXkob2JqKSkge1xuICAgICAgICByZXR1cm4gb2JqLnNsaWNlKCk7XG4gICAgfSBlbHNlIGlmICh0eXBlb2Ygb2JqID09PSAnb2JqZWN0Jykge1xuICAgICAgICB2YXIgY29weSA9IHt9O1xuICAgICAgICBPYmplY3Qua2V5cyhvYmopLmZvckVhY2goZnVuY3Rpb24gKGspIHtcbiAgICAgICAgICAgIGNvcHlba10gPSBvYmpba107XG4gICAgICAgIH0pO1xuICAgICAgICByZXR1cm4gY29weTtcbiAgICB9IGVsc2Uge1xuICAgICAgICByZXR1cm4gb2JqO1xuICAgIH1cbn1cblxuZnVuY3Rpb24gaW5zcGVjdChvYmopIHtcbiAgICBpZiAodHlwZW9mIG9iaiA9PT0gJ3VuZGVmaW5lZCcpIHtcbiAgICA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IHJldHVybiBvYmplY3RzLmpvaW4oJyAnKTtcbiAgICB9XG4gICAgdmFyIGZvcm1hdFJlZ0V4cCA9IC8lW3NkaiVdL2c7XG4gICAgdmFyIGkgPSAxO1xuICAgIHZhciBhcmdzID0gYXJndW1lbnRzO1xuICAgIHZhciBsZW4gPSBhcmdzLmxlbmd0aDtcbiAgICB2YXIgc3RyID0gU3RyaW5nKGYpLnJlcGxhY2UoZm9ybWF0UmVnRXhwLCBmdW5jdGlvbiAoeCkge1xuICAgICAgICBpZiAoeCA9PT0gJyUlJykge1xuICAgICAgICAgICAgcmV0dXJuICclJztcbiAgICAgICAgfVxuICAgICAgICBpZiAoaSA+PSBsZW4pIHtcbiAgICAgICAgICAgIHJldHVybiB4O1xuICAgICAgICB9XG4gICAgICAgIHN3aXRjaCAoeCkge1xuICAgICAgICAgICAgY2FzZSAnJXMnOlxuICAgICAgICAgICAgICAgIHJldHVybiBTdHJpbmcoYXJnc1tpKytdKTtcbiAgICAgICAgICAgIGNhc2UgJyVkJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gTnVtYmVyKGFyZ3NbaSsrXSk7XG4gICAgICAgICAgICBjYXNlICclaic6XG4gICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KGFyZ3NbaSsrXSk7XG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoXykge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1tDaXJjdWxhcl0nO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgcmV0dXJuIHg7XG4gICAgICAgIH1cbiAgICB9KTtcbiAgICBmb3IgKHZhciB4ID0gYXJnc1tpXTtpIDwgbGVuOyB4ID0gYXJnc1srK2ldKSB7XG4gICAgICAgIHN0ciArPSAnICcgKyB4O1xuICAgIH1cbiAgICByZXR1cm4gc3RyO1xufVxuXG5mdW5jdGl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AgfVxuICAgIH1cbiAgICBpZiAobm9lbWl0KSB7XG4gICAgICAgIHJldHVybiBzdHI7XG4gICAgfVxuICAgIHZhciBsZXZlbCA9IHJlYy5sZXZlbDtcbiAgICBmb3IgKGkgPSAwOyBpIDwgdGhpcy5zdHJlYW1zLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgIHZhciBzID0gdGhpcyQxLnN0cmVhbXNbaV07XG4gICAgICAgIGlmIChzLmxldmVsIDw9IGxldmVsKSB7XG4gICAgICAgICAgICBzLnN0cmVhbS53cml0ZShyZWMpO1xuICAgICAgICB9XG4gICAgfVxuICAgIHJldHVybiBzdHI7XG59O1xuZnVuY3Rpb24gbWtMb2dFbWl0dGVyKG1pbkxldmVsKSB7XG4gICAgcmV0dXJuIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgdmFyIGxvZyA9IHRoaXM7XG4gICAgICAgIGZ1bmN0aW9uIG1rUmVjb3JkKGFyZ3MpIHtcbiAgICAgICAgICAgIHZhciBleGNsdWRlRmllbGRzO1xuICAgICAgICAgICAgaWYgKGFyZ3NbMF0gaW5zdGFuY2VvZiBFcnJvcikge1xuICAgICAgICAgICAgICAgIGZpZWxkcyA9IHtcbiAgICAgICAgICAgICAgICAgICAgZXJyOiBsb2cuc2VyaWFsaXplcnMgJiYgbG9nLnNlcmlhbGl6ZXJzLmVyciA/IGxvZy5zZXJpYWxpemVycy5lcnIoYXJnc1swXSkgOiBzdGRTZXJpYWxpemVycy5lcnIoYXJnc1swXSlcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIGV4Y2x1ZGVGaWVsZHMgPSB7XG4gICAgICAgICAgICAgICAgICAgIGVycjogdHJ1ZVxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgaWYgKGFyZ3MubGVuZ3RoID09PSAxKSB7XG4gICAgICAgICAgICAgICAgICAgIG1zZ0FyZ3MgPSBbZmllbGRzLmVyci5tZXNzYWdlXTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBtc2dBcmdzID0gQXJyYXkucHJvdG90eXBlLnNsaWNlLmNhbGwoYXJncywgMSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmICh0eXBlb2YgYXJnc1swXSAhPT0gJ29iamVjdCcgJiYgYXJnc1swXSAhPT0gbnVsbCB8fCBBcnJheS5pc0FycmF5KGFyZ3NbMF0pKSB7XG4gICAgICAgICAgICAgICAgZmllbGRzID0gbnVsbDtcbiAgICAgICAgICAgICAgICBtc2dBcmdzID0gQXJyYXkucHJvdG90eXBlLnNsaWNlLmNhbGwoYXJncyk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGZpZWxkcyA9IGFyZ3NbMF07XG4gICAgICAgICAgICAgICAgaWYgKGFyZ3MubGVuZ3RoID09PSAxICYmIGZpZWxkcy5lcnIgJiYgZmllbGRzLmVyciBpbnN0YW5jZW9mIEVycm9yKSB7XG4gICAgICAgICAgICAgICAgICAgIG1zZ0FyZ3MgPSBbZmllbGRzLmVyci5tZXNzYWdlXTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBtc2dBcmdzID0gQXJyYXkucHJvdG90eXBlLnNsaWNlLmNhbGwoYXJncywgMSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdmFyIHJlYyA9IG9iakNvcHkobG9nLmZpZWxkcyk7XG4gICAgICAgICAgICByZWMubGV2ZWwgPSBtaW5MZXZlbDtcbiAgICAgICAgICAgIHZhciByZWNGaWVsZHMgPSBmaWVsZHMgPyBvYmpDb3B5KGZpZWxkcykgOiBudWxsO1xuICAgICAgICAgICAgaWYgKHJlY0ZpZWxkcykge1xuICAgICAgICAgICAgICAgIGlmIChsb2cuc2VyaWFsaXplcnMpIHtcbiAgICAgICAgICAgICAgICAgICAgbG9nLl9hcHBseVNlcmlhbGl6ZXJzKHJlY0ZpZWxkcywgZXhjbHVkZUZpZWxkcyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIE9iamVjdC5rZXlzKHJlY0ZpZWxkcykuZm9yRWFjaChmdW5jdGlvbiAoaykge1xuICAgICAgICAgICAgICAgICAgICByZWNba10gPSByZWNGaWVsZHNba107XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWMubGV2ZWxOYW1lID0gbmFtZUZyb21MZXZlbFttaW5MZXZlbF07XG4gICAgICAgICAgICByZWMubXNnID0gbXNnQXJncy5sZW5ndGggPyBmb3JtYXQuYXBwbHkobG9nLCBtc2dBcmdzKSA6ICcnO1xuICAgICAgICAgICAgaWYgKCFyZWMudGltZSkge1xuICAgICAgICAgICAgICAgIHJlYy50aW1lID0gbmV3IERhdGUoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChsb2cuc3JjICYmICFyZWMuc3JjKSB7XG4gICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKENBTExfU1RBQ0tfRVJST1IpO1xuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgICAgICAgICB2YXIgc3JjID0gZXh0cmFjdFNyY0Zyb21TdGFja3RyYWNlKGVyci5zdGFjaywgMik7XG4gICAgICAgICAgICAgICAgICAgIGlmICghc3JjICYmICFfaGF2ZVdhcm5lZCgnc3JjJykpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIF93YXJuKCdVbmFibGUgdG8gZGV0ZXJtaW5lIHNyYyBsaW5lIGluZm8nLCAnc3JjJyk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcmVjLnNyYyA9IHNyYyB8fCAnJztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWMudiA9IExPR19WRVJTS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WlzZS5faCA9IDE7XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChoYW5kbGVyID09PSB0cnVlKSByZXN1bHQgPSB2YWx1ZTtcbiAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIGlmIChkb21haW4pIGRvbWFpbi5lbnRlcigpO1xuICAgICAgICAgICAgcmVzdWx0ID0gaGFuZGxlcih2YWx1ZSk7IC8vIG1heSB0aHJvd1xuICAgICAgICAgICAgaWYgKGRvbWFpbikge1xuICAgICAgICAgICAgICBkb21haW4uZXhpdCgpO1xuICAgICAgICAgICAgICBleGl0ZWQgPSB0cnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAocmVzdWx0ID09PSByZWFjdGlvbi5wcm9taXNlKSB7XG4gICAgICAgICAgICByZWplY3QoVHlwZUVycm9yKCdQcm9taXNlLWNoYWluIGN5Y2xlJykpO1xuICAgICAgICAgIH0gZWxzZSBpZiAodGhlbiA9IGlzVGhlbmFibGUocmVzdWx0KSkge1xuICAgICAgICAgICAgdGhlbi5jYWxsKHJlc3VsdCwgcmVzb2x2ZSwgcmVqZWN0KTtcbiAgICAgICAgICB9IGVsc2UgcmVzb2x2ZShyZXN1bHQpO1xuICAgICAgICB9IGVsc2UgcmVqZWN0KHZhbHVlKTtcbiAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgaWYgKGRvbWFpbiAmJiAhZXhpdGVkKSBkb21haW4uZXhpdCgpO1xuICAgICAgICByZWplY3QoZSk7XG4gICAgICB9XG4gICAgfTtcbiAgICB3aGlsZSAoY2hhaW4ubGVuZ3RoID4gaSkgcnVuKGNoYWluW2krK10pOyAvLyB2YXJpYWJsZSBsZW5ndGggLSBjYW4ndCB1c2UgZm9yRWFjaFxuICAgIHByb21pc2UuX2MgPSBbXTtcbiAgICBwcm9taXNlLl9uID0gZmFsc2U7XG4gICAgaWYgKGlzUmVqZWN0ICYmICFwcm9taXNlLl9oKSBvblVuaGFuZGxlZCh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pIHtcbiAgICAgICAgICBpZiAoc3RhdGUgPT09IEdlblN0YXRlU3VzcGVuZGVkU3RhcnQpIHtcbiAgICAgICAgICAgIHN0YXRlID0gR2VuU3RhdGVDb21wbGV0ZWQ7XG4gICAgICAgICAgICB0aHJvdyBjb250ZXh0LmFyZztcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBjb250ZXh0LmRpc3BhdGNoRXhjZXB0aW9uKGNvbnRleHQuYXJnKTtcblxuICAgICAgICB9IGVsc2UgaWYgKGNvbnRleHQubWV0aG9kID09PSBcInJldHVyblwiKSB7XG4gICAgICAgICAgY29udGV4dC5hYnJ1cHQoXCJyZXR1cm5cIiwgY29udGV4dC5hcmcpO1xuICAgICAgICB9XG5cbiAgICAgICAgc3RhdGUgPSBHZW5TdGF0ZUV4ZWN1dGluZztcblxuICAgICAgICB2YXIgcmVjb3JkID0gdHJ5Q2F0Y2goaW5uZXJGbiwgc2VsZiwgY29udGV4dCk7XG4gICAgICAgIGlmIChyZWNvcmQudHlwZSA9PT0gXCJub3JtYWxcIikge1xuICAgICAgICAgIC8vIElmIGFuIGV4Y2VwdGlvbiBpcyB0aHJvd24gZnJvbSBpbm5lckZuLCB3ZSBsZWF2ZSBzdGF0ZSA9PT1cbiAgICAgICAgICAvLyBHZW5TdGF0ZUV4ZWN1dGluZyBhbmQgbG9vcCBiYWNrIGZvciBhbm90aGVyIGludm9jYXRpb24uXG4gICAgICAgICAgc3RhdGUgPSBjb250ZXh0LmRvbmVcbiAgICAgICAgICAgID8gR2VuU3RhdGVDb21wbGV0ZWRcbiAgICAgICAgICAgIDogR2VuU3RhdGVTdXNwZW5kZWRZaWVsZDtcblxuICAgICAgICAgIGlmIChyZWNvcmQuYXJnID09PSBDb250aW51ZVNlbnRpbmVsKSB7XG4gICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgdmFsdWU6IHJlY29yZC5hcmcsXG4gICAgICAgIC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W4gdGhlIGRlbGVnYXRlIGl0ZXJhdG9yIGhhcyBubyAudGhyb3dcbiAgICAgIC8vIG1ldGhvZCBhbHdheXMgdGVybWluYXRlcyB0aGUgeWllbGQqIGxvb3AuXG4gICAgICBjb250ZXh0LmRlbGVnYXRlID0gbnVsbDtcblxuICAgICAgaWYgKGNvbnRleHQubWV0aG9kID09PSBcInRocm93XCIpIHtcbiAgICAgICAgaWYgKGRlbGVnYXRlLml0ZXJhdG9yLnJldHVybikge1xuICAgICAgICAgIC8vIElmIHRoZSBkZWxlZ2F0ZSBpdGVyYXRvciBoYXMgYSByZXR1cm4gbWV0aG9kLCBnaXZlIGl0IGFcbiAgICAgICAgICAvLyBjaGFuY2UgdG8gY2xlYW4gdXAuXG4gICAgICAgICAgY29udGV4dC5tZXRob2QgPSBcInJldHVyblwiO1xuICAgICAgICAgIGNvbnRleHQuYXJnID0gdW5kZWZpbmVkO1xuICAgICAgICAgIG1heWJlSW52b2tlRGVsZWdhdGUoZGVsZWdhdGUsIGNvbnRleHQpO1xuXG4gICAgICAgICAgaWYgKGNvbnRleHQubWV0aG9kID09PSBcInRocm93XCIpIHtcbiAgICAgICAgICAgIC8vIElmIG1heWJlSW52b2tlRGVsZWdhdGUoY29udGV4dCkgY2hhbmdlZCBjb250ZXh0Lm1ldGhvZCBmcm9tXG4gICAgICAgICAgICAvLyBcInJldHVyblwiIHRvIFwidGhyb3dcIiwgbGV0IHRoYXQgb3ZlcnJpZGUgdGhlIFR5cGVFcnJvciBiZWxvdy5cbiAgICAgICAgICAgIHJldHVybiBDb250aW51ZVNlbnRpbmVsO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnRleHQubWV0aG9kID0gXCJ0aHJvd1wiO1xuICAgICAgICBjb250ZXh0LmFyZyA9IG5ldyBUeXBlRXJyb3IoXG4gICAgICAgICAgXCJUaGUgaXRlcmF0b3IgZG9lcyBub3QgcHJvdmlkZSBhICd0aHJvdycgbWV0aG9kXCIpO1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uICAgICAgdmFyIHJvb3RFbnRyeSA9IHRoaXMudHJ5RW50cmllc1swXTtcbiAgICAgIHZhciByb290UmVjb3JkID0gcm9vdEVudHJ5LmNvbXBsZXRpb247XG4gICAgICBpZiAocm9vdFJlY29yZC50eXBlID09PSBcInRocm93XCIpIHtcbiAgICAgICAgdGhyb3cgcm9vdFJlY29yZC5hcmc7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiB0aGlzLnJ2YWw7XG4gICAgfSxcblxuICAgIGRpc3BhdGNoRXhjZXB0aW9uOiBmdW5jdGlvbihleGNlcHRpb24pIHtcbiAgICAgIGlmICh0aGlzLmRvbmUpIHtcbiAgICAgICAgdGhyb3cgZXhjZXB0aW9uO1xuICAgICAgfVxuXG4gICAgICB2YXIgY29udGV4dCA9IHRoaXM7XG4gICAgICBmdW5jdGlvbiBoYW5kbGUobG9jLCBjYXVnaHQpIHtcbiAgICAgICAgcmVjb3JkLnR5cGUgPSBcInRocm93XCI7XG4gICAgICAgIHJlY29yZC5hcmcgPSBleGNlcHRpb247XG4gICAgICAgIGNvbnRleHQubmV4dCA9IGxvYztcblxuICAgICAgICBpZiAoY2F1Z2h0KSB7XG4gICAgICAgICAgLy8gSWYgdGhlIGRpc3BhdGNoZWQgZXhjZXB0aW9uIHdhcyBjYXVnaHQgYnkgYSBjYXRjaCBibG9jayxcbiAgICAgICAgICAvLyB0aGVuIGxldCB0aGF0IGNhdGNoIGJsb2NrIGhhbmRsZSB0aGUgZXhjZXB0aW9uIG5vcm1hbGx5LlxuICAgICAgICAgIGNvbnRleHQubWV0aG9kID0gXCJuZXh0XCI7XG4gICAgICAgICAgY29udGV4dC5hcmcgPSB1bmRlZmluZWQ7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gISEgY2F1Z2h0O1xuICAgICAgfVxuXG4gICAgICBmb3IgKHZhciBpID0gdGhpcy50cnlFbnRyaWVzLmxlbmd0aCAtIDE7IGkgPj0gMDsgLS1pKSB7XG4gICAgICAgIHZhciBl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G9jKSB7XG4gICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuY2F0Y2hMb2MsIHRydWUpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgfSBlbHNlIGlmIChoYXNGaW5hbGx5KSB7XG4gICAgICAgICAgICBpZiAodGhpcy5wcmV2IDwgZW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAgICAgICByZXR1cm4gaGFuZGxlKGVudHJ5LmZpbmFsbHlMb2MpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcInRyeSBzdGF0ZW1lbnQgd2l0aG91dCBjYXRjaCBvciBmaW5hbGx5XCIpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0sXG5cbiAgICBhYnJ1cHQ6IGZ1bmN0aW9uKHR5cGUsIGFyZykge1xuICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG4gICAgICAgIGlmIChlbnRyeS50cnlMb2MgPD0gdGhpcy5wcmV2ICYmXG4gICAgICAgICAgICBoYXNPd24uY2FsbChlbnRyeSwgXCJmaW5hbGx5TG9jXCIpICYmXG4gICAgICAgICAgICB0aGlzLnByZXYgPCBlbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgICAgdmFyIGZpbmFsbHlFbnRyeSA9IGVudHJ5O1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIGlmIChmaW5hbGx5RW50cnkgJiZcbiAgICAgICAgICAodHlwZSA9PT0gXCJicmVha1wiIHx8XG4gICAgICAgICAgIHR5cGUgPT09IFwiY29udGludWVcIikgJiZcbiAgICAgICAgICBmaW5hbGx5RW50cnkudHJ5TG9jIDw9IGFyZyAmJlxuICAgICAgICAgIGFyZyA8PSBmaW5hbGx5RW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAvLyBJZ25vcmUgdGhlIGZpbmFsbHkgZW50cnkgaWYgY29udHJvbCBpcyBub3QganVtcGluZyB0byBhXG4gICAgICAgIC8vIGxvY2F0aW9uIG91dHNpZGUgdGhlIHRyeS9jYXRjaCBibG9jay5cbiAgICAgICAgZmluYWxseUVudHJ5ID0gbnVsbDtcbiAgICAgIH1cblxuICAgICAgdmFyIHJlY29yZCA9IGZpbmFsbHlFbnRyeSA/IGZpbmFsbHlFbnRyeS5jb21wbGV0aW9uIDoge307XG4gICAgICByZWNvcmQudHlwZSA9IHR5cGU7XG4gICAgICByZWNvcmQuYXJnID0gYXJnO1xuXG4gICAgICBpZiAoZmluYWxseUVudHJ5KSB7XG4gICAgICAgIHRoaXMubWV0aG9kID0gXCJuZXh0XCI7XG4gICAgICAgIHRoaXMubmV4dCA9IGZpbmFsbHlFbnRyeS5maW5hbGx5TG9jO1xuICAgICAgICByZXR1cm4gQ29udGludWVTZW50aW5lbDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIHRoaXMuY29tcGxldGUocmVjb3JkKTtcbiAgICB9LFxuXG4gICAgY29tcGxldGU6IGZ1bmN0aW9uKHJlY29yZCwgYWZ0ZXJMb2MpIHtcbiAgICAgIGlmIChyZWNvcmQudHlwZSA9PT0gXCJ0aHJvd1wiKSB7XG4gICAgICAgIHRocm93IHJlY29yZC5hcmc7XG4gICAgICB9XG5cbiAgICAgIGlmIChyZWNvcmQudHlwZSA9PT0gXCJicmVha1wiIHx8XG4gICAgICAgICAgcmVjb3JkLnR5cGUgPT09IFwiY29udGludWVcIikge1xuICAgICAgICB0aGlzLm5leHQgPSByZWNvcmQuYXJnO1xuICAgICAgfSBlbHNlIGlmIChyZWNvcmQudHlwZSA9PT0gXCJyZXR1cm5cIikge1xuICAgICAgICB0aGlzLnJ2YWwgPSB0aGlzLmFyZyA9IHJlY29yZC5hcmc7XG4gIC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sXG4gICAgc3RyZWFtOiBuZXcgUmF3U3RyZWFtKCksXG4gICAgdHlwZTogJ3JhdydcbiAgfSlcbiAgaWYgKHN0cmVhbUxpc3QpIHtcbiAgICBjb25zdCBsaXN0ID0gc3RyZWFtTGlzdC5tYXAoaXRlbSA9PiB7XG4gICAgICBpdGVtLmxldmVsID0gbGV2ZWxcbiAgICB9KVxuICAgIHN0cmVhbXMgPSBzdHJlYW1zLmNvbmNhdChsaXN0KVxuICB9XG4gIGxvZ2dlciA9IGNyZWF0ZUxvZ2dlcih7XG4gICAgbGV2ZWw6IGxldmVsLFxuICAgIG5hbWU6ICdyZWQ1cHJvLWV4dC1zbScsXG4gICAgc3RyZWFtczogc3RyZWFtc1xuICB9KVxufVxuXG4vKipcbiAqIFJldHVybiB0aGUgZGV0ZXJtaW5lZCBsb2dnZXIgaW5zdGFuY2UuXG4gKlxuICogQHJldHVybiB7T2JqZWN0fVxuICpcbiAqIEBwcml2YXRlXG4gKi9cbmV4cG9ydCBjb25zdCBnZXRMb2dnZXIgPSAoKSA9PiB7XG4gIHJldHVybiBsb2dnZXJcbn1cblxuLyogUXVpY2sgYWNjZXNzIHRvIGxvZ2dlciBsZXZlbCB0eXBlcy4gKi9cbmV4cG9ydCBjb25zdCB0cmFjZSA9IGRlY29yYXRlKExFVkVMUy5UUkFDRSlcbmV4cG9ydCBjb25zdCBpbmZvID0gZGVjb3JhdGUoTEVWRUxTLklORk8pXG5leHBvcnQgY29uc3QgZGVidWcgPSBkZWNvcmF0ZShMRVZFTFMuREVCVUcpXG5leHBvcnQgY29uc3Qgd2FybiA9IGRlY29yYXRlKExFVkVMUy5XQVJOKVxuZXhwb3J0IGNvbnN0IGVycm9yID0gZGVjb3JhdGUoTEVWRUxTLkVSUk9SKVxuZXhwb3J0IGNvbnN0IGZhdGFsID0gZGVjb3JhdGUoTEVWRUxTLkZBVEFMKVxuIl0sInNvdXJjZVJvb3QiOiIifQ== \ No newline at end of file diff --git a/examples/browser/publisher-failover.html b/examples/browser/publisher-failover.html index c406a89..ddcc80a 100644 --- a/examples/browser/publisher-failover.html +++ b/examples/browser/publisher-failover.html @@ -13,7 +13,6 @@ (function (red5prosdk, sm_ext) { red5prosdk.setLogLevel('debug'); sm_ext.setLogLevel('debug'); - sm_ext.decorate(); var autoscaleConfig = { protocol: 'https', @@ -50,7 +49,10 @@ productInstallURL: './lib/swfobject/playerProductInstall.swf' } }; - var pub = new red5prosdk.Red5ProPublisher() + // ---- OPTION 1 ---- // + /* + sm_ext.decorate(); + new red5prosdk.Red5ProPublisher() .setPublishOrder(['rtc', 'rtmp']) .autoscale(autoscaleConfig, config) .then(function (publisher) { @@ -59,6 +61,19 @@ .catch(function (error) { console.error(error) }); + */ + + // ---- OPTION 2 ---- // + var failover = new red5prosdk.Red5ProPublisher() + .setPublishOrder(['rtc', 'rtmp']) + sm_ext.Autoscale(failover) + .init(autoscaleConfig, config) + .then(function (publisher) { + return publisher.publish() + }) + .catch(function (error) { + console.error(error) + }); })(window.red5prosdk, window.red5prosdk_ext_stream_manager); diff --git a/src/js/index.js b/src/js/index.js index 25ccf51..2dcba99 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -10,7 +10,7 @@ import { LEVELS, establishLogger } from './log' import { getLogger as _getLogger } from './log' import environment from './env/browser' -import { Decorate } from './autoscale' +import { Autoscale, Decorate } from './autoscale' establishLogger(`${LOG_LEVEL}` || LEVELS.DEBUG) // eslint-disable-line no-undef @@ -70,3 +70,5 @@ export const decorate = () => { getLogger().warn('Could not decorate the red5prosdk global. It does not exist.') } } + +export { Autoscale } From daa5a2450bfcdf6bfdeb9a9ba0e3d823a4bf9a1f Mon Sep 17 00:00:00 2001 From: bustardcelly Date: Mon, 11 Jun 2018 10:23:58 -0400 Subject: [PATCH 05/15] adding glom of connectionParams. --- .../lib/red5pro/red5pro-ext-stream-manager.js | 10 +++++----- examples/browser/publisher-failover.html | 18 ++++++++++++++---- src/js/autoscale/index.js | 6 +++--- 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/examples/browser/lib/red5pro/red5pro-ext-stream-manager.js b/examples/browser/lib/red5pro/red5pro-ext-stream-manager.js index 2c811d6..190f54e 100644 --- a/examples/browser/lib/red5pro/red5pro-ext-stream-manager.js +++ b/examples/browser/lib/red5pro/red5pro-ext-stream-manager.js @@ -4500,22 +4500,22 @@ var isRTC = /(wss|ws)/; var modifyInitConfigWithResponse = function modifyInitConfigWithResponse(config, response, autoscaleConfig) { var c = void 0; if (autoscaleConfig.useProxy && isRTC.test(config.protocol)) { - var connParams = { + var connectionParams = (0, _extends3.default)({}, config.connectionParams, { host: response.serverAddress, app: response.scope.substr(1, response.scope.length - 1) - }; + }); c = (0, _extends3.default)({}, config, { protocol: config.protocol, port: config.port, streamName: response.name, host: autoscaleConfig.host, app: 'streammanager', - connectionParams: config.connectionParams ? (0, _extends3.default)({}, config.connectionParams, { connParams: connParams }) : connParams + connectionParams: connectionParams }); } else { c = (0, _extends3.default)({}, config, { host: response.serverAddress, - app: response.scope, + app: response.scope.substr(1, response.scope.length - 1), streamName: response.name }); } @@ -5039,4 +5039,4 @@ module.exports = __webpack_require__(/*! /Users/toddanderson/Documents/Workplace /******/ }); }); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9yZWQ1cHJvc2RrX2V4dF9zdHJlYW1fbWFuYWdlci93ZWJwYWNrL3VuaXZlcnNhbE1vZHVsZURlZmluaXRpb24iLCJ3ZWJwYWNrOi8vcmVkNXByb3Nka19leHRfc3RyZWFtX21hbmFnZXIvd2VicGFjay9ib290c3RyYXAiLCJ3ZWJwYWNrOi8vcmVkNXByb3Nka19leHRfc3RyZWFtX21hbmFnZXIvLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL2pzb24vc3RyaW5naWZ5LmpzIiwid2VicGFjazovL3JlZDVwcm9zZGtfZXh0X3N0cmVhbV9tYW5hZ2VyLy4vbm9kZ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d1bWVudHM7XG5cbiAgICBpZiAodHlwZW9mIGYgIT09ICdzdHJpbmcnKSB7XG4gICAgICAgIHZhciBvYmplY3RzID0gbmV3IEFycmF5KGFyZ3VtZW50cy5sZW5ndGgpO1xuICAgICAgICBmb3IgKHZhciBpJDEgPSAwO2kkMSA8IGFyZ3VtZW50cy5sZW5ndGg7IGkkMSsrKSB7XG4gICAgICAgICAgICBvYmplY3RzW2kkMV0gPSBpbnNwZWN0KGFyZ3VtZW50cyQxW2kkMV0pO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBvYmplY3RzLmpvaW4oJyAnKTtcbiAgICB9XG4gICAgdmFyIGZvcm1hdFJlZ0V4cCA9IC8lW3NkaiVdL2c7XG4gICAgdmFyIGkgPSAxO1xuICAgIHZhciBhcmdzID0gYXJndW1lbnRzO1xuICAgIHZhciBsZW4gPSBhcmdzLmxlbmd0aDtcbiAgICB2YXIgc3RyID0gU3RyaW5nKGYpLnJlcGxhY2UoZm9ybWF0UmVnRXhwLCBmdW5jdGlvbiAoeCkge1xuICAgICAgICBpZiAoeCA9PT0gJyUlJykge1xuICAgICAgICAgICAgcmV0dXJuICclJztcbiAgICAgICAgfVxuICAgICAgICBpZiAoaSA+PSBsZW4pIHtcbiAgICAgICAgICAgIHJldHVybiB4O1xuICAgICAgICB9XG4gICAgICAgIHN3aXRjaCAoeCkge1xuICAgICAgICAgICAgY2FzZSAnJXMnOlxuICAgICAgICAgICAgICAgIHJldHVybiBTdHJpbmcoYXJnc1tpKytdKTtcbiAgICAgICAgICAgIGNhc2UgJyVkJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gTnVtYmVyKGFyZ3NbaSsrXSk7XG4gICAgICAgICAgICBjYXNlICclaic6XG4gICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KGFyZ3NbaSsrXSk7XG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoXykge1xuICAgICAgICA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b24gbGV2ZWxzIChuYW1lLCB2YWx1ZSkge1xuICAgICAgICB2YXIgdGhpcyQxID0gdGhpcztcblxuICAgIGlmIChuYW1lID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuc3RyZWFtcy5tYXAoZnVuY3Rpb24gKHMpIHsgcmV0dXJuIHMubGV2ZWw7IH0pO1xuICAgIH1cbiAgICB2YXIgc3RyZWFtO1xuICAgIGlmICh0eXBlb2YgbmFtZSA9PT0gJ251bWJlcicpIHtcbiAgICAgICAgc3RyZWFtID0gdGhpcy5zdHJlYW1zW25hbWVdO1xuICAgICAgICBpZiAoc3RyZWFtID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignaW52YWxpZCBzdHJlYW0gaW5kZXg6ICcgKyBuYW1lKTtcbiAgICAgICAgfVxuICAgIH0gZWxzZSB7XG4gICAgICAgIHZhciBsZW4gPSB0aGlzLnN0cmVhbXMubGVuZ3RoO1xuICAgICAgICBmb3IgKHZhciBpID0gMDtpIDwgbGVuOyBpKyspIHtcbiAgICAgICAgICAgIHZhciBzID0gdGhpcyQxLnN0cmVhbXNbaV07XG4gICAgICAgICAgICBpZiAocy5uYW1lID09PSBuYW1lKSB7XG4gICAgICAgICAgICAgICAgc3RyZWFtID0gcztcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBpZiAoIXN0cmVhbSkge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGZvcm1hdCgnbm8gc3RyZWFtIHdpdGggbmFtZSBcIiVzXCInLCBuYW1lKSk7XG4gICAgICAgIH1cbiAgICB9XG4gICAgaWYgKHZhbHVlID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgcmV0dXJuIHN0cmVhbS5sZXZlbDtcbiAgICB9IGVsc2Uge1xuICAgICAgICB2YXIgbmV3TGV2ZWwgPSByZXNvbHZlTGV2ZWwodmFsdW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XJpYWxpemVycy5lcnIoYXJnc1swXSlcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIGV4Y2x1ZGVGaWVsZHMgPSB7XG4gICAgICAgICAgICAgICAgICAgIGVycjogdHJ1ZVxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgaWYgKGFyZ3MubGVuZ3RoID09PSAxKSB7XG4gICAgICAgICAgICAgICAgICAgIG1zZ0FyZ3MgPSBbZmllbGRzLmVyci5tZXNzYWdlXTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBtc2dBcmdzID0gQXJyYXkucHJvdG90eXBlLnNsaWNlLmNhbGwoYXJncywgMSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmICh0eXBlb2YgYXJnc1swXSAhPT0gJ29iamVjdCcgJiYgYXJnc1swXSAhPT0gbnVsbCB8fCBBcnJheS5pc0FycmF5KGFyZ3NbMF0pKSB7XG4gICAgICAgICAgICAgICAgZmllbGRzID0gbnVsbDtcbiAgICAgICAgICAgICAgICBtc2dBcmdzID0gQXJyYXkucHJvdG90eXBlLnNsaWNlLmNhbGwoYXJncyk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGZpZWxkcyA9IGFyZ3NbMF07XG4gICAgICAgICAgICAgICAgaWYgKGFyZ3MubGVuZ3RoID09PSAxICYmIGZpZWxkcy5lcnIgJiYgZmllbGRzLmVyciBpbnN0YW5jZW9mIEVycm9yKSB7XG4gICAgICAgICAgICAgICAgICAgIG1zZ0FyZ3MgPSBbZmllbGRzLmVyci5tZXNzYWdlXTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBtc2dBcmdzID0gQXJyYXkucHJvdG90eXBlLnNsaWNlLmNhbGwoYXJncywgMSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdmFyIHJlYyA9IG9iakNvcHkobG9nLmZpZWxkcyk7XG4gICAgICAgICAgICByZWMubGV2ZWwgPSBtaW5MZXZlbDtcbiAgICAgICAgICAgIHZhciByZWNGaWVsZHMgPSBmaWVsZHMgPyBvYmpDb3B5KGZpZWxkcykgOiBudWxsO1xuICAgICAgICAgICAgaWYgKHJlY0ZpZWxkcykge1xuICAgICAgICAgICAgICAgIGlmIChsb2cuc2VyaWFsaXplcnMpIHtcbiAgICAgICAgICAgICAgICAgICAgbG9nLl9hcHBseVNlcmlhbGl6ZXJzKHJlY0ZpZWxkcywgZXhjbHVkZUZpZWxkcyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIE9iamVjdC5rZXlzKHJlY0ZpZWxkcykuZm9yRWFjaChmdW5jdGlvbiAoaykge1xuICAgICAgICAgICAgICAgICAgICByZWNba10gPSByZWNGaWVsZHNba107XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWMubGV2ZWxOYW1lID0gbmFtZUZyb21MZXZlbFttaW5MZXZlbF07XG4gICAgICAgICAgICByZWMubXNnID0gbXNnQXJncy5sZW5ndGggPyBmb3JtYXQuYXBwbHkobG9nLCBtc2dBcmdzKSA6ICcnO1xuICAgICAgICAgICAgaWYgKCFyZWMudGltZSkge1xuICAgICAgICAgICAgICAgIHJlYy50aW1lID0gbmV3IERhdGUoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChsb2cuc3JjICYmICFyZWMuc3JjKSB7XG4gICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKENBTExfU1RBQ0tfRVJST1IpO1xuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgICAgICAgICB2YXIgc3JjID0gZXh0cmFjdFNyY0Zyb21TdGFja3RyYWNlKGVyci5zdGFjaywgMik7XG4gICAgICAgICAgICAgICAgICAgIGlmICghc3JjICYmICFfaGF2ZVdhcm5lZCgnc3JjJykpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIF93YXJuKCdVbmFibGUgdG8gZGV0ZXJtaW5lIHNyYyBsaW5lIGluZm8nLCAnc3JjJyk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcmVjLnNyYyA9IHNyYyB8fCAnJztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWMudiA9IExPR19WRVJTSU9OO1xuICAgICAgICAgICAgcmV0dXJuIHJlYztcbiAgICAgICAgfVxuICAgICAgICBcbiAgICAgICAgdmFyIGZpZWxkcyA9IG51bGw7XG4gICAgICAgIHZhciBtc2dBcmdzID0gYXJndW1lbnRzO1xuICAgICAgICB2YXIgcmVjID0gbnVsbDtcbiAgICAgICAgaWYgKGFyZ3VtZW50cy5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLl9sZXZlbCA8PSBtaW5MZXZlbDtcbiAgICAgICAgfSBlbHNlIGlmICh0aGlzLl9sZXZlbCA+IG1pbkxldmVsKSB7fSBlbHNlIHtcbiAgICAgICAgICAgIHJlYyA9IG1rUmVjb3JkKG1zZ0FyZ3MpO1xuICAgICAgICAgICAgdGhpcy5fZW1pdChyZWMpO1xuICAgICAgICB9XG4gICAgfTtcbn1cblxuTG9nZ2VyLnByb3RvdHlwZS50cmFjZSA9IG1rTG9nRW1pdHRlcihUUkFDRSk7XG5Mb2dnZXIucHJvdG90eXBlLmRlYnVnID0gbWtMb2dFbWl0dGVyKERFQlVHKTtcbkxvZ2dlci5wcm90b3R5cGUuaW5mbyA9IG1rTG9nRW1pdHRlcihJTkZPKTtcbkxvZ2dlci5wcm90b3R5cGUud2FybiA9IG1rTG9nRW1pdHRlcihXQVJOKTtcbkxvZ2dlci5wcm90b3R5cGUuZXJyb3IgPSBta0xvZ0VtaXR0ZXIoRVJST1IpO1xuTG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ICAgdmFyIHJlamVjdCA9IHJlYWN0aW9uLnJlamVjdDtcbiAgICAgIHZhciBkb21haW4gPSByZWFjdGlvbi5kb21haW47XG4gICAgICB2YXIgcmVzdWx0LCB0aGVuLCBleGl0ZWQ7XG4gICAgICB0cnkge1xuICAgICAgICBpZiAoaGFuZGxlcikge1xuICAgICAgICAgIGlmICghb2spIHtcbiAgICAgICAgICAgIGlmIChwcm9taXNlLl9oID09IDIpIG9uSGFuZGxlVW5oYW5kbGVkKHByb21pc2UpO1xuICAgICAgICAgICAgcHJvbWlzZS5faCA9IDE7XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChoYW5kbGVyID09PSB0cnVlKSByZXN1bHQgPSB2YWx1ZTtcbiAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIGlmIChkb21haW4pIGRvbWFpbi5lbnRlcigpO1xuICAgICAgICAgICAgcmVzdWx0ID0gaGFuZGxlcih2YWx1ZSk7IC8vIG1heSB0aHJvd1xuICAgICAgICAgICAgaWYgKGRvbWFpbikge1xuICAgICAgICAgICAgICBkb21haW4uZXhpdCgpO1xuICAgICAgICAgICAgICBleGl0ZWQgPSB0cnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAocmVzdWx0ID09PSByZWFjdGlvbi5wcm9taXNlKSB7XG4gICAgICAgICAgICByZWplY3QoVHlwZUVycm9yKCdQcm9taXNlLWNoYWluIGN5Y2xlJykpO1xuICAgICAgICAgIH0gZWxzZSBpZiAodGhlbiA9IGlzVGhlbmFibGUocmVzdWx0KSkge1xuICAgICAgICAgICAgdGhlbi5jYWxsKHJlc3VsdCwgcmVzb2x2ZSwgcmVqZWN0KTtcbiAgICAgICAgICB9IGVsc2UgcmVzb2x2ZShyZXN1bHQpO1xuICAgICAgICB9IGVsc2UgcmVqZWN0KHZhbHVlKTtcbiAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgaWYgKGRvbWFpbiAmJiAhZXhpdGVkKSB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GUgPSBjb250ZXh0LmRvbmVcbiAgICAgICAgICAgID8gR2VuU3RhdGVDb21wbGV0ZWRcbiAgICAgICAgICAgIDogR2VuU3RhdGVTdXNwZW5kZWRZaWVsZDtcblxuICAgICAgICAgIGlmIChyZWNvcmQuYXJnID09PSBDb250aW51ZVNlbnRpbmVsKSB7XG4gICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgdmFsdWU6IHJlY29yZC5hcmcsXG4gICAgICAgICAgICBkb25lOiBjb250ZXh0LmRvbmVcbiAgICAgICAgICB9O1xuXG4gICAgICAgIH0gZWxzZSBpZiAocmVjb3JkLnR5cGUgPT09IFwidGhyb3dcIikge1xuICAgICAgICAgIHN0YXRlID0gR2VuU3RhdGVDb21wbGV0ZWQ7XG4gICAgICAgICAgLy8gRGlzcGF0Y2ggdGhlIGV4Y2VwdGlvbiBieSBsb29waW5nIGJhY2sgYXJvdW5kIHRvIHRoZVxuICAgICAgICAgIC8vIGNvbnRleHQuZGlzcGF0Y2hFeGNlcHRpb24oY29udGV4dC5hcmcpIGNhbGwgYWJvdmUuXG4gICAgICAgICAgY29udGV4dC5tZXRob2QgPSBcInRocm93XCI7XG4gICAgICAgICAgY29udGV4dC5hcmcgPSByZWNvcmQuYXJnO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfTtcbiAgfVxuXG4gIC8vIENhbGwgZGVsZWdhdGUuaXRlcmF0b3JbY29udGV4dC5tZXRob2RdKGNvbnRleHQuYXJnKSBhbmQgaGFuZGxlIHRoZVxuICAvLyByZXN1bHQsIGVpdGhlciBieSByZXR1cm5pbmcgYSB7IHZhbHVlLCBkb25lIH0gcmVzdWx0IGZyb20gdGhlXG4gIC8vIGRlbGVnYXRlIGl0ZXJhdG9yLCBvciBieSBtb2RpZnlpbmcgY29udGV4dC5tZXRob2QgYW5kIGNvbnRleHQuYXJnLFxuICAvLyBzZXR0aW5nIGNvbnRleHQuZG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5jaGFyQXQoMCkgPT09IFwidFwiICYmXG4gICAgICAgICAgICAgIGhhc093bi5jYWxsKHRoaXMsIG5hbWUpICYmXG4gICAgICAgICAgICAgICFpc05hTigrbmFtZS5zbGljZSgxKSkpIHtcbiAgICAgICAgICAgIHRoaXNbbmFtZV0gPSB1bmRlZmluZWQ7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfSxcblxuICAgIHN0b3A6IGZ1bmN0aW9uKCkge1xuICAgICAgdGhpcy5kb25lID0gdHJ1ZTtcblxuICAgICAgdmFyIHJvb3RFbnRyeSA9IHRoaXMudHJ5RW50cmllc1swXTtcbiAgICAgIHZhciByb290UmVjb3JkID0gcm9vdEVudHJ5LmNvbXBsZXRpb247XG4gICAgICBpZiAocm9vdFJlY29yZC50eXBlID09PSBcInRocm93XCIpIHtcbiAgICAgICAgdGhyb3cgcm9vdFJlY29yZC5hcmc7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiB0aGlzLnJ2YWw7XG4gICAgfSxcblxuICAgIGRpc3BhdGNoRXhjZXB0aW9uOiBmdW5jdGlvbihleGNlcHRpb24pIHtcbiAgICAgIGlmICh0aGlzLmRvbmUpIHtcbiAgICAgICAgdGhyb3cgZXhjZXB0aW9uO1xuICAgICAgfVxuXG4gICAgICB2YXIgY29udGV4dCA9IHRoaXM7XG4gICAgICBmdW5jdGlvbiBoYW5kbGUobG9jLCBjYXVnaHQpIHtcbiAgICAgICAgcmVjb3JkLnR5cGUgPSBcInRocm93XCI7XG4gICAgICAgIHJlY29yZC5hcmcgPSBleGNlcHRpb247XG4gICAgICAgIGNvbnRleHQubmV4dCA9IGxvYztcblxuICAgICAgICBpZiAoY2F1Z2h0KSB7XG4gICAgICAgICAgLy8gSWYgdGhlIGRpc3BhdGNoZWQgZXhjZXB0aW9uIHdhcyBjYXVnaHQgYnkgYSBjYXRjaCBibG9jayxcbiAgICAgICAgICAvLyB0aGVuIGxldCB0aGF0IGNhdGNoIGJsb2NrIG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gICByZXR1cm4gaGFuZGxlKGVudHJ5LmNhdGNoTG9jLCB0cnVlKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAodGhpcy5wcmV2IDwgZW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAgICAgICByZXR1cm4gaGFuZGxlKGVudHJ5LmZpbmFsbHlMb2MpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgfSBlbHNlIGlmIChoYXNDYXRjaCkge1xuICAgICAgICAgICAgaWYgKHRoaXMucHJldiA8IGVudHJ5LmNhdGNoTG9jKSB7XG4gICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuY2F0Y2hMb2MsIHRydWUpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgfSBlbHNlIGlmIChoYXNGaW5hbGx5KSB7XG4gICAgICAgICAgICBpZiAodGhpcy5wcmV2IDwgZW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAgICAgICByZXR1cm4gaGFuZGxlKGVudHJ5LmZpbmFsbHlMb2MpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcInRyeSBzdGF0ZW1lbnQgd2l0aG91dCBjYXRjaCBvciBmaW5hbGx5XCIpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0sXG5cbiAgICBhYnJ1cHQ6IGZ1bmN0aW9uKHR5cGUsIGFyZykge1xuICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG4gICAgICAgIGlmIChlbnRyeS50cnlMb2MgPD0gdGhpcy5wcmV2ICYmXG4gICAgICAgICAgICBoYXNPd24uY2FsbChlbnRyeSwgXCJmaW5hbGx5TG9jXCIpICYmXG4gICAgICAgICAgICB0aGlzLnByZXYgPCBlbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgICAgdmFyIGZpbmFsbHlFbnRyeSA9IGVudHJ5O1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIGlmIChmaW5hbGx5RW50cnkgJiZcbiAgICAgICAgICAodHlwZSA9PT0gXCJicmVha1wiIHx8XG4gICAgICAgICAgIHR5cGUgPT09IFwiY29udGludWVcIikgJiZcbiAgICAgICAgICBmaW5hbGx5RW50cnkudHJ5TG9jIDw9IGFyZyAmJlxuICAgICAgICAgIGFyZyA8PSBmaW5hbGx5RW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAvLyBJZ25vcmUgdGhlIGZpbmFsbHkgZW50cnkgaWYgY29udHJvbCBpcyBub3QganVtcGluZyB0byBhXG4gICAgICAgIC8vIGxvY2F0aW9uIG91dHNpZGUgdGhlIHRyeS9jYXRjaCBibG9jay5cbiAgICAgICAgZmluYWxseUVudHJ5ID0gbnVsbDtcbiAgICAgIH1cblxuICAgICAgdmFyIHJlY29yZCA9IGZpbmFsbHlFbnRyeSA/IGZpbmFsbHlFbnRyeS5jb21wbGV0aW9uIDoge307XG4gICAgICByZWNvcmQudHlwZSA9IHR5cGU7XG4gICAgICByZWNvcmQuYXJnID0gYXJnO1xuXG4gICAgICBpZiAoZmluYWxseUVudHJ5KSB7XG4gICAgICAgIHRoaXMubWV0aG9kID0gXCJuZXh0XCI7XG4gICAgICAgIHRoaXMubmV4dCA9IGZpbmFsbHlFbnRyeS5maW5hbGx5TG9jO1xuICAgICAgICByZXR1cm4gQ29udGludWVTZW50aW5lbDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIHRoaXMuY29tcGxldGUocmVjb3JkKTtcbiAgICB9LFxuXG4gICAgY29tcGxldGU6IGZ1bmN0aW9uKHJlY29yZCwgYWZ0ZXJMb2MpIHtcbiAgICAgIGlmIChyZWNvcmQudHlwZSA9PT0gXCJ0aHJvd1wiKSB7XG4gICAgICAgIHRocm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ICB9IGVsc2UgaWYgKHRoaXMuX2JvZHlBcnJheUJ1ZmZlcikge1xuICAgICAgICAgIHJldHVybiBQcm9taXNlLnJlc29sdmUobmV3IEJsb2IoW3RoaXMuX2JvZHlBcnJheUJ1ZmZlcl0pKVxuICAgICAgICB9IGVsc2UgaWYgKHRoaXMuX2JvZHlGb3JtRGF0YSkge1xuICAgICAgICAgIHRocm93IG5ldyBFcnJvcignY291bGQgbm90IHJlYWQgRm9ybURhdGEgYm9keSBhcyBibG9iJylcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICByZXR1cm4gUHJvbWlzZS5yZXNvbHZlKG5ldyBCbG9iKFt0aGlzLl9ib2R5VGV4dF0pKVxuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIHRoaXMuYXJyYXlCdWZmZXIgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgaWYgKHRoaXMuX2JvZHlBcnJheUJ1ZmZlcikge1xuICAgICAgICAgIHJldHVybiBjb25zdW1lZCh0aGlzKSB8fCBQcm9taXNlLnJlc29sdmUodGhpcy5fYm9keUFycmF5QnVmZmVyKVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHJldHVybiB0aGlzLmJsb2IoKS50aGVuKHJlYWRCbG9iQXNBcnJheUJ1ZmZlcilcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cblxuICAgIHRoaXMudGV4dCA9IGZ1bmN0aW9uKCkge1xuICAgICAgdmFyIHJlamVjdGVkID0gY29uc3VtZWQodGhpcylcbiAgICAgIGlmIChyZWplY3RlZCkge1xuICAgICAgICByZXR1cm4gcmVqZWN0ZWRcbiAgICAgIH1cblxuICAgICAgaWYgKHRoaXMuX2JvZHlCbG9iKSB7XG4gICAgICAgIHJldHVybiByZWFkQmxvYkFzVGV4dCh0aGlzLl9ib2R5QmxvYilcbiAgICAgIH0gZWxzZSBpZiAodGhpcy5fYm9keUFycmF5QnVmZmVyKSB7XG4gICAgICAgIHJldHVybiBQcm9taXNlLnJl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G4gICAgdmFyIGZvcm1hdFJlZ0V4cCA9IC8lW3NkaiVdL2c7XG4gICAgdmFyIGkgPSAxO1xuICAgIHZhciBhcmdzID0gYXJndW1lbnRzO1xuICAgIHZhciBsZW4gPSBhcmdzLmxlbmd0aDtcbiAgICB2YXIgc3RyID0gU3RyaW5nKGYpLnJlcGxhY2UoZm9ybWF0UmVnRXhwLCBmdW5jdGlvbiAoeCkge1xuICAgICAgICBpZiAoeCA9PT0gJyUlJykge1xuICAgICAgICAgICAgcmV0dXJuICclJztcbiAgICAgICAgfVxuICAgICAgICBpZiAoaSA+PSBsZW4pIHtcbiAgICAgICAgICAgIHJldHVybiB4O1xuICAgICAgICB9XG4gICAgICAgIHN3aXRjaCAoeCkge1xuICAgICAgICAgICAgY2FzZSAnJXMnOlxuICAgICAgICAgICAgICAgIHJldHVybiBTdHJpbmcoYXJnc1tpKytdKTtcbiAgICAgICAgICAgIGNhc2UgJyVkJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gTnVtYmVyKGFyZ3NbaSsrXSk7XG4gICAgICAgICAgICBjYXNlICclaic6XG4gICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KGFyZ3NbaSsrXSk7XG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoXykge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1tDaXJjdWxhcl0nO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgcmV0dXJuIHg7XG4gICAgICAgIH1cbiAgICB9KTtcbiAgICBmb3IgKHZhciB4ID0gYXJnc1tpXTtpIDwgbGVuOyB4ID0gYXJnc1srK2ldKSB7XG4gICAgICAgIHN0ciArPSAnICcgKyB4O1xuICAgIH1cbiAgICByZXR1cm4gc3RyO1xufVxuXG5mdW5jdGlvbiBleHRyYWN0U3JjRnJvbVN0YWNrdHJhY2Uoc3Rh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gICAgIHJldHVybiBzdHI7XG4gICAgfVxuICAgIHZhciBsZXZlbCA9IHJlYy5sZXZlbDtcbiAgICBmb3IgKGkgPSAwOyBpIDwgdGhpcy5zdHJlYW1zLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgIHZhciBzID0gdGhpcyQxLnN0cmVhbXNbaV07XG4gICAgICAgIGlmIChzLmxldmVsIDw9IGxldmVsKSB7XG4gICAgICAgICAgICBzLnN0cmVhbS53cml0ZShyZWMpO1xuICAgICAgICB9XG4gICAgfVxuICAgIHJldHVybiBzdHI7XG59O1xuZnVuY3Rpb24gbWtMb2dFbWl0dGVyKG1pbkxldmVsKSB7XG4gICAgcmV0dXJuIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgdmFyIGxvZyA9IHRoaXM7XG4gICAgICAgIGZ1bmN0aW9uIG1rUmVjb3JkKGFyZ3MpIHtcbiAgICAgICAgICAgIHZhciBleGNsdWRlRmllbGRzO1xuICAgICAgICAgICAgaWYgKGFyZ3NbMF0gaW5zdGFuY2VvZiBFcnJvcikge1xuICAgICAgICAgICAgICAgIGZpZWxkcyA9IHtcbiAgICAgICAgICAgICAgICAgICAgZXJyOiBsb2cuc2VyaWFsaXplcnMgJiYgbG9nLnNlcmlhbGl6ZXJzLmVyciA/IGxvZy5zZXJpYWxpemVycy5lcnIoYXJnc1swXSkgOiBzdGRTZXJpYWxpemVycy5lcnIoYXJnc1swXSlcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIGV4Y2x1ZGVGaWVsZHMgPSB7XG4gICAgICAgICAgICAgICAgICAgIGVycjogdHJ1ZVxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgaWYgKGFyZ3MubGVuZ3RoID09PSAxKSB7XG4gICAgICAgICAgICAgICAgICAgIG1zZ0FyZ3MgPSBbZmllbGRzLmVyci5tZXNzYWdlXTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBtc2dBcmdzID0gQXJyYXkucHJvdG90eXBlLnNsaWNlLmNhbGwoYXJncywgMSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmICh0eXBlb2YgYXJnc1swXSAhPT0gJ29iamVjdCcgJiYgYXJnc1swXSAhPT0gbnVsbCB8fCBBcnJheS5pc0FycmF5KGFyZ3NbMF0pKSB7XG4gICAgICAgICAgICAgICAgZmllbGRzID0gbnVsbDtcbiAgICAgICAgICAgICAgICBtc2dBcmdzID0gQXJyYXkucHJvdG90eXBlLnNsaWNlLmNhbGwoYXJncyk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGZpZWxkcyA9IGFyZ3NbMF07XG4gICAgICAgICAgICAgICAgaWYgKGFyZ3MubGVuZ3RoID09PSAxICYmIGZpZWxkcy5lcnIgJiYgZmllbGRzLmVyciBpbnN0YW5jZW9mIEVycm9yKSB7XG4gICAgICAgICAgICAgICAgICAgIG1zZ0FyZ3MgPSBbZmllbGRzLmVyci5tZXNzYWdlXTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBtc2dBcmdzID0gQXJyYXkucHJvdG90eXBlLnNsaWNlLmNhbGwoYXJncywgMSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdmFyIHJlYyA9IG9iakNvcHkobG9nLmZpZWxkcyk7XG4gICAgICAgICAgICByZWMubGV2ZWwgPSBtaW5MZXZlbDtcbiAgICAgICAgICAgIHZhciByZWNGaWVsZHMgPSBmaWVsZHMgPyBvYmpDb3B5KGZpZWxkcykgOiBudWxsO1xuICAgICAgICAgICAgaWYgKHJlY0ZpZWxkcykge1xuICAgICAgICAgICAgICAgIGlmIChsb2cuc2VyaWFsaXplcnMpIHtcbiAgICAgICAgICAgICAgICAgICAgbG9nLl9hcHBseVNlcmlhbGl6ZXJzKHJlY0ZpZWxkcywgZXhjbHVkZUZpZWxkcyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIE9iamVjdC5rZXlzKHJlY0ZpZWxkcykuZm9yRWFjaChmdW5jdGlvbiAoaykge1xuICAgICAgICAgICAgICAgICAgICByZWNba10gPSByZWNGaWVsZHNba107XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWMubGV2ZWxOYW1lID0gbmFtZUZyb21MZXZlbFttaW5MZXZlbF07XG4gICAgICAgICAgICByZWMubXNnID0gbXNnQXJncy5sZW5ndGggPyBmb3JtYXQuYXBwbHkobG9nLCBtc2dBcmdzKSA6ICcnO1xuICAgICAgICAgICAgaWYgKCFyZWMudGltZSkge1xuICAgICAgICAgICAgICAgIHJlYy50aW1lID0gbmV3IERhdGUoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChsb2cuc3JjICYmICFyZWMuc3JjKSB7XG4gICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKENBTExfU1RBQ0tfRVJST1IpO1xuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgICAgICAgICB2YXIgc3JjID0gZXh0cmFjdFNyY0Zyb21TdGFja3RyYWNlKGVyci5zdGFjaywgMik7XG4gICAgICAgICAgICAgICAgICAgIGlmICghc3JjICYmICFfaGF2ZVdhcm5lZCgnc3JjJykpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIF93YXJuKCdVbmFibGUgdG8gZGV0ZXJtaW5lIHNyYyBsaW5lIGluZm8nLCAnc3JjJyk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcmVjLnNyYyA9IHNyYyB8fCAnJztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWMudiA9IExPR19WRVJTSU9OO1xuICAgICAgICAgICAgcmV0dXJuIHJlYztcbiAgICAg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GlmIChoYW5kbGVyID09PSB0cnVlKSByZXN1bHQgPSB2YWx1ZTtcbiAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIGlmIChkb21haW4pIGRvbWFpbi5lbnRlcigpO1xuICAgICAgICAgICAgcmVzdWx0ID0gaGFuZGxlcih2YWx1ZSk7IC8vIG1heSB0aHJvd1xuICAgICAgICAgICAgaWYgKGRvbWFpbikge1xuICAgICAgICAgICAgICBkb21haW4uZXhpdCgpO1xuICAgICAgICAgICAgICBleGl0ZWQgPSB0cnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAocmVzdWx0ID09PSByZWFjdGlvbi5wcm9taXNlKSB7XG4gICAgICAgICAgICByZWplY3QoVHlwZUVycm9yKCdQcm9taXNlLWNoYWluIGN5Y2xlJykpO1xuICAgICAgICAgIH0gZWxzZSBpZiAodGhlbiA9IGlzVGhlbmFibGUocmVzdWx0KSkge1xuICAgICAgICAgICAgdGhlbi5jYWxsKHJlc3VsdCwgcmVzb2x2ZSwgcmVqZWN0KTtcbiAgICAgICAgICB9IGVsc2UgcmVzb2x2ZShyZXN1bHQpO1xuICAgICAgICB9IGVsc2UgcmVqZWN0KHZhbHVlKTtcbiAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgaWYgKGRvbWFpbiAmJiAhZXhpdGVkKSBkb21haW4uZXhpdCgpO1xuICAgICAgICByZWplY3QoZSk7XG4gICAgICB9XG4gICAgfTtcbiAgICB3aGlsZSAoY2hhaW4ubGVuZ3RoID4gaSkgcnVuKGNoYWluW2krK10pOyAvLyB2YXJpYWJsZSBsZW5ndGggLSBjYW4ndCB1c2UgZm9yRWFjaFxuICAgIHByb21pc2UuX2MgPSBbXTtcbiAgICBwcm9taXNlLl9uID0gZmFsc2U7XG4gICAgaWYgKGlzUmVqZWN0ICYmICFwcm9taXNlLl9oKSBvblVuaGFuZGxlZChwcm9taXNlKTtcbiAgfSk7XG59O1xudmFyIG9uVW5oYW5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XRlU3VzcGVuZGVkU3RhcnQpIHtcbiAgICAgICAgICAgIHN0YXRlID0gR2VuU3RhdGVDb21wbGV0ZWQ7XG4gICAgICAgICAgICB0aHJvdyBjb250ZXh0LmFyZztcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBjb250ZXh0LmRpc3BhdGNoRXhjZXB0aW9uKGNvbnRleHQuYXJnKTtcblxuICAgICAgICB9IGVsc2UgaWYgKGNvbnRleHQubWV0aG9kID09PSBcInJldHVyblwiKSB7XG4gICAgICAgICAgY29udGV4dC5hYnJ1cHQoXCJyZXR1cm5cIiwgY29udGV4dC5hcmcpO1xuICAgICAgICB9XG5cbiAgICAgICAgc3RhdGUgPSBHZW5TdGF0ZUV4ZWN1dGluZztcblxuICAgICAgICB2YXIgcmVjb3JkID0gdHJ5Q2F0Y2goaW5uZXJGbiwgc2VsZiwgY29udGV4dCk7XG4gICAgICAgIGlmIChyZWNvcmQudHlwZSA9PT0gXCJub3JtYWxcIikge1xuICAgICAgICAgIC8vIElmIGFuIGV4Y2VwdGlvbiBpcyB0aHJvd24gZnJvbSBpbm5lckZuLCB3ZSBsZWF2ZSBzdGF0ZSA9PT1cbiAgICAgICAgICAvLyBHZW5TdGF0ZUV4ZWN1dGluZyBhbmQgbG9vcCBiYWNrIGZvciBhbm90aGVyIGludm9jYXRpb24uXG4gICAgICAgICAgc3RhdGUgPSBjb250ZXh0LmRvbmVcbiAgICAgICAgICAgID8gR2VuU3RhdGVDb21wbGV0ZWRcbiAgICAgICAgICAgIDogR2VuU3RhdGVTdXNwZW5kZWRZaWVsZDtcblxuICAgICAgICAgIGlmIChyZWNvcmQuYXJnID09PSBDb250aW51ZVNlbnRpbmVsKSB7XG4gICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgdmFsdWU6IHJlY29yZC5hcmcsXG4gICAgICAgICAgICBkb25lOiBjb250ZXh0LmRvbmVcbiAgICAgICAgICB9O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AudGhyb3dcbiAgICAgIC8vIG1ldGhvZCBhbHdheXMgdGVybWluYXRlcyB0aGUgeWllbGQqIGxvb3AuXG4gICAgICBjb250ZXh0LmRlbGVnYXRlID0gbnVsbDtcblxuICAgICAgaWYgKGNvbnRleHQubWV0aG9kID09PSBcInRocm93XCIpIHtcbiAgICAgICAgaWYgKGRlbGVnYXRlLml0ZXJhdG9yLnJldHVybikge1xuICAgICAgICAgIC8vIElmIHRoZSBkZWxlZ2F0ZSBpdGVyYXRvciBoYXMgYSByZXR1cm4gbWV0aG9kLCBnaXZlIGl0IGFcbiAgICAgICAgICAvLyBjaGFuY2UgdG8gY2xlYW4gdXAuXG4gICAgICAgICAgY29udGV4dC5tZXRob2QgPSBcInJldHVyblwiO1xuICAgICAgICAgIGNvbnRleHQuYXJnID0gdW5kZWZpbmVkO1xuICAgICAgICAgIG1heWJlSW52b2tlRGVsZWdhdGUoZGVsZWdhdGUsIGNvbnRleHQpO1xuXG4gICAgICAgICAgaWYgKGNvbnRleHQubWV0aG9kID09PSBcInRocm93XCIpIHtcbiAgICAgICAgICAgIC8vIElmIG1heWJlSW52b2tlRGVsZWdhdGUoY29udGV4dCkgY2hhbmdlZCBjb250ZXh0Lm1ldGhvZCBmcm9tXG4gICAgICAgICAgICAvLyBcInJldHVyblwiIHRvIFwidGhyb3dcIiwgbGV0IHRoYXQgb3ZlcnJpZGUgdGhlIFR5cGVFcnJvciBiZWxvdy5cbiAgICAgICAgICAgIHJldHVybiBDb250aW51ZVNlbnRpbmVsO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnRleHQubWV0aG9kID0gXCJ0aHJvd1wiO1xuICAgICAgICBjb250ZXh0LmFyZyA9IG5ldyBUeXBlRXJyb3IoXG4gICAgICAgICAgXCJUaGUgaXRlcmF0b3IgZG9lcyBub3QgcHJvdmlkZSBhICd0aHJvdycgbWV0aG9kXCIpO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gQ29udGludWVTZW50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50cmllc1swXTtcbiAgICAgIHZhciByb290UmVjb3JkID0gcm9vdEVudHJ5LmNvbXBsZXRpb247XG4gICAgICBpZiAocm9vdFJlY29yZC50eXBlID09PSBcInRocm93XCIpIHtcbiAgICAgICAgdGhyb3cgcm9vdFJlY29yZC5hcmc7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiB0aGlzLnJ2YWw7XG4gICAgfSxcblxuICAgIGRpc3BhdGNoRXhjZXB0aW9uOiBmdW5jdGlvbihleGNlcHRpb24pIHtcbiAgICAgIGlmICh0aGlzLmRvbmUpIHtcbiAgICAgICAgdGhyb3cgZXhjZXB0aW9uO1xuICAgICAgfVxuXG4gICAgICB2YXIgY29udGV4dCA9IHRoaXM7XG4gICAgICBmdW5jdGlvbiBoYW5kbGUobG9jLCBjYXVnaHQpIHtcbiAgICAgICAgcmVjb3JkLnR5cGUgPSBcInRocm93XCI7XG4gICAgICAgIHJlY29yZC5hcmcgPSBleGNlcHRpb247XG4gICAgICAgIGNvbnRleHQubmV4dCA9IGxvYztcblxuICAgICAgICBpZiAoY2F1Z2h0KSB7XG4gICAgICAgICAgLy8gSWYgdGhlIGRpc3BhdGNoZWQgZXhjZXB0aW9uIHdhcyBjYXVnaHQgYnkgYSBjYXRjaCBibG9jayxcbiAgICAgICAgICAvLyB0aGVuIGxldCB0aGF0IGNhdGNoIGJsb2NrIGhhbmRsZSB0aGUgZXhjZXB0aW9uIG5vcm1hbGx5LlxuICAgICAgICAgIGNvbnRleHQubWV0aG9kID0gXCJuZXh0XCI7XG4gICAgICAgICAgY29udGV4dC5hcmcgPSB1bmRlZmluZWQ7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gISEgY2F1Z2h0O1xuICAgICAgfVxuXG4gICAgICBmb3IgKHZhciBpID0gdGhpcy50cnlFbnRyaWVzLmxlbmd0aCAtIDE7IGkgPj0gMDsgLS1pKSB7XG4gICAgICAgIHZhciBlbnRyeSA9IHRoaXMudHJ5RW50cmllc1tpXTtcbiAgICAgICAgdmFyIHJlY29yZCA9IGVudHJ5LmNvbXBsZXRpb247XG5cbiAgICAgICAgaWYgKGVudHJ5LnRyeUxvYyA9PT0gXCJyb290XCIpIHtcbiAgICAgICAgICAvLyBFeGNlcHRpb24gdGhyb3duIG91dHNpZGUgb2YgYW55IHRyeSBibG9jayB0aGF0IGNvdWxkIGhhbmRsZVxuICAgICAgICAgIC8vIGl0LCBzbyBzZXQgdGhlIGNvbXBsZXRpb24gdmFsdWUgb2YgdGhlIGVudGlyZSBmdW5jdGlvbiB0b1xuICAgICAgICAgIC8vIHRocm93IHRoZSBleGNlcHRpb24uXG4gICAgICAgICAgcmV0dXJuIGhhbmRsZShcImVuZFwiKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChlbnRyeS50cnlMb2MgPD0gdGhpcy5wcmV2KSB7XG4gICAgICAgICAgdmFyIGhhc0NhdGNoID0gaGFzT3duLmNhbGwoZW50cnksIFwiY2F0Y2hMb2NcIik7XG4gICAgICAgICAgdmFyIGhhc0ZpbmFsbHkgPSBoYXNPd24uY2FsbChlbnRyeSwgXCJmaW5hbGx5TG9jXCIpO1xuXG4gICAgICAgICAgaWYgKGhhc0NhdGNoICYmIGhhc0ZpbmFsbHkpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnByZXYgPCBlbnRyeS5jYXRjaExvYykge1xuICAgICAgICAgICAgICByZXR1cm4gaGFuZGxlKGVudHJ5LmNhdGNoTG9jLCB0cnVlKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAodGhpcy5wcmV2IDwgZW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAgICAgICByZXR1cm4gaGFuZGxlKGVudHJ5LmZpbmFsbHlMb2MpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgfSBlbHNlIGlmIChoYXNDYXRjaCkge1xuICAgICAgICAgICAgaWYgKHRoaXMucHJldiA8IGVudHJ5LmNhdGNoTG9jKSB7XG4gICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuY2F0Y2hMb2MsIHRydWUpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgfSBlbHNlIGlmIChoYXNGaW5hbGx5KSB7XG4gICAgICAgICAgICBpZiAodGhpcy5wcmV2IDwgZW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAgICAgICByZXR1cm4gaGFuZGxlKGVudHJ5LmZpbmFsbHlMb2MpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcInRyeSBzdGF0ZW1lbnQgd2l0aG91dCBjYXRjaCBvciBmaW5hbGx5XCIpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0sXG5cbiAgICBhYnJ1cHQ6IGZ1bmN0aW9uKHR5cGUsIGFyZykge1xuICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG4gICAgICAgIGlmIChlbnRyeS50cnlMb2MgPD0gdGhpcy5wcmV2ICYmXG4gICAgICAgICAgICBoYXNPd24uY2FsbChlbnRyeSwgXCJmaW5hbGx5TG9jXCIpICYmXG4gICAgICAgICAgICB0aGlzLnByZXYgPCBlbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgICAgdmFyIGZpbmFsbHlFbnRyeSA9IGVudHJ5O1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIGlmIChmaW5hbGx5RW50cnkgJiZcbiAgICAgICAgICAodHlwZSA9PT0gXCJicmVha1wiIHx8XG4gICAgICAgICAgIHR5cGUgPT09IFwiY29udGludWVcIikgJiZcbiAgICAgICAgICBmaW5hbGx5RW50cnkudHJ5TG9jIDw9IGFyZyAmJlxuICAgICAgICAgIGFyZyA8PSBmaW5hbGx5RW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAvLyBJZ25vcmUgdGhlIGZpbmFsbHkgZW50cnkgaWYgY29udHJvbCBpcyBub3QganVtcGluZyB0byBhXG4gICAgICAgIC8vIGxvY2F0aW9uIG91dHNpZGUgdGhlIHRyeS9jYXRjaCBibG9jay5cbiAgICAgICAgZmluYWxseUVudHJ5ID0gbnVsbDtcbiAgICAgIH1cblxuICAgICAgdmFyIHJlY29yZCA9IGZpbmFsbHlFbnRyeSA/IGZpbmFsbHlFbnRyeS5jb21wbGV0aW9uIDoge307XG4gICAgICByZWNvcmQudHlwZSA9IHR5cGU7XG4gICAgICByZWNvcmQuYXJnID0gYXJnO1xuXG4gICAgICBpZiAoZmluYWxseUVudHJ5KSB7XG4gICAgICAgIHRoaXMubWV0aG9kID0gXCJuZXh0XCI7XG4gICAgICAgIHRoaXMubmV4dCA9IGZpbmFsbHlFbnRyeS5maW5hbGx5TG9jO1xuICAgICAgICByZXR1cm4gQ29udGludWVTZW50aW5lbDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIHRoaXMuY29tcGxldGUocmVjb3JkKTtcbiAgICB9LFxuXG4gICAgY29tcGxldGU6IGZ1bmN0aW9uKHJlY29yZCwgYWZ0ZXJMb2MpIHtcbiAgICAgIGlmIChyZWNvcmQudHlwZSA9PT0gXCJ0aHJvd1wiKSB7XG4gICAgICAgIHRocm93IHJlY29yZC5hcmc7XG4gICAgICB9XG5cbiAgICAgIGlmIChyZWNvcmQudHlwZSA9PT0gXCJicmVha1wiIHx8XG4gICAgICAgICAgcmVjb3JkLnR5cGUgPT09IFwiY29udGludWVcIikge1xuICAgICAgICB0aGlzLm5leHQgPSByZWNvcmQuYXJnO1xuICAgICAgfSBlbHNlIGlmIChyZWNvcmQudHlwZSA9PT0gXCJyZXR1cm5cIikge1xuICAgICAgICB0aGlzLnJ2YWwgPSB0aGlzLmFyZyA9IHJlY29yZC5hcmc7XG4gICAgICAgIHRoaXMubWV0aG9kID0gXCJyZXR1cm5cIjtcbi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GF1dG9zY2FsZUNvbmZpZylcbiAgICB9XG4gICAgZGVidWcoTkFNRSwgYFtpbml0LWNvbmZpZ106OiAke0pTT04uc3RyaW5naWZ5KGluaXRDb25maWcsIG51bGwsIDIpfWApXG4gICAgcmV0dXJuIHByb3h5LmluaXQoaW5pdENvbmZpZylcbiAgfSBjYXRjaCAoZSkge1xuICAgIHRocm93IGVcbiAgfVxufVxuXG5leHBvcnQgY29uc3QgQXV0b3NjYWxlID0gKHByb3h5KSA9PiB7XG4gIHJldHVybiB7XG4gICAgaW5pdDogKGF1dG9zY2FsZUNvbmZpZywgaW5pdENvbmZpZykgPT4ge1xuICAgICAgcmV0dXJuIGF1dG9zY2FsZUluaXQocHJveHksIGF1dG9zY2FsZUNvbmZpZywgaW5pdENvbmZpZylcbiAgICB9XG4gIH1cbn1cblxuZXhwb3J0IGNvbnN0IERlY29yYXRlID0gKGNsYXp6KSA9PiB7XG4gIGxldCBmbiA9IGZ1bmN0aW9uKGF1dG9zY2FsZUNvbmZpZywgaW5pdENvbmZpZykge1xuICAgIHJldHVybiBhdXRvc2NhbGVJbml0KHRoaXMsIGF1dG9zY2FsZUNvbmZpZywgaW5pdENvbmZpZylcbiAgfVxuICBPYmplY3QuZGVmaW5lUHJvcGVydHkoY2xhenoucHJvdG90eXBlLCAnYXV0b3NjYWxlJywge1xuICAgIHZhbHVlOiBmblxuICB9KVxufVxuIiwiaW1wb3J0IGVudmlyb25tZW50IGZyb20gJy4uL2Vudi9icm93c2VyJ1xuXG5jb25zdCBkZWZhdWx0Q29uZmlnID0ge1xuICBhY3Rpb246IHVuZGVmaW5lZCwgICAgICAvLyByZXF1aXJlZFxuICBwcm90b2NvbDogJ2h0dHBzJywgICAgICAvLyByZXF1aXJlZCwgZGVmYXVsdD1odHRwc1xuICBob3N0OiB1bmRlZmluZWQsICAgICAgICAvLyByZXF1aXJlZFxuICBwb3J0OiB1bmRlZmluZWQsICAgICAgICAvLyBvcHRpb25hbFxuICBzY29wZTogJ2xpdm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YW0oKSxcbiAgICB0eXBlOiAncmF3J1xuICB9KVxuICBpZiAoc3RyZWFtTGlzdCkge1xuICAgIGNvbnN0IGxpc3QgPSBzdHJlYW1MaXN0Lm1hcChpdGVtID0+IHtcbiAgICAgIGl0ZW0ubGV2ZWwgPSBsZXZlbFxuICAgIH0pXG4gICAgc3RyZWFtcyA9IHN0cmVhbXMuY29uY2F0KGxpc3QpXG4gIH1cbiAgbG9nZ2VyID0gY3JlYXRlTG9nZ2VyKHtcbiAgICBsZXZlbDogbGV2ZWwsXG4gICAgbmFtZTogJ3JlZDVwcm8tZXh0LXNtJyxcbiAgICBzdHJlYW1zOiBzdHJlYW1zXG4gIH0pXG59XG5cbi8qKlxuICogUmV0dXJuIHRoZSBkZXRlcm1pbmVkIGxvZ2dlciBpbnN0YW5jZS5cbiAqXG4gKiBAcmV0dXJuIHtPYmplY3R9XG4gKlxuICogQHByaXZhdGVcbiAqL1xuZXhwb3J0IGNvbnN0IGdldExvZ2dlciA9ICgpID0+IHtcbiAgcmV0dXJuIGxvZ2dlclxufVxuXG4vKiBRdWljayBhY2Nlc3MgdG8gbG9nZ2VyIGxldmVsIHR5cGVzLiAqL1xuZXhwb3J0IGNvbnN0IHRyYWNlID0gZGVjb3JhdGUoTEVWRUxTLlRSQUNFKVxuZXhwb3J0IGNvbnN0IGluZm8gPSBkZWNvcmF0ZShMRVZFTFMuSU5GTylcbmV4cG9ydCBjb25zdCBkZWJ1ZyA9IGRlY29yYXRlKExFVkVMUy5ERUJVRylcbmV4cG9ydCBjb25zdCB3YXJuID0gZGVjb3JhdGUoTEVWRUxTLldBUk4pXG5leHBvcnQgY29uc3QgZXJyb3IgPSBkZWNvcmF0ZShMRVZFTFMuRVJST1IpXG5leHBvcnQgY29uc3QgZmF0YWwgPSBkZWNvcmF0ZShMRVZFTFMuRkFUQUwpXG4iXSwic291cmNlUm9vdCI6IiJ9 \ No newline at end of file diff --git a/examples/browser/publisher-failover.html b/examples/browser/publisher-failover.html index ddcc80a..f31a2c4 100644 --- a/examples/browser/publisher-failover.html +++ b/examples/browser/publisher-failover.html @@ -34,7 +34,10 @@ 'video': 256 }, streamName: 'stream1todd', - iceServers: [{urls: 'stun:stun2.l.google.com:19302'}] + iceServers: [{urls: 'stun:stun2.l.google.com:19302'}], + connectionParams: { + validation_url: encodeURIComponent('https://mmd-rt-vep.lldns.net/jaker/some_slot_id/validate?s=1527102700&e=1527102705&h=31d9b5dc23c68c6362dac42bada104c2') + } }, rtmp: { protocol: 'rtmp', @@ -46,11 +49,13 @@ streamName: 'stream1todd', swf: './lib/red5pro/red5pro-publisher.swf', swfobjectURL: './lib/swfobject/swfobject.js', - productInstallURL: './lib/swfobject/playerProductInstall.swf' + productInstallURL: './lib/swfobject/playerProductInstall.swf', + connectionParams: { + validation_url: encodeURIComponent('https://mmd-rt-vep.lldns.net/jaker/some_slot_id/validate?s=1527102700&e=1527102705&h=31d9b5dc23c68c6362dac42bada104c2') + } } }; // ---- OPTION 1 ---- // - /* sm_ext.decorate(); new red5prosdk.Red5ProPublisher() .setPublishOrder(['rtc', 'rtmp']) @@ -61,9 +66,9 @@ .catch(function (error) { console.error(error) }); - */ // ---- OPTION 2 ---- // + /* var failover = new red5prosdk.Red5ProPublisher() .setPublishOrder(['rtc', 'rtmp']) sm_ext.Autoscale(failover) @@ -74,6 +79,11 @@ .catch(function (error) { console.error(error) }); + */ + + window.publisherLog = function (message) { + console.log('[RTMPPublisher] :: ' + message); + } })(window.red5prosdk, window.red5prosdk_ext_stream_manager); diff --git a/src/js/autoscale/index.js b/src/js/autoscale/index.js index 5f800ed..051259a 100644 --- a/src/js/autoscale/index.js +++ b/src/js/autoscale/index.js @@ -10,7 +10,7 @@ const isRTC = /(wss|ws)/ const modifyInitConfigWithResponse = (config, response, autoscaleConfig) => { let c if (autoscaleConfig.useProxy && isRTC.test(config.protocol)) { - const connParams = { + const connectionParams = {...config.connectionParams, host: response.serverAddress, app: response.scope.substr(1, response.scope.length-1) } @@ -20,12 +20,12 @@ const modifyInitConfigWithResponse = (config, response, autoscaleConfig) => { streamName: response.name, host: autoscaleConfig.host, app: 'streammanager', - connectionParams: config.connectionParams ? {...config.connectionParams, connParams} : connParams + connectionParams: connectionParams } } else { c = {...config, host: response.serverAddress, - app: response.scope, + app: response.scope.substr(1, response.scope.length-1), streamName: response.name } } From 748a1965246f34ab8f81fd16a0c7f57a95a0b061 Mon Sep 17 00:00:00 2001 From: bustardcelly Date: Mon, 11 Jun 2018 10:49:21 -0400 Subject: [PATCH 06/15] adding subscriber example. --- examples/browser/subscriber-failover.html | 97 +++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 examples/browser/subscriber-failover.html diff --git a/examples/browser/subscriber-failover.html b/examples/browser/subscriber-failover.html new file mode 100644 index 0000000..f159ab6 --- /dev/null +++ b/examples/browser/subscriber-failover.html @@ -0,0 +1,97 @@ + + + + + + +
+ +
+ + + + + From b53229d2f9544a475982107056d269eed1ab85a5 Mon Sep 17 00:00:00 2001 From: bustardcelly Date: Mon, 11 Jun 2018 11:03:58 -0400 Subject: [PATCH 07/15] better retry logic. --- .../lib/red5pro/red5pro-ext-stream-manager.js | 22 ++++++++++--------- examples/browser/subscriber-failover.html | 6 +++-- src/js/autoscale/index.js | 17 ++++++++------ src/js/autoscale/request.js | 1 + 4 files changed, 27 insertions(+), 19 deletions(-) diff --git a/examples/browser/lib/red5pro/red5pro-ext-stream-manager.js b/examples/browser/lib/red5pro/red5pro-ext-stream-manager.js index 190f54e..61db342 100644 --- a/examples/browser/lib/red5pro/red5pro-ext-stream-manager.js +++ b/examples/browser/lib/red5pro/red5pro-ext-stream-manager.js @@ -4523,18 +4523,19 @@ var modifyInitConfigWithResponse = function modifyInitConfigWithResponse(config, }; var execute = function () { - var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(config, count, limit) { + var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(config, count, limit, delay) { var onfailure, response; return _regenerator2.default.wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: onfailure = function onfailure() { - if (++count < limit) { + if (count++ < limit) { + (0, _log.debug)(NAME, 'Attempt ' + count + ' of ' + limit + ', with ' + delay + ' millisecond delay.'); var timeout = setTimeout(function () { clearTimeout(timeout); - execute(config, count, limit); - }, 1000); + execute(config, count, limit, delay); + }, delay); return true; } return false; @@ -4567,24 +4568,24 @@ var execute = function () { }, _callee, undefined, [[1, 8]]); })); - return function execute(_x, _x2, _x3) { + return function execute(_x, _x2, _x3, _x4) { return _ref.apply(this, arguments); }; }(); var autoscaleInit = exports.autoscaleInit = function () { var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(proxy, autoscaleConfig, initConfig) { - var retryCount, retryLimit, response, keys, key; + var retryCount, retryLimit, retryDelay, response, keys, key; return _regenerator2.default.wrap(function _callee2$(_context2) { while (1) { switch (_context2.prev = _context2.next) { case 0: retryCount = 0; - retryLimit = autoscaleConfig.retryLimit; + retryLimit = autoscaleConfig.retryLimit, retryDelay = autoscaleConfig.retryDelay; response = void 0; _context2.prev = 3; _context2.next = 6; - return execute(autoscaleConfig, retryCount, retryLimit); + return execute(autoscaleConfig, retryCount, retryLimit, retryDelay); case 6: response = _context2.sent; @@ -4615,7 +4616,7 @@ var autoscaleInit = exports.autoscaleInit = function () { }, _callee2, undefined, [[3, 13]]); })); - return function autoscaleInit(_x4, _x5, _x6) { + return function autoscaleInit(_x5, _x6, _x7) { return _ref2.apply(this, arguments); }; }(); @@ -4682,6 +4683,7 @@ var defaultConfig = { region: undefined, // optional accessToken: undefined, // optional retryLimit: 0, // optional, default (no retry) + retryDelay: 1000, // optional, default=1000 useProxy: true // optional, default=true. Enforces connection proxy for WebRTC clients }; @@ -5039,4 +5041,4 @@ module.exports = __webpack_require__(/*! /Users/toddanderson/Documents/Workplace /******/ }); }); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIj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XZlbEZyb21OYW1lW25hbWVPck51bS50b0xvd2VyQ2FzZSgpXSA6IG5hbWVPck51bTtcbn1cblxudmFyIENBTExfU1RBQ0tfRVJST1IgPSAnY2FsbC1zdGFjay1lcnJvcic7XG5mdW5jdGlvbiBvYmpDb3B5KG9iaikge1xuICAgIGlmICh0eXBlb2Ygb2JqID09PSAndW5kZWZpbmVkJyB8fCBvYmogPT09IG51bGwpIHtcbiAgICAgICAgcmV0dXJuIG9iajtcbiAgICB9IGVsc2UgaWYgKEFycmF5LmlzQXJyYXkob2JqKSkge1xuICAgICAgICByZXR1cm4gb2JqLnNsaWNlKCk7XG4gICAgfSBlbHNlIGlmICh0eXBlb2Ygb2JqID09PSAnb2JqZWN0Jykge1xuICAgICAgICB2YXIgY29weSA9IHt9O1xuICAgICAgICBPYmplY3Qua2V5cyhvYmopLmZvckVhY2goZnVuY3Rpb24gKGspIHtcbiAgICAgICAgICAgIGNvcHlba10gPSBvYmpba107XG4gICAgICAgIH0pO1xuICAgICAgICByZXR1cm4gY29weTtcbiAgICB9IGVsc2Uge1xuICAgICAgICByZXR1cm4gb2JqO1xuICAgIH1cbn1cblxuZnVuY3Rpb24gaW5zcGVjdChvYmopIHtcbiAgICBpZiAodHlwZW9mIG9iaiA9PT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgcmV0dXJuICd1bmRlZmluZWQnO1xuICAgIH1cbiAgICBpZiAob2JqID09PSBudWxsKSB7XG4gICAgICAgIHJldHVybiAnbnVsbCc7XG4gICAgfVxuICAgIGlmIChBcnJheS5pc0FycmF5KG9iaikpIHtcbiAgICAgICAgdmFyIGl0ZW1zID0gb2JqLm1hcChmdW5jdGlvbiAob2JqKSB7IHJldHVybiBpbnNwZWN0KG9iaik7IH0pO1xuICAgICAgICByZXR1cm4gJ1sgJyArIGl0ZW1zLmpvaW4oJywgJykgKyAnIF0nO1xuICAgIH1cbiAgICBpZiAodHlwZW9mIG9iaiA9PT0gJ29iamVjdCcpIHtcbiAgICAgIC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SBsZW4pIHtcbiAgICAgICAgICAgIHJldHVybiB4O1xuICAgICAgICB9XG4gICAgICAgIHN3aXRjaCAoeCkge1xuICAgICAgICAgICAgY2FzZSAnJXMnOlxuICAgICAgICAgICAgICAgIHJldHVybiBTdHJpbmcoYXJnc1tpKytdKTtcbiAgICAgICAgICAgIGNhc2UgJyVkJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gTnVtYmVyKGFyZ3NbaSsrXSk7XG4gICAgICAgICAgICBjYXNlICclaic6XG4gICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KGFyZ3NbaSsrXSk7XG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoXykge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1tDaXJjdWxhcl0nO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgcmV0dXJuIHg7XG4gICAgICAgIH1cbiAgICB9KTtcbiAgICBmb3IgKHZhciB4ID0gYXJnc1tpXTtpIDwgbGVuOyB4ID0gYXJnc1srK2ldKSB7XG4gICAgICAgIHN0ciArPSAnICcgKyB4O1xuICAgIH1cbiAgICByZXR1cm4gc3RyO1xufVxuXG5mdW5jdGlvbiBleHRyYWN0U3JjRnJvbVN0YWNrdHJhY2Uoc3RhY2ssIGxldmVsKSB7XG4gICAgdmFyIHN0YWNrTGluZXMgPSBzdGFjay5zcGxpdCgnXFxuJyk7XG4gICAgaWYgKHN0YWNrTGluZXNbMF0gJiYgc3RhY2tMaW5lc1swXS5pbmRleE9mKENBTExfU1RBQ0tfRVJST1IpID49IDApIHtcbiAgICAgICAgc3RhY2tMaW5lcy5zaGlmdCgpO1xuICAgIH1cbiAgICB2YXIgdGFyZ2V0TGluZSA9IHN0YWNrTGluZXNbbGV2ZWxdO1xuICAgIHZhciBsaW5lSW5mbyA9IG51bGw7XG4gICAgaWYgKHRhcm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dGhpcy5zdHJlYW1zID0gcGFyZW50LnN0cmVhbXM7XG4gICAgICAgIHRoaXMuc2VyaWFsaXplcnMgPSBwYXJlbnQuc2VyaWFsaXplcnM7XG4gICAgICAgIHRoaXMuc3JjID0gcGFyZW50LnNyYztcbiAgICAgICAgZmllbGRzID0gKHRoaXMuZmllbGRzID0ge30pO1xuICAgICAgICB2YXIgcGFyZW50RmllbGROYW1lcyA9IE9iamVjdC5rZXlzKHBhcmVudC5maWVsZHMpO1xuICAgICAgICBmb3IgKGkgPSAwOyBpIDwgcGFyZW50RmllbGROYW1lcy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgbmFtZSA9IHBhcmVudEZpZWxkTmFtZXNbaV07XG4gICAgICAgICAgICBmaWVsZHNbbmFtZV0gPSBwYXJlbnQuZmllbGRzW25hbWVdO1xuICAgICAgICB9XG4gICAgICAgIHZhciBuYW1lcyA9IE9iamVjdC5rZXlzKG9wdGlvbnMpO1xuICAgICAgICBmb3IgKGkgPSAwOyBpIDwgbmFtZXMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIG5hbWUgPSBuYW1lc1tpXTtcbiAgICAgICAgICAgIGZpZWxkc1tuYW1lXSA9IG9wdGlvbnNbbmFtZV07XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuO1xuICAgIH1cbiAgICBpZiAocGFyZW50KSB7XG4gICAgICAgIHRoaXMuX2xldmVsID0gcGFyZW50Ll9sZXZlbDtcbiAgICAgICAgdGhpcy5zdHJlYW1zID0gW107XG4gICAgICAgIGZvciAoaSA9IDA7IGkgPCBwYXJlbnQuc3RyZWFtcy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgdmFyIHMgPSBvYmpDb3B5KHBhcmVudC5zdHJlYW1zW2ldKTtcbiAgICAgICAgICAgIHRoaXMkMS5zdHJlYW1zLnB1c2gocyk7XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy5zZXJpYWxpemVycyA9IG9iakNvcHkocGFyZW50LnNlc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gbWtMb2dFbWl0dGVyKG1pbkxldmVsKSB7XG4gICAgcmV0dXJuIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgdmFyIGxvZyA9IHRoaXM7XG4gICAgICAgIGZ1bmN0aW9uIG1rUmVjb3JkKGFyZ3MpIHtcbiAgICAgICAgICAgIHZhciBleGNsdWRlRmllbGRzO1xuICAgICAgICAgICAgaWYgKGFyZ3NbMF0gaW5zdGFuY2VvZiBFcnJvcikge1xuICAgICAgICAgICAgICAgIGZpZWxkcyA9IHtcbiAgICAgICAgICAgICAgICAgICAgZXJyOiBsb2cuc2VyaWFsaXplcnMgJiYgbG9nLnNlcmlhbGl6ZXJzLmVyciA/IGxvZy5zZXJpYWxpemVycy5lcnIoYXJnc1swXSkgOiBzdGRTZXJpYWxpemVycy5lcnIoYXJnc1swXSlcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIGV4Y2x1ZGVGaWVsZHMgPSB7XG4gICAgICAgICAgICAgICAgICAgIGVycjogdHJ1ZVxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgaWYgKGFyZ3MubGVuZ3RoID09PSAxKSB7XG4gICAgICAgICAgICAgICAgICAgIG1zZ0FyZ3MgPSBbZmllbGRzLmVyci5tZXNzYWdlXTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBtc2dBcmdzID0gQXJyYXkucHJvdG90eXBlLnNsaWNlLmNhbGwoYXJncywgMSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmICh0eXBlb2YgYXJnc1swXSAhPT0gJ29iamVjdCcgJiYgYXJnc1swXSAhPT0gbnVsbCB8fCBBcnJheS5pc0FycmF5KGFyZ3NbMF0pKSB7XG4gICAgICAgICAgICAgICAgZmllbGRzID0gbnVsbDtcbiAgICAgICAgICAgICAgICBtc2dBcmdzID0gQXJyYXkucHJvdG90eXBlLnNsaWNlLmNhbGwoYXJncyk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGZpZWxkcyA9IGFyZ3NbMF07XG4gICAgICAgICAgICAgICAgaWYgKGFyZ3MubGVuZ3RoID09PSAxICYmIGZpZWxkcy5lcnIgJiYgZmllbGRzLmVyciBpbnN0YW5jZW9mIEVycm9yKSB7XG4gICAgICAgICAgICAgICAgICAgIG1zZ0FyZ3MgPSBbZmllbGRzLmVyci5tZXNzYWdlXTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBtc2dBcmdzID0gQXJyYXkucHJvdG90eXBlLnNsaWNlLmNhbGwoYXJncywgMSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdmFyIHJlYyA9IG9iakNvcHkobG9nLmZpZWxkcyk7XG4gICAgICAgICAgICByZWMubGV2ZWwgPSBtaW5MZXZlbDtcbiAgICAgICAgICAgIHZhciByZWNGaWVsZHMgPSBmaWVsZHMgPyBvYmpDb3B5KGZpZWxkcykgOiBudWxsO1xuICAgICAgICAgICAgaWYgKHJlY0ZpZWxkcykge1xuICAgICAgICAgICAgICAgIGlmIChsb2cuc2VyaWFsaXplcnMpIHtcbiAgICAgICAgICAgICAgICAgICAgbG9nLl9hcHBseVNlcmlhbGl6ZXJzKHJlY0ZpZWxkcywgZXhjbHVkZUZpZWxkcyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIE9iamVjdC5rZXlzKHJlY0ZpZWxkcykuZm9yRWFjaChmdW5jdGlvbiAoaykge1xuICAgICAgICAgICAgICAgICAgICByZWNba10gPSByZWNGaWVsZHNba107XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWMubGV2ZWxOYW1lID0gbmFtZUZyb21MZXZlbFttaW5MZXZlbF07XG4gICAgICAgICAgICByZWMubXNnID0gbXNnQXJncy5sZW5ndGggPyBmb3JtYXQuYXBwbHkobG9nLCBtc2dBcmdzKSA6ICcnO1xuICAgICAgICAgICAgaWYgKCFyZWMudGltZSkge1xuICAgICAgICAgICAgICAgIHJlYy50aW1lID0gbmV3IERhdGUoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChsb2cuc3JjICYmICFyZWMuc3JjKSB7XG4gICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKENBTExfU1RBQ0tfRVJST1IpO1xuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgICAgICAgICB2YXIgc3JjID0gZXh0cmFjdFNyY0Zyb21TdGFja3RyYWNlKGVyci5zdGFjaywgMik7XG4gICAgICAgICAgICAgICAgICAgIGlmICghc3JjICYmICFfaGF2ZVdhcm5lZCgnc3JjJykpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIF93YXJuKCdVbmFibGUgdG8gZGV0ZXJtaW5lIHNyYyBsaW5lIGluZm8nLCAnc3JjJyk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcmVjLnNyYyA9IHNyYyB8fCAnJztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWMudiA9IExPR19WRVJTSU9OO1xuICAgICAgICAgICAgcmV0dXJuIHJlYztcbiAgICAgICAgfVxuICAgICAgICBcbiAgICAgICAgdmFyIGZpZWxkcyA9IG51bGw7XG4gICAgICAgIHZhciBtc2dBcmdzID0gYXJndW1lbnRzO1xuICAgICAgICB2YXIgcmVjID0gbnVsbDtcbiAgICAgICAgaWYgKGFyZ3VtZW50cy5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLl9sZXZlbCA8PSBtaW5MZXZlbDtcbiAgICAgICAgfSBlbHNlIGlmICh0aGlzLl9sZXZlbCA+IG1pbkxldmVsKSB7fSBlbHNlIHtcbiAgICAgICAgICAgIH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N0KSB7XG4gIGlmIChwcm9taXNlLl9uKSByZXR1cm47XG4gIHByb21pc2UuX24gPSB0cnVlO1xuICB2YXIgY2hhaW4gPSBwcm9taXNlLl9jO1xuICBtaWNyb3Rhc2soZnVuY3Rpb24gKCkge1xuICAgIHZhciB2YWx1ZSA9IHByb21pc2UuX3Y7XG4gICAgdmFyIG9rID0gcHJvbWlzZS5fcyA9PSAxO1xuICAgIHZhciBpID0gMDtcbiAgICB2YXIgcnVuID0gZnVuY3Rpb24gKHJlYWN0aW9uKSB7XG4gICAgICB2YXIgaGFuZGxlciA9IG9rID8gcmVhY3Rpb24ub2sgOiByZWFjdGlvbi5mYWlsO1xuICAgICAgdmFyIHJlc29sdmUgPSByZWFjdGlvbi5yZXNvbHZlO1xuICAgICAgdmFyIHJlamVjdCA9IHJlYWN0aW9uLnJlamVjdDtcbiAgICAgIHZhciBkb21haW4gPSByZWFjdGlvbi5kb21haW47XG4gICAgICB2YXIgcmVzdWx0LCB0aGVuLCBleGl0ZWQ7XG4gICAgICB0cnkge1xuICAgICAgICBpZiAoaGFuZGxlcikge1xuICAgICAgICAgIGlmICghb2spIHtcbiAgICAgICAgICAgIGlmIChwcm9taXNlLl9oID09IDIpIG9uSGFuZGxlVW5oYW5kbGVkKHByb21pc2UpO1xuICAgICAgICAgICAgcHJvbWlzZS5faCA9IDE7XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChoYW5kbGVyID09PSB0cnVlKSByZXN1bHQgPSB2YWx1ZTtcbiAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIGlmIChkb21haW4pIGRvbWFpbi5lbnRlcigpO1xuICAgICAgICAgICAgcmVzdWx0ID0gaGFuZGxlcih2YWx1ZSk7IC8vIG1heSB0aHJvd1xuICAgICAgICAgICAgaWYgKGRvbWFpbikge1xuICAgICAgICAgICAgICBkb21haW4uZXhpdCgpO1xuICAgICAgICAgICAgICBleGl0ZWQgPSB0cnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgI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AgICAgICAvLyBjaGFuY2UgdG8gY2xlYW4gdXAuXG4gICAgICAgICAgY29udGV4dC5tZXRob2QgPSBcInJldHVyblwiO1xuICAgICAgICAgIGNvbnRleHQuYXJnID0gdW5kZWZpbmVkO1xuICAgICAgICAgIG1heWJlSW52b2tlRGVsZWdhdGUoZGVsZWdhdGUsIGNvbnRleHQpO1xuXG4gICAgICAgICAgaWYgKGNvbnRleHQubWV0aG9kID09PSBcInRocm93XCIpIHtcbiAgICAgICAgICAgIC8vIElmIG1heWJlSW52b2tlRGVsZWdhdGUoY29udGV4dCkgY2hhbmdlZCBjb250ZXh0Lm1ldGhvZCBmcm9tXG4gICAgICAgICAgICAvLyBcInJldHVyblwiIHRvIFwidGhyb3dcIiwgbGV0IHRoYXQgb3ZlcnJpZGUgdGhlIFR5cGVFcnJvciBiZWxvdy5cbiAgICAgICAgICAgIHJldHVybiBDb250aW51ZVNlbnRpbmVsO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnRleHQubWV0aG9kID0gXCJ0aHJvd1wiO1xuICAgICAgICBjb250ZXh0LmFyZyA9IG5ldyBUeXBlRXJyb3IoXG4gICAgICAgICAgXCJUaGUgaXRlcmF0b3IgZG9lcyBub3QgcHJvdmlkZSBhICd0aHJvdycgbWV0aG9kXCIpO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gQ29udGludWVTZW50aW5lbDtcbiAgICB9XG5cbiAgICB2YXIgcmVjb3JkID0gdHJ5Q2F0Y2gobWV0aG9kLCBkZWxlZ2F0ZS5pdGVyYXRvciwgY29udGV4dC5hcmcpO1xuXG4gICAgaWYgKHJlY29yZC50eXBlID09PSBcInRocm93XCIpIHtcbiAgICAgIGNvbnRleHQubWV0aG9kID0gXCJ0aHJvd1wiO1xuICAgICAgY29udGV4dC5hcmcgPSByZWNvcmQuYXJnO1xuICAgICAgY29udGV4dC5kZWxlZ2F0ZSA9IG51bGw7XG4gICAgICByZXR1cm4gQ29udGludWVTZW50a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G4gICAgICB0aGlzLmRvbmUgPSBmYWxzZTtcbiAgICAgIHRoaXMuZGVsZWdhdGUgPSBudWxsO1xuXG4gICAgICB0aGlzLm1ldGhvZCA9IFwibmV4dFwiO1xuICAgICAgdGhpcy5hcmcgPSB1bmRlZmluZWQ7XG5cbiAgICAgIHRoaXMudHJ5RW50cmllcy5mb3JFYWNoKHJlc2V0VHJ5RW50cnkpO1xuXG4gICAgICBpZiAoIXNraXBUZW1wUmVzZXQpIHtcbiAgICAgICAgZm9yICh2YXIgbmFtZSBpbiB0aGlzKSB7XG4gICAgICAgICAgLy8gTm90IHN1cmUgYWJvdXQgdGhlIG9wdGltYWwgb3JkZXIgb2YgdGhlc2UgY29uZGl0aW9uczpcbiAgICAgICAgICBpZiAobmFtZS5jaGFyQXQoMCkgPT09IFwidFwiICYmXG4gICAgICAgICAgICAgIGhhc093bi5jYWxsKHRoaXMsIG5hbWUpICYmXG4gICAgICAgICAgICAgICFpc05hTigrbmFtZS5zbGljZSgxKSkpIHtcbiAgICAgICAgICAgIHRoaXNbbmFtZV0gPSB1bmRlZmluZWQ7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfSxcblxuICAgIHN0b3A6IGZ1bmN0aW9uKCkge1xuICAgICAgdGhpcy5kb25lID0gdHJ1ZTtcblxuICAgICAgdmFyIHJvb3RFbnRyeSA9IHRoaXMudHJ5RW50cmllc1swXTtcbiAgICAgIHZhciByb290UmVjb3JkID0gcm9vdEVudHJ5LmNvbXBsZXRpb247XG4gICAgICBpZiAocm9vdFJlY29yZC50eXBlID09PSBcInRocm93XCIpIHtcbiAgICAgICAgdGhyb3cgcm9vdFJlY29yZC5hcmc7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiB0aGlzLnJ2YWw7XG4gICAgfSxcblxuICAgIGRpc3BhdGNoRXhjZXB0aW9uOiBmdW5jdGlvbihleGNlcHRpb24pIHtcbiAgICAgIGlmICh0aGlzLmRvbmUpIHtcbiAgICAgICAgd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GNlcHRpb24uXG4gICAgICAgICAgcmV0dXJuIGhhbmRsZShcImVuZFwiKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChlbnRyeS50cnlMb2MgPD0gdGhpcy5wcmV2KSB7XG4gICAgICAgICAgdmFyIGhhc0NhdGNoID0gaGFzT3duLmNhbGwoZW50cnksIFwiY2F0Y2hMb2NcIik7XG4gICAgICAgICAgdmFyIGhhc0ZpbmFsbHkgPSBoYXNPd24uY2FsbChlbnRyeSwgXCJmaW5hbGx5TG9jXCIpO1xuXG4gICAgICAgICAgaWYgKGhhc0NhdGNoICYmIGhhc0ZpbmFsbHkpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnByZXYgPCBlbnRyeS5jYXRjaExvYykge1xuICAgICAgICAgICAgICByZXR1cm4gaGFuZGxlKGVudHJ5LmNhdGNoTG9jLCB0cnVlKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAodGhpcy5wcmV2IDwgZW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAgICAgICByZXR1cm4gaGFuZGxlKGVudHJ5LmZpbmFsbHlMb2MpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgfSBlbHNlIGlmIChoYXNDYXRjaCkge1xuICAgICAgICAgICAgaWYgKHRoaXMucHJldiA8IGVudHJ5LmNhdGNoTG9jKSB7XG4gICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuY2F0Y2hMb2MsIHRydWUpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgfSBlbHNlIGlmIChoYXNGaW5hbGx5KSB7XG4gICAgICAgICAgICBpZiAodGhpcy5wcmV2IDwgZW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAgICAgICByZXR1cm4gaGFuZGxlKGVudHJ5LmZpbmFsbHlMb2MpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcInRyeSBzdGF0ZW1lbnQgd2l0aG91dCBjYXRjaCBvciBmaW5hbGx5XCIpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0sXG5cbiAgICBhYnJ1cHQ6IGZ1bmN0aW9uKHR5cGUsIGFyZykge1xuICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG4gICAgICAgIGlmIChlbnRyeS50cnlMb2MgPD0gdGhpcy5wcmV2ICYmXG4gICAgICAgICAgICBoYXNPd24uY2FsbChlbnRyeSwgXCJmaW5hbGx5TG9jXCIpICYmXG4gICAgICAgICAgICB0aGlzLnByZXYgPCBlbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgICAgdmFyIGZpbmFsbHlFbnRyeSA9IGVudHJ5O1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIGlmIChmaW5hbGx5RW50cnkgJiZcbiAgICAgICAgICAodHlwZSA9PT0gXCJicmVha1wiIHx8XG4gICAgICAgICAgIHR5cGUgPT09IFwiY29udGludWVcIikgJiZcbiAgICAgICAgICBmaW5hbGx5RW50cnkudHJ5TG9jIDw9IGFyZyAmJlxuICAgICAgICAgIGFyZyA8PSBmaW5hbGx5RW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAvLyBJZ25vcmUgdGhlIGZpbmFsbHkgZW50cnkgaWYgY29udHJvbCBpcyBub3QganVtcGluZyB0byBhXG4gICAgICAgIC8vIGxvY2F0aW9uIG91dHNpZGUgdGhlIHRyeS9jYXRjaCBibG9jay5cbiAgICAgICAgZmluYWxseUVudHJ5ID0gbnVsbDtcbiAgICAgIH1cblxuICAgICAgdmFyIHJlY29yZCA9IGZpbmFsbHlFbnRyeSA/IGZpbmFsbHlFbnRyeS5jb21wbGV0aW9uIDoge307XG4gICAgICByZWNvcmQudHlwZSA9IHR5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yJztcbmZ1bmN0aW9uIG9iakNvcHkob2JqKSB7XG4gICAgaWYgKHR5cGVvZiBvYmogPT09ICd1bmRlZmluZWQnIHx8IG9iaiA9PT0gbnVsbCkge1xuICAgICAgICByZXR1cm4gb2JqO1xuICAgIH0gZWxzZSBpZiAoQXJyYXkuaXNBcnJheShvYmopKSB7XG4gICAgICAgIHJldHVybiBvYmouc2xpY2UoKTtcbiAgICB9IGVsc2UgaWYgKHR5cGVvZiBvYmogPT09ICdvYmplY3QnKSB7XG4gICAgICAgIHZhciBjb3B5ID0ge307XG4gICAgICAgIE9iamVjdC5rZXlzKG9iaikuZm9yRWFjaChmdW5jdGlvbiAoaykge1xuICAgICAgICAgICAgY29weVtrXSA9IG9ialtrXTtcbiAgICAgICAgfSk7XG4gICAgICAgIHJldHVybiBjb3B5O1xuICAgIH0gZWxzZSB7XG4gICAgICAgIHJldHVybiBvYmo7XG4gICAgfVxufVxuXG5mdW5jdGlvbiBpbnNwZWN0KG9iaikge1xuICAgIGlmICh0eXBlb2Ygb2JqID09PSAndW5kZWZpbmVkJykge1xuICAgICAgICByZXR1cm4gJ3VuZGVmaW5lZCc7XG4gICAgfVxuICAgIGlmIChvYmogPT09IG51bGwpIHtcbiAgICAgICAgcmV0dXJuICdudWxsJztcbiAgICB9XG4gICAgaWYgKEFycmF5LmlzQXJyYXkob2JqKSkge1xuICAgICAgICB2YXIgaXRlbXMgPSBvYmoubWFwKGZ1bmN0aW9uIChvYmopIHsgcmV0dXJuIGluc3BlY3Qob2JqKTsgfSk7XG4gICAgICAgIHJldHVybiAnWyAnICsgaXRlbXMuam9pbignLCAnKSArICcgXSc7XG4gICAgfVxuICAgIGlmICh0eXBlb2Ygb2JqID09PSAnb2JqZWN0Jykge1xuICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkob2JqKTtcbiAgICB9XG4gICAgaWYgKHR5cGVvZiBvYmogPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgcmV0dXJuICdbRnVuY3Rpb246ICcgKyBvYmoubmFtZSArICddJztcbiAgICB9XG4gICAgaWYgKHR5cGVvZiBvYmogPT09ICdib29sZWFuJyB8fCB0eXBlb2Ygb2JqID09PSAnbnVtYmVyJykge1xuICAgICAgICByZXR1cm4gb2JqO1xuICAgIH1cbiAgICByZXR1cm4gJ1xcJycgKyBvYmoudG9TdHJpbmcoKSArICdcXCcnO1xufVxuXG5mdW5jdGlvbiBmb3JtYXQoZikge1xuICAgIHZhciBhcmd1bWVudHMkMSA9IGFyZ3VtZW50cztcblxuICAgIGlmICh0eXBlb2YgZiAhPT0gJ3N0cmluZycpIHtcbiAgICAgICAgdmFyIG9iamVjdHMgPSBuZXcgQXJyYXkoYXJndW1lbnRzLmxlbmd0aCk7XG4gICAgICAgIGZvciAodmFyIGkkMSA9IDA7aSQxIDwgYXJndW1lbnRzLmxlbmd0aDsgaSQxKyspIHtcbiAgICAgICAgICAgIG9iamVjdHNbaSQxXSA9IGluc3BlY3QoYXJndW1lbnRzJDFbaSQxXSk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG9iamVjdHMuam9pbignICcpO1xuICAgIH1cbiAgICB2YXIgZm9ybWF0UmVnRXhwID0gLyVbc2RqJV0vZztcbiAgICB2YXIgaSA9IDE7XG4gICAgdmFyIGFyZ3MgPSBhcmd1bWVudHM7XG4gICAgdmFyIGxlbiA9IGFyZ3MubGVuZ3RoO1xuICAgIHZhciBzdHIgPSBTdHJpbmcoZikucmVwbGFjZShmb3JtYXRSZWdFeHAsIGZ1bmN0aW9uICh4KSB7XG4gICAgICAgIGlmICh4ID09PSAnJSUnKSB7XG4gICAgICAgICAgICByZXR1cm4gJyUnO1xuICAgICAgICB9XG4gICAgICAgIGlmIChpID49IGxlbikge1xuICAgICAgICAgICAgcmV0dXJuIHg7XG4gICAgICAgIH1cbiAgICAgICAgc3dpdGNoICh4KSB7XG4gICAgICAgICAgICBjYXNlICclcyc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIFN0cmluZyhhcmdzW2krK10pO1xuICAgICAgICAgICAgY2FzZSAnJWQnOlxuICAgICAgICAgICAgICAgIHJldHVybiBOdW1iZXIoYXJnc1tpKytdKTtcbiAgICAgICAgICAgIGNhc2UgJyVqJzpcbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkoYXJnc1tpKytdKTtcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChfKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW0NpcmN1bGFyXSc7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICByZXR1cm4geDtcbiAgICAgICAgfVxuICAgIH0pO1xuICAgIGZvciAodmFyIHggPSBhcmdzW2ldO2kgPCBsZW47IHggPSBhcmdzWysraV0pIHtcbiAgICAgICAgc3RyICs9ICcgJyArIHg7XG4gICAgfVxuICAgIHJldHVybiBzdHI7XG59XG5cbmZ1bmN0aW9uIGV4dHJhY3RTcmNGcm9tU3RhY2t0cmFjZShzdGFjaywgbGV2ZWwpIHtcbiAgICB2YXIgc3RhY2tMaW5lcyA9IHN0YWNrLnNwbGl0KCdcXG4nKTtcbiAgICBpZiAoc3RhY2tMaW5lc1swXSAmJiBzdGFja0xpbmVzWzBdLmluZGV4T2YoQ0FMTF9TVEFDS19FUlJPUikgPj0gMCkge1xuICAgICAgICBzdGFja0xpbmVzLnNoaWZ0KCk7XG4gICAgfVxuICAgIHZhciB0YXJnZXRMaW5lID0gc3RhY2tMaW5lc1tsZXZlbF07XG4gICAgdmFyIGxpbmVJbmZvID0gbnVsbDtcbiAgICBpZiAodGFyZ2V0TGluZSkge1xuICAgICAgICB2YXIgZXhlY1Jlc3VsdCA9IC9eXFxzKihhdHwuKkApXFxzKiguKyk/JC8uZXhlYyh0YXJnZXRMaW5lKTtcbiAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkoZXhlY1Jlc3VsdCkgJiYgZXhlY1Jlc3VsdFsyXSkge1xuICAgICAgICAgICAgbGluZUluZm8gPSBleGVjUmVzdWx0WzJdO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgbGluZUluZm8gPSB0YXJnZXRMaW5lO1xuICAgICAgICB9XG4gICAgfVxuICAgIHJldHVybiBsaW5lSW5mbztcbn1cblxuZnVuY3Rpb24gX2luZGVudChzLCBpbmRlbnQpIHtcbiAgICBpZiAoIWluZGVudCkge1xuICAgICAgICBpbmRlbnQgPSAnICAgICc7XG4gICAgfVxuICAgIHZhciBsaW5lcyA9IHMuc3BsaXQoL1xccj9cXG4vZyk7XG4gICAgcmV0dXJuIGluZGVudCArIGxpbmVzLmpvaW4oJ1xcbicgKyBpbmRlbnQpO1xufVxuXG52YXIgX3dhcm5lZCA9IHt9O1xuZnVuY3Rpb24gX3dhcm4obXNnLCBkZWR1cEtleSkge1xuICAgIGlmIChkZWR1cEtleSkge1xuICAgICAgICBpZiAoX3dhcm5lZFtkZWR1cEtleV0pIHtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICBfd2FybmVkW2RlZHVwS2V5XSA9IHRydWU7XG4gICAgfVxuICAgIGNvbnNvbGUuZXJyb3IobXNnICsgJ1xcbicpO1xufVxuXG5mdW5jdGlvbiBfaGF2ZVdhcm5lZChkZWR1cEtleSkge1xuICAgIHJldHVybiBfd2FybmVkW2RlZHVwS2V5XTtcbn1cblxuZnVuY3Rpb24gc2FmZUN5Y2xlcygpIHtcbiAgICB2YXIgc2VlbiA9IFtdO1xuICAgIHJldHVybiBmdW5jdGlvbiAoa2V5LCB2YWwpIHtcbiAgICAgICAgaWYgKCF2YWwgfHwgdHlwZW9mIHZhbCAhPT0gJ29iamVjdCcpIHtcbiAgICAgICAgICAgIHJldHVybiB2YWw7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHNlZW4uaW5kZXhPZih2YWwpICE9PSAtMSkge1xuICAgICAgICAgICAgcmV0dXJuICd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ICAgICBmaWVsZHMgPSAodGhpcy5maWVsZHMgPSB7fSk7XG4gICAgICAgIHZhciBwYXJlbnRGaWVsZE5hbWVzID0gT2JqZWN0LmtleXMocGFyZW50LmZpZWxkcyk7XG4gICAgICAgIGZvciAoaSA9IDA7IGkgPCBwYXJlbnRGaWVsZE5hbWVzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICBuYW1lID0gcGFyZW50RmllbGROYW1lc1tpXTtcbiAgICAgICAgICAgIGZpZWxkc1tuYW1lXSA9IHBhcmVudC5maWVsZHNbbmFtZV07XG4gICAgICAgIH1cbiAgICAgICAgdmFyIG5hbWVzID0gT2JqZWN0LmtleXMob3B0aW9ucyk7XG4gICAgICAgIGZvciAoaSA9IDA7IGkgPCBuYW1lcy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgbmFtZSA9IG5hbWVzW2ldO1xuICAgICAgICAgICAgZmllbGRzW25hbWVdID0gb3B0aW9uc1tuYW1lXTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm47XG4gICAgfVxuICAgIGlmIChwYXJlbnQpIHtcbiAgICAgICAgdGhpcy5fbGV2ZWwgPSBwYXJlbnQuX2xldmVsO1xuICAgICAgICB0aGlzLnN0cmVhbXMgPSBbXTtcbiAgICAgICAgZm9yIChpID0gMDsgaSA8IHBhcmVudC5zdHJlYW1zLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICB2YXIgcyA9IG9iakNvcHkocGFyZW50LnN0cmVhbXNbaV0pO1xuICAgICAgICAgICAgdGhpcyQxLnN0cmVhbXMucHVzaChzKTtcbiAgICAgICAgfVxuICAgICAgICB0aGlzLnNlcmlhbGl6ZXJzID0gb2JqQ29weShwYXJlbnQuc2VyaWFsaXplcnMpO1xuICAgICAgICB0aGlzLnNyYyA9IHBhcmVudC5zcmM7XG4gICAgICAgIHRoaXMuZmllbGRzID0gb2JqQ29weShwYXJlbnQuZmllbGRzKTtcbiAgICAgICAgaWYgKG9wdGlvbnMubGV2Z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ZWNvcmQoYXJncykge1xuICAgICAgICAgICAgdmFyIGV4Y2x1ZGVGaWVsZHM7XG4gICAgICAgICAgICBpZiAoYXJnc1swXSBpbnN0YW5jZW9mIEVycm9yKSB7XG4gICAgICAgICAgICAgICAgZmllbGRzID0ge1xuICAgICAgICAgICAgICAgICAgICBlcnI6IGxvZy5zZXJpYWxpemVycyAmJiBsb2cuc2VyaWFsaXplcnMuZXJyID8gbG9nLnNlcmlhbGl6ZXJzLmVycihhcmdzWzBdKSA6IHN0ZFNlcmlhbGl6ZXJzLmVycihhcmdzWzBdKVxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgZXhjbHVkZUZpZWxkcyA9IHtcbiAgICAgICAgICAgICAgICAgICAgZXJyOiB0cnVlXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICBpZiAoYXJncy5sZW5ndGggPT09IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgbXNnQXJncyA9IFtmaWVsZHMuZXJyLm1lc3NhZ2VdO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIG1zZ0FyZ3MgPSBBcnJheS5wcm90b3R5cGUuc2xpY2UuY2FsbChhcmdzLCAxKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHR5cGVvZiBhcmdzWzBdICE9PSAnb2JqZWN0JyAmJiBhcmdzWzBdICE9PSBudWxsIHx8IEFycmF5LmlzQXJyYXkoYXJnc1swXSkpIHtcbiAgICAgICAgICAgICAgICBmaWVsZHMgPSBudWxsO1xuICAgICAgICAgICAgICAgIG1zZ0FyZ3MgPSBBcnJheS5wcm90b3R5cGUuc2xpY2UuY2FsbChhcmdzKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgZmllbGRzID0gYXJnc1swXTtcbiAgICAgICAgICAgICAgICBpZiAoYXJncy5sZW5ndGggPT09IDEgJiYgZmllbGRzLmVyciAmJiBmaWVsZHMuZXJyIGluc3RhbmNlb2YgRXJyb3IpIHtcbiAgICAgICAgICAgICAgICAgICAgbXNnQXJncyA9IFtmaWVsZHMuZXJyLm1lc3NhZ2VdO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIG1zZ0FyZ3MgPSBBcnJheS5wcm90b3R5cGUuc2xpY2UuY2FsbChhcmdzLCAxKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YXIgcmVjID0gb2JqQ29weShsb2cuZmllbGRzKTtcbiAgICAgICAgICAgIHJlYy5sZXZlbCA9IG1pbkxldmVsO1xuICAgICAgICAgICAgdmFyIHJlY0ZpZWxkcyA9IGZpZWxkcyA/IG9iakNvcHkoZmllbGRzKSA6IG51bGw7XG4gICAgICAgICAgICBpZiAocmVjRmllbGRzKSB7XG4gICAgICAgICAgICAgICAgaWYgKGxvZy5zZXJpYWxpemVycykge1xuICAgICAgICAgICAgICAgICAgICBsb2cuX2FwcGx5U2VyaWFsaXplcnMocmVjRmllbGRzLCBleGNsdWRlRmllbGRzKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgT2JqZWN0LmtleXMocmVjRmllbGRzKS5mb3JFYWNoKGZ1bmN0aW9uIChrKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlY1trXSA9IHJlY0ZpZWxkc1trXTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYy5sZXZlbE5hbWUgPSBuYW1lRnJvbUxldmVsW21pbkxldmVsXTtcbiAgICAgICAgICAgIHJlYy5tc2cgPSBtc2dBcmdzLmxlbmd0aCA/IGZvcm1hdC5hcHBseShsb2csIG1zZ0FyZ3MpIDogJyc7XG4gICAgICAgICAgICBpZiAoIXJlYy50aW1lKSB7XG4gICAgICAgICAgICAgICAgcmVjLnRpbWUgPSBuZXcgRGF0ZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKGxvZy5zcmMgJiYgIXJlYy5zcmMpIHtcbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoQ0FMTF9TVEFDS19FUlJPUik7XG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBzcmMgPSBleHRyYWN0U3JjRnJvbVN0YWNrdHJhY2UoZXJyLnN0YWNrLCAyKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFzcmMgJiYgIV9oYXZlV2FybmVkKCdzcmMnKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgX3dhcm4oJ1VuYWJsZSB0byBkZXRlcm1pbmUgc3JjIGxpbmUgaW5mbycsICdzcmMnKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZWMuc3JjID0gc3JjIHx8ICcnO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYy52ID0gTE9HX1ZFUlNJT047XG4gICAgICAgICAgICByZXR1cm4gcmVjO1xuICAgICAgICB9XG4gICAgICAgIFxuICAgICAgICB2YXIgZmllbGRzID0gbnVsbDtcbiAgICAgICAgdmFyIG1zZ0FyZ3MgPSBhcmd1bWVudHM7XG4gICAgICAgIHZhciByZWMgPSBudWxsO1xuICAgICAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2xldmVsIDw9IG1pbkxldmVsO1xuICAgICAgICB9IGVsc2UgaWYgKHRoaXMuX2xldmVsID4gbWluTGV2ZWwpIHt9IGVsc2Uge1xuICAgICAgICAgICAgcmVjID0gbWtSZWNvcmQobXNnQXJncyk7XG4gICAgICAgICAgICB0aGlzLl9lbWl0KHJlYyk7XG4gICAgICAgIH1cbiAgICB9O1xufVxuXG5Mb2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ID09IDE7XG4gICAgdmFyIGkgPSAwO1xuICAgIHZhciBydW4gPSBmdW5jdGlvbiAocmVhY3Rpb24pIHtcbiAgICAgIHZhciBoYW5kbGVyID0gb2sgPyByZWFjdGlvbi5vayA6IHJlYWN0aW9uLmZhaWw7XG4gICAgICB2YXIgcmVzb2x2ZSA9IHJlYWN0aW9uLnJlc29sdmU7XG4gICAgICB2YXIgcmVqZWN0ID0gcmVhY3Rpb24ucmVqZWN0O1xuICAgICAgdmFyIGRvbWFpbiA9IHJlYWN0aW9uLmRvbWFpbjtcbiAgICAgIHZhciByZXN1bHQsIHRoZW4sIGV4aXRlZDtcbiAgICAgIHRyeSB7XG4gICAgICAgIGlmIChoYW5kbGVyKSB7XG4gICAgICAgICAgaWYgKCFvaykge1xuICAgICAgICAgICAgaWYgKHByb21pc2UuX2ggPT0gMikgb25IYW5kbGVVbmhhbmRsZWQocHJvbWlzZSk7XG4gICAgICAgICAgICBwcm9taXNlLl9oID0gMTtcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKGhhbmRsZXIgPT09IHRydWUpIHJlc3VsdCA9IHZhbHVlO1xuICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgaWYgKGRvbWFpbikgZG9tYWluLmVudGVyKCk7XG4gICAgICAgICAgICByZXN1bHQgPSBoYW5kbGVyKHZhbHVlKTsgLy8gbWF5IHRocm93XG4gICAgICAgICAgICBpZiAoZG9tYWluKSB7XG4gICAgICAgICAgICAgIGRvbWFpbi5leGl0KCk7XG4gICAgICAgICAgICAgIGV4aXRlZCA9IHRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChyZXN1bHQgPT09IHJlYWN0aW9uLnByb21pc2UpIHtcbiAgICAgICAgICAgIHJlamVjdChUeXBlRXJyb3IoJ1Byb21pc2UtY2hhaW4gY3ljbGUnKSk7XG4gICAgICAgICAgfSBlbHNlIGlmICh0aGVuID0gaXNUaGVuYWJsZShyZXN1bHQpKSB7XG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VnYXRlLCBjb250ZXh0KTtcbiAgICAgICAgICBpZiAoZGVsZWdhdGVSZXN1bHQpIHtcbiAgICAgICAgICAgIGlmIChkZWxlZ2F0ZVJlc3VsdCA9PT0gQ29udGludWVTZW50aW5lbCkgY29udGludWU7XG4gICAgICAgICAgICByZXR1cm4gZGVsZWdhdGVSZXN1bHQ7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGNvbnRleHQubWV0aG9kID09PSBcIm5leHRcIikge1xuICAgICAgICAgIC8vIFNldHRpbmcgY29udGV4dC5fc2VudCBmb3IgbGVnYWN5IHN1cHBvcnQgb2YgQmFiZWwnc1xuICAgICAgICAgIC8vIGZ1bmN0aW9uLnNlbnQgaW1wbGVtZW50YXRpb24uXG4gICAgICAgICAgY29udGV4dC5zZW50ID0gY29udGV4dC5fc2VudCA9IGNvbnRleHQuYXJnO1xuXG4gICAgICAgIH0gZWxzZSBpZiAoY29udGV4dC5tZXRob2QgPT09IFwidGhyb3dcIikge1xuICAgICAgICAgIGlmIChzdGF0ZSA9PT0gR2VuU3RhdGVTdXNwZW5kZWRTdGFydCkge1xuICAgICAgICAgICAgc3RhdGUgPSBHZW5TdGF0ZUNvbXBsZXRlZDtcbiAgICAgICAgICAgIHRocm93IGNvbnRleHQuYXJnO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGNvbnRleHQuZGlzcGF0Y2hFeGNlcHRpb24oY29udGV4dC5hcmcpO1xuXG4gICAgICAgIH0gZWxzZSBpZiAoY29udGV4dC5tZXRob2QgPT09IFwicmV0dXJuXCIpIHtcbiAgICAgICAgICBjb250ZXh0LmFicnVwdChcInJldHVyblwiLCBjb250ZXh0LmFyZyk7XG4gICAgICAgIH1cblxuICAgICAgICBzdGF0ZSA9IEdlblN0YXRlRXhlY3V0aW5nO1xuXG4gICAgICAgIHZhciByZWNvcmQgPSB0cnlDYXRjaChpbm5lckZuLCBzZWxmLCBjb250ZXh0KTtcbiAgICAgICAgaWYgKHJlY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gbWF5YmVJbnZva2VEZWxlZ2F0ZShkZWxlZ2F0ZSwgY29udGV4dCk7XG5cbiAgICAgICAgICBpZiAoY29udGV4dC5tZXRob2QgPT09IFwidGhyb3dcIikge1xuICAgICAgICAgICAgLy8gSWYgbWF5YmVJbnZva2VEZWxlZ2F0ZShjb250ZXh0KSBjaGFuZ2VkIGNvbnRleHQubWV0aG9kIGZyb21cbiAgICAgICAgICAgIC8vIFwicmV0dXJuXCIgdG8gXCJ0aHJvd1wiLCBsZXQgdGhhdCBvdmVycmlkZSB0aGUgVHlwZUVycm9yIGJlbG93LlxuICAgICAgICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgY29udGV4dC5tZXRob2QgPSBcInRocm93XCI7XG4gICAgICAgIGNvbnRleHQuYXJnID0gbmV3IFR5cGVFcnJvcihcbiAgICAgICAgICBcIlRoZSBpdGVyYXRvciBkb2VzIG5vdCBwcm92aWRlIGEgJ3Rocm93JyBtZXRob2RcIik7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBDb250aW51ZVNlbnRpbmVsO1xuICAgIH1cblxuICAgIHZhciByZWNvcmQgPSB0cnlDYXRjaChtZXRob2QsIGRlbGVnYXRlLml0ZXJhdG9yLCBjb250ZXh0LmFyZyk7XG5cbiAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwidGhyb3dcIikge1xuICAgICAgY29udGV4dC5tZXRob2QgPSBcInRocm93XCI7XG4gICAgICBjb250ZXh0LmFyZyA9IHJlY29yZC5hcmc7XG4gICAgICBjb250ZXh0LmRlbGVnYXRlID0gbnVsbDtcbiAgICAgIHJldHVybiBDb250aW51ZVNlbnRpbmVsO1xuICAgIH1cblxuICAgIHZhciBpbmZvID0gcmVjb3JkLmFyZztcblxuICAgIGlmICghIGluZm8pIHtcbiAgICAgIGNvbnRleHQubWV0aG9kID0gXCJ0aHJvd1wiO1xuICAgICAgY29udGV4dC5hcmcgPSB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lFbnRyeSk7XG5cbiAgICAgIGlmICghc2tpcFRlbXBSZXNldCkge1xuICAgICAgICBmb3IgKHZhciBuYW1lIGluIHRoaXMpIHtcbiAgICAgICAgICAvLyBOb3Qgc3VyZSBhYm91dCB0aGUgb3B0aW1hbCBvcmRlciBvZiB0aGVzZSBjb25kaXRpb25zOlxuICAgICAgICAgIGlmIChuYW1lLmNoYXJBdCgwKSA9PT0gXCJ0XCIgJiZcbiAgICAgICAgICAgICAgaGFzT3duLmNhbGwodGhpcywgbmFtZSkgJiZcbiAgICAgICAgICAgICAgIWlzTmFOKCtuYW1lLnNsaWNlKDEpKSkge1xuICAgICAgICAgICAgdGhpc1tuYW1lXSA9IHVuZGVmaW5lZDtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9LFxuXG4gICAgc3RvcDogZnVuY3Rpb24oKSB7XG4gICAgICB0aGlzLmRvbmUgPSB0cnVlO1xuXG4gICAgICB2YXIgcm9vdEVudHJ5ID0gdGhpcy50cnlFbnRyaWVzWzBdO1xuICAgICAgdmFyIHJvb3RSZWNvcmQgPSByb290RW50cnkuY29tcGxldGlvbjtcbiAgICAgIGlmIChyb290UmVjb3JkLnR5cGUgPT09IFwidGhyb3dcIikge1xuICAgICAgICB0aHJvdyByb290UmVjb3JkLmFyZztcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIHRoaXMucnZhbDtcbiAgICB9LFxuXG4gICAgZGlzcGF0Y2hFeGNlcHRpb246IGZ1bmN0aW9uKGV4Y2VwdGlvbikge1xuICAgICAgaWYgKHRoaXMuZG9uZSkge1xuICAgICAgICB0aHJvdyBleGNlcHRpb247XG4gICAgICB9XG5cbiAgICAgIHZhciBjb250ZXh0ID0gdGhpcztcbiAgICAgIGZ1bmN0aW9uIGhhbmRsZShsb2MsIGNhdWdodCkge1xuICAgICAgICByZWNvcmQudHlwZSA9IFwidGhyb3dcIjtcbiAgICAgICAgcmVjb3JkLmFyZyA9IGV4Y2VwdGlvbjt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jaExvY1wiKTtcbiAgICAgICAgICB2YXIgaGFzRmluYWxseSA9IGhhc093bi5jYWxsKGVudHJ5LCBcImZpbmFsbHlMb2NcIik7XG5cbiAgICAgICAgICBpZiAoaGFzQ2F0Y2ggJiYgaGFzRmluYWxseSkge1xuICAgICAgICAgICAgaWYgKHRoaXMucHJldiA8IGVudHJ5LmNhdGNoTG9jKSB7XG4gICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuY2F0Y2hMb2MsIHRydWUpO1xuICAgICAgICAgICAgfSBlbHNlIGlmICh0aGlzLnByZXYgPCBlbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuZmluYWxseUxvYyk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICB9IGVsc2UgaWYgKGhhc0NhdGNoKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5wcmV2IDwgZW50cnkuY2F0Y2hMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5jYXRjaExvYywgdHJ1ZSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICB9IGVsc2UgaWYgKGhhc0ZpbmFsbHkpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnByZXYgPCBlbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuZmluYWxseUxvYyk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwidHJ5IHN0YXRlbWVudCB3aXRob3V0IGNhdGNoIG9yIGZpbmFsbHlcIik7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfSxcblxuICAgIGFicnVwdDogZnVuY3Rpb24odHlwZSwgYXJnKSB7XG4gICAgICBmb3IgKHZhciBpID0gdGhpcy50cnlFbnRyaWVzLmxlbmd0aCAtID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XG4gICAgICAgIHJldHVybiBDb250aW51ZVNlbnRpbmVsO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gdGhpcy5jb21wbGV0ZShyZWNvcmQpO1xuICAgIH0sXG5cbiAgICBjb21wbGV0ZTogZnVuY3Rpb24ocmVjb3JkLCBhZnRlckxvYykge1xuICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcInRocm93XCIpIHtcbiAgICAgICAgdGhyb3cgcmVjb3JkLmFyZztcbiAgICAgIH1cblxuICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcImJyZWFrXCIgfHxcbiAgICAgICAgICByZWNvcmQudHlwZSA9PT0gXCJjb250aW51ZVwiKSB7XG4gICAgICAgIHRoaXMubmV4dCA9IHJlY29yZC5hcmc7XG4gICAgICB9IGVsc2UgaWYgKHJlY29yZC50eXBlID09PSBcInJldHVyblwiKSB7XG4gICAgICAgIHRoaXMucnZhbCA9IHRoaXMuYXJnID0gcmVjb3JkLmFyZztcbiAgICAgICAgdGhpcy5tZXRob2QgPSBcInJldHVyblwiO1xuICAgICAgICB0aGlzLm5leHQgPSBcImVuZFwiO1xuICAgICAgfSBlbHNlIGlmIChyZWNvcmQudHlwZSA9PT0gXCJub3JtYWxcIiAmJiBhZnRlckxvYykge1xuICAgICAgICB0aGlzLm5leHQgPSBhZnRlckxvYztcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgfSxcblxuICAgIGZpbmlzaDogZnVuY3Rpb24oZmluYWxseUxvYykge1xuICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG4gICAgICAgIGlmIChlbnRyeS5maW5hbGx5TG9jID09PSBmaW5hbGx5TG9jKSB7XG4gICAgICAgICAgdGhpcy5jb21wbGV0ZShlbnRyeS5jb21wbGV0aW9uLCBlbnR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OiAnRmlsZVJlYWRlcicgaW4gc2VsZiAmJiAnQmxvYicgaW4gc2VsZiAmJiAoZnVuY3Rpb24oKSB7XG4gICAgICB0cnkge1xuICAgICAgICBuZXcgQmxvYigpXG4gICAgICAgIHJldHVybiB0cnVlXG4gICAgICB9IGNhdGNoKGUpIHtcbiAgICAgICAgcmV0dXJuIGZhbHNlXG4gICAgICB9XG4gICAgfSkoKSxcbiAgICBmb3JtRGF0YTogJ0Zvcm1EYXRhJyBpbiBzZWxmLFxuICAgIGFycmF5QnVmZmVyOiAnQXJyYXlCdWZmZXInIGluIHNlbGZcbiAgfVxuXG4gIGlmIChzdXBwb3J0LmFycmF5QnVmZmVyKSB7XG4gICAgdmFyIHZpZXdDbGFzc2VzID0gW1xuICAgICAgJ1tvYmplY3QgSW50OEFycmF5XScsXG4gICAgICAnW29iamVjdCBVaW50OEFycmF5XScsXG4gICAgICAnW29iamVjdCBVaW50OENsYW1wZWRBcnJheV0nLFxuICAgICAgJ1tvYmplY3QgSW50MTZBcnJheV0nLFxuICAgICAgJ1tvYmplY3QgVWludDE2QXJyYXldJyxcbiAgICAgICdbb2JqZWN0IEludDMyQXJyYXldJyxcbiAgICAgICdbb2JqZWN0IFVpbnQzMkFycmF5XScsXG4gICAgICAnW29iamVjdCBGbG9hdDMyQXJyYXldJyxcbiAgICAgICdbb2JqZWN0IEZsb2F0NjRBcnJheV0nXG4gICAgXVxuXG4gICAgdmFyIGlzRGF0YVZpZXcgPSBmdW5jdGlvbihvYmopIHtcbiAgICAgIHJldHVybiBvYmogJiYgRGF0YVZpZXcucHJvdG90eXBlLmlzUHJvdG90eXBlT2Yob2JqKVxuICAgIH1cblxuICAgIHZhciBpc0FycmF5QnVmZmVyVmlldyA9IEFycmF5QnVmZmVyLmlzVmlldyB8fCBmdW5jdGlvbihvYmopIHtcbiAgICAgIHJldHVybiBvYmogJiYgdmlld0NsYXNzZXMuaW5kZXhPZihPYmplY3QucHJvdG90eXBlLnRvU3RyaW5nLmNhbGw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ICB9XG4gIGxvZ2dlciA9IGNyZWF0ZUxvZ2dlcih7XG4gICAgbGV2ZWw6IGxldmVsLFxuICAgIG5hbWU6ICdyZWQ1cHJvLWV4dC1zbScsXG4gICAgc3RyZWFtczogc3RyZWFtc1xuICB9KVxufVxuXG4vKipcbiAqIFJldHVybiB0aGUgZGV0ZXJtaW5lZCBsb2dnZXIgaW5zdGFuY2UuXG4gKlxuICogQHJldHVybiB7T2JqZWN0fVxuICpcbiAqIEBwcml2YXRlXG4gKi9cbmV4cG9ydCBjb25zdCBnZXRMb2dnZXIgPSAoKSA9PiB7XG4gIHJldHVybiBsb2dnZXJcbn1cblxuLyogUXVpY2sgYWNjZXNzIHRvIGxvZ2dlciBsZXZlbCB0eXBlcy4gKi9cbmV4cG9ydCBjb25zdCB0cmFjZSA9IGRlY29yYXRlKExFVkVMUy5UUkFDRSlcbmV4cG9ydCBjb25zdCBpbmZvID0gZGVjb3JhdGUoTEVWRUxTLklORk8pXG5leHBvcnQgY29uc3QgZGVidWcgPSBkZWNvcmF0ZShMRVZFTFMuREVCVUcpXG5leHBvcnQgY29uc3Qgd2FybiA9IGRlY29yYXRlKExFVkVMUy5XQVJOKVxuZXhwb3J0IGNvbnN0IGVycm9yID0gZGVjb3JhdGUoTEVWRUxTLkVSUk9SKVxuZXhwb3J0IGNvbnN0IGZhdGFsID0gZGVjb3JhdGUoTEVWRUxTLkZBVEFMKVxuIl0sInNvdXJjZVJvb3QiOiIifQ== \ No newline at end of file diff --git a/examples/browser/subscriber-failover.html b/examples/browser/subscriber-failover.html index f159ab6..cc88bd3 100644 --- a/examples/browser/subscriber-failover.html +++ b/examples/browser/subscriber-failover.html @@ -20,8 +20,10 @@ streamName: 'stream1todd', scope: 'live', apiVersion: '2.0', - action: 'broadcast', - useProxy: true + action: 'subscribe', + useProxy: true, + retryLimit: 3, + retryDelay: 2000 }; var config = { rtc: { diff --git a/src/js/autoscale/index.js b/src/js/autoscale/index.js index 051259a..bcdb0ec 100644 --- a/src/js/autoscale/index.js +++ b/src/js/autoscale/index.js @@ -32,13 +32,14 @@ const modifyInitConfigWithResponse = (config, response, autoscaleConfig) => { return c } -const execute = async (config, count, limit) => { +const execute = async (config, count, limit, delay) => { const onfailure = () => { - if (++count < limit) { + if (count++ < limit) { + debug(NAME, `Attempt ${count} of ${limit}, with ${delay} millisecond delay.`) let timeout = setTimeout(() => { clearTimeout(timeout) - execute(config, count, limit) - }, 1000) + execute(config, count, limit, delay) + }, delay) return true } return false @@ -48,17 +49,19 @@ const execute = async (config, count, limit) => { let response = await request(config) return response } catch (e) { - if (!onfailure()) throw e + if (!onfailure()) { + throw e + } } } export const autoscaleInit = async (proxy, autoscaleConfig, initConfig) => { let retryCount = 0 - const { retryLimit } = autoscaleConfig + const { retryLimit, retryDelay } = autoscaleConfig let response try { - response = await execute(autoscaleConfig, retryCount, retryLimit) + response = await execute(autoscaleConfig, retryCount, retryLimit, retryDelay) const keys = Object.keys(initConfig) if (isFailoverConfig.test(keys.toString())) { let key diff --git a/src/js/autoscale/request.js b/src/js/autoscale/request.js index e5114bb..c63f674 100644 --- a/src/js/autoscale/request.js +++ b/src/js/autoscale/request.js @@ -11,6 +11,7 @@ const defaultConfig = { region: undefined, // optional accessToken: undefined, // optional retryLimit: 0, // optional, default (no retry) + retryDelay: 1000, // optional, default=1000 useProxy: true // optional, default=true. Enforces connection proxy for WebRTC clients } From 664d5e7b2fa53c44932c66c7420c8684c5edd561 Mon Sep 17 00:00:00 2001 From: bustardcelly Date: Mon, 11 Jun 2018 12:58:14 -0400 Subject: [PATCH 08/15] adding in jsdoc. --- .jsdoc | 20 + .../fonts/glyphicons-halflings-regular.eot | Bin 0 -> 20127 bytes .../fonts/glyphicons-halflings-regular.svg | 288 ++++++ .../fonts/glyphicons-halflings-regular.ttf | Bin 0 -> 45404 bytes .../fonts/glyphicons-halflings-regular.woff | Bin 0 -> 23424 bytes .../fonts/glyphicons-halflings-regular.woff2 | Bin 0 -> 18028 bytes docs/api/img/red5pro_logo.png | Bin 0 -> 4629 bytes docs/api/img/toast-ui.png | Bin 0 -> 23776 bytes docs/api/index.html | 179 ++++ .../module-red5prosdk_ext_stream_manager.html | 401 +++++++++ docs/api/scripts/jquery.min.js | 2 + docs/api/scripts/linenumber.js | 30 + .../scripts/prettify/Apache-License-2.0.txt | 202 +++++ docs/api/scripts/prettify/lang-css.js | 2 + docs/api/scripts/prettify/prettify.js | 28 + docs/api/scripts/tui-doc.js | 200 +++++ docs/api/styles/bootstrap.min.css | 6 + docs/api/styles/prettify-jsdoc.css | 111 +++ docs/api/styles/prettify-tomorrow.css | 132 +++ docs/api/styles/red5pro-doc.css | 53 ++ docs/api/styles/tui-doc.css | 485 ++++++++++ docs/index.md | 102 +++ docs/jsdoc-template/.editorconfig | 11 + docs/jsdoc-template/.gitattributes | 1 + docs/jsdoc-template/.npmignore | 55 ++ docs/jsdoc-template/LICENSE | 21 + docs/jsdoc-template/README.md | 148 ++++ docs/jsdoc-template/demo/jsdoc-conf.json | 20 + docs/jsdoc-template/demo/samples/chart.html | 135 +++ docs/jsdoc-template/demo/samples/editor.html | 45 + .../jsdoc-template/demo/samples/examples.json | 17 + docs/jsdoc-template/demo/samples/grid.html | 174 ++++ .../demo/samples/image-editor.html | 611 +++++++++++++ .../demo/samples/markdownTutorial.md | 68 ++ docs/jsdoc-template/demo/src/class.js | 186 ++++ docs/jsdoc-template/demo/src/etc.js | 57 ++ docs/jsdoc-template/demo/src/mixin.js | 46 + docs/jsdoc-template/demo/src/module.js | 39 + docs/jsdoc-template/demo/src/namespace.js | 59 ++ docs/jsdoc-template/gulpfile.js | 103 +++ docs/jsdoc-template/package.json | 104 +++ docs/jsdoc-template/publish.js | 828 ++++++++++++++++++ .../fonts/glyphicons-halflings-regular.eot | Bin 0 -> 20127 bytes .../fonts/glyphicons-halflings-regular.svg | 288 ++++++ .../fonts/glyphicons-halflings-regular.ttf | Bin 0 -> 45404 bytes .../fonts/glyphicons-halflings-regular.woff | Bin 0 -> 23424 bytes .../fonts/glyphicons-halflings-regular.woff2 | Bin 0 -> 18028 bytes .../static/img/red5pro_logo.png | Bin 0 -> 4629 bytes docs/jsdoc-template/static/img/toast-ui.png | Bin 0 -> 23776 bytes .../static/scripts/jquery.min.js | 2 + .../static/scripts/linenumber.js | 30 + .../scripts/prettify/Apache-License-2.0.txt | 202 +++++ .../static/scripts/prettify/lang-css.js | 2 + .../static/scripts/prettify/prettify.js | 28 + docs/jsdoc-template/static/scripts/tui-doc.js | 200 +++++ .../static/styles/bootstrap.min.css | 6 + .../static/styles/prettify-jsdoc.css | 111 +++ .../static/styles/prettify-tomorrow.css | 132 +++ .../static/styles/red5pro-doc.css | 53 ++ docs/jsdoc-template/static/styles/tui-doc.css | 485 ++++++++++ docs/jsdoc-template/tmpl/augments.tmpl | 10 + docs/jsdoc-template/tmpl/container.tmpl | 186 ++++ docs/jsdoc-template/tmpl/details.tmpl | 136 +++ docs/jsdoc-template/tmpl/example.tmpl | 2 + docs/jsdoc-template/tmpl/examples.tmpl | 13 + docs/jsdoc-template/tmpl/exceptions.tmpl | 32 + docs/jsdoc-template/tmpl/layout.tmpl | 121 +++ docs/jsdoc-template/tmpl/mainpage.tmpl | 10 + docs/jsdoc-template/tmpl/members.tmpl | 52 ++ docs/jsdoc-template/tmpl/method.tmpl | 123 +++ docs/jsdoc-template/tmpl/params.tmpl | 123 +++ docs/jsdoc-template/tmpl/properties.tmpl | 108 +++ docs/jsdoc-template/tmpl/returns.tmpl | 13 + docs/jsdoc-template/tmpl/source.tmpl | 8 + .../tmpl/subsection-default.tmpl | 17 + docs/jsdoc-template/tmpl/tutorial.tmpl | 102 +++ docs/jsdoc-template/tmpl/type.tmpl | 7 + examples/browser/dual-rtc.html | 84 ++ package-lock.json | 238 +++++ package.json | 36 +- 80 files changed, 7919 insertions(+), 10 deletions(-) create mode 100644 .jsdoc create mode 100644 docs/api/fonts/glyphicons-halflings-regular.eot create mode 100644 docs/api/fonts/glyphicons-halflings-regular.svg create mode 100644 docs/api/fonts/glyphicons-halflings-regular.ttf create mode 100644 docs/api/fonts/glyphicons-halflings-regular.woff create mode 100644 docs/api/fonts/glyphicons-halflings-regular.woff2 create mode 100644 docs/api/img/red5pro_logo.png create mode 100644 docs/api/img/toast-ui.png create mode 100644 docs/api/index.html create mode 100644 docs/api/module-red5prosdk_ext_stream_manager.html create mode 100644 docs/api/scripts/jquery.min.js create mode 100644 docs/api/scripts/linenumber.js create mode 100644 docs/api/scripts/prettify/Apache-License-2.0.txt create mode 100644 docs/api/scripts/prettify/lang-css.js create mode 100644 docs/api/scripts/prettify/prettify.js create mode 100644 docs/api/scripts/tui-doc.js create mode 100644 docs/api/styles/bootstrap.min.css create mode 100644 docs/api/styles/prettify-jsdoc.css create mode 100644 docs/api/styles/prettify-tomorrow.css create mode 100644 docs/api/styles/red5pro-doc.css create mode 100644 docs/api/styles/tui-doc.css create mode 100644 docs/index.md create mode 100644 docs/jsdoc-template/.editorconfig create mode 100644 docs/jsdoc-template/.gitattributes create mode 100644 docs/jsdoc-template/.npmignore create mode 100644 docs/jsdoc-template/LICENSE create mode 100644 docs/jsdoc-template/README.md create mode 100644 docs/jsdoc-template/demo/jsdoc-conf.json create mode 100644 docs/jsdoc-template/demo/samples/chart.html create mode 100644 docs/jsdoc-template/demo/samples/editor.html create mode 100644 docs/jsdoc-template/demo/samples/examples.json create mode 100644 docs/jsdoc-template/demo/samples/grid.html create mode 100644 docs/jsdoc-template/demo/samples/image-editor.html create mode 100644 docs/jsdoc-template/demo/samples/markdownTutorial.md create mode 100644 docs/jsdoc-template/demo/src/class.js create mode 100644 docs/jsdoc-template/demo/src/etc.js create mode 100644 docs/jsdoc-template/demo/src/mixin.js create mode 100644 docs/jsdoc-template/demo/src/module.js create mode 100644 docs/jsdoc-template/demo/src/namespace.js create mode 100644 docs/jsdoc-template/gulpfile.js create mode 100644 docs/jsdoc-template/package.json create mode 100755 docs/jsdoc-template/publish.js create mode 100644 docs/jsdoc-template/static/fonts/glyphicons-halflings-regular.eot create mode 100644 docs/jsdoc-template/static/fonts/glyphicons-halflings-regular.svg create mode 100644 docs/jsdoc-template/static/fonts/glyphicons-halflings-regular.ttf create mode 100644 docs/jsdoc-template/static/fonts/glyphicons-halflings-regular.woff create mode 100644 docs/jsdoc-template/static/fonts/glyphicons-halflings-regular.woff2 create mode 100644 docs/jsdoc-template/static/img/red5pro_logo.png create mode 100755 docs/jsdoc-template/static/img/toast-ui.png create mode 100755 docs/jsdoc-template/static/scripts/jquery.min.js create mode 100755 docs/jsdoc-template/static/scripts/linenumber.js create mode 100755 docs/jsdoc-template/static/scripts/prettify/Apache-License-2.0.txt create mode 100755 docs/jsdoc-template/static/scripts/prettify/lang-css.js create mode 100755 docs/jsdoc-template/static/scripts/prettify/prettify.js create mode 100644 docs/jsdoc-template/static/scripts/tui-doc.js create mode 100644 docs/jsdoc-template/static/styles/bootstrap.min.css create mode 100755 docs/jsdoc-template/static/styles/prettify-jsdoc.css create mode 100755 docs/jsdoc-template/static/styles/prettify-tomorrow.css create mode 100644 docs/jsdoc-template/static/styles/red5pro-doc.css create mode 100644 docs/jsdoc-template/static/styles/tui-doc.css create mode 100755 docs/jsdoc-template/tmpl/augments.tmpl create mode 100755 docs/jsdoc-template/tmpl/container.tmpl create mode 100755 docs/jsdoc-template/tmpl/details.tmpl create mode 100755 docs/jsdoc-template/tmpl/example.tmpl create mode 100755 docs/jsdoc-template/tmpl/examples.tmpl create mode 100755 docs/jsdoc-template/tmpl/exceptions.tmpl create mode 100755 docs/jsdoc-template/tmpl/layout.tmpl create mode 100755 docs/jsdoc-template/tmpl/mainpage.tmpl create mode 100755 docs/jsdoc-template/tmpl/members.tmpl create mode 100755 docs/jsdoc-template/tmpl/method.tmpl create mode 100755 docs/jsdoc-template/tmpl/params.tmpl create mode 100755 docs/jsdoc-template/tmpl/properties.tmpl create mode 100755 docs/jsdoc-template/tmpl/returns.tmpl create mode 100755 docs/jsdoc-template/tmpl/source.tmpl create mode 100644 docs/jsdoc-template/tmpl/subsection-default.tmpl create mode 100755 docs/jsdoc-template/tmpl/tutorial.tmpl create mode 100755 docs/jsdoc-template/tmpl/type.tmpl create mode 100644 examples/browser/dual-rtc.html diff --git a/.jsdoc b/.jsdoc new file mode 100644 index 0000000..1875b89 --- /dev/null +++ b/.jsdoc @@ -0,0 +1,20 @@ +{ + "plugins": ["plugins/markdown"], + "markdown": { + "tags": ["example"] + }, + "opts": { + "destination": "docs/api", + "readme": "docs/index.md", + "template": "docs/jsdoc-template", + "package": "package.json", + "recurse": true, + "encoding": "utf8" + }, + "templates": { + "default": { + "outputSourceFiles": false + }, + "footerText": "" + } + } diff --git a/docs/api/fonts/glyphicons-halflings-regular.eot b/docs/api/fonts/glyphicons-halflings-regular.eot new file mode 100644 index 0000000000000000000000000000000000000000..b93a4953fff68df523aa7656497ee339d6026d64 GIT binary patch literal 20127 zcma%hV{j!vx9y2-`@~L8?1^pLwlPU2wr$&<*tR|KBoo`2;LUg6eW-eW-tKDb)vH%` z^`A!Vd<6hNSRMcX|Cb;E|1qflDggj6Kmr)xA10^t-vIc3*Z+F{r%|K(GyE^?|I{=9 zNq`(c8=wS`0!RZy0g3{M(8^tv41d}oRU?8#IBFtJy*9zAN5dcxqGlMZGL>GG%R#)4J zDJ2;)4*E1pyHia%>lMv3X7Q`UoFyoB@|xvh^)kOE3)IL&0(G&i;g08s>c%~pHkN&6 z($7!kyv|A2DsV2mq-5Ku)D#$Kn$CzqD-wm5Q*OtEOEZe^&T$xIb0NUL}$)W)Ck`6oter6KcQG9Zcy>lXip)%e&!lQgtQ*N`#abOlytt!&i3fo)cKV zP0BWmLxS1gQv(r_r|?9>rR0ZeEJPx;Vi|h1!Eo*dohr&^lJgqJZns>&vexP@fs zkPv93Nyw$-kM5Mw^{@wPU47Y1dSkiHyl3dtHLwV&6Tm1iv{ve;sYA}Z&kmH802s9Z zyJEn+cfl7yFu#1^#DbtP7k&aR06|n{LnYFYEphKd@dJEq@)s#S)UA&8VJY@S2+{~> z(4?M();zvayyd^j`@4>xCq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03|>L z8ej+HzzgVr6_5ZUpa4HW0Ca!=r1%*}Oo;2no&Zz8DfR)L!@r<5 z2viSZpmvo5XqXyAz{Ms7`7kX>fnr1gi4X~7KpznRT0{Xc5Cfz@43PjBMBoH@z_{~( z(Wd}IPJ9hH+%)Fc)0!hrV+(A;76rhtI|YHbEDeERV~Ya>SQg^IvlazFkSK(KG9&{q zkPIR~EeQaaBmwA<20}mBO?)N$(z1@p)5?%}rM| zGF()~Z&Kx@OIDRI$d0T8;JX@vj3^2%pd_+@l9~a4lntZ;AvUIjqIZbuNTR6@hNJoV zk4F;ut)LN4ARuyn2M6F~eg-e#UH%2P;8uPGFW^vq1vj8mdIayFOZo(tphk8C7hpT~ z1Fv8?b_LNR3QD9J+!v=p%}# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/api/fonts/glyphicons-halflings-regular.ttf b/docs/api/fonts/glyphicons-halflings-regular.ttf new file mode 100644 index 0000000000000000000000000000000000000000..1413fc609ab6f21774de0cb7e01360095584f65b GIT binary patch literal 45404 zcmd?Sd0-pWwLh*qi$?oCk~i6sWlOeWJC3|4juU5JNSu9hSVACzERcmjLV&P^utNzg zIE4Kr1=5g!SxTX#Ern9_%4&01rlrW`Z!56xXTGQR4C z3vR~wXq>NDx$c~e?;ia3YjJ*$!C>69a?2$lLyhpI!CFfJsP=|`8@K0|bbMpWwVUEygg0=0x_)HeHpGSJagJNLA3c!$EuOV>j$wi! zbo{vZ(s8tl>@!?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P0ZF%fy=hDN!t#ifH<)4u2kirK~JUpjQ-J+~cXOZI&dIts;P}UeXslP6zKvpEKSN-$y>kJ^nw2tC9bv zo(|lT@?vZ!{_l|d^8Yh)eEBh*5ABh+Lzjw+?V)o z#P-W7361>E(Y4;@`sv;VKn G`u_lkUM?>H literal 0 HcmV?d00001 diff --git a/docs/api/fonts/glyphicons-halflings-regular.woff2 b/docs/api/fonts/glyphicons-halflings-regular.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..64539b54c3751a6d9adb44c8e3a45ba5a73b77f0 GIT binary patch literal 18028 zcmV(~K+nH-Pew8T0RR9107h&84*&oF0I^&E07eM_0Rl|`00000000000000000000 z0000#Mn+Uk92y`7U;vDA2m}!b3WBL5f#qcZHUcCAhI9*rFaQJ~1&1OBl~F%;WnyLq z8)b|&?3j;$^FW}&KmNW53flIFARDZ7_Wz%hpoWaWlgHTHEHf()GI0&dMi#DFPaEt6 zCO)z0v0~C~q&0zBj^;=tv8q{$8JxX)>_`b}WQGgXi46R*CHJ}6r+;}OrvwA{_SY+o zK)H-vy{l!P`+NG*`*x6^PGgHH4!dsolgU4RKj@I8Xz~F6o?quCX&=VQ$Q{w01;M0? zKe|5r<_7CD z=eO3*x!r$aX2iFh3;}xNfx0v;SwBfGG+@Z;->HhvqfF4r__4$mU>Dl_1w;-9`~5rF~@!3;r~xP-hZvOfOx)A z#>8O3N{L{naf215f>m=bzbp7_(ssu&cx)Qo-{)!)Yz3A@Z0uZaM2yJ8#OGlzm?JO5gbrj~@)NB4@?>KE(K-$w}{};@dKY#K3+Vi64S<@!Z{(I{7l=!p9 z&kjG^P~0f46i13(w!hEDJga;*Eb z`!n|++@H8VaKG<9>VDh(y89J#=;Z$ei=GnD5TesW#|Wf)^D+9NKN4J3H5PF_t=V+Z zdeo8*h9+8&Zfc?>>1|E4B7MAx)^uy$L>szyXre7W|81fjy+RZ1>Gd}@@${~PCOXo) z$#HZd3)V3@lNGG%(3PyIbvyJTOJAWcN@Uh!FqUk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00001 diff --git a/docs/api/img/red5pro_logo.png b/docs/api/img/red5pro_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..5b3a008e8f61483de24059dbf9a2b35d0259979a GIT binary patch literal 4629 zcmb7I=QkS;7e)}ZHAd{xie0m2QMg)pYA>Po^w;pP4yXQxoFAA$QTUn>sXMHkw^clHEF2-#py79 zhJT6L-AG@D?CL*z-TgNAA9F4EzFp`)1@=ED*Agj;{6_-A3`}%^%hc2i^s1h?+d^by zEGPpVO{>TsyCqRbtNuJp+?*PK2FyGpjhmSP2+)3NGPGI+naJ1v&Ia37fQJT5=+$iq z!qMsx;dj3HWRyX^gJCELw4x0RMJ?YP0P1D;zoQWp84ELm1Juo(|7<&)={vDgd!5dA z$DGLo$KtX4{Bq$z*y5;Pv(=WH#T1&%l>ZMBo!G6%`a6bxjS>faAAfmzgH^i&v0^Bv zz?5*4QJbuoh8Ozn&5e>_;!@<##Y(nVBVL%*%e=YsLEmF{*-_N>MHPxMsnt^j*Yq+4+VJ`z@d52k4Mwk#Y z%~kXIJ^l#5#|<(;$I{FOvC8%en?E(DcLKy39WD?x@o~W9Ha#~WGXRBgT&7(J5n+#& zM(K)pa4!LF)3>E5kww;w(Z&_88@?{riSYsKQK5m20=Pdm%Z)G2zVF%l^-BJHg4PXj z+DfL+T2pP0oCWr-A=4UOy{5$%dDXSudbQFZ9aL!e^7Su32I~xSbw7TF<;U0 zkjEkE!r!7$x%x?Lx%PqS$1loxcZ10Ag6C?()XSf&itTFjWaKf2Bnkq8zpYGuz*BYP z4qsq@Tk#Ks9ePfRwug!7(-sDIP+ZHoW|}j}63}x`I^&*2K7RPL1V$k7nyk3*sxBzXVR^Hwr zG!WTSP|2;NDH>Rh$%(<=7iRKPEg%S>*?I`Ei^3Rvu;PU9o_;6wgt=>2dC^gw2=92f z{r8~!jn4BV3G3!&&-^g&G{%Fvzj455Z5@`#F_VBg@9WB!7D?STA$4K?*qO8Nj9Eq| z8*@?#620m7$Z>xv@LkOq+{6F%m{-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GYZ zJ8Q94Nr$(S0W36^F84U*oUORUy(Tu`lkR}7GpZ6j%OP5*a7)axv+G)d#Z={r$;Jf) zh6WA1Ow;=`RdsQNtFF`mdzbnv^+x;y4$|eNgt-yU2;!3AwC*%s-%NkYAMfTOFwp6C zHH2k?Z;d7G=Cr)TslCh619ka^sgrtAa9PAY-=1he9ZUhwKs#!j>MC8GxJH`S1{Y}v zvF + + + + Home | red5pro-extension-stream-manager + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + +
+

Red5 Pro HTML5 SDK

+

Download the latest release

+
+

Quickstart

<!doctype html>
+<html>
+  <head>
+    <!-- *Recommended WebRTC Shim -->
+    <script src="http://webrtc.github.io/adapter/adapter-latest.js"></script>
+  </head>
+  <body>
+    <!-- video containers -->
+    <!-- publisher -->
+    <div>
+      <video id="red5pro-publisher" width="640" height="480" muted autoplay></video>
+    </div>
+    <!-- subscriber -->
+    <div>
+      <video id="red5pro-subscriber" width="640" height="480" controls autoplay></video>
+    </div>
+    <!-- Red5 Pro SDK -->
+    <script src="lib/red5pro/red5pro-sdk.min.js"></script>
+    <script src="lib/red5pro/red5pro-ext-stream-manager.js"></script>
+    <!-- Create Pub/Sub with Stream Manager support-->
+    <script>
+      (function(red5prosdk, sm_ext) {
+        'use strict';
+        red5prosdk.setLogLevel('debug');
+        sm_ext.setLogLevel('debug');
+
+        // Extend the Red5Pro sdk.
+        sm_ext.decorate();
+
+        var rtcPublisher = new red5prosdk.RTCPublisher();
+        var rtcSubscriber = new red5prosdk.RTCSubscriber();
+
+        var autoscaleConfig = {
+          protocol: 'https',
+          host: 'streammanager.company.org',
+          streamName: 'mystream',
+          scope: 'live',
+          apiVersion: '3.0',
+          useProxy: true
+        };
+
+        var initConfig = {
+          protocol: 'wss',
+          host: 'streammanager.company.org',
+          port: 8081,
+          app: 'live',
+          streamName: 'mystream',
+          iceServers: [{urls: 'stun:stun2.l.google.com:19302'}]
+        };
+
+        var publishAutoscaleConfig = Object.assign({}, autoscaleConfig, {
+          action: 'broadcast'
+        });
+        var subscribeAutoscaleConfig = Object.assign({}, autoscaleConfig, {
+          action: 'subscribe'
+        });
+
+        function subscribe () {
+          rtcSubscriber.autoscale(subscribeAutoscaleConfig, initConfig)
+            .then(function () {
+              return rtcSubscriber.subscribe();
+            })
+            .catch(function (error) {
+              console.error('Could not play: ' + error);
+            });
+        }
+
+        // First connect Autoscale-d Publisher.
+        rtcPublisher.autoscale(publishAutoscaleConfig, initConfig)
+          .then(function () {
+            // Once publishing, we will start the Autoscale-d Subscriber.
+            rtcPublisher.on(red5prosdk.PublisherEventTypes.PUBLISH_START, subscribe);
+            return rtcPublisher.publish();
+          })
+          .catch(function (error) {
+            console.error('Could not publish: ' + error)
+          });
+
+      }(window.red5prosdk, window.red5prosdk_ext_stream_manager));
+    </script>
+  </body>
+</html>

Requirements

The Red5 Pro HTML SDK is intended to communicate with a Red5 Pro Server, which allows for broadcasting and consuming live streams utilizing WebRTC and other protocols, including RTMP and HLS.

+

A Red5 Pro Server can be deployed to allow for autoscaling on cloud platforms (such as Amazon Web Services). In such a scenario, the Stream Manager API is used by client-side webapps to access endpoints for Origins and Edges.

+

With the Red5Pro Stream Manager Extension the communication with the Stream Manager is simplified and abstracted to allow for a familar client-side API which will handle accessing and configuring publishers and subscribers to stream on Origins and Edges, respectively.

+
+

Click here to start using the Red5 Pro Server today!

+
+
+ + + + + + +
+ +
+ +
+ + + + + + + + + \ No newline at end of file diff --git a/docs/api/module-red5prosdk_ext_stream_manager.html b/docs/api/module-red5prosdk_ext_stream_manager.html new file mode 100644 index 0000000..cb465d3 --- /dev/null +++ b/docs/api/module-red5prosdk_ext_stream_manager.html @@ -0,0 +1,401 @@ + + + + + Module: red5prosdk_ext_stream_manager | red5pro-extension-stream-manager + + + + + + + + + + + + + + +
+ +
+ + + + + +
+ +
+ +

red5prosdk_ext_stream_manager

+ + + + +
+ +
+ +
+ + +

red5pro-ext-stream-manager.min.js

+ + + + + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + +
+ + + + + + + + + + + + + + + +

Members

+ +
+ + +
+

+ static, constant getLogger + +

+ + +
+
+ +
+

Retrieves the Logger instance used by the SDK.

+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ + + + +
+

+ static, constant LOG_LEVELS + +

+ + +
+
+ +
+

The enumerated log level Strings.

+
    +
  • TRACE
  • +
  • INFO
  • +
  • DEBUG
  • +
  • WARN
  • +
  • ERROR
  • +
  • FATAL
  • +
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ + + + +
+

+ static, constant setLogLevel + +

+ + +
+
+ +
+

Sets the log level for logs from the SDK

+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
See:
+
+
    +
  • LOG_LEVELS
  • +
+
+ + + +
+ + + + + +
+ +
+ + + + + + + +
+ +
+ + + + +
+ +
+ +
+ + + + + + + + + \ No newline at end of file diff --git a/docs/api/scripts/jquery.min.js b/docs/api/scripts/jquery.min.js new file mode 100644 index 0000000..45477c0 --- /dev/null +++ b/docs/api/scripts/jquery.min.js @@ -0,0 +1,2 @@ +/*! jQuery v1.8.3 jquery.com | jquery.org/license */ +(function(e,t){function _(e){var t=M[e]={};return v.each(e.split(y),function(e,n){t[n]=!0}),t}function H(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(P,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:+r+""===r?+r:D.test(r)?v.parseJSON(r):r}catch(s){}v.data(e,n,r)}else r=t}return r}function B(e){var t;for(t in e){if(t==="data"&&v.isEmptyObject(e[t]))continue;if(t!=="toJSON")return!1}return!0}function et(){return!1}function tt(){return!0}function ut(e){return!e||!e.parentNode||e.parentNode.nodeType===11}function at(e,t){do e=e[t];while(e&&e.nodeType!==1);return e}function ft(e,t,n){t=t||0;if(v.isFunction(t))return v.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return v.grep(e,function(e,r){return e===t===n});if(typeof t=="string"){var r=v.grep(e,function(e){return e.nodeType===1});if(it.test(t))return v.filter(t,r,!n);t=v.filter(t,r)}return v.grep(e,function(e,r){return v.inArray(e,t)>=0===n})}function lt(e){var t=ct.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function At(e,t){if(t.nodeType!==1||!v.hasData(e))return;var n,r,i,s=v._data(e),o=v._data(t,s),u=s.events;if(u){delete o.handle,o.events={};for(n in u)for(r=0,i=u[n].length;r").appendTo(i.body),n=t.css("display");t.remove();if(n==="none"||n===""){Pt=i.body.appendChild(Pt||v.extend(i.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!Ht||!Pt.createElement)Ht=(Pt.contentWindow||Pt.contentDocument).document,Ht.write(""),Ht.close();t=Ht.body.appendChild(Ht.createElement(e)),n=Dt(t,"display"),i.body.removeChild(Pt)}return Wt[e]=n,n}function fn(e,t,n,r){var i;if(v.isArray(t))v.each(t,function(t,i){n||sn.test(e)?r(e,i):fn(e+"["+(typeof i=="object"?t:"")+"]",i,n,r)});else if(!n&&v.type(t)==="object")for(i in t)fn(e+"["+i+"]",t[i],n,r);else r(e,t)}function Cn(e){return function(t,n){typeof t!="string"&&(n=t,t="*");var r,i,s,o=t.toLowerCase().split(y),u=0,a=o.length;if(v.isFunction(n))for(;u)[^>]*$|#([\w\-]*)$)/,E=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,S=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,T=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,N=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,C=/^-ms-/,k=/-([\da-z])/gi,L=function(e,t){return(t+"").toUpperCase()},A=function(){i.addEventListener?(i.removeEventListener("DOMContentLoaded",A,!1),v.ready()):i.readyState==="complete"&&(i.detachEvent("onreadystatechange",A),v.ready())},O={};v.fn=v.prototype={constructor:v,init:function(e,n,r){var s,o,u,a;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if(typeof e=="string"){e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3?s=[null,e,null]:s=w.exec(e);if(s&&(s[1]||!n)){if(s[1])return n=n instanceof v?n[0]:n,a=n&&n.nodeType?n.ownerDocument||n:i,e=v.parseHTML(s[1],a,!0),E.test(s[1])&&v.isPlainObject(n)&&this.attr.call(e,n,!0),v.merge(this,e);o=i.getElementById(s[2]);if(o&&o.parentNode){if(o.id!==s[2])return r.find(e);this.length=1,this[0]=o}return this.context=i,this.selector=e,this}return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e)}return v.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),v.makeArray(e,this))},selector:"",jquery:"1.8.3",length:0,size:function(){return this.length},toArray:function(){return l.call(this)},get:function(e){return e==null?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=v.merge(this.constructor(),e);return r.prevObject=this,r.context=this.context,t==="find"?r.selector=this.selector+(this.selector?" ":"")+n:t&&(r.selector=this.selector+"."+t+"("+n+")"),r},each:function(e,t){return v.each(this,e,t)},ready:function(e){return v.ready.promise().done(e),this},eq:function(e){return e=+e,e===-1?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(l.apply(this,arguments),"slice",l.call(arguments).join(","))},map:function(e){return this.pushStack(v.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:[].sort,splice:[].splice},v.fn.init.prototype=v.fn,v.extend=v.fn.extend=function(){var e,n,r,i,s,o,u=arguments[0]||{},a=1,f=arguments.length,l=!1;typeof u=="boolean"&&(l=u,u=arguments[1]||{},a=2),typeof u!="object"&&!v.isFunction(u)&&(u={}),f===a&&(u=this,--a);for(;a0)return;r.resolveWith(i,[v]),v.fn.trigger&&v(i).trigger("ready").off("ready")},isFunction:function(e){return v.type(e)==="function"},isArray:Array.isArray||function(e){return v.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return e==null?String(e):O[h.call(e)]||"object"},isPlainObject:function(e){if(!e||v.type(e)!=="object"||e.nodeType||v.isWindow(e))return!1;try{if(e.constructor&&!p.call(e,"constructor")&&!p.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||p.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){var r;return!e||typeof e!="string"?null:(typeof t=="boolean"&&(n=t,t=0),t=t||i,(r=E.exec(e))?[t.createElement(r[1])]:(r=v.buildFragment([e],t,n?null:[]),v.merge([],(r.cacheable?v.clone(r.fragment):r.fragment).childNodes)))},parseJSON:function(t){if(!t||typeof t!="string")return null;t=v.trim(t);if(e.JSON&&e.JSON.parse)return e.JSON.parse(t);if(S.test(t.replace(T,"@").replace(N,"]").replace(x,"")))return(new Function("return "+t))();v.error("Invalid JSON: "+t)},parseXML:function(n){var r,i;if(!n||typeof n!="string")return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(s){r=t}return(!r||!r.documentElement||r.getElementsByTagName("parsererror").length)&&v.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&g.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(C,"ms-").replace(k,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,n,r){var i,s=0,o=e.length,u=o===t||v.isFunction(e);if(r){if(u){for(i in e)if(n.apply(e[i],r)===!1)break}else for(;s0&&e[0]&&e[a-1]||a===0||v.isArray(e));if(f)for(;u-1)a.splice(n,1),i&&(n<=o&&o--,n<=u&&u--)}),this},has:function(e){return v.inArray(e,a)>-1},empty:function(){return a=[],this},disable:function(){return a=f=n=t,this},disabled:function(){return!a},lock:function(){return f=t,n||c.disable(),this},locked:function(){return!f},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],a&&(!r||f)&&(i?f.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},v.extend({Deferred:function(e){var t=[["resolve","done",v.Callbacks("once memory"),"resolved"],["reject","fail",v.Callbacks("once memory"),"rejected"],["notify","progress",v.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return v.Deferred(function(n){v.each(t,function(t,r){var s=r[0],o=e[t];i[r[1]](v.isFunction(o)?function(){var e=o.apply(this,arguments);e&&v.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===i?n:this,[e])}:n[s])}),e=null}).promise()},promise:function(e){return e!=null?v.extend(e,r):r}},i={};return r.pipe=r.then,v.each(t,function(e,s){var o=s[2],u=s[3];r[s[1]]=o.add,u&&o.add(function(){n=u},t[e^1][2].disable,t[2][2].lock),i[s[0]]=o.fire,i[s[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=l.call(arguments),r=n.length,i=r!==1||e&&v.isFunction(e.promise)?r:0,s=i===1?e:v.Deferred(),o=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?l.call(arguments):r,n===u?s.notifyWith(t,n):--i||s.resolveWith(t,n)}},u,a,f;if(r>1){u=new Array(r),a=new Array(r),f=new Array(r);for(;t
a",n=p.getElementsByTagName("*"),r=p.getElementsByTagName("a")[0];if(!n||!r||!n.length)return{};s=i.createElement("select"),o=s.appendChild(i.createElement("option")),u=p.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:r.getAttribute("href")==="/a",opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:u.value==="on",optSelected:o.selected,getSetAttribute:p.className!=="t",enctype:!!i.createElement("form").enctype,html5Clone:i.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",boxModel:i.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},u.checked=!0,t.noCloneChecked=u.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!o.disabled;try{delete p.test}catch(d){t.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",h=function(){t.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick"),p.detachEvent("onclick",h)),u=i.createElement("input"),u.value="t",u.setAttribute("type","radio"),t.radioValue=u.value==="t",u.setAttribute("checked","checked"),u.setAttribute("name","t"),p.appendChild(u),a=i.createDocumentFragment(),a.appendChild(p.lastChild),t.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=u.checked,a.removeChild(u),a.appendChild(p);if(p.attachEvent)for(l in{submit:!0,change:!0,focusin:!0})f="on"+l,c=f in p,c||(p.setAttribute(f,"return;"),c=typeof p[f]=="function"),t[l+"Bubbles"]=c;return v(function(){var n,r,s,o,u="padding:0;margin:0;border:0;display:block;overflow:hidden;",a=i.getElementsByTagName("body")[0];if(!a)return;n=i.createElement("div"),n.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",a.insertBefore(n,a.firstChild),r=i.createElement("div"),n.appendChild(r),r.innerHTML="
t
",s=r.getElementsByTagName("td"),s[0].style.cssText="padding:0;margin:0;border:0;display:none",c=s[0].offsetHeight===0,s[0].style.display="",s[1].style.display="none",t.reliableHiddenOffsets=c&&s[0].offsetHeight===0,r.innerHTML="",r.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=r.offsetWidth===4,t.doesNotIncludeMarginInBodyOffset=a.offsetTop!==1,e.getComputedStyle&&(t.pixelPosition=(e.getComputedStyle(r,null)||{}).top!=="1%",t.boxSizingReliable=(e.getComputedStyle(r,null)||{width:"4px"}).width==="4px",o=i.createElement("div"),o.style.cssText=r.style.cssText=u,o.style.marginRight=o.style.width="0",r.style.width="1px",r.appendChild(o),t.reliableMarginRight=!parseFloat((e.getComputedStyle(o,null)||{}).marginRight)),typeof r.style.zoom!="undefined"&&(r.innerHTML="",r.style.cssText=u+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=r.offsetWidth===3,r.style.display="block",r.style.overflow="visible",r.innerHTML="
",r.firstChild.style.width="5px",t.shrinkWrapBlocks=r.offsetWidth!==3,n.style.zoom=1),a.removeChild(n),n=r=s=o=null}),a.removeChild(p),n=r=s=o=u=a=p=null,t}();var D=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;v.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(v.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?v.cache[e[v.expando]]:e[v.expando],!!e&&!B(e)},data:function(e,n,r,i){if(!v.acceptData(e))return;var s,o,u=v.expando,a=typeof n=="string",f=e.nodeType,l=f?v.cache:e,c=f?e[u]:e[u]&&u;if((!c||!l[c]||!i&&!l[c].data)&&a&&r===t)return;c||(f?e[u]=c=v.deletedIds.pop()||v.guid++:c=u),l[c]||(l[c]={},f||(l[c].toJSON=v.noop));if(typeof n=="object"||typeof n=="function")i?l[c]=v.extend(l[c],n):l[c].data=v.extend(l[c].data,n);return s=l[c],i||(s.data||(s.data={}),s=s.data),r!==t&&(s[v.camelCase(n)]=r),a?(o=s[n],o==null&&(o=s[v.camelCase(n)])):o=s,o},removeData:function(e,t,n){if(!v.acceptData(e))return;var r,i,s,o=e.nodeType,u=o?v.cache:e,a=o?e[v.expando]:v.expando;if(!u[a])return;if(t){r=n?u[a]:u[a].data;if(r){v.isArray(t)||(t in r?t=[t]:(t=v.camelCase(t),t in r?t=[t]:t=t.split(" ")));for(i=0,s=t.length;i1,null,!1))},removeData:function(e){return this.each(function(){v.removeData(this,e)})}}),v.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=v._data(e,t),n&&(!r||v.isArray(n)?r=v._data(e,t,v.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=v.queue(e,t),r=n.length,i=n.shift(),s=v._queueHooks(e,t),o=function(){v.dequeue(e,t)};i==="inprogress"&&(i=n.shift(),r--),i&&(t==="fx"&&n.unshift("inprogress"),delete s.stop,i.call(e,o,s)),!r&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return v._data(e,n)||v._data(e,n,{empty:v.Callbacks("once memory").add(function(){v.removeData(e,t+"queue",!0),v.removeData(e,n,!0)})})}}),v.fn.extend({queue:function(e,n){var r=2;return typeof e!="string"&&(n=e,e="fx",r--),arguments.length1)},removeAttr:function(e){return this.each(function(){v.removeAttr(this,e)})},prop:function(e,t){return v.access(this,v.prop,e,t,arguments.length>1)},removeProp:function(e){return e=v.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,s,o,u;if(v.isFunction(e))return this.each(function(t){v(this).addClass(e.call(this,t,this.className))});if(e&&typeof e=="string"){t=e.split(y);for(n=0,r=this.length;n=0)r=r.replace(" "+n[s]+" "," ");i.className=e?v.trim(r):""}}}return this},toggleClass:function(e,t){var n=typeof e,r=typeof t=="boolean";return v.isFunction(e)?this.each(function(n){v(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if(n==="string"){var i,s=0,o=v(this),u=t,a=e.split(y);while(i=a[s++])u=r?u:!o.hasClass(i),o[u?"addClass":"removeClass"](i)}else if(n==="undefined"||n==="boolean")this.className&&v._data(this,"__className__",this.className),this.className=this.className||e===!1?"":v._data(this,"__className__")||""})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;n=0)return!0;return!1},val:function(e){var n,r,i,s=this[0];if(!arguments.length){if(s)return n=v.valHooks[s.type]||v.valHooks[s.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(s,"value"))!==t?r:(r=s.value,typeof r=="string"?r.replace(R,""):r==null?"":r);return}return i=v.isFunction(e),this.each(function(r){var s,o=v(this);if(this.nodeType!==1)return;i?s=e.call(this,r,o.val()):s=e,s==null?s="":typeof s=="number"?s+="":v.isArray(s)&&(s=v.map(s,function(e){return e==null?"":e+""})),n=v.valHooks[this.type]||v.valHooks[this.nodeName.toLowerCase()];if(!n||!("set"in n)||n.set(this,s,"value")===t)this.value=s})}}),v.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,s=e.type==="select-one"||i<0,o=s?null:[],u=s?i+1:r.length,a=i<0?u:s?i:0;for(;a=0}),n.length||(e.selectedIndex=-1),n}}},attrFn:{},attr:function(e,n,r,i){var s,o,u,a=e.nodeType;if(!e||a===3||a===8||a===2)return;if(i&&v.isFunction(v.fn[n]))return v(e)[n](r);if(typeof e.getAttribute=="undefined")return v.prop(e,n,r);u=a!==1||!v.isXMLDoc(e),u&&(n=n.toLowerCase(),o=v.attrHooks[n]||(X.test(n)?F:j));if(r!==t){if(r===null){v.removeAttr(e,n);return}return o&&"set"in o&&u&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r)}return o&&"get"in o&&u&&(s=o.get(e,n))!==null?s:(s=e.getAttribute(n),s===null?t:s)},removeAttr:function(e,t){var n,r,i,s,o=0;if(t&&e.nodeType===1){r=t.split(y);for(;o=0}})});var $=/^(?:textarea|input|select)$/i,J=/^([^\.]*|)(?:\.(.+)|)$/,K=/(?:^|\s)hover(\.\S+|)\b/,Q=/^key/,G=/^(?:mouse|contextmenu)|click/,Y=/^(?:focusinfocus|focusoutblur)$/,Z=function(e){return v.event.special.hover?e:e.replace(K,"mouseenter$1 mouseleave$1")};v.event={add:function(e,n,r,i,s){var o,u,a,f,l,c,h,p,d,m,g;if(e.nodeType===3||e.nodeType===8||!n||!r||!(o=v._data(e)))return;r.handler&&(d=r,r=d.handler,s=d.selector),r.guid||(r.guid=v.guid++),a=o.events,a||(o.events=a={}),u=o.handle,u||(o.handle=u=function(e){return typeof v=="undefined"||!!e&&v.event.triggered===e.type?t:v.event.dispatch.apply(u.elem,arguments)},u.elem=e),n=v.trim(Z(n)).split(" ");for(f=0;f=0&&(y=y.slice(0,-1),a=!0),y.indexOf(".")>=0&&(b=y.split("."),y=b.shift(),b.sort());if((!s||v.event.customEvent[y])&&!v.event.global[y])return;n=typeof n=="object"?n[v.expando]?n:new v.Event(y,n):new v.Event(y),n.type=y,n.isTrigger=!0,n.exclusive=a,n.namespace=b.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,h=y.indexOf(":")<0?"on"+y:"";if(!s){u=v.cache;for(f in u)u[f].events&&u[f].events[y]&&v.event.trigger(n,r,u[f].handle.elem,!0);return}n.result=t,n.target||(n.target=s),r=r!=null?v.makeArray(r):[],r.unshift(n),p=v.event.special[y]||{};if(p.trigger&&p.trigger.apply(s,r)===!1)return;m=[[s,p.bindType||y]];if(!o&&!p.noBubble&&!v.isWindow(s)){g=p.delegateType||y,l=Y.test(g+y)?s:s.parentNode;for(c=s;l;l=l.parentNode)m.push([l,g]),c=l;c===(s.ownerDocument||i)&&m.push([c.defaultView||c.parentWindow||e,g])}for(f=0;f=0:v.find(h,this,null,[s]).length),u[h]&&f.push(c);f.length&&w.push({elem:s,matches:f})}d.length>m&&w.push({elem:this,matches:d.slice(m)});for(r=0;r0?this.on(t,null,e,n):this.trigger(t)},Q.test(t)&&(v.event.fixHooks[t]=v.event.keyHooks),G.test(t)&&(v.event.fixHooks[t]=v.event.mouseHooks)}),function(e,t){function nt(e,t,n,r){n=n||[],t=t||g;var i,s,a,f,l=t.nodeType;if(!e||typeof e!="string")return n;if(l!==1&&l!==9)return[];a=o(t);if(!a&&!r)if(i=R.exec(e))if(f=i[1]){if(l===9){s=t.getElementById(f);if(!s||!s.parentNode)return n;if(s.id===f)return n.push(s),n}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(f))&&u(t,s)&&s.id===f)return n.push(s),n}else{if(i[2])return S.apply(n,x.call(t.getElementsByTagName(e),0)),n;if((f=i[3])&&Z&&t.getElementsByClassName)return S.apply(n,x.call(t.getElementsByClassName(f),0)),n}return vt(e.replace(j,"$1"),t,n,r,a)}function rt(e){return function(t){var n=t.nodeName.toLowerCase();return n==="input"&&t.type===e}}function it(e){return function(t){var n=t.nodeName.toLowerCase();return(n==="input"||n==="button")&&t.type===e}}function st(e){return N(function(t){return t=+t,N(function(n,r){var i,s=e([],n.length,t),o=s.length;while(o--)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))})})}function ot(e,t,n){if(e===t)return n;var r=e.nextSibling;while(r){if(r===t)return-1;r=r.nextSibling}return 1}function ut(e,t){var n,r,s,o,u,a,f,l=L[d][e+" "];if(l)return t?0:l.slice(0);u=e,a=[],f=i.preFilter;while(u){if(!n||(r=F.exec(u)))r&&(u=u.slice(r[0].length)||u),a.push(s=[]);n=!1;if(r=I.exec(u))s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=r[0].replace(j," ");for(o in i.filter)(r=J[o].exec(u))&&(!f[o]||(r=f[o](r)))&&(s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=o,n.matches=r);if(!n)break}return t?u.length:u?nt.error(e):L(e,a).slice(0)}function at(e,t,r){var i=t.dir,s=r&&t.dir==="parentNode",o=w++;return t.first?function(t,n,r){while(t=t[i])if(s||t.nodeType===1)return e(t,n,r)}:function(t,r,u){if(!u){var a,f=b+" "+o+" ",l=f+n;while(t=t[i])if(s||t.nodeType===1){if((a=t[d])===l)return t.sizset;if(typeof a=="string"&&a.indexOf(f)===0){if(t.sizset)return t}else{t[d]=l;if(e(t,r,u))return t.sizset=!0,t;t.sizset=!1}}}else while(t=t[i])if(s||t.nodeType===1)if(e(t,r,u))return t}}function ft(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function lt(e,t,n,r,i){var s,o=[],u=0,a=e.length,f=t!=null;for(;u-1&&(s[f]=!(o[f]=c))}}else g=lt(g===o?g.splice(d,g.length):g),i?i(null,o,g,a):S.apply(o,g)})}function ht(e){var t,n,r,s=e.length,o=i.relative[e[0].type],u=o||i.relative[" "],a=o?1:0,f=at(function(e){return e===t},u,!0),l=at(function(e){return T.call(t,e)>-1},u,!0),h=[function(e,n,r){return!o&&(r||n!==c)||((t=n).nodeType?f(e,n,r):l(e,n,r))}];for(;a1&&ft(h),a>1&&e.slice(0,a-1).join("").replace(j,"$1"),n,a0,s=e.length>0,o=function(u,a,f,l,h){var p,d,v,m=[],y=0,w="0",x=u&&[],T=h!=null,N=c,C=u||s&&i.find.TAG("*",h&&a.parentNode||a),k=b+=N==null?1:Math.E;T&&(c=a!==g&&a,n=o.el);for(;(p=C[w])!=null;w++){if(s&&p){for(d=0;v=e[d];d++)if(v(p,a,f)){l.push(p);break}T&&(b=k,n=++o.el)}r&&((p=!v&&p)&&y--,u&&x.push(p))}y+=w;if(r&&w!==y){for(d=0;v=t[d];d++)v(x,m,a,f);if(u){if(y>0)while(w--)!x[w]&&!m[w]&&(m[w]=E.call(l));m=lt(m)}S.apply(l,m),T&&!u&&m.length>0&&y+t.length>1&&nt.uniqueSort(l)}return T&&(b=k,c=N),x};return o.el=0,r?N(o):o}function dt(e,t,n){var r=0,i=t.length;for(;r2&&(f=u[0]).type==="ID"&&t.nodeType===9&&!s&&i.relative[u[1].type]){t=i.find.ID(f.matches[0].replace($,""),t,s)[0];if(!t)return n;e=e.slice(u.shift().length)}for(o=J.POS.test(e)?-1:u.length-1;o>=0;o--){f=u[o];if(i.relative[l=f.type])break;if(c=i.find[l])if(r=c(f.matches[0].replace($,""),z.test(u[0].type)&&t.parentNode||t,s)){u.splice(o,1),e=r.length&&u.join("");if(!e)return S.apply(n,x.call(r,0)),n;break}}}return a(e,h)(r,t,s,n,z.test(e)),n}function mt(){}var n,r,i,s,o,u,a,f,l,c,h=!0,p="undefined",d=("sizcache"+Math.random()).replace(".",""),m=String,g=e.document,y=g.documentElement,b=0,w=0,E=[].pop,S=[].push,x=[].slice,T=[].indexOf||function(e){var t=0,n=this.length;for(;ti.cacheLength&&delete e[t.shift()],e[n+" "]=r},e)},k=C(),L=C(),A=C(),O="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",_=M.replace("w","w#"),D="([*^$|!~]?=)",P="\\["+O+"*("+M+")"+O+"*(?:"+D+O+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+_+")|)|)"+O+"*\\]",H=":("+M+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+P+")|[^:]|\\\\.)*|.*))\\)|)",B=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+O+"*((?:-\\d)?\\d*)"+O+"*\\)|)(?=[^-]|$)",j=new RegExp("^"+O+"+|((?:^|[^\\\\])(?:\\\\.)*)"+O+"+$","g"),F=new RegExp("^"+O+"*,"+O+"*"),I=new RegExp("^"+O+"*([\\x20\\t\\r\\n\\f>+~])"+O+"*"),q=new RegExp(H),R=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,U=/^:not/,z=/[\x20\t\r\n\f]*[+~]/,W=/:not\($/,X=/h\d/i,V=/input|select|textarea|button/i,$=/\\(?!\\)/g,J={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),NAME:new RegExp("^\\[name=['\"]?("+M+")['\"]?\\]"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+H),POS:new RegExp(B,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+O+"*(even|odd|(([+-]|)(\\d*)n|)"+O+"*(?:([+-]|)"+O+"*(\\d+)|))"+O+"*\\)|)","i"),needsContext:new RegExp("^"+O+"*[>+~]|"+B,"i")},K=function(e){var t=g.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}},Q=K(function(e){return e.appendChild(g.createComment("")),!e.getElementsByTagName("*").length}),G=K(function(e){return e.innerHTML="",e.firstChild&&typeof e.firstChild.getAttribute!==p&&e.firstChild.getAttribute("href")==="#"}),Y=K(function(e){e.innerHTML="";var t=typeof e.lastChild.getAttribute("multiple");return t!=="boolean"&&t!=="string"}),Z=K(function(e){return e.innerHTML="",!e.getElementsByClassName||!e.getElementsByClassName("e").length?!1:(e.lastChild.className="e",e.getElementsByClassName("e").length===2)}),et=K(function(e){e.id=d+0,e.innerHTML="
",y.insertBefore(e,y.firstChild);var t=g.getElementsByName&&g.getElementsByName(d).length===2+g.getElementsByName(d+0).length;return r=!g.getElementById(d),y.removeChild(e),t});try{x.call(y.childNodes,0)[0].nodeType}catch(tt){x=function(e){var t,n=[];for(;t=this[e];e++)n.push(t);return n}}nt.matches=function(e,t){return nt(e,null,null,t)},nt.matchesSelector=function(e,t){return nt(t,null,null,[e]).length>0},s=nt.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(i===1||i===9||i===11){if(typeof e.textContent=="string")return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=s(e)}else if(i===3||i===4)return e.nodeValue}else for(;t=e[r];r++)n+=s(t);return n},o=nt.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?t.nodeName!=="HTML":!1},u=nt.contains=y.contains?function(e,t){var n=e.nodeType===9?e.documentElement:e,r=t&&t.parentNode;return e===r||!!(r&&r.nodeType===1&&n.contains&&n.contains(r))}:y.compareDocumentPosition?function(e,t){return t&&!!(e.compareDocumentPosition(t)&16)}:function(e,t){while(t=t.parentNode)if(t===e)return!0;return!1},nt.attr=function(e,t){var n,r=o(e);return r||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):r||Y?e.getAttribute(t):(n=e.getAttributeNode(t),n?typeof e[t]=="boolean"?e[t]?t:null:n.specified?n.value:null:null)},i=nt.selectors={cacheLength:50,createPseudo:N,match:J,attrHandle:G?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},find:{ID:r?function(e,t,n){if(typeof t.getElementById!==p&&!n){var r=t.getElementById(e);return r&&r.parentNode?[r]:[]}}:function(e,n,r){if(typeof n.getElementById!==p&&!r){var i=n.getElementById(e);return i?i.id===e||typeof i.getAttributeNode!==p&&i.getAttributeNode("id").value===e?[i]:t:[]}},TAG:Q?function(e,t){if(typeof t.getElementsByTagName!==p)return t.getElementsByTagName(e)}:function(e,t){var n=t.getElementsByTagName(e);if(e==="*"){var r,i=[],s=0;for(;r=n[s];s++)r.nodeType===1&&i.push(r);return i}return n},NAME:et&&function(e,t){if(typeof t.getElementsByName!==p)return t.getElementsByName(name)},CLASS:Z&&function(e,t,n){if(typeof t.getElementsByClassName!==p&&!n)return t.getElementsByClassName(e)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace($,""),e[3]=(e[4]||e[5]||"").replace($,""),e[2]==="~="&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),e[1]==="nth"?(e[2]||nt.error(e[0]),e[3]=+(e[3]?e[4]+(e[5]||1):2*(e[2]==="even"||e[2]==="odd")),e[4]=+(e[6]+e[7]||e[2]==="odd")):e[2]&&nt.error(e[0]),e},PSEUDO:function(e){var t,n;if(J.CHILD.test(e[0]))return null;if(e[3])e[2]=e[3];else if(t=e[4])q.test(t)&&(n=ut(t,!0))&&(n=t.indexOf(")",t.length-n)-t.length)&&(t=t.slice(0,n),e[0]=e[0].slice(0,n)),e[2]=t;return e.slice(0,3)}},filter:{ID:r?function(e){return e=e.replace($,""),function(t){return t.getAttribute("id")===e}}:function(e){return e=e.replace($,""),function(t){var n=typeof t.getAttributeNode!==p&&t.getAttributeNode("id");return n&&n.value===e}},TAG:function(e){return e==="*"?function(){return!0}:(e=e.replace($,"").toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[d][e+" "];return t||(t=new RegExp("(^|"+O+")"+e+"("+O+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==p&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r,i){var s=nt.attr(r,e);return s==null?t==="!=":t?(s+="",t==="="?s===n:t==="!="?s!==n:t==="^="?n&&s.indexOf(n)===0:t==="*="?n&&s.indexOf(n)>-1:t==="$="?n&&s.substr(s.length-n.length)===n:t==="~="?(" "+s+" ").indexOf(n)>-1:t==="|="?s===n||s.substr(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r){return e==="nth"?function(e){var t,i,s=e.parentNode;if(n===1&&r===0)return!0;if(s){i=0;for(t=s.firstChild;t;t=t.nextSibling)if(t.nodeType===1){i++;if(e===t)break}}return i-=r,i===n||i%n===0&&i/n>=0}:function(t){var n=t;switch(e){case"only":case"first":while(n=n.previousSibling)if(n.nodeType===1)return!1;if(e==="first")return!0;n=t;case"last":while(n=n.nextSibling)if(n.nodeType===1)return!1;return!0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||nt.error("unsupported pseudo: "+e);return r[d]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?N(function(e,n){var i,s=r(e,t),o=s.length;while(o--)i=T.call(e,s[o]),e[i]=!(n[i]=s[o])}):function(e){return r(e,0,n)}):r}},pseudos:{not:N(function(e){var t=[],n=[],r=a(e.replace(j,"$1"));return r[d]?N(function(e,t,n,i){var s,o=r(e,null,i,[]),u=e.length;while(u--)if(s=o[u])e[u]=!(t[u]=s)}):function(e,i,s){return t[0]=e,r(t,null,s,n),!n.pop()}}),has:N(function(e){return function(t){return nt(e,t).length>0}}),contains:N(function(e){return function(t){return(t.textContent||t.innerText||s(t)).indexOf(e)>-1}}),enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&!!e.checked||t==="option"&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!i.pseudos.empty(e)},empty:function(e){var t;e=e.firstChild;while(e){if(e.nodeName>"@"||(t=e.nodeType)===3||t===4)return!1;e=e.nextSibling}return!0},header:function(e){return X.test(e.nodeName)},text:function(e){var t,n;return e.nodeName.toLowerCase()==="input"&&(t=e.type)==="text"&&((n=e.getAttribute("type"))==null||n.toLowerCase()===t)},radio:rt("radio"),checkbox:rt("checkbox"),file:rt("file"),password:rt("password"),image:rt("image"),submit:it("submit"),reset:it("reset"),button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&e.type==="button"||t==="button"},input:function(e){return V.test(e.nodeName)},focus:function(e){var t=e.ownerDocument;return e===t.activeElement&&(!t.hasFocus||t.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},active:function(e){return e===e.ownerDocument.activeElement},first:st(function(){return[0]}),last:st(function(e,t){return[t-1]}),eq:st(function(e,t,n){return[n<0?n+t:n]}),even:st(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:st(function(e,t,n){for(var r=n<0?n+t:n;++r",e.querySelectorAll("[selected]").length||i.push("\\["+O+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||i.push(":checked")}),K(function(e){e.innerHTML="

",e.querySelectorAll("[test^='']").length&&i.push("[*^$]="+O+"*(?:\"\"|'')"),e.innerHTML="",e.querySelectorAll(":enabled").length||i.push(":enabled",":disabled")}),i=new RegExp(i.join("|")),vt=function(e,r,s,o,u){if(!o&&!u&&!i.test(e)){var a,f,l=!0,c=d,h=r,p=r.nodeType===9&&e;if(r.nodeType===1&&r.nodeName.toLowerCase()!=="object"){a=ut(e),(l=r.getAttribute("id"))?c=l.replace(n,"\\$&"):r.setAttribute("id",c),c="[id='"+c+"'] ",f=a.length;while(f--)a[f]=c+a[f].join("");h=z.test(e)&&r.parentNode||r,p=a.join(",")}if(p)try{return S.apply(s,x.call(h.querySelectorAll(p),0)),s}catch(v){}finally{l||r.removeAttribute("id")}}return t(e,r,s,o,u)},u&&(K(function(t){e=u.call(t,"div");try{u.call(t,"[test!='']:sizzle"),s.push("!=",H)}catch(n){}}),s=new RegExp(s.join("|")),nt.matchesSelector=function(t,n){n=n.replace(r,"='$1']");if(!o(t)&&!s.test(n)&&!i.test(n))try{var a=u.call(t,n);if(a||e||t.document&&t.document.nodeType!==11)return a}catch(f){}return nt(n,null,null,[t]).length>0})}(),i.pseudos.nth=i.pseudos.eq,i.filters=mt.prototype=i.pseudos,i.setFilters=new mt,nt.attr=v.attr,v.find=nt,v.expr=nt.selectors,v.expr[":"]=v.expr.pseudos,v.unique=nt.uniqueSort,v.text=nt.getText,v.isXMLDoc=nt.isXML,v.contains=nt.contains}(e);var nt=/Until$/,rt=/^(?:parents|prev(?:Until|All))/,it=/^.[^:#\[\.,]*$/,st=v.expr.match.needsContext,ot={children:!0,contents:!0,next:!0,prev:!0};v.fn.extend({find:function(e){var t,n,r,i,s,o,u=this;if(typeof e!="string")return v(e).filter(function(){for(t=0,n=u.length;t0)for(i=r;i=0:v.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,s=[],o=st.test(e)||typeof e!="string"?v(e,t||this.context):0;for(;r-1:v.find.matchesSelector(n,e)){s.push(n);break}n=n.parentNode}}return s=s.length>1?v.unique(s):s,this.pushStack(s,"closest",e)},index:function(e){return e?typeof e=="string"?v.inArray(this[0],v(e)):v.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n=typeof e=="string"?v(e,t):v.makeArray(e&&e.nodeType?[e]:e),r=v.merge(this.get(),n);return this.pushStack(ut(n[0])||ut(r[0])?r:v.unique(r))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}}),v.fn.andSelf=v.fn.addBack,v.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return v.dir(e,"parentNode")},parentsUntil:function(e,t,n){return v.dir(e,"parentNode",n)},next:function(e){return at(e,"nextSibling")},prev:function(e){return at(e,"previousSibling")},nextAll:function(e){return v.dir(e,"nextSibling")},prevAll:function(e){return v.dir(e,"previousSibling")},nextUntil:function(e,t,n){return v.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return v.dir(e,"previousSibling",n)},siblings:function(e){return v.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return v.sibling(e.firstChild)},contents:function(e){return v.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:v.merge([],e.childNodes)}},function(e,t){v.fn[e]=function(n,r){var i=v.map(this,t,n);return nt.test(e)||(r=n),r&&typeof r=="string"&&(i=v.filter(r,i)),i=this.length>1&&!ot[e]?v.unique(i):i,this.length>1&&rt.test(e)&&(i=i.reverse()),this.pushStack(i,e,l.call(arguments).join(","))}}),v.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),t.length===1?v.find.matchesSelector(t[0],e)?[t[0]]:[]:v.find.matches(e,t)},dir:function(e,n,r){var i=[],s=e[n];while(s&&s.nodeType!==9&&(r===t||s.nodeType!==1||!v(s).is(r)))s.nodeType===1&&i.push(s),s=s[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}});var ct="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ht=/ jQuery\d+="(?:null|\d+)"/g,pt=/^\s+/,dt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,vt=/<([\w:]+)/,mt=/]","i"),Et=/^(?:checkbox|radio)$/,St=/checked\s*(?:[^=]|=\s*.checked.)/i,xt=/\/(java|ecma)script/i,Tt=/^\s*\s*$/g,Nt={option:[1,""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},Ct=lt(i),kt=Ct.appendChild(i.createElement("div"));Nt.optgroup=Nt.option,Nt.tbody=Nt.tfoot=Nt.colgroup=Nt.caption=Nt.thead,Nt.th=Nt.td,v.support.htmlSerialize||(Nt._default=[1,"X
","
"]),v.fn.extend({text:function(e){return v.access(this,function(e){return e===t?v.text(this):this.empty().append((this[0]&&this[0].ownerDocument||i).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(v.isFunction(e))return this.each(function(t){v(this).wrapAll(e.call(this,t))});if(this[0]){var t=v(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&e.firstChild.nodeType===1)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return v.isFunction(e)?this.each(function(t){v(this).wrapInner(e.call(this,t))}):this.each(function(){var t=v(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=v.isFunction(e);return this.each(function(n){v(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){v.nodeName(this,"body")||v(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(e,this.firstChild)})},before:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(e,this),"before",this.selector)}},after:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(this,e),"after",this.selector)}},remove:function(e,t){var n,r=0;for(;(n=this[r])!=null;r++)if(!e||v.filter(e,[n]).length)!t&&n.nodeType===1&&(v.cleanData(n.getElementsByTagName("*")),v.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n);return this},empty:function(){var e,t=0;for(;(e=this[t])!=null;t++){e.nodeType===1&&v.cleanData(e.getElementsByTagName("*"));while(e.firstChild)e.removeChild(e.firstChild)}return this},clone:function(e,t){return e=e==null?!1:e,t=t==null?e:t,this.map(function(){return v.clone(this,e,t)})},html:function(e){return v.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return n.nodeType===1?n.innerHTML.replace(ht,""):t;if(typeof e=="string"&&!yt.test(e)&&(v.support.htmlSerialize||!wt.test(e))&&(v.support.leadingWhitespace||!pt.test(e))&&!Nt[(vt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(dt,"<$1>");try{for(;r1&&typeof f=="string"&&St.test(f))return this.each(function(){v(this).domManip(e,n,r)});if(v.isFunction(f))return this.each(function(i){var s=v(this);e[0]=f.call(this,i,n?s.html():t),s.domManip(e,n,r)});if(this[0]){i=v.buildFragment(e,this,l),o=i.fragment,s=o.firstChild,o.childNodes.length===1&&(o=s);if(s){n=n&&v.nodeName(s,"tr");for(u=i.cacheable||c-1;a0?this.clone(!0):this).get(),v(o[i])[t](r),s=s.concat(r);return this.pushStack(s,e,o.selector)}}),v.extend({clone:function(e,t,n){var r,i,s,o;v.support.html5Clone||v.isXMLDoc(e)||!wt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(kt.innerHTML=e.outerHTML,kt.removeChild(o=kt.firstChild));if((!v.support.noCloneEvent||!v.support.noCloneChecked)&&(e.nodeType===1||e.nodeType===11)&&!v.isXMLDoc(e)){Ot(e,o),r=Mt(e),i=Mt(o);for(s=0;r[s];++s)i[s]&&Ot(r[s],i[s])}if(t){At(e,o);if(n){r=Mt(e),i=Mt(o);for(s=0;r[s];++s)At(r[s],i[s])}}return r=i=null,o},clean:function(e,t,n,r){var s,o,u,a,f,l,c,h,p,d,m,g,y=t===i&&Ct,b=[];if(!t||typeof t.createDocumentFragment=="undefined")t=i;for(s=0;(u=e[s])!=null;s++){typeof u=="number"&&(u+="");if(!u)continue;if(typeof u=="string")if(!gt.test(u))u=t.createTextNode(u);else{y=y||lt(t),c=t.createElement("div"),y.appendChild(c),u=u.replace(dt,"<$1>"),a=(vt.exec(u)||["",""])[1].toLowerCase(),f=Nt[a]||Nt._default,l=f[0],c.innerHTML=f[1]+u+f[2];while(l--)c=c.lastChild;if(!v.support.tbody){h=mt.test(u),p=a==="table"&&!h?c.firstChild&&c.firstChild.childNodes:f[1]===""&&!h?c.childNodes:[];for(o=p.length-1;o>=0;--o)v.nodeName(p[o],"tbody")&&!p[o].childNodes.length&&p[o].parentNode.removeChild(p[o])}!v.support.leadingWhitespace&&pt.test(u)&&c.insertBefore(t.createTextNode(pt.exec(u)[0]),c.firstChild),u=c.childNodes,c.parentNode.removeChild(c)}u.nodeType?b.push(u):v.merge(b,u)}c&&(u=c=y=null);if(!v.support.appendChecked)for(s=0;(u=b[s])!=null;s++)v.nodeName(u,"input")?_t(u):typeof u.getElementsByTagName!="undefined"&&v.grep(u.getElementsByTagName("input"),_t);if(n){m=function(e){if(!e.type||xt.test(e.type))return r?r.push(e.parentNode?e.parentNode.removeChild(e):e):n.appendChild(e)};for(s=0;(u=b[s])!=null;s++)if(!v.nodeName(u,"script")||!m(u))n.appendChild(u),typeof u.getElementsByTagName!="undefined"&&(g=v.grep(v.merge([],u.getElementsByTagName("script")),m),b.splice.apply(b,[s+1,0].concat(g)),s+=g.length)}return b},cleanData:function(e,t){var n,r,i,s,o=0,u=v.expando,a=v.cache,f=v.support.deleteExpando,l=v.event.special;for(;(i=e[o])!=null;o++)if(t||v.acceptData(i)){r=i[u],n=r&&a[r];if(n){if(n.events)for(s in n.events)l[s]?v.event.remove(i,s):v.removeEvent(i,s,n.handle);a[r]&&(delete a[r],f?delete i[u]:i.removeAttribute?i.removeAttribute(u):i[u]=null,v.deletedIds.push(r))}}}}),function(){var e,t;v.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e=v.uaMatch(o.userAgent),t={},e.browser&&(t[e.browser]=!0,t.version=e.version),t.chrome?t.webkit=!0:t.webkit&&(t.safari=!0),v.browser=t,v.sub=function(){function e(t,n){return new e.fn.init(t,n)}v.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(r,i){return i&&i instanceof v&&!(i instanceof e)&&(i=e(i)),v.fn.init.call(this,r,i,t)},e.fn.init.prototype=e.fn;var t=e(i);return e}}();var Dt,Pt,Ht,Bt=/alpha\([^)]*\)/i,jt=/opacity=([^)]*)/,Ft=/^(top|right|bottom|left)$/,It=/^(none|table(?!-c[ea]).+)/,qt=/^margin/,Rt=new RegExp("^("+m+")(.*)$","i"),Ut=new RegExp("^("+m+")(?!px)[a-z%]+$","i"),zt=new RegExp("^([-+])=("+m+")","i"),Wt={BODY:"block"},Xt={position:"absolute",visibility:"hidden",display:"block"},Vt={letterSpacing:0,fontWeight:400},$t=["Top","Right","Bottom","Left"],Jt=["Webkit","O","Moz","ms"],Kt=v.fn.toggle;v.fn.extend({css:function(e,n){return v.access(this,function(e,n,r){return r!==t?v.style(e,n,r):v.css(e,n)},e,n,arguments.length>1)},show:function(){return Yt(this,!0)},hide:function(){return Yt(this)},toggle:function(e,t){var n=typeof e=="boolean";return v.isFunction(e)&&v.isFunction(t)?Kt.apply(this,arguments):this.each(function(){(n?e:Gt(this))?v(this).show():v(this).hide()})}}),v.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Dt(e,"opacity");return n===""?"1":n}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":v.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(!e||e.nodeType===3||e.nodeType===8||!e.style)return;var s,o,u,a=v.camelCase(n),f=e.style;n=v.cssProps[a]||(v.cssProps[a]=Qt(f,a)),u=v.cssHooks[n]||v.cssHooks[a];if(r===t)return u&&"get"in u&&(s=u.get(e,!1,i))!==t?s:f[n];o=typeof r,o==="string"&&(s=zt.exec(r))&&(r=(s[1]+1)*s[2]+parseFloat(v.css(e,n)),o="number");if(r==null||o==="number"&&isNaN(r))return;o==="number"&&!v.cssNumber[a]&&(r+="px");if(!u||!("set"in u)||(r=u.set(e,r,i))!==t)try{f[n]=r}catch(l){}},css:function(e,n,r,i){var s,o,u,a=v.camelCase(n);return n=v.cssProps[a]||(v.cssProps[a]=Qt(e.style,a)),u=v.cssHooks[n]||v.cssHooks[a],u&&"get"in u&&(s=u.get(e,!0,i)),s===t&&(s=Dt(e,n)),s==="normal"&&n in Vt&&(s=Vt[n]),r||i!==t?(o=parseFloat(s),r||v.isNumeric(o)?o||0:s):s},swap:function(e,t,n){var r,i,s={};for(i in t)s[i]=e.style[i],e.style[i]=t[i];r=n.call(e);for(i in t)e.style[i]=s[i];return r}}),e.getComputedStyle?Dt=function(t,n){var r,i,s,o,u=e.getComputedStyle(t,null),a=t.style;return u&&(r=u.getPropertyValue(n)||u[n],r===""&&!v.contains(t.ownerDocument,t)&&(r=v.style(t,n)),Ut.test(r)&&qt.test(n)&&(i=a.width,s=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=u.width,a.width=i,a.minWidth=s,a.maxWidth=o)),r}:i.documentElement.currentStyle&&(Dt=function(e,t){var n,r,i=e.currentStyle&&e.currentStyle[t],s=e.style;return i==null&&s&&s[t]&&(i=s[t]),Ut.test(i)&&!Ft.test(t)&&(n=s.left,r=e.runtimeStyle&&e.runtimeStyle.left,r&&(e.runtimeStyle.left=e.currentStyle.left),s.left=t==="fontSize"?"1em":i,i=s.pixelLeft+"px",s.left=n,r&&(e.runtimeStyle.left=r)),i===""?"auto":i}),v.each(["height","width"],function(e,t){v.cssHooks[t]={get:function(e,n,r){if(n)return e.offsetWidth===0&&It.test(Dt(e,"display"))?v.swap(e,Xt,function(){return tn(e,t,r)}):tn(e,t,r)},set:function(e,n,r){return Zt(e,n,r?en(e,t,r,v.support.boxSizing&&v.css(e,"boxSizing")==="border-box"):0)}}}),v.support.opacity||(v.cssHooks.opacity={get:function(e,t){return jt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=v.isNumeric(t)?"alpha(opacity="+t*100+")":"",s=r&&r.filter||n.filter||"";n.zoom=1;if(t>=1&&v.trim(s.replace(Bt,""))===""&&n.removeAttribute){n.removeAttribute("filter");if(r&&!r.filter)return}n.filter=Bt.test(s)?s.replace(Bt,i):s+" "+i}}),v(function(){v.support.reliableMarginRight||(v.cssHooks.marginRight={get:function(e,t){return v.swap(e,{display:"inline-block"},function(){if(t)return Dt(e,"marginRight")})}}),!v.support.pixelPosition&&v.fn.position&&v.each(["top","left"],function(e,t){v.cssHooks[t]={get:function(e,n){if(n){var r=Dt(e,t);return Ut.test(r)?v(e).position()[t]+"px":r}}}})}),v.expr&&v.expr.filters&&(v.expr.filters.hidden=function(e){return e.offsetWidth===0&&e.offsetHeight===0||!v.support.reliableHiddenOffsets&&(e.style&&e.style.display||Dt(e,"display"))==="none"},v.expr.filters.visible=function(e){return!v.expr.filters.hidden(e)}),v.each({margin:"",padding:"",border:"Width"},function(e,t){v.cssHooks[e+t]={expand:function(n){var r,i=typeof n=="string"?n.split(" "):[n],s={};for(r=0;r<4;r++)s[e+$t[r]+t]=i[r]||i[r-2]||i[0];return s}},qt.test(e)||(v.cssHooks[e+t].set=Zt)});var rn=/%20/g,sn=/\[\]$/,on=/\r?\n/g,un=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,an=/^(?:select|textarea)/i;v.fn.extend({serialize:function(){return v.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?v.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||an.test(this.nodeName)||un.test(this.type))}).map(function(e,t){var n=v(this).val();return n==null?null:v.isArray(n)?v.map(n,function(e,n){return{name:t.name,value:e.replace(on,"\r\n")}}):{name:t.name,value:n.replace(on,"\r\n")}}).get()}}),v.param=function(e,n){var r,i=[],s=function(e,t){t=v.isFunction(t)?t():t==null?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};n===t&&(n=v.ajaxSettings&&v.ajaxSettings.traditional);if(v.isArray(e)||e.jquery&&!v.isPlainObject(e))v.each(e,function(){s(this.name,this.value)});else for(r in e)fn(r,e[r],n,s);return i.join("&").replace(rn,"+")};var ln,cn,hn=/#.*$/,pn=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,dn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,vn=/^(?:GET|HEAD)$/,mn=/^\/\//,gn=/\?/,yn=/)<[^<]*)*<\/script>/gi,bn=/([?&])_=[^&]*/,wn=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,En=v.fn.load,Sn={},xn={},Tn=["*/"]+["*"];try{cn=s.href}catch(Nn){cn=i.createElement("a"),cn.href="",cn=cn.href}ln=wn.exec(cn.toLowerCase())||[],v.fn.load=function(e,n,r){if(typeof e!="string"&&En)return En.apply(this,arguments);if(!this.length)return this;var i,s,o,u=this,a=e.indexOf(" ");return a>=0&&(i=e.slice(a,e.length),e=e.slice(0,a)),v.isFunction(n)?(r=n,n=t):n&&typeof n=="object"&&(s="POST"),v.ajax({url:e,type:s,dataType:"html",data:n,complete:function(e,t){r&&u.each(r,o||[e.responseText,t,e])}}).done(function(e){o=arguments,u.html(i?v("
").append(e.replace(yn,"")).find(i):e)}),this},v.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){v.fn[t]=function(e){return this.on(t,e)}}),v.each(["get","post"],function(e,n){v[n]=function(e,r,i,s){return v.isFunction(r)&&(s=s||i,i=r,r=t),v.ajax({type:n,url:e,data:r,success:i,dataType:s})}}),v.extend({getScript:function(e,n){return v.get(e,t,n,"script")},getJSON:function(e,t,n){return v.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?Ln(e,v.ajaxSettings):(t=e,e=v.ajaxSettings),Ln(e,t),e},ajaxSettings:{url:cn,isLocal:dn.test(ln[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":Tn},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":v.parseJSON,"text xml":v.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:Cn(Sn),ajaxTransport:Cn(xn),ajax:function(e,n){function T(e,n,s,a){var l,y,b,w,S,T=n;if(E===2)return;E=2,u&&clearTimeout(u),o=t,i=a||"",x.readyState=e>0?4:0,s&&(w=An(c,x,s));if(e>=200&&e<300||e===304)c.ifModified&&(S=x.getResponseHeader("Last-Modified"),S&&(v.lastModified[r]=S),S=x.getResponseHeader("Etag"),S&&(v.etag[r]=S)),e===304?(T="notmodified",l=!0):(l=On(c,w),T=l.state,y=l.data,b=l.error,l=!b);else{b=T;if(!T||e)T="error",e<0&&(e=0)}x.status=e,x.statusText=(n||T)+"",l?d.resolveWith(h,[y,T,x]):d.rejectWith(h,[x,T,b]),x.statusCode(g),g=t,f&&p.trigger("ajax"+(l?"Success":"Error"),[x,c,l?y:b]),m.fireWith(h,[x,T]),f&&(p.trigger("ajaxComplete",[x,c]),--v.active||v.event.trigger("ajaxStop"))}typeof e=="object"&&(n=e,e=t),n=n||{};var r,i,s,o,u,a,f,l,c=v.ajaxSetup({},n),h=c.context||c,p=h!==c&&(h.nodeType||h instanceof v)?v(h):v.event,d=v.Deferred(),m=v.Callbacks("once memory"),g=c.statusCode||{},b={},w={},E=0,S="canceled",x={readyState:0,setRequestHeader:function(e,t){if(!E){var n=e.toLowerCase();e=w[n]=w[n]||e,b[e]=t}return this},getAllResponseHeaders:function(){return E===2?i:null},getResponseHeader:function(e){var n;if(E===2){if(!s){s={};while(n=pn.exec(i))s[n[1].toLowerCase()]=n[2]}n=s[e.toLowerCase()]}return n===t?null:n},overrideMimeType:function(e){return E||(c.mimeType=e),this},abort:function(e){return e=e||S,o&&o.abort(e),T(0,e),this}};d.promise(x),x.success=x.done,x.error=x.fail,x.complete=m.add,x.statusCode=function(e){if(e){var t;if(E<2)for(t in e)g[t]=[g[t],e[t]];else t=e[x.status],x.always(t)}return this},c.url=((e||c.url)+"").replace(hn,"").replace(mn,ln[1]+"//"),c.dataTypes=v.trim(c.dataType||"*").toLowerCase().split(y),c.crossDomain==null&&(a=wn.exec(c.url.toLowerCase()),c.crossDomain=!(!a||a[1]===ln[1]&&a[2]===ln[2]&&(a[3]||(a[1]==="http:"?80:443))==(ln[3]||(ln[1]==="http:"?80:443)))),c.data&&c.processData&&typeof c.data!="string"&&(c.data=v.param(c.data,c.traditional)),kn(Sn,c,n,x);if(E===2)return x;f=c.global,c.type=c.type.toUpperCase(),c.hasContent=!vn.test(c.type),f&&v.active++===0&&v.event.trigger("ajaxStart");if(!c.hasContent){c.data&&(c.url+=(gn.test(c.url)?"&":"?")+c.data,delete c.data),r=c.url;if(c.cache===!1){var N=v.now(),C=c.url.replace(bn,"$1_="+N);c.url=C+(C===c.url?(gn.test(c.url)?"&":"?")+"_="+N:"")}}(c.data&&c.hasContent&&c.contentType!==!1||n.contentType)&&x.setRequestHeader("Content-Type",c.contentType),c.ifModified&&(r=r||c.url,v.lastModified[r]&&x.setRequestHeader("If-Modified-Since",v.lastModified[r]),v.etag[r]&&x.setRequestHeader("If-None-Match",v.etag[r])),x.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+(c.dataTypes[0]!=="*"?", "+Tn+"; q=0.01":""):c.accepts["*"]);for(l in c.headers)x.setRequestHeader(l,c.headers[l]);if(!c.beforeSend||c.beforeSend.call(h,x,c)!==!1&&E!==2){S="abort";for(l in{success:1,error:1,complete:1})x[l](c[l]);o=kn(xn,c,n,x);if(!o)T(-1,"No Transport");else{x.readyState=1,f&&p.trigger("ajaxSend",[x,c]),c.async&&c.timeout>0&&(u=setTimeout(function(){x.abort("timeout")},c.timeout));try{E=1,o.send(b,T)}catch(k){if(!(E<2))throw k;T(-1,k)}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var Mn=[],_n=/\?/,Dn=/(=)\?(?=&|$)|\?\?/,Pn=v.now();v.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Mn.pop()||v.expando+"_"+Pn++;return this[e]=!0,e}}),v.ajaxPrefilter("json jsonp",function(n,r,i){var s,o,u,a=n.data,f=n.url,l=n.jsonp!==!1,c=l&&Dn.test(f),h=l&&!c&&typeof a=="string"&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Dn.test(a);if(n.dataTypes[0]==="jsonp"||c||h)return s=n.jsonpCallback=v.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,o=e[s],c?n.url=f.replace(Dn,"$1"+s):h?n.data=a.replace(Dn,"$1"+s):l&&(n.url+=(_n.test(f)?"&":"?")+n.jsonp+"="+s),n.converters["script json"]=function(){return u||v.error(s+" was not called"),u[0]},n.dataTypes[0]="json",e[s]=function(){u=arguments},i.always(function(){e[s]=o,n[s]&&(n.jsonpCallback=r.jsonpCallback,Mn.push(s)),u&&v.isFunction(o)&&o(u[0]),u=o=t}),"script"}),v.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return v.globalEval(e),e}}}),v.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),v.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=i.head||i.getElementsByTagName("head")[0]||i.documentElement;return{send:function(s,o){n=i.createElement("script"),n.async="async",e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,i){if(i||!n.readyState||/loaded|complete/.test(n.readyState))n.onload=n.onreadystatechange=null,r&&n.parentNode&&r.removeChild(n),n=t,i||o(200,"success")},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var Hn,Bn=e.ActiveXObject?function(){for(var e in Hn)Hn[e](0,1)}:!1,jn=0;v.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&Fn()||In()}:Fn,function(e){v.extend(v.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})}(v.ajaxSettings.xhr()),v.support.ajax&&v.ajaxTransport(function(n){if(!n.crossDomain||v.support.cors){var r;return{send:function(i,s){var o,u,a=n.xhr();n.username?a.open(n.type,n.url,n.async,n.username,n.password):a.open(n.type,n.url,n.async);if(n.xhrFields)for(u in n.xhrFields)a[u]=n.xhrFields[u];n.mimeType&&a.overrideMimeType&&a.overrideMimeType(n.mimeType),!n.crossDomain&&!i["X-Requested-With"]&&(i["X-Requested-With"]="XMLHttpRequest");try{for(u in i)a.setRequestHeader(u,i[u])}catch(f){}a.send(n.hasContent&&n.data||null),r=function(e,i){var u,f,l,c,h;try{if(r&&(i||a.readyState===4)){r=t,o&&(a.onreadystatechange=v.noop,Bn&&delete Hn[o]);if(i)a.readyState!==4&&a.abort();else{u=a.status,l=a.getAllResponseHeaders(),c={},h=a.responseXML,h&&h.documentElement&&(c.xml=h);try{c.text=a.responseText}catch(p){}try{f=a.statusText}catch(p){f=""}!u&&n.isLocal&&!n.crossDomain?u=c.text?200:404:u===1223&&(u=204)}}}catch(d){i||s(-1,d)}c&&s(u,f,c,l)},n.async?a.readyState===4?setTimeout(r,0):(o=++jn,Bn&&(Hn||(Hn={},v(e).unload(Bn)),Hn[o]=r),a.onreadystatechange=r):r()},abort:function(){r&&r(0,1)}}}});var qn,Rn,Un=/^(?:toggle|show|hide)$/,zn=new RegExp("^(?:([-+])=|)("+m+")([a-z%]*)$","i"),Wn=/queueHooks$/,Xn=[Gn],Vn={"*":[function(e,t){var n,r,i=this.createTween(e,t),s=zn.exec(t),o=i.cur(),u=+o||0,a=1,f=20;if(s){n=+s[2],r=s[3]||(v.cssNumber[e]?"":"px");if(r!=="px"&&u){u=v.css(i.elem,e,!0)||n||1;do a=a||".5",u/=a,v.style(i.elem,e,u+r);while(a!==(a=i.cur()/o)&&a!==1&&--f)}i.unit=r,i.start=u,i.end=s[1]?u+(s[1]+1)*n:n}return i}]};v.Animation=v.extend(Kn,{tweener:function(e,t){v.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;r-1,f={},l={},c,h;a?(l=i.position(),c=l.top,h=l.left):(c=parseFloat(o)||0,h=parseFloat(u)||0),v.isFunction(t)&&(t=t.call(e,n,s)),t.top!=null&&(f.top=t.top-s.top+c),t.left!=null&&(f.left=t.left-s.left+h),"using"in t?t.using.call(e,f):i.css(f)}},v.fn.extend({position:function(){if(!this[0])return;var e=this[0],t=this.offsetParent(),n=this.offset(),r=er.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(v.css(e,"marginTop"))||0,n.left-=parseFloat(v.css(e,"marginLeft"))||0,r.top+=parseFloat(v.css(t[0],"borderTopWidth"))||0,r.left+=parseFloat(v.css(t[0],"borderLeftWidth"))||0,{top:n.top-r.top,left:n.left-r.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||i.body;while(e&&!er.test(e.nodeName)&&v.css(e,"position")==="static")e=e.offsetParent;return e||i.body})}}),v.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);v.fn[e]=function(i){return v.access(this,function(e,i,s){var o=tr(e);if(s===t)return o?n in o?o[n]:o.document.documentElement[i]:e[i];o?o.scrollTo(r?v(o).scrollLeft():s,r?s:v(o).scrollTop()):e[i]=s},e,i,arguments.length,null)}}),v.each({Height:"height",Width:"width"},function(e,n){v.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){v.fn[i]=function(i,s){var o=arguments.length&&(r||typeof i!="boolean"),u=r||(i===!0||s===!0?"margin":"border");return v.access(this,function(n,r,i){var s;return v.isWindow(n)?n.document.documentElement["client"+e]:n.nodeType===9?(s=n.documentElement,Math.max(n.body["scroll"+e],s["scroll"+e],n.body["offset"+e],s["offset"+e],s["client"+e])):i===t?v.css(n,r,i,u):v.style(n,r,i,u)},n,o?i:t,o,null)}})}),e.jQuery=e.$=v,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return v})})(window); diff --git a/docs/api/scripts/linenumber.js b/docs/api/scripts/linenumber.js new file mode 100644 index 0000000..d7ac9c0 --- /dev/null +++ b/docs/api/scripts/linenumber.js @@ -0,0 +1,30 @@ +/*global document */ +(function() { + var source = document.getElementsByClassName('prettyprint source linenums'); + var i = 0; + var lineNumber = 0; + var lineId; + var lines; + var totalLines; + var anchorHash; + var lineNumberHTML = ''; + + if (source && source[0]) { + anchorHash = document.location.hash.substring(1); + lines = source[0].getElementsByTagName('li'); + totalLines = lines.length; + + for (; i < totalLines; i++) { + lineNumber++; + lineId = 'line' + lineNumber; + lines[i].id = lineId; + + lineNumberHTML = '' + (i + 1) + ' : '; + + lines[i].insertAdjacentHTML('afterBegin', lineNumberHTML); + if (lineId === anchorHash) { + lines[i].className += ' selected'; + } + } + } +})(); diff --git a/docs/api/scripts/prettify/Apache-License-2.0.txt b/docs/api/scripts/prettify/Apache-License-2.0.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/docs/api/scripts/prettify/Apache-License-2.0.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/docs/api/scripts/prettify/lang-css.js b/docs/api/scripts/prettify/lang-css.js new file mode 100644 index 0000000..041e1f5 --- /dev/null +++ b/docs/api/scripts/prettify/lang-css.js @@ -0,0 +1,2 @@ +PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n "]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com", +/^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]); diff --git a/docs/api/scripts/prettify/prettify.js b/docs/api/scripts/prettify/prettify.js new file mode 100644 index 0000000..eef5ad7 --- /dev/null +++ b/docs/api/scripts/prettify/prettify.js @@ -0,0 +1,28 @@ +var q=null;window.PR_SHOULD_USE_CONTINUATION=!0; +(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a= +[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;ci[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m), +l=[],p={},d=0,g=e.length;d=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/, +q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/, +q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g, +"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a), +a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e} +for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"], +"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"], +H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"], +J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+ +I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]), +["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css", +/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}), +["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes", +hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p=0){var k=k.match(g),f,b;if(b= +!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p - 1; +} + +function makeListItemHtml(item, inputText) { + var itemText = item.text; + var itemHref = item.href; + var $parent = $(item).closest('div'); + var memberof = ''; + + if ($parent.length && $parent.attr('id')) { + memberof = $parent.attr('id').replace('_sub', ''); + } else { + memberof = $(item).closest('div').find('h3').text(); + } + + if (memberof) { + memberof = '' + memberof + ''; + } + + itemText = itemText.replace(new RegExp(inputText, 'ig'), function(matched) { + return '' + matched + ''; + }); + + return '
  • ' + itemText + '' + memberof + '
  • '; +} + +function removeWhiteSpace(value) { + return value.replace(/\s/g, ''); +} + +/*************** TOOGLE SUB NAV ***************/ +function toggleSubNav(e) { + $(e.currentTarget).next().toggleClass('hidden'); + $(e.currentTarget).find('.glyphicon').toggleClass('glyphicon-plus glyphicon-minus'); +} + +$lnb.find('.lnb-api').each(function() { + $(this).find('.toggle-subnav') + .filter(function() { + return $(this).next(':empty').length === 0; + }).each(function() { + $(this).removeClass('hidden').on('click', toggleSubNav); + }); +}); diff --git a/docs/api/styles/bootstrap.min.css b/docs/api/styles/bootstrap.min.css new file mode 100644 index 0000000..ed3905e --- /dev/null +++ b/docs/api/styles/bootstrap.min.css @@ -0,0 +1,6 @@ +/*! + * Bootstrap v3.3.7 (http://getbootstrap.com) + * Copyright 2011-2016 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before{content:"\e227"}.glyphicon-btc:before{content:"\e227"}.glyphicon-xbt:before{content:"\e227"}.glyphicon-yen:before{content:"\00a5"}.glyphicon-jpy:before{content:"\00a5"}.glyphicon-ruble:before{content:"\20bd"}.glyphicon-rub:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=time].form-control,input[type=datetime-local].form-control,input[type=month].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=time],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=time],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.checkbox-inline.disabled,.radio-inline.disabled,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio-inline{cursor:not-allowed}.checkbox.disabled label,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .radio label{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default:hover{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary:hover{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success:hover{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger:hover{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;-o-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;filter:alpha(opacity=0);opacity:0;line-break:auto}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px;bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);line-break:auto}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);background-color:rgba(0,0,0,0);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-md,.visible-sm,.visible-xs{display:none!important}.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}} +/*# sourceMappingURL=bootstrap.min.css.map */ \ No newline at end of file diff --git a/docs/api/styles/prettify-jsdoc.css b/docs/api/styles/prettify-jsdoc.css new file mode 100644 index 0000000..5a2526e --- /dev/null +++ b/docs/api/styles/prettify-jsdoc.css @@ -0,0 +1,111 @@ +/* JSDoc prettify.js theme */ + +/* plain text */ +.pln { + color: #000000; + font-weight: normal; + font-style: normal; +} + +/* string content */ +.str { + color: #006400; + font-weight: normal; + font-style: normal; +} + +/* a keyword */ +.kwd { + color: #000000; + font-weight: bold; + font-style: normal; +} + +/* a comment */ +.com { + font-weight: normal; + font-style: italic; +} + +/* a type name */ +.typ { + color: #000000; + font-weight: normal; + font-style: normal; +} + +/* a literal value */ +.lit { + color: #006400; + font-weight: normal; + font-style: normal; +} + +/* punctuation */ +.pun { + color: #000000; + font-weight: bold; + font-style: normal; +} + +/* lisp open bracket */ +.opn { + color: #000000; + font-weight: bold; + font-style: normal; +} + +/* lisp close bracket */ +.clo { + color: #000000; + font-weight: bold; + font-style: normal; +} + +/* a markup tag name */ +.tag { + color: #006400; + font-weight: normal; + font-style: normal; +} + +/* a markup attribute name */ +.atn { + color: #006400; + font-weight: normal; + font-style: normal; +} + +/* a markup attribute value */ +.atv { + color: #006400; + font-weight: normal; + font-style: normal; +} + +/* a declaration */ +.dec { + color: #000000; + font-weight: bold; + font-style: normal; +} + +/* a variable name */ +.var { + color: #000000; + font-weight: normal; + font-style: normal; +} + +/* a function name */ +.fun { + color: #000000; + font-weight: bold; + font-style: normal; +} + +/* Specify class=linenums on a pre to get line numbering */ +ol.linenums { + margin-top: 0; + margin-bottom: 0; +} diff --git a/docs/api/styles/prettify-tomorrow.css b/docs/api/styles/prettify-tomorrow.css new file mode 100644 index 0000000..b6f92a7 --- /dev/null +++ b/docs/api/styles/prettify-tomorrow.css @@ -0,0 +1,132 @@ +/* Tomorrow Theme */ +/* Original theme - https://github.com/chriskempson/tomorrow-theme */ +/* Pretty printing styles. Used with prettify.js. */ +/* SPAN elements with the classes below are added by prettyprint. */ +/* plain text */ +.pln { + color: #4d4d4c; } + +@media screen { + /* string content */ + .str { + color: #718c00; } + + /* a keyword */ + .kwd { + color: #8959a8; } + + /* a comment */ + .com { + color: #8e908c; } + + /* a type name */ + .typ { + color: #4271ae; } + + /* a literal value */ + .lit { + color: #f5871f; } + + /* punctuation */ + .pun { + color: #4d4d4c; } + + /* lisp open bracket */ + .opn { + color: #4d4d4c; } + + /* lisp close bracket */ + .clo { + color: #4d4d4c; } + + /* a markup tag name */ + .tag { + color: #c82829; } + + /* a markup attribute name */ + .atn { + color: #f5871f; } + + /* a markup attribute value */ + .atv { + color: #3e999f; } + + /* a declaration */ + .dec { + color: #f5871f; } + + /* a variable name */ + .var { + color: #c82829; } + + /* a function name */ + .fun { + color: #4271ae; } } +/* Use higher contrast and text-weight for printable form. */ +@media print, projection { + .str { + color: #060; } + + .kwd { + color: #006; + font-weight: bold; } + + .com { + color: #600; + font-style: italic; } + + .typ { + color: #404; + font-weight: bold; } + + .lit { + color: #044; } + + .pun, .opn, .clo { + color: #440; } + + .tag { + color: #006; + font-weight: bold; } + + .atn { + color: #404; } + + .atv { + color: #060; } } +/* Style */ +/* +pre.prettyprint { + background: white; + font-family: Consolas, Monaco, 'Andale Mono', monospace; + font-size: 12px; + line-height: 1.5; + border: 1px solid #ccc; + padding: 10px; } +*/ + +/* Specify class=linenums on a pre to get line numbering */ +ol.linenums { + margin-top: 0; + margin-bottom: 0; } + +/* IE indents via margin-left */ +li.L0, +li.L1, +li.L2, +li.L3, +li.L4, +li.L5, +li.L6, +li.L7, +li.L8, +li.L9 { + /* */ } + +/* Alternate shading for lines */ +li.L1, +li.L3, +li.L5, +li.L7, +li.L9 { + /* */ } diff --git a/docs/api/styles/red5pro-doc.css b/docs/api/styles/red5pro-doc.css new file mode 100644 index 0000000..64641e6 --- /dev/null +++ b/docs/api/styles/red5pro-doc.css @@ -0,0 +1,53 @@ +body, +.main section article dl h4, +span.icon, +.lnb .member-type { + font-size: 14px; +} + +.lnb { + background-color: #fafafa; +} + +.lnb h3, +.main section article h3.subsection-title, +.lnb .member-type, +.readme p a { + color: rgb(227, 25, 0); +} + +.lnb .lnb-api a, +.lnb .lnb-examples a { + color: #337ab7; +} + +.lnb .lnb-api a:hover, +.lnb .lnb-examples a:hover { + color: #364149; +} + +.lnb .logo { + height: 30px; +} + +.logo { + width: 180px; +} + +footer, +#resizer { + background-color: #a8a8a8; +} + +.lnb .title .link { + color: #364149; + font-style: normal; +} + +.main section article h3.subsection-title { + padding: 35px 0 5px 5px; +} + +.lnb-tab li.selected a { + color: #364149 +} diff --git a/docs/api/styles/tui-doc.css b/docs/api/styles/tui-doc.css new file mode 100644 index 0000000..aec9ed9 --- /dev/null +++ b/docs/api/styles/tui-doc.css @@ -0,0 +1,485 @@ +body { + font-size: 12px; + font-family: Helvetica Neue, Helvetica, Arial, Malgun gothic, '돋움', AppleSDGothicNeo; +} +ul, ol, li {list-style:none; padding-left:0; margin-left:0;} + +/* Navigation - LNB */ +.lnb { + width: 290px; + position: absolute; + bottom: 30px; + top: 0; + overflow: auto; + left: 0; + background-color: #161b1d; + padding: 0 20px; +} +.lnb .logo { + height: 13px; + margin: 20px auto 0; +} +.lnb .title { + text-align: center; + padding: 0 0 15px; +} +.lnb .title .link { + color: #fff; + font-style: italic; +} +.lnb h3 { + font-size: 1.5em; + color: #fa3282; +} +.lnb h3 a { + color: #fa3282; +} +.lnb h3 a:hover { + color: #9a3282; +} +.lnb .lnb-api li, +.lnb .lnb-examples li { + padding-top: 5px; + padding-bottom: 5px; + border-bottom: 1px solid #1f292e; +} +.lnb .lnb-api h3 a { + color: #fa3282; +} +.lnb .lnb-api h3 a:hover { + color: #fa3282; + text-decoration: underline; +} +.lnb .lnb-api a, +.lnb .lnb-examples a { + color: #7cafc2; +} +.lnb .lnb-api a:hover, +.lnb .lnb-examples a:hover { + color: #a3cfdf; +} +.lnb .lnb-api .toggle-subnav { + padding: 0 3px; + margin-bottom: 0; +} +.lnb .lnb-api .toggle-subnav:focus { + outline: 0; +} +.lnb .lnb-api .toggle-subnav { + font-size: 10px; +} +.lnb .member-type { + margin-top: 5px; + margin-left: 5px; + color: #568c3b; + font-weight: normal; + font-size: 10px; + cursor: text; +} +.lnb .inner li { + margin-left: 15px; + border-bottom: 0; + padding-top: 0; + padding-bottom: 0; + color: #bbb; +} +.lnb .inner a { + color: #bbb; +} +.lnb .inner a:hover { + color: #eee; +} + +.lnb .version { + color: #aaa; + font-size: 1.2em; +} + +/* LNB-TAB */ +.lnb-tab { + text-align: center; + text-decoration: none; +} +.lnb-tab li { + display: inline-block; + padding-top: 15px; +} +.lnb-tab li a { + color: #aaa; + font-size: 0.9em; +} +.lnb-tab li.selected a { + color: #fff; + font-size: 1em; +} +.lnb-tab li+li a h4:before { + content: "\007C"; + display: inline-block; + color: #999; + padding: 0 10px; +} + +/* MAIN-CONTENT */ +.main { + padding: 20px; + left: 297px; + right: 0; + top: 0; + bottom: 0; + position: absolute; + overflow: auto; + margin-bottom: 35px; +} +.main article ol, +.main article ul { + margin-left: 15px; +} +.main section header { + padding-top: 0; + border-bottom: 1px solid #999; +} +.main section header h2 { + font-size:18px; + font-weight:bold; + padding-left : 5px; + border-left: 5px solid #dc9656; +} +.main section article { + padding: 10px; +} +.main section article .container-overview { + padding: 15px 15px 0 15px; + border: 1px solid #dedede; + border-radius: 7px; +} +.main section article h3.subsection-title { + font-size:16px; + color: #fa3282; + padding:35px 0 0 5px; + border-bottom: 1px solid #dedede; +} +.main section article dl h4 { + font-size: 12px; + font-weight: bold; +} +.main section article dl h4 .signature { + font-size: 9pt; +} +.main section article dl h4 .type-signature { + font-size: 9pt; + color: #31708f; + font-weight: normal; +} +.main section article dl dt .name { + padding: 3px 10px; + background-color: #f4f7f8; +} +.main section article dl dd { + padding: 0 30px; +} +.main section article dl dd h5{ + font-weight: bold; +} +.main section article .container-source { + margin: -15px -15px 3px 0; + font-weight: normal; + font-size: 8pt; + text-align: right; + padding-right: 10px; +} +.main section article .container-returns { + margin-bottom: 7px; +} +.main section article .container-returns span, +.main section article .container-params table { + border-left: 3px solid #eee; + margin-left: 7px; + padding-left: 3px; + margin-bottom: 5px; +} +.main section article .container-returns p { + display: inline; +} +.main section article .container-properties h5, +.main section article .container-returns h5, +.main section article .container-params h5, +.main section article table th, +.main section article table td.type, +.main section article table td.attributes { + font-family: Verdana, sans-serif; + font-size: 90%; +} +.main section article table, +.main section article table th, +.main section article table td { + font-family: Verdana, sans-serif; + vertical-align: top; + border: 0; + padding: 1px 3px; +} +.main section article table td.name, +.main section article table td.type, +.main section article table td.attributes, +.main section article table td.default { + max-width: 100px; + min-width: 80px; + word-break: break-all; +} +.main section article table td.type, +.main section article table td.attributes { + color: #aaa; +} +.main section article table td p { + padding: 0; + margin: 0; +} +.main section article table td h6 { + padding: 0 0 0 3px; + margin: 3px 0 0 3px; + font-size: 85%; +} +.main section article .container-properties table.props { + margin-top: -3px; +} +.main .main-content article { + padding:0; +} +.main .container-overview, +.main .main-datail { + overflow: hidden; +} +.main .main-detail .tag-source { + float:left; + display:none; +} +.main .main-detail .tag-author { + float:left; +} +.main .main-detail .tag-author a { + color:#181818; + font-size:11px; + text-decoration:none; +} +.linenums li.selected { + background: #faebd7; +} +.iinenums .number { + color: #777; + display: inline-block; + width: 40px; +} + +/* FOOTER */ +footer { + padding-top: 3px; + line-height: 35px; + height: 35px; + position: fixed; + width: 100%; + bottom: 0; + background-color: #00beaa; + color: #ebf8ff; + text-align: center; +} + +/* README*/ +.readme { + font-size: 14px; +} +.readme p, +.readme ul, +.readme ol { + padding: 3px 0 3px 5px; +} +.readme li { + list-style: initial; +} +.readme img { + max-width: 100%; +} +.readme h1 { + font-size:24px; + font-weight:normal; + padding: 10px 0 5px 0; + border-bottom: 1px solid #428bca; +} +.readme pre { + margin: 15px 3px; +} +.readme li p { + padding: 10px 0; + color: #333; +} +.readme p a { + color:#c7254e; +} +.readme h2 { + padding-bottom: 3px; + border-bottom: 1px solid #dedede; + font-size: 22px; +} +.readme h3 { + font-size: 20px; + padding-bottom: 3px; +} + +.readme h4 { + font-size: 18px; +} +.readme h5 { + font-size: 16px; +} +.readme h6 { + font-size: 15px; +} +.readme table { + margin: 5px 30px 20px; +} +.readme table th, +.readme table td { + padding: 2px 20px 2px 5px; + border-bottom: 1px solid #dedede; +} +.readme section header h2 { + font-size:20px; + padding-left:10px; + border-left:5px solid #fa3282; +} +.readme section .container-overview { + color:#333; + border-radius: 2px; + border:1px solid #dedede; + padding:15px 15px 10px; +} +.readme section .container-overview .description { + color:#666; +} +.readme section .container-overview dt {float:left; } +.readme section .container-overview dd {float:left; margin-left:10px; } +.readme blockquote { + padding: inherit; + margin: inherit; + font-size: inherit; + color: #777; +} + +/* Search box */ +.search-container { + position: relative; + padding-bottom: 10px; +} +.search-container input { + padding: 7px; + width: 100%; + color: #aaa; + border: 1px solid #585858; + background-color: #373737; + border-radius: 2px; +} +.search-container a { + color: #fff; +} +.search-container strong { + color: pink; + font-weight: normal; +} +.search-container ul { + font-size: 13px; + position: absolute; + width: 100%; + background-color: #456e82; + border: 1px solid #1f292e; + border-radius: 0 0 2px 2px; + opacity: 0.9; + filter: alpha(opacity=90); +} +.search-container ul li { + text-align: left; + width: 100%; + padding: 4px 0 4px 7px; + overflow: hidden; + border: 0; + cursor: pointer; +} +.search-container ul li:hover, +.search-container ul li.highlight{ + background-color: #fff; +} +.search-container ul li:hover a, +.search-container ul li.highlight a { + color: #1f292e; + text-decoration: underline; +} +.search-container ul li:hover strong, +.search-container ul li.highlight strong { + color: #ff4141; +} +.search-container ul li .group { + font-size: 11px; + color: #ccc; + margin-left: 10px; +} +.search-container ul li:hover .group, +.search-container ul li.highlight .group { + color: #777; +} + +/* ETC */ +.logo { + width: 90px; + vertical-align: initial; +} +.hidden { + display: none; +} +.footer-text { + padding-left: 3px; + display: inline-block; +} +#example-nav { + margin-top: 15px; +} +#resizer { + width: 7px; + position: fixed; + left: 290px; + height: 100%; + background-color: #00beaa; + cursor: col-resize; +} +span.param-type { + color: #aaa; +} +pre.prettyprint { + font-size: 0.9em; + border-radius: 0; +} +span.icon { + font-size: 8pt; + border-radius: 3px; + padding: 1px 2px; +} +span.icon.green { + color: #3c763d; + background-color: #dff0d8; + border-color: #d6e9c6; +} +span.icon.blue { + color: #31708f; + background-color: #d9edf7; + border-color: #bce8f1; +} +span.icon.yellow { + color: #8a6d3b; + background-color: #fcf8e3; + border-color: #faebcc; +} +span.icon.red { + color: #A94443; + background-color: #f2dede; + border-color: #ebccd1; +} +span.arrow { + font-size: 8pt; + padding-right: 5px; +} diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..fdb0866 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,102 @@ +# Red5 Pro HTML5 SDK + +> [Download the latest release](https://account.red5pro.com/download) + +# Quickstart + +```html + + + + + + + + + +
    + +
    + +
    + +
    + + + + + + + +``` + +# Requirements +The **Red5 Pro HTML SDK** is intended to communicate with a [Red5 Pro Server](https://www.red5pro.com/), which allows for broadcasting and consuming live streams utilizing [WebRTC](https://developer.mozilla.org/en-US/docs/Web/Guide/API/WebRTC) and other protocols, including [RTMP](https://en.wikipedia.org/wiki/Real_Time_Messaging_Protocol) and [HLS](https://en.wikipedia.org/wiki/HTTP_Live_Streaming). + +A **Red5 Pro Server** can be deployed to allow for autoscaling on cloud platforms (such as [Amazon Web Services](https://www.red5pro.com/docs/server/awsinstall/)). In such a scenario, the [Stream Manager API](https://www.red5pro.com/docs/autoscale/) is used by client-side webapps to access endpoints for Origins and Edges. + +With the **Red5Pro Stream Manager Extension** the communication with the **Stream Manager** is simplified and abstracted to allow for a familar client-side API which will handle accessing and configuring publishers and subscribers to stream on Origins and Edges, respectively. + +> **[Click here to start using the Red5 Pro Server today!](https://account.red5pro.com/login)** + diff --git a/docs/jsdoc-template/.editorconfig b/docs/jsdoc-template/.editorconfig new file mode 100644 index 0000000..c3f6353 --- /dev/null +++ b/docs/jsdoc-template/.editorconfig @@ -0,0 +1,11 @@ +root = true + +[*] +indent_style = space +indent_size = 4 +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false diff --git a/docs/jsdoc-template/.gitattributes b/docs/jsdoc-template/.gitattributes new file mode 100644 index 0000000..176a458 --- /dev/null +++ b/docs/jsdoc-template/.gitattributes @@ -0,0 +1 @@ +* text=auto diff --git a/docs/jsdoc-template/.npmignore b/docs/jsdoc-template/.npmignore new file mode 100644 index 0000000..be079c5 --- /dev/null +++ b/docs/jsdoc-template/.npmignore @@ -0,0 +1,55 @@ +# Logs +logs +*.log + +# Runtime data +pids +*.pid +*.seed + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directory +# Deployed apps should consider commenting this line out: +# see https://npmjs.org/doc/faq.html#Should-I-check-my-node_modules-folder-into-git +node_modules + +# Bower Components +bower_components +lib + +# IDEA +.idea +*.iml + +# Window +Thumbs.db +Desktop.ini + +# MAC +.DS_Store + +# SVN +.svn + +# eclipse +.project +.metadata + +# etc +temp +docs +doc +doc-default +out +toast.doc/report diff --git a/docs/jsdoc-template/LICENSE b/docs/jsdoc-template/LICENSE new file mode 100644 index 0000000..5f2374d --- /dev/null +++ b/docs/jsdoc-template/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2016 NHN Entertainment Corp. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/docs/jsdoc-template/README.md b/docs/jsdoc-template/README.md new file mode 100644 index 0000000..7fad013 --- /dev/null +++ b/docs/jsdoc-template/README.md @@ -0,0 +1,148 @@ +# TUI JSDoc Template +Toast UI JSDoc template + +Demo: https://nhnent.github.io/tui.jsdoc-template/latest/ + +## Install + +``` +npm i -D tui-jsdoc-template +``` + +## Feature + +TUI JSDoc template has the following features: + +* Navigation: + * AutoComplete Searchbox + * Collapsible + * Members / Methods / Events + * API / Examples (Tutorials) switcher + * Resizable +* Examples: HTML/JS source tab in example pages + +![Example](https://cloud.githubusercontent.com/assets/12269563/20049432/69d2ed42-a506-11e6-980e-53b991e5ee5b.png) + +## Configuration + +([*jsdoc page - configuration*](http://usejsdoc.org/about-configuring-jsdoc.html#incorporating-command-line-options-into-the-configuration-file)) + +### Template + +``` +"opts": { + "template": "node_modules/tui-jsdoc-template" +} +``` + +### Logo + +``` +"templates": { + "logo": { + "url": "http://nhnent.github.io/tui.component.tree/latest/styles/logo.png", + "width": "150px", + "height": "13px", + "link": "https://github.com/nhnent/tui.jsdoc-template" + } +} +``` + +### Page title + +``` +"templates": { + "name": "Tui JSDoc Template" +} +``` + +### Footer text + +``` +"templates": { + "footerText": "My awesome footer text" +} +``` + +### Use collapsible api list + +*Default: `true`* +``` +"templates": { + "useCollapsibles": ture +} +``` + +### Tab Names + +``` +"templates": { + "tabNames": { + "api": "API", + "tutorials": "Examples" + } +} +``` + +`api` defaults to the value `API` and `tutorials` defaults to the value `Examples`. + +### Custom Styles + +With a folder structure like this: +``` +static +└── styles + └── custom.css + └── another.css +``` +And a config like this: +```js +"templates": { + "default": { + "staticFiles": { + "include": ["static/"] + } + }, + "css": [ + "styles/custom.css", + "styles/another.css", + "http://example.com/remote.css" + ] +} +``` + +`styles/custom.css`, `styles/another.css`, and `remote.css` get included in the layout. +`default.staticFiles` is the build-in jsdoc way of copying extra files. + +## Expose the html/js code to exmaple page + +If `script` or `div` elements have `code-js` or `code-html` class, expose their innerHTML. + +1. innerHTML of `script.code-js` tag +2. innerHTML of `div.code-html` tag + +``` + + + + + example + + +
    +

    Base Example

    +

    Hello world

    +
    + + + + + +``` + +## Development + +1. Use `npm run serve` or `gulp serve` command to ascertain realtime. +3. Api-Example tab, Auto-Complete and Resize functions are written in the `static/scripts/tui-doc.js` file. diff --git a/docs/jsdoc-template/demo/jsdoc-conf.json b/docs/jsdoc-template/demo/jsdoc-conf.json new file mode 100644 index 0000000..2b3719c --- /dev/null +++ b/docs/jsdoc-template/demo/jsdoc-conf.json @@ -0,0 +1,20 @@ +{ + "plugins": ["plugins/markdown"], + "markdown": { + "parser": "gfm", + "hardwrap": true + }, + "templates": { + "name": "Doc Template", + "footerText": "", + "logo": { + "link": "https://github.com/nhnent/tui.jsdoc-template" + } + }, + "opts": { + "encoding": "utf8", + "recurse": true, + "package": "package.json", + "tutorials": "demo/samples" + } +} diff --git a/docs/jsdoc-template/demo/samples/chart.html b/docs/jsdoc-template/demo/samples/chart.html new file mode 100644 index 0000000..fb9c648 --- /dev/null +++ b/docs/jsdoc-template/demo/samples/chart.html @@ -0,0 +1,135 @@ + + + + + + [Bar Chart] basic + + + + +

    TUI Chart

    +
    +
    +
    +
    + +     + + +
    +
    +
    Chart Data
    + +
    +
    +
    Chart Options
    + +
    + +
    +
    +
    +
    Chart Theme
    + +
    + +
    +
    +
    +
    + + + + + + + + diff --git a/docs/jsdoc-template/demo/samples/editor.html b/docs/jsdoc-template/demo/samples/editor.html new file mode 100644 index 0000000..aa9d6f7 --- /dev/null +++ b/docs/jsdoc-template/demo/samples/editor.html @@ -0,0 +1,45 @@ + + + + + DEMO + + + + + + + +

    TUI Editor

    +
    +
    +
    + + + + + + + + + + + diff --git a/docs/jsdoc-template/demo/samples/examples.json b/docs/jsdoc-template/demo/samples/examples.json new file mode 100644 index 0000000..df609f9 --- /dev/null +++ b/docs/jsdoc-template/demo/samples/examples.json @@ -0,0 +1,17 @@ +{ + "image-editor": { + "title": "TUI Image Editor" + }, + "chart": { + "title": "TUI Chart" + }, + "grid": { + "title": "TUI Grid" + }, + "editor": { + "title": "TUI Editor" + }, + "markdownTutorial": { + "title": "Markdown tutorial" + } +} diff --git a/docs/jsdoc-template/demo/samples/grid.html b/docs/jsdoc-template/demo/samples/grid.html new file mode 100644 index 0000000..3522035 --- /dev/null +++ b/docs/jsdoc-template/demo/samples/grid.html @@ -0,0 +1,174 @@ + + + + + 1. Basic Example + + + + +

    TUI Grid

    +
    +
    +
    +
    +

    Preset

    + + + +
    +
    +

    Custom options

    +

    +

    +
    +
    +
    + + + + + + + + + + diff --git a/docs/jsdoc-template/demo/samples/image-editor.html b/docs/jsdoc-template/demo/samples/image-editor.html new file mode 100644 index 0000000..1820b85 --- /dev/null +++ b/docs/jsdoc-template/demo/samples/image-editor.html @@ -0,0 +1,611 @@ + + + + + Image editor basic + + + + +

    TUI Component Image Editor

    +
    +
    +
    +
    + + Image Editor + +
    + + + + + + + + + +
    +
    + +
    +
    +
    + + + + + + + + + diff --git a/docs/jsdoc-template/demo/samples/markdownTutorial.md b/docs/jsdoc-template/demo/samples/markdownTutorial.md new file mode 100644 index 0000000..e0ad9d7 --- /dev/null +++ b/docs/jsdoc-template/demo/samples/markdownTutorial.md @@ -0,0 +1,68 @@ +# Mastering markdown +> https://guides.github.com/features/mastering-markdown/ + +## Examples +### Text +It's very easy to make some words **bold** and other words *italic* with Markdown. You can even [link to Google!](http://google.com) + +### Lists +Sometimes you want numbered lists: + +1. One +2. Two +3. Three + +Sometimes you want bullet points: + +* Start a line with a star +* Profit! + +Alternatively, + +- Dashes work just as well +- And if you have sub points, put two spaces before the dash or star: + - Like this + - And this + +### Images +If you want to embed images, this is how you do it: + +![Image of Yaktocat](https://octodex.github.com/images/yaktocat.png) + +### Code +There are many different ways to style code with GitHub's markdown. If you have inline code blocks, wrap them in backticks: `var example = true`. If you've got a longer block of code, you can indent with four spaces: + + if (isAwesome){ + return true + } + +GitHub also supports something called code fencing, which allows for multiple lines without indentation: + +``` +if (isAwesome){ + return true +} +``` + +And if you'd like to use syntax highlighting, include the language: + +```javascript +if (isAwesome){ + return true +} +``` + +--- + +### Headers & Quotes + +Sometimes it's useful to have different levels of headings to structure your documents. Start lines with a `#` to create headings. Multiple `##` in a row denote smaller heading sizes. + +#### This is a fourth-tier heading + +You can use one `#` all the way up to `######` six for different heading sizes. + +If you'd like to quote someone, use the > character before the line: + +> Coffee. The finest organic suspension ever devised... I beat the Borg with it. +> - Captain Janeway diff --git a/docs/jsdoc-template/demo/src/class.js b/docs/jsdoc-template/demo/src/class.js new file mode 100644 index 0000000..0630a57 --- /dev/null +++ b/docs/jsdoc-template/demo/src/class.js @@ -0,0 +1,186 @@ +/** + * @author NHN Ent. FE Development Team + * @fileoverview Base class + */ +'use strict'; + +tui = tui || {}; + +(function (ns) { + /** + * Create Base instance + * @class tui.component.Base + * @param {object} data - data + * @param {object} data.foo - foo + * @param {string} data.bar - 'bar' + */ + var Base = function (data) { + /** + * Base data + * @type {object} + */ + this.data = data || {}; + }; + + /** + * @alias tui.component.Base.staticMethod + */ + Base.staticMethod = function() {} + + Object.assign(Base.prototype, /** @lends tui.component.Base.prototype */ { + + /** + * Private method + * @private + */ + _privateMethod: function() { + // ...code + }, + + /** + * Base log2 + * @param {string} str - string for log + * @example + * base.log('hello world'); // "LOG1: hello world" + */ + log: function(str) { + console.log('LOG1: ' + str); + }, + + /** + * Base log2 + * @example + * base.log2(); // "LOG2" + */ + log2: function() { + console.log('LOG2') + }, + + /** + * Set datum + * @param {string} id - Id for datum + * @param {*} datum - Datum + * @example + * base.setDatum('a', 'hello world'); + */ + setDatum: function(id, datum) { + this.data[id] = datum; + }, + + /** + * Base get + * @param {string} id - Id for datum + * @returns {?object} datum + * @example + * base.setDatum('a', 'hello world'); + * console.log(base.getDatum('a')); // "hello world"; + */ + getDatum: function(id) { + return data[id]; + } + }); + + /** + * BaseChild Class + * @extends tui.component.Base + * @class tui.component.BaseChild + */ + var BaseChild = function() { + Base.call(this); + + /** + * BaseChild data + * @type {{name: string, a: string}} + */ + this.data = { + name: 'BaseChild', + a: 'b' + }; + + /** + * Private data + * @type {object} + * @private + */ + this._privateData = {} + }; + BaseChild.prototype = Object.create(Base.prototype); + Object.assign(BaseChild.prototype, /** @lends tui.component.BaseChild.prototype */ { + constructor: BaseChild, + + /** + * BaseChild log2 + * @param {string} str - string for log + * @example + * base.log('hello world'); // "BaseChild - LOG1: hello world" + */ + log: function(str) { + console.log('BaseChild - LOG1: ' + str); + }, + + /** + * Returns the sum of a and b + * @param {Number} a + * @param {Number} b + * @param {Boolean} retArr If set to true, the function will return an array + * @returns {Number|Array} Sum of a and b or an array that contains a, b and the sum of a and b. + */ + sum: function(a, b, retArr) { + if (retArr) { + return [a, b, a + b]; + } + return a + b; + } + }); + + /** + * @event tui.component.BaseChild#foo + * @example + * baseChild.on('foo', function() { + * console.log('fire "foo"'); + * }); + */ + + ns.Base = Base; + ns.BaseChild = BaseChild; +})(tui.component || (tui.component = {})); + + +/** + * @classdesc Toaster singleton. + * @class + * @hideconstructor + */ +var Toaster = (function() { + var instance = null; + + function Toaster() {} + + /** + * Toast an item. + * + * @alias toast + * @memberof Toaster + * @instance + * @param {BreadyThing} item - The item to toast. + * @return {Toast} A toasted bready thing. + */ + Toaster.prototype.toast = function(item) {}; + + return { + /** + * Get the Toaster instance. + * + * @alias Toaster.getInstance + * @returns {Toaster} The Toaster instance. + */ + getInstance: function() { + if (instance === null) { + instance = new Toaster(); + delete instance.constructor; + } + + return instance; + } + }; +})(); diff --git a/docs/jsdoc-template/demo/src/etc.js b/docs/jsdoc-template/demo/src/etc.js new file mode 100644 index 0000000..e98280f --- /dev/null +++ b/docs/jsdoc-template/demo/src/etc.js @@ -0,0 +1,57 @@ +/** + * @author NHN Ent. FE Development Team + * @fileoverview Externals & Type definition & borrow + */ + +/* Externals */ +/** + * The built in string object. + * @external String + * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String|String} + */ + +/** + * Create a ROT13-encoded version of the string. Added by the `foo` package. + * @function external:String#rot13 + * @example + * var greeting = new String('hello world'); + * console.log( greeting.rot13() ); // uryyb jbeyq + */ + +/** + * The jQuery plugin namespace. + * @external "jQuery.fn" + * @see {@link http://learn.jquery.com/plugins/|jQuery Plugins} + */ + +/** + * A jQuery plugin to make stars fly around your home page. + * @function external:"jQuery.fn".starfairy + */ + +/* Type Definition */ +/** + * Foo type definitions + * @typedef {object} Foo + * @prop {string} a - 'a' + * @prop {string} b - 'b' + * @prop {string} c - 'c' + */ + +/* Function for borrow (namespace.js)*/ +/** + * Remove whitespace from around a string. + * @param {string} str + */ +function trstr(str) {} + +/** + * Use the @global tag to specify that a symbol should be documented as global. + * Document an inner variable as a global + */ +(function() { + /** @global */ + var foo = 'hello foo'; + + this.foo = foo; +}).apply(window); diff --git a/docs/jsdoc-template/demo/src/mixin.js b/docs/jsdoc-template/demo/src/mixin.js new file mode 100644 index 0000000..0ec6894 --- /dev/null +++ b/docs/jsdoc-template/demo/src/mixin.js @@ -0,0 +1,46 @@ +/** + * @author NHN Ent. FE Development Team + * @fileoverview mixin + */ +'use strict'; + +(function(tui) { + /** + * This provides methods used for event handling. It's not meant to + * be used directly. + * @mixin + */ + tui.Eventful = { + /** + * Register a handler function to be called whenever this event is fired. + * @param {string} eventName - Name of the event. + * @param {function(Object)} handler - The handler to call. + */ + on: function(eventName, handler) { + // code... + }, + + /** + * Fire an event, causing all handlers for that event name to run. + * @param {string} eventName - Name of the event. + * @param {Object} eventData - The data provided to each handler. + */ + fire: function(eventName, eventData) { + // code... + } + }; + + /** + * @constructor FormButton + * @mixes tui.Eventful + */ + var FormButton = function() { + // code... + }; + FormButton.prototype.press = function() { + this.fire('press', {}); + }; + + mix(Eventful).into(FormButton.prototype); + +})(window.tui = window.tui || {}); diff --git a/docs/jsdoc-template/demo/src/module.js b/docs/jsdoc-template/demo/src/module.js new file mode 100644 index 0000000..2e62090 --- /dev/null +++ b/docs/jsdoc-template/demo/src/module.js @@ -0,0 +1,39 @@ +/** + * @author NHN Ent. FE Development Team + * @fileoverview Module + */ +'use strict'; + +/** + * The following example shows the namepaths that are used for symbols in a module. The first symbol is a module-private, or "inner," variable--it can be only accessed within the module. The second symbol is a static function that is exported by the module. + * @module myModule + */ + +/** will be module:myModule~foo */ +var foo = 1; + +/** will be module:myModule.bar */ +var bar = function() {}; + +/** + * In the following example, the Book class is documented as a static member, "module:bookshelf.Book", with one instance member, "module:bookshelf.Book#title". + * Defining exported symbols as a member of 'this' + * @module bookshelf + */ +/** @class */ +this.Book = function (title) { + /** The title. */ + this.title = title; +}; + +/** + * In the following example, the two functions have the namepaths "module:color/mixer.blend" and "module:color/mixer.darken". + * Defining exported symbols as a member of 'module.exports' or 'exports' + * @module color/mixer + */ +module.exports = { + /** Blend two colours together. */ + blend: function (color1, color2) {} +}; +/** Darkens a color. */ +exports.darken = function (color, shade) {}; diff --git a/docs/jsdoc-template/demo/src/namespace.js b/docs/jsdoc-template/demo/src/namespace.js new file mode 100644 index 0000000..44e02bc --- /dev/null +++ b/docs/jsdoc-template/demo/src/namespace.js @@ -0,0 +1,59 @@ +/** + * @author NHN Ent. FE Development Team + * @fileoverview Namespace + */ +'use strict'; + +/** + * __Using the @namespace tag with an object__ + * My namespace. + * @namespace + */ +var MyNamespace = { + /** documented as MyNamespace.foo */ + foo: function() {}, + /** documented as MyNamespace.bar */ + bar: 1 +}; + +/** + * A function in MyNamespace (MyNamespace.myFunction). + * @function myFunction + * @memberof MyNamespace + */ + + /** + * Typedef on MyNamespace + * @typedef {object}myTypeDef + * @prop {string} a - Typedef prop "a" + * @prop {string} b - Typedef prop "b" + * @memberof MyNamespace + */ + +/** + * Tui namespace + * @namespace tui + * @example + * var foo = new tui.component.Foo(); + * var bar = new tui.component.Bar(); + * + * tui.util.defineNamespace('myNamespace', {}); + * tui.util.extend({}, {a: 'a', b: 'b'}); + * + * mix(tui.Eventful).into(FormButton.prototype); + */ +(function(tui) { + /** + * Tui Component Namespace + * @namespace + */ + tui.component = tui.component || {}; + + /** + * @namespace + * @borrows trstr as trim + */ + tui.util = { + trim: trstr + }; +})(window.tui = window.tui || {}); diff --git a/docs/jsdoc-template/gulpfile.js b/docs/jsdoc-template/gulpfile.js new file mode 100644 index 0000000..ed3502e --- /dev/null +++ b/docs/jsdoc-template/gulpfile.js @@ -0,0 +1,103 @@ +/** + * @author NHN Ent. FE Development Team + * @fileoverview Gulpfile + */ +'use strict'; +var path = require('path'); +var gulp = require('gulp'); +var del = require('del'); +var connect = require('gulp-connect'); +var jsdoc = require('gulp-jsdoc3'); + +/* Demo paths */ +var DEMO_PATH = path.join(__dirname, 'demo'); +var DEMO_TEMPLATE_PATH = __dirname; +var DEMO_DESTINATION_PATH = 'doc'; + +var demoFilePaths = ['src/**/*.js'].map(function (filePath) { + return path.join(DEMO_PATH, filePath); +}); +demoFilePaths.push('README.md'); + +gulp.task('demo:default', ['del'], function(done) { + var config = { + opts: {destination: path.join(DEMO_DESTINATION_PATH, '-docstrap')} + }; + + gulp.src(demoFilePaths, {read: false}) + .pipe(jsdoc(config, done)); +}); + +/** + * Generate demo document + */ +gulp.task('demo', ['del'], function(done) { + /* Demo config */ + var domeConfigPath = path.join(DEMO_PATH, 'jsdoc-conf.json'); + var config = require(domeConfigPath); + delete require.cache[require.resolve(domeConfigPath)]; // remove cache + + config.opts.template = DEMO_TEMPLATE_PATH; + config.opts.destination = DEMO_DESTINATION_PATH; + + gulp.src(demoFilePaths, {read: false}) + .pipe(jsdoc(config, done)); +}); + +/** + * Watch file paths + * @type {string[]} + */ +var watchPaths = [ + 'demo/src/**/*.js', + 'demo/jsdoc-conf.json', + 'demo/samples/**/*', + 'static/scripts/**/*.js', + 'static/styles/**/*.css', + 'tmpl/**/*.tmpl', + 'publish.js' +]; + +/** + * Reload server + */ +gulp.task('reload', ['demo'], function() { + return gulp.src(watchPaths) + .pipe(connect.reload()) +}); + +/** + * Regenerate demo document when a file changes + */ +gulp.task('watch', ['demo'] ,function() { + var watcher = gulp.watch(watchPaths, ['demo', 'reload']); + + watcher.on('change', function (event) { + console.log('File: ' + event.path + ' was ' + event.type + ', running tasks...'); + }); +}); + +/** + * Run web server + */ +gulp.task('connect', ['demo'], function() { + connect.server({ + root: DEMO_DESTINATION_PATH, + livereload: true + }); +}); + +/** + * @command gulp serve + * Connect-server with watch + */ +gulp.task('serve', ['connect', 'watch']); + + +/** + * @command gulp del + * Delete all demo-doc files + */ +gulp.task('del', function() { + return del([DEMO_DESTINATION_PATH]); +}); diff --git a/docs/jsdoc-template/package.json b/docs/jsdoc-template/package.json new file mode 100644 index 0000000..b9f668f --- /dev/null +++ b/docs/jsdoc-template/package.json @@ -0,0 +1,104 @@ +{ + "_args": [ + [ + { + "raw": "tui-jsdoc-template", + "scope": null, + "escapedName": "tui-jsdoc-template", + "name": "tui-jsdoc-template", + "rawSpec": "", + "spec": "latest", + "type": "tag" + }, + "/Users/toddanderson/Documents/Workplace/red5pro/red5pro-html5-sdk" + ] + ], + "_from": "tui-jsdoc-template@latest", + "_id": "tui-jsdoc-template@1.2.2", + "_inCache": true, + "_location": "/tui-jsdoc-template", + "_nodeVersion": "7.1.0", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/tui-jsdoc-template-1.2.2.tgz_1501492185024_0.9242940263357013" + }, + "_npmUser": { + "name": "nhnent", + "email": "dl_javascript@nhnent.com" + }, + "_npmVersion": "5.3.0", + "_phantomChildren": {}, + "_requested": { + "raw": "tui-jsdoc-template", + "scope": null, + "escapedName": "tui-jsdoc-template", + "name": "tui-jsdoc-template", + "rawSpec": "", + "spec": "latest", + "type": "tag" + }, + "_requiredBy": [ + "#DEV:/", + "#USER" + ], + "_resolved": "https://registry.npmjs.org/tui-jsdoc-template/-/tui-jsdoc-template-1.2.2.tgz", + "_shasum": "e382e2c99e457aa9df14d6fc036331046d4acee7", + "_shrinkwrap": null, + "_spec": "tui-jsdoc-template", + "_where": "/Users/toddanderson/Documents/Workplace/red5pro/red5pro-html5-sdk", + "authors": [ + "NHNEnt FE Development Lab " + ], + "bugs": { + "url": "https://github.com/nhnent/tui.jsdoc-template/issues" + }, + "dependencies": { + "cheerio": "^0.22.0" + }, + "description": "Toast UI JSDoc Template", + "devDependencies": { + "del": "^2.2.2", + "gulp": "^3.9.1", + "gulp-connect": "^5.0.0", + "gulp-jsdoc3": "^1.0.1", + "jsdoc": "^3.5.3" + }, + "directories": {}, + "dist": { + "integrity": "sha512-oqw0IYaot86VJ2owKBozJnilgta0Z55x8r9PeHj7vb+jDoSvJGRUQUcgs56SZh9HE20fx54Pe75p84X85/ygLA==", + "shasum": "e382e2c99e457aa9df14d6fc036331046d4acee7", + "tarball": "https://registry.npmjs.org/tui-jsdoc-template/-/tui-jsdoc-template-1.2.2.tgz" + }, + "gitHead": "bd11159eb92b86819352af4313378ae39cccce0e", + "homepage": "https://github.com/nhnent/tui.jsdoc-template#readme", + "keywords": [ + "jsdoc", + "jsdoc3", + "jsdoc-template", + "template", + "tui" + ], + "license": "MIT", + "main": "publish.js", + "maintainers": [ + { + "name": "minkyu-yi", + "email": "minkyu.yi@nhnent.com" + }, + { + "name": "nhnent", + "email": "dl_javascript@nhnent.com" + } + ], + "name": "tui-jsdoc-template", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/nhnent/tui.jsdoc-template.git" + }, + "scripts": { + "serve": "gulp serve" + }, + "version": "1.2.2" +} diff --git a/docs/jsdoc-template/publish.js b/docs/jsdoc-template/publish.js new file mode 100755 index 0000000..c16ea48 --- /dev/null +++ b/docs/jsdoc-template/publish.js @@ -0,0 +1,828 @@ +'use strict'; + +var doop = require('jsdoc/util/doop'); +var env = require('jsdoc/env'); +var fs = require('jsdoc/fs'); +var helper = require('jsdoc/util/templateHelper'); +var logger = require('jsdoc/util/logger'); +var path = require('jsdoc/path'); +var taffy = require('taffydb').taffy; +var template = require('jsdoc/template'); +var tutorial = require('jsdoc/tutorial'); +var util = require('util'); +var cheerio = require('cheerio'); // for parse html to dom +var _ = require('underscore'); + +var htmlsafe = helper.htmlsafe; +var linkto = helper.linkto; +var resolveAuthorLinks = helper.resolveAuthorLinks; +var scopeToPunc = helper.scopeToPunc; +var hasOwnProp = Object.prototype.hasOwnProperty; + +var data; +var view; +var tutorialsName; + +var outdir = path.normalize(env.opts.destination); + +env.conf.templates = _.extend({ + useCollapsibles: true +}, env.conf.templates); + +env.conf.templates.tabNames = _.extend({ + api: 'API', + tutorials: 'Examples' +}, env.conf.templates.tabNames); + +tutorialsName = env.conf.templates.tabNames.tutorials; + +// Set default useCollapsibles true +env.conf.templates.useCollapsibles = env.conf.templates.useCollapsibles !== false; + +function find(spec) { + return helper.find(data, spec); +} + +function tutoriallink(tutorial) { + return helper.toTutorial(tutorial, null, { + tag: 'em', + classname: 'disabled', + prefix: 'Tutorial: ' + }); +} + +function getAncestorLinks(doclet) { + return helper.getAncestorLinks(data, doclet); +} + +function hashToLink(doclet, hash) { + var url; + + if ( !/^(#.+)/.test(hash) ) { + return hash; + } + + url = helper.createLink(doclet); + url = url.replace(/(#.+|$)/, hash); + + return '' + hash + ''; +} + +function needsSignature(doclet) { + var needsSig = false; + + // function and class definitions always get a signature + if (doclet.kind === 'function' || doclet.kind === 'class') { + needsSig = true; + } + // typedefs that contain functions get a signature, too + else if (doclet.kind === 'typedef' && doclet.type && doclet.type.names && + doclet.type.names.length) { + for (var i = 0, l = doclet.type.names.length; i < l; i++) { + if (doclet.type.names[i].toLowerCase() === 'function') { + needsSig = true; + break; + } + } + } + + return needsSig; +} + +function getSignatureAttributes(item) { + var attributes = []; + + if (item.optional) { + attributes.push('opt'); + } + + if (item.nullable === true) { + attributes.push('nullable'); + } + else if (item.nullable === false) { + attributes.push('non-null'); + } + + return attributes; +} + +function updateItemName(item) { + var attributes = getSignatureAttributes(item); + var itemName = item.name || ''; + + if (item.variable) { + itemName = '…' + itemName; + } + + if (attributes && attributes.length) { + itemName = util.format( '%s%s', itemName, + attributes.join(', ') ); + } + + return itemName; +} + +function addParamAttributes(params) { + return params.filter(function(param) { + return param.name && param.name.indexOf('.') === -1; + }).map(updateItemName); +} + +function buildItemTypeStrings(item) { + var types = []; + + if (item && item.type && item.type.names) { + item.type.names.forEach(function(name) { + types.push( linkto(name, htmlsafe(name)) ); + }); + } + + return types; +} + +function buildAttribsString(attribs) { + var attribsString = ''; + + if (attribs && attribs.length) { + attribsString = util.format( + '%s ', + attribs.join(', ') + ); + } + + return attribsString; +} + +function addNonParamAttributes(items) { + var types = []; + + items.forEach(function(item) { + types = types.concat( buildItemTypeStrings(item) ); + }); + + return types; +} + +function addSignatureParams(f) { + var params = f.params ? addParamAttributes(f.params) : []; + + f.signature = util.format( '%s(%s)', (f.signature || ''), params.join(', ') ); +} + +function addSignatureReturns(f) { + var attribs = []; + var attribsString = ''; + var returnTypes = []; + var returnTypesString = ''; + var source = f.yields || f.returns; + + // jam all the return-type attributes into an array. this could create odd results (for example, + // if there are both nullable and non-nullable return types), but let's assume that most people + // who use multiple @return tags aren't using Closure Compiler type annotations, and vice-versa. + if (source) { + source.forEach(function(item) { + helper.getAttribs(item).forEach(function(attrib) { + if (attribs.indexOf(attrib) === -1) { + attribs.push(attrib); + } + }); + }); + + attribsString = buildAttribsString(attribs); + } + + if (source) { + returnTypes = addNonParamAttributes(f.returns); + } + if (returnTypes.length) { + returnTypesString = util.format( ' → %s{%s}', attribsString, returnTypes.join('|') ); + } + + f.signature = '' + (f.signature || '') + '' + + '' + returnTypesString + ''; +} + +function addSignatureTypes(f) { + var types = f.type ? buildItemTypeStrings(f) : []; + + f.signature = (f.signature || '') + '' + + (types.length ? ' :' + types.join('|') : '') + ''; +} + +function addAttribs(f) { + var attribs = helper.getAttribs(f); + var attribsString = buildAttribsString(attribs); + + f.attribs = util.format('%s', attribsString); +} + +function shortenPaths(files, commonPrefix) { + Object.keys(files).forEach(function(file) { + files[file].shortened = files[file].resolved.replace(commonPrefix, '') + // always use forward slashes + .replace(/\\/g, '/'); + }); + + return files; +} + +function getPathFromDoclet(doclet) { + if (!doclet.meta) { + return null; + } + + return doclet.meta.path && doclet.meta.path !== 'null' ? + path.join(doclet.meta.path, doclet.meta.filename) : + doclet.meta.filename; +} + +function generate(title, docs, filename, resolveLinks) { + var docData; + var html; + var outpath; + + resolveLinks = resolveLinks === false ? false : true; + + docData = { + env: env, + isTutorial: false, + title: title, + docs: docs, + package: find({kind: 'package'})[0] + }; + + outpath = path.join(outdir, filename); + html = view.render('container.tmpl', docData); + + if (resolveLinks) { + html = helper.resolveLinks(html); // turn {@link foo} into foo + } + + fs.writeFileSync(outpath, html, 'utf8'); +} + +function generateSourceFiles(sourceFiles, encoding) { + encoding = encoding || 'utf8'; + Object.keys(sourceFiles).forEach(function(file) { + var source; + // links are keyed to the shortened path in each doclet's `meta.shortpath` property + var sourceOutfile = helper.getUniqueFilename(sourceFiles[file].shortened); + helper.registerLink(sourceFiles[file].shortened, sourceOutfile); + + try { + source = { + kind: 'source', + code: helper.htmlsafe( fs.readFileSync(sourceFiles[file].resolved, encoding) ) + }; + } + catch (e) { + logger.error('Error while generating source file %s: %s', file, e.message); + } + + generate('Source: ' + sourceFiles[file].shortened, [source], sourceOutfile, + false); + }); +} + +/** + * Look for classes or functions with the same name as modules (which indicates that the module + * exports only that class or function), then attach the classes or functions to the `module` + * property of the appropriate module doclets. The name of each class or function is also updated + * for display purposes. This function mutates the original arrays. + * + * @private + * @param {Array.} doclets - The array of classes and functions to + * check. + * @param {Array.} modules - The array of module doclets to search. + */ +function attachModuleSymbols(doclets, modules) { + var symbols = {}; + + // build a lookup table + doclets.forEach(function(symbol) { + symbols[symbol.longname] = symbols[symbol.longname] || []; + symbols[symbol.longname].push(symbol); + }); + + return modules.map(function(module) { + if (symbols[module.longname]) { + module.modules = symbols[module.longname] + // Only show symbols that have a description. Make an exception for classes, because + // we want to show the constructor-signature heading no matter what. + .filter(function(symbol) { + return symbol.description || symbol.kind === 'class'; + }) + .map(function(symbol) { + symbol = doop(symbol); + + if (symbol.kind === 'class' || symbol.kind === 'function') { + symbol.name = symbol.name.replace('module:', '(require("') + '"))'; + } + + return symbol; + }); + } + }); +} + +/** + * For lnb listing + * -- 'Classes' + * -- 'Namespaces' + * @param obj + */ +function buildSubNav(obj) { + var longname = obj.longname; + var members = find({ + kind: 'member', + memberof: longname + }); + var methods = find({ + kind: 'function', + memberof: longname + }); + var events = find({ + kind: 'event', + memberof: longname + }); + var typedef = find({ + kind: 'typedef', + memberof: longname + }); + + var html = ''; + + return html; +} + +function buildSubNavMembers(list, type) { + var html = ''; + + if (list.length) { + html += '
    ' + type + '
    '; + html += '
      '; + list.forEach(function(item) { + html += '
    • ' + linkto(item.longname, item.name) + '
    • '; + }); + html += '
    '; + } + + return html; +} + +function buildMemberNav(items, itemHeading, itemsSeen, linktoFn) { + var nav = ''; + + if (items.length) { + var itemsNav = ''; + var className = itemHeading === tutorialsName ? 'lnb-examples hidden' : 'lnb-api hidden'; + var makeHtml = env.conf.templates.useCollapsibles ? makeCollapsibleItemHtmlInNav : makeItemHtmlInNav; + + items.forEach(function(item) { + var linkHtml; + + if ( !hasOwnProp.call(item, 'longname') ) { + itemsNav += '
  • ' + linktoFn('', item.name) + buildSubNav(item) + '
  • '; + } + else if ( !hasOwnProp.call(itemsSeen, item.longname) ) { + var displayName; + if (env.conf.templates.default.useLongnameInNav || item.kind === 'namespace') { + displayName = item.longname; + } else { + displayName = item.name; + } + + linkHtml = linktoFn(item.longname, displayName.replace(/\b(module|event):/g, '')); + itemsNav += makeHtml(item, linkHtml); + } + + itemsSeen[item.longname] = true; + }); + + if (itemsNav !== '') { + nav += '

    ' + itemHeading + '

      ' + itemsNav + '
    '; + } + } + + return nav; +} + +function makeItemHtmlInNav(item, linkHtml) { + return '
  • ' + + linkHtml + + buildSubNav(item) + + '
  • '; +} + +function makeCollapsibleItemHtmlInNav(item, linkHtml) { + return '
  • ' + + linkHtml + + '' + + buildSubNav(item) + + '
  • '; +} + +function linktoTutorial(longName, name) { + return tutoriallink(name); +} + +function linktoExternal(longName, name) { + return linkto(longName, name.replace(/(^"|"$)/g, '')); +} + +/** + * Create the navigation sidebar. + * @param {object} members The members that will be used to create the sidebar. + * @param {array} members.classes + * @param {array} members.externals + * @param {array} members.globals + * @param {array} members.mixins + * @param {array} members.modules + * @param {array} members.namespaces + * @param {array} members.tutorials + * @param {array} members.events + * @param {array} members.interfaces + * @return {string} The HTML for the navigation sidebar. + */ +function buildNav(members) { + var nav = ''; + var seen = {}; + var seenTutorials = {}; + + nav += buildMemberNav(members.tutorials, tutorialsName, seenTutorials, linktoTutorial, true); + nav += buildMemberNav(members.modules, 'Modules', {}, linkto); + nav += buildMemberNav(members.externals, 'Externals', seen, linktoExternal); + nav += buildMemberNav(members.classes, 'Classes', seen, linkto); + nav += buildMemberNav(members.namespaces, 'Namespaces', seen, linkto); + nav += buildMemberNav(members.mixins, 'Mixins', seen, linkto); + nav += buildMemberNav(members.interfaces, 'Interfaces', seen, linkto); + + if (members.globals.length) { + var globalNav = ''; + var useGlobalTitleLink = true; + + members.globals.forEach(function(g) { + if ( !hasOwnProp.call(seen, g.longname) ) { + // tuidoc + // - Add global-typedef in hidden to search api. + // - Default template did not add this. + if (g.kind === 'typedef') { + globalNav += ''; + } else { + globalNav += '
  • ' + linkto(g.longname, g.name) + '
  • '; + useGlobalTitleLink = false; + } + } + + seen[g.longname] = true; + }); + + if (useGlobalTitleLink) { + // turn the heading into a link so you can actually get to the global page + nav += ''; + } + else { + nav += ''; + } + } + + return nav; +} + +/** + * Look ma, it's cp -R. + * @param {string} src The path to the thing to copy. + * @param {string} dest The path to the new copy. + */ +var copyRecursiveSync = function(src, dest) { + var contents, + srcExists = fs.existsSync(src), + destExists = fs.existsSync(dest), + stats = srcExists && fs.statSync(src), + isDirectory = srcExists && stats.isDirectory(); + + if (srcExists) { + if (isDirectory) { + if (!destExists) { + fs.mkdirSync(dest); + } + fs.readdirSync(src).forEach(function(childItemName) { + copyRecursiveSync(path.join(src, childItemName), + path.join(dest, childItemName)); + }); + } else { + contents = fs.readFileSync(src); + fs.writeFileSync(dest, contents); + } + } +}; + +/** + @param {TAFFY} taffyData See . + @param {object} opts + @param {Tutorial} tutorials + */ +exports.publish = function(taffyData, opts, tutorials) { + data = taffyData; + + var conf = env.conf.templates || {}; + conf.default = conf.default || {}; + + var templatePath = path.normalize(opts.template); + view = new template.Template( path.join(templatePath, 'tmpl') ); + + // claim some special filenames in advance, so the All-Powerful Overseer of Filename Uniqueness + // doesn't try to hand them out later + var indexUrl = helper.getUniqueFilename('index'); + // don't call registerLink() on this one! 'index' is also a valid longname + + var globalUrl = helper.getUniqueFilename('global'); + helper.registerLink('global', globalUrl); + + // set up templating + view.layout = conf.default.layoutFile ? + path.getResourcePath(path.dirname(conf.default.layoutFile), + path.basename(conf.default.layoutFile) ) : + 'layout.tmpl'; + + // set up tutorials for helper + helper.setTutorials(tutorials); + + data = helper.prune(data); + data.sort('longname, version, since'); + helper.addEventListeners(data); + + var sourceFiles = {}; + var sourceFilePaths = []; + data().each(function(doclet) { + doclet.attribs = ''; + + if (doclet.examples) { + doclet.examples = doclet.examples.map(function(example) { + var caption, code; + + if (example.match(/^\s*
    ]","i"),Et=/^(?:checkbox|radio)$/,St=/checked\s*(?:[^=]|=\s*.checked.)/i,xt=/\/(java|ecma)script/i,Tt=/^\s*\s*$/g,Nt={option:[1,""],legend:[1,"
    ","
    "],thead:[1,"
    ([\s\S]+?)<\/caption>(\s*[\n\r])([\s\S]+)$/i)) { + caption = RegExp.$1; + code = RegExp.$3; + } + + return { + caption: caption || '', + code: code || example + }; + }); + } + if (doclet.see) { + doclet.see.forEach(function(seeItem, i) { + doclet.see[i] = hashToLink(doclet, seeItem); + }); + } + + // build a list of source files + var sourcePath; + if (doclet.meta) { + sourcePath = getPathFromDoclet(doclet); + sourceFiles[sourcePath] = { + resolved: sourcePath, + shortened: null + }; + if (sourceFilePaths.indexOf(sourcePath) === -1) { + sourceFilePaths.push(sourcePath); + } + } + }); + + fs.mkPath(outdir); + + // copy the template's static files to outdir + var fromDir = path.join(templatePath, 'static'); + var staticFiles = fs.ls(fromDir, 3); + + staticFiles.forEach(function(fileName) { + var toDir = fs.toDir( fileName.replace(fromDir, outdir) ); + fs.mkPath(toDir); + fs.copyFileSync(fileName, toDir); + }); + + // copy user-specified static files to outdir + var staticFilePaths; + var staticFileFilter; + var staticFileScanner; + if (conf.default.staticFiles) { + // The canonical property name is `include`. We accept `paths` for backwards compatibility + // with a bug in JSDoc 3.2.x. + staticFilePaths = conf.default.staticFiles.include || + conf.default.staticFiles.paths || + []; + staticFileFilter = new (require('jsdoc/src/filter')).Filter(conf.default.staticFiles); + staticFileScanner = new (require('jsdoc/src/scanner')).Scanner(); + + staticFilePaths.forEach(function(filePath) { + var extraStaticFiles; + + filePath = path.resolve(env.pwd, filePath); + extraStaticFiles = staticFileScanner.scan([filePath], 10, staticFileFilter); + + extraStaticFiles.forEach(function(fileName) { + var sourcePath = fs.toDir(filePath); + var toDir = fs.toDir( fileName.replace(sourcePath, outdir) ); + fs.mkPath(toDir); + fs.copyFileSync(fileName, toDir); + }); + }); + } + + if (sourceFilePaths.length) { + sourceFiles = shortenPaths( sourceFiles, path.commonPrefix(sourceFilePaths) ); + } + data().each(function(doclet) { + var url = helper.createLink(doclet); + helper.registerLink(doclet.longname, url); + + // add a shortened version of the full path + var docletPath; + if (doclet.meta) { + docletPath = getPathFromDoclet(doclet); + docletPath = sourceFiles[docletPath].shortened; + if (docletPath) { + doclet.meta.shortpath = docletPath; + } + } + }); + + data().each(function(doclet) { + var url = helper.longnameToUrl[doclet.longname]; + + if (url.indexOf('#') > -1) { + doclet.id = helper.longnameToUrl[doclet.longname].split(/#/).pop(); + } + else { + doclet.id = doclet.name; + } + + if ( needsSignature(doclet) ) { + addSignatureParams(doclet); + addSignatureReturns(doclet); + addAttribs(doclet); + } + }); + + // do this after the urls have all been generated + data().each(function(doclet) { + doclet.ancestors = getAncestorLinks(doclet); + + if (doclet.kind === 'member') { + addSignatureTypes(doclet); + addAttribs(doclet); + } + + if (doclet.kind === 'constant') { + addSignatureTypes(doclet); + addAttribs(doclet); + doclet.kind = 'member'; + } + }); + + var members = helper.getMembers(data); + + members.tutorials = tutorials.children; + + // output pretty-printed source files by default + var outputSourceFiles = conf.default && conf.default.outputSourceFiles !== false ? true : + false; + + // add template helpers + view.find = find; + view.linkto = linkto; + view.resolveAuthorLinks = resolveAuthorLinks; + view.tutoriallink = tutoriallink; + view.htmlsafe = htmlsafe; + view.outputSourceFiles = outputSourceFiles; + + // once for all + view.nav = buildNav(members); + + attachModuleSymbols( find({ longname: {left: 'module:'} }), members.modules ); + + // generate the pretty-printed source files first so other pages can link to them + if (outputSourceFiles) { + generateSourceFiles(sourceFiles, opts.encoding); + } + + if (members.globals.length) { generate('Global', [{kind: 'globalobj'}], globalUrl); } + + // index page displays information from package.json + var packages = find({kind: 'package'}); + + generate('Home', + packages.concat( + [{kind: 'mainpage', readme: opts.readme, longname: (opts.mainpagetitle) ? opts.mainpagetitle : 'Main Page'}] + ), + indexUrl); + + // set up the lists that we'll use to generate pages + var classes = taffy(members.classes); + var modules = taffy(members.modules); + var namespaces = taffy(members.namespaces); + var mixins = taffy(members.mixins); + var externals = taffy(members.externals); + var interfaces = taffy(members.interfaces); + + Object.keys(helper.longnameToUrl).forEach(function(longname) { + var myModules = helper.find(modules, {longname: longname}); + if (myModules.length) { + generate('Module: ' + myModules[0].name, myModules, helper.longnameToUrl[longname]); + } + + var myClasses = helper.find(classes, {longname: longname}); + if (myClasses.length) { + generate('Class: ' + myClasses[0].name, myClasses, helper.longnameToUrl[longname]); + } + + var myNamespaces = helper.find(namespaces, {longname: longname}); + if (myNamespaces.length) { + generate('Namespace: ' + myNamespaces[0].name, myNamespaces, helper.longnameToUrl[longname]); + } + + var myMixins = helper.find(mixins, {longname: longname}); + if (myMixins.length) { + generate('Mixin: ' + myMixins[0].name, myMixins, helper.longnameToUrl[longname]); + } + + var myExternals = helper.find(externals, {longname: longname}); + if (myExternals.length) { + generate('External: ' + myExternals[0].name, myExternals, helper.longnameToUrl[longname]); + } + + var myInterfaces = helper.find(interfaces, {longname: longname}); + if (myInterfaces.length) { + generate('Interface: ' + myInterfaces[0].name, myInterfaces, helper.longnameToUrl[longname]); + } + }); + + if (env.opts.tutorials) { + copyRecursiveSync(env.opts.tutorials, outdir + '/tutorials'); + } + + // TODO: move the tutorial functions to templateHelper.js + function generateTutorial(title, tutorial, fileName, originalFileName, isHtmlTutorial) { + var tutorialData = { + docs: null, // If there is no "docs" prop, Erros in layout.tmpl. (For left-nav member listing control) + isTutorial: true, + env: env, + title: title, + header: tutorial.title, + children: tutorial.children, + isHtmlTutorial: isHtmlTutorial, + package: find({kind: 'package'})[0] + }; + + if (isHtmlTutorial) { + _.extend(tutorialData, generateHtmlTutorialData(tutorial, fileName, originalFileName)); + } else { + tutorialData.content = tutorial.parse(); + } + + var tutorialPath = path.join(outdir, fileName), + html = view.render('tutorial.tmpl', tutorialData); + + // yes, you can use {@link} in tutorials too! + html = helper.resolveLinks(html); // turn {@link foo} into foo + + fs.writeFileSync(tutorialPath, html, 'utf8'); + } + + function generateHtmlTutorialData(tutorial, filename, originalFileName) { + var $ = cheerio.load(tutorial.parse(), { + decodeEntities: false, + normalizeWhitespace: false + }); + + return { + codeHtml: htmlsafe($('div.code-html').html() || ''), + codeJs: htmlsafe($('script.code-js').html() || ''), + originalFileName: originalFileName + }; + } + + // tutorials can have only one parent so there is no risk for loops + function saveChildren(node) { + node.children.forEach(function(child) { + var originalFileName = child.name; + var isHtmlTutorial = child.type === tutorial.TYPES.HTML; + var title = 'Tutorial: ' + child.title; + var fileName = helper.tutorialToUrl(child.name); + + generateTutorial(title, child, fileName, originalFileName, isHtmlTutorial); + saveChildren(child); + }); + } + saveChildren(tutorials); +}; diff --git a/docs/jsdoc-template/static/fonts/glyphicons-halflings-regular.eot b/docs/jsdoc-template/static/fonts/glyphicons-halflings-regular.eot new file mode 100644 index 0000000000000000000000000000000000000000..b93a4953fff68df523aa7656497ee339d6026d64 GIT binary patch literal 20127 zcma%hV{j!vx9y2-`@~L8?1^pLwlPU2wr$&<*tR|KBoo`2;LUg6eW-eW-tKDb)vH%` z^`A!Vd<6hNSRMcX|Cb;E|1qflDggj6Kmr)xA10^t-vIc3*Z+F{r%|K(GyE^?|I{=9 zNq`(c8=wS`0!RZy0g3{M(8^tv41d}oRU?8#IBFtJy*9zAN5dcxqGlMZGL>GG%R#)4J zDJ2;)4*E1pyHia%>lMv3X7Q`UoFyoB@|xvh^)kOE3)IL&0(G&i;g08s>c%~pHkN&6 z($7!kyv|A2DsV2mq-5Ku)D#$Kn$CzqD-wm5Q*OtEOEZe^&T$xIb0NUL}$)W)Ck`6oter6KcQG9Zcy>lXip)%e&!lQgtQ*N`#abOlytt!&i3fo)cKV zP0BWmLxS1gQv(r_r|?9>rR0ZeEJPx;Vi|h1!Eo*dohr&^lJgqJZns>&vexP@fs zkPv93Nyw$-kM5Mw^{@wPU47Y1dSkiHyl3dtHLwV&6Tm1iv{ve;sYA}Z&kmH802s9Z zyJEn+cfl7yFu#1^#DbtP7k&aR06|n{LnYFYEphKd@dJEq@)s#S)UA&8VJY@S2+{~> z(4?M();zvayyd^j`@4>xCqH|Au>Sfzb$mEOcD7e4z8pPVRTiMUWiw;|gXHw7LS#U< zsT(}Z5SJ)CRMXloh$qPnK77w_)ctHmgh}QAe<2S{DU^`!uwptCoq!Owz$u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Xc5Cfz@43PjBMBoH@z_{~( z(Wd}IPJ9hH+%)Fc)0!hrV+(A;76rhtI|YHbEDeERV~Ya>SQg^IvlazFkSK(KG9&{q zkPIR~EeQaaBmwA<20}mBO?)N$(z1@p)5?%}rM| zGF()~Z&Kx@OIDRI$d0T8;JX@vj3^2%pd_+@l9~a4lntZ;AvUIjqIZbuNTR6@hNJoV zk4F;ut)LN4ARuyn2M6F~eg-e#UH%2P;8uPGFW^vq1vj8mdIayFOZo(tphk8C7hpT~ z1Fv8?b_LNR3QD9J+!v=p%}# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/jsdoc-template/static/fonts/glyphicons-halflings-regular.ttf b/docs/jsdoc-template/static/fonts/glyphicons-halflings-regular.ttf new file mode 100644 index 0000000000000000000000000000000000000000..1413fc609ab6f21774de0cb7e01360095584f65b GIT binary patch literal 45404 zcmd?Sd0-pWwLh*qi$?oCk~i6sWlOeWJC3|4juU5JNSu9hSVACzERcmjLV&P^utNzg zIE4Kr1=5g!SxTX#Ern9_%4&01rlrW`Z!56xXTGQR4C z3vR~wXq>NDx$c~e?;ia3YjJ*$!C>69a?2$lLyhpI!CFfJsP=|`8@K0|bbMpWwVUEygg0=0x_)HeHpGSJagJNLA3c!$EuOV>j$wi! zbo{vZ(s8tl>@!?}dmNHXo)ABy7ohD7_1G-P@SdJWT8*oeyBVYVW9*vn}&VI4q++W;Z+uz=QTK}^C75!`aFYCX# zf7fC2;o`%!huaTN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?vZ!{_l|d^8Yh)eEBh*5ABh+Lzjw+?V)o z#P-W7361>E(Y4;@`sv;VKn G`u_lkUM?>H literal 0 HcmV?d00001 diff --git a/docs/jsdoc-template/static/fonts/glyphicons-halflings-regular.woff2 b/docs/jsdoc-template/static/fonts/glyphicons-halflings-regular.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..64539b54c3751a6d9adb44c8e3a45ba5a73b77f0 GIT binary patch literal 18028 zcmV(~K+nH-Pew8T0RR9107h&84*&oF0I^&E07eM_0Rl|`00000000000000000000 z0000#Mn+Uk92y`7U;vDA2m}!b3WBL5f#qcZHUcCAhI9*rFaQJ~1&1OBl~F%;WnyLq z8)b|&?3j;$^FW}&KmNW53flIFARDZ7_Wz%hpoWaWlgHTHEHf()GI0&dMi#DFPaEt6 zCO)z0v0~C~q&0zBj^;=tv8q{$8JxX)>_`b}WQGgXi46R*CHJ}6r+;}OrvwA{_SY+o zK)H-vy{l!P`+NG*`*x6^PGgHH4!dsolgU4RKj@I8Xz~F6o?quCX&=VQ$Q{w01;M0? zKe|5r<_7CD z=eO3*x!r$aX2iFh3;}xNfx0v;SwBfGG+@Z;->HhvqfF4r__4$mU>Dl_1w;-9`~5rF~@!3;r~xP-hZvOfOx)A z#>8O3N{L{naf215f>m=bzbp7_(ssu&cx)Qo-{)!)Yz3A@Z0uZaM2yJ8#OGlzm?JO5gbrj~@)NB4@?>KE(K-$w}{};@dKY#K3+Vi64S<@!Z{(I{7l=!p9 z&kjG^P~0f46i13(w!hEDJga;*Eb z`!n|++@H8VaKG<9>VDh(y89J#=;Z$ei=GnD5TesW#|Wf)^D+9NKN4J3H5PF_t=V+Z zdeo8*h9+8&Zfc?>>1|E4B7MAx)^uy$L>szyXre7W|81fjy+RZ1>Gd}@@${~PCOXo) z$#HZd3)V3@lNGG%(3PyIbvyJTOJAWcN@Uh!FqUkx^&BuAvc)G}0~SKI`8ZZXw$*xP zum-ZdtPciTAUn$XWb6vrS=JX~f5?M%9S(=QsdYP?K%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Ej-8vM?DM-1?J_*&PntI3E96M!`WL#<&Z5n2u zo`P!~vBT$YOT~gU9#PB)%JZ zcd_u=m^LYzC!pH#W`yA1!(fA;D~b zG#73@l)NNd;n#XrKXZEfab;@kQRnOFU2Th-1m<4mJzlj9b3pv-GF$elX7ib9!uILM_$ke zHIGB*&=5=;ynQA{y7H93%i^d)T}y@(p>8vVhJ4L)M{0Q*@D^+SPp`EW+G6E%+`Z;u zS3goV@Dic7vc5`?!pCN44Ts@*{)zwy)9?B||AM{zKlN4T}qQRL2 zgv+{K8bv7w)#xge16;kI1fU87!W4pX)N&|cq8&i^1r`W|Hg4366r(?-ecEJ9u&Eaw zrhyikXQB>C9d>cpPGiu=VU3Z-u4|0V_iap!_J3o+K_R5EXk@sfu~zHwwYkpncVh!R zqNe7Cmf_|Wmeq4#(mIO&(wCK@b4(x0?W1Qtk(`$?+$uCJCGZm_%k?l32vuShgDFMa ztc`{$8DhB9)&?~(m&EUc=LzI1=qo#zjy#2{hLT_*aj<618qQ7mD#k2ZFGou&69;=2 z1j7=Su8k}{L*h&mfs7jg^PN&9C1Z@U!p6gXk&-7xM~{X`nqH#aGO`;Xy_zbz^rYacIq0AH%4!Oh93TzJ820%ur)8OyeS@K?sF1V(iFO z37Nnqj1z#1{|v7=_CX`lQA|$<1gtuNMHGNJYp1D_k;WQk-b+T6VmUK(x=bWviOZ~T z|4e%SpuaWLWD?qN2%`S*`P;BQBw(B__wTD6epvGdJ+>DBq2oVlf&F*lz+#avb4)3P1c^Mf#olQheVvZ|Z5 z>xXfgmv!5Z^SYn+_x}K5B%G^sRwiez&z9|f!E!#oJlT2kCOV0000$L_|bHBqAarB4TD{W@grX1CUr72@caw0faEd7-K|4L_|cawbojjHdpd6 zI6~Iv5J?-Q4*&oF000000FV;^004t70Z6Qk1Xl{X9oJ{sRC2(cs?- literal 0 HcmV?d00001 diff --git a/docs/jsdoc-template/static/img/red5pro_logo.png b/docs/jsdoc-template/static/img/red5pro_logo.png new file mode 100644 index 0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axv+G)d#Z={r$;Jf) zh6WA1Ow;=`RdsQNtFF`mdzbnv^+x;y4$|eNgt-yU2;!3AwC*%s-%NkYAMfTOFwp6C zHH2k?Z;d7G=Cr)TslCh619ka^sgrtAa9PAY-=1he9ZUhwKs#!j>MC8GxJH`S1{Y}v zvF=0===n})}function lt(e){var t=ct.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function At(e,t){if(t.nodeType!==1||!v.hasData(e))return;var n,r,i,s=v._data(e),o=v._data(t,s),u=s.events;if(u){delete o.handle,o.events={};for(n in u)for(r=0,i=u[n].length;r").appendTo(i.body),n=t.css("display");t.remove();if(n==="none"||n===""){Pt=i.body.appendChild(Pt||v.extend(i.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!Ht||!Pt.createElement)Ht=(Pt.contentWindow||Pt.contentDocument).document,Ht.write(""),Ht.close();t=Ht.body.appendChild(Ht.createElement(e)),n=Dt(t,"display"),i.body.removeChild(Pt)}return Wt[e]=n,n}function fn(e,t,n,r){var i;if(v.isArray(t))v.each(t,function(t,i){n||sn.test(e)?r(e,i):fn(e+"["+(typeof i=="object"?t:"")+"]",i,n,r)});else if(!n&&v.type(t)==="object")for(i in t)fn(e+"["+i+"]",t[i],n,r);else r(e,t)}function Cn(e){return function(t,n){typeof t!="string"&&(n=t,t="*");var r,i,s,o=t.toLowerCase().split(y),u=0,a=o.length;if(v.isFunction(n))for(;u)[^>]*$|#([\w\-]*)$)/,E=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,S=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,T=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,N=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,C=/^-ms-/,k=/-([\da-z])/gi,L=function(e,t){return(t+"").toUpperCase()},A=function(){i.addEventListener?(i.removeEventListener("DOMContentLoaded",A,!1),v.ready()):i.readyState==="complete"&&(i.detachEvent("onreadystatechange",A),v.ready())},O={};v.fn=v.prototype={constructor:v,init:function(e,n,r){var s,o,u,a;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if(typeof e=="string"){e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3?s=[null,e,null]:s=w.exec(e);if(s&&(s[1]||!n)){if(s[1])return n=n instanceof v?n[0]:n,a=n&&n.nodeType?n.ownerDocument||n:i,e=v.parseHTML(s[1],a,!0),E.test(s[1])&&v.isPlainObject(n)&&this.attr.call(e,n,!0),v.merge(this,e);o=i.getElementById(s[2]);if(o&&o.parentNode){if(o.id!==s[2])return r.find(e);this.length=1,this[0]=o}return this.context=i,this.selector=e,this}return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e)}return v.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),v.makeArray(e,this))},selector:"",jquery:"1.8.3",length:0,size:function(){return this.length},toArray:function(){return l.call(this)},get:function(e){return e==null?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=v.merge(this.constructor(),e);return r.prevObject=this,r.context=this.context,t==="find"?r.selector=this.selector+(this.selector?" ":"")+n:t&&(r.selector=this.selector+"."+t+"("+n+")"),r},each:function(e,t){return v.each(this,e,t)},ready:function(e){return v.ready.promise().done(e),this},eq:function(e){return e=+e,e===-1?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(l.apply(this,arguments),"slice",l.call(arguments).join(","))},map:function(e){return this.pushStack(v.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:[].sort,splice:[].splice},v.fn.init.prototype=v.fn,v.extend=v.fn.extend=function(){var e,n,r,i,s,o,u=arguments[0]||{},a=1,f=arguments.length,l=!1;typeof u=="boolean"&&(l=u,u=arguments[1]||{},a=2),typeof u!="object"&&!v.isFunction(u)&&(u={}),f===a&&(u=this,--a);for(;a0)return;r.resolveWith(i,[v]),v.fn.trigger&&v(i).trigger("ready").off("ready")},isFunction:function(e){return v.type(e)==="function"},isArray:Array.isArray||function(e){return v.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return e==null?String(e):O[h.call(e)]||"object"},isPlainObject:function(e){if(!e||v.type(e)!=="object"||e.nodeType||v.isWindow(e))return!1;try{if(e.constructor&&!p.call(e,"constructor")&&!p.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||p.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){var r;return!e||typeof e!="string"?null:(typeof t=="boolean"&&(n=t,t=0),t=t||i,(r=E.exec(e))?[t.createElement(r[1])]:(r=v.buildFragment([e],t,n?null:[]),v.merge([],(r.cacheable?v.clone(r.fragment):r.fragment).childNodes)))},parseJSON:function(t){if(!t||typeof t!="string")return null;t=v.trim(t);if(e.JSON&&e.JSON.parse)return e.JSON.parse(t);if(S.test(t.replace(T,"@").replace(N,"]").replace(x,"")))return(new Function("return "+t))();v.error("Invalid JSON: "+t)},parseXML:function(n){var r,i;if(!n||typeof n!="string")return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(s){r=t}return(!r||!r.documentElement||r.getElementsByTagName("parsererror").length)&&v.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&g.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(C,"ms-").replace(k,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,n,r){var i,s=0,o=e.length,u=o===t||v.isFunction(e);if(r){if(u){for(i in e)if(n.apply(e[i],r)===!1)break}else for(;s0&&e[0]&&e[a-1]||a===0||v.isArray(e));if(f)for(;u-1)a.splice(n,1),i&&(n<=o&&o--,n<=u&&u--)}),this},has:function(e){return v.inArray(e,a)>-1},empty:function(){return a=[],this},disable:function(){return a=f=n=t,this},disabled:function(){return!a},lock:function(){return f=t,n||c.disable(),this},locked:function(){return!f},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],a&&(!r||f)&&(i?f.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},v.extend({Deferred:function(e){var t=[["resolve","done",v.Callbacks("once memory"),"resolved"],["reject","fail",v.Callbacks("once memory"),"rejected"],["notify","progress",v.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return v.Deferred(function(n){v.each(t,function(t,r){var s=r[0],o=e[t];i[r[1]](v.isFunction(o)?function(){var e=o.apply(this,arguments);e&&v.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===i?n:this,[e])}:n[s])}),e=null}).promise()},promise:function(e){return e!=null?v.extend(e,r):r}},i={};return r.pipe=r.then,v.each(t,function(e,s){var o=s[2],u=s[3];r[s[1]]=o.add,u&&o.add(function(){n=u},t[e^1][2].disable,t[2][2].lock),i[s[0]]=o.fire,i[s[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=l.call(arguments),r=n.length,i=r!==1||e&&v.isFunction(e.promise)?r:0,s=i===1?e:v.Deferred(),o=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?l.call(arguments):r,n===u?s.notifyWith(t,n):--i||s.resolveWith(t,n)}},u,a,f;if(r>1){u=new Array(r),a=new Array(r),f=new Array(r);for(;t
    a",n=p.getElementsByTagName("*"),r=p.getElementsByTagName("a")[0];if(!n||!r||!n.length)return{};s=i.createElement("select"),o=s.appendChild(i.createElement("option")),u=p.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:r.getAttribute("href")==="/a",opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:u.value==="on",optSelected:o.selected,getSetAttribute:p.className!=="t",enctype:!!i.createElement("form").enctype,html5Clone:i.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",boxModel:i.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},u.checked=!0,t.noCloneChecked=u.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!o.disabled;try{delete p.test}catch(d){t.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",h=function(){t.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick"),p.detachEvent("onclick",h)),u=i.createElement("input"),u.value="t",u.setAttribute("type","radio"),t.radioValue=u.value==="t",u.setAttribute("checked","checked"),u.setAttribute("name","t"),p.appendChild(u),a=i.createDocumentFragment(),a.appendChild(p.lastChild),t.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=u.checked,a.removeChild(u),a.appendChild(p);if(p.attachEvent)for(l in{submit:!0,change:!0,focusin:!0})f="on"+l,c=f in p,c||(p.setAttribute(f,"return;"),c=typeof p[f]=="function"),t[l+"Bubbles"]=c;return v(function(){var n,r,s,o,u="padding:0;margin:0;border:0;display:block;overflow:hidden;",a=i.getElementsByTagName("body")[0];if(!a)return;n=i.createElement("div"),n.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",a.insertBefore(n,a.firstChild),r=i.createElement("div"),n.appendChild(r),r.innerHTML="
    t
    ",s=r.getElementsByTagName("td"),s[0].style.cssText="padding:0;margin:0;border:0;display:none",c=s[0].offsetHeight===0,s[0].style.display="",s[1].style.display="none",t.reliableHiddenOffsets=c&&s[0].offsetHeight===0,r.innerHTML="",r.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=r.offsetWidth===4,t.doesNotIncludeMarginInBodyOffset=a.offsetTop!==1,e.getComputedStyle&&(t.pixelPosition=(e.getComputedStyle(r,null)||{}).top!=="1%",t.boxSizingReliable=(e.getComputedStyle(r,null)||{width:"4px"}).width==="4px",o=i.createElement("div"),o.style.cssText=r.style.cssText=u,o.style.marginRight=o.style.width="0",r.style.width="1px",r.appendChild(o),t.reliableMarginRight=!parseFloat((e.getComputedStyle(o,null)||{}).marginRight)),typeof r.style.zoom!="undefined"&&(r.innerHTML="",r.style.cssText=u+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=r.offsetWidth===3,r.style.display="block",r.style.overflow="visible",r.innerHTML="
    ",r.firstChild.style.width="5px",t.shrinkWrapBlocks=r.offsetWidth!==3,n.style.zoom=1),a.removeChild(n),n=r=s=o=null}),a.removeChild(p),n=r=s=o=u=a=p=null,t}();var D=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;v.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(v.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?v.cache[e[v.expando]]:e[v.expando],!!e&&!B(e)},data:function(e,n,r,i){if(!v.acceptData(e))return;var s,o,u=v.expando,a=typeof n=="string",f=e.nodeType,l=f?v.cache:e,c=f?e[u]:e[u]&&u;if((!c||!l[c]||!i&&!l[c].data)&&a&&r===t)return;c||(f?e[u]=c=v.deletedIds.pop()||v.guid++:c=u),l[c]||(l[c]={},f||(l[c].toJSON=v.noop));if(typeof n=="object"||typeof n=="function")i?l[c]=v.extend(l[c],n):l[c].data=v.extend(l[c].data,n);return s=l[c],i||(s.data||(s.data={}),s=s.data),r!==t&&(s[v.camelCase(n)]=r),a?(o=s[n],o==null&&(o=s[v.camelCase(n)])):o=s,o},removeData:function(e,t,n){if(!v.acceptData(e))return;var r,i,s,o=e.nodeType,u=o?v.cache:e,a=o?e[v.expando]:v.expando;if(!u[a])return;if(t){r=n?u[a]:u[a].data;if(r){v.isArray(t)||(t in r?t=[t]:(t=v.camelCase(t),t in r?t=[t]:t=t.split(" ")));for(i=0,s=t.length;i1,null,!1))},removeData:function(e){return this.each(function(){v.removeData(this,e)})}}),v.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=v._data(e,t),n&&(!r||v.isArray(n)?r=v._data(e,t,v.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=v.queue(e,t),r=n.length,i=n.shift(),s=v._queueHooks(e,t),o=function(){v.dequeue(e,t)};i==="inprogress"&&(i=n.shift(),r--),i&&(t==="fx"&&n.unshift("inprogress"),delete s.stop,i.call(e,o,s)),!r&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return v._data(e,n)||v._data(e,n,{empty:v.Callbacks("once memory").add(function(){v.removeData(e,t+"queue",!0),v.removeData(e,n,!0)})})}}),v.fn.extend({queue:function(e,n){var r=2;return typeof e!="string"&&(n=e,e="fx",r--),arguments.length1)},removeAttr:function(e){return this.each(function(){v.removeAttr(this,e)})},prop:function(e,t){return v.access(this,v.prop,e,t,arguments.length>1)},removeProp:function(e){return e=v.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,s,o,u;if(v.isFunction(e))return this.each(function(t){v(this).addClass(e.call(this,t,this.className))});if(e&&typeof e=="string"){t=e.split(y);for(n=0,r=this.length;n=0)r=r.replace(" "+n[s]+" "," ");i.className=e?v.trim(r):""}}}return this},toggleClass:function(e,t){var n=typeof e,r=typeof t=="boolean";return v.isFunction(e)?this.each(function(n){v(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if(n==="string"){var i,s=0,o=v(this),u=t,a=e.split(y);while(i=a[s++])u=r?u:!o.hasClass(i),o[u?"addClass":"removeClass"](i)}else if(n==="undefined"||n==="boolean")this.className&&v._data(this,"__className__",this.className),this.className=this.className||e===!1?"":v._data(this,"__className__")||""})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;n=0)return!0;return!1},val:function(e){var n,r,i,s=this[0];if(!arguments.length){if(s)return n=v.valHooks[s.type]||v.valHooks[s.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(s,"value"))!==t?r:(r=s.value,typeof r=="string"?r.replace(R,""):r==null?"":r);return}return i=v.isFunction(e),this.each(function(r){var s,o=v(this);if(this.nodeType!==1)return;i?s=e.call(this,r,o.val()):s=e,s==null?s="":typeof s=="number"?s+="":v.isArray(s)&&(s=v.map(s,function(e){return e==null?"":e+""})),n=v.valHooks[this.type]||v.valHooks[this.nodeName.toLowerCase()];if(!n||!("set"in n)||n.set(this,s,"value")===t)this.value=s})}}),v.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,s=e.type==="select-one"||i<0,o=s?null:[],u=s?i+1:r.length,a=i<0?u:s?i:0;for(;a=0}),n.length||(e.selectedIndex=-1),n}}},attrFn:{},attr:function(e,n,r,i){var s,o,u,a=e.nodeType;if(!e||a===3||a===8||a===2)return;if(i&&v.isFunction(v.fn[n]))return v(e)[n](r);if(typeof e.getAttribute=="undefined")return v.prop(e,n,r);u=a!==1||!v.isXMLDoc(e),u&&(n=n.toLowerCase(),o=v.attrHooks[n]||(X.test(n)?F:j));if(r!==t){if(r===null){v.removeAttr(e,n);return}return o&&"set"in o&&u&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r)}return o&&"get"in o&&u&&(s=o.get(e,n))!==null?s:(s=e.getAttribute(n),s===null?t:s)},removeAttr:function(e,t){var n,r,i,s,o=0;if(t&&e.nodeType===1){r=t.split(y);for(;o=0}})});var $=/^(?:textarea|input|select)$/i,J=/^([^\.]*|)(?:\.(.+)|)$/,K=/(?:^|\s)hover(\.\S+|)\b/,Q=/^key/,G=/^(?:mouse|contextmenu)|click/,Y=/^(?:focusinfocus|focusoutblur)$/,Z=function(e){return v.event.special.hover?e:e.replace(K,"mouseenter$1 mouseleave$1")};v.event={add:function(e,n,r,i,s){var o,u,a,f,l,c,h,p,d,m,g;if(e.nodeType===3||e.nodeType===8||!n||!r||!(o=v._data(e)))return;r.handler&&(d=r,r=d.handler,s=d.selector),r.guid||(r.guid=v.guid++),a=o.events,a||(o.events=a={}),u=o.handle,u||(o.handle=u=function(e){return typeof v=="undefined"||!!e&&v.event.triggered===e.type?t:v.event.dispatch.apply(u.elem,arguments)},u.elem=e),n=v.trim(Z(n)).split(" ");for(f=0;f=0&&(y=y.slice(0,-1),a=!0),y.indexOf(".")>=0&&(b=y.split("."),y=b.shift(),b.sort());if((!s||v.event.customEvent[y])&&!v.event.global[y])return;n=typeof n=="object"?n[v.expando]?n:new v.Event(y,n):new v.Event(y),n.type=y,n.isTrigger=!0,n.exclusive=a,n.namespace=b.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,h=y.indexOf(":")<0?"on"+y:"";if(!s){u=v.cache;for(f in u)u[f].events&&u[f].events[y]&&v.event.trigger(n,r,u[f].handle.elem,!0);return}n.result=t,n.target||(n.target=s),r=r!=null?v.makeArray(r):[],r.unshift(n),p=v.event.special[y]||{};if(p.trigger&&p.trigger.apply(s,r)===!1)return;m=[[s,p.bindType||y]];if(!o&&!p.noBubble&&!v.isWindow(s)){g=p.delegateType||y,l=Y.test(g+y)?s:s.parentNode;for(c=s;l;l=l.parentNode)m.push([l,g]),c=l;c===(s.ownerDocument||i)&&m.push([c.defaultView||c.parentWindow||e,g])}for(f=0;f=0:v.find(h,this,null,[s]).length),u[h]&&f.push(c);f.length&&w.push({elem:s,matches:f})}d.length>m&&w.push({elem:this,matches:d.slice(m)});for(r=0;r0?this.on(t,null,e,n):this.trigger(t)},Q.test(t)&&(v.event.fixHooks[t]=v.event.keyHooks),G.test(t)&&(v.event.fixHooks[t]=v.event.mouseHooks)}),function(e,t){function nt(e,t,n,r){n=n||[],t=t||g;var i,s,a,f,l=t.nodeType;if(!e||typeof e!="string")return n;if(l!==1&&l!==9)return[];a=o(t);if(!a&&!r)if(i=R.exec(e))if(f=i[1]){if(l===9){s=t.getElementById(f);if(!s||!s.parentNode)return n;if(s.id===f)return n.push(s),n}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(f))&&u(t,s)&&s.id===f)return n.push(s),n}else{if(i[2])return S.apply(n,x.call(t.getElementsByTagName(e),0)),n;if((f=i[3])&&Z&&t.getElementsByClassName)return S.apply(n,x.call(t.getElementsByClassName(f),0)),n}return vt(e.replace(j,"$1"),t,n,r,a)}function rt(e){return function(t){var n=t.nodeName.toLowerCase();return n==="input"&&t.type===e}}function it(e){return function(t){var n=t.nodeName.toLowerCase();return(n==="input"||n==="button")&&t.type===e}}function st(e){return N(function(t){return t=+t,N(function(n,r){var i,s=e([],n.length,t),o=s.length;while(o--)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))})})}function ot(e,t,n){if(e===t)return n;var r=e.nextSibling;while(r){if(r===t)return-1;r=r.nextSibling}return 1}function ut(e,t){var n,r,s,o,u,a,f,l=L[d][e+" "];if(l)return t?0:l.slice(0);u=e,a=[],f=i.preFilter;while(u){if(!n||(r=F.exec(u)))r&&(u=u.slice(r[0].length)||u),a.push(s=[]);n=!1;if(r=I.exec(u))s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=r[0].replace(j," ");for(o in i.filter)(r=J[o].exec(u))&&(!f[o]||(r=f[o](r)))&&(s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=o,n.matches=r);if(!n)break}return t?u.length:u?nt.error(e):L(e,a).slice(0)}function at(e,t,r){var i=t.dir,s=r&&t.dir==="parentNode",o=w++;return t.first?function(t,n,r){while(t=t[i])if(s||t.nodeType===1)return e(t,n,r)}:function(t,r,u){if(!u){var a,f=b+" "+o+" ",l=f+n;while(t=t[i])if(s||t.nodeType===1){if((a=t[d])===l)return t.sizset;if(typeof a=="string"&&a.indexOf(f)===0){if(t.sizset)return t}else{t[d]=l;if(e(t,r,u))return t.sizset=!0,t;t.sizset=!1}}}else while(t=t[i])if(s||t.nodeType===1)if(e(t,r,u))return t}}function ft(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function lt(e,t,n,r,i){var s,o=[],u=0,a=e.length,f=t!=null;for(;u-1&&(s[f]=!(o[f]=c))}}else g=lt(g===o?g.splice(d,g.length):g),i?i(null,o,g,a):S.apply(o,g)})}function ht(e){var t,n,r,s=e.length,o=i.relative[e[0].type],u=o||i.relative[" "],a=o?1:0,f=at(function(e){return e===t},u,!0),l=at(function(e){return T.call(t,e)>-1},u,!0),h=[function(e,n,r){return!o&&(r||n!==c)||((t=n).nodeType?f(e,n,r):l(e,n,r))}];for(;a1&&ft(h),a>1&&e.slice(0,a-1).join("").replace(j,"$1"),n,a0,s=e.length>0,o=function(u,a,f,l,h){var p,d,v,m=[],y=0,w="0",x=u&&[],T=h!=null,N=c,C=u||s&&i.find.TAG("*",h&&a.parentNode||a),k=b+=N==null?1:Math.E;T&&(c=a!==g&&a,n=o.el);for(;(p=C[w])!=null;w++){if(s&&p){for(d=0;v=e[d];d++)if(v(p,a,f)){l.push(p);break}T&&(b=k,n=++o.el)}r&&((p=!v&&p)&&y--,u&&x.push(p))}y+=w;if(r&&w!==y){for(d=0;v=t[d];d++)v(x,m,a,f);if(u){if(y>0)while(w--)!x[w]&&!m[w]&&(m[w]=E.call(l));m=lt(m)}S.apply(l,m),T&&!u&&m.length>0&&y+t.length>1&&nt.uniqueSort(l)}return T&&(b=k,c=N),x};return o.el=0,r?N(o):o}function dt(e,t,n){var r=0,i=t.length;for(;r2&&(f=u[0]).type==="ID"&&t.nodeType===9&&!s&&i.relative[u[1].type]){t=i.find.ID(f.matches[0].replace($,""),t,s)[0];if(!t)return n;e=e.slice(u.shift().length)}for(o=J.POS.test(e)?-1:u.length-1;o>=0;o--){f=u[o];if(i.relative[l=f.type])break;if(c=i.find[l])if(r=c(f.matches[0].replace($,""),z.test(u[0].type)&&t.parentNode||t,s)){u.splice(o,1),e=r.length&&u.join("");if(!e)return S.apply(n,x.call(r,0)),n;break}}}return a(e,h)(r,t,s,n,z.test(e)),n}function mt(){}var n,r,i,s,o,u,a,f,l,c,h=!0,p="undefined",d=("sizcache"+Math.random()).replace(".",""),m=String,g=e.document,y=g.documentElement,b=0,w=0,E=[].pop,S=[].push,x=[].slice,T=[].indexOf||function(e){var t=0,n=this.length;for(;ti.cacheLength&&delete e[t.shift()],e[n+" "]=r},e)},k=C(),L=C(),A=C(),O="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",_=M.replace("w","w#"),D="([*^$|!~]?=)",P="\\["+O+"*("+M+")"+O+"*(?:"+D+O+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+_+")|)|)"+O+"*\\]",H=":("+M+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+P+")|[^:]|\\\\.)*|.*))\\)|)",B=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+O+"*((?:-\\d)?\\d*)"+O+"*\\)|)(?=[^-]|$)",j=new RegExp("^"+O+"+|((?:^|[^\\\\])(?:\\\\.)*)"+O+"+$","g"),F=new RegExp("^"+O+"*,"+O+"*"),I=new RegExp("^"+O+"*([\\x20\\t\\r\\n\\f>+~])"+O+"*"),q=new RegExp(H),R=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,U=/^:not/,z=/[\x20\t\r\n\f]*[+~]/,W=/:not\($/,X=/h\d/i,V=/input|select|textarea|button/i,$=/\\(?!\\)/g,J={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),NAME:new RegExp("^\\[name=['\"]?("+M+")['\"]?\\]"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+H),POS:new RegExp(B,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+O+"*(even|odd|(([+-]|)(\\d*)n|)"+O+"*(?:([+-]|)"+O+"*(\\d+)|))"+O+"*\\)|)","i"),needsContext:new RegExp("^"+O+"*[>+~]|"+B,"i")},K=function(e){var t=g.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}},Q=K(function(e){return e.appendChild(g.createComment("")),!e.getElementsByTagName("*").length}),G=K(function(e){return e.innerHTML="",e.firstChild&&typeof e.firstChild.getAttribute!==p&&e.firstChild.getAttribute("href")==="#"}),Y=K(function(e){e.innerHTML="";var t=typeof e.lastChild.getAttribute("multiple");return t!=="boolean"&&t!=="string"}),Z=K(function(e){return e.innerHTML="",!e.getElementsByClassName||!e.getElementsByClassName("e").length?!1:(e.lastChild.className="e",e.getElementsByClassName("e").length===2)}),et=K(function(e){e.id=d+0,e.innerHTML="
    ",y.insertBefore(e,y.firstChild);var t=g.getElementsByName&&g.getElementsByName(d).length===2+g.getElementsByName(d+0).length;return r=!g.getElementById(d),y.removeChild(e),t});try{x.call(y.childNodes,0)[0].nodeType}catch(tt){x=function(e){var t,n=[];for(;t=this[e];e++)n.push(t);return n}}nt.matches=function(e,t){return nt(e,null,null,t)},nt.matchesSelector=function(e,t){return nt(t,null,null,[e]).length>0},s=nt.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(i===1||i===9||i===11){if(typeof e.textContent=="string")return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=s(e)}else if(i===3||i===4)return e.nodeValue}else for(;t=e[r];r++)n+=s(t);return n},o=nt.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?t.nodeName!=="HTML":!1},u=nt.contains=y.contains?function(e,t){var n=e.nodeType===9?e.documentElement:e,r=t&&t.parentNode;return e===r||!!(r&&r.nodeType===1&&n.contains&&n.contains(r))}:y.compareDocumentPosition?function(e,t){return t&&!!(e.compareDocumentPosition(t)&16)}:function(e,t){while(t=t.parentNode)if(t===e)return!0;return!1},nt.attr=function(e,t){var n,r=o(e);return r||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):r||Y?e.getAttribute(t):(n=e.getAttributeNode(t),n?typeof e[t]=="boolean"?e[t]?t:null:n.specified?n.value:null:null)},i=nt.selectors={cacheLength:50,createPseudo:N,match:J,attrHandle:G?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},find:{ID:r?function(e,t,n){if(typeof t.getElementById!==p&&!n){var r=t.getElementById(e);return r&&r.parentNode?[r]:[]}}:function(e,n,r){if(typeof n.getElementById!==p&&!r){var i=n.getElementById(e);return i?i.id===e||typeof i.getAttributeNode!==p&&i.getAttributeNode("id").value===e?[i]:t:[]}},TAG:Q?function(e,t){if(typeof t.getElementsByTagName!==p)return t.getElementsByTagName(e)}:function(e,t){var n=t.getElementsByTagName(e);if(e==="*"){var r,i=[],s=0;for(;r=n[s];s++)r.nodeType===1&&i.push(r);return i}return n},NAME:et&&function(e,t){if(typeof t.getElementsByName!==p)return t.getElementsByName(name)},CLASS:Z&&function(e,t,n){if(typeof t.getElementsByClassName!==p&&!n)return t.getElementsByClassName(e)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace($,""),e[3]=(e[4]||e[5]||"").replace($,""),e[2]==="~="&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),e[1]==="nth"?(e[2]||nt.error(e[0]),e[3]=+(e[3]?e[4]+(e[5]||1):2*(e[2]==="even"||e[2]==="odd")),e[4]=+(e[6]+e[7]||e[2]==="odd")):e[2]&&nt.error(e[0]),e},PSEUDO:function(e){var t,n;if(J.CHILD.test(e[0]))return null;if(e[3])e[2]=e[3];else if(t=e[4])q.test(t)&&(n=ut(t,!0))&&(n=t.indexOf(")",t.length-n)-t.length)&&(t=t.slice(0,n),e[0]=e[0].slice(0,n)),e[2]=t;return e.slice(0,3)}},filter:{ID:r?function(e){return e=e.replace($,""),function(t){return t.getAttribute("id")===e}}:function(e){return e=e.replace($,""),function(t){var n=typeof t.getAttributeNode!==p&&t.getAttributeNode("id");return n&&n.value===e}},TAG:function(e){return e==="*"?function(){return!0}:(e=e.replace($,"").toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[d][e+" "];return t||(t=new RegExp("(^|"+O+")"+e+"("+O+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==p&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r,i){var s=nt.attr(r,e);return s==null?t==="!=":t?(s+="",t==="="?s===n:t==="!="?s!==n:t==="^="?n&&s.indexOf(n)===0:t==="*="?n&&s.indexOf(n)>-1:t==="$="?n&&s.substr(s.length-n.length)===n:t==="~="?(" "+s+" ").indexOf(n)>-1:t==="|="?s===n||s.substr(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r){return e==="nth"?function(e){var t,i,s=e.parentNode;if(n===1&&r===0)return!0;if(s){i=0;for(t=s.firstChild;t;t=t.nextSibling)if(t.nodeType===1){i++;if(e===t)break}}return i-=r,i===n||i%n===0&&i/n>=0}:function(t){var n=t;switch(e){case"only":case"first":while(n=n.previousSibling)if(n.nodeType===1)return!1;if(e==="first")return!0;n=t;case"last":while(n=n.nextSibling)if(n.nodeType===1)return!1;return!0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||nt.error("unsupported pseudo: "+e);return r[d]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?N(function(e,n){var i,s=r(e,t),o=s.length;while(o--)i=T.call(e,s[o]),e[i]=!(n[i]=s[o])}):function(e){return r(e,0,n)}):r}},pseudos:{not:N(function(e){var t=[],n=[],r=a(e.replace(j,"$1"));return r[d]?N(function(e,t,n,i){var s,o=r(e,null,i,[]),u=e.length;while(u--)if(s=o[u])e[u]=!(t[u]=s)}):function(e,i,s){return t[0]=e,r(t,null,s,n),!n.pop()}}),has:N(function(e){return function(t){return nt(e,t).length>0}}),contains:N(function(e){return function(t){return(t.textContent||t.innerText||s(t)).indexOf(e)>-1}}),enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&!!e.checked||t==="option"&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!i.pseudos.empty(e)},empty:function(e){var t;e=e.firstChild;while(e){if(e.nodeName>"@"||(t=e.nodeType)===3||t===4)return!1;e=e.nextSibling}return!0},header:function(e){return X.test(e.nodeName)},text:function(e){var t,n;return e.nodeName.toLowerCase()==="input"&&(t=e.type)==="text"&&((n=e.getAttribute("type"))==null||n.toLowerCase()===t)},radio:rt("radio"),checkbox:rt("checkbox"),file:rt("file"),password:rt("password"),image:rt("image"),submit:it("submit"),reset:it("reset"),button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&e.type==="button"||t==="button"},input:function(e){return V.test(e.nodeName)},focus:function(e){var t=e.ownerDocument;return e===t.activeElement&&(!t.hasFocus||t.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},active:function(e){return e===e.ownerDocument.activeElement},first:st(function(){return[0]}),last:st(function(e,t){return[t-1]}),eq:st(function(e,t,n){return[n<0?n+t:n]}),even:st(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:st(function(e,t,n){for(var r=n<0?n+t:n;++r",e.querySelectorAll("[selected]").length||i.push("\\["+O+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||i.push(":checked")}),K(function(e){e.innerHTML="

    ",e.querySelectorAll("[test^='']").length&&i.push("[*^$]="+O+"*(?:\"\"|'')"),e.innerHTML="",e.querySelectorAll(":enabled").length||i.push(":enabled",":disabled")}),i=new RegExp(i.join("|")),vt=function(e,r,s,o,u){if(!o&&!u&&!i.test(e)){var a,f,l=!0,c=d,h=r,p=r.nodeType===9&&e;if(r.nodeType===1&&r.nodeName.toLowerCase()!=="object"){a=ut(e),(l=r.getAttribute("id"))?c=l.replace(n,"\\$&"):r.setAttribute("id",c),c="[id='"+c+"'] ",f=a.length;while(f--)a[f]=c+a[f].join("");h=z.test(e)&&r.parentNode||r,p=a.join(",")}if(p)try{return S.apply(s,x.call(h.querySelectorAll(p),0)),s}catch(v){}finally{l||r.removeAttribute("id")}}return t(e,r,s,o,u)},u&&(K(function(t){e=u.call(t,"div");try{u.call(t,"[test!='']:sizzle"),s.push("!=",H)}catch(n){}}),s=new RegExp(s.join("|")),nt.matchesSelector=function(t,n){n=n.replace(r,"='$1']");if(!o(t)&&!s.test(n)&&!i.test(n))try{var a=u.call(t,n);if(a||e||t.document&&t.document.nodeType!==11)return a}catch(f){}return nt(n,null,null,[t]).length>0})}(),i.pseudos.nth=i.pseudos.eq,i.filters=mt.prototype=i.pseudos,i.setFilters=new mt,nt.attr=v.attr,v.find=nt,v.expr=nt.selectors,v.expr[":"]=v.expr.pseudos,v.unique=nt.uniqueSort,v.text=nt.getText,v.isXMLDoc=nt.isXML,v.contains=nt.contains}(e);var nt=/Until$/,rt=/^(?:parents|prev(?:Until|All))/,it=/^.[^:#\[\.,]*$/,st=v.expr.match.needsContext,ot={children:!0,contents:!0,next:!0,prev:!0};v.fn.extend({find:function(e){var t,n,r,i,s,o,u=this;if(typeof e!="string")return v(e).filter(function(){for(t=0,n=u.length;t0)for(i=r;i=0:v.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,s=[],o=st.test(e)||typeof e!="string"?v(e,t||this.context):0;for(;r-1:v.find.matchesSelector(n,e)){s.push(n);break}n=n.parentNode}}return s=s.length>1?v.unique(s):s,this.pushStack(s,"closest",e)},index:function(e){return e?typeof e=="string"?v.inArray(this[0],v(e)):v.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n=typeof e=="string"?v(e,t):v.makeArray(e&&e.nodeType?[e]:e),r=v.merge(this.get(),n);return this.pushStack(ut(n[0])||ut(r[0])?r:v.unique(r))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}}),v.fn.andSelf=v.fn.addBack,v.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return v.dir(e,"parentNode")},parentsUntil:function(e,t,n){return v.dir(e,"parentNode",n)},next:function(e){return at(e,"nextSibling")},prev:function(e){return at(e,"previousSibling")},nextAll:function(e){return v.dir(e,"nextSibling")},prevAll:function(e){return v.dir(e,"previousSibling")},nextUntil:function(e,t,n){return v.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return v.dir(e,"previousSibling",n)},siblings:function(e){return v.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return v.sibling(e.firstChild)},contents:function(e){return v.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:v.merge([],e.childNodes)}},function(e,t){v.fn[e]=function(n,r){var i=v.map(this,t,n);return nt.test(e)||(r=n),r&&typeof r=="string"&&(i=v.filter(r,i)),i=this.length>1&&!ot[e]?v.unique(i):i,this.length>1&&rt.test(e)&&(i=i.reverse()),this.pushStack(i,e,l.call(arguments).join(","))}}),v.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),t.length===1?v.find.matchesSelector(t[0],e)?[t[0]]:[]:v.find.matches(e,t)},dir:function(e,n,r){var i=[],s=e[n];while(s&&s.nodeType!==9&&(r===t||s.nodeType!==1||!v(s).is(r)))s.nodeType===1&&i.push(s),s=s[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}});var ct="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ht=/ jQuery\d+="(?:null|\d+)"/g,pt=/^\s+/,dt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,vt=/<([\w:]+)/,mt=/
    ","
    "],tr:[2,"","
    "],td:[3,"","
    "],col:[2,"","
    "],area:[1,"",""],_default:[0,"",""]},Ct=lt(i),kt=Ct.appendChild(i.createElement("div"));Nt.optgroup=Nt.option,Nt.tbody=Nt.tfoot=Nt.colgroup=Nt.caption=Nt.thead,Nt.th=Nt.td,v.support.htmlSerialize||(Nt._default=[1,"X
    ","
    "]),v.fn.extend({text:function(e){return v.access(this,function(e){return e===t?v.text(this):this.empty().append((this[0]&&this[0].ownerDocument||i).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(v.isFunction(e))return this.each(function(t){v(this).wrapAll(e.call(this,t))});if(this[0]){var t=v(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&e.firstChild.nodeType===1)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return v.isFunction(e)?this.each(function(t){v(this).wrapInner(e.call(this,t))}):this.each(function(){var t=v(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=v.isFunction(e);return this.each(function(n){v(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){v.nodeName(this,"body")||v(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(e,this.firstChild)})},before:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(e,this),"before",this.selector)}},after:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(this,e),"after",this.selector)}},remove:function(e,t){var n,r=0;for(;(n=this[r])!=null;r++)if(!e||v.filter(e,[n]).length)!t&&n.nodeType===1&&(v.cleanData(n.getElementsByTagName("*")),v.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n);return this},empty:function(){var e,t=0;for(;(e=this[t])!=null;t++){e.nodeType===1&&v.cleanData(e.getElementsByTagName("*"));while(e.firstChild)e.removeChild(e.firstChild)}return this},clone:function(e,t){return e=e==null?!1:e,t=t==null?e:t,this.map(function(){return v.clone(this,e,t)})},html:function(e){return v.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return n.nodeType===1?n.innerHTML.replace(ht,""):t;if(typeof e=="string"&&!yt.test(e)&&(v.support.htmlSerialize||!wt.test(e))&&(v.support.leadingWhitespace||!pt.test(e))&&!Nt[(vt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(dt,"<$1>");try{for(;r1&&typeof f=="string"&&St.test(f))return this.each(function(){v(this).domManip(e,n,r)});if(v.isFunction(f))return this.each(function(i){var s=v(this);e[0]=f.call(this,i,n?s.html():t),s.domManip(e,n,r)});if(this[0]){i=v.buildFragment(e,this,l),o=i.fragment,s=o.firstChild,o.childNodes.length===1&&(o=s);if(s){n=n&&v.nodeName(s,"tr");for(u=i.cacheable||c-1;a0?this.clone(!0):this).get(),v(o[i])[t](r),s=s.concat(r);return this.pushStack(s,e,o.selector)}}),v.extend({clone:function(e,t,n){var r,i,s,o;v.support.html5Clone||v.isXMLDoc(e)||!wt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(kt.innerHTML=e.outerHTML,kt.removeChild(o=kt.firstChild));if((!v.support.noCloneEvent||!v.support.noCloneChecked)&&(e.nodeType===1||e.nodeType===11)&&!v.isXMLDoc(e)){Ot(e,o),r=Mt(e),i=Mt(o);for(s=0;r[s];++s)i[s]&&Ot(r[s],i[s])}if(t){At(e,o);if(n){r=Mt(e),i=Mt(o);for(s=0;r[s];++s)At(r[s],i[s])}}return r=i=null,o},clean:function(e,t,n,r){var s,o,u,a,f,l,c,h,p,d,m,g,y=t===i&&Ct,b=[];if(!t||typeof t.createDocumentFragment=="undefined")t=i;for(s=0;(u=e[s])!=null;s++){typeof u=="number"&&(u+="");if(!u)continue;if(typeof u=="string")if(!gt.test(u))u=t.createTextNode(u);else{y=y||lt(t),c=t.createElement("div"),y.appendChild(c),u=u.replace(dt,"<$1>"),a=(vt.exec(u)||["",""])[1].toLowerCase(),f=Nt[a]||Nt._default,l=f[0],c.innerHTML=f[1]+u+f[2];while(l--)c=c.lastChild;if(!v.support.tbody){h=mt.test(u),p=a==="table"&&!h?c.firstChild&&c.firstChild.childNodes:f[1]===""&&!h?c.childNodes:[];for(o=p.length-1;o>=0;--o)v.nodeName(p[o],"tbody")&&!p[o].childNodes.length&&p[o].parentNode.removeChild(p[o])}!v.support.leadingWhitespace&&pt.test(u)&&c.insertBefore(t.createTextNode(pt.exec(u)[0]),c.firstChild),u=c.childNodes,c.parentNode.removeChild(c)}u.nodeType?b.push(u):v.merge(b,u)}c&&(u=c=y=null);if(!v.support.appendChecked)for(s=0;(u=b[s])!=null;s++)v.nodeName(u,"input")?_t(u):typeof u.getElementsByTagName!="undefined"&&v.grep(u.getElementsByTagName("input"),_t);if(n){m=function(e){if(!e.type||xt.test(e.type))return r?r.push(e.parentNode?e.parentNode.removeChild(e):e):n.appendChild(e)};for(s=0;(u=b[s])!=null;s++)if(!v.nodeName(u,"script")||!m(u))n.appendChild(u),typeof u.getElementsByTagName!="undefined"&&(g=v.grep(v.merge([],u.getElementsByTagName("script")),m),b.splice.apply(b,[s+1,0].concat(g)),s+=g.length)}return b},cleanData:function(e,t){var n,r,i,s,o=0,u=v.expando,a=v.cache,f=v.support.deleteExpando,l=v.event.special;for(;(i=e[o])!=null;o++)if(t||v.acceptData(i)){r=i[u],n=r&&a[r];if(n){if(n.events)for(s in n.events)l[s]?v.event.remove(i,s):v.removeEvent(i,s,n.handle);a[r]&&(delete a[r],f?delete i[u]:i.removeAttribute?i.removeAttribute(u):i[u]=null,v.deletedIds.push(r))}}}}),function(){var e,t;v.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e=v.uaMatch(o.userAgent),t={},e.browser&&(t[e.browser]=!0,t.version=e.version),t.chrome?t.webkit=!0:t.webkit&&(t.safari=!0),v.browser=t,v.sub=function(){function e(t,n){return new e.fn.init(t,n)}v.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(r,i){return i&&i instanceof v&&!(i instanceof e)&&(i=e(i)),v.fn.init.call(this,r,i,t)},e.fn.init.prototype=e.fn;var t=e(i);return e}}();var Dt,Pt,Ht,Bt=/alpha\([^)]*\)/i,jt=/opacity=([^)]*)/,Ft=/^(top|right|bottom|left)$/,It=/^(none|table(?!-c[ea]).+)/,qt=/^margin/,Rt=new RegExp("^("+m+")(.*)$","i"),Ut=new RegExp("^("+m+")(?!px)[a-z%]+$","i"),zt=new RegExp("^([-+])=("+m+")","i"),Wt={BODY:"block"},Xt={position:"absolute",visibility:"hidden",display:"block"},Vt={letterSpacing:0,fontWeight:400},$t=["Top","Right","Bottom","Left"],Jt=["Webkit","O","Moz","ms"],Kt=v.fn.toggle;v.fn.extend({css:function(e,n){return v.access(this,function(e,n,r){return r!==t?v.style(e,n,r):v.css(e,n)},e,n,arguments.length>1)},show:function(){return Yt(this,!0)},hide:function(){return Yt(this)},toggle:function(e,t){var n=typeof e=="boolean";return v.isFunction(e)&&v.isFunction(t)?Kt.apply(this,arguments):this.each(function(){(n?e:Gt(this))?v(this).show():v(this).hide()})}}),v.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Dt(e,"opacity");return n===""?"1":n}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":v.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(!e||e.nodeType===3||e.nodeType===8||!e.style)return;var s,o,u,a=v.camelCase(n),f=e.style;n=v.cssProps[a]||(v.cssProps[a]=Qt(f,a)),u=v.cssHooks[n]||v.cssHooks[a];if(r===t)return u&&"get"in u&&(s=u.get(e,!1,i))!==t?s:f[n];o=typeof r,o==="string"&&(s=zt.exec(r))&&(r=(s[1]+1)*s[2]+parseFloat(v.css(e,n)),o="number");if(r==null||o==="number"&&isNaN(r))return;o==="number"&&!v.cssNumber[a]&&(r+="px");if(!u||!("set"in u)||(r=u.set(e,r,i))!==t)try{f[n]=r}catch(l){}},css:function(e,n,r,i){var s,o,u,a=v.camelCase(n);return n=v.cssProps[a]||(v.cssProps[a]=Qt(e.style,a)),u=v.cssHooks[n]||v.cssHooks[a],u&&"get"in u&&(s=u.get(e,!0,i)),s===t&&(s=Dt(e,n)),s==="normal"&&n in Vt&&(s=Vt[n]),r||i!==t?(o=parseFloat(s),r||v.isNumeric(o)?o||0:s):s},swap:function(e,t,n){var r,i,s={};for(i in t)s[i]=e.style[i],e.style[i]=t[i];r=n.call(e);for(i in t)e.style[i]=s[i];return r}}),e.getComputedStyle?Dt=function(t,n){var r,i,s,o,u=e.getComputedStyle(t,null),a=t.style;return u&&(r=u.getPropertyValue(n)||u[n],r===""&&!v.contains(t.ownerDocument,t)&&(r=v.style(t,n)),Ut.test(r)&&qt.test(n)&&(i=a.width,s=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=u.width,a.width=i,a.minWidth=s,a.maxWidth=o)),r}:i.documentElement.currentStyle&&(Dt=function(e,t){var n,r,i=e.currentStyle&&e.currentStyle[t],s=e.style;return i==null&&s&&s[t]&&(i=s[t]),Ut.test(i)&&!Ft.test(t)&&(n=s.left,r=e.runtimeStyle&&e.runtimeStyle.left,r&&(e.runtimeStyle.left=e.currentStyle.left),s.left=t==="fontSize"?"1em":i,i=s.pixelLeft+"px",s.left=n,r&&(e.runtimeStyle.left=r)),i===""?"auto":i}),v.each(["height","width"],function(e,t){v.cssHooks[t]={get:function(e,n,r){if(n)return e.offsetWidth===0&&It.test(Dt(e,"display"))?v.swap(e,Xt,function(){return tn(e,t,r)}):tn(e,t,r)},set:function(e,n,r){return Zt(e,n,r?en(e,t,r,v.support.boxSizing&&v.css(e,"boxSizing")==="border-box"):0)}}}),v.support.opacity||(v.cssHooks.opacity={get:function(e,t){return jt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=v.isNumeric(t)?"alpha(opacity="+t*100+")":"",s=r&&r.filter||n.filter||"";n.zoom=1;if(t>=1&&v.trim(s.replace(Bt,""))===""&&n.removeAttribute){n.removeAttribute("filter");if(r&&!r.filter)return}n.filter=Bt.test(s)?s.replace(Bt,i):s+" "+i}}),v(function(){v.support.reliableMarginRight||(v.cssHooks.marginRight={get:function(e,t){return v.swap(e,{display:"inline-block"},function(){if(t)return Dt(e,"marginRight")})}}),!v.support.pixelPosition&&v.fn.position&&v.each(["top","left"],function(e,t){v.cssHooks[t]={get:function(e,n){if(n){var r=Dt(e,t);return Ut.test(r)?v(e).position()[t]+"px":r}}}})}),v.expr&&v.expr.filters&&(v.expr.filters.hidden=function(e){return e.offsetWidth===0&&e.offsetHeight===0||!v.support.reliableHiddenOffsets&&(e.style&&e.style.display||Dt(e,"display"))==="none"},v.expr.filters.visible=function(e){return!v.expr.filters.hidden(e)}),v.each({margin:"",padding:"",border:"Width"},function(e,t){v.cssHooks[e+t]={expand:function(n){var r,i=typeof n=="string"?n.split(" "):[n],s={};for(r=0;r<4;r++)s[e+$t[r]+t]=i[r]||i[r-2]||i[0];return s}},qt.test(e)||(v.cssHooks[e+t].set=Zt)});var rn=/%20/g,sn=/\[\]$/,on=/\r?\n/g,un=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,an=/^(?:select|textarea)/i;v.fn.extend({serialize:function(){return v.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?v.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||an.test(this.nodeName)||un.test(this.type))}).map(function(e,t){var n=v(this).val();return n==null?null:v.isArray(n)?v.map(n,function(e,n){return{name:t.name,value:e.replace(on,"\r\n")}}):{name:t.name,value:n.replace(on,"\r\n")}}).get()}}),v.param=function(e,n){var r,i=[],s=function(e,t){t=v.isFunction(t)?t():t==null?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};n===t&&(n=v.ajaxSettings&&v.ajaxSettings.traditional);if(v.isArray(e)||e.jquery&&!v.isPlainObject(e))v.each(e,function(){s(this.name,this.value)});else for(r in e)fn(r,e[r],n,s);return i.join("&").replace(rn,"+")};var ln,cn,hn=/#.*$/,pn=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,dn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,vn=/^(?:GET|HEAD)$/,mn=/^\/\//,gn=/\?/,yn=/)<[^<]*)*<\/script>/gi,bn=/([?&])_=[^&]*/,wn=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,En=v.fn.load,Sn={},xn={},Tn=["*/"]+["*"];try{cn=s.href}catch(Nn){cn=i.createElement("a"),cn.href="",cn=cn.href}ln=wn.exec(cn.toLowerCase())||[],v.fn.load=function(e,n,r){if(typeof e!="string"&&En)return En.apply(this,arguments);if(!this.length)return this;var i,s,o,u=this,a=e.indexOf(" ");return a>=0&&(i=e.slice(a,e.length),e=e.slice(0,a)),v.isFunction(n)?(r=n,n=t):n&&typeof n=="object"&&(s="POST"),v.ajax({url:e,type:s,dataType:"html",data:n,complete:function(e,t){r&&u.each(r,o||[e.responseText,t,e])}}).done(function(e){o=arguments,u.html(i?v("
    ").append(e.replace(yn,"")).find(i):e)}),this},v.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){v.fn[t]=function(e){return this.on(t,e)}}),v.each(["get","post"],function(e,n){v[n]=function(e,r,i,s){return v.isFunction(r)&&(s=s||i,i=r,r=t),v.ajax({type:n,url:e,data:r,success:i,dataType:s})}}),v.extend({getScript:function(e,n){return v.get(e,t,n,"script")},getJSON:function(e,t,n){return v.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?Ln(e,v.ajaxSettings):(t=e,e=v.ajaxSettings),Ln(e,t),e},ajaxSettings:{url:cn,isLocal:dn.test(ln[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":Tn},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":v.parseJSON,"text xml":v.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:Cn(Sn),ajaxTransport:Cn(xn),ajax:function(e,n){function T(e,n,s,a){var l,y,b,w,S,T=n;if(E===2)return;E=2,u&&clearTimeout(u),o=t,i=a||"",x.readyState=e>0?4:0,s&&(w=An(c,x,s));if(e>=200&&e<300||e===304)c.ifModified&&(S=x.getResponseHeader("Last-Modified"),S&&(v.lastModified[r]=S),S=x.getResponseHeader("Etag"),S&&(v.etag[r]=S)),e===304?(T="notmodified",l=!0):(l=On(c,w),T=l.state,y=l.data,b=l.error,l=!b);else{b=T;if(!T||e)T="error",e<0&&(e=0)}x.status=e,x.statusText=(n||T)+"",l?d.resolveWith(h,[y,T,x]):d.rejectWith(h,[x,T,b]),x.statusCode(g),g=t,f&&p.trigger("ajax"+(l?"Success":"Error"),[x,c,l?y:b]),m.fireWith(h,[x,T]),f&&(p.trigger("ajaxComplete",[x,c]),--v.active||v.event.trigger("ajaxStop"))}typeof e=="object"&&(n=e,e=t),n=n||{};var r,i,s,o,u,a,f,l,c=v.ajaxSetup({},n),h=c.context||c,p=h!==c&&(h.nodeType||h instanceof v)?v(h):v.event,d=v.Deferred(),m=v.Callbacks("once memory"),g=c.statusCode||{},b={},w={},E=0,S="canceled",x={readyState:0,setRequestHeader:function(e,t){if(!E){var n=e.toLowerCase();e=w[n]=w[n]||e,b[e]=t}return this},getAllResponseHeaders:function(){return E===2?i:null},getResponseHeader:function(e){var n;if(E===2){if(!s){s={};while(n=pn.exec(i))s[n[1].toLowerCase()]=n[2]}n=s[e.toLowerCase()]}return n===t?null:n},overrideMimeType:function(e){return E||(c.mimeType=e),this},abort:function(e){return e=e||S,o&&o.abort(e),T(0,e),this}};d.promise(x),x.success=x.done,x.error=x.fail,x.complete=m.add,x.statusCode=function(e){if(e){var t;if(E<2)for(t in e)g[t]=[g[t],e[t]];else t=e[x.status],x.always(t)}return this},c.url=((e||c.url)+"").replace(hn,"").replace(mn,ln[1]+"//"),c.dataTypes=v.trim(c.dataType||"*").toLowerCase().split(y),c.crossDomain==null&&(a=wn.exec(c.url.toLowerCase()),c.crossDomain=!(!a||a[1]===ln[1]&&a[2]===ln[2]&&(a[3]||(a[1]==="http:"?80:443))==(ln[3]||(ln[1]==="http:"?80:443)))),c.data&&c.processData&&typeof c.data!="string"&&(c.data=v.param(c.data,c.traditional)),kn(Sn,c,n,x);if(E===2)return x;f=c.global,c.type=c.type.toUpperCase(),c.hasContent=!vn.test(c.type),f&&v.active++===0&&v.event.trigger("ajaxStart");if(!c.hasContent){c.data&&(c.url+=(gn.test(c.url)?"&":"?")+c.data,delete c.data),r=c.url;if(c.cache===!1){var N=v.now(),C=c.url.replace(bn,"$1_="+N);c.url=C+(C===c.url?(gn.test(c.url)?"&":"?")+"_="+N:"")}}(c.data&&c.hasContent&&c.contentType!==!1||n.contentType)&&x.setRequestHeader("Content-Type",c.contentType),c.ifModified&&(r=r||c.url,v.lastModified[r]&&x.setRequestHeader("If-Modified-Since",v.lastModified[r]),v.etag[r]&&x.setRequestHeader("If-None-Match",v.etag[r])),x.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+(c.dataTypes[0]!=="*"?", "+Tn+"; q=0.01":""):c.accepts["*"]);for(l in c.headers)x.setRequestHeader(l,c.headers[l]);if(!c.beforeSend||c.beforeSend.call(h,x,c)!==!1&&E!==2){S="abort";for(l in{success:1,error:1,complete:1})x[l](c[l]);o=kn(xn,c,n,x);if(!o)T(-1,"No Transport");else{x.readyState=1,f&&p.trigger("ajaxSend",[x,c]),c.async&&c.timeout>0&&(u=setTimeout(function(){x.abort("timeout")},c.timeout));try{E=1,o.send(b,T)}catch(k){if(!(E<2))throw k;T(-1,k)}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var Mn=[],_n=/\?/,Dn=/(=)\?(?=&|$)|\?\?/,Pn=v.now();v.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Mn.pop()||v.expando+"_"+Pn++;return this[e]=!0,e}}),v.ajaxPrefilter("json jsonp",function(n,r,i){var s,o,u,a=n.data,f=n.url,l=n.jsonp!==!1,c=l&&Dn.test(f),h=l&&!c&&typeof a=="string"&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Dn.test(a);if(n.dataTypes[0]==="jsonp"||c||h)return s=n.jsonpCallback=v.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,o=e[s],c?n.url=f.replace(Dn,"$1"+s):h?n.data=a.replace(Dn,"$1"+s):l&&(n.url+=(_n.test(f)?"&":"?")+n.jsonp+"="+s),n.converters["script json"]=function(){return u||v.error(s+" was not called"),u[0]},n.dataTypes[0]="json",e[s]=function(){u=arguments},i.always(function(){e[s]=o,n[s]&&(n.jsonpCallback=r.jsonpCallback,Mn.push(s)),u&&v.isFunction(o)&&o(u[0]),u=o=t}),"script"}),v.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return v.globalEval(e),e}}}),v.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),v.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=i.head||i.getElementsByTagName("head")[0]||i.documentElement;return{send:function(s,o){n=i.createElement("script"),n.async="async",e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,i){if(i||!n.readyState||/loaded|complete/.test(n.readyState))n.onload=n.onreadystatechange=null,r&&n.parentNode&&r.removeChild(n),n=t,i||o(200,"success")},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var Hn,Bn=e.ActiveXObject?function(){for(var e in Hn)Hn[e](0,1)}:!1,jn=0;v.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&Fn()||In()}:Fn,function(e){v.extend(v.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})}(v.ajaxSettings.xhr()),v.support.ajax&&v.ajaxTransport(function(n){if(!n.crossDomain||v.support.cors){var r;return{send:function(i,s){var o,u,a=n.xhr();n.username?a.open(n.type,n.url,n.async,n.username,n.password):a.open(n.type,n.url,n.async);if(n.xhrFields)for(u in n.xhrFields)a[u]=n.xhrFields[u];n.mimeType&&a.overrideMimeType&&a.overrideMimeType(n.mimeType),!n.crossDomain&&!i["X-Requested-With"]&&(i["X-Requested-With"]="XMLHttpRequest");try{for(u in i)a.setRequestHeader(u,i[u])}catch(f){}a.send(n.hasContent&&n.data||null),r=function(e,i){var u,f,l,c,h;try{if(r&&(i||a.readyState===4)){r=t,o&&(a.onreadystatechange=v.noop,Bn&&delete Hn[o]);if(i)a.readyState!==4&&a.abort();else{u=a.status,l=a.getAllResponseHeaders(),c={},h=a.responseXML,h&&h.documentElement&&(c.xml=h);try{c.text=a.responseText}catch(p){}try{f=a.statusText}catch(p){f=""}!u&&n.isLocal&&!n.crossDomain?u=c.text?200:404:u===1223&&(u=204)}}}catch(d){i||s(-1,d)}c&&s(u,f,c,l)},n.async?a.readyState===4?setTimeout(r,0):(o=++jn,Bn&&(Hn||(Hn={},v(e).unload(Bn)),Hn[o]=r),a.onreadystatechange=r):r()},abort:function(){r&&r(0,1)}}}});var qn,Rn,Un=/^(?:toggle|show|hide)$/,zn=new RegExp("^(?:([-+])=|)("+m+")([a-z%]*)$","i"),Wn=/queueHooks$/,Xn=[Gn],Vn={"*":[function(e,t){var n,r,i=this.createTween(e,t),s=zn.exec(t),o=i.cur(),u=+o||0,a=1,f=20;if(s){n=+s[2],r=s[3]||(v.cssNumber[e]?"":"px");if(r!=="px"&&u){u=v.css(i.elem,e,!0)||n||1;do a=a||".5",u/=a,v.style(i.elem,e,u+r);while(a!==(a=i.cur()/o)&&a!==1&&--f)}i.unit=r,i.start=u,i.end=s[1]?u+(s[1]+1)*n:n}return i}]};v.Animation=v.extend(Kn,{tweener:function(e,t){v.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;r-1,f={},l={},c,h;a?(l=i.position(),c=l.top,h=l.left):(c=parseFloat(o)||0,h=parseFloat(u)||0),v.isFunction(t)&&(t=t.call(e,n,s)),t.top!=null&&(f.top=t.top-s.top+c),t.left!=null&&(f.left=t.left-s.left+h),"using"in t?t.using.call(e,f):i.css(f)}},v.fn.extend({position:function(){if(!this[0])return;var e=this[0],t=this.offsetParent(),n=this.offset(),r=er.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(v.css(e,"marginTop"))||0,n.left-=parseFloat(v.css(e,"marginLeft"))||0,r.top+=parseFloat(v.css(t[0],"borderTopWidth"))||0,r.left+=parseFloat(v.css(t[0],"borderLeftWidth"))||0,{top:n.top-r.top,left:n.left-r.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||i.body;while(e&&!er.test(e.nodeName)&&v.css(e,"position")==="static")e=e.offsetParent;return e||i.body})}}),v.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);v.fn[e]=function(i){return v.access(this,function(e,i,s){var o=tr(e);if(s===t)return o?n in o?o[n]:o.document.documentElement[i]:e[i];o?o.scrollTo(r?v(o).scrollLeft():s,r?s:v(o).scrollTop()):e[i]=s},e,i,arguments.length,null)}}),v.each({Height:"height",Width:"width"},function(e,n){v.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){v.fn[i]=function(i,s){var o=arguments.length&&(r||typeof i!="boolean"),u=r||(i===!0||s===!0?"margin":"border");return v.access(this,function(n,r,i){var s;return v.isWindow(n)?n.document.documentElement["client"+e]:n.nodeType===9?(s=n.documentElement,Math.max(n.body["scroll"+e],s["scroll"+e],n.body["offset"+e],s["offset"+e],s["client"+e])):i===t?v.css(n,r,i,u):v.style(n,r,i,u)},n,o?i:t,o,null)}})}),e.jQuery=e.$=v,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return v})})(window); diff --git a/docs/jsdoc-template/static/scripts/linenumber.js b/docs/jsdoc-template/static/scripts/linenumber.js new file mode 100755 index 0000000..d7ac9c0 --- /dev/null +++ b/docs/jsdoc-template/static/scripts/linenumber.js @@ -0,0 +1,30 @@ +/*global document */ +(function() { + var source = document.getElementsByClassName('prettyprint source linenums'); + var i = 0; + var lineNumber = 0; + var lineId; + var lines; + var totalLines; + var anchorHash; + var lineNumberHTML = ''; + + if (source && source[0]) { + anchorHash = document.location.hash.substring(1); + lines = source[0].getElementsByTagName('li'); + totalLines = lines.length; + + for (; i < totalLines; i++) { + lineNumber++; + lineId = 'line' + lineNumber; + lines[i].id = lineId; + + lineNumberHTML = '' + (i + 1) + ' : '; + + lines[i].insertAdjacentHTML('afterBegin', lineNumberHTML); + if (lineId === anchorHash) { + lines[i].className += ' selected'; + } + } + } +})(); diff --git a/docs/jsdoc-template/static/scripts/prettify/Apache-License-2.0.txt b/docs/jsdoc-template/static/scripts/prettify/Apache-License-2.0.txt new file mode 100755 index 0000000..d645695 --- /dev/null +++ b/docs/jsdoc-template/static/scripts/prettify/Apache-License-2.0.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/docs/jsdoc-template/static/scripts/prettify/lang-css.js b/docs/jsdoc-template/static/scripts/prettify/lang-css.js new file mode 100755 index 0000000..041e1f5 --- /dev/null +++ b/docs/jsdoc-template/static/scripts/prettify/lang-css.js @@ -0,0 +1,2 @@ +PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n "]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com", +/^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]); diff --git a/docs/jsdoc-template/static/scripts/prettify/prettify.js b/docs/jsdoc-template/static/scripts/prettify/prettify.js new file mode 100755 index 0000000..eef5ad7 --- /dev/null +++ b/docs/jsdoc-template/static/scripts/prettify/prettify.js @@ -0,0 +1,28 @@ +var q=null;window.PR_SHOULD_USE_CONTINUATION=!0; +(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a= +[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;ci[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m), +l=[],p={},d=0,g=e.length;d=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/, +q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/, +q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g, +"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a), +a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e} +for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"], +"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"], +H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"], +J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+ +I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]), +["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css", +/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}), +["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes", +hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p=0){var k=k.match(g),f,b;if(b= +!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p - 1; +} + +function makeListItemHtml(item, inputText) { + var itemText = item.text; + var itemHref = item.href; + var $parent = $(item).closest('div'); + var memberof = ''; + + if ($parent.length && $parent.attr('id')) { + memberof = $parent.attr('id').replace('_sub', ''); + } else { + memberof = $(item).closest('div').find('h3').text(); + } + + if (memberof) { + memberof = '' + memberof + ''; + } + + itemText = itemText.replace(new RegExp(inputText, 'ig'), function(matched) { + return '' + matched + ''; + }); + + return '
  • ' + itemText + '' + memberof + '
  • '; +} + +function removeWhiteSpace(value) { + return value.replace(/\s/g, ''); +} + +/*************** TOOGLE SUB NAV ***************/ +function toggleSubNav(e) { + $(e.currentTarget).next().toggleClass('hidden'); + $(e.currentTarget).find('.glyphicon').toggleClass('glyphicon-plus glyphicon-minus'); +} + +$lnb.find('.lnb-api').each(function() { + $(this).find('.toggle-subnav') + .filter(function() { + return $(this).next(':empty').length === 0; + }).each(function() { + $(this).removeClass('hidden').on('click', toggleSubNav); + }); +}); diff --git a/docs/jsdoc-template/static/styles/bootstrap.min.css b/docs/jsdoc-template/static/styles/bootstrap.min.css new file mode 100644 index 0000000..ed3905e --- /dev/null +++ b/docs/jsdoc-template/static/styles/bootstrap.min.css @@ -0,0 +1,6 @@ +/*! + * Bootstrap v3.3.7 (http://getbootstrap.com) + * Copyright 2011-2016 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before{content:"\e227"}.glyphicon-btc:before{content:"\e227"}.glyphicon-xbt:before{content:"\e227"}.glyphicon-yen:before{content:"\00a5"}.glyphicon-jpy:before{content:"\00a5"}.glyphicon-ruble:before{content:"\20bd"}.glyphicon-rub:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=time].form-control,input[type=datetime-local].form-control,input[type=month].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=time],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=time],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.checkbox-inline.disabled,.radio-inline.disabled,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio-inline{cursor:not-allowed}.checkbox.disabled label,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .radio label{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default:hover{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary:hover{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success:hover{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger:hover{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;-o-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;filter:alpha(opacity=0);opacity:0;line-break:auto}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px;bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);line-break:auto}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);background-color:rgba(0,0,0,0);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-md,.visible-sm,.visible-xs{display:none!important}.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}} +/*# sourceMappingURL=bootstrap.min.css.map */ \ No newline at end of file diff --git a/docs/jsdoc-template/static/styles/prettify-jsdoc.css b/docs/jsdoc-template/static/styles/prettify-jsdoc.css new file mode 100755 index 0000000..5a2526e --- /dev/null +++ b/docs/jsdoc-template/static/styles/prettify-jsdoc.css @@ -0,0 +1,111 @@ +/* JSDoc prettify.js theme */ + +/* plain text */ +.pln { + color: #000000; + font-weight: normal; + font-style: normal; +} + +/* string content */ +.str { + color: #006400; + font-weight: normal; + font-style: normal; +} + +/* a keyword */ +.kwd { + color: #000000; + font-weight: bold; + font-style: normal; +} + +/* a comment */ +.com { + font-weight: normal; + font-style: italic; +} + +/* a type name */ +.typ { + color: #000000; + font-weight: normal; + font-style: normal; +} + +/* a literal value */ +.lit { + color: #006400; + font-weight: normal; + font-style: normal; +} + +/* punctuation */ +.pun { + color: #000000; + font-weight: bold; + font-style: normal; +} + +/* lisp open bracket */ +.opn { + color: #000000; + font-weight: bold; + font-style: normal; +} + +/* lisp close bracket */ +.clo { + color: #000000; + font-weight: bold; + font-style: normal; +} + +/* a markup tag name */ +.tag { + color: #006400; + font-weight: normal; + font-style: normal; +} + +/* a markup attribute name */ +.atn { + color: #006400; + font-weight: normal; + font-style: normal; +} + +/* a markup attribute value */ +.atv { + color: #006400; + font-weight: normal; + font-style: normal; +} + +/* a declaration */ +.dec { + color: #000000; + font-weight: bold; + font-style: normal; +} + +/* a variable name */ +.var { + color: #000000; + font-weight: normal; + font-style: normal; +} + +/* a function name */ +.fun { + color: #000000; + font-weight: bold; + font-style: normal; +} + +/* Specify class=linenums on a pre to get line numbering */ +ol.linenums { + margin-top: 0; + margin-bottom: 0; +} diff --git a/docs/jsdoc-template/static/styles/prettify-tomorrow.css b/docs/jsdoc-template/static/styles/prettify-tomorrow.css new file mode 100755 index 0000000..b6f92a7 --- /dev/null +++ b/docs/jsdoc-template/static/styles/prettify-tomorrow.css @@ -0,0 +1,132 @@ +/* Tomorrow Theme */ +/* Original theme - https://github.com/chriskempson/tomorrow-theme */ +/* Pretty printing styles. Used with prettify.js. */ +/* SPAN elements with the classes below are added by prettyprint. */ +/* plain text */ +.pln { + color: #4d4d4c; } + +@media screen { + /* string content */ + .str { + color: #718c00; } + + /* a keyword */ + .kwd { + color: #8959a8; } + + /* a comment */ + .com { + color: #8e908c; } + + /* a type name */ + .typ { + color: #4271ae; } + + /* a literal value */ + .lit { + color: #f5871f; } + + /* punctuation */ + .pun { + color: #4d4d4c; } + + /* lisp open bracket */ + .opn { + color: #4d4d4c; } + + /* lisp close bracket */ + .clo { + color: #4d4d4c; } + + /* a markup tag name */ + .tag { + color: #c82829; } + + /* a markup attribute name */ + .atn { + color: #f5871f; } + + /* a markup attribute value */ + .atv { + color: #3e999f; } + + /* a declaration */ + .dec { + color: #f5871f; } + + /* a variable name */ + .var { + color: #c82829; } + + /* a function name */ + .fun { + color: #4271ae; } } +/* Use higher contrast and text-weight for printable form. */ +@media print, projection { + .str { + color: #060; } + + .kwd { + color: #006; + font-weight: bold; } + + .com { + color: #600; + font-style: italic; } + + .typ { + color: #404; + font-weight: bold; } + + .lit { + color: #044; } + + .pun, .opn, .clo { + color: #440; } + + .tag { + color: #006; + font-weight: bold; } + + .atn { + color: #404; } + + .atv { + color: #060; } } +/* Style */ +/* +pre.prettyprint { + background: white; + font-family: Consolas, Monaco, 'Andale Mono', monospace; + font-size: 12px; + line-height: 1.5; + border: 1px solid #ccc; + padding: 10px; } +*/ + +/* Specify class=linenums on a pre to get line numbering */ +ol.linenums { + margin-top: 0; + margin-bottom: 0; } + +/* IE indents via margin-left */ +li.L0, +li.L1, +li.L2, +li.L3, +li.L4, +li.L5, +li.L6, +li.L7, +li.L8, +li.L9 { + /* */ } + +/* Alternate shading for lines */ +li.L1, +li.L3, +li.L5, +li.L7, +li.L9 { + /* */ } diff --git a/docs/jsdoc-template/static/styles/red5pro-doc.css b/docs/jsdoc-template/static/styles/red5pro-doc.css new file mode 100644 index 0000000..64641e6 --- /dev/null +++ b/docs/jsdoc-template/static/styles/red5pro-doc.css @@ -0,0 +1,53 @@ +body, +.main section article dl h4, +span.icon, +.lnb .member-type { + font-size: 14px; +} + +.lnb { + background-color: #fafafa; +} + +.lnb h3, +.main section article h3.subsection-title, +.lnb .member-type, +.readme p a { + color: rgb(227, 25, 0); +} + +.lnb .lnb-api a, +.lnb .lnb-examples a { + color: #337ab7; +} + +.lnb .lnb-api a:hover, +.lnb .lnb-examples a:hover { + color: #364149; +} + +.lnb .logo { + height: 30px; +} + +.logo { + width: 180px; +} + +footer, +#resizer { + background-color: #a8a8a8; +} + +.lnb .title .link { + color: #364149; + font-style: normal; +} + +.main section article h3.subsection-title { + padding: 35px 0 5px 5px; +} + +.lnb-tab li.selected a { + color: #364149 +} diff --git a/docs/jsdoc-template/static/styles/tui-doc.css b/docs/jsdoc-template/static/styles/tui-doc.css new file mode 100644 index 0000000..aec9ed9 --- /dev/null +++ b/docs/jsdoc-template/static/styles/tui-doc.css @@ -0,0 +1,485 @@ +body { + font-size: 12px; + font-family: Helvetica Neue, Helvetica, Arial, Malgun gothic, '돋움', AppleSDGothicNeo; +} +ul, ol, li {list-style:none; padding-left:0; margin-left:0;} + +/* Navigation - LNB */ +.lnb { + width: 290px; + position: absolute; + bottom: 30px; + top: 0; + overflow: auto; + left: 0; + background-color: #161b1d; + padding: 0 20px; +} +.lnb .logo { + height: 13px; + margin: 20px auto 0; +} +.lnb .title { + text-align: center; + padding: 0 0 15px; +} +.lnb .title .link { + color: #fff; + font-style: italic; +} +.lnb h3 { + font-size: 1.5em; + color: #fa3282; +} +.lnb h3 a { + color: #fa3282; +} +.lnb h3 a:hover { + color: #9a3282; +} +.lnb .lnb-api li, +.lnb .lnb-examples li { + padding-top: 5px; + padding-bottom: 5px; + border-bottom: 1px solid #1f292e; +} +.lnb .lnb-api h3 a { + color: #fa3282; +} +.lnb .lnb-api h3 a:hover { + color: #fa3282; + text-decoration: underline; +} +.lnb .lnb-api a, +.lnb .lnb-examples a { + color: #7cafc2; +} +.lnb .lnb-api a:hover, +.lnb .lnb-examples a:hover { + color: #a3cfdf; +} +.lnb .lnb-api .toggle-subnav { + padding: 0 3px; + margin-bottom: 0; +} +.lnb .lnb-api .toggle-subnav:focus { + outline: 0; +} +.lnb .lnb-api .toggle-subnav { + font-size: 10px; +} +.lnb .member-type { + margin-top: 5px; + margin-left: 5px; + color: #568c3b; + font-weight: normal; + font-size: 10px; + cursor: text; +} +.lnb .inner li { + margin-left: 15px; + border-bottom: 0; + padding-top: 0; + padding-bottom: 0; + color: #bbb; +} +.lnb .inner a { + color: #bbb; +} +.lnb .inner a:hover { + color: #eee; +} + +.lnb .version { + color: #aaa; + font-size: 1.2em; +} + +/* LNB-TAB */ +.lnb-tab { + text-align: center; + text-decoration: none; +} +.lnb-tab li { + display: inline-block; + padding-top: 15px; +} +.lnb-tab li a { + color: #aaa; + font-size: 0.9em; +} +.lnb-tab li.selected a { + color: #fff; + font-size: 1em; +} +.lnb-tab li+li a h4:before { + content: "\007C"; + display: inline-block; + color: #999; + padding: 0 10px; +} + +/* MAIN-CONTENT */ +.main { + padding: 20px; + left: 297px; + right: 0; + top: 0; + bottom: 0; + position: absolute; + overflow: auto; + margin-bottom: 35px; +} +.main article ol, +.main article ul { + margin-left: 15px; +} +.main section header { + padding-top: 0; + border-bottom: 1px solid #999; +} +.main section header h2 { + font-size:18px; + font-weight:bold; + padding-left : 5px; + border-left: 5px solid #dc9656; +} +.main section article { + padding: 10px; +} +.main section article .container-overview { + padding: 15px 15px 0 15px; + border: 1px solid #dedede; + border-radius: 7px; +} +.main section article h3.subsection-title { + font-size:16px; + color: #fa3282; + padding:35px 0 0 5px; + border-bottom: 1px solid #dedede; +} +.main section article dl h4 { + font-size: 12px; + font-weight: bold; +} +.main section article dl h4 .signature { + font-size: 9pt; +} +.main section article dl h4 .type-signature { + font-size: 9pt; + color: #31708f; + font-weight: normal; +} +.main section article dl dt .name { + padding: 3px 10px; + background-color: #f4f7f8; +} +.main section article dl dd { + padding: 0 30px; +} +.main section article dl dd h5{ + font-weight: bold; +} +.main section article .container-source { + margin: -15px -15px 3px 0; + font-weight: normal; + font-size: 8pt; + text-align: right; + padding-right: 10px; +} +.main section article .container-returns { + margin-bottom: 7px; +} +.main section article .container-returns span, +.main section article .container-params table { + border-left: 3px solid #eee; + margin-left: 7px; + padding-left: 3px; + margin-bottom: 5px; +} +.main section article .container-returns p { + display: inline; +} +.main section article .container-properties h5, +.main section article .container-returns h5, +.main section article .container-params h5, +.main section article table th, +.main section article table td.type, +.main section article table td.attributes { + font-family: Verdana, sans-serif; + font-size: 90%; +} +.main section article table, +.main section article table th, +.main section article table td { + font-family: Verdana, sans-serif; + vertical-align: top; + border: 0; + padding: 1px 3px; +} +.main section article table td.name, +.main section article table td.type, +.main section article table td.attributes, +.main section article table td.default { + max-width: 100px; + min-width: 80px; + word-break: break-all; +} +.main section article table td.type, +.main section article table td.attributes { + color: #aaa; +} +.main section article table td p { + padding: 0; + margin: 0; +} +.main section article table td h6 { + padding: 0 0 0 3px; + margin: 3px 0 0 3px; + font-size: 85%; +} +.main section article .container-properties table.props { + margin-top: -3px; +} +.main .main-content article { + padding:0; +} +.main .container-overview, +.main .main-datail { + overflow: hidden; +} +.main .main-detail .tag-source { + float:left; + display:none; +} +.main .main-detail .tag-author { + float:left; +} +.main .main-detail .tag-author a { + color:#181818; + font-size:11px; + text-decoration:none; +} +.linenums li.selected { + background: #faebd7; +} +.iinenums .number { + color: #777; + display: inline-block; + width: 40px; +} + +/* FOOTER */ +footer { + padding-top: 3px; + line-height: 35px; + height: 35px; + position: fixed; + width: 100%; + bottom: 0; + background-color: #00beaa; + color: #ebf8ff; + text-align: center; +} + +/* README*/ +.readme { + font-size: 14px; +} +.readme p, +.readme ul, +.readme ol { + padding: 3px 0 3px 5px; +} +.readme li { + list-style: initial; +} +.readme img { + max-width: 100%; +} +.readme h1 { + font-size:24px; + font-weight:normal; + padding: 10px 0 5px 0; + border-bottom: 1px solid #428bca; +} +.readme pre { + margin: 15px 3px; +} +.readme li p { + padding: 10px 0; + color: #333; +} +.readme p a { + color:#c7254e; +} +.readme h2 { + padding-bottom: 3px; + border-bottom: 1px solid #dedede; + font-size: 22px; +} +.readme h3 { + font-size: 20px; + padding-bottom: 3px; +} + +.readme h4 { + font-size: 18px; +} +.readme h5 { + font-size: 16px; +} +.readme h6 { + font-size: 15px; +} +.readme table { + margin: 5px 30px 20px; +} +.readme table th, +.readme table td { + padding: 2px 20px 2px 5px; + border-bottom: 1px solid #dedede; +} +.readme section header h2 { + font-size:20px; + padding-left:10px; + border-left:5px solid #fa3282; +} +.readme section .container-overview { + color:#333; + border-radius: 2px; + border:1px solid #dedede; + padding:15px 15px 10px; +} +.readme section .container-overview .description { + color:#666; +} +.readme section .container-overview dt {float:left; } +.readme section .container-overview dd {float:left; margin-left:10px; } +.readme blockquote { + padding: inherit; + margin: inherit; + font-size: inherit; + color: #777; +} + +/* Search box */ +.search-container { + position: relative; + padding-bottom: 10px; +} +.search-container input { + padding: 7px; + width: 100%; + color: #aaa; + border: 1px solid #585858; + background-color: #373737; + border-radius: 2px; +} +.search-container a { + color: #fff; +} +.search-container strong { + color: pink; + font-weight: normal; +} +.search-container ul { + font-size: 13px; + position: absolute; + width: 100%; + background-color: #456e82; + border: 1px solid #1f292e; + border-radius: 0 0 2px 2px; + opacity: 0.9; + filter: alpha(opacity=90); +} +.search-container ul li { + text-align: left; + width: 100%; + padding: 4px 0 4px 7px; + overflow: hidden; + border: 0; + cursor: pointer; +} +.search-container ul li:hover, +.search-container ul li.highlight{ + background-color: #fff; +} +.search-container ul li:hover a, +.search-container ul li.highlight a { + color: #1f292e; + text-decoration: underline; +} +.search-container ul li:hover strong, +.search-container ul li.highlight strong { + color: #ff4141; +} +.search-container ul li .group { + font-size: 11px; + color: #ccc; + margin-left: 10px; +} +.search-container ul li:hover .group, +.search-container ul li.highlight .group { + color: #777; +} + +/* ETC */ +.logo { + width: 90px; + vertical-align: initial; +} +.hidden { + display: none; +} +.footer-text { + padding-left: 3px; + display: inline-block; +} +#example-nav { + margin-top: 15px; +} +#resizer { + width: 7px; + position: fixed; + left: 290px; + height: 100%; + background-color: #00beaa; + cursor: col-resize; +} +span.param-type { + color: #aaa; +} +pre.prettyprint { + font-size: 0.9em; + border-radius: 0; +} +span.icon { + font-size: 8pt; + border-radius: 3px; + padding: 1px 2px; +} +span.icon.green { + color: #3c763d; + background-color: #dff0d8; + border-color: #d6e9c6; +} +span.icon.blue { + color: #31708f; + background-color: #d9edf7; + border-color: #bce8f1; +} +span.icon.yellow { + color: #8a6d3b; + background-color: #fcf8e3; + border-color: #faebcc; +} +span.icon.red { + color: #A94443; + background-color: #f2dede; + border-color: #ebccd1; +} +span.arrow { + font-size: 8pt; + padding-right: 5px; +} diff --git a/docs/jsdoc-template/tmpl/augments.tmpl b/docs/jsdoc-template/tmpl/augments.tmpl new file mode 100755 index 0000000..446d28a --- /dev/null +++ b/docs/jsdoc-template/tmpl/augments.tmpl @@ -0,0 +1,10 @@ + + + +
      +
    • +
    + diff --git a/docs/jsdoc-template/tmpl/container.tmpl b/docs/jsdoc-template/tmpl/container.tmpl new file mode 100755 index 0000000..3a51cba --- /dev/null +++ b/docs/jsdoc-template/tmpl/container.tmpl @@ -0,0 +1,186 @@ + + + + + + + + + +
    + +
    + +

    Global

    + +

    + +

    + +
    + + +

    + + +
    + + + +
    + +
    + +
    + + +
    + + + + + + + + + +
    + + + + + +

    Example 1? 's':'' ?>

    + + + +
    + + + +

    Extends

    + + + + + +

    Requires

    + +
      +
    • +
    + + + +

    Classes

    + + + + +

    Interfaces

    + + + + + +

    Mixins

    + + + + +

    Namespaces

    + + + + +

    Members

    + +
    + +
    + + + +

    Methods

    + +
    + +
    + + + +

    Type Definitions

    + +
    + + + +
    + + + +

    Events

    + +
    + +
    + +
    + +
    + + + diff --git a/docs/jsdoc-template/tmpl/details.tmpl b/docs/jsdoc-template/tmpl/details.tmpl new file mode 100755 index 0000000..5a82790 --- /dev/null +++ b/docs/jsdoc-template/tmpl/details.tmpl @@ -0,0 +1,136 @@ +" + data.defaultvalue + ""; + defaultObjectClass = ' class="object-value"'; +} +?> + + +
    Properties:
    + + + + + +
    + + +
    Version:
    +
    + + + +
    Since:
    +
    + + + +
    Inherited From:
    +
    • + +
    + + + +
    Overrides:
    +
    • + +
    + + + +
    Implementations:
    +
      + +
    • + +
    + + + +
    Implements:
    +
      + +
    • + +
    + + + +
    Mixes In:
    + +
      + +
    • + +
    + + + +
    Deprecated:
    • Yes
    + + + +
    Author:
    +
    +
      +
    • +
    +
    + + + + + + + + +
    License:
    +
    + + + +
    Default Value:
    +
      + > +
    + + + +
    Tutorials:
    +
    +
      +
    • +
    +
    + + + +
    See:
    +
    +
      +
    • +
    +
    + + + +
    To Do:
    +
    +
      +
    • +
    +
    + +
    diff --git a/docs/jsdoc-template/tmpl/example.tmpl b/docs/jsdoc-template/tmpl/example.tmpl new file mode 100755 index 0000000..e87caa5 --- /dev/null +++ b/docs/jsdoc-template/tmpl/example.tmpl @@ -0,0 +1,2 @@ + +
    diff --git a/docs/jsdoc-template/tmpl/examples.tmpl b/docs/jsdoc-template/tmpl/examples.tmpl new file mode 100755 index 0000000..04d975e --- /dev/null +++ b/docs/jsdoc-template/tmpl/examples.tmpl @@ -0,0 +1,13 @@ + +

    + +
    + \ No newline at end of file diff --git a/docs/jsdoc-template/tmpl/exceptions.tmpl b/docs/jsdoc-template/tmpl/exceptions.tmpl new file mode 100755 index 0000000..9cef6c7 --- /dev/null +++ b/docs/jsdoc-template/tmpl/exceptions.tmpl @@ -0,0 +1,32 @@ + + +
    +
    +
    + +
    +
    +
    +
    +
    +
    + Type +
    +
    + +
    +
    +
    +
    +
    + +
    + + + + + +
    + diff --git a/docs/jsdoc-template/tmpl/layout.tmpl b/docs/jsdoc-template/tmpl/layout.tmpl new file mode 100755 index 0000000..cf08223 --- /dev/null +++ b/docs/jsdoc-template/tmpl/layout.tmpl @@ -0,0 +1,121 @@ + + + + + + + <?js= title + ' | ' + name ?> + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +
    + +
    + + + + + + + + + + + diff --git a/docs/jsdoc-template/tmpl/mainpage.tmpl b/docs/jsdoc-template/tmpl/mainpage.tmpl new file mode 100755 index 0000000..0383f7d --- /dev/null +++ b/docs/jsdoc-template/tmpl/mainpage.tmpl @@ -0,0 +1,10 @@ + + + +
    +
    +
    + diff --git a/docs/jsdoc-template/tmpl/members.tmpl b/docs/jsdoc-template/tmpl/members.tmpl new file mode 100755 index 0000000..7db96b0 --- /dev/null +++ b/docs/jsdoc-template/tmpl/members.tmpl @@ -0,0 +1,52 @@ + + +
    +

    + + +
    + , + +
    + +

    + + +

    + +
    +
    + +
    + +
    + + + + + + + +
    Fires:
    +
      +
    • +
    + + + +
    Example 1? 's':'' ?>
    + + +
    diff --git a/docs/jsdoc-template/tmpl/method.tmpl b/docs/jsdoc-template/tmpl/method.tmpl new file mode 100755 index 0000000..be9672d --- /dev/null +++ b/docs/jsdoc-template/tmpl/method.tmpl @@ -0,0 +1,123 @@ + + +
    + +

    + + + + + + +
    + , + +
    + +

    + + +

    + + +
    +
    + + +
    + +
    + + + +
    Extends:
    + + + + +
    Type:
    +
      +
    • + +
    • +
    + + + +
    This:
    +
    + + + +
    +
    Parameters:
    + +
    + + + +
    Requires:
    +
      +
    • +
    + + + +
    Fires:
    +
      +
    • +
    + + + +
    Listens to Events:
    +
      +
    • +
    + + + +
    Listeners of This Event:
    +
      +
    • +
    + + + +
    Throws:
    + 1) { ?>
      +
    • +
    + + + + +
    +
    Returns:
    + 1) { ?>
      +
    • +
    + + +
    + + + + + +
    Example 1? 's':'' ?>
    + + + +
    diff --git a/docs/jsdoc-template/tmpl/params.tmpl b/docs/jsdoc-template/tmpl/params.tmpl new file mode 100755 index 0000000..83d285f --- /dev/null +++ b/docs/jsdoc-template/tmpl/params.tmpl @@ -0,0 +1,123 @@ + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDefaultDescription
    + + + + + + <optional>
    + + + + <nullable>
    + + + + <repeatable>
    + +
    + + + + +
    Properties
    + +
    diff --git a/docs/jsdoc-template/tmpl/properties.tmpl b/docs/jsdoc-template/tmpl/properties.tmpl new file mode 100755 index 0000000..40e0909 --- /dev/null +++ b/docs/jsdoc-template/tmpl/properties.tmpl @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDefaultDescription
    + + + + + + <optional>
    + + + + <nullable>
    + +
    + + + + +
    Properties
    +
    diff --git a/docs/jsdoc-template/tmpl/returns.tmpl b/docs/jsdoc-template/tmpl/returns.tmpl new file mode 100755 index 0000000..af87305 --- /dev/null +++ b/docs/jsdoc-template/tmpl/returns.tmpl @@ -0,0 +1,13 @@ + + + + + + + +- + + + diff --git a/docs/jsdoc-template/tmpl/source.tmpl b/docs/jsdoc-template/tmpl/source.tmpl new file mode 100755 index 0000000..e559b5d --- /dev/null +++ b/docs/jsdoc-template/tmpl/source.tmpl @@ -0,0 +1,8 @@ + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/docs/jsdoc-template/tmpl/subsection-default.tmpl b/docs/jsdoc-template/tmpl/subsection-default.tmpl new file mode 100644 index 0000000..3ff3c11 --- /dev/null +++ b/docs/jsdoc-template/tmpl/subsection-default.tmpl @@ -0,0 +1,17 @@ + + +
    + +
    +

    + +
    + +
    +

    +
    +
    + +
    diff --git a/docs/jsdoc-template/tmpl/tutorial.tmpl b/docs/jsdoc-template/tmpl/tutorial.tmpl new file mode 100755 index 0000000..eeaf8b9 --- /dev/null +++ b/docs/jsdoc-template/tmpl/tutorial.tmpl @@ -0,0 +1,102 @@ + + +
    +
    + 0) { ?> +
      +
    • +
    + + +

    +
    + + + + + +
    + + + + +
    + +
    + +
    + +
    + + + + diff --git a/docs/jsdoc-template/tmpl/type.tmpl b/docs/jsdoc-template/tmpl/type.tmpl new file mode 100755 index 0000000..ec2c6c0 --- /dev/null +++ b/docs/jsdoc-template/tmpl/type.tmpl @@ -0,0 +1,7 @@ + + +| + \ No newline at end of file diff --git a/examples/browser/dual-rtc.html b/examples/browser/dual-rtc.html new file mode 100644 index 0000000..1660b48 --- /dev/null +++ b/examples/browser/dual-rtc.html @@ -0,0 +1,84 @@ + + + + + + + + + +
    + +
    + +
    + +
    + + + + + + + diff --git a/package-lock.json b/package-lock.json index 4f218a7..4aa75e0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -197,6 +197,12 @@ "resolved": "https://registry.npmjs.org/@browser-bunyan/levels/-/levels-1.3.0.tgz", "integrity": "sha1-oFIwOuXRofm2Pus6lElaL0KfSDE=" }, + "@types/node": { + "version": "10.3.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.3.2.tgz", + "integrity": "sha512-9NfEUDp3tgRhmoxzTpTo+lq+KIVFxZahuRX0LHF/9IzKHaWuoWsIrrJ61zw5cnnlGINX8lqJzXYfQTOICS5Q+A==", + "dev": true + }, "@webassemblyjs/ast": { "version": "1.5.10", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.5.10.tgz", @@ -1473,6 +1479,12 @@ "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", "dev": true }, + "boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", + "dev": true + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -1702,6 +1714,15 @@ "integrity": "sha512-iHK48UR/InydhpPAzgSmsJXRAR925T0kwJhZ1wk0xRatpGMvi2f06LABg6HXfV4WW4P2wChzlcFa/TEmbTyXQA==", "dev": true }, + "catharsis": { + "version": "0.8.9", + "resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.8.9.tgz", + "integrity": "sha1-mMyJDKZS3S7w5ws3klMQ/56Q/Is=", + "dev": true, + "requires": { + "underscore-contrib": "0.3.0" + } + }, "chalk": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", @@ -1721,6 +1742,20 @@ "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", "dev": true }, + "cheerio": { + "version": "1.0.0-rc.2", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.2.tgz", + "integrity": "sha1-S59TqBsn5NXawxwP/Qz6A8xoMNs=", + "dev": true, + "requires": { + "css-select": "1.2.0", + "dom-serializer": "0.1.0", + "entities": "1.1.1", + "htmlparser2": "3.9.2", + "lodash": "4.17.10", + "parse5": "3.0.3" + } + }, "chokidar": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.3.tgz", @@ -2052,6 +2087,24 @@ "randomfill": "1.0.4" } }, + "css-select": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", + "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", + "dev": true, + "requires": { + "boolbase": "1.0.0", + "css-what": "2.1.0", + "domutils": "1.5.1", + "nth-check": "1.0.1" + } + }, + "css-what": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.0.tgz", + "integrity": "sha1-lGfQMsOM+u+58teVASUwYvh/ob0=", + "dev": true + }, "cyclist": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz", @@ -2221,12 +2274,55 @@ "esutils": "2.0.2" } }, + "dom-serializer": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz", + "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=", + "dev": true, + "requires": { + "domelementtype": "1.1.3", + "entities": "1.1.1" + }, + "dependencies": { + "domelementtype": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz", + "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=", + "dev": true + } + } + }, "domain-browser": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", "dev": true }, + "domelementtype": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.0.tgz", + "integrity": "sha1-sXrtguirWeUt2cGbF1bg/BhyBMI=", + "dev": true + }, + "domhandler": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", + "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", + "dev": true, + "requires": { + "domelementtype": "1.3.0" + } + }, + "domutils": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", + "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", + "dev": true, + "requires": { + "dom-serializer": "0.1.0", + "domelementtype": "1.3.0" + } + }, "duplexer2": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz", @@ -2321,6 +2417,12 @@ "tapable": "1.0.0" } }, + "entities": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz", + "integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA=", + "dev": true + }, "errno": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", @@ -3927,6 +4029,20 @@ "parse-passwd": "1.0.0" } }, + "htmlparser2": { + "version": "3.9.2", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.9.2.tgz", + "integrity": "sha1-G9+HrMoPP55T+k/M6w9LTLsAszg=", + "dev": true, + "requires": { + "domelementtype": "1.3.0", + "domhandler": "2.4.2", + "domutils": "1.5.1", + "entities": "1.1.1", + "inherits": "2.0.3", + "readable-stream": "2.3.6" + } + }, "https-browserify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", @@ -4365,6 +4481,43 @@ "esprima": "4.0.0" } }, + "js2xmlparser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-3.0.0.tgz", + "integrity": "sha1-P7YOqgicVED5MZ9RdgzNB+JJlzM=", + "dev": true, + "requires": { + "xmlcreate": "1.0.2" + } + }, + "jsdoc": { + "version": "3.5.5", + "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.5.5.tgz", + "integrity": "sha512-6PxB65TAU4WO0Wzyr/4/YhlGovXl0EVYfpKbpSroSj0qBxT4/xod/l40Opkm38dRHRdQgdeY836M0uVnJQG7kg==", + "dev": true, + "requires": { + "babylon": "7.0.0-beta.19", + "bluebird": "3.5.1", + "catharsis": "0.8.9", + "escape-string-regexp": "1.0.5", + "js2xmlparser": "3.0.0", + "klaw": "2.0.0", + "marked": "0.3.19", + "mkdirp": "0.5.1", + "requizzle": "0.2.1", + "strip-json-comments": "2.0.1", + "taffydb": "2.6.2", + "underscore": "1.8.3" + }, + "dependencies": { + "babylon": { + "version": "7.0.0-beta.19", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-7.0.0-beta.19.tgz", + "integrity": "sha512-Vg0C9s/REX6/WIXN37UKpv5ZhRi6A4pjHlpkE34+8/a6c2W1Q692n3hmc+SZG5lKRnaExLUbxtJ1SVT+KaCQ/A==", + "dev": true + } + } + }, "jsesc": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", @@ -4401,6 +4554,15 @@ "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", "dev": true }, + "klaw": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-2.0.0.tgz", + "integrity": "sha1-WcEo4Nxc5BAgEVEZTuucv4WGUPY=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11" + } + }, "lcid": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", @@ -4658,6 +4820,12 @@ "object-visit": "1.0.1" } }, + "marked": { + "version": "0.3.19", + "resolved": "https://registry.npmjs.org/marked/-/marked-0.3.19.tgz", + "integrity": "sha512-ea2eGWOqNxPcXv8dyERdSr/6FmzvWwzjMxpfGB/sbMccXoct+xY+YukPD+QTUZwyvK7BZwcr4m21WBOW41pAkg==", + "dev": true + }, "md5.js": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", @@ -4942,6 +5110,15 @@ "path-key": "2.0.1" } }, + "nth-check": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.1.tgz", + "integrity": "sha1-mSms32KPwsQQmN6rgqxYDPFJquQ=", + "dev": true, + "requires": { + "boolbase": "1.0.0" + } + }, "number-is-nan": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", @@ -5200,6 +5377,15 @@ "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", "dev": true }, + "parse5": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-3.0.3.tgz", + "integrity": "sha512-rgO9Zg5LLLkfJF9E6CCmXlSE4UVceloys8JrFqCcHloC3usd/kJCyPDwH2SOlzix2j3xaP9sUX3e8+kvkuleAA==", + "dev": true, + "requires": { + "@types/node": "10.3.2" + } + }, "pascalcase": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", @@ -5607,6 +5793,23 @@ "resolve-from": "1.0.1" } }, + "requizzle": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.1.tgz", + "integrity": "sha1-aUPDUwxNmn5G8c3dUcFY/GcM294=", + "dev": true, + "requires": { + "underscore": "1.6.0" + }, + "dependencies": { + "underscore": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz", + "integrity": "sha1-izixDKze9jM3uLJOT/htRa6lKag=", + "dev": true + } + } + }, "resolve": { "version": "1.7.1", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.7.1.tgz", @@ -6268,6 +6471,12 @@ } } }, + "taffydb": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/taffydb/-/taffydb-2.6.2.tgz", + "integrity": "sha1-fLy2S1oUG2ou/CxdLGe04VCyomg=", + "dev": true + }, "tapable": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.0.0.tgz", @@ -6464,6 +6673,29 @@ "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", "dev": true }, + "underscore": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", + "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=", + "dev": true + }, + "underscore-contrib": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/underscore-contrib/-/underscore-contrib-0.3.0.tgz", + "integrity": "sha1-ZltmwkeD+PorGMn4y7Dix9SMJsc=", + "dev": true, + "requires": { + "underscore": "1.6.0" + }, + "dependencies": { + "underscore": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz", + "integrity": "sha1-izixDKze9jM3uLJOT/htRa6lKag=", + "dev": true + } + } + }, "union-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", @@ -7004,6 +7236,12 @@ "mkdirp": "0.5.1" } }, + "xmlcreate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-1.0.2.tgz", + "integrity": "sha1-+mv3YqYKQT+z3Y9LA8WyaSONMI8=", + "dev": true + }, "xtend": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", diff --git a/package.json b/package.json index 503b80e..b0dc79e 100644 --- a/package.json +++ b/package.json @@ -2,17 +2,22 @@ "name": "red5pro-extension-stream-manager", "version": "1.0.0", "description": "Library extension for Stream Manager support", - "main": "index.js", - "scripts": { - "webpack:build": "webpack", - "webpack:build-min": "NODE_ENV=staging webpack", - "webpack:dist": "NODE_ENV=production webpack", - "postwebpack:build": "gulp move-build-to-examples", - "lint": "eslint ./src --ext .js", - "test": "test" + "main": "src/index.js", + "repository": { + "type": "git", + "url": "git+https://github.com/red5pro/red5pro-extension-stream-manager.git" }, - "author": "", - "license": "ISC", + "keywords": [ + "Red5", + "Red5Pro", + "Publisher", + "Subscriber", + "Video", + "Streaming", + "StreamManager" + ], + "author": "Infrared5 Inc.", + "license": "MIT", "devDependencies": { "babel-core": "^6.26.3", "babel-eslint": "^8.2.3", @@ -25,14 +30,25 @@ "babel-preset-env": "^1.7.0", "babel-preset-es2015": "^6.24.1", "babel-preset-es2017": "^6.24.1", + "cheerio": "^1.0.0-rc.2", "colors": "^1.3.0", "eslint": "^4.19.1", "gulp": "^3.9.1", + "jsdoc": "^3.5.5", "webpack": "^4.11.1", "webpack-cli": "^3.0.3" }, "dependencies": { "browser-bunyan": "^1.3.0", "whatwg-fetch": "^2.0.4" + }, + "scripts": { + "webpack:build": "webpack", + "webpack:build-min": "NODE_ENV=staging webpack", + "webpack:dist": "NODE_ENV=production webpack", + "postwebpack:build": "gulp move-build-to-examples", + "lint": "eslint ./src --ext .js", + "test": "test", + "docs:api": "jsdoc -r src/js -d docs/api -c .jsdoc" } } From e572781e261d00e00dfb7d6cc3395b122bc91a3f Mon Sep 17 00:00:00 2001 From: bustardcelly Date: Mon, 11 Jun 2018 13:32:32 -0400 Subject: [PATCH 09/15] adding in jsdoc comments. --- docs/api/global.html | 575 ++++++++++++++++++ docs/api/index.html | 14 +- .../module-red5prosdk_ext_stream_manager.html | 169 ++++- examples/browser/dual-rtc.html | 4 +- .../lib/red5pro/red5pro-ext-stream-manager.js | 197 +++++- src/js/autoscale/index.js | 44 +- src/js/autoscale/request.js | 26 +- src/js/env/browser.js | 6 + src/js/index.js | 114 ++++ 9 files changed, 1132 insertions(+), 17 deletions(-) create mode 100644 docs/api/global.html diff --git a/docs/api/global.html b/docs/api/global.html new file mode 100644 index 0000000..29766c9 --- /dev/null +++ b/docs/api/global.html @@ -0,0 +1,575 @@ + + + + + Global | red5pro-extension-stream-manager + + + + + + + + + + + + + + +
    + +
    + + + + + +
    + +
    + +

    Global

    + +
    + +
    + + + + + + + + + + + + + + + +

    Members

    + +
    + + +
    +

    + constant Autoscale + +

    + + +
    +
    + +
    +

    Top-level decorate function.

    +
    + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    + + + + +
    +

    + constant Decorate + +

    + + +
    +
    + +
    +

    Class decorator for Publisher and Subscriber types from the Red5 Pro HTML SDK.

    +
    + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    + +
    + + + +

    Methods

    + +
    + + +
    + +

    + + async autoscaleInit(proxy, autoscaleConfig, initConfig) + + +

    + + + +
    +
    + + +
    +

    Attempts to make requests on the Stream Manager for Origin/Edge information.

    +
    + + + + + + + + + +
    +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    proxy + + +Object + + + +

    The established Publisher or Subscriber instance of the Red5 Pro SDK.

    autoscaleConfig + + +Object + + + +

    The configuration object used in communicating with the Stream Manager.

    initConfig + + +Object + + + +

    The initialization configuration to be used in the init call on the proxy instance once the Stream Manager call has been resolved.

    + +
    + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
    + + + + +
    + +

    + + async request(config) + + +

    + + + +
    +
    + + +
    +

    Makes a request on the Stream Manager for Origin or Edge information based on passed in configuration.

    +
    + + + + + + + + + +
    +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    config + + +Object + + + +

    The configuration object to use in constructing the URL request.

    + +
    + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    Example
    + +
    // The following is an example of the configuration to pass
    + const autoscaleConfig = {
    +   action: 'broadcast',    // required, either 'broadcast' or 'subscribe'
    +   protocol: 'https',      // required, default=https
    +   host: 'sm.company.org', // required, the FQDN of the Stream Manager
    +   port: undefined,        // optional, if `undefined` assumes it served over SSL
    +   scope: 'live',          // optional, default=live
    +   streamName: 'mystream', // required
    +   apiVersion: '3.0',      // required, default=3.0
    +   region: undefined,      // optional, when using the optional `region` query param
    +   accessToken: undefined, // optional, when using security on Stream Manager
    +   retryLimit: 0,          // optional, default (no retry)
    +   retryDelay: 1000,       // optional, default=1000
    +   useProxy: true          // optional, default=true. Enforces connection proxy for WebRTC clients
    + }
    + + + +
    + +
    + + + + + +
    + +
    + + + + +
    + +
    + +
    + + + + + + + + + \ No newline at end of file diff --git a/docs/api/index.html b/docs/api/index.html index 859a2c7..f5d0e21 100644 --- a/docs/api/index.html +++ b/docs/api/index.html @@ -35,7 +35,7 @@

    red5pro-extension-stream-manager

      - +
      @@ -71,11 +71,11 @@

      Quickstart

      <!doctype
           <!-- video containers -->
           <!-- publisher -->
           <div>
      -      <video id="red5pro-publisher" width="640" height="480" muted autoplay></video>
      +      <video id="red5pro-publisher" width="640" height="480" muted autoplay playsinline></video>
           </div>
           <!-- subscriber -->
           <div>
      -      <video id="red5pro-subscriber" width="640" height="480" controls autoplay></video>
      +      <video id="red5pro-subscriber" width="640" height="480" controls autoplay playsinline></video>
           </div>
           <!-- Red5 Pro SDK -->
           <script src="lib/red5pro/red5pro-sdk.min.js"></script>
      @@ -105,7 +105,7 @@ 

      Quickstart

      <!doctype
               var initConfig = {
                 protocol: 'wss',
                 host: 'streammanager.company.org',
      -          port: 8081,
      +          port: 8083:,
                 app: 'live',
                 streamName: 'mystream',
                 iceServers: [{urls: 'stun:stun2.l.google.com:19302'}]
      @@ -119,7 +119,8 @@ 

      Quickstart

      <!doctype
               });
       
               function subscribe () {
      -          rtcSubscriber.autoscale(subscribeAutoscaleConfig, initConfig)
      +          rtcSubscriber
      +            .autoscale(subscribeAutoscaleConfig, initConfig)
                   .then(function () {
                     return rtcSubscriber.subscribe();
                   })
      @@ -129,7 +130,8 @@ 

      Quickstart

      <!doctype
               }
       
               // First connect Autoscale-d Publisher.
      -        rtcPublisher.autoscale(publishAutoscaleConfig, initConfig)
      +        rtcPublisher
      +          .autoscale(publishAutoscaleConfig, initConfig)
                 .then(function () {
                   // Once publishing, we will start the Autoscale-d Subscriber.
                   rtcPublisher.on(red5prosdk.PublisherEventTypes.PUBLISH_START, subscribe);
      diff --git a/docs/api/module-red5prosdk_ext_stream_manager.html b/docs/api/module-red5prosdk_ext_stream_manager.html
      index cb465d3..1bf8062 100644
      --- a/docs/api/module-red5prosdk_ext_stream_manager.html
      +++ b/docs/api/module-red5prosdk_ext_stream_manager.html
      @@ -35,7 +35,7 @@ 

      red5pro-extension-stream-manager

        - +
        @@ -132,6 +132,94 @@

        red5prosdk_ext_stream_manager

        +
        Example
        + +
        <!doctype html>
        +<html>
        +  <head>
        +    <!-- *Recommended WebRTC Shim -->
        +    <script src="http://webrtc.github.io/adapter/adapter-latest.js"></script>
        +  </head>
        +  <body>
        +    <!-- video containers -->
        +    <!-- publisher -->
        +    <div>
        +      <video id="red5pro-publisher" width="640" height="480" muted autoplay playsinline></video>
        +    </div>
        +    <!-- subscriber -->
        +    <div>
        +      <video id="red5pro-subscriber" width="640" height="480" controls autoplay playsinline></video>
        +    </div>
        +    <!-- Red5 Pro SDK -->
        +    <script src="lib/red5pro/red5pro-sdk.min.js"></script>
        +    <script src="lib/red5pro/red5pro-ext-stream-manager.js"></script>
        +    <!-- Create Pub/Sub with Stream Manager support-->
        +    <script>
        +      (function(red5prosdk, sm_ext) {
        +        'use strict';
        +        red5prosdk.setLogLevel('debug');
        +        sm_ext.setLogLevel('debug');
        +
        +        // Extend the Red5Pro sdk.
        +        sm_ext.decorate();
        +
        +        var rtcPublisher = new red5prosdk.RTCPublisher();
        +        var rtcSubscriber = new red5prosdk.RTCSubscriber();
        +
        +        var autoscaleConfig = {
        +          protocol: 'https',
        +          host: 'streammanager.company.org',
        +          streamName: 'mystream',
        +          scope: 'live',
        +          apiVersion: '3.0',
        +          useProxy: true
        +        };
        +
        +        var initConfig = {
        +          protocol: 'wss',
        +          host: 'streammanager.company.org',
        +          port: 8083:,
        +          app: 'live',
        +          streamName: 'mystream',
        +          iceServers: [{urls: 'stun:stun2.l.google.com:19302'}]
        +        };
        +
        +        var publishAutoscaleConfig = Object.assign({}, autoscaleConfig, {
        +          action: 'broadcast'
        +        });
        +        var subscribeAutoscaleConfig = Object.assign({}, autoscaleConfig, {
        +          action: 'subscribe'
        +        });
        +
        +        function subscribe () {
        +          rtcSubscriber
        +            .autoscale(subscribeAutoscaleConfig, initConfig)
        +            .then(function () {
        +              return rtcSubscriber.subscribe();
        +            })
        +            .catch(function (error) {
        +              console.error('Could not play: ' + error);
        +            });
        +        }
        +
        +        // First connect Autoscale-d Publisher.
        +        rtcPublisher
        +          .autoscale(publishAutoscaleConfig, initConfig)
        +          .then(function () {
        +            // Once publishing, we will start the Autoscale-d Subscriber.
        +            rtcPublisher.on(red5prosdk.PublisherEventTypes.PUBLISH_START, subscribe);
        +            return rtcPublisher.publish();
        +          })
        +          .catch(function (error) {
        +            console.error('Could not publish: ' + error)
        +          });
        +
        +      }(window.red5prosdk, window.red5prosdk_ext_stream_manager));
        +    </script>
        +  </body>
        +</html>
        + + @@ -158,6 +246,85 @@

        Members

        +
        +

        + static, constant decorate + +

        + + +
        +
        + +
        +

        Decorates the publisher and subscriber classes exposed on the Red5 Pro HTML SDK. +This allows for ease in calling autoscale with a familiar init and Promise-like flow.

        +
        + + + + + + + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + + + + + +
        Example
        + +
        red5prosdk_ext_stream_manager.decorate()
        +new red5prosdk.Red5ProPublisher()
        +  .setPublishOrder(['rtc', 'rtmp'])
        +  .autoscale(autoscaleConfig, config)
        +  .then(function (publisher) {
        +    return publisher.publish()
        +  })
        +  .catch(function (error) {
        +    // handle error.
        +  });
        + + +
        + + + +

        static, constant getLogger diff --git a/examples/browser/dual-rtc.html b/examples/browser/dual-rtc.html index 1660b48..39ca315 100644 --- a/examples/browser/dual-rtc.html +++ b/examples/browser/dual-rtc.html @@ -8,11 +8,11 @@
        - +
        - +
        diff --git a/examples/browser/lib/red5pro/red5pro-ext-stream-manager.js b/examples/browser/lib/red5pro/red5pro-ext-stream-manager.js index 61db342..0021155 100644 --- a/examples/browser/lib/red5pro/red5pro-ext-stream-manager.js +++ b/examples/browser/lib/red5pro/red5pro-ext-stream-manager.js @@ -1,7 +1,7 @@ /*! * * red5pro-extension-stream-manager - Library extension for Stream Manager support - * Author: + * Author: Infrared5 Inc. * Version: 1.0.0 * Url: undefined * @@ -4461,7 +4461,7 @@ if (hadRuntime) { Object.defineProperty(exports, "__esModule", { value: true }); -exports.Decorate = exports.Autoscale = exports.autoscaleInit = undefined; +exports.autoscaleInit = exports.Decorate = exports.Autoscale = undefined; var _stringify = __webpack_require__(/*! babel-runtime/core-js/json/stringify */ "./node_modules/babel-runtime/core-js/json/stringify.js"); @@ -4497,9 +4497,20 @@ var isRTC = /(wss|ws)/; // const isRTMP = /(rtmps|rtmp)/ // const isHLS = /(https|http)/ +/** + * Modifies the intialization configuration used for publisher or subscriber. + * This configuration can vary based on target tech and the `useProxy` attribute of the autoscale configuration. + * + * @private + */ var modifyInitConfigWithResponse = function modifyInitConfigWithResponse(config, response, autoscaleConfig) { var c = void 0; + // WebRTC most likely will require `useProxy`. + // This is due to Origin and Edge IPs being returned from the Stream Manager API. + // Only Fully Qualified Domain Names can have an associated cert and WebRTC requires SSL. if (autoscaleConfig.useProxy && isRTC.test(config.protocol)) { + // The structure of a "proxied" configuration is to pass `connectionParams` + // describing the endpoint (Origin/Edge) and requesting through the Stream Manager webapp. var connectionParams = (0, _extends3.default)({}, config.connectionParams, { host: response.serverAddress, app: response.scope.substr(1, response.scope.length - 1) @@ -4513,6 +4524,7 @@ var modifyInitConfigWithResponse = function modifyInitConfigWithResponse(config, connectionParams: connectionParams }); } else { + // If we don't need to proxy, then just inject the Stream Manager response attributes. c = (0, _extends3.default)({}, config, { host: response.serverAddress, app: response.scope.substr(1, response.scope.length - 1), @@ -4522,6 +4534,11 @@ var modifyInitConfigWithResponse = function modifyInitConfigWithResponse(config, return c; }; +/** + * Allows for retry in requesting on the Stream Manager API. + * + * @private + */ var execute = function () { var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(config, count, limit, delay) { var onfailure, response; @@ -4573,7 +4590,17 @@ var execute = function () { }; }(); -var autoscaleInit = exports.autoscaleInit = function () { +/** + * Attempts to make requests on the Stream Manager for Origin/Edge information. + * + * @param {Object} proxy + * The established Publisher or Subscriber instance of the Red5 Pro SDK. + * @param {Object} autoscaleConfig + * The configuration object used in communicating with the Stream Manager. + * @param {Object} initConfig + * The initialization configuration to be used in the `init` call on the `proxy` instance once the Stream Manager call has been resolved. + */ +var autoscaleInit = function () { var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(proxy, autoscaleConfig, initConfig) { var retryCount, retryLimit, retryDelay, response, keys, key; return _regenerator2.default.wrap(function _callee2$(_context2) { @@ -4621,6 +4648,12 @@ var autoscaleInit = exports.autoscaleInit = function () { }; }(); +/** + * Top-level decorate function. + * + * @param {Object} proxy + * The established Publisher or Subscriber instance of the Red5 Pro SDK. + */ var Autoscale = exports.Autoscale = function Autoscale(proxy) { return { init: function init(autoscaleConfig, initConfig) { @@ -4629,6 +4662,12 @@ var Autoscale = exports.Autoscale = function Autoscale(proxy) { }; }; +/** + * Class decorator for Publisher and Subscriber types from the Red5 Pro HTML SDK. + * + * @param {Class} clazz + * The Class reference to apply the `autoscale` function to. + */ var Decorate = exports.Decorate = function Decorate(clazz) { var fn = function fn(autoscaleConfig, initConfig) { return autoscaleInit(this, autoscaleConfig, initConfig); @@ -4638,6 +4677,8 @@ var Decorate = exports.Decorate = function Decorate(clazz) { }); }; +exports.autoscaleInit = autoscaleInit; + /***/ }), /***/ "./src/js/autoscale/request.js": @@ -4685,9 +4726,10 @@ var defaultConfig = { retryLimit: 0, // optional, default (no retry) retryDelay: 1000, // optional, default=1000 useProxy: true // optional, default=true. Enforces connection proxy for WebRTC clients -}; -var endpointFromConfiguration = function endpointFromConfiguration(configuration) { + + // Generates proper URL for request on Stream Manager. +};var endpointFromConfiguration = function endpointFromConfiguration(configuration) { var action = configuration.action, protocol = configuration.protocol, host = configuration.host, @@ -4709,6 +4751,29 @@ var endpointFromConfiguration = function endpointFromConfiguration(configuration return url; }; +/** + * Makes a request on the Stream Manager for Origin or Edge information based on passed in configuration. + * + * @param {Object} config + * The configuration object to use in constructing the URL request. + * + * @example + * // The following is an example of the configuration to pass + * const autoscaleConfig = { + * action: 'broadcast', // required, either 'broadcast' or 'subscribe' + * protocol: 'https', // required, default=https + * host: 'sm.company.org', // required, the FQDN of the Stream Manager + * port: undefined, // optional, if `undefined` assumes it served over SSL + * scope: 'live', // optional, default=live + * streamName: 'mystream', // required + * apiVersion: '3.0', // required, default=3.0 + * region: undefined, // optional, when using the optional `region` query param + * accessToken: undefined, // optional, when using security on Stream Manager + * retryLimit: 0, // optional, default (no retry) + * retryDelay: 1000, // optional, default=1000 + * useProxy: true // optional, default=true. Enforces connection proxy for WebRTC clients + * } + */ var request = function () { var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(config) { var configuration, url, response, payload, error; @@ -4776,10 +4841,16 @@ Object.defineProperty(exports, "__esModule", { __webpack_require__(/*! whatwg-fetch */ "./node_modules/whatwg-fetch/fetch.js"); exports.default = { + /* + * Returns existance of Red5 Pro SDK on window. + */ getRed5ProSDK: function getRed5ProSDK() { return window.red5prosdk; }, + /** + * Returns existance of fetch APi on window. + */ fetch: window.fetch.bind(window) }; @@ -4816,6 +4887,91 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de * @file red5pro-ext-stream-manager.min.js * @module red5prosdk_ext_stream_manager * + * @example + * + * + * + * + * + * + * + * + * + *
        + * + *
        + * + *
        + * + *
        + * + * + * + * + * + * + * */ // SDK_VERSION, LOG_LEVEL injected from webpack build. @@ -4854,6 +5010,21 @@ var LOG_LEVELS = exports.LOG_LEVELS = _log.LEVELS; */ var getLogger = exports.getLogger = _log.getLogger; +/** + * Decorates the publisher and subscriber classes exposed on the Red5 Pro HTML SDK. + * This allows for ease in calling autoscale with a familiar init and Promise-like flow. + * @example + * red5prosdk_ext_stream_manager.decorate() + * new red5prosdk.Red5ProPublisher() + * .setPublishOrder(['rtc', 'rtmp']) + * .autoscale(autoscaleConfig, config) + * .then(function (publisher) { + * return publisher.publish() + * }) + * .catch(function (error) { + * // handle error. + * }); +*/ var decorate = exports.decorate = function decorate() { var red5prosdk = _browser2.default.getRed5ProSDK(); if (red5prosdk) { @@ -4877,6 +5048,20 @@ var decorate = exports.decorate = function decorate() { } }; +/** + * Returns the top-level decorator function. + * You would pass in an already created instance of your desired publisher or subscriber. + * + * @example + * var failover = new red5prosdk.Red5ProPublisher().setPublishOrder(['rtc', 'rtmp']) + * Autoscale(failover).init(autoscaleConfig, initConfig) + * .then(function (publisher) { + * return publisher.publish() + * }) + * .catch(function (error) { + * // handle error. + * }); + */ exports.Autoscale = _autoscale.Autoscale; /***/ }), @@ -5041,4 +5226,4 @@ module.exports = __webpack_require__(/*! /Users/toddanderson/Documents/Workplace /******/ }); }); -//# sourceMappingURL=data:application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kob2JqKSkge1xuICAgICAgICB2YXIgaXRlbXMgPSBvYmoubWFwKGZ1bmN0aW9uIChvYmopIHsgcmV0dXJuIGluc3BlY3Qob2JqKTsgfSk7XG4gICAgICAgIHJldHVybiAnWyAnICsgaXRlbXMuam9pbignLCAnKSArICcgXSc7XG4gICAgfVxuICAgIGlmICh0eXBlb2Ygb2JqID09PSAnb2JqZWN0Jykge1xuICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkob2JqKTtcbiAgICB9XG4gICAgaWYgKHR5cGVvZiBvYmogPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgcmV0dXJuICdbRnVuY3Rpb246ICcgKyBvYmoubmFtZSArICddJztcbiAgICB9XG4gICAgaWYgKHR5cGVvZiBvYmogPT09ICdib29sZWFuJyB8fCB0eXBlb2Ygb2JqID09PSAnbnVtYmVyJykge1xuICAgICAgICByZXR1cm4gb2JqO1xuICAgIH1cbiAgICByZXR1cm4gJ1xcJycgKyBvYmoudG9TdHJpbmcoKSArICdcXCcnO1xufVxuXG5mdW5jdGlvbiBmb3JtYXQoZikge1xuICAgIHZhciBhcmd1bWVudHMkMSA9IGFyZ3VtZW50cztcblxuICAgIGlmICh0eXBlb2YgZiAhPT0gJ3N0cmluZycpIHtcbiAgICAgICAgdmFyIG9iamVjdHMgPSBuZXcgQXJyYXkoYXJndW1lbnRzLmxlbmd0aCk7XG4gICAgICAgIGZvciAodmFyIGkkMSA9IDA7aSQxIDwgYXJndW1lbnRzLmxlbmd0aDsgaSQxKyspIHtcbiAgICAgICAgICAgIG9iamVjdHNbaSQxXSA9IGluc3BlY3QoYXJndW1lbnRzJDFbaSQxXSk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG9iamVjdHMuam9pbignICcpO1xuICAgIH1cbiAgICB2YXIgZm9ybWF0UmVnRXhwID0gLyVbc2RqJV0vZztcbiAgICB2YXIgaSA9IDE7XG4gICAgdmFyIGFyZ3MgPSBhcmd1bWVudHM7XG4gICAgdmFyIGxlbiA9IGFyZ3MubGVuZ3RoO1xuICAgIHZhciBzdHIgPSBTdHJpbmcoZikucmVwbGFjZShmb3JtYXRSZWdFeHAsIGZ1bmN0aW9uICh4KSB7XG4gICAgICAgIGlmICh4ID09PSAnJSUnKSB7XG4gICAgICAgICAgICByZXR1cm4gJyUnO1xuICAgICAgICB9XG4gICAgICAgIGlmIChpID49IGxlbikge1xuICAgICAgICAgICAgcmV0dXJuIHg7XG4gICAgICAgIH1cbiAgICAgICAgc3dpdGNoICh4KSB7XG4gICAgICAgICAgICBjYXNlICclcyc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIFN0cmluZyhhcmdzW2krK10pO1xuICAgICAgICAgICAgY2FzZSAnJWQnOlxuICAgICAgICAgICAgICAgIHJldHVybiBOdW1iZXIoYXJnc1tpKytdKTtcbiAgICAgICAgICAgIGNhc2UgJyVqJzpcbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkoYXJnc1tpKytdKTtcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChfKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW0NpcmN1bGFyXSc7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICByZXR1cm4geDtcbiAgICAgICAgfVxuICAgIH0pO1xuICAgIGZvciAodmFyIHggPSBhcmdzW2ldO2kgPCBsZW47IHggPSBhcmdzWysraV0pIHtcbiAgICAgICAgc3RyICs9ICcgJyArIHg7XG4gICAgfVxuICAgIHJldHVybiBzdHI7XG59XG5cbmZ1bmN0aW9uIGV4dHJhY3RTcmNGcm9tU3RhY2t0cmFjZShzdGFjaywgbGV2ZWwpIHtcbiAgICB2YXIgc3RhY2tMaW5lcyA9IHN0YWNrLnNwbGl0KCdcXG4nKTtcbiAgICBpZiAoc3RhY2tMaW5lc1swXSAmJiBzdGFja0xpbmVzWzBdLmluZ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hbXMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgdmFyIHMgPSB0aGlzJDEuc3RyZWFtc1tpXTtcbiAgICAgICAgaWYgKHMubGV2ZWwgPD0gbGV2ZWwpIHtcbiAgICAgICAgICAgIHMuc3RyZWFtLndyaXRlKHJlYyk7XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIHN0cjtcbn07XG5mdW5jdGlvbiBta0xvZ0VtaXR0ZXIobWluTGV2ZWwpIHtcbiAgICByZXR1cm4gZnVuY3Rpb24gKCkge1xuICAgICAgICB2YXIgbG9nID0gdGhpcztcbiAgICAgICAgZnVuY3Rpb24gbWtSZWNvcmQoYXJncykge1xuICAgICAgICAgICAgdmFyIGV4Y2x1ZGVGaWVsZHM7XG4gICAgICAgICAgICBpZiAoYXJnc1swXSBpbnN0YW5jZW9mIEVycm9yKSB7XG4gICAgICAgICAgICAgICAgZmllbGRzID0ge1xuICAgICAgICAgICAgICAgICAgICBlcnI6IGxvZy5zZXJpYWxpemVycyAmJiBsb2cuc2VyaWFsaXplcnMuZXJyID8gbG9nLnNlcmlhbGl6ZXJzLmVycihhcmdzWzBdKSA6IHN0ZFNlcmlhbGl6ZXJzLmVycihhcmdzWzBdKVxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgZXhjbHVkZUZpZWxkcyA9IHtcbiAgICAgICAgICAgICAgICAgICAgZXJyOiB0cnVlXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICBpZiAoYXJncy5sZW5ndGggPT09IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgbXNnQXJncyA9IFtmaWVsZHMuZXJyLm1lc3NhZ2VdO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIG1zZ0FyZ3MgPSBBcnJheS5wcm90b3R5cGUuc2xpY2UuY2FsbChhcmdzLCAxKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHR5cGVvZiBhcmdzWzBdICE9PSAnb2JqZWN0JyAmJiBhcmdzWzBdICE9PSBudWxsIHx8IEFycmF5LmlzQXJyYXkoYXJnc1swXSkpIHtcbiAgICAgICAgICAgICAgICBmaWVsZHMgPSBudWxsO1xuICAgICAgICAgICAgICAgIG1zZ0FyZ3MgPSBBcnJheS5wcm90b3R5cGUuc2xpY2UuY2FsbChhcmdzKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgZmllbGRzID0gYXJnc1swXTtcbiAgICAgICAgICAgICAgICBpZiAoYXJncy5sZW5ndGggPT09IDEgJiYgZmllbGRzLmVyciAmJiBmaWVsZHMuZXJyIGluc3RhbmNlb2YgRXJyb3IpIHtcbiAgICAgICAgICAgICAgICAgICAgbXNnQXJncyA9IFtmaWVsZHMuZXJyLm1lc3NhZ2VdO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIG1zZ0FyZ3MgPSBBcnJheS5wcm90b3R5cGUuc2xpY2UuY2FsbChhcmdzLCAxKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YXIgcmVjID0gb2JqQ29weShsb2cuZmllbGRzKTtcbiAgICAgICAgICAgIHJlYy5sZXZlbCA9IG1pbkxldmVsO1xuICAgICAgICAgICAgdmFyIHJlY0ZpZWxkcyA9IGZpZWxkcyA/IG9iakNvcHkoZmllbGRzKSA6IG51bGw7XG4gICAgICAgICAgICBpZiAocmVjRmllbGRzKSB7XG4gICAgICAgICAgICAgICAgaWYgKGxvZy5zZXJpYWxpemVycykge1xuICAgICAgICAgICAgICAgICAgICBsb2cuX2FwcGx5U2VyaWFsaXplcnMocmVjRmllbGRzLCBleGNsdWRlRmllbGRzKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgT2JqZWN0LmtleXMocmVjRmllbGRzKS5mb3JFYWNoKGZ1bmN0aW9uIChrKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlY1trXSA9IHJlY0ZpZWxkc1trXTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYy5sZXZlbE5hbWUgPSBuYW1lRnJvbUxldmVsW21pbkxldmVsXTtcbiAgICAgICAgICAgIHJlYy5tc2cgPSBtc2dBcmdzLmxlbmd0aCA/IGZvcm1hdC5hcHBseShsb2csIG1zZ0FyZ3MpIDogJyc7XG4gICAgICAgICAgICBpZiAoIXJlYy50aW1lKSB7XG4gICAgICAgICAgICAgICAgcmVjLnRpbWUgPSBuZXcgRGF0ZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKGxvZy5zcmMgJiYgIXJlYy5zcmMpIHtcbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoQ0FMTF9TVEFDS19FUlJPUik7XG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBzcmMgPSBleHRyYWN0U3JjRnJvbVN0YWNrdHJhY2UoZXJyLnN0YWNrLCAyKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFzcmMgJiYgIV9oYXZlV2FybmVkKCdzcmMnKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgX3dhcm4oJ1VuYWJsZSB0byBkZXRlcm1pbmUgc3JjIGxpbmUgaW5mbycsICdzcmMnKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZWMuc3JjID0gc3JjIHx8ICcnO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYy52ID0gTE9HX1ZFUlNJT047XG4gICAgICAgICAgICByZXR1cm4gcmVjO1xuICAgICAgICB9XG4gICAgICAgIFxuICAgICAgICB2YXIgZmllbGRzID0gbnVsbDtcbiAgICAgICAgdmFyIG1zZ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mVjLmxldmVsIDwgREVCVUckMikge1xuICAgICAgICBsZXZlbENzcyA9IHRoaXMuY3NzLmxldmVscy50cmFjZTtcbiAgICB9IGVsc2UgaWYgKHJlYy5sZXZlbCA8IElORk8kMikge1xuICAgICAgICBsZXZlbENzcyA9IHRoaXMuY3NzLmxldmVscy5kZWJ1ZztcbiAgICB9IGVsc2UgaWYgKHJlYy5sZXZlbCA8IFdBUk4kMikge1xuICAgICAgICBsZXZlbENzcyA9IHRoaXMuY3NzLmxldmVscy5pbmZvO1xuICAgIH0gZWxzZSBpZiAocmVjLmxldmVsIDwgRVJST1IkMikge1xuICAgICAgICBsZXZlbENzcyA9IHRoaXMuY3NzLmxldmVscy53YXJuO1xuICAgIH0gZWxzZSBpZiAocmVjLmxldmVsIDwgRkFUQUwkMikge1xuICAgICAgICBsZXZlbENzcyA9IHRoaXMuY3NzLmxldmVscy5lcnJvcjtcbiAgICB9IGVsc2Uge1xuICAgICAgICBsZXZlbENzcyA9IHRoaXMuY3NzLmxldmVscy5mYXRhbDtcbiAgICB9XG4gICAgdmFyIHBhZFplcm9zID0gZnVuY3Rpb24gKG51bWJlciwgbGVuKSB7XG4gICAgICAgIHJldHVybiBBcnJheShsZW4gKyAxIC0gKG51bWJlciArICcnKS5sZW5ndGgpLmpvaW4oJzAnKSArIG51bWJlcjtcbiAgICB9O1xuICAgIHZhciBsb2dBcmdzID0gW107XG4gICAgbG9nQXJncy5wdXNoKFwiWyVzOiVzOiVzOiVzXSAlYyVzJWM6ICVzOiAlYyVzIFwiICsgKHJlYy5zcmMgPyAnJWMlcycgOiAnJykpO1xuICAgIGxvZ0FyZ3MucHVzaChwYWRaZXJvcyhyZWMudGltZS5nZXRIb3VycygpLCAyKSk7XG4gICAgbG9nQXJncy5wdXNoKHBhZFplcm9zKHJlYy50aW1lLmdldE1pbnV0ZXMoKSwgMikpO1xuICAgIGxvZ0FyZ3MucHVzaChwYWRaZXJvcyhyZWMudGltZS5nZXRTZWNvbmRzKCksIDIpKT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sgLy8gbWF5IHRocm93XG4gICAgICAgICAgICBpZiAoZG9tYWluKSB7XG4gICAgICAgICAgICAgIGRvbWFpbi5leGl0KCk7XG4gICAgICAgICAgICAgIGV4aXRlZCA9IHRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChyZXN1bHQgPT09IHJlYWN0aW9uLnByb21pc2UpIHtcbiAgICAgICAgICAgIHJlamVjdChUeXBlRXJyb3IoJ1Byb21pc2UtY2hhaW4gY3ljbGUnKSk7XG4gICAgICAgICAgfSBlbHNlIGlmICh0aGVuID0gaXNUaGVuYWJsZShyZXN1bHQpKSB7XG4gICAgICAgICAgICB0aGVuLmNhbGwocmVzdWx0LCByZXNvbHZlLCByZWplY3QpO1xuICAgICAgICAgIH0gZWxzZSByZXNvbHZlKHJlc3VsdCk7XG4gICAgICAgIH0gZWxzZSByZWplY3QodmFsdWUpO1xuICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICBpZiAoZG9tYWluICYmICFleGl0ZWQpIGRvbWFpbi5leGl0KCk7XG4gICAgICAgIHJlamVjdChlKTtcbiAgICAgIH1cbiAgICB9O1xuICAgIHdoaWxlIChjaGFpbi5sZW5ndGggPiBpKSBydW4oY2hhaW5baSsrXSk7IC8vIHZhcmlhYmxlIGxlbmd0aCAtIGNhbid0IHVzZSBmb3JFYWNoXG4gICAgcHJvbWlzZS5fYyA9IFtdO1xuICAgIHByb21pc2UuX24gPSBmYWxzZTtcbiAgICBpZiAoaXNSZWplY3QgJiYgIXByb21pc2UuX2gpIG9uVW5oYW5kbGVkKHByb21pc2UpO1xuICB9KTtcbn07XG52YXIgb25VbmhhbmRsZWQgPSBmdW5jdGlvbiAocHJvbWlzZSkge1xuICB0YXNrLmNhbGwoZ2xvYmFsLCBmdW5jdGlvbiAoKSB7XG4gICAgdmFyIHZhbHVlID0gcHJvbWlzZS5fdjtcbiAgICB2YXIgdW5oYW5kbGVkID0gaXNVbmhhbmRsZWQocHJvbWlzZ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mh0bWwjc2VjLWdlbmVyYXRvcnJlc3VtZVxuICAgICAgICByZXR1cm4gZG9uZVJlc3VsdCgpO1xuICAgICAgfVxuXG4gICAgICBjb250ZXh0Lm1ldGhvZCA9IG1ldGhvZDtcbiAgICAgIGNvbnRleHQuYXJnID0gYXJnO1xuXG4gICAgICB3aGlsZSAodHJ1ZSkge1xuICAgICAgICB2YXIgZGVsZWdhdGUgPSBjb250ZXh0LmRlbGVnYXRlO1xuICAgICAgICBpZiAoZGVsZWdhdGUpIHtcbiAgICAgICAgICB2YXIgZGVsZWdhdGVSZXN1bHQgPSBtYXliZUludm9rZURlbGVnYXRlKGRlbGVnYXRlLCBjb250ZXh0KTtcbiAgICAgICAgICBpZiAoZGVsZWdhdGVSZXN1bHQpIHtcbiAgICAgICAgICAgIGlmIChkZWxlZ2F0ZVJlc3VsdCA9PT0gQ29udGludWVTZW50aW5lbCkgY29udGludWU7XG4gICAgICAgICAgICByZXR1cm4gZGVsZWdhdGVSZXN1bHQ7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGNvbnRleHQubWV0aG9kID09PSBcIm5leHRcIikge1xuICAgICAgICAgIC8vIFNldHRpbmcgY29udGV4dC5fc2VudCBmb3IgbGVnYWN5IHN1cHBvcnQgb2YgQmFiZWwnc1xuICAgICAgICAgIC8vIGZ1bmN0aW9uLnNlbnQgaW1wbGVtZW50YXRpb24uXG4gICAgICAgICAgY29udGV4dC5zZW50ID0gY29udGV4dC5fc2VudCA9IGNvbnRleHQuYXJnO1xuXG4gICAgICAgIH0gZWxzZSBpZiAoY29udGV4dC5tZXRob2QgPT09IFwidGhyb3dcIikge1xuICAgICAgICAgIGlmIChzdGF0ZSA9PT0gR2VuU3RhdGVTdXNwZW5kZWRTdGFydCkge1xuICAgICAgICAgICAgc3RhdGUgPSBHZW5TdGF0ZUNvbXBsZXRlZDtcbiAgICAgICAgICAgIHRocm93IGNvbnRleHQuYXJnO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGNvbnRleHQuZGlzcGF0Y2hFeGNlcHRpb24oY29udGV4dC5hcmcpO1xuXG4gICAgICAgIH0gZWxzZSBpZiAoY29udGV4dC5tZXRob2QgPT09IFwicmV0dXJuXCIpIHtcbiAgICAgICAgICBjb250ZXh0LmFicnVwdChcInJldHVyblwiLCBjb250ZXh0LmFyZyk7XG4gICAgICAgIH1cblxuICAgICAgICBzdGF0ZSA9IEdlblN0YXRlRXhlY3V0aW5nO1xuXG4gICAgICAgIHZhciByZWNvcmQgPSB0cnlDYXRjaChpbm5lckZuLCBzZWxmLCBjb250ZXh0KTtcbiAgICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcIm5vcm1hbFwiKSB7XG4gICAgICAgICAgLy8gSWYgYW4gZXhjZXB0aW9uIGlzIHRocm93biBmcm9tIGlubmVyRm4sIHdlIGxlYXZlIHN0YXRlID09PVxuICAgICAgICAgIC8vIEdlblN0YXRlRXhlY3V0aW5nIGFuZCBsb29wIGJhY2sgZm9yIGFub3RoZXIgaW52b2NhdGlvbi5cbiAgICAgICAgICBzdGF0ZSA9IGNvbnRleHQuZG9uZVxuICAgICAgICAgICAgPyBHZW5TdGF0ZUNvbXBsZXRlZFxuICAgICAgICAgICAgOiBHZW5TdGF0ZVN1c3BlbmRlZFlpZWxkO1xuXG4gICAgICAgICAgaWYgKHJlY29yZC5hcmcgPT09IENvbnRpbnVlU2VudGluZWwpIHtcbiAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICB2YWx1ZTogcmVjb3JkLmFyZyxcbiAgICAgICAgICAgIGRvbmU6IGNvbnRleHQuZG9uZVxuICAgICAgICAgIH07XG5cbiAgICAgICAgfSBlbHNlIGlmIChyZWNvcmQudHlwZSA9PT0gXCJ0aHJvd1wiKSB7XG4gICAgICAgICAgc3RhdGUgPSBHZW5TdGF0ZUNvbXBsZXRlZDtcbiAgICAgICAgICAvLyBEaXNw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uXG4gICAgICBpZiAoY29udGV4dC5tZXRob2QgPT09IFwidGhyb3dcIikge1xuICAgICAgICBpZiAoZGVsZWdhdGUuaXRlcmF0b3IucmV0dXJuKSB7XG4gICAgICAgICAgLy8gSWYgdGhlIGRlbGVnYXRlIGl0ZXJhdG9yIGhhcyBhIHJldHVybiBtZXRob2QsIGdpdmUgaXQgYVxuICAgICAgICAgIC8vIGNoYW5jZSB0byBjbGVhbiB1cC5cbiAgICAgICAgICBjb250ZXh0Lm1ldGhvZCA9IFwicmV0dXJuXCI7XG4gICAgICAgICAgY29udGV4dC5hcmcgPSB1bmRlZmluZWQ7XG4gICAgICAgICAgbWF5YmVJbnZva2VEZWxlZ2F0ZShkZWxlZ2F0ZSwgY29udGV4dCk7XG5cbiAgICAgICAgICBpZiAoY29udGV4dC5tZXRob2QgPT09IFwidGhyb3dcIikge1xuICAgICAgICAgICAgLy8gSWYgbWF5YmVJbnZva2VEZWxlZ2F0ZShjb250ZXh0KSBjaGFuZ2VkIGNvbnRleHQubWV0aG9kIGZyb21cbiAgICAgICAgICAgIC8vIFwicmV0dXJuXCIgdG8gXCJ0aHJvd1wiLCBsZXQgdGhhdCBvdmVycmlkZSB0aGUgVHlwZUVycm9yIGJlbG93LlxuICAgICAgICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgY29udGV4dC5tZXRob2QgPSBcInRocm93XCI7XG4gICAgICAgIGNvbnRleHQuYXJnID0gbmV3IFR5cGVFcnJvcihcbiAgICAgICAgICBcIlRoZSBpdGVyYXRvciBkb2VzIG5vdCBwcm92aWRlIGEgJ3Rocm93JyBtZXRob2RcIik7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBDb250aW51ZVNlbnRpbmVsO1xuICAgIH1cblxuICAgIHZhciByZWNvcmQgPSB0cnlDYXRjaChtZXRob2QsIGRlbGVnYXRlLml0ZXJhdG9yLCBjb250ZXh0LmFyZyk7XG5c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gaXRlcmFibGU7XG4gICAgICB9XG5cbiAgICAgIGlmICghaXNOYU4oaXRlcmFibGUubGVuZ3RoKSkge1xuICAgICAgICB2YXIgaSA9IC0xLCBuZXh0ID0gZnVuY3Rpb24gbmV4dCgpIHtcbiAgICAgICAgICB3aGlsZSAoKytpIDwgaXRlcmFibGUubGVuZ3RoKSB7XG4gICAgICAgICAgICBpZiAoaGFzT3duLmNhbGwoaXRlcmFibGUsIGkpKSB7XG4gICAgICAgICAgICAgIG5leHQudmFsdWUgPSBpdGVyYWJsZVtpXTtcbiAgICAgICAgICAgICAgbmV4dC5kb25lID0gZmFsc2U7XG4gICAgICAgICAgICAgIHJldHVybiBuZXh0O1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cblxuICAgICAgICAgIG5leHQudmFsdWUgPSB1bmRlZmluZWQ7XG4gICAgICAgICAgbmV4dC5kb25lID0gdHJ1ZTtcblxuICAgICAgICAgIHJldHVybiBuZXh0O1xuICAgICAgICB9O1xuXG4gICAgICAgIHJldHVybiBuZXh0Lm5leHQgPSBuZXh0O1xuICAgICAgfVxuICAgIH1cblxuICAgIC8vIFJldHVybiBhbiBpdGVyYXRvciB3aXRoIG5vIHZhbHVlcy5cbiAgICByZXR1cm4geyBuZXh0OiBkb25lUmVzdWx0IH07XG4gIH1cbiAgcnVudGltZS52YWx1ZXMgPSB2YWx1ZXM7XG5cbiAgZnVuY3Rpb24gZG9uZVJlc3VsdCgpIHtcbiAgICByZXR1cm4geyB2YWx1ZTogdW5kZWZpbmVkLCBkb25lOiB0cnVlIH07XG4gIH1cblxuICBDb250ZXh0LnByb3RvdHlwZSA9IHtcbiAgICBjb25zdHJ1Y3RvcjogQ29udGV4dCxcblxuICAgIHJlc2V0OiBmdW5jdGlvbihza2lwVGVtcFJlc2V0KSB7XG4gICAgICB0aGlzLnByZXYgPSAwO1xuICAgICAgdGhpcy5uZXh0ID0gMDtcbiAgICAgIC8vIFJlc2V0dGluZyBjb250ZXh0Ll9zZW50IGZvci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G4gICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuZmluYWxseUxvYyk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwidHJ5IHN0YXRlbWVudCB3aXRob3V0IGNhdGNoIG9yIGZpbmFsbHlcIik7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfSxcblxuICAgIGFicnVwdDogZnVuY3Rpb24odHlwZSwgYXJnKSB7XG4gICAgICBmb3IgKHZhciBpID0gdGhpcy50cnlFbnRyaWVzLmxlbmd0aCAtIDE7IGkgPj0gMDsgLS1pKSB7XG4gICAgICAgIHZhciBlbnRyeSA9IHRoaXMudHJ5RW50cmllc1tpXTtcbiAgICAgICAgaWYgKGVudHJ5LnRyeUxvYyA8PSB0aGlzLnByZXYgJiZcbiAgICAgICAgICAgIGhhc093bi5jYWxsKGVudHJ5LCBcImZpbmFsbHlMb2NcIikgJiZcbiAgICAgICAgICAgIHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICB2YXIgZmluYWxseUVudHJ5ID0gZW50cnk7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgaWYgKGZpbmFsbHlFbnRyeSAmJlxuICAgICAgICAgICh0eXBlID09PSBcImJyZWFrXCIgfHxcbiAgICAgICAgICAgdHlwZSA9PT0gXCJjb250aW51ZVwiKSAmJlxuICAgICAgICAgIGZpbmFsbHlFbnRyeS50cnlMb2MgPD0gYXJnICYmXG4gICAgICAgICAgYXJnIDw9IGZpbmFsbHlFbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgIC8vIElnbm9yZSB0aGUgZmluYWxseSBlbnRyeSBpZiBjb250cm9sIGlzIG5vdCBqdW1waW5nIHRvIGFcbiAgICAgICAgLy8gbG9jYXRpb24gb3V0c2lkZSB0aGUgdHJ5L2NhdGNoIGJsb2NrLlxuICAgICAgICBmaW5hbGx5RW50cnkgPSBudWxsO1xuICAgICAgfVxuXG4gICAgICB2YXIgcmVjb3JkID0gZmluYWxseUVudHJ5ID8gZmluYWxseUVudHJ5LmNvbXBsZXRpb24gOiB7fTtcbiAgICAgIHJlY29yZC50eXBlID0gdHlwZTtcbiAgICAgIHJlY29yZC5hcmcgPSBhcmc7XG5cbiAgICAgIGlmIChmaW5hbGx5RW50cnkpIHtcbiAgICAgICAgdGhpcy5tZXRob2QgPSBcIm5leHRcIjtcbiAgICAgICAgdGhpcy5uZXh0ID0gZmluYWxseUVudHJ5LmZpbmFsbHlMb2M7XG4gICAgICAgIHJldHVybiBDb250aW51ZVNlbnRpbmVsO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gdGhpcy5jb21wbGV0ZShyZWNvcmQpO1xuICAgIH0sXG5cbiAgICBjb21wbGV0ZTogZnVuY3Rpb24ocmVjb3JkLCBhZnRlckxvYykge1xuICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcInRocm93XCIpIHtcbiAgICAgICAgdGhyb3cgcmVjb3JkLmFyZztcbiAgICAgIH1cblxuICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcImJyZWFrXCIgfHxcbiAgICAgICAgICByZWNvcmQudHlwZSA9PT0gXCJjb250aW51ZVwiKSB7XG4gICAgICAgIHRoaXMubmV4dCA9IHJlY29yZC5hcmc7XG4gICAgICB9IGVsc2UgaWYgKHJlY29yZC50eXBlID09PSBcInJldHVyblwiKSB7XG4gICAgICAgIHRoaXMucnZhbCA9IHRoaXMuYXJnID0gcmVjb3JkLmFyZztcbiAgICAgICAgdGhpcy5tZXRob2QgPSBcInJldHVyblwiO1xuICAgICAgICB0aGlzLm5leHQgPSBcImVuZFwiO1xuICAgICAgfSBlbHNlIGlmIChyZWNvcmQudHlwZSA9PT0gXCJub3JtYWxcIiAmJiBhZnRlckxvYykge1xuICAgICAgICB0aGlzLm5leHQgPSBhZnRlckxvYztcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgfSxcblxuICAgIGZpbmlzaDogZnVuY3Rpb24oZmluYWxseUxvYykge1xuICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG4gICAgICAgIGlmIChlbnRyeS5maW5hbGx5TG9jID09PSBmaW5hbGx5TG9jKSB7XG4gICAgICAgICAgdGhpcy5jb21wbGV0ZShlbnRyeS5jb21wbGV0aW9uLCBlbnRyeS5hZnRlckxvYyk7XG4gICAgICAgICAgcmVzZXRUcnlFbnRyeShlbnRyeSk7XG4gICAgICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9LFxuXG4gICAgXCJjYXRjaFwiOiBmdW5jdGlvbih0cnlMb2MpIHtcbiAgICAgIGZvciAodmFyIGkgPSB0aGlzLnRyeUVudHJpZXMubGVuZ3RoIC0gMTsgaSA+PSAwOyAtLWkpIHtcbiAgICAgICAgdmFyIGVudHJ5ID0gdGhpcy50cnlFbnRyaWVzW2ldO1xuICAgICAgICBpZiAoZW50cnkudHJ5TG9jID09PSB0cnlMb2MpIHtcbiAgICAgICAgICB2YXIgcmVjb3JkID0gZW50cnkuY29tcGxldGlvbjtcbiAgICAgICAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwidGhyb3dcIikge1xuICAgICAgICAgICAgdmFyIHRocm93biA9IHJlY29yZC5hcmc7XG4gICAgICAgICAgICByZXNldFRyeUVudHJ5KGVudHJ5KTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIHRocm93bjtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICAvLyBUaGUgY29udGV4dC5jYXRjaCBtZXRob2QgbXVzdCBvbmx5IGJlIGNhbGxlZCB3aXRoIGEgb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vYmouc2xpY2UoKTtcbiAgICB9IGVsc2UgaWYgKHR5cGVvZiBvYmogPT09ICdvYmplY3QnKSB7XG4gICAgICAgIHZhciBjb3B5ID0ge307XG4gICAgICAgIE9iamVjdC5rZXlzKG9iaikuZm9yRWFjaChmdW5jdGlvbiAoaykge1xuICAgICAgICAgICAgY29weVtrXSA9IG9ialtrXTtcbiAgICAgICAgfSk7XG4gICAgICAgIHJldHVybiBjb3B5O1xuICAgIH0gZWxzZSB7XG4gICAgICAgIHJldHVybiBvYmo7XG4gICAgfVxufVxuXG5mdW5jdGlvbiBpbnNwZWN0KG9iaikge1xuICAgIGlmICh0eXBlb2Ygb2JqID09PSAndW5kZWZpbmVkJykge1xuICAgICAgICByZXR1cm4gJ3VuZGVmaW5lZCc7XG4gICAgfVxuICAgIGlmIChvYmogPT09IG51bGwpIHtcbiAgICAgICAgcmV0dXJuICdudWxsJztcbiAgICB9XG4gICAgaWYgKEFycmF5LmlzQXJyYXkob2JqKSkge1xuICAgICAgICB2YXIgaXRlbXMgPSBvYmoubWFwKGZ1bmN0aW9uIChvYmopIHsgcmV0dXJuIGluc3BlY3Qob2JqKTsgfSk7XG4gICAgICAgIHJldHVybiAnWyAnICsgaXRlbXMuam9pbignLCAnKSArICcgXSc7XG4gICAgfVxuICAgIGlmICh0eXBlb2Ygb2JqID09PSAnb2JqZWN0Jykge1xuICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkob2JqKTtcbiAgICB9XG4gICAgaWYgKHR5cGVvZiBvYmogPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgcmV0dXJuICdbRnVuY3Rpb246ICcgKyBvYmoubmFtZSArICddJztcbiAgICB9XG4gICAgaWYgKHR5cGVvZiBvYmogPT09ICdib29sZWFuJyB8fCB0eXBlb2Ygb2JqID09PSAnbnVtYmVyJykge1xuICAgICAgICByZXR1cm4gb2JqO1xuICAgIH1cbiAgICByZXR1cm4gJ1xcJycgKyBvYmoudG9TdHJpbmcoKSArICdcXCcnO1xufVxuXG5mdW5jdGlvbiBmb3JtYXQoZikge1xuICAgIHZhciBhcmd1bWVudHMkMSA9IGFyZ3VtZW50cztcblxuICAgIGlmICh0eXBlb2YgZiAhPT0gJ3N0cmluZycpIHtcbiAgICAgICAgdmFyIG9iamVjdHMgPSBuZXcgQXJyYXkoYXJndW1lbnRzLmxlbmd0aCk7XG4gICAgICAgIGZvciAodmFyIGkkMSA9IDA7aSQxIDwgYXJndW1lbnRzLmxlbmd0aDsgaSQxKyspIHtcbiAgICAgICAgICAgIG9iamVjdHNbaSQxXSA9IGluc3BlY3QoYXJndW1lbnRzJDFbaSQxXSk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG9iamVjdHMuam9pbignICcpO1xuICAgIH1cbiAgICB2YXIgZm9ybWF0UmVnRXhwID0gLyVbc2RqJV0vZztcbiAgICB2YXIgaSA9IDE7XG4gICAgdmFyIGFyZ3MgPSBhcmd1bWVudHM7XG4gICAgdmFyIGxlbiA9IGFyZ3MubGVuZ3RoO1xuICAgIHZhciBzdHIgPSBTdHJpbmcoZikucmVwbGFjZShmb3JtYXRSZWdFeHAsIGZ1bmN0aW9uICh4KSB7XG4gICAgICAgIGlmICh4ID09PSAnJSUnKSB7XG4gICAgICAgICAgICByZXR1cm4gJyUnO1xuICAgICAgICB9XG4gICAgICAgIGlmIChpID49IGxlbikge1xuICAgICAgICAgICAgcmV0dXJuIHg7XG4gICAgICAgIH1cbiAgICAgICAgc3dpdGNoICh4KSB7XG4gICAgICAgICAgICBjYXNlICclcyc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIFN0cmluZyhhcmdzW2krK10pO1xuICAgICAgICAgICAgY2FzZSAnJWQnOlxuICAgICAgICAgICAgICAgIHJldHVybiBOdW1iZXIoYXJnc1tpKytdKTtcbiAgICAgICAgICAgIGNhc2UgJyVqJzpcbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnko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ICAgICAgICBuYW1lID0gcGFyZW50RmllbGROYW1lc1tpXTtcbiAgICAgICAgICAgIGZpZWxkc1tuYW1lXSA9IHBhcmVudC5maWVsZHNbbmFtZV07XG4gICAgICAgIH1cbiAgICAgICAgdmFyIG5hbWVzID0gT2JqZWN0LmtleXMob3B0aW9ucyk7XG4gICAgICAgIGZvciAoaSA9IDA7IGkgPCBuYW1lcy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgbmFtZSA9IG5hbWVzW2ldO1xuICAgICAgICAgICAgZmllbGRzW25hbWVdID0gb3B0aW9uc1tuYW1lXTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm47XG4gICAgfVxuICAgIGlmIChwYXJlbnQpIHtcbiAgICAgICAgdGhpcy5fbGV2ZWwgPSBwYXJlbnQuX2xldmVsO1xuICAgICAgICB0aGlzLnN0cmVhbXMgPSBbXTtcbiAgICAgICAgZm9yIChpID0gMDsgaSA8IHBhcmVudC5zdHJlYW1zLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICB2YXIgcyA9IG9iakNvcHkocGFyZW50LnN0cmVhbXNbaV0pO1xuICAgICAgICAgICAgdGhpcyQxLnN0cmVhbXMucHVzaChzKTtcbiAgICAgICAgfVxuICAgICAgICB0aGlzLnNlcmlhbGl6ZXJzID0gb2JqQ29weShwYXJlbnQuc2VyaWFsaXplcnMpO1xuICAgICAgICB0aGlzLnNyYyA9IHBhcmVudC5zcmM7XG4gICAgICAgIHRoaXMuZmllbGRzID0gb2JqQ29weShwYXJlbnQuZmllbGRzKTtcbiAgICAgICAgaWYgKG9wdGlvbnMubGV2ZWwpIHtcbiAgICAgICAgICAgIHRoaXMubGV2ZWwob3B0aW9ucy5sZXZlbCk7XG4gICAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgICB0aGlzLl9sZXZlbCA9IE51bWJlci5QT1NJVElWRV9JTkZJTklUWTtcbiAgICAgICAgdGhpcy5zdHJlYW1zID0gW107XG4gICAgICAgIHRoaXM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b2cuc2VyaWFsaXplcnMuZXJyID8gbG9nLnNlcmlhbGl6ZXJzLmVycihhcmdzWzBdKSA6IHN0ZFNlcmlhbGl6ZXJzLmVycihhcmdzWzBdKVxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgZXhjbHVkZUZpZWxkcyA9IHtcbiAgICAgICAgICAgICAgICAgICAgZXJyOiB0cnVlXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICBpZiAoYXJncy5sZW5ndGggPT09IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgbXNnQXJncyA9IFtmaWVsZHMuZXJyLm1lc3NhZ2VdO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIG1zZ0FyZ3MgPSBBcnJheS5wcm90b3R5cGUuc2xpY2UuY2FsbChhcmdzLCAxKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHR5cGVvZiBhcmdzWzBdICE9PSAnb2JqZWN0JyAmJiBhcmdzWzBdICE9PSBudWxsIHx8IEFycmF5LmlzQXJyYXkoYXJnc1swXSkpIHtcbiAgICAgICAgICAgICAgICBmaWVsZHMgPSBudWxsO1xuICAgICAgICAgICAgICAgIG1zZ0FyZ3MgPSBBcnJheS5wcm90b3R5cGUuc2xpY2UuY2FsbChhcmdzKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgZmllbGRzID0gYXJnc1swXTtcbiAgICAgICAgICAgICAgICBpZiAoYXJncy5sZW5ndGggPT09IDEgJiYgZmllbGRzLmVyciAmJiBmaWVsZHMuZXJyIGluc3RhbmNlb2YgRXJyb3IpIHtcbiAgICAgICAgICAgICAgICAgICAgbXNnQXJncyA9IFtmaWVsZHMuZXJyLm1lc3NhZ2VdO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIG1zZ0FyZ3MgPSBBcnJheS5wcm90b3R5cGUuc2xpY2UuY2FsbChhcmdzLCAxKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YXIgcmVjID0gb2JqQ29weShsb2cuZmllbGRzKTtcbiAgICAgICAgICAgIHJlYy5sZXZlbCA9IG1pbkxldmVsO1xuICAgICAgICAgICAgdmFyIHJlY0ZpZWxkcyA9IGZpZWxkcyA/IG9iakNvcHkoZmllbGRzKSA6IG51bGw7XG4gICAgICAgICAgICBpZiAocmVjRmllbGRzKSB7XG4gICAgICAgICAgICAgICAgaWYgKGxvZy5zZXJpYWxpemVycykge1xuICAgICAgICAgICAgICAgICAgICBsb2cuX2FwcGx5U2VyaWFsaXplcnMocmVjRmllbGRzLCBleGNsdWRlRmllbGRzKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgT2JqZWN0LmtleXMocmVjRmllbGRzKS5mb3JFYWNoKGZ1bmN0aW9uIChrKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlY1trXSA9IHJlY0ZpZWxkc1trXTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYy5sZXZlbE5hbWUgPSBuYW1lRnJvbUxldmVsW21pbkxldmVsXTtcbiAgICAgICAgICAgIHJlYy5tc2cgPSBtc2dBcmdzLmxlbmd0aCA/IGZvcm1hdC5hcHBseShsb2csIG1zZ0FyZ3MpIDogJyc7XG4gICAgICAgICAgICBpZiAoIXJlYy50aW1lKSB7XG4gICAgICAgICAgICAgICAgcmVjLnRpbWUgPSBuZXcgRGF0ZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKGxvZy5zcmMgJiYgIXJlYy5zcmMpIHtcbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoQ0FMTF9TVEFDS19FUlJPUik7XG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBzcmMgPSBleHRyYWN0U3JjRnJvbVN0YWNrdHJhY2UoZXJyLnN0YWNrLCAyKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFzcmMgJiYgIV9oYXZlV2FybmVkKCdzcmMnKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgX3dhcm4oJ1VuYWJsZSB0byBkZXRlcm1pbmUgc3JjIGxpbmUgaW5mbycsICdzcmMnKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZWMuc3JjID0gc3JjIHx8ICcnO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYy52ID0gTE9HX1ZFUlNJT047XG4gICAgICAgICAgICByZXR1cm4gcmVjO1xuICAgICAgICB9XG4gICAgICAgIFxuICAgICAgICB2YXIgZmllbGRzID0gbnVsbDtcbiAgICAgICAgdmFyIG1zZ0FyZ3MgPSBhcmd1bWVudHM7XG4gICAgICAgIHZhciByZWMgPSBudWxsO1xuICAgICAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2xldmVsIDw9IG1pbkxldmVsO1xuICAgICAgICB9IGVsc2UgaWYgKHRoaXMuX2xldmVsID4gbWluTGV2ZWwpIHt9IGVsc2Uge1xuICAgICAgICAgICAgcmVjID0gbWtSZWNvcmQobXNnQXJncyk7XG4gICAgICAgICAgICB0aGlzLl9lbWl0KHJlYyk7XG4gICAgICAgIH1cbiAgICB9O1xufVxuXG5Mb2dnZXIucHJvdG90eXBlLnRyYWNlID0gbWtMb2dFbWl0dGVyKFRSQUNFKTtcbkxvZ2dlci5wcm90b3R5cGUuZGVidWcgPSBta0xvZ0VtaXR0ZXIoREVCVUcpO1xuTG9nZ2VyLnByb3RvdHlwZS5pbmZvID0gbWtMb2dFbWl0dGVyKElORk8pO1xuTG9nZ2VyLnByb3RvdHl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tZS5sZW5ndGgpLmpvaW4oJyAnKSArIGxldmVsTmFtZSkudG9VcHBlckNhc2UoKTtcbiAgICBpZiAodGhpcy5sb2dCeUxldmVsKSB7XG4gICAgICAgIGlmIChyZWMubGV2ZWwgPT09IFRSQUNFJDIpIHtcbiAgICAgICAgICAgIGxldmVsTmFtZSA9ICdkZWJ1Zyc7XG4gICAgICAgIH0gZWxzZSBpZiAocmVjLmxldmVsID09PSBGQVRBTCQyKSB7XG4gICAgICAgICAgICBsZXZlbE5hbWUgPSAnZXJyb3InO1xuICAgICAgICB9XG4gICAgICAgIGNvbnNvbGVNZXRob2QgPSB0eXBlb2YgY29uc29sZVtsZXZlbE5hbWVdID09PSAnZnVuY3Rpb24nID8gY29uc29sZVtsZXZlbE5hbWVdIDogY29uc29sZS5sb2c7XG4gICAgfSBlbHNlIHtcbiAgICAgICAgY29uc29sZU1ldGhvZCA9IGNvbnNvbGUubG9nO1xuICAgIH1cbiAgICBpZiAocmVjLmxldmVsIDwgREVCVUckMikge1xuICAgICAgICBsZXZlbENzcyA9IHRoaXMuY3NzLmxldmVscy50cmFjZTtcbiAgICB9IGVsc2UgaWYgKHJlYy5sZXZlbCA8IElORk8kMikge1xuICAgICAgICBsZXZlbENzcyA9IHRoaXMuY3NzLmxldmVscy5kZWJ1ZztcbiAgICB9IGVsc2UgaWYgKHJlYy5sZXZlbCA8IFdBUk4kMikge1xuICAgICAgICBsZXZlbENzcyA9IHRoaXMuY3NzLmxldmVscy5pbmZvO1xuICAgIH0gZWxzZSBpZiAocmVjLmxldmVsIDwgRVJST1IkMikge1xuICAgICAgICBsZXZlbENzcyA9IHRoaXMuY3NzLmxldmVscy53YXJuO1xuICAgIH0gZWxzZSBpZiAocmVjLmxldmVsIDwgRkFUQUwkMikge1xuICAgICAgICBsZXZlbENzcyA9IHRoaXMuY3NzLmxldmVscy5lcnJvcjtcbiAgICB9IGVsc2Uge1xuICAgICAgICBsZXZlbENzcyA9IHRoaXMuY3NzLmxldmVscy5mYX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gICAgICB2YXIgcmVqZWN0ID0gcmVhY3Rpb24ucmVqZWN0O1xuICAgICAgdmFyIGRvbWFpbiA9IHJlYWN0aW9uLmRvbWFpbjtcbiAgICAgIHZhciByZXN1bHQsIHRoZW4sIGV4aXRlZDtcbiAgICAgIHRyeSB7XG4gICAgICAgIGlmIChoYW5kbGVyKSB7XG4gICAgICAgICAgaWYgKCFvaykge1xuICAgICAgICAgICAgaWYgKHByb21pc2UuX2ggPT0gMikgb25IYW5kbGVVbmhhbmRsZWQocHJvbWlzZSk7XG4gICAgICAgICAgICBwcm9taXNlLl9oID0gMTtcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKGhhbmRsZXIgPT09IHRydWUpIHJlc3VsdCA9IHZhbHVlO1xuICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgaWYgKGRvbWFpbikgZG9tYWluLmVudGVyKCk7XG4gICAgICAgICAgICByZXN1bHQgPSBoYW5kbGVyKHZhbHVlKTsgLy8gbWF5IHRocm93XG4gICAgICAgICAgICBpZiAoZG9tYWluKSB7XG4gICAgICAgICAgICAgIGRvbWFpbi5leGl0KCk7XG4gICAgICAgICAgICAgIGV4aXRlZCA9IHRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChyZXN1bHQgPT09IHJlYWN0aW9uLnByb21pc2UpIHtcbiAgICAgICAgICAgIHJlamVjdChUeXBlRXJyb3IoJ1Byb21pc2UtY2hhaW4gY3ljbGUnKSk7XG4gICAgICAgICAgfSBlbHNlIGlmICh0aGVuID0gaXNUaGVuYWJsZShyZXN1bHQpKSB7XG4gICAgICAgICAgICB0aGVuLmNhbGwocmVzdWx0LCByZXNvbHZlLCByZWplY3QpO1xuICAgICAgICAgIH0gZWxzZSByZXNvbHZlKHJlc3VsdCk7XG4gICAgICAgIH0gZWxzZSByZWplY3QodmFsdWUpO1xuICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICBpZiAoZG9tYWluICYmICFleGl0Z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fVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGNvbnRleHQubWV0aG9kID09PSBcIm5leHRcIikge1xuICAgICAgICAgIC8vIFNldHRpbmcgY29udGV4dC5fc2VudCBmb3IgbGVnYWN5IHN1cHBvcnQgb2YgQmFiZWwnc1xuICAgICAgICAgIC8vIGZ1bmN0aW9uLnNlbnQgaW1wbGVtZW50YXRpb24uXG4gICAgICAgICAgY29udGV4dC5zZW50ID0gY29udGV4dC5fc2VudCA9IGNvbnRleHQuYXJnO1xuXG4gICAgICAgIH0gZWxzZSBpZiAoY29udGV4dC5tZXRob2QgPT09IFwidGhyb3dcIikge1xuICAgICAgICAgIGlmIChzdGF0ZSA9PT0gR2VuU3RhdGVTdXNwZW5kZWRTdGFydCkge1xuICAgICAgICAgICAgc3RhdGUgPSBHZW5TdGF0ZUNvbXBsZXRlZDtcbiAgICAgICAgICAgIHRocm93IGNvbnRleHQuYXJnO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGNvbnRleHQuZGlzcGF0Y2hFeGNlcHRpb24oY29udGV4dC5hcmcpO1xuXG4gICAgICAgIH0gZWxzZSBpZiAoY29udGV4dC5tZXRob2QgPT09IFwicmV0dXJuXCIpIHtcbiAgICAgICAgICBjb250ZXh0LmFicnVwdChcInJldHVyblwiLCBjb250ZXh0LmFyZyk7XG4gICAgICAgIH1cblxuICAgICAgICBzdGF0ZSA9IEdlblN0YXRlRXhlY3V0aW5nO1xuXG4gICAgICAgIHZhciByZWNvcmQgPSB0cnlDYXRjaChpbm5lckZuLCBzZWxmLCBjb250ZXh0KTtcbiAgICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcIm5vcm1hbFwiKSB7XG4gICAgICAgICAgLy8gSWYgYW4gZXhjZXB0aW9uIGlzIHRocm93biBmcm9tIGlubmVyRm4sIHdlIGxlYXZlIHN0YXRlID09PVxuICAgICAgICAgIC8vIEdlblN0YXRlRXhlY3V0aW5nIGFuZCBsb29wIGJhY2sgZm9yIGFub3RoZXIga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aG9kIGZyb21cbiAgICAgICAgICAgIC8vIFwicmV0dXJuXCIgdG8gXCJ0aHJvd1wiLCBsZXQgdGhhdCBvdmVycmlkZSB0aGUgVHlwZUVycm9yIGJlbG93LlxuICAgICAgICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgY29udGV4dC5tZXRob2QgPSBcInRocm93XCI7XG4gICAgICAgIGNvbnRleHQuYXJnID0gbmV3IFR5cGVFcnJvcihcbiAgICAgICAgICBcIlRoZSBpdGVyYXRvciBkb2VzIG5vdCBwcm92aWRlIGEgJ3Rocm93JyBtZXRob2RcIik7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBDb250aW51ZVNlbnRpbmVsO1xuICAgIH1cblxuICAgIHZhciByZWNvcmQgPSB0cnlDYXRjaChtZXRob2QsIGRlbGVnYXRlLml0ZXJhdG9yLCBjb250ZXh0LmFyZyk7XG5cbiAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwidGhyb3dcIikge1xuICAgICAgY29udGV4dC5tZXRob2QgPSBcInRocm93XCI7XG4gICAgICBjb250ZXh0LmFyZyA9IHJlY29yZC5hcmc7XG4gICAgICBjb250ZXh0LmRlbGVnYXRlID0gbnVsbDtcbiAgICAgIHJldHVybiBDb250aW51ZVNlbnRpbmVsO1xuICAgIH1cblxuICAgIHZhciBpbmZvID0gcmVjb3JkLmFyZztcblxuICAgIGlmICghIGluZm8pIHtcbiAgICAgIGNvbnRleHQubWV0aG9kID0gXCJ0aHJvd1wiO1xuICAgICAgY29udGV4dC5hcmcgPSBuZXcgVHlwZUVycm9yKFwiaXRlcmF0b3IgcmVzdWx0IGlzIG5vdCBhbiBvYmplY3RcIik7XG4gICAgICBjb250ZXh0LmRlbGVnYXRlID0gbnVsbDtcbiAgICAgIHJldHVybiBDb250aW51ZVNlbnRpbmVsO1xuICAgIH1cblxuICAgIGlmIChpbmZvLmRvbmUpIHtcbiAgICAgIC8vI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KSB7XG4gICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuY2F0Y2hMb2MsIHRydWUpO1xuICAgICAgICAgICAgfSBlbHNlIGlmICh0aGlzLnByZXYgPCBlbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuZmluYWxseUxvYyk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICB9IGVsc2UgaWYgKGhhc0NhdGNoKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5wcmV2IDwgZW50cnkuY2F0Y2hMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5jYXRjaExvYywgdHJ1ZSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICB9IGVsc2UgaWYgKGhhc0ZpbmFsbHkpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnByZXYgPCBlbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuZmluYWxseUxvYyk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwidHJ5IHN0YXRlbWVudCB3aXRob3V0IGNhdGNoIG9yIGZpbmFsbHlcIik7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfSxcblxuICAgIGFicnVwdDogZnVuY3Rpb24odHlwZSwgYXJnKSB7XG4gICAgICBmb3IgKHZhciBpID0gdGhpcy50cnlFbnRyaWVzLmxlbmd0aCAtIDE7IGkgPj0gMDsgLS1pKSB7XG4gICAgICAgIHZhciBlbnRyeSA9IHRoaXMudHJ5RW50cmllc1tpXTtcbiAgICAgICAgaWYgKGVudHJ5LnRyeUxvYyA8PSB0aGlzLnByZXYgJiZcbiAgICAgICAgICAgIGhhc093bi5jYWxsKGVudHJ5LCBcImZpbmFsbHlMb2NcIikgJiZcbiAgICAgICAgICAgIHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICB2YXIgZmluYWxseUVudHJ5ID0gZW50cnk7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgaWYgKGZpbmFsbHlFbnRyeSAmJlxuICAgICAgICAgICh0eXBlID09PSBcImJyZWFrXCIgfHxcbiAgICAgICAgICAgdHlwZSA9PT0gXCJjb250aW51ZVwiKSAmJlxuICAgICAgICAgIGZpbmFsbHlFbnRyeS50cnlMb2MgPD0gYXJnICYmXG4gICAgICAgICAgYXJnIDw9IGZpbmFsbHlFbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgIC8vIElnbm9yZSB0aGUgZmluYWxseSBlbnRyeSBpZiBjb250cm9sIGlzIG5vdCBqdW1waW5nIHRvIGFcbiAgICAgICAgLy8gbG9jYXRpb24gb3V0c2lkZSB0aGUgdHJ5L2NhdGNoIGJsb2NrLlxuICAgICAgICBmaW5hbGx5RW50cnkgPSBudWxsO1xuICAgICAgfVxuXG4gICAgICB2YXIgcmVjb3JkID0gZmluYWxseUVudHJ5ID8gZmluYWxseUVudHJ5LmNvbXBsZXRpb24gOiB7fTtcbiAgICAgIHJlY29yZC50eXBlID0gdHlwZTtcbiAgICAgIHJlY29yZC5hcmcgPSBhcmc7XG5cbiAgICAgIGlmIChmaW5hbGx5RW50cnkpIHtcbiAgICAgICAgdGhpcy5tZXRob2QgPSBcIm5leHRcIjtcbiAgICAgICAgdGhpcy5uZXh0ID0gZmluYWxseUVudHJ5LmZpbmFsbHlMb2M7XG4gICAgICAgIHJldHVybiBDb250aW51ZVNlbnRpbmVsO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gdGhpcy5jb21wbGV0ZShyZWNvcmQpO1xuICAgIH0sXG5cbiAgICBjb21wbGV0ZTogZnVuY3Rpb24ocmVjb3JkLCBhZnRlckxvYykge1xuICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcInRocm93XCIpIHtcbiAgICAgICAgdGhyb3cgcmVjb3JkLmFyZztcbiAgICAgIH1cblxuICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcImJyZWFrXCIgfHxcbiAgICAgICAgICByZWNvcmQudHlwZSA9PT0gXCJjb250aW51ZVwiKSB7XG4gICAgICAgIHRoaXMubmV4dCA9IHJlY29yZC5hcmc7XG4gICAgICB9IGVsc2UgaWYgKHJlY29yZC50eXBlID09PSBcInJldHVyblwiKSB7XG4gICAgICAgIHRoaXMucnZhbCA9IHRoaXMuYXJnID0gcmVjb3JkLmFyZztcbiAgICAgICAgdGhpcy5tZXRob2QgPSBcInJldHVyblwiO1xuICAgICAgICB0aGlzLm5leHQgPSBcImVuZFwiO1xuICAgICAgfSBlbHNlIGlmIChyZWNvcmQudHlwZSA9PT0gXCJub3JtYWxcIiAmJiBhZnRlckxvYykge1xuICAgICAgICB0aGlzLm5leHQgPSBhZnRlckxvYztcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgfSxcblxuICAgIGZpbmlzaDogZnVuY3Rpb24oZmluYWxseUxvYykge1xuICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG4gICAgICAgIGlmIChlbnRyeS5maW5hbGx5TG9jID09PSBmaW5hbGx5TG9jKSB7XG4gICAgICAgICAgdGhpcy5jb21wbGV0ZShlbnRyeS5jb21wbGV0aW9uLCBlbnRyeS5hZnRlckxvYyk7XG4gICAgICAgICAgcmVzZXRUcnlFbnRyeShlbnRyeSk7XG4gICAgICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9LFxuXG4gICAgXCJjYXRjaFwiOiBmdW5jdGlvbih0cnlMb2MpIHtcbiAgICAgIGZvciA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RlYnVnJyk7XG4gKiBcbiAqICAgICAgICAgLy8gRXh0ZW5kIHRoZSBSZWQ1UHJvIHNkay5cbiAqICAgICAgICAgc21fZXh0LmRlY29yYXRlKCk7XG4gKiBcbiAqICAgICAgICAgdmFyIHJ0Y1B1Ymxpc2hlciA9IG5ldyByZWQ1cHJvc2RrLlJUQ1B1Ymxpc2hlcigpO1xuICogICAgICAgICB2YXIgcnRjU3Vic2NyaWJlciA9IG5ldyByZWQ1cHJvc2RrLlJUQ1N1YnNjcmliZXIoKTtcbiAqIFxuICogICAgICAgICB2YXIgYXV0b3NjYWxlQ29uZmlnID0ge1xuICogICAgICAgICAgIHByb3RvY29sOiAnaHR0cHMnLFxuICogICAgICAgICAgIGhvc3Q6ICdzdHJlYW1tYW5hZ2VyLmNvbXBhbnkub3JnJyxcbiAqICAgICAgICAgICBzdHJlYW1OYW1lOiAnbXlzdHJlYW0nLFxuICogICAgICAgICAgIHNjb3BlOiAnbGl2ZScsXG4gKiAgICAgICAgICAgYXBpVmVyc2lvbjogJzMuMCcsXG4gKiAgICAgICAgICAgdXNlUHJveHk6IHRydWVcbiAqICAgICAgICAgfTtcbiAqIFxuICogICAgICAgICB2YXIgaW5pdENvbmZpZyA9IHtcbiAqICAgICAgICAgICBwcm90b2NvbDogJ3dzcycsXG4gKiAgICAgICAgICAgaG9zdDogJ3N0cmVhbW1hbmFnZXIuY29tcGFueS5vcmcnLFxuICogICAgICAgICAgIHBvcnQ6IDgwODM6LFxuICogICAgICAgICAgIGFwcDogJ2xpdmUnLFxuICogICAgICAgICAgIHN0cmVhbU5hbWU6ICdteXN0cmVhbScsXG4gKiAgICAgICAgICAgaWNlU2VydmVyczogW3t1cmxzOiAnc3R1bjpzdHVuMi5sLmdvb2dsZS5jb206MTkzMDInfV1cbiAqICAgICAgICAgfTtcbiAqIFxuICogICAgICAgICB2YXIgcHVibGlzaEF1dG9zY2FsZUNvbmZpZyA9IE9iamVjdC5hc3NpZ24oe30sIGF1dG9zY2FsZUNvbmZpZywge1xuICogICAgICAgICAgIGFjdGlvbjogJ2Jyb2FkY2FzdCdcbiAqICAgICAgICAgfSk7XG4gKiAgICAgICAgIHZhciBzdWJzY3JpYmVBdXRvc2NhbGVDb25maWcgPSBPYmplY3QuYXNzaWduKHt9LCBhdXRvc2NhbGVDb25maWcsIHtcbiAqICAgICAgICAgICBhY3Rpb246ICdzdWJzY3JpYmUnXG4gKiAgICAgICAgIH0pO1xuICogXG4gKiAgICAgICAgIGZ1bmN0aW9uIHN1YnNjcmliZSAoKSB7XG4gKiAgICAgICAgICAgcnRjU3Vic2NyaWJlclxuICogICAgICAgICAgICAgLmF1dG9zY2FsZShzdWJzY3JpYmVBdXRvc2NhbGVDb25maWcsIGluaXRDb25maWcpXG4gKiAgICAgICAgICAgICAudGhlbihmdW5jdGlvbiAoKSB7XG4gKiAgICAgICAgICAgICAgIHJldHVybiBydGNTdWJzY3JpYmVyLnN1YnNjcmliZSgpO1xuICogICAgICAgICAgICAgfSlcbiAqICAgICAgICAgICAgIC5jYXRjaChmdW5jdGlvbiAoZXJyb3IpIHtcbiAqICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcignQ291bGQgbm90IHBsYXk6ICcgKyBlcnJvcik7XG4gKiAgICAgICAgICAgICB9KTtcbiAqICAgICAgICAgfVxuICogXG4gKiAgICAgICAgIC8vIEZpcnN0IGNvbm5lY3QgQXV0b3NjYWxlLWQgUHVibGlzaGVyLlxuICogICAgICAgICBydGNQdWJsaXNoZXJcbiAqICAgICAgICAgICAuYXV0b3NjYWxlKHB1Ymxpc2hBdXRvc2NhbGVDb25maWcsIGluaXRDb25maWcpXG4gKiAgICAgICAgICAgLnRoZW4oZnVuY3Rpb24gKCkge1xuICogICAgICAgICAgICAgLy8gT25jZSBwdWJsaXNoaW5nLCB3ZSB3aWxsIHN0YXJ0IHRoZSBBdXRvc2NhbGUtZCBTdWJzY3JpYmVyLlxuICogICAgICAgICAgICAgcnRjUHVibGlzaGVyLm9uKHJlZDVwcm9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hwb3J0IGNvbnN0IHdhcm4gPSBkZWNvcmF0ZShMRVZFTFMuV0FSTilcbmV4cG9ydCBjb25zdCBlcnJvciA9IGRlY29yYXRlKExFVkVMUy5FUlJPUilcbmV4cG9ydCBjb25zdCBmYXRhbCA9IGRlY29yYXRlKExFVkVMUy5GQVRBTClcbiJdLCJzb3VyY2VSb290IjoiIn0= \ No newline at end of file diff --git a/src/js/autoscale/index.js b/src/js/autoscale/index.js index bcdb0ec..a14b7d5 100644 --- a/src/js/autoscale/index.js +++ b/src/js/autoscale/index.js @@ -7,9 +7,20 @@ const isRTC = /(wss|ws)/ // const isRTMP = /(rtmps|rtmp)/ // const isHLS = /(https|http)/ +/** + * Modifies the intialization configuration used for publisher or subscriber. + * This configuration can vary based on target tech and the `useProxy` attribute of the autoscale configuration. + * + * @private + */ const modifyInitConfigWithResponse = (config, response, autoscaleConfig) => { let c + // WebRTC most likely will require `useProxy`. + // This is due to Origin and Edge IPs being returned from the Stream Manager API. + // Only Fully Qualified Domain Names can have an associated cert and WebRTC requires SSL. if (autoscaleConfig.useProxy && isRTC.test(config.protocol)) { + // The structure of a "proxied" configuration is to pass `connectionParams` + // describing the endpoint (Origin/Edge) and requesting through the Stream Manager webapp. const connectionParams = {...config.connectionParams, host: response.serverAddress, app: response.scope.substr(1, response.scope.length-1) @@ -23,6 +34,7 @@ const modifyInitConfigWithResponse = (config, response, autoscaleConfig) => { connectionParams: connectionParams } } else { + // If we don't need to proxy, then just inject the Stream Manager response attributes. c = {...config, host: response.serverAddress, app: response.scope.substr(1, response.scope.length-1), @@ -32,6 +44,11 @@ const modifyInitConfigWithResponse = (config, response, autoscaleConfig) => { return c } +/** + * Allows for retry in requesting on the Stream Manager API. + * + * @private + */ const execute = async (config, count, limit, delay) => { const onfailure = () => { if (count++ < limit) { @@ -49,13 +66,24 @@ const execute = async (config, count, limit, delay) => { let response = await request(config) return response } catch (e) { + // If we fail, try again until we are not allowed. if (!onfailure()) { throw e } } } -export const autoscaleInit = async (proxy, autoscaleConfig, initConfig) => { +/** + * Attempts to make requests on the Stream Manager for Origin/Edge information. + * + * @param {Object} proxy + * The established Publisher or Subscriber instance of the Red5 Pro SDK. + * @param {Object} autoscaleConfig + * The configuration object used in communicating with the Stream Manager. + * @param {Object} initConfig + * The initialization configuration to be used in the `init` call on the `proxy` instance once the Stream Manager call has been resolved. + */ +const autoscaleInit = async (proxy, autoscaleConfig, initConfig) => { let retryCount = 0 const { retryLimit, retryDelay } = autoscaleConfig let response @@ -78,6 +106,12 @@ export const autoscaleInit = async (proxy, autoscaleConfig, initConfig) => { } } +/** + * Top-level decorate function. + * + * @param {Object} proxy + * The established Publisher or Subscriber instance of the Red5 Pro SDK. + */ export const Autoscale = (proxy) => { return { init: (autoscaleConfig, initConfig) => { @@ -86,6 +120,12 @@ export const Autoscale = (proxy) => { } } +/** + * Class decorator for Publisher and Subscriber types from the Red5 Pro HTML SDK. + * + * @param {Class} clazz + * The Class reference to apply the `autoscale` function to. + */ export const Decorate = (clazz) => { let fn = function(autoscaleConfig, initConfig) { return autoscaleInit(this, autoscaleConfig, initConfig) @@ -94,3 +134,5 @@ export const Decorate = (clazz) => { value: fn }) } + +export { autoscaleInit } diff --git a/src/js/autoscale/request.js b/src/js/autoscale/request.js index c63f674..49e0ffe 100644 --- a/src/js/autoscale/request.js +++ b/src/js/autoscale/request.js @@ -11,10 +11,11 @@ const defaultConfig = { region: undefined, // optional accessToken: undefined, // optional retryLimit: 0, // optional, default (no retry) - retryDelay: 1000, // optional, default=1000 + retryDelay: 1000, // optional, default=1000 useProxy: true // optional, default=true. Enforces connection proxy for WebRTC clients } +// Generates proper URL for request on Stream Manager. const endpointFromConfiguration = (configuration) => { const { action, @@ -38,6 +39,29 @@ const endpointFromConfiguration = (configuration) => { return url } +/** + * Makes a request on the Stream Manager for Origin or Edge information based on passed in configuration. + * + * @param {Object} config + * The configuration object to use in constructing the URL request. + * + * @example + * // The following is an example of the configuration to pass + * const autoscaleConfig = { + * action: 'broadcast', // required, either 'broadcast' or 'subscribe' + * protocol: 'https', // required, default=https + * host: 'sm.company.org', // required, the FQDN of the Stream Manager + * port: undefined, // optional, if `undefined` assumes it served over SSL + * scope: 'live', // optional, default=live + * streamName: 'mystream', // required + * apiVersion: '3.0', // required, default=3.0 + * region: undefined, // optional, when using the optional `region` query param + * accessToken: undefined, // optional, when using security on Stream Manager + * retryLimit: 0, // optional, default (no retry) + * retryDelay: 1000, // optional, default=1000 + * useProxy: true // optional, default=true. Enforces connection proxy for WebRTC clients + * } + */ const request = async (config) => { const configuration = Object.assign({}, defaultConfig, config) const url = endpointFromConfiguration(configuration) diff --git a/src/js/env/browser.js b/src/js/env/browser.js index 386cef7..80eee0c 100644 --- a/src/js/env/browser.js +++ b/src/js/env/browser.js @@ -1,9 +1,15 @@ import 'whatwg-fetch' export default { + /* + * Returns existance of Red5 Pro SDK on window. + */ getRed5ProSDK: () => { return window.red5prosdk }, + /** + * Returns existance of fetch APi on window. + */ fetch: window.fetch.bind(window) } diff --git a/src/js/index.js b/src/js/index.js index 2dcba99..52ee46e 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -4,6 +4,91 @@ * @file red5pro-ext-stream-manager.min.js * @module red5prosdk_ext_stream_manager * + * @example + * + * + * + * + * + * + * + * + * + *
        + * + *
        + * + *
        + * + *
        + * + * + * + * + * + * + * */ // SDK_VERSION, LOG_LEVEL injected from webpack build. @@ -47,6 +132,21 @@ export const LOG_LEVELS = LEVELS */ export const getLogger = _getLogger +/** + * Decorates the publisher and subscriber classes exposed on the Red5 Pro HTML SDK. + * This allows for ease in calling autoscale with a familiar init and Promise-like flow. + * @example + * red5prosdk_ext_stream_manager.decorate() + * new red5prosdk.Red5ProPublisher() + * .setPublishOrder(['rtc', 'rtmp']) + * .autoscale(autoscaleConfig, config) + * .then(function (publisher) { + * return publisher.publish() + * }) + * .catch(function (error) { + * // handle error. + * }); +*/ export const decorate = () => { const red5prosdk = environment.getRed5ProSDK() if (red5prosdk) { @@ -71,4 +171,18 @@ export const decorate = () => { } } +/** + * Returns the top-level decorator function. + * You would pass in an already created instance of your desired publisher or subscriber. + * + * @example + * var failover = new red5prosdk.Red5ProPublisher().setPublishOrder(['rtc', 'rtmp']) + * Autoscale(failover).init(autoscaleConfig, initConfig) + * .then(function (publisher) { + * return publisher.publish() + * }) + * .catch(function (error) { + * // handle error. + * }); + */ export { Autoscale } From b930e661c035a73aac9bd9b97bdb68eccc826f21 Mon Sep 17 00:00:00 2001 From: bustardcelly Date: Tue, 12 Jun 2018 12:45:55 -0400 Subject: [PATCH 10/15] proper failover of request limit and delay to reject. --- __tests__/autoscale/index.js | 78 + .../lib/red5pro/red5pro-ext-stream-manager.js | 147 +- package-lock.json | 3091 ++++++++++++++++- package.json | 11 +- src/js/autoscale/index.js | 58 +- src/js/autoscale/request.js | 32 +- 6 files changed, 3315 insertions(+), 102 deletions(-) create mode 100644 __tests__/autoscale/index.js diff --git a/__tests__/autoscale/index.js b/__tests__/autoscale/index.js new file mode 100644 index 0000000..584e7a5 --- /dev/null +++ b/__tests__/autoscale/index.js @@ -0,0 +1,78 @@ +/* global jest, describe, it, beforeEach, afterEach, expect */ + +import { Autoscale, Decorate, autoscaleInit } from '../../src/js/autoscale' +import * as request from '../../src/js/autoscale/request' +import { LEVELS, establishLogger } from '../../src/js/log' +establishLogger(LEVELS.FATAL) + +describe('Autoscale', () => { + let proxy + + beforeEach(() => { + proxy = new Object() + }) + + afterEach(() => { + proxy = undefined + }) + + it('should return an init method', () => { + let autoscale = Autoscale(proxy) + expect(autoscale.hasOwnProperty('init')).toBe(true) + }) + +}) + +describe('Decorate', () => { + let proxy + + beforeEach(() => { + proxy = Object + }) + + afterEach(() => { + proxy = undefined + }) + + it('should define an autoscale Function property', () => { + Decorate(proxy) + expect(proxy.prototype.propertyIsEnumerable('autoscale')).toBe(true) + }) +}) + +describe('autoscaleInit', () => { + let proxy + const autoscaleConfig = { + retryLimit: 3, + retryDelay: 500 + } + const initConfig = { + host: 'localhost' + } + + beforeEach(() => { + jest.useFakeTimers() + proxy = new Object() + request.default = jest.fn(() => { + new Promise((resolve, reject) => { + console.log('nope') + reject('uh-oh') + }) + }) + }) + + afterEach(() => { + proxy = undefined + request.default.mockClear() + request.default.mockRestore() + }) + + it('should reject on retry limit', async () => { + try { + let p = await autoscaleInit(proxy, autoscaleConfig, initConfig) + } catch (e) { + console.log(e) + expect(request.default.mock.calls.length).toEqual(autoscaleConfig.retryLimit) + } + }) +}) diff --git a/examples/browser/lib/red5pro/red5pro-ext-stream-manager.js b/examples/browser/lib/red5pro/red5pro-ext-stream-manager.js index 0021155..4c0e939 100644 --- a/examples/browser/lib/red5pro/red5pro-ext-stream-manager.js +++ b/examples/browser/lib/red5pro/red5pro-ext-stream-manager.js @@ -4483,6 +4483,10 @@ var _extends2 = __webpack_require__(/*! babel-runtime/helpers/extends */ "./node var _extends3 = _interopRequireDefault(_extends2); +var _promise = __webpack_require__(/*! babel-runtime/core-js/promise */ "./node_modules/babel-runtime/core-js/promise.js"); + +var _promise2 = _interopRequireDefault(_promise); + var _request = __webpack_require__(/*! ./request.js */ "./src/js/autoscale/request.js"); var _request2 = _interopRequireDefault(_request); @@ -4497,6 +4501,12 @@ var isRTC = /(wss|ws)/; // const isRTMP = /(rtmps|rtmp)/ // const isHLS = /(https|http)/ +var timeout = function timeout(delay) { + return new _promise2.default(function (resolve) { + return setTimeout(resolve, delay); + }); +}; + /** * Modifies the intialization configuration used for publisher or subscriber. * This configuration can vary based on target tech and the `useProxy` attribute of the autoscale configuration. @@ -4534,6 +4544,24 @@ var modifyInitConfigWithResponse = function modifyInitConfigWithResponse(config, return c; }; +/** + * Nicely wraps an async in a promise so we can use in-line without try...catch. + * + * @private + */ +var asyncWrap = function asyncWrap(p) { + return new _promise2.default(function (resolve) { + p.then(function (response) { + resolve(response); + }).catch(function (e) { + resolve({ + error: e.message, + message: e.response.errorMessage + }); + }); + }); +}; + /** * Allows for retry in requesting on the Stream Manager API. * @@ -4541,48 +4569,66 @@ var modifyInitConfigWithResponse = function modifyInitConfigWithResponse(config, */ var execute = function () { var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(config, count, limit, delay) { - var onfailure, response; + var response; return _regenerator2.default.wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: - onfailure = function onfailure() { - if (count++ < limit) { - (0, _log.debug)(NAME, 'Attempt ' + count + ' of ' + limit + ', with ' + delay + ' millisecond delay.'); - var timeout = setTimeout(function () { - clearTimeout(timeout); - execute(config, count, limit, delay); - }, delay); - return true; - } - return false; - }; + (0, _log.debug)(NAME, 'Attempting ' + (count + 1) + ' of ' + limit + ' with ' + delay + ' millisecond delay...'); + _context.next = 3; + return asyncWrap((0, _request2.default)(config)); - _context.prev = 1; - _context.next = 4; - return (0, _request2.default)(config); + case 3: + response = _context.sent; case 4: + if (!(!response || response && response.error)) { + _context.next = 17; + break; + } + + if (!(limit === -1 || ++count < limit)) { + _context.next = 14; + break; + } + + (0, _log.debug)(NAME, 'Attempting ' + (count + 1) + ' of ' + limit + ' with ' + delay + ' millisecond delay...'); + _context.next = 9; + return timeout(delay); + + case 9: + _context.next = 11; + return asyncWrap((0, _request2.default)(config)); + + case 11: response = _context.sent; - return _context.abrupt('return', response); + _context.next = 15; + break; - case 8: - _context.prev = 8; - _context.t0 = _context['catch'](1); + case 14: + return _context.abrupt('break', 17); - if (onfailure()) { - _context.next = 12; + case 15: + _context.next = 4; + break; + + case 17: + if (!(!response || response.error)) { + _context.next = 21; break; } - throw _context.t0; + throw new Error(response.message || response.error); + + case 21: + return _context.abrupt('return', response); - case 12: + case 22: case 'end': return _context.stop(); } } - }, _callee, undefined, [[1, 8]]); + }, _callee, undefined); })); return function execute(_x, _x2, _x3, _x4) { @@ -4653,6 +4699,7 @@ var autoscaleInit = function () { * * @param {Object} proxy * The established Publisher or Subscriber instance of the Red5 Pro SDK. + * @private */ var Autoscale = exports.Autoscale = function Autoscale(proxy) { return { @@ -4667,13 +4714,15 @@ var Autoscale = exports.Autoscale = function Autoscale(proxy) { * * @param {Class} clazz * The Class reference to apply the `autoscale` function to. + * @private */ var Decorate = exports.Decorate = function Decorate(clazz) { var fn = function fn(autoscaleConfig, initConfig) { return autoscaleInit(this, autoscaleConfig, initConfig); }; Object.defineProperty(clazz.prototype, 'autoscale', { - value: fn + value: fn, + enumerable: true }); }; @@ -4774,7 +4823,7 @@ var defaultConfig = { * useProxy: true // optional, default=true. Enforces connection proxy for WebRTC clients * } */ -var request = function () { +var req = function () { var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(config) { var configuration, url, response, payload, error; return _regenerator2.default.wrap(function _callee$(_context) { @@ -4783,44 +4832,68 @@ var request = function () { case 0: configuration = (0, _extends3.default)({}, defaultConfig, config); url = endpointFromConfiguration(configuration); - _context.next = 4; + _context.prev = 2; + _context.next = 5; return _browser2.default.fetch(url); - case 4: + case 5: response = _context.sent; if (!(response.status >= 200 && response.status < 300 && response.headers.get('content-type') && response.headers.get('content-type').toLowerCase().indexOf('application/json') >= 0)) { - _context.next = 12; + _context.next = 13; break; } - _context.next = 8; + _context.next = 9; return response.json(); - case 8: + case 9: payload = _context.sent; return _context.abrupt('return', payload); - case 12: + case 13: error = new Error('Could not properly parse response from ' + url + '.'); + _context.prev = 14; + _context.next = 17; + return response.json(); + + case 17: + error.response = _context.sent; + _context.next = 23; + break; + + case 20: + _context.prev = 20; + _context.t0 = _context['catch'](14); error.response = response; + + case 23: throw error; - case 15: + case 24: + _context.next = 29; + break; + + case 26: + _context.prev = 26; + _context.t1 = _context['catch'](2); + throw _context.t1; + + case 29: case 'end': return _context.stop(); } } - }, _callee, undefined); + }, _callee, undefined, [[2, 26], [14, 20]]); })); - return function request(_x) { + return function req(_x) { return _ref.apply(this, arguments); }; }(); -exports.default = request; +exports.default = req; /***/ }), @@ -5226,4 +5299,4 @@ module.exports = __webpack_require__(/*! /Users/toddanderson/Documents/Workplace /******/ }); }); -//# sourceMappingURL=data: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b3B5ID0ge307XG4gICAgICAgIE9iamVjdC5rZXlzKG9iaikuZm9yRWFjaChmdW5jdGlvbiAoaykge1xuICAgICAgICAgICAgY29weVtrXSA9IG9ialtrXTtcbiAgICAgICAgfSk7XG4gICAgICAgIHJldHVybiBjb3B5O1xuICAgIH0gZWxzZSB7XG4gICAgICAgIHJldHVybiBvYmo7XG4gICAgfVxufVxuXG5mdW5jdGlvbiBpbnNwZWN0KG9iaikge1xuICAgIGlmICh0eXBlb2Ygb2JqID09PSAndW5kZWZpbmVkJykge1xuICAgICAgICByZXR1cm4gJ3VuZGVmaW5lZCc7XG4gICAgfVxuICAgIGlmIChvYmogPT09IG51bGwpIHtcbiAgICAgICAgcmV0dXJuICdudWxsJztcbiAgICB9XG4gICAgaWYgKEFycmF5LmlzQXJyYXkob2JqKSkge1xuICAgICAgICB2YXIgaXRlbXMgPSBvYmoubWFwKGZ1bmN0aW9uIChvYmopIHsgcmV0dXJuIGluc3BlY3Qob2JqKTsgfSk7XG4gICAgICAgIHJldHVybiAnWyAnICsgaXRlbXMuam9pbignLCAnKSArICcgXSc7XG4gICAgfVxuICAgIGlmICh0eXBlb2Ygb2JqID09PSAnb2JqZWN0Jykge1xuICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkob2JqKTtcbiAgICB9XG4gICAgaWYgKHR5cGVvZiBvYmogPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgcmV0dXJuICdbRnVuY3Rpb246ICcgKyBvYmoubmFtZSArICddJztcbiAgICB9XG4gICAgaWYgKHR5cGVvZiBvYmogPT09ICdib29sZWFuJyB8fCB0eXBlb2Ygb2JqID09PSAnbnVtYmVyJykge1xuICAgICAgICByZXR1cm4gb2JqO1xuICAgIH1cbiAgICByZXR1cm4gJ1xcJycgKyBvYmoudG9TdHJpbmcoKSArICdcXCcnO1xufVxuXG5mdW5jdGlvbiBmb3JtYXQoZikge1xuICAgIHZhciBhcmd1bWVudHMkMSA9IGFyZ3VtZW50cztcblxuICAgIGlmICh0eXBlb2YgZiAhPT0gJ3N0cmluZycpIHtcbiAgICAgICAgdmFyIG9iamVjdHMgPSBuZXcgQXJyYXkoYXJndW1lbnRzLmxlbmd0aCk7XG4gICAgICAgIGZvciAodmFyIGkkMSA9IDA7aSQxIDwgYXJndW1lbnRzLmxlbmd0aDsgaSQxKyspIHtcbiAgICAgICAgICAgIG9iamVjdHNbaSQxXSA9IGluc3BlY3QoYXJndW1lbnRzJDFbaSQxXSk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG9iamVjdHMuam9pbignICcpO1xuICAgIH1cbiAgICB2YXIgZm9ybWF0UmVnRXhwID0gLyVbc2RqJV0vZztcbiAgICB2YXIgaSA9IDE7XG4gICAgdmFyIGFyZ3MgPSBhcmd1bWVudHM7XG4gICAgdmFyIGxlbiA9IGFyZ3MubGVuZ3RoO1xuICAgIHZhciBzdHIgPSBTdHJpbmcoZikucmVwbGFjZShmb3JtYXRSZWdFeHAsIGZ1bmN0aW9uICh4KSB7XG4gICAgICAgIGlmICh4ID09PSAnJSUnKSB7XG4gICAgICAgICAgICByZXR1cm4gJyUnO1xuICAgICAgICB9XG4gICAgICAgIGlmIChpID49IGxlbikge1xuICAgICAgICAgICAgcmV0dXJuIHg7XG4gICAgICAgIH1cbiAgICAgICAgc3dpdGNoICh4KSB7XG4gICAgICAgICAgICBjYXNlICclcyc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIFN0cmluZyhhcmdzW2krK10pO1xuICAgICAgICAgICAgY2FzZSAnJWQnOlxuICAgICAgICAgICAgICAgIHJldHVybiBOdW1iZXIoYXJnc1tpKytdKTtcbiAgICAgICAgICAgIGNhc2UgJyVqJzpcbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkoYXJnc1tpKytdKTtcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChfKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW0Np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WVsZHNbbmFtZV07XG4gICAgICAgIH1cbiAgICAgICAgdmFyIG5hbWVzID0gT2JqZWN0LmtleXMob3B0aW9ucyk7XG4gICAgICAgIGZvciAoaSA9IDA7IGkgPCBuYW1lcy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgbmFtZSA9IG5hbWVzW2ldO1xuICAgICAgICAgICAgZmllbGRzW25hbWVdID0gb3B0aW9uc1tuYW1lXTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm47XG4gICAgfVxuICAgIGlmIChwYXJlbnQpIHtcbiAgICAgICAgdGhpcy5fbGV2ZWwgPSBwYXJlbnQuX2xldmVsO1xuICAgICAgICB0aGlzLnN0cmVhbXMgPSBbXTtcbiAgICAgICAgZm9yIChpID0gMDsgaSA8IHBhcmVudC5zdHJlYW1zLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICB2YXIgcyA9IG9iakNvcHkocGFyZW50LnN0cmVhbXNbaV0pO1xuICAgICAgICAgICAgdGhpcyQxLnN0cmVhbXMucHVzaChzKTtcbiAgICAgICAgfVxuICAgICAgICB0aGlzLnNlcmlhbGl6ZXJzID0gb2JqQ29weShwYXJlbnQuc2VyaWFsaXplcnMpO1xuICAgICAgICB0aGlzLnNyYyA9IHBhcmVudC5zcmM7XG4gICAgICAgIHRoaXMuZmllbGRzID0gb2JqQ29weShwYXJlbnQuZmllbGRzKTtcbiAgICAgICAgaWYgKG9wdGlvbnMubGV2ZWwpIHtcbiAgICAgICAgICAgIHRoaXMubGV2ZWwob3B0aW9ucy5sZXZlbCk7XG4gICAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgICB0aGlzLl9sZXZlbCA9IE51bWJlci5QT1NJVElWRV9JTkZJTklUWTtcbiAgICAgICAgdGhpcy5zdHJlYW1zID0gW107XG4gICAgICAgIHRoaXMuc2VyaWFsaXplcnMgPSBudWxsO1xuICAgICAgICB0aGlzLnNyYyA9IGZhbHNlO1xuICAgICAgICB0aGlzLmZpZWxkcyA9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XZlbHMgKG5hbWUsIHZhbHVlKSB7XG4gICAgICAgIHZhciB0aGlzJDEgPSB0aGlzO1xuXG4gICAgaWYgKG5hbWUgPT09IHVuZGVmaW5lZCkge1xuICAgICAgICByZXR1cm4gdGhpcy5zdHJlYW1zLm1hcChmdW5jdGlvbiAocykgeyByZXR1cm4gcy5sZXZlbDsgfSk7XG4gICAgfVxuICAgIHZhciBzdHJlYW07XG4gICAgaWYgKHR5cGVvZiBuYW1lID09PSAnbnVtYmVyJykge1xuICAgICAgICBzdHJlYW0gPSB0aGlzLnN0cmVhbXNbbmFtZV07XG4gICAgICAgIGlmIChzdHJlYW0gPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdpbnZhbGlkIHN0cmVhbSBpbmRleDogJyArIG5hbWUpO1xuICAgICAgICB9XG4gICAgfSBlbHNlIHtcbiAgICAgICAgdmFyIGxlbiA9IHRoaXMuc3RyZWFtcy5sZW5ndGg7XG4gICAgICAgIGZvciAodmFyIGkgPSAwO2kgPCBsZW47IGkrKykge1xuICAgICAgICAgICAgdmFyIHMgPSB0aGlzJDEuc3RyZWFtc1tpXTtcbiAgICAgICAgICAgIGlmIChzLm5hbWUgPT09IG5hbWUpIHtcbiAgICAgICAgICAgICAgICBzdHJlYW0gPSBzO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmICghc3RyZWFtKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoZm9ybWF0KCdubyBzdHJlYW0gd2l0aCBuYW1lIFwiJXNcIicsIG5hbWUpKTtcbiAgICAgICAgfVxuICAgIH1cbiAgICBpZiAodmFsdWUgPT09IHVuZGVmaW5lZCkge1xuICAgICAgICByZXR1cm4gc3RyZWFtLmxldmVsO1xuICAgIH0gZWxzZSB7XG4gICAgICAgIHZhciBuZXdMZXZlbCA9IHJlc29sdmVMZXZlbCh2YWx1ZSk7XG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JzLmVycihhcmdzWzBdKVxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgZXhjbHVkZUZpZWxkcyA9IHtcbiAgICAgICAgICAgICAgICAgICAgZXJyOiB0cnVlXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICBpZiAoYXJncy5sZW5ndGggPT09IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgbXNnQXJncyA9IFtmaWVsZHMuZXJyLm1lc3NhZ2VdO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIG1zZ0FyZ3MgPSBBcnJheS5wcm90b3R5cGUuc2xpY2UuY2FsbChhcmdzLCAxKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHR5cGVvZiBhcmdzWzBdICE9PSAnb2JqZWN0JyAmJiBhcmdzWzBdICE9PSBudWxsIHx8IEFycmF5LmlzQXJyYXkoYXJnc1swXSkpIHtcbiAgICAgICAgICAgICAgICBmaWVsZHMgPSBudWxsO1xuICAgICAgICAgICAgICAgIG1zZ0FyZ3MgPSBBcnJheS5wcm90b3R5cGUuc2xpY2UuY2FsbChhcmdzKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgZmllbGRzID0gYXJnc1swXTtcbiAgICAgICAgICAgICAgICBpZiAoYXJncy5sZW5ndGggPT09IDEgJiYgZmllbGRzLmVyciAmJiBmaWVsZHMuZXJyIGluc3RhbmNlb2YgRXJyb3IpIHtcbiAgICAgICAgICAgICAgICAgICAgbXNnQXJncyA9IFtmaWVsZHMuZXJyLm1lc3NhZ2VdO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIG1zZ0FyZ3MgPSBBcnJheS5wcm90b3R5cGUuc2xpY2UuY2FsbChhcmdzLCAxKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YXIgcmVjID0gb2JqQ29weShsb2cuZmllbGRzKTtcbiAgICAgICAgICAgIHJlYy5sZXZlbCA9IG1pbkxldmVsO1xuICAgICAgICAgICAgdmFyIHJlY0ZpZWxkcyA9IGZpZWxkcyA/IG9iakNvcHkoZmllbGRzKSA6IG51bGw7XG4gICAgICAgICAgICBpZiAocmVjRmllbGRzKSB7XG4gICAgICAgICAgICAgICAgaWYgKGxvZy5zZXJpYWxpemVycykge1xuICAgICAgICAgICAgICAgICAgICBsb2cuX2FwcGx5U2VyaWFsaXplcnMocmVjRmllbGRzLCBleGNsdWRlRmllbGRzKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgT2JqZWN0LmtleXMocmVjRmllbGRzKS5mb3JFYWNoKGZ1bmN0aW9uIChrKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlY1trXSA9IHJlY0ZpZWxkc1trXTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYy5sZXZlbE5hbWUgPSBuYW1lRnJvbUxldmVsW21pbkxldmVsXTtcbiAgICAgICAgICAgIHJlYy5tc2cgPSBtc2dBcmdzLmxlbmd0aCA/IGZvcm1hdC5hcHBseShsb2csIG1zZ0FyZ3MpIDogJyc7XG4gICAgICAgICAgICBpZiAoIXJlYy50aW1lKSB7XG4gICAgICAgICAgICAgICAgcmVjLnRpbWUgPSBuZXcgRGF0ZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKGxvZy5zcmMgJiYgIXJlYy5zcmMpIHtcbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoQ0FMTF9TVEFDS19FUlJPUik7XG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBzcmMgPSBleHRyYWN0U3JjRnJvbVN0YWNrdHJhY2UoZXJyLnN0YWNrLCAyKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFzcmMgJiYgIV9oYXZlV2FybmVkKCdzcmMnKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgX3dhcm4oJ1VuYWJsZSB0byBkZXRlcm1pbmUgc3JjIGxpbmUgaW5mbycsICdzcmMnKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZWMuc3JjID0gc3JjIHx8ICcnO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYy52ID0gTE9HX1ZFUlNJT047XG4gICAgICAgICAgICByZXR1cm4gcmVjO1xuICAgICAgICB9XG4gICAgICAgIFxuICAgICAgICB2YXIgZmllbGRzID0gbnVsbDtcbiAgICAgICAgdmFyIG1zZ0FyZ3MgPSBhcmd1bWVudHM7XG4gICAgICAgIHZhciByZWMgPSBudWxsO1xuICAgICAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2xldmVsIDw9IG1pbkxldmVsO1xuICAgICAgICB9IGVsc2UgaWYgKHRoaXMuX2xldmVsID4gbWluTGV2ZWwpIHt9IGVsc2Uge1xuICAgICAgICAgICAgcmVjID0gbWtSZWNvcmQobXNnQXJncyk7XG4gICAgICAgICAgICB0aGlzLl9lbWl0KHJlYyk7XG4gICAgICAgIH1cbiAgICB9O1xufVxuXG5Mb2dnZXIucHJvdG90eXBlLnRyYWNlID0gbWtMb2dFbWl0dGVyKFRSQUNFKTtcbkxvZ2dlci5wcm90b3R5cGUuZGVidWcgPSBta0xvZ0VtaXR0ZXIoREVCVUcpO1xuTG9nZ2VyLnByb3RvdHlwZS5pbmZvID0gbWtMb2dFbWl0dGVyKElORk8pO1xuTG9nZ2VyLnByb3RvdHlwZS53YXJuID0gbWtMb2dFbWl0dGVyKFdBUk4pO1xuTG9nZ2VyLnByb3RvdHlwZS5lcnJvciA9IG1rTG9nRW1pdHR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xldmVsKSB7XG4gICAgICAgIGlmIChyZWMubGV2ZWwgPT09IFRSQUNFJDIpIHtcbiAgICAgICAgICAgIGxldmVsTmFtZSA9ICdkZWJ1Zyc7XG4gICAgICAgIH0gZWxzZSBpZiAocmVjLmxldmVsID09PSBGQVRBTCQyKSB7XG4gICAgICAgICAgICBsZXZlbE5hbWUgPSAnZXJyb3InO1xuICAgICAgICB9XG4gICAgICAgIGNvbnNvbGVNZXRob2QgPSB0eXBlb2YgY29uc29sZVtsZXZlbE5hbWVdID09PSAnZnVuY3Rpb24nID8gY29uc29sZVtsZXZlbE5hbWVdIDogY29uc29sZS5sb2c7XG4gICAgfSBlbHNlIHtcbiAgICAgICAgY29uc29sZU1ldGhvZCA9IGNvbnNvbGUubG9nO1xuICAgIH1cbiAgICBpZiAocmVjLmxldmVsIDwgREVCVUckMikge1xuICAgICAgICBsZXZlbENzcyA9IHRoaXMuY3NzLmxldmVscy50cmFjZTtcbiAgICB9IGVsc2UgaWYgKHJlYy5sZXZlbCA8IElORk8kMikge1xuICAgICAgICBsZXZlbENzcyA9IHRoaXMuY3NzLmxldmVscy5kZWJ1ZztcbiAgICB9IGVsc2UgaWYgKHJlYy5sZXZlbCA8IFdBUk4kMikge1xuICAgICAgICBsZXZlbENzcyA9IHRoaXMuY3NzLmxldmVscy5pbmZvO1xuICAgIH0gZWxzZSBpZiAocmVjLmxldmVsIDwgRVJST1IkMikge1xuICAgICAgICBsZXZlbENzcyA9IHRoaXMuY3NzLmxldmVscy53YXJuO1xuICAgIH0gZWxzZSBpZiAocmVjLmxldmVsIDwgRkFUQUwkMikge1xuICAgICAgICBsZXZlbENzcyA9IHRoaXMuY3NzLmxldmVscy5lcnJvcjtcbiAgICB9IGVsc2Uge1xuICAgICAgICBsZXZlbENzcyA9IHRoaXMuY3NzLmxldmVscy5mYXRhbDtcbiAgICB9XG4gICAgdmFyIHBhZFplcm9zID0gZnVuY3Rpb24gKG51bWJlciwgbGVuKSB7XG4gICAgICAgIHJldHVyb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bWFpbjtcbiAgICAgIHZhciByZXN1bHQsIHRoZW4sIGV4aXRlZDtcbiAgICAgIHRyeSB7XG4gICAgICAgIGlmIChoYW5kbGVyKSB7XG4gICAgICAgICAgaWYgKCFvaykge1xuICAgICAgICAgICAgaWYgKHByb21pc2UuX2ggPT0gMikgb25IYW5kbGVVbmhhbmRsZWQocHJvbWlzZSk7XG4gICAgICAgICAgICBwcm9taXNlLl9oID0gMTtcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKGhhbmRsZXIgPT09IHRydWUpIHJlc3VsdCA9IHZhbHVlO1xuICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgaWYgKGRvbWFpbikgZG9tYWluLmVudGVyKCk7XG4gICAgICAgICAgICByZXN1bHQgPSBoYW5kbGVyKHZhbHVlKTsgLy8gbWF5IHRocm93XG4gICAgICAgICAgICBpZiAoZG9tYWluKSB7XG4gICAgICAgICAgICAgIGRvbWFpbi5leGl0KCk7XG4gICAgICAgICAgICAgIGV4aXRlZCA9IHRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChyZXN1bHQgPT09IHJlYWN0aW9uLnByb21pc2UpIHtcbiAgICAgICAgICAgIHJlamVjdChUeXBlRXJyb3IoJ1Byb21pc2UtY2hhaW4gY3ljbGUnKSk7XG4gICAgICAgICAgfSBlbHNlIGlmICh0aGVuID0gaXNUaGVuYWJsZShyZXN1bHQpKSB7XG4gICAgICAgICAgICB0aGVuLmNhbGwocmVzdWx0LCByZXNvbHZlLCByZWplY3QpO1xuICAgICAgICAgIH0gZWxzZSByZXNvbHZlKHJlc3VsdCk7XG4gICAgICAgIH0gZWxzZSByZWplY3QodmFsdWUpO1xuICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICBpZiAoZG9tYWluICYmICFleGl0ZWQpIGRvbWFpbi5leGl0KCk7XG4gICAgICAgIHJlamVjdChlKTtcbiAgICAgIH1cbiAgICB9O1xuICAgIHdoaWxlIChjaGF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HRpbmcgY29udGV4dC5fc2VudCBmb3IgbGVnYWN5IHN1cHBvcnQgb2YgQmFiZWwnc1xuICAgICAgICAgIC8vIGZ1bmN0aW9uLnNlbnQgaW1wbGVtZW50YXRpb24uXG4gICAgICAgICAgY29udGV4dC5zZW50ID0gY29udGV4dC5fc2VudCA9IGNvbnRleHQuYXJnO1xuXG4gICAgICAgIH0gZWxzZSBpZiAoY29udGV4dC5tZXRob2QgPT09IFwidGhyb3dcIikge1xuICAgICAgICAgIGlmIChzdGF0ZSA9PT0gR2VuU3RhdGVTdXNwZW5kZWRTdGFydCkge1xuICAgICAgICAgICAgc3RhdGUgPSBHZW5TdGF0ZUNvbXBsZXRlZDtcbiAgICAgICAgICAgIHRocm93IGNvbnRleHQuYXJnO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGNvbnRleHQuZGlzcGF0Y2hFeGNlcHRpb24oY29udGV4dC5hcmcpO1xuXG4gICAgICAgIH0gZWxzZSBpZiAoY29udGV4dC5tZXRob2QgPT09IFwicmV0dXJuXCIpIHtcbiAgICAgICAgICBjb250ZXh0LmFicnVwdChcInJldHVyblwiLCBjb250ZXh0LmFyZyk7XG4gICAgICAgIH1cblxuICAgICAgICBzdGF0ZSA9IEdlblN0YXRlRXhlY3V0aW5nO1xuXG4gICAgICAgIHZhciByZWNvcmQgPSB0cnlDYXRjaChpbm5lckZuLCBzZWxmLCBjb250ZXh0KTtcbiAgICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcIm5vcm1hbFwiKSB7XG4gICAgICAgICAgLy8gSWYgYW4gZXhjZXB0aW9uIGlzIHRocm93biBmcm9tIGlubmVyRm4sIHdlIGxlYXZlIHN0YXRlID09PVxuICAgICAgICAgIC8vIEdlblN0YXRlRXhlY3V0aW5nIGFuZCBsb29wIGJhY2sgZm9yIGFub3RoZXIgaW52b2NhdGlvbi5cbiAgICAgICAgICBzdGF0ZSA9IGNvbnRleHQuZG9uZVxuICAgICAgICAgICAgPyBHZW5TdGF0ZUNvb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B0aGUgVHlwZUVycm9yIGJlbG93LlxuICAgICAgICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgY29udGV4dC5tZXRob2QgPSBcInRocm93XCI7XG4gICAgICAgIGNvbnRleHQuYXJnID0gbmV3IFR5cGVFcnJvcihcbiAgICAgICAgICBcIlRoZSBpdGVyYXRvciBkb2VzIG5vdCBwcm92aWRlIGEgJ3Rocm93JyBtZXRob2RcIik7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBDb250aW51ZVNlbnRpbmVsO1xuICAgIH1cblxuICAgIHZhciByZWNvcmQgPSB0cnlDYXRjaChtZXRob2QsIGRlbGVnYXRlLml0ZXJhdG9yLCBjb250ZXh0LmFyZyk7XG5cbiAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwidGhyb3dcIikge1xuICAgICAgY29udGV4dC5tZXRob2QgPSBcInRocm93XCI7XG4gICAgICBjb250ZXh0LmFyZyA9IHJlY29yZC5hcmc7XG4gICAgICBjb250ZXh0LmRlbGVnYXRlID0gbnVsbDtcbiAgICAgIHJldHVybiBDb250aW51ZVNlbnRpbmVsO1xuICAgIH1cblxuICAgIHZhciBpbmZvID0gcmVjb3JkLmFyZztcblxuICAgIGlmICghIGluZm8pIHtcbiAgICAgIGNvbnRleHQubWV0aG9kID0gXCJ0aHJvd1wiO1xuICAgICAgY29udGV4dC5hcmcgPSBuZXcgVHlwZUVycm9yKFwiaXRlcmF0b3IgcmVzdWx0IGlzIG5vdCBhbiBvYmplY3RcIik7XG4gICAgICBjb250ZXh0LmRlbGVnYXRlID0gbnVsbDtcbiAgICAgIHJldHVybiBDb250aW51ZVNlbnRpbmVsO1xuICAgIH1cblxuICAgIGlmIChpbmZvLmRvbmUpIHtcbiAgICAgIC8vIEFzc2lnbiB0aGUgcmVzdWx0IG9mIHRoZSBmaW5pc2hlZCBkZWxlZ2F0ZSB0byB0aGUgdGVtcG9yYXJ5XG4g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1bmN0aW9uLlxuICAgICAgbmV4dC5kb25lID0gdHJ1ZTtcbiAgICAgIHJldHVybiBuZXh0O1xuICAgIH07XG4gIH07XG5cbiAgZnVuY3Rpb24gdmFsdWVzKGl0ZXJhYmxlKSB7XG4gICAgaWYgKGl0ZXJhYmxlKSB7XG4gICAgICB2YXIgaXRlcmF0b3JNZXRob2QgPSBpdGVyYWJsZVtpdGVyYXRvclN5bWJvbF07XG4gICAgICBpZiAoaXRlcmF0b3JNZXRob2QpIHtcbiAgICAgICAgcmV0dXJuIGl0ZXJhdG9yTWV0aG9kLmNhbGwoaXRlcmFibGUpO1xuICAgICAgfVxuXG4gICAgICBpZiAodHlwZW9mIGl0ZXJhYmxlLm5leHQgPT09IFwiZnVuY3Rpb25cIikge1xuICAgICAgICByZXR1cm4gaXRlcmFibGU7XG4gICAgICB9XG5cbiAgICAgIGlmICghaXNOYU4oaXRlcmFibGUubGVuZ3RoKSkge1xuICAgICAgICB2YXIgaSA9IC0xLCBuZXh0ID0gZnVuY3Rpb24gbmV4dCgpIHtcbiAgICAgICAgICB3aGlsZSAoKytpIDwgaXRlcmFibGUubGVuZ3RoKSB7XG4gICAgICAgICAgICBpZiAoaGFzT3duLmNhbGwoaXRlcmFibGUsIGkpKSB7XG4gICAgICAgICAgICAgIG5leHQudmFsdWUgPSBpdGVyYWJsZVtpXTtcbiAgICAgICAgICAgICAgbmV4dC5kb25lID0gZmFsc2U7XG4gICAgICAgICAgICAgIHJldHVybiBuZXh0O1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cblxuICAgICAgICAgIG5leHQudmFsdWUgPSB1bmRlZmluZWQ7XG4gICAgICAgICAgbmV4dC5kb25lID0gdHJ1ZTtcblxuICAgICAgICAgIHJldHVybiBuZXh0O1xuICAgICAgICB9O1xuXG4gICAgICAgIHJldHVybiBuZXh0Lm5leHQgPSBuZXh0O1xuICAgICAgfVxuICAgIH1cblxuICAgIC8vIFJldHVybiBhbiBpdGVyYXRvciB3aXRoIG5v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bHNlIGlmICh0aGlzLnByZXYgPCBlbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuZmluYWxseUxvYyk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICB9IGVsc2UgaWYgKGhhc0NhdGNoKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5wcmV2IDwgZW50cnkuY2F0Y2hMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5jYXRjaExvYywgdHJ1ZSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICB9IGVsc2UgaWYgKGhhc0ZpbmFsbHkpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnByZXYgPCBlbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuZmluYWxseUxvYyk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwidHJ5IHN0YXRlbWVudCB3aXRob3V0IGNhdGNoIG9yIGZpbmFsbHlcIik7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfSxcblxuICAgIGFicnVwdDogZnVuY3Rpb24odHlwZSwgYXJnKSB7XG4gICAgICBmb3IgKHZhciBpID0gdGhpcy50cnlFbnRyaWVzLmxlbmd0aCAtIDE7IGkgPj0gMDsgLS1pKSB7XG4gICAgICAgIHZhciBlbnRyeSA9IHRoaXMudHJ5RW50cmllc1tpXTtcbiAgICAgICAgaWYgKGVudHJ5LnRyeUxvYyA8PSB0aGlzLnByZXYgJiZcbiAgICAgICAgICAgIGhhc093bi5jYWxsKGVudHJ5LCBcImZpbmFsbHlMb2NcIikgJiZcbiAgICAgICAgICAgIHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICB2YXIgZmluYWxseUVudHJ5ID0gZW50cnk7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgaWYgKGZpbmFsbHlFbnRyeSAmJlxuICAgICAgICAgICh0eXBlID09PSBcImJyZWFrXCIgfHxcbiAgICAgICAgICAgdHlwZSA9PT0gXCJjb250aW51ZVwiKSAmJlxuICAgICAgICAgIGZpbmFsbHlFbnRyeS50cnlMb2MgPD0gYXJnICYmXG4gICAgICAgICAgYXJnIDw9IGZpbmFsbHlFbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgIC8vIElnbm9yZSB0aGUgZmluYWxseSBlbnRyeSBpZiBjb250cm9sIGlzIG5vdCBqdW1waW5nIHRvIGFcbiAgICAgICAgLy8gbG9jYXRpb24gb3V0c2lkZSB0aGUgdHJ5L2NhdGNoIGJsb2NrLlxuICAgICAgICBmaW5hbGx5RW50cnkgPSBudWxsO1xuICAgICAgfVxuXG4gICAgICB2YXIgcmVjb3JkID0gZmluYWxseUVudHJ5ID8gZmluYWxseUVudHJ5LmNvbXBsZXRpb24gOiB7fTtcbiAgICAgIHJlY29yZC50eXBlID0gdHlwZTtcbiAgICAgIHJlY29yZC5hcmcgPSBhcmc7XG5cbiAgICAgIGlmIChmaW5hbGx5RW50cnkpIHtcbiAgICAgICAgdGhpcy5tZXRob2QgPSBcIm5leHRcIjtcbiAgICAgICAgdGhpcy5uZXh0ID0gZmluYWxseUVudHJ5LmZpbmFsbHlMb2M7XG4gICAgICAgIHJldHVybiBDb250aW51ZVNlbnRpbmVsO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gdGhpcy5jb21wbGV0ZShyZWNvcmQpO1xuICAgIH0sXG5cbiAgICBjb21wbGV0ZTogZnVuY3Rpb24ocmVjb3JkLCBhZnRlckxvYykge1xuICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcInRocm93XCIpIHtcbiAgICAgICAgdGhyb3cgcmVjb3JkLmFyZztcbiAgICAgIH1cblxuICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcImJyZWFrXCIgfHxcbiAgICAgICAgICByZWNvcmQudHlwZSA9PT0gXCJjb250aW51ZVwiKSB7XG4gICAgICAgIHRoaXMubmV4dCA9IHJlY29yZC5hcmc7XG4gICAgICB9IGVsc2UgaWYgKHJlY29yZC50eXBlID09PSBcInJldHVyblwiKSB7XG4gICAgICAgIHRoaXMucnZhbCA9IHRoaXMuYXJnID0gcmVjb3JkLmFyZztcbiAgICAgICAgdGhpcy5tZXRob2QgPSBcInJldHVyblwiO1xuICAgICAgICB0aGlzLm5leHQgPSBcImVuZFwiO1xuICAgICAgfSBlbHNlIGlmIChyZWNvcmQudHlwZSA9PT0gXCJub3JtYWxcIiAmJiBhZnRlckxvYykge1xuICAgICAgICB0aGlzLm5leHQgPSBhZnRlckxvYztcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgfSxcblxuICAgIGZpbmlzaDogZnVuY3Rpb24oZmluYWxseUxvYykge1xuICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG4gICAgICAgIGlmIChlbnRyeS5maW5hbGx5TG9jID09PSBmaW5hbGx5TG9jKSB7XG4gICAgICAgICAgdGhpcy5jb21wbGV0ZShlbnRyeS5jb21wbGV0aW9uLCBlbnRyeS5hZnRlckxvYyk7XG4gICAgICAgICAgcmVzZXRUcnlFbnRyeShlbnRyeSk7XG4gICAgICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9LFxuXG4gICAgXCJjYXRjaFwiOiBmdW5jdGlvbih0cnlMb2MpIHtcbiAgICAgIGZvciAodmFyIGkgPSB0aGlzLnRyeUVudHJpZXMubGVuZ3RoIC0gMTsgaSA+PSAwOyAtLWkpIHtcbiAgICAgICAgdmFyIGVud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Xh0LmRlY29yYXRlKCk7XG4gKiBcbiAqICAgICAgICAgdmFyIHJ0Y1B1Ymxpc2hlciA9IG5ldyByZWQ1cHJvc2RrLlJUQ1B1Ymxpc2hlcigpO1xuICogICAgICAgICB2YXIgcnRjU3Vic2NyaWJlciA9IG5ldyByZWQ1cHJvc2RrLlJUQ1N1YnNjcmliZXIoKTtcbiAqIFxuICogICAgICAgICB2YXIgYXV0b3NjYWxlQ29uZmlnID0ge1xuICogICAgICAgICAgIHByb3RvY29sOiAnaHR0cHMnLFxuICogICAgICAgICAgIGhvc3Q6ICdzdHJlYW1tYW5hZ2VyLmNvbXBhbnkub3JnJyxcbiAqICAgICAgICAgICBzdHJlYW1OYW1lOiAnbXlzdHJlYW0nLFxuICogICAgICAgICAgIHNjb3BlOiAnbGl2ZScsXG4gKiAgICAgICAgICAgYXBpVmVyc2lvbjogJzMuMCcsXG4gKiAgICAgICAgICAgdXNlUHJveHk6IHRydWVcbiAqICAgICAgICAgfTtcbiAqIFxuICogICAgICAgICB2YXIgaW5pdENvbmZpZyA9IHtcbiAqICAgICAgICAgICBwcm90b2NvbDogJ3dzcycsXG4gKiAgICAgICAgICAgaG9zdDogJ3N0cmVhbW1hbmFnZXIuY29tcGFueS5vcmcnLFxuICogICAgICAgICAgIHBvcnQ6IDgwODM6LFxuICogICAgICAgICAgIGFwcDogJ2xpdmUnLFxuICogICAgICAgICAgIHN0cmVhbU5hbWU6ICdteXN0cmVhbScsXG4gKiAgICAgICAgICAgaWNlU2VydmVyczogW3t1cmxzOiAnc3R1bjpzdHVuMi5sLmdvb2dsZS5jb206MTkzMDInfV1cbiAqICAgICAgICAgfTtcbiAqIFxuICogICAgICAgICB2YXIgcHVibGlzaEF1dG9zY2FsZUNvbmZpZyA9IE9iamVjdC5hc3NpZ24oe30sIGF1dG9zY2FsZUNvbmZpZywge1xuICogICAgICAgICAgIGFjdGlvbjogJ2Jyb2FkY2FzdCdcbiAqICAgICAgICAgfSk7XG4gKiAgICAgICAgIHZhciBzdWJzY3JpYmVBdXRvc2NhbGVDb25maWcgPSBPYmplY3QuYXNzaWduKHt9LCBhdXRvc2NhbGVDb25maWcsIHtcbiAqICAgICAgICAgICBhY3Rpb246ICdzdWJzY3JpYmUnXG4gKiAgICAgICAgIH0pO1xuICogXG4gKiAgICAgICAgIGZ1bmN0aW9uIHN1YnNjcmliZSAoKSB7XG4gKiAgICAgICAgICAgcnRjU3Vic2NyaWJlclxuICogICAgICAgICAgICAgLmF1dG9zY2FsZShzdWJzY3JpYmVBdXRvc2NhbGVDb25maWcsIGluaXRDb25maWcpXG4gKiAgICAgICAgICAgICAudGhlbihmdW5jdGlvbiAoKSB7XG4gKiAgICAgICAgICAgICAgIHJldHVybiBydGNTdWJzY3JpYmVyLnN1YnNjcmliZSgpO1xuICogICAgICAgICAgICAgfSlcbiAqICAgICAgICAgICAgIC5jYXRjaChmdW5jdGlvbiAoZXJyb3IpIHtcbiAqICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcignQ291bGQgbm90IHBsYXk6ICcgKyBlcnJvcik7XG4gKiAgICAgICAgICAgICB9KTtcbiAqICAgICAgICAgfVxuICogXG4gKiAgICAgICAgIC8vIEZpcnN0IGNvbm5lY3QgQXV0b3NjYWxlLWQgUHVibGlzaGVyLlxuICogICAgICAgICBydGNQdWJsaXNoZXJcbiAqICAgICAgICAgICAuYXV0b3NjYWxlKHB1Ymxpc2hBdXRvc2NhbGVDb25maWcsIGluaXRDb25maWcpXG4gKiAgICAgICAgICAgLnRoZW4oZnVuY3Rpb24gKCkge1xuICogICAgICAgICAgICAgLy8gT25jZSBwdWJsaXNoaW5nLCB3ZSB3aWxsIHN0YXJ0IHRoZSBBdXRvc2NhbGUtZCBTdWJzY3JpYmVyLlxuICogICAgICAgICAgICAgcnRjUHVibGlzaGVyLm9uKHJlZDVwcm9zZGsuUHVibGlzaGVyRXZlbnRUeXBlcy5QVUJMSVNIX1NUQVJULCBzdWJzY3JpYmUpO1xuICogICAgICAgICAgICAgcmV0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dGlvbjogJyArIG9iai5uYW1lICsgJ10nO1xuICAgIH1cbiAgICBpZiAodHlwZW9mIG9iaiA9PT0gJ2Jvb2xlYW4nIHx8IHR5cGVvZiBvYmogPT09ICdudW1iZXInKSB7XG4gICAgICAgIHJldHVybiBvYmo7XG4gICAgfVxuICAgIHJldHVybiAnXFwnJyArIG9iai50b1N0cmluZygpICsgJ1xcJyc7XG59XG5cbmZ1bmN0aW9uIGZvcm1hdChmKSB7XG4gICAgdmFyIGFyZ3VtZW50cyQxID0gYXJndW1lbnRzO1xuXG4gICAgaWYgKHR5cGVvZiBmICE9PSAnc3RyaW5nJykge1xuICAgICAgICB2YXIgb2JqZWN0cyA9IG5ldyBBcnJheShhcmd1bWVudHMubGVuZ3RoKTtcbiAgICAgICAgZm9yICh2YXIgaSQxID0gMDtpJDEgPCBhcmd1bWVudHMubGVuZ3RoOyBpJDErKykge1xuICAgICAgICAgICAgb2JqZWN0c1tpJDFdID0gaW5zcGVjdChhcmd1bWVudHMkMVtpJDFdKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gb2JqZWN0cy5qb2luKCcgJyk7XG4gICAgfVxuICAgIHZhciBmb3JtYXRSZWdFeHAgPSAvJVtzZGolXS9nO1xuICAgIHZhciBpID0gMTtcbiAgICB2YXIgYXJncyA9IGFyZ3VtZW50cztcbiAgICB2YXIgbGVuID0gYXJncy5sZW5ndGg7XG4gICAgdmFyIHN0ciA9IFN0cmluZyhmKS5yZXBsYWNlKGZvcm1hdFJlZ0V4cCwgZnVuY3Rpb24gKHgpIHtcbiAgICAgICAgaWYgKHggPT09ICclJScpIHtcbiAgICAgICAgICAgIHJldHVybiAnJSc7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGkgPj0gbGVuKSB7XG4gICAgICAgICAgICByZXR1cm4geDtcbiAgICAgICAgfVxuICAgICAgICBzd2l0Y2ggKHgpIHtcbiAgICAgICAgICAgIGNhc2UgJyVzJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gU3RyaW5nKGFyZ3NbaSsrXSk7XG4gICAgICAgICAgICBjYXNlICclZCc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIE51bWJlcihhcmdzW2krK10pO1xuICAgICAgICAgICAgY2FzZSAnJWonOlxuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeShhcmdzW2krK10pO1xuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKF8pIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbQ2lyY3VsYXJdJztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgIHJldHVybiB4O1xuICAgICAgICB9XG4gICAgfSk7XG4gICAgZm9yICh2YXIgeCA9IGFyZ3NbaV07aSA8IGxlbjsgeCA9IGFyZ3NbKytpXSkge1xuICAgICAgICBzdHIgKz0gJyAnICsgeDtcbiAgICB9XG4gICAgcmV0dXJuIHN0cjtcbn1cblxuZnVuY3Rpb24gZXh0cmFjdFNyY0Zyb21TdGFja3RyYWNlKHN0YWNrLCBsZXZlbCkge1xuICAgIHZhciBzdGFja0xpbmVzID0gc3RhY2suc3BsaXQoJ1xcbicpO1xuICAgIGlmIChzdGFja0xpbmVzWzBdICYmIHN0YWNrTGluZXNbMF0uaW5kZXhPZihDQUxMX1NUQUNLX0VSUk9SKSA+PSAwKSB7XG4gICAgICAgIHN0YWNrTGluZXMuc2hpZnQoKTtcbiAgICB9XG4gICAgdmFyIHRhcmdldExpbmUgPSBzdGFja0xpbmVzW2xldmVsXTtcbiAgICB2YXIgbGluZUluZm8gPSBudWxsO1xuICAgIGlmICh0YXJnZXRMaW5lKSB7XG4gICAgICAgIHZhciBleGVjUmVzdWx0ID0gL15cXHMqKGF0fC4qQClcXHMqKC4rKT8kLy5leGVjKHRhcmdldExpbmUpO1xuICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShleGVjUmVzdWx0KSAmJiBleGVjUmVzdWx0WzJdKSB7XG4gICAgICAgICAgICBsaW5lSW5mbyA9IGV4ZWNSZXN1bHRbMl07XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBsaW5lSW5mbyA9IHRhcmdldExpbmU7XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIGxpbmVJbmZvO1xufVxuXG5mdW5jdGlvbiBfaW5kZW50KHMsIGluZGVudCkge1xuICAgIGlmICghaW5kZW50KSB7XG4gICAgICAgIGluZGVudCA9ICcgICAgJztcbiAgICB9XG4gICAgdmFyIGxpbmVzID0gcy5zcGxpdCgvXFxyP1xcbi9nKTtcbiAgICByZXR1cm4gaW5kZW50ICsgbGluZXMuam9pbignXFxuJyArIGluZGVudCk7XG59XG5cbnZhciBfd2FybmVkID0ge307XG5mdW5jdGlvbiBfd2Fybihtc2csIGRlZHVwS2V5KSB7XG4gICAgaWYgKGRlZHVwS2V5KSB7XG4gICAgICAgIGlmIChfd2FybmVkW2RlZHVwS2V5XSkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIF93YXJuZWRbZGVkdXBLZXldID0gdHJ1ZTtcbiAgICB9XG4gICAgY29uc29sZS5lcnJvcihtc2cgKyAnXFxuJyk7XG59XG5cbmZ1bmN0aW9uIF9oYXZlV2FybmVkKGRlZHVwS2V5KSB7XG4gICAgcmV0dXJuIF93YXJuZWRbZGVkdXBLZXldO1xufVxuXG5mdW5jdGlvbiBzYWZlQ3ljbGVzKCkge1xuICAgIHZhciBzZWVuID0gW107XG4gICAgcmV0dXJuIGZ1bmN0aW9uIChrZXksIHZhbCkge1xuICAgICAgICBpZiAoIXZhbCB8fCB0eXBlb2YgdmFsICE9PSAnb2JqZWN0Jykge1xuICAgICAgICAgICAgcmV0dXJuIHZhbDtcbiAgICAgICAgfVxuICAgICAgICBpZiAoc2Vlbi5pbmRleE9mKHZhbCkgIT09IC0xKSB7XG4gICAgICAgICAgICByZXR1cm4gJ1tD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yA9IHt9KTtcbiAgICAgICAgdmFyIHBhcmVudEZpZWxkTmFtZXMgPSBPYmplY3Qua2V5cyhwYXJlbnQuZmllbGRzKTtcbiAgICAgICAgZm9yIChpID0gMDsgaSA8IHBhcmVudEZpZWxkTmFtZXMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIG5hbWUgPSBwYXJlbnRGaWVsZE5hbWVzW2ldO1xuICAgICAgICAgICAgZmllbGRzW25hbWVdID0gcGFyZW50LmZpZWxkc1tuYW1lXTtcbiAgICAgICAgfVxuICAgICAgICB2YXIgbmFtZXMgPSBPYmplY3Qua2V5cyhvcHRpb25zKTtcbiAgICAgICAgZm9yIChpID0gMDsgaSA8IG5hbWVzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICBuYW1lID0gbmFtZXNbaV07XG4gICAgICAgICAgICBmaWVsZHNbbmFtZV0gPSBvcHRpb25zW25hbWVdO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybjtcbiAgICB9XG4gICAgaWYgKHBhcmVudCkge1xuICAgICAgICB0aGlzLl9sZXZlbCA9IHBhcmVudC5fbGV2ZWw7XG4gICAgICAgIHRoaXMuc3RyZWFtcyA9IFtdO1xuICAgICAgICBmb3IgKGkgPSAwOyBpIDwgcGFyZW50LnN0cmVhbXMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIHZhciBzID0gb2JqQ29weShwYXJlbnQuc3RyZWFtc1tpXSk7XG4gICAgICAgICAgICB0aGlzJDEuc3RyZWFtcy5wdXNoKHMpO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMuc2VyaWFsaXplcnMgPSBvYmpDb3B5KHBhcmVudC5zZXJpYWxpemVycyk7XG4gICAgICAgIHRoaXMuc3JjID0gcGFyZW50LnNyYztcbiAgICAgICAgdGhpcy5maWVsZHMgPSBvYmpDb3B5KHBhcmVudC5maWVsZHMpO1xuICAgICAgICBpZiAob3B0aW9ucy5sZXZlbCkge1xuICAgICAgICAgICAgdGhpcy5sZXZlbChvcHRpb25zLmxldmVsKTtcbiAgICAgICAgfVxuICAgIH0gZWxzZSB7XG4gICAgICAgIHRoaXMuX2xldmVsID0gTnVtYmVyLlBPU0lUSVZFX0lORklOSVRZO1xuICAgICAgICB0aGlzLnN0cmVhbXMgPSBbXTtcbiAgICAgICAgdGhpcy5zZXJpYWxpemVycyA9IG51bGw7XG4gICAgICAgIHRoaXMuc3JjID0gZmFsc2U7XG4gICAgICAgIHRoaXMuZmllbGRzID0ge307XG4gICAgfVxuICAgIGlmIChvcHRpb25zLnN0cmVhbSkge1xuICAgICAgICB0aGlzLmFkZFN0cmVhbSh7XG4gICAgICAgICAgICB0eXBlOiAnc3RyZWFtJyxcbiAgICAgICAgICAgIHN0cmVhbTogb3B0aW9ucy5zdHJlYW0sXG4gICAgICAgICAgICBsZXZlbDogb3B0aW9ucy5sZXZlbFxuICAgICAgICB9KTtcbiAgICB9IGVsc2UgaWYgKG9wdGlvbnMuc3RyZWFtcykge1xuICAgICAgICBvcHRpb25zLnN0cmVhbXMuZm9yRWFjaChmdW5jdGlvbiAocykge1xuICAgICAgICAgICAgdGhpcyQxLmFkZFN0cmVhbShzLCBvcHRpb25zLmxldmVsKTtcbiAgICAgICAgfSk7XG4gICAgfSBlbHNlIGlmIChwYXJlbnQgJiYgb3B0aW9ucy5sZXZlbCkge1xuICAgICAgICB0aGlzLmxldmVsKG9wdGlvbnMubGV2ZWwpO1xuICAgIH0gZWxzZSBpZiAoIXBhcmVudCkge1xuICAgICAgICB0aGlzLmFkZFN0cmVhbSh7XG4gICAgICAgICAgICB0eXBlOiAncmF3JyxcbiAgICAgICAgICAgIHN0cmVhbTogbmV3IENvbnNvbGVSYXdTdHJlYW0oKSxcbiAgICAgICAgICAgIGxldmVsOiBvcHRpb25zLmxldmVsXG4gICAgICAgIH0pO1xuICAgIH1cbiAgICBpZiAob3B0aW9ucy5zZXJpYWxpemVycykge1xuICAgICAgICB0aGlzLmFkZFNlcmlhbGl6ZXJzKG9wdGlvbnM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HVkZUZpZWxkcztcbiAgICAgICAgICAgIGlmIChhcmdzWzBdIGluc3RhbmNlb2YgRXJyb3IpIHtcbiAgICAgICAgICAgICAgICBmaWVsZHMgPSB7XG4gICAgICAgICAgICAgICAgICAgIGVycjogbG9nLnNlcmlhbGl6ZXJzICYmIGxvZy5zZXJpYWxpemVycy5lcnIgPyBsb2cuc2VyaWFsaXplcnMuZXJyKGFyZ3NbMF0pIDogc3RkU2VyaWFsaXplcnMuZXJyKGFyZ3NbMF0pXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICBleGNsdWRlRmllbGRzID0ge1xuICAgICAgICAgICAgICAgICAgICBlcnI6IHRydWVcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIGlmIChhcmdzLmxlbmd0aCA9PT0gMSkge1xuICAgICAgICAgICAgICAgICAgICBtc2dBcmdzID0gW2ZpZWxkcy5lcnIubWVzc2FnZV07XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgbXNnQXJncyA9IEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKGFyZ3MsIDEpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIGFyZ3NbMF0gIT09ICdvYmplY3QnICYmIGFyZ3NbMF0gIT09IG51bGwgfHwgQXJyYXkuaXNBcnJheShhcmdzWzBdKSkge1xuICAgICAgICAgICAgICAgIGZpZWxkcyA9IG51bGw7XG4gICAgICAgICAgICAgICAgbXNnQXJncyA9IEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKGFyZ3MpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBmaWVsZHMgPSBhcmdzWzBdO1xuICAgICAgICAgICAgICAgIGlmIChhcmdzLmxlbmd0aCA9PT0gMSAmJiBmaWVsZHMuZXJyICYmIGZpZWxkcy5lcnIgaW5zdGFuY2VvZiBFcnJvcikge1xuICAgICAgICAgICAgICAgICAgICBtc2dBcmdzID0gW2ZpZWxkcy5lcnIubWVzc2FnZV07XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgbXNnQXJncyA9IEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKGFyZ3MsIDEpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciByZWMgPSBvYmpDb3B5KGxvZy5maWVsZHMpO1xuICAgICAgICAgICAgcmVjLmxldmVsID0gbWluTGV2ZWw7XG4gICAgICAgICAgICB2YXIgcmVjRmllbGRzID0gZmllbGRzID8gb2JqQ29weShmaWVsZHMpIDogbnVsbDtcbiAgICAgICAgICAgIGlmIChyZWNGaWVsZHMpIHtcbiAgICAgICAgICAgICAgICBpZiAobG9nLnNlcmlhbGl6ZXJzKSB7XG4gICAgICAgICAgICAgICAgICAgIGxvZy5fYXBwbHlTZXJpYWxpemVycyhyZWNGaWVsZHMsIGV4Y2x1ZGVGaWVsZHMpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBPYmplY3Qua2V5cyhyZWNGaWVsZHMpLmZvckVhY2goZnVuY3Rpb24gKGspIHtcbiAgICAgICAgICAgICAgICAgICAgcmVjW2tdID0gcmVjRmllbGRzW2tdO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVjLmxldmVsTmFtZSA9IG5hbWVGcm9tTGV2ZWxbbWluTGV2ZWxdO1xuICAgICAgICAgICAgcmVjLm1zZyA9IG1zZ0FyZ3MubGVuZ3RoID8gZm9ybWF0LmFwcGx5KGxvZywgbXNnQXJncykgOiAnJztcbiAgICAgICAgICAgIGlmICghcmVjLnRpbWUpIHtcbiAgICAgICAgICAgICAgICByZWMudGltZSA9IG5ldyBEYXRlKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAobG9nLnNyYyAmJiAhcmVjLnNyYykge1xuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihDQUxMX1NUQUNLX0VSUk9SKTtcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHNyYyA9IGV4dHJhY3RTcmNGcm9tU3RhY2t0cmFjZShlcnIuc3RhY2ssIDIpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIXNyYyAmJiAhX2hhdmVXYXJuZWQoJ3NyYycpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBfd2FybignVW5hYmxlIHRvIGRldGVybWluZSBzcmMgbGluZSBpbmZvJywgJ3NyYycpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJlYy5zcmMgPSBzcmMgfHwgJyc7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVjLnYgPSBMT0dfVkVSU0lPTjtcbiAgICAgICAgICAgIHJldHVybiByZWM7XG4gICAgICAgIH1cbiAgICAgICAgXG4gICAgICAgIHZhciBmaWVsZHMgPSBudWxsO1xuICAgICAgICB2YXIgbXNnQXJncyA9IGFyZ3VtZW50cztcbiAgICAgICAgdmFyIHJlYyA9IG51bGw7XG4gICAgICAgIGlmIChhcmd1bWVudHMubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5fbGV2ZWwgPD0gbWluTGV2ZWw7XG4gICAgICAgIH0gZWxzZSBpZiAodGhpcy5fbGV2ZWwgPiBtaW5MZXZlbCkge30gZWxzZSB7XG4gICAgICAgICAgICByZWMgPSBta1JlY29yZChtc2dBcmdzKTtcbiAgICAgICAgICAgIHRoaXMuX2VtaXQocmVjKTtcbiAgICAgICAgfVxuICAgIH07XG59XG5cbkxvZ2dlci5wcm90b3R5cGUudHJhY2UgPSBta0xvZ0VtaXR0ZXIoVFJBQ0UpO1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G4gICAgICAgICAgLy8gR2VuU3RhdGVFeGVjdXRpbmcgYW5kIGxvb3AgYmFjayBmb3IgYW5vdGhlciBpbnZvY2F0aW9uLlxuICAgICAgICAgIHN0YXRlID0gY29udGV4dC5kb25lXG4gICAgICAgICAgICA/IEdlblN0YXRlQ29tcGxldGVkXG4gICAgICAgICAgICA6IEdlblN0YXRlU3VzcGVuZGVkWWllbGQ7XG5cbiAgICAgICAgICBpZiAocmVjb3JkLmFyZyA9PT0gQ29udGludWVTZW50aW5lbCkge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHZhbHVlOiByZWNvcmQuYXJnLFxuICAgICAgICAgICAgZG9uZTogY29udGV4dC5kb25lXG4gICAgICAgICAgfTtcblxuICAgICAgICB9IGVsc2UgaWYgKHJlY29yZC50eXBlID09PSBcInRocm93XCIpIHtcbiAgICAgICAgICBzdGF0ZSA9IEdlblN0YXRlQ29tcGxldGVkO1xuICAgICAgICAgIC8vIERpc3BhdGNoIHRoZSBleGNlcHRpb24gYnkgbG9vcGluZyBiYWNrIGFyb3VuZCB0byB0aGVcbiAgICAgICAgICAvLyBjb250ZXh0LmRpc3BhdGNoRXhjZXB0aW9uKGNvbnRleHQuYXJnKSBjYWxsIGFib3ZlLlxuICAgICAgICAgIGNvbnRleHQubWV0aG9kID0gXCJ0aHJvd1wiO1xuICAgICAgICAgIGNvbnRleHQuYXJnID0gcmVjb3JkLmFyZztcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH07XG4gIH1cblxuICAvLyBDYWxsIGRlbGVnYXRlLml0ZXJhdG9yW2NvbnRleHQubWV0aG9kXShjb250ZXh0LmFyZykgYW5kIGhhbmRsZSB0aGVcbiAgLy8gcmVzdWx0LCBlaXRoZXIgYnkgcmV0dXJuaW5nIGEgeyB2YWx1ZSwgZG9uZSB9IHJlc3VsdCBmcm9tIHRoZVxuICAvLyBkZWxlZ2F0ZSBp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xuICAgICAgICAgICAgaGFzT3duLmNhbGwoZW50cnksIFwiZmluYWxseUxvY1wiKSAmJlxuICAgICAgICAgICAgdGhpcy5wcmV2IDwgZW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAgIHZhciBmaW5hbGx5RW50cnkgPSBlbnRyeTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBpZiAoZmluYWxseUVudHJ5ICYmXG4gICAgICAgICAgKHR5cGUgPT09IFwiYnJlYWtcIiB8fFxuICAgICAgICAgICB0eXBlID09PSBcImNvbnRpbnVlXCIpICYmXG4gICAgICAgICAgZmluYWxseUVudHJ5LnRyeUxvYyA8PSBhcmcgJiZcbiAgICAgICAgICBhcmcgPD0gZmluYWxseUVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgLy8gSWdub3JlIHRoZSBmaW5hbGx5IGVudHJ5IGlmIGNvbnRyb2wgaXMgbm90IGp1bXBpbmcgdG8gYVxuICAgICAgICAvLyBsb2NhdGlvbiBvdXRzaWRlIHRoZSB0cnkvY2F0Y2ggYmxvY2suXG4gICAgICAgIGZpbmFsbHlFbnRyeSA9IG51bGw7XG4gICAgICB9XG5cbiAgICAgIHZhciByZWNvcmQgPSBmaW5hbGx5RW50cnkgPyBmaW5hbGx5RW50cnkuY29tcGxldGlvbiA6IHt9O1xuICAgICAgcmVjb3JkLnR5cGUgPSB0eXBlO1xuICAgICAgcmVjb3JkLmFyZyA9IGFyZztcblxuICAgICAgaWYgKGZpbmFsbHlFbnRyeSkge1xuICAgICAgICB0aGlzLm1ldGhvZCA9IFwibmV4dFwiO1xuICAgICAgICB0aGlzLm5leHQgPSBmaW5hbGx5RW50cnkuZmluYWxseUxvYztcbiAgICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiB0aGlzLmNvbXBsZXRlKHJlY29yZCk7XG4gICAgfSxcblxuICAgIGNvbXBsZXRlOiBmdW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ZXh0LnNldExvZ0xldmVsKCdkZWJ1ZycpO1xuICogXG4gKiAgICAgICAgIC8vIEV4dGVuZCB0aGUgUmVkNVBybyBzZGsuXG4gKiAgICAgICAgIHNtX2V4dC5kZWNvcmF0ZSgpO1xuICogXG4gKiAgICAgICAgIHZhciBydGNQdWJsaXNoZXIgPSBuZXcgcmVkNXByb3Nkay5SVENQdWJsaXNoZXIoKTtcbiAqICAgICAgICAgdmFyIHJ0Y1N1YnNjcmliZXIgPSBuZXcgcmVkNXByb3Nkay5SVENTdWJzY3JpYmVyKCk7XG4gKiBcbiAqICAgICAgICAgdmFyIGF1dG9zY2FsZUNvbmZpZyA9IHtcbiAqICAgICAgICAgICBwcm90b2NvbDogJ2h0dHBzJyxcbiAqICAgICAgICAgICBob3N0OiAnc3RyZWFtbWFuYWdlci5jb21wYW55Lm9yZycsXG4gKiAgICAgICAgICAgc3RyZWFtTmFtZTogJ215c3RyZWFtJyxcbiAqICAgICAgICAgICBzY29wZTogJ2xpdmUnLFxuICogICAgICAgICAgIGFwaVZlcnNpb246ICczLjAnLFxuICogICAgICAgICAgIHVzZVByb3h5OiB0cnVlXG4gKiAgICAgICAgIH07XG4gKiBcbiAqICAgICAgICAgdmFyIGluaXRDb25maWcgPSB7XG4gKiAgICAgICAgICAgcHJvdG9jb2w6ICd3c3MnLFxuICogICAgICAgICAgIGhvc3Q6ICdzdHJlYW1tYW5hZ2VyLmNvbXBhbnkub3JnJyxcbiAqICAgICAgICAgICBwb3J0OiA4MDgzOixcbiAqICAgICAgICAgICBhcHA6ICdsaXZlJyxcbiAqICAgICAgICAgICBzdHJlYW1OYW1lOiAnbXlzdHJlYW0nLFxuICogICAgICAgICAgIGljZVNlcnZlcnM6IFt7dXJsczogJ3N0dW46c3R1bjIubC5nb29nbGUuY29tOjE5MzAyJ31dXG4gKiAgICAgICAgIH07XG4gKiBcbiAqICAgICAgICAgdmFyIHB1Ymxpc2hBdXRvc2NhbGVDb25maWcgPSBPYmplY3QuYXNzaWduKHt9LCBhdXRvc2NhbGVDb25maWcsIHtcbiAqICAgICAgICAgICBhY3Rpb246ICdicm9hZGNhc3QnXG4gKiAgICAgICAgIH0pO1xuICogICAgICAgICB2YXIgc3Vic2NyaWJlQXV0b3NjYWxlQ29uZmlnID0gT2JqZWN0LmFzc2lnbih7fSwgYXV0b3NjYWxlQ29uZmlnLCB7XG4gKiAgICAgICAgICAgYWN0aW9uOiAnc3Vic2NyaWJlJ1xuICogICAgICAgICB9KTtcbiAqIFxuICogICAgICAgICBmdW5jdGlvbiBzdWJzY3JpYmUgKCkge1xuICogICAgICAgICAgIHJ0Y1N1YnNjcmliZXJcbiAqICAgICAgICAgICAgIC5hdXRvc2NhbGUoc3Vic2NyaWJlQXV0b3NjYWxlQ29uZmlnLCBpbml0Q29uZmlnKVxuICogICAgICAgICAgICAgLnRoZW4oZnVuY3Rpb24gKCkge1xuICogICAgICAgICAgICAgICByZXR1cm4gcnRjU3Vic2NyaWJlci5zdWJzY3JpYmUoKTtcbiAqICAgICAgICAgICAgIH0pXG4gKiAgICAgICAgICAgICAuY2F0Y2goZnVuY3Rpb24gKGVycm9yKSB7XG4gKiAgICAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoJ0NvdWxkIG5vdCBwbGF5OiAnICsgZXJyb3IpO1xuICogICAgICAgICAgICAgfSk7XG4gKiAgICAgICAgIH1cbiAqIFxuICogICAgICAgICAvLyBGaXJzdCBjb25uZWN0IEF1dG9zY2FsZS1kIFB1Ymxpc2hlci5cbiAqICAgICAgICAgcnRjUHVibGlzaGVyXG4gKiAgICAgICAgICAgLmF1dG9zY2FsZShwdWJsaXNoQXV0b3NjYWxlQ29uZmlnLCBpbml0Q29uZmlnKVxuICogICAgICAgICAgIC50aGVuKGZ1bmN0aW9uICgpIHtcbiAqICAgICAgICAgICAgIC8vIE9uY2UgcHVibGlzaGluZywgd2Ugd2lsbCBzdGFydCB0aGUgQXV0b3NjYWxlLWQgU3Vic2NyaWJlci5cbiAqICAgICAgICAg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WJ1ZyA9IGRlY29yYXRlKExFVkVMUy5ERUJVRylcbmV4cG9ydCBjb25zdCB3YXJuID0gZGVjb3JhdGUoTEVWRUxTLldBUk4pXG5leHBvcnQgY29uc3QgZXJyb3IgPSBkZWNvcmF0ZShMRVZFTFMuRVJST1IpXG5leHBvcnQgY29uc3QgZmF0YWwgPSBkZWNvcmF0ZShMRVZFTFMuRkFUQUwpXG4iXSwic291cmNlUm9vdCI6IiJ9 \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 4aa75e0..cac0320 100644 --- a/package-lock.json +++ b/package-lock.json @@ -387,6 +387,12 @@ "long": "3.2.0" } }, + "abab": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/abab/-/abab-1.0.4.tgz", + "integrity": "sha1-X6rZwsB/YN12dw9xzwJbYqY8/U4=", + "dev": true + }, "acorn": { "version": "5.6.2", "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.6.2.tgz", @@ -402,6 +408,15 @@ "acorn": "5.6.2" } }, + "acorn-globals": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-4.1.0.tgz", + "integrity": "sha512-KjZwU26uG3u6eZcfGbTULzFcsoz6pegNKtHPksZPOUsiKo5bUmiBPa38FuHZ/Eun+XYh/JCCkS9AS3Lu4McQOQ==", + "dev": true, + "requires": { + "acorn": "5.6.2" + } + }, "acorn-jsx": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz", @@ -437,6 +452,34 @@ "integrity": "sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo=", "dev": true }, + "align-text": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "dev": true, + "requires": { + "kind-of": "3.2.2", + "longest": "1.0.1", + "repeat-string": "1.6.1" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "dev": true + }, "ansi-escapes": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", @@ -480,6 +523,15 @@ "normalize-path": "2.1.1" } }, + "append-transform": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-1.0.0.tgz", + "integrity": "sha512-P009oYkeHyU742iSZJzZZywj4QRJdnTWffaKuJQLablCZ1uz6/cW4yaRgcDaoQ+uwOxxnt0gRUcwfsNP2ri0gw==", + "dev": true, + "requires": { + "default-require-extensions": "2.0.0" + } + }, "aproba": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", @@ -531,6 +583,12 @@ "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=", "dev": true }, + "array-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz", + "integrity": "sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=", + "dev": true + }, "array-slice": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", @@ -564,6 +622,12 @@ "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", "dev": true }, + "asn1": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", + "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=", + "dev": true + }, "asn1.js": { "version": "4.10.1", "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", @@ -601,24 +665,69 @@ } } }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + }, "assign-symbols": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", "dev": true }, + "astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "dev": true + }, + "async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", + "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", + "dev": true, + "requires": { + "lodash": "4.17.10" + } + }, "async-each": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", "dev": true }, + "async-limiter": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz", + "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==", + "dev": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, "atob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.1.tgz", "integrity": "sha1-ri1acpR38onWDdf5amMUoi3Wwio=", "dev": true }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true + }, + "aws4": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.7.0.tgz", + "integrity": "sha512-32NDda82rhwD9/JBCCkB+MRYDp0oSvlo2IL6rQWA10PQi7tDUM3eqMSltXmY+Oyl/7N3P3qNtAlv7X0d9bI28w==", + "dev": true + }, "babel-code-frame": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", @@ -843,6 +952,16 @@ "babel-template": "6.26.0" } }, + "babel-jest": { + "version": "23.0.1", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-23.0.1.tgz", + "integrity": "sha1-u6079SP7IC2gXtCmVAtIyE7tE6Y=", + "dev": true, + "requires": { + "babel-plugin-istanbul": "4.1.6", + "babel-preset-jest": "23.0.1" + } + }, "babel-loader": { "version": "7.1.4", "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-7.1.4.tgz", @@ -872,6 +991,24 @@ "babel-runtime": "6.26.0" } }, + "babel-plugin-istanbul": { + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.6.tgz", + "integrity": "sha512-PWP9FQ1AhZhS01T/4qLSKoHGY/xvkZdVBGlKM/HuxxS3+sC66HhTNR7+MpbO/so/cz/wY94MeSWJuP1hXIPfwQ==", + "dev": true, + "requires": { + "babel-plugin-syntax-object-rest-spread": "6.13.0", + "find-up": "2.1.0", + "istanbul-lib-instrument": "1.10.1", + "test-exclude": "4.2.1" + } + }, + "babel-plugin-jest-hoist": { + "version": "23.0.1", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-23.0.1.tgz", + "integrity": "sha1-6qEclkVjrqnCG+zvK994U/fzwUg=", + "dev": true + }, "babel-plugin-syntax-async-functions": { "version": "6.13.0", "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz", @@ -1298,6 +1435,16 @@ "babel-plugin-transform-async-to-generator": "6.24.1" } }, + "babel-preset-jest": { + "version": "23.0.1", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-23.0.1.tgz", + "integrity": "sha1-YxzFRcbPAhlDATvK8i9F2H/mIZg=", + "dev": true, + "requires": { + "babel-plugin-jest-hoist": "23.0.1", + "babel-plugin-syntax-object-rest-spread": "6.13.0" + } + }, "babel-register": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", @@ -1449,6 +1596,16 @@ "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", "dev": true }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", + "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", + "dev": true, + "optional": true, + "requires": { + "tweetnacl": "0.14.5" + } + }, "beeper": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz", @@ -1540,6 +1697,29 @@ "@browser-bunyan/levels": "1.3.0" } }, + "browser-process-hrtime": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-0.1.2.tgz", + "integrity": "sha1-Ql1opY00R/AqBKqJQYf86K+Le44=", + "dev": true + }, + "browser-resolve": { + "version": "1.11.2", + "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.2.tgz", + "integrity": "sha1-j/CbCixCFxihBRwmCzLkj0QpOM4=", + "dev": true, + "requires": { + "resolve": "1.1.7" + }, + "dependencies": { + "resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", + "dev": true + } + } + }, "browserify-aes": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", @@ -1620,6 +1800,15 @@ "electron-to-chromium": "1.3.48" } }, + "bser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.0.0.tgz", + "integrity": "sha1-mseNPtXZFYBP2HrLFYvHlxR6Fxk=", + "dev": true, + "requires": { + "node-int64": "0.4.0" + } + }, "buffer": { "version": "4.9.1", "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", @@ -1643,6 +1832,12 @@ "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", "dev": true }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true + }, "builtin-status-codes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", @@ -1714,6 +1909,21 @@ "integrity": "sha512-iHK48UR/InydhpPAzgSmsJXRAR925T0kwJhZ1wk0xRatpGMvi2f06LABg6HXfV4WW4P2wChzlcFa/TEmbTyXQA==", "dev": true }, + "capture-exit": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/capture-exit/-/capture-exit-1.2.0.tgz", + "integrity": "sha1-HF/MSJ/QqwDU8ax64QcuMXP7q28=", + "dev": true, + "requires": { + "rsvp": "3.6.2" + } + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true + }, "catharsis": { "version": "0.8.9", "resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.8.9.tgz", @@ -1723,6 +1933,17 @@ "underscore-contrib": "0.3.0" } }, + "center-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "dev": true, + "optional": true, + "requires": { + "align-text": "0.1.4", + "lazy-cache": "1.0.4" + } + }, "chalk": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", @@ -1788,6 +2009,12 @@ "integrity": "sha512-sjndyZHrrWiu4RY7AkHgjn80GfAM2ZSzUkZLV/Js59Ldmh6JDThf0SUmOHU53rFu2rVxxfCzJ30Ukcfch3Gb/A==", "dev": true }, + "ci-info": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.1.3.tgz", + "integrity": "sha512-SK/846h/Rcy8q9Z9CAwGBLfCJ6EkjJWdpelWDufQpqVDYq2Wnnv8zlSO6AMQap02jvhVruKKpEtQOufo3pFhLg==", + "dev": true + }, "cipher-base": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", @@ -1931,6 +2158,15 @@ "integrity": "sha512-EDpX3a7wHMWFA7PUHWPHNWqOxIIRSJetuwl0AS5Oi/5FMV8kWm69RTlgm00GKjBO1xFHMtBbL49yRtMMdticBw==", "dev": true }, + "combined-stream": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", + "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", + "dev": true, + "requires": { + "delayed-stream": "1.0.0" + } + }, "commander": { "version": "2.13.0", "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz", @@ -1943,6 +2179,12 @@ "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", "dev": true }, + "compare-versions": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.3.0.tgz", + "integrity": "sha512-MAAAIOdi2s4Gl6rZ76PNcUa9IOYB+5ICdT41o5uMRf09aEu/F9RK+qhe8RjXNPwcTjGV7KU7h2P/fljThFVqyQ==", + "dev": true + }, "component-emitter": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", @@ -2105,12 +2347,47 @@ "integrity": "sha1-lGfQMsOM+u+58teVASUwYvh/ob0=", "dev": true }, + "cssom": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.2.tgz", + "integrity": "sha1-uANhcMefB6kP8vFuIihAJ6JDhIs=", + "dev": true + }, + "cssstyle": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-0.3.1.tgz", + "integrity": "sha512-tNvaxM5blOnxanyxI6panOsnfiyLRj3HV4qjqqS45WPNS1usdYWRUQjqTEEELK73lpeP/1KoIGYUwrBn/VcECA==", + "dev": true, + "requires": { + "cssom": "0.3.2" + } + }, "cyclist": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz", "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=", "dev": true }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "requires": { + "assert-plus": "1.0.0" + } + }, + "data-urls": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-1.0.0.tgz", + "integrity": "sha512-ai40PPQR0Fn1lD2PPie79CibnlMN2AYiDhwFX/rZHVsxbs5kNJSjegqXIprhouGXlRdEnfybva7kqRGnB6mypA==", + "dev": true, + "requires": { + "abab": "1.0.4", + "whatwg-mimetype": "2.1.0", + "whatwg-url": "6.5.0" + } + }, "date-now": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", @@ -2150,6 +2427,23 @@ "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", "dev": true }, + "default-require-extensions": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-2.0.0.tgz", + "integrity": "sha1-9fj7sYp9bVCyH2QfZJ67Uiz+JPc=", + "dev": true, + "requires": { + "strip-bom": "3.0.0" + }, + "dependencies": { + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + } + } + }, "defaults": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", @@ -2159,6 +2453,16 @@ "clone": "1.0.4" } }, + "define-properties": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", + "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", + "dev": true, + "requires": { + "foreach": "2.0.5", + "object-keys": "1.0.11" + } + }, "define-property": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", @@ -2223,6 +2527,12 @@ } } }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, "deprecated": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/deprecated/-/deprecated-0.0.1.tgz", @@ -2254,6 +2564,18 @@ "repeating": "2.0.1" } }, + "detect-newline": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-2.1.0.tgz", + "integrity": "sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I=", + "dev": true + }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + }, "diffie-hellman": { "version": "5.0.3", "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", @@ -2304,6 +2626,15 @@ "integrity": "sha1-sXrtguirWeUt2cGbF1bg/BhyBMI=", "dev": true }, + "domexception": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/domexception/-/domexception-1.0.1.tgz", + "integrity": "sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug==", + "dev": true, + "requires": { + "webidl-conversions": "4.0.2" + } + }, "domhandler": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", @@ -2370,6 +2701,16 @@ "stream-shift": "1.0.0" } }, + "ecc-jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", + "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", + "dev": true, + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, "electron-to-chromium": { "version": "1.3.48", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.48.tgz", @@ -2432,12 +2773,73 @@ "prr": "1.0.1" } }, + "error-ex": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", + "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", + "dev": true, + "requires": { + "is-arrayish": "0.2.1" + } + }, + "es-abstract": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz", + "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==", + "dev": true, + "requires": { + "es-to-primitive": "1.1.1", + "function-bind": "1.1.1", + "has": "1.0.3", + "is-callable": "1.1.3", + "is-regex": "1.0.4" + } + }, + "es-to-primitive": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz", + "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", + "dev": true, + "requires": { + "is-callable": "1.1.3", + "is-date-object": "1.0.1", + "is-symbol": "1.0.1" + } + }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "dev": true }, + "escodegen": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.10.0.tgz", + "integrity": "sha512-fjUOf8johsv23WuIKdNQU4P9t9jhQ4Qzx6pC2uW890OloK3Zs1ZAoCNpg/2larNF501jLl3UNy0kIRcF6VI22g==", + "dev": true, + "requires": { + "esprima": "3.1.3", + "estraverse": "4.2.0", + "esutils": "2.0.2", + "optionator": "0.8.2", + "source-map": "0.6.1" + }, + "dependencies": { + "esprima": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", + "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "optional": true + } + } + }, "eslint": { "version": "4.19.1", "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.19.1.tgz", @@ -2632,6 +3034,15 @@ "safe-buffer": "5.1.2" } }, + "exec-sh": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.2.1.tgz", + "integrity": "sha512-aLt95pexaugVtQerpmE51+4QfWrNc304uez7jvj6fWnN8GeEHpttB8F36n8N7uVhUMbH/1enbxQ9HImZ4w/9qg==", + "dev": true, + "requires": { + "merge": "1.2.0" + } + }, "execa": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", @@ -2647,6 +3058,12 @@ "strip-eof": "1.0.0" } }, + "exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", + "dev": true + }, "expand-brackets": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", @@ -2691,6 +3108,57 @@ } } }, + "expand-range": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", + "dev": true, + "requires": { + "fill-range": "2.2.4" + }, + "dependencies": { + "fill-range": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", + "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", + "dev": true, + "requires": { + "is-number": "2.1.0", + "isobject": "2.1.0", + "randomatic": "3.0.0", + "repeat-element": "1.1.2", + "repeat-string": "1.6.1" + } + }, + "is-number": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + } + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, "expand-tilde": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", @@ -2700,15 +3168,40 @@ "homedir-polyfill": "1.0.1" } }, - "extend": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=", - "dev": true - }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "expect": { + "version": "23.1.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-23.1.0.tgz", + "integrity": "sha1-v9/VeiogFw2HWZnul4fMcfAcIF8=", + "dev": true, + "requires": { + "ansi-styles": "3.2.1", + "jest-diff": "23.0.1", + "jest-get-type": "22.4.3", + "jest-matcher-utils": "23.0.1", + "jest-message-util": "23.1.0", + "jest-regex-util": "23.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "1.9.1" + } + } + } + }, + "extend": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=", + "dev": true + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", "dev": true, "requires": { @@ -2803,6 +3296,12 @@ } } }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true + }, "fancy-log": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.2.tgz", @@ -2832,6 +3331,15 @@ "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", "dev": true }, + "fb-watchman": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.0.tgz", + "integrity": "sha1-VOmr99+i8mzZsWNsWIwa/AXeXVg=", + "dev": true, + "requires": { + "bser": "2.0.0" + } + }, "figures": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", @@ -2851,6 +3359,22 @@ "object-assign": "4.1.1" } }, + "filename-regex": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", + "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", + "dev": true + }, + "fileset": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/fileset/-/fileset-2.0.3.tgz", + "integrity": "sha1-jnVIqW08wjJ+5eZ0FocjozO7oqA=", + "dev": true, + "requires": { + "glob": "7.1.2", + "minimatch": "3.0.4" + } + }, "fill-range": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", @@ -2985,6 +3509,29 @@ "for-in": "1.0.2" } }, + "foreach": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", + "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=", + "dev": true + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true + }, + "form-data": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", + "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", + "dev": true, + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.6", + "mime-types": "2.1.18" + } + }, "fragment-cache": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", @@ -3551,6 +4098,12 @@ } } }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, "functional-red-black-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", @@ -3584,6 +4137,15 @@ "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", "dev": true }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "requires": { + "assert-plus": "1.0.0" + } + }, "glob": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", @@ -3598,6 +4160,42 @@ "path-is-absolute": "1.0.1" } }, + "glob-base": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "dev": true, + "requires": { + "glob-parent": "2.0.0", + "is-glob": "2.0.1" + }, + "dependencies": { + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "dev": true, + "requires": { + "is-glob": "2.0.1" + } + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "1.0.0" + } + } + } + }, "glob-parent": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", @@ -3839,6 +4437,12 @@ "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", "dev": true }, + "growly": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz", + "integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=", + "dev": true + }, "gulp": { "version": "3.9.1", "resolved": "https://registry.npmjs.org/gulp/-/gulp-3.9.1.tgz", @@ -3923,6 +4527,140 @@ "glogg": "1.0.1" } }, + "handlebars": { + "version": "4.0.11", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.11.tgz", + "integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=", + "dev": true, + "requires": { + "async": "1.5.2", + "optimist": "0.6.1", + "source-map": "0.4.4", + "uglify-js": "2.8.29" + }, + "dependencies": { + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + }, + "camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", + "dev": true, + "optional": true + }, + "cliui": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "dev": true, + "optional": true, + "requires": { + "center-align": "0.1.3", + "right-align": "0.1.3", + "wordwrap": "0.0.2" + } + }, + "source-map": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "dev": true, + "requires": { + "amdefine": "1.0.1" + } + }, + "uglify-js": { + "version": "2.8.29", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", + "dev": true, + "optional": true, + "requires": { + "source-map": "0.5.7", + "uglify-to-browserify": "1.0.2", + "yargs": "3.10.0" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true, + "optional": true + } + } + }, + "wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", + "dev": true, + "optional": true + }, + "yargs": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "dev": true, + "optional": true, + "requires": { + "camelcase": "1.2.1", + "cliui": "2.1.0", + "decamelize": "1.2.0", + "window-size": "0.1.0" + } + } + } + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true + }, + "har-validator": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", + "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", + "dev": true, + "requires": { + "ajv": "5.5.2", + "har-schema": "2.0.0" + }, + "dependencies": { + "ajv": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "dev": true, + "requires": { + "co": "4.6.0", + "fast-deep-equal": "1.1.0", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1" + } + }, + "fast-deep-equal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", + "dev": true + } + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "1.1.1" + } + }, "has-ansi": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", @@ -4029,6 +4767,21 @@ "parse-passwd": "1.0.0" } }, + "hosted-git-info": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.0.tgz", + "integrity": "sha512-lIbgIIQA3lz5XaB6vxakj6sDHADJiZadYEJB+FgA+C4nubM1NwcuvUr9EJPmnH1skZqpqUzWborWo8EIUi0Sdw==", + "dev": true + }, + "html-encoding-sniffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz", + "integrity": "sha512-71lZziiDnsuabfdYiUeWdCVyKuqwWi23L8YeIgV9jSSZHCtb6wB1BKWooH7L3tn4/FuZJMVWyNaIDr4RGmaSYw==", + "dev": true, + "requires": { + "whatwg-encoding": "1.0.3" + } + }, "htmlparser2": { "version": "3.9.2", "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.9.2.tgz", @@ -4043,6 +4796,17 @@ "readable-stream": "2.3.6" } }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "jsprim": "1.4.1", + "sshpk": "1.14.2" + } + }, "https-browserify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", @@ -4239,6 +5003,12 @@ } } }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, "is-binary-path": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", @@ -4254,6 +5024,30 @@ "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", "dev": true }, + "is-builtin-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "dev": true, + "requires": { + "builtin-modules": "1.1.1" + } + }, + "is-callable": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.3.tgz", + "integrity": "sha1-hut1OSgF3cM69xySoO7fdO52BLI=", + "dev": true + }, + "is-ci": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.1.0.tgz", + "integrity": "sha512-c7TnwxLePuqIlxHgr7xtxzycJPegNHFuIrBkwbf8hc58//+Op1CqFkyS+xnIMkwn9UsJIwc174BIjkyBmSpjKg==", + "dev": true, + "requires": { + "ci-info": "1.1.3" + } + }, "is-data-descriptor": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", @@ -4274,6 +5068,12 @@ } } }, + "is-date-object": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", + "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", + "dev": true + }, "is-descriptor": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", @@ -4293,6 +5093,21 @@ } } }, + "is-dotfile": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", + "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", + "dev": true + }, + "is-equal-shallow": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", + "dev": true, + "requires": { + "is-primitive": "2.0.0" + } + }, "is-extendable": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", @@ -4320,6 +5135,12 @@ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true }, + "is-generator-fn": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-1.0.0.tgz", + "integrity": "sha1-lp1J4bszKfa7fwkIm+JleLLd1Go=", + "dev": true + }, "is-glob": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", @@ -4399,12 +5220,33 @@ "isobject": "3.0.1" } }, + "is-posix-bracket": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", + "dev": true + }, + "is-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", + "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", + "dev": true + }, "is-promise": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", "dev": true }, + "is-regex": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", + "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "dev": true, + "requires": { + "has": "1.0.3" + } + }, "is-relative": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", @@ -4426,6 +5268,18 @@ "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", "dev": true }, + "is-symbol": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.1.tgz", + "integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI=", + "dev": true + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, "is-unc-path": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", @@ -4465,42 +5319,1317 @@ "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", "dev": true }, - "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", "dev": true }, - "js-yaml": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", - "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", + "istanbul-api": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-1.3.1.tgz", + "integrity": "sha512-duj6AlLcsWNwUpfyfHt0nWIeRiZpuShnP40YTxOGQgtaN8fd6JYSxsvxUphTDy8V5MfDXo4s/xVCIIvVCO808g==", + "dev": true, + "requires": { + "async": "2.6.1", + "compare-versions": "3.3.0", + "fileset": "2.0.3", + "istanbul-lib-coverage": "1.2.0", + "istanbul-lib-hook": "1.2.1", + "istanbul-lib-instrument": "1.10.1", + "istanbul-lib-report": "1.1.4", + "istanbul-lib-source-maps": "1.2.5", + "istanbul-reports": "1.3.0", + "js-yaml": "3.12.0", + "mkdirp": "0.5.1", + "once": "1.4.0" + } + }, + "istanbul-lib-coverage": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.0.tgz", + "integrity": "sha512-GvgM/uXRwm+gLlvkWHTjDAvwynZkL9ns15calTrmhGgowlwJBbWMYzWbKqE2DT6JDP1AFXKa+Zi0EkqNCUqY0A==", + "dev": true + }, + "istanbul-lib-hook": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-1.2.1.tgz", + "integrity": "sha512-eLAMkPG9FU0v5L02lIkcj/2/Zlz9OuluaXikdr5iStk8FDbSwAixTK9TkYxbF0eNnzAJTwM2fkV2A1tpsIp4Jg==", "dev": true, "requires": { - "argparse": "1.0.10", - "esprima": "4.0.0" + "append-transform": "1.0.0" } }, - "js2xmlparser": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-3.0.0.tgz", - "integrity": "sha1-P7YOqgicVED5MZ9RdgzNB+JJlzM=", + "istanbul-lib-instrument": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.1.tgz", + "integrity": "sha512-1dYuzkOCbuR5GRJqySuZdsmsNKPL3PTuyPevQfoCXJePT9C8y1ga75neU+Tuy9+yS3G/dgx8wgOmp2KLpgdoeQ==", "dev": true, "requires": { - "xmlcreate": "1.0.2" + "babel-generator": "6.26.1", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "istanbul-lib-coverage": "1.2.0", + "semver": "5.5.0" } }, - "jsdoc": { - "version": "3.5.5", - "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.5.5.tgz", - "integrity": "sha512-6PxB65TAU4WO0Wzyr/4/YhlGovXl0EVYfpKbpSroSj0qBxT4/xod/l40Opkm38dRHRdQgdeY836M0uVnJQG7kg==", + "istanbul-lib-report": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-1.1.4.tgz", + "integrity": "sha512-Azqvq5tT0U09nrncK3q82e/Zjkxa4tkFZv7E6VcqP0QCPn6oNljDPfrZEC/umNXds2t7b8sRJfs6Kmpzt8m2kA==", "dev": true, "requires": { - "babylon": "7.0.0-beta.19", - "bluebird": "3.5.1", - "catharsis": "0.8.9", - "escape-string-regexp": "1.0.5", - "js2xmlparser": "3.0.0", + "istanbul-lib-coverage": "1.2.0", + "mkdirp": "0.5.1", + "path-parse": "1.0.5", + "supports-color": "3.2.3" + }, + "dependencies": { + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } + } + }, + "istanbul-lib-source-maps": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.5.tgz", + "integrity": "sha512-8O2T/3VhrQHn0XcJbP1/GN7kXMiRAlPi+fj3uEHrjBD8Oz7Py0prSC25C09NuAZS6bgW1NNKAvCSHZXB0irSGA==", + "dev": true, + "requires": { + "debug": "3.1.0", + "istanbul-lib-coverage": "1.2.0", + "mkdirp": "0.5.1", + "rimraf": "2.6.2", + "source-map": "0.5.7" + } + }, + "istanbul-reports": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-1.3.0.tgz", + "integrity": "sha512-y2Z2IMqE1gefWUaVjrBm0mSKvUkaBy9Vqz8iwr/r40Y9hBbIteH5wqHG/9DLTfJ9xUnUT2j7A3+VVJ6EaYBllA==", + "dev": true, + "requires": { + "handlebars": "4.0.11" + } + }, + "jest-changed-files": { + "version": "23.0.1", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-23.0.1.tgz", + "integrity": "sha1-95Vy0HIIROpd+EwqRI6GLCJU9gw=", + "dev": true, + "requires": { + "throat": "4.1.0" + } + }, + "jest-cli": { + "version": "23.1.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-23.1.0.tgz", + "integrity": "sha1-64vdTODRUlCJLjGtm2m8mdKo9r8=", + "dev": true, + "requires": { + "ansi-escapes": "3.1.0", + "chalk": "2.4.1", + "exit": "0.1.2", + "glob": "7.1.2", + "graceful-fs": "4.1.11", + "import-local": "1.0.0", + "is-ci": "1.1.0", + "istanbul-api": "1.3.1", + "istanbul-lib-coverage": "1.2.0", + "istanbul-lib-instrument": "1.10.1", + "istanbul-lib-source-maps": "1.2.5", + "jest-changed-files": "23.0.1", + "jest-config": "23.1.0", + "jest-environment-jsdom": "23.1.0", + "jest-get-type": "22.4.3", + "jest-haste-map": "23.1.0", + "jest-message-util": "23.1.0", + "jest-regex-util": "23.0.0", + "jest-resolve-dependencies": "23.0.1", + "jest-runner": "23.1.0", + "jest-runtime": "23.1.0", + "jest-snapshot": "23.0.1", + "jest-util": "23.1.0", + "jest-validate": "23.0.1", + "jest-watcher": "23.1.0", + "jest-worker": "23.0.1", + "micromatch": "2.3.11", + "node-notifier": "5.2.1", + "realpath-native": "1.0.0", + "rimraf": "2.6.2", + "slash": "1.0.0", + "string-length": "2.0.0", + "strip-ansi": "4.0.0", + "which": "1.3.1", + "yargs": "11.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "1.9.1" + } + }, + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true, + "requires": { + "arr-flatten": "1.1.0" + } + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true + }, + "braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dev": true, + "requires": { + "expand-range": "1.8.2", + "preserve": "0.2.0", + "repeat-element": "1.1.2" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "dev": true, + "requires": { + "is-posix-bracket": "0.1.1" + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "dev": true, + "requires": { + "is-extglob": "1.0.0" + } + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "1.0.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "dev": true, + "requires": { + "arr-diff": "2.0.0", + "array-unique": "0.2.1", + "braces": "1.8.5", + "expand-brackets": "0.1.5", + "extglob": "0.3.2", + "filename-regex": "2.0.1", + "is-extglob": "1.0.0", + "is-glob": "2.0.1", + "kind-of": "3.2.2", + "normalize-path": "2.1.1", + "object.omit": "2.0.1", + "parse-glob": "3.0.4", + "regex-cache": "0.4.4" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "3.0.0" + } + } + } + }, + "jest-config": { + "version": "23.1.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-23.1.0.tgz", + "integrity": "sha1-cIyg9DHTVu5CT7SJXTMIAGvdgkE=", + "dev": true, + "requires": { + "babel-core": "6.26.3", + "babel-jest": "23.0.1", + "chalk": "2.4.1", + "glob": "7.1.2", + "jest-environment-jsdom": "23.1.0", + "jest-environment-node": "23.1.0", + "jest-get-type": "22.4.3", + "jest-jasmine2": "23.1.0", + "jest-regex-util": "23.0.0", + "jest-resolve": "23.1.0", + "jest-util": "23.1.0", + "jest-validate": "23.0.1", + "pretty-format": "23.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "3.0.0" + } + } + } + }, + "jest-diff": { + "version": "23.0.1", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-23.0.1.tgz", + "integrity": "sha1-PUkTfO4SwyCktNK0pvpugtSRoWo=", + "dev": true, + "requires": { + "chalk": "2.4.1", + "diff": "3.5.0", + "jest-get-type": "22.4.3", + "pretty-format": "23.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "3.0.0" + } + } + } + }, + "jest-docblock": { + "version": "23.0.1", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-23.0.1.tgz", + "integrity": "sha1-3t3RgzO+XcJBUmCgTvP86SdrVyU=", + "dev": true, + "requires": { + "detect-newline": "2.1.0" + } + }, + "jest-each": { + "version": "23.1.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-23.1.0.tgz", + "integrity": "sha1-FhRrWSw1SGelrl4TzfFcbGW2lsY=", + "dev": true, + "requires": { + "chalk": "2.4.1", + "pretty-format": "23.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "3.0.0" + } + } + } + }, + "jest-environment-jsdom": { + "version": "23.1.0", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-23.1.0.tgz", + "integrity": "sha1-hZKZFOI77TV32sl1X0EG0Gl8R5w=", + "dev": true, + "requires": { + "jest-mock": "23.1.0", + "jest-util": "23.1.0", + "jsdom": "11.11.0" + } + }, + "jest-environment-node": { + "version": "23.1.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-23.1.0.tgz", + "integrity": "sha1-RSwL+UnPy7rNoeF2Lu7XC8eEx9U=", + "dev": true, + "requires": { + "jest-mock": "23.1.0", + "jest-util": "23.1.0" + } + }, + "jest-get-type": { + "version": "22.4.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-22.4.3.tgz", + "integrity": "sha512-/jsz0Y+V29w1chdXVygEKSz2nBoHoYqNShPe+QgxSNjAuP1i8+k4LbQNrfoliKej0P45sivkSCh7yiD6ubHS3w==", + "dev": true + }, + "jest-haste-map": { + "version": "23.1.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-23.1.0.tgz", + "integrity": "sha1-GObH1ajScTb5G32YUvhd4McHTEk=", + "dev": true, + "requires": { + "fb-watchman": "2.0.0", + "graceful-fs": "4.1.11", + "jest-docblock": "23.0.1", + "jest-serializer": "23.0.1", + "jest-worker": "23.0.1", + "micromatch": "2.3.11", + "sane": "2.5.2" + }, + "dependencies": { + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true, + "requires": { + "arr-flatten": "1.1.0" + } + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true + }, + "braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dev": true, + "requires": { + "expand-range": "1.8.2", + "preserve": "0.2.0", + "repeat-element": "1.1.2" + } + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "dev": true, + "requires": { + "is-posix-bracket": "0.1.1" + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "dev": true, + "requires": { + "is-extglob": "1.0.0" + } + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "1.0.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "dev": true, + "requires": { + "arr-diff": "2.0.0", + "array-unique": "0.2.1", + "braces": "1.8.5", + "expand-brackets": "0.1.5", + "extglob": "0.3.2", + "filename-regex": "2.0.1", + "is-extglob": "1.0.0", + "is-glob": "2.0.1", + "kind-of": "3.2.2", + "normalize-path": "2.1.1", + "object.omit": "2.0.1", + "parse-glob": "3.0.4", + "regex-cache": "0.4.4" + } + } + } + }, + "jest-jasmine2": { + "version": "23.1.0", + "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-23.1.0.tgz", + "integrity": "sha1-SvqzFym2VN3NKwdK3YSTlvE7MLg=", + "dev": true, + "requires": { + "chalk": "2.4.1", + "co": "4.6.0", + "expect": "23.1.0", + "is-generator-fn": "1.0.0", + "jest-diff": "23.0.1", + "jest-each": "23.1.0", + "jest-matcher-utils": "23.0.1", + "jest-message-util": "23.1.0", + "jest-snapshot": "23.0.1", + "jest-util": "23.1.0", + "pretty-format": "23.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "3.0.0" + } + } + } + }, + "jest-leak-detector": { + "version": "23.0.1", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-23.0.1.tgz", + "integrity": "sha1-nboHUFrDSVw50+wJrB5WRZnoYaA=", + "dev": true, + "requires": { + "pretty-format": "23.0.1" + } + }, + "jest-matcher-utils": { + "version": "23.0.1", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-23.0.1.tgz", + "integrity": "sha1-DGwNrt+YM8Kn82I2Bp7+y0w/bl8=", + "dev": true, + "requires": { + "chalk": "2.4.1", + "jest-get-type": "22.4.3", + "pretty-format": "23.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "3.0.0" + } + } + } + }, + "jest-message-util": { + "version": "23.1.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-23.1.0.tgz", + "integrity": "sha1-moCbpIfsrFzlEdTmmO47XuJGHqk=", + "dev": true, + "requires": { + "@babel/code-frame": "7.0.0-beta.44", + "chalk": "2.4.1", + "micromatch": "2.3.11", + "slash": "1.0.0", + "stack-utils": "1.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "1.9.1" + } + }, + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true, + "requires": { + "arr-flatten": "1.1.0" + } + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true + }, + "braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dev": true, + "requires": { + "expand-range": "1.8.2", + "preserve": "0.2.0", + "repeat-element": "1.1.2" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "dev": true, + "requires": { + "is-posix-bracket": "0.1.1" + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "dev": true, + "requires": { + "is-extglob": "1.0.0" + } + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "1.0.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "dev": true, + "requires": { + "arr-diff": "2.0.0", + "array-unique": "0.2.1", + "braces": "1.8.5", + "expand-brackets": "0.1.5", + "extglob": "0.3.2", + "filename-regex": "2.0.1", + "is-extglob": "1.0.0", + "is-glob": "2.0.1", + "kind-of": "3.2.2", + "normalize-path": "2.1.1", + "object.omit": "2.0.1", + "parse-glob": "3.0.4", + "regex-cache": "0.4.4" + } + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "3.0.0" + } + } + } + }, + "jest-mock": { + "version": "23.1.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-23.1.0.tgz", + "integrity": "sha1-o4HDGxIasfYMRiotrbe4bczKxIc=", + "dev": true + }, + "jest-regex-util": { + "version": "23.0.0", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-23.0.0.tgz", + "integrity": "sha1-3Vwf3gxG9DcTFM8Q96dRoj9Oj3Y=", + "dev": true + }, + "jest-resolve": { + "version": "23.1.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-23.1.0.tgz", + "integrity": "sha1-ueMW7s69bwC8UKOWDRUnuuZXktI=", + "dev": true, + "requires": { + "browser-resolve": "1.11.2", + "chalk": "2.4.1", + "realpath-native": "1.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "3.0.0" + } + } + } + }, + "jest-resolve-dependencies": { + "version": "23.0.1", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-23.0.1.tgz", + "integrity": "sha1-0BoQ3a2RUsTOzfXqwriFccS2pk0=", + "dev": true, + "requires": { + "jest-regex-util": "23.0.0", + "jest-snapshot": "23.0.1" + } + }, + "jest-runner": { + "version": "23.1.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-23.1.0.tgz", + "integrity": "sha1-+iCpM//3MaVDKzVh5/ZCZZT6KbU=", + "dev": true, + "requires": { + "exit": "0.1.2", + "graceful-fs": "4.1.11", + "jest-config": "23.1.0", + "jest-docblock": "23.0.1", + "jest-haste-map": "23.1.0", + "jest-jasmine2": "23.1.0", + "jest-leak-detector": "23.0.1", + "jest-message-util": "23.1.0", + "jest-runtime": "23.1.0", + "jest-util": "23.1.0", + "jest-worker": "23.0.1", + "source-map-support": "0.5.6", + "throat": "4.1.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "source-map-support": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.6.tgz", + "integrity": "sha512-N4KXEz7jcKqPf2b2vZF11lQIz9W5ZMuUcIOGj243lduidkf2fjkVKJS9vNxVWn3u/uxX38AcE8U9nnH9FPcq+g==", + "dev": true, + "requires": { + "buffer-from": "1.1.0", + "source-map": "0.6.1" + } + } + } + }, + "jest-runtime": { + "version": "23.1.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-23.1.0.tgz", + "integrity": "sha1-tK4OhyWeys/UqIS2OdsHz03WIK8=", + "dev": true, + "requires": { + "babel-core": "6.26.3", + "babel-plugin-istanbul": "4.1.6", + "chalk": "2.4.1", + "convert-source-map": "1.5.1", + "exit": "0.1.2", + "fast-json-stable-stringify": "2.0.0", + "graceful-fs": "4.1.11", + "jest-config": "23.1.0", + "jest-haste-map": "23.1.0", + "jest-message-util": "23.1.0", + "jest-regex-util": "23.0.0", + "jest-resolve": "23.1.0", + "jest-snapshot": "23.0.1", + "jest-util": "23.1.0", + "jest-validate": "23.0.1", + "micromatch": "2.3.11", + "realpath-native": "1.0.0", + "slash": "1.0.0", + "strip-bom": "3.0.0", + "write-file-atomic": "2.3.0", + "yargs": "11.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "1.9.1" + } + }, + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true, + "requires": { + "arr-flatten": "1.1.0" + } + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true + }, + "braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dev": true, + "requires": { + "expand-range": "1.8.2", + "preserve": "0.2.0", + "repeat-element": "1.1.2" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "dev": true, + "requires": { + "is-posix-bracket": "0.1.1" + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "dev": true, + "requires": { + "is-extglob": "1.0.0" + } + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "1.0.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "dev": true, + "requires": { + "arr-diff": "2.0.0", + "array-unique": "0.2.1", + "braces": "1.8.5", + "expand-brackets": "0.1.5", + "extglob": "0.3.2", + "filename-regex": "2.0.1", + "is-extglob": "1.0.0", + "is-glob": "2.0.1", + "kind-of": "3.2.2", + "normalize-path": "2.1.1", + "object.omit": "2.0.1", + "parse-glob": "3.0.4", + "regex-cache": "0.4.4" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "3.0.0" + } + } + } + }, + "jest-serializer": { + "version": "23.0.1", + "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-23.0.1.tgz", + "integrity": "sha1-o3dq6zEekP6D+rnlM+hRAr0WQWU=", + "dev": true + }, + "jest-snapshot": { + "version": "23.0.1", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-23.0.1.tgz", + "integrity": "sha1-ZnT6Gbnraamcq+zUFb3cQtavPn4=", + "dev": true, + "requires": { + "chalk": "2.4.1", + "jest-diff": "23.0.1", + "jest-matcher-utils": "23.0.1", + "mkdirp": "0.5.1", + "natural-compare": "1.4.0", + "pretty-format": "23.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "3.0.0" + } + } + } + }, + "jest-util": { + "version": "23.1.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-23.1.0.tgz", + "integrity": "sha1-wCUbrzRkTG3S/qeKli9CY6xVdy0=", + "dev": true, + "requires": { + "callsites": "2.0.0", + "chalk": "2.4.1", + "graceful-fs": "4.1.11", + "is-ci": "1.1.0", + "jest-message-util": "23.1.0", + "mkdirp": "0.5.1", + "slash": "1.0.0", + "source-map": "0.6.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "1.9.1" + } + }, + "callsites": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", + "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", + "dev": true + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "3.0.0" + } + } + } + }, + "jest-validate": { + "version": "23.0.1", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-23.0.1.tgz", + "integrity": "sha1-zZ8BqJ0mu4hfEqhmdxXpyGWldU8=", + "dev": true, + "requires": { + "chalk": "2.4.1", + "jest-get-type": "22.4.3", + "leven": "2.1.0", + "pretty-format": "23.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "3.0.0" + } + } + } + }, + "jest-watcher": { + "version": "23.1.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-23.1.0.tgz", + "integrity": "sha1-qNWELjjZ+0r/+CPfartCpYrmzb0=", + "dev": true, + "requires": { + "ansi-escapes": "3.1.0", + "chalk": "2.4.1", + "string-length": "2.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "3.0.0" + } + } + } + }, + "jest-worker": { + "version": "23.0.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-23.0.1.tgz", + "integrity": "sha1-nmSd2WP/QEYCb5HEAX8Dmmqkp7w=", + "dev": true, + "requires": { + "merge-stream": "1.0.1" + } + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true + }, + "js-yaml": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", + "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", + "dev": true, + "requires": { + "argparse": "1.0.10", + "esprima": "4.0.0" + } + }, + "js2xmlparser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-3.0.0.tgz", + "integrity": "sha1-P7YOqgicVED5MZ9RdgzNB+JJlzM=", + "dev": true, + "requires": { + "xmlcreate": "1.0.2" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true, + "optional": true + }, + "jsdoc": { + "version": "3.5.5", + "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.5.5.tgz", + "integrity": "sha512-6PxB65TAU4WO0Wzyr/4/YhlGovXl0EVYfpKbpSroSj0qBxT4/xod/l40Opkm38dRHRdQgdeY836M0uVnJQG7kg==", + "dev": true, + "requires": { + "babylon": "7.0.0-beta.19", + "bluebird": "3.5.1", + "catharsis": "0.8.9", + "escape-string-regexp": "1.0.5", + "js2xmlparser": "3.0.0", "klaw": "2.0.0", "marked": "0.3.19", "mkdirp": "0.5.1", @@ -4518,6 +6647,48 @@ } } }, + "jsdom": { + "version": "11.11.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-11.11.0.tgz", + "integrity": "sha512-ou1VyfjwsSuWkudGxb03FotDajxAto6USAlmMZjE2lc0jCznt7sBWkhfRBRaWwbnmDqdMSTKTLT5d9sBFkkM7A==", + "dev": true, + "requires": { + "abab": "1.0.4", + "acorn": "5.6.2", + "acorn-globals": "4.1.0", + "array-equal": "1.0.0", + "cssom": "0.3.2", + "cssstyle": "0.3.1", + "data-urls": "1.0.0", + "domexception": "1.0.1", + "escodegen": "1.10.0", + "html-encoding-sniffer": "1.0.2", + "left-pad": "1.3.0", + "nwsapi": "2.0.3", + "parse5": "4.0.0", + "pn": "1.1.0", + "request": "2.87.0", + "request-promise-native": "1.0.5", + "sax": "1.2.4", + "symbol-tree": "3.2.2", + "tough-cookie": "2.4.2", + "w3c-hr-time": "1.0.1", + "webidl-conversions": "4.0.2", + "whatwg-encoding": "1.0.3", + "whatwg-mimetype": "2.1.0", + "whatwg-url": "6.5.0", + "ws": "4.1.0", + "xml-name-validator": "3.0.0" + }, + "dependencies": { + "parse5": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-4.0.0.tgz", + "integrity": "sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA==", + "dev": true + } + } + }, "jsesc": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", @@ -4530,6 +6701,12 @@ "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", "dev": true }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true + }, "json-schema-traverse": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", @@ -4542,12 +6719,30 @@ "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", "dev": true }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, "json5": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", "dev": true }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, "kind-of": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", @@ -4563,6 +6758,13 @@ "graceful-fs": "4.1.11" } }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", + "dev": true, + "optional": true + }, "lcid": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", @@ -4578,6 +6780,18 @@ "integrity": "sha1-Mr7p+tFoMo1q6oUi2DP0GA7tHaM=", "dev": true }, + "left-pad": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/left-pad/-/left-pad-1.3.0.tgz", + "integrity": "sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA==", + "dev": true + }, + "leven": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz", + "integrity": "sha1-wuep93IJTe6dNCAq6KzORoeHVYA=", + "dev": true + }, "levn": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", @@ -4604,6 +6818,36 @@ "resolve": "1.7.1" } }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "strip-bom": "2.0.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "0.2.1" + } + } + } + }, "loader-runner": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.3.0.tgz", @@ -4729,6 +6973,12 @@ "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=", "dev": true }, + "lodash.sortby": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", + "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=", + "dev": true + }, "lodash.template": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-3.6.2.tgz", @@ -4762,6 +7012,12 @@ "integrity": "sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s=", "dev": true }, + "longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", + "dev": true + }, "loose-envify": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", @@ -4799,6 +7055,15 @@ "kind-of": "6.0.2" } }, + "makeerror": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.11.tgz", + "integrity": "sha1-4BpckQnyr3lmDk6LlYd5AYT1qWw=", + "dev": true, + "requires": { + "tmpl": "1.0.4" + } + }, "mamacro": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/mamacro/-/mamacro-0.0.3.tgz", @@ -4826,6 +7091,12 @@ "integrity": "sha512-ea2eGWOqNxPcXv8dyERdSr/6FmzvWwzjMxpfGB/sbMccXoct+xY+YukPD+QTUZwyvK7BZwcr4m21WBOW41pAkg==", "dev": true }, + "math-random": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.1.tgz", + "integrity": "sha1-izqsWIuKZuSXXjzepn97sylgH6w=", + "dev": true + }, "md5.js": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", @@ -4855,6 +7126,21 @@ "readable-stream": "2.3.6" } }, + "merge": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/merge/-/merge-1.2.0.tgz", + "integrity": "sha1-dTHjnUlJwoGma4xabgJl6LBYlNo=", + "dev": true + }, + "merge-stream": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-1.0.1.tgz", + "integrity": "sha1-QEEgLVCKNCugAXQAjfDCUbjBNeE=", + "dev": true, + "requires": { + "readable-stream": "2.3.6" + } + }, "micromatch": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", @@ -4886,6 +7172,21 @@ "brorand": "1.1.0" } }, + "mime-db": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", + "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", + "dev": true + }, + "mime-types": { + "version": "2.1.18", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", + "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", + "dev": true, + "requires": { + "mime-db": "1.33.0" + } + }, "mimic-fn": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", @@ -5053,6 +7354,12 @@ "integrity": "sha512-2NpiFHqC87y/zFke0fC0spBXL3bBsoh/p5H1EFhshxjCR5+0g2d6BiXbUFz9v1sAcxsk2htp2eQnNIci2dIYcA==", "dev": true }, + "node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=", + "dev": true + }, "node-libs-browser": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.1.0.tgz", @@ -5092,6 +7399,30 @@ } } }, + "node-notifier": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-5.2.1.tgz", + "integrity": "sha512-MIBs+AAd6dJ2SklbbE8RUDRlIVhU8MaNLh1A9SUZDUHPiZkWLFde6UNwG41yQHZEToHgJMXqyVZ9UcS/ReOVTg==", + "dev": true, + "requires": { + "growly": "1.3.0", + "semver": "5.5.0", + "shellwords": "0.1.1", + "which": "1.3.1" + } + }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "dev": true, + "requires": { + "hosted-git-info": "2.6.0", + "is-builtin-module": "1.0.0", + "semver": "5.5.0", + "validate-npm-package-license": "3.0.3" + } + }, "normalize-path": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", @@ -5125,6 +7456,18 @@ "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", "dev": true }, + "nwsapi": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.0.3.tgz", + "integrity": "sha512-zFJF9lOpg2+uicP0BQKOAfIOqeTp/p8PC669mewxgRkR1hGjne8BMUHk4wpRS9o5Z0icA5Nv04HmGkW31KfMKw==", + "dev": true + }, + "oauth-sign": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", + "dev": true + }, "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -5162,6 +7505,12 @@ } } }, + "object-keys": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz", + "integrity": "sha1-xUYBd4rVYPEULODgG8yotW0TQm0=", + "dev": true + }, "object-visit": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", @@ -5183,6 +7532,16 @@ "isobject": "3.0.1" } }, + "object.getownpropertydescriptors": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", + "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", + "dev": true, + "requires": { + "define-properties": "1.1.2", + "es-abstract": "1.12.0" + } + }, "object.map": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", @@ -5193,6 +7552,27 @@ "make-iterator": "1.0.1" } }, + "object.omit": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", + "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", + "dev": true, + "requires": { + "for-own": "0.1.5", + "is-extendable": "0.1.1" + }, + "dependencies": { + "for-own": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "dev": true, + "requires": { + "for-in": "1.0.2" + } + } + } + }, "object.pick": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", @@ -5220,6 +7600,24 @@ "mimic-fn": "1.2.0" } }, + "optimist": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "dev": true, + "requires": { + "minimist": "0.0.8", + "wordwrap": "0.0.3" + }, + "dependencies": { + "wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", + "dev": true + } + } + }, "optionator": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", @@ -5371,6 +7769,44 @@ "path-root": "0.1.1" } }, + "parse-glob": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", + "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "dev": true, + "requires": { + "glob-base": "0.3.0", + "is-dotfile": "1.0.3", + "is-extglob": "1.0.0", + "is-glob": "2.0.1" + }, + "dependencies": { + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "1.0.0" + } + } + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "1.3.1" + } + }, "parse-passwd": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", @@ -5449,6 +7885,25 @@ "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=", "dev": true }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, "pbkdf2": { "version": "3.0.16", "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.16.tgz", @@ -5462,6 +7917,12 @@ "sha.js": "2.4.11" } }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true + }, "pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", @@ -5498,6 +7959,12 @@ "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", "dev": true }, + "pn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/pn/-/pn-1.1.0.tgz", + "integrity": "sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA==", + "dev": true + }, "posix-character-classes": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", @@ -5510,6 +7977,39 @@ "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", "dev": true }, + "preserve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", + "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", + "dev": true + }, + "pretty-format": { + "version": "23.0.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-23.0.1.tgz", + "integrity": "sha1-1h0GUmjkx1kIO8y8onoBrXx2AfQ=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0", + "ansi-styles": "3.2.1" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "1.9.1" + } + } + } + }, "pretty-hrtime": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", @@ -5558,6 +8058,12 @@ "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", "dev": true }, + "psl": { + "version": "1.1.27", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.27.tgz", + "integrity": "sha512-J8tJX5tAeEp9tQTI2w2aMZ6V1INuU4JmNaNPRuHAqjjVq3ZJ+jV3+tcT3ncgTnBxvwJy740IB/WZrxFus2VdMA==", + "dev": true + }, "public-encrypt": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.2.tgz", @@ -5598,6 +8104,12 @@ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "dev": true + }, "querystring": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", @@ -5610,6 +8122,25 @@ "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", "dev": true }, + "randomatic": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.0.0.tgz", + "integrity": "sha512-VdxFOIEY3mNO5PtSRkkle/hPJDHvQhK21oa73K4yAc9qmp6N429gAyF1gZMOTMeS0/AYzaV/2Trcef+NaIonSA==", + "dev": true, + "requires": { + "is-number": "4.0.0", + "kind-of": "6.0.2", + "math-random": "1.0.1" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "dev": true + } + } + }, "randombytes": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz", @@ -5629,6 +8160,48 @@ "safe-buffer": "5.1.2" } }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "1.1.0", + "normalize-package-data": "2.4.0", + "path-type": "1.1.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "1.1.2", + "read-pkg": "1.1.0" + }, + "dependencies": { + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "2.1.0", + "pinkie-promise": "2.0.1" + } + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "2.0.1" + } + } + } + }, "readable-stream": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", @@ -5656,6 +8229,15 @@ "set-immediate-shim": "1.0.1" } }, + "realpath-native": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/realpath-native/-/realpath-native-1.0.0.tgz", + "integrity": "sha512-XJtlRJ9jf0E1H1SLeJyQ9PGzQD7S65h1pRXEcAeK48doKOnKxcgPeNohJvD5u/2sI9J1oke6E8bZHS/fmW1UiQ==", + "dev": true, + "requires": { + "util.promisify": "1.0.0" + } + }, "rechoir": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", @@ -5688,6 +8270,15 @@ "private": "0.1.8" } }, + "regex-cache": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", + "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", + "dev": true, + "requires": { + "is-equal-shallow": "0.1.3" + } + }, "regex-not": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", @@ -5771,6 +8362,71 @@ "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=", "dev": true }, + "request": { + "version": "2.87.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.87.0.tgz", + "integrity": "sha512-fcogkm7Az5bsS6Sl0sibkbhcKsnyon/jV1kF3ajGmF0c8HrttdKTPRT9hieOaQHA5HEq6r8OyWOo/o781C1tNw==", + "dev": true, + "requires": { + "aws-sign2": "0.7.0", + "aws4": "1.7.0", + "caseless": "0.12.0", + "combined-stream": "1.0.6", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.3.2", + "har-validator": "5.0.3", + "http-signature": "1.2.0", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.18", + "oauth-sign": "0.8.2", + "performance-now": "2.1.0", + "qs": "6.5.2", + "safe-buffer": "5.1.2", + "tough-cookie": "2.3.4", + "tunnel-agent": "0.6.0", + "uuid": "3.2.1" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + }, + "tough-cookie": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", + "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", + "dev": true, + "requires": { + "punycode": "1.4.1" + } + } + } + }, + "request-promise-core": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.1.tgz", + "integrity": "sha1-Pu4AssWqgyOc+wTFcA2jb4HNCLY=", + "dev": true, + "requires": { + "lodash": "4.17.10" + } + }, + "request-promise-native": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.5.tgz", + "integrity": "sha1-UoF3D2jgyXGeUWP9P6tIIhX0/aU=", + "dev": true, + "requires": { + "request-promise-core": "1.1.1", + "stealthy-require": "1.1.1", + "tough-cookie": "2.4.2" + } + }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -5874,6 +8530,16 @@ "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", "dev": true }, + "right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "dev": true, + "optional": true, + "requires": { + "align-text": "0.1.4" + } + }, "rimraf": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", @@ -5893,6 +8559,12 @@ "inherits": "2.0.3" } }, + "rsvp": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/rsvp/-/rsvp-3.6.2.tgz", + "integrity": "sha512-OfWGQTb9vnwRjwtA2QwpG2ICclHC3pgXZO5xt8H2EfgDquO0qVdSb5T88L4qJVAEugbS56pAuV4XZM58UX8ulw==", + "dev": true + }, "run-async": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", @@ -5956,6 +8628,37 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true }, + "sane": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/sane/-/sane-2.5.2.tgz", + "integrity": "sha1-tNwYYcIbQn6SlQej51HiosuKs/o=", + "dev": true, + "requires": { + "anymatch": "2.0.0", + "capture-exit": "1.2.0", + "exec-sh": "0.2.1", + "fb-watchman": "2.0.0", + "fsevents": "1.2.4", + "micromatch": "3.1.10", + "minimist": "1.2.0", + "walker": "1.0.7", + "watch": "0.18.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "dev": true + }, "schema-utils": { "version": "0.4.5", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.5.tgz", @@ -6050,6 +8753,12 @@ "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", "dev": true }, + "shellwords": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz", + "integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==", + "dev": true + }, "sigmund": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", @@ -6239,6 +8948,38 @@ "integrity": "sha512-dSO0DDYUahUt/0/pD/Is3VIm5TGJjludZ0HVymmhYF6eNA53PVLhnUk0znSYbH8IYBuJdCE+1luR22jNLMaQdw==", "dev": true }, + "spdx-correct": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", + "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", + "dev": true, + "requires": { + "spdx-expression-parse": "3.0.0", + "spdx-license-ids": "3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", + "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "dev": true, + "requires": { + "spdx-exceptions": "2.1.0", + "spdx-license-ids": "3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", + "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==", + "dev": true + }, "split-string": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", @@ -6254,6 +8995,23 @@ "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, + "sshpk": { + "version": "1.14.2", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz", + "integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=", + "dev": true, + "requires": { + "asn1": "0.2.3", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.1", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.1", + "getpass": "0.1.7", + "jsbn": "0.1.1", + "safer-buffer": "2.1.2", + "tweetnacl": "0.14.5" + } + }, "ssri": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/ssri/-/ssri-5.3.0.tgz", @@ -6263,6 +9021,12 @@ "safe-buffer": "5.1.2" } }, + "stack-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-1.0.1.tgz", + "integrity": "sha1-1PM6tU6OOHeLDKXP07OvsS22hiA=", + "dev": true + }, "static-extend": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", @@ -6284,6 +9048,12 @@ } } }, + "stealthy-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", + "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=", + "dev": true + }, "stream-browserify": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", @@ -6329,6 +9099,33 @@ "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", "dev": true }, + "string-length": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-2.0.0.tgz", + "integrity": "sha1-1A27aGo6zpYMHP/KVivyxF+DY+0=", + "dev": true, + "requires": { + "astral-regex": "1.0.0", + "strip-ansi": "4.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + } + } + }, "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", @@ -6402,6 +9199,12 @@ "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", "dev": true }, + "symbol-tree": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.2.tgz", + "integrity": "sha1-rifbOPZgp64uHDt9G8KQgZuFGeY=", + "dev": true + }, "table": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/table/-/table-4.0.2.tgz", @@ -6483,12 +9286,31 @@ "integrity": "sha512-dQRhbNQkRnaqauC7WqSJ21EEksgT0fYZX2lqXzGkpo8JNig9zGZTYoMGvyI2nWmXlE2VSVXVDu7wLVGu/mQEsg==", "dev": true }, + "test-exclude": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-4.2.1.tgz", + "integrity": "sha512-qpqlP/8Zl+sosLxBcVKl9vYy26T9NPalxSzzCP/OY6K7j938ui2oKgo+kRZYfxAeIpLqpbVnsHq1tyV70E4lWQ==", + "dev": true, + "requires": { + "arrify": "1.0.1", + "micromatch": "3.1.10", + "object-assign": "4.1.1", + "read-pkg-up": "1.0.1", + "require-main-filename": "1.0.1" + } + }, "text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", "dev": true }, + "throat": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/throat/-/throat-4.1.0.tgz", + "integrity": "sha1-iQN8vJLFarGJJua6TLsgDhVnKmo=", + "dev": true + }, "through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", @@ -6538,6 +9360,12 @@ "os-tmpdir": "1.0.2" } }, + "tmpl": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.4.tgz", + "integrity": "sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE=", + "dev": true + }, "to-arraybuffer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", @@ -6592,6 +9420,33 @@ "repeat-string": "1.6.1" } }, + "tough-cookie": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.2.tgz", + "integrity": "sha512-vahm+X8lSV/KjXziec8x5Vp0OTC9mq8EVCOApIsRAooeuMPSO8aT7PFACYkaL0yZ/3hVqw+8DzhCJwl8H2Ad6w==", + "dev": true, + "requires": { + "psl": "1.1.27", + "punycode": "1.4.1" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + } + } + }, + "tr46": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz", + "integrity": "sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk=", + "dev": true, + "requires": { + "punycode": "2.1.1" + } + }, "trim-right": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", @@ -6610,6 +9465,22 @@ "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", "dev": true }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "requires": { + "safe-buffer": "5.1.2" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true, + "optional": true + }, "type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", @@ -6643,6 +9514,13 @@ } } }, + "uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", + "dev": true, + "optional": true + }, "uglifyjs-webpack-plugin": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.5.tgz", @@ -6864,6 +9742,22 @@ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true }, + "util.promisify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz", + "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==", + "dev": true, + "requires": { + "define-properties": "1.1.2", + "object.getownpropertydescriptors": "2.0.3" + } + }, + "uuid": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", + "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==", + "dev": true + }, "v8-compile-cache": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.0.0.tgz", @@ -6879,6 +9773,27 @@ "user-home": "1.1.1" } }, + "validate-npm-package-license": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz", + "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", + "dev": true, + "requires": { + "spdx-correct": "3.0.0", + "spdx-expression-parse": "3.0.0" + } + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "1.3.0" + } + }, "vinyl": { "version": "0.5.3", "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz", @@ -6976,6 +9891,42 @@ "indexof": "0.0.1" } }, + "w3c-hr-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz", + "integrity": "sha1-gqwr/2PZUOqeMYmlimViX+3xkEU=", + "dev": true, + "requires": { + "browser-process-hrtime": "0.1.2" + } + }, + "walker": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.7.tgz", + "integrity": "sha1-L3+bj9ENZ3JisYqITijRlhjgKPs=", + "dev": true, + "requires": { + "makeerror": "1.0.11" + } + }, + "watch": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/watch/-/watch-0.18.0.tgz", + "integrity": "sha1-KAlUdsbffJDJYxOJkMClQj60uYY=", + "dev": true, + "requires": { + "exec-sh": "0.2.1", + "minimist": "1.2.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, "watchpack": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", @@ -6987,6 +9938,12 @@ "neo-async": "2.5.1" } }, + "webidl-conversions": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", + "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", + "dev": true + }, "webpack": { "version": "4.11.1", "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.11.1.tgz", @@ -7154,11 +10111,45 @@ } } }, + "whatwg-encoding": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.3.tgz", + "integrity": "sha512-jLBwwKUhi8WtBfsMQlL4bUUcT8sMkAtQinscJAe/M4KHCkHuUJAF6vuB0tueNIw4c8ziO6AkRmgY+jL3a0iiPw==", + "dev": true, + "requires": { + "iconv-lite": "0.4.19" + }, + "dependencies": { + "iconv-lite": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", + "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==", + "dev": true + } + } + }, "whatwg-fetch": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz", "integrity": "sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng==" }, + "whatwg-mimetype": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.1.0.tgz", + "integrity": "sha512-FKxhYLytBQiUKjkYteN71fAUA3g6KpNXoho1isLiLSB3N1G4F35Q5vUxWfKFhBwi5IWF27VE6WxhrnnC+m0Mew==", + "dev": true + }, + "whatwg-url": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-6.5.0.tgz", + "integrity": "sha512-rhRZRqx/TLJQWUpQ6bmrt2UV4f0HCQ463yQuONJqC6fO2VoEb1pTYddbe59SkYq87aoM5A3bdhMZiUiVws+fzQ==", + "dev": true, + "requires": { + "lodash.sortby": "4.7.0", + "tr46": "1.0.1", + "webidl-conversions": "4.0.2" + } + }, "which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", @@ -7174,6 +10165,13 @@ "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", "dev": true }, + "window-size": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", + "dev": true, + "optional": true + }, "wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", @@ -7236,6 +10234,33 @@ "mkdirp": "0.5.1" } }, + "write-file-atomic": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz", + "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "imurmurhash": "0.1.4", + "signal-exit": "3.0.2" + } + }, + "ws": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-4.1.0.tgz", + "integrity": "sha512-ZGh/8kF9rrRNffkLFV4AzhvooEclrOH0xaugmqGsIfFgOE/pIz4fMc4Ef+5HSQqTEug2S9JZIWDR47duDSLfaA==", + "dev": true, + "requires": { + "async-limiter": "1.0.0", + "safe-buffer": "5.1.2" + } + }, + "xml-name-validator": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", + "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", + "dev": true + }, "xmlcreate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-1.0.2.tgz", diff --git a/package.json b/package.json index b0dc79e..4215bce 100644 --- a/package.json +++ b/package.json @@ -18,9 +18,17 @@ ], "author": "Infrared5 Inc.", "license": "MIT", + "jest": { + "bail": false, + "verbose": true, + "roots": [ + "__tests__" + ] + }, "devDependencies": { "babel-core": "^6.26.3", "babel-eslint": "^8.2.3", + "babel-jest": "^23.0.1", "babel-loader": "^7.1.4", "babel-plugin-transform-async-to-generator": "^6.24.1", "babel-plugin-transform-object-assign": "^6.22.0", @@ -34,6 +42,7 @@ "colors": "^1.3.0", "eslint": "^4.19.1", "gulp": "^3.9.1", + "jest-cli": "^23.1.0", "jsdoc": "^3.5.5", "webpack": "^4.11.1", "webpack-cli": "^3.0.3" @@ -48,7 +57,7 @@ "webpack:dist": "NODE_ENV=production webpack", "postwebpack:build": "gulp move-build-to-examples", "lint": "eslint ./src --ext .js", - "test": "test", + "test": "jest", "docs:api": "jsdoc -r src/js -d docs/api -c .jsdoc" } } diff --git a/src/js/autoscale/index.js b/src/js/autoscale/index.js index a14b7d5..6274299 100644 --- a/src/js/autoscale/index.js +++ b/src/js/autoscale/index.js @@ -1,4 +1,4 @@ -import request from './request.js' +import req from './request.js' import { debug } from '../log' const NAME = 'Red5ProStreamManagerExt' @@ -7,6 +7,10 @@ const isRTC = /(wss|ws)/ // const isRTMP = /(rtmps|rtmp)/ // const isHLS = /(https|http)/ +const timeout = (delay) => { + return new Promise(resolve => setTimeout(resolve, delay)) +} + /** * Modifies the intialization configuration used for publisher or subscriber. * This configuration can vary based on target tech and the `useProxy` attribute of the autoscale configuration. @@ -44,32 +48,45 @@ const modifyInitConfigWithResponse = (config, response, autoscaleConfig) => { return c } +/** + * Nicely wraps an async in a promise so we can use in-line without try...catch. + * + * @private + */ +const asyncWrap = (p) => { + return new Promise(resolve => { + p.then(response => { + resolve(response) + }).catch(e => { + resolve({ + error: e.message, + message: e.response.errorMessage + }) + }) + }) +} + /** * Allows for retry in requesting on the Stream Manager API. * * @private */ const execute = async (config, count, limit, delay) => { - const onfailure = () => { - if (count++ < limit) { - debug(NAME, `Attempt ${count} of ${limit}, with ${delay} millisecond delay.`) - let timeout = setTimeout(() => { - clearTimeout(timeout) - execute(config, count, limit, delay) - }, delay) - return true + debug(NAME, `Attempting ${count+1} of ${limit} with ${delay} millisecond delay...`) + let response = await asyncWrap(req(config)) + while (!response || (response && response.error)) { + if (limit === -1 || (++count < limit)) { + debug(NAME, `Attempting ${count+1} of ${limit} with ${delay} millisecond delay...`) + await timeout(delay) + response = await asyncWrap(req(config)) + } else { + break } - return false } - - try { - let response = await request(config) + if (!response || response.error) { + throw new Error(response.message || response.error) + } else { return response - } catch (e) { - // If we fail, try again until we are not allowed. - if (!onfailure()) { - throw e - } } } @@ -111,6 +128,7 @@ const autoscaleInit = async (proxy, autoscaleConfig, initConfig) => { * * @param {Object} proxy * The established Publisher or Subscriber instance of the Red5 Pro SDK. + * @private */ export const Autoscale = (proxy) => { return { @@ -125,13 +143,15 @@ export const Autoscale = (proxy) => { * * @param {Class} clazz * The Class reference to apply the `autoscale` function to. + * @private */ export const Decorate = (clazz) => { let fn = function(autoscaleConfig, initConfig) { return autoscaleInit(this, autoscaleConfig, initConfig) } Object.defineProperty(clazz.prototype, 'autoscale', { - value: fn + value: fn, + enumerable: true }) } diff --git a/src/js/autoscale/request.js b/src/js/autoscale/request.js index 49e0ffe..d9fd119 100644 --- a/src/js/autoscale/request.js +++ b/src/js/autoscale/request.js @@ -62,23 +62,31 @@ const endpointFromConfiguration = (configuration) => { * useProxy: true // optional, default=true. Enforces connection proxy for WebRTC clients * } */ -const request = async (config) => { +const req = async (config) => { const configuration = Object.assign({}, defaultConfig, config) const url = endpointFromConfiguration(configuration) - let response = await environment.fetch(url) - if ((response.status >= 200 && response.status < 300) && - (response.headers.get('content-type') && - response.headers.get('content-type').toLowerCase().indexOf('application/json') >= 0)) { + try { + let response = await environment.fetch(url) + if ((response.status >= 200 && response.status < 300) && + (response.headers.get('content-type') && + response.headers.get('content-type').toLowerCase().indexOf('application/json') >= 0)) { - let payload = await response.json() - return payload + let payload = await response.json() + return payload - } else { - let error = new Error(`Could not properly parse response from ${url}.`) - error.response = response - throw error + } else { + let error = new Error(`Could not properly parse response from ${url}.`) + try { + error.response = await response.json() + } catch (e) { + error.response = response + } + throw error + } + } catch (e) { + throw e } } -export default request +export default req From a597a3d80c9e50bd69645466ff4e7fdc866f57ca Mon Sep 17 00:00:00 2001 From: bustardcelly Date: Tue, 12 Jun 2018 16:46:13 -0400 Subject: [PATCH 11/15] Moving some code around. Moves the modification of init configs to a util to properly test without the async requests getting in the way. --- __tests__/autoscale/index.js | 189 ++++++++++++++++++++++++++++++++--- src/js/autoscale/index.js | 82 ++------------- src/js/autoscale/util.js | 88 ++++++++++++++++ 3 files changed, 272 insertions(+), 87 deletions(-) create mode 100644 src/js/autoscale/util.js diff --git a/__tests__/autoscale/index.js b/__tests__/autoscale/index.js index 584e7a5..3c16dd9 100644 --- a/__tests__/autoscale/index.js +++ b/__tests__/autoscale/index.js @@ -1,8 +1,13 @@ /* global jest, describe, it, beforeEach, afterEach, expect */ import { Autoscale, Decorate, autoscaleInit } from '../../src/js/autoscale' -import * as request from '../../src/js/autoscale/request' +import * as req from '../../src/js/autoscale/request' +import { + modifyInitConfigWithStreamManagerResponse +} from '../../src/js/autoscale/util' +import environment from '../../src/js/env/browser' import { LEVELS, establishLogger } from '../../src/js/log' + establishLogger(LEVELS.FATAL) describe('Autoscale', () => { @@ -40,7 +45,50 @@ describe('Decorate', () => { }) }) -describe('autoscaleInit', () => { +describe('autoscaleInit:success', () => { + const autoscaleConfig = { + retryLimit: 3, + retryDelay: 500, + action: 'broadcast', + protocol: 'https', + host: 'sm.company.org', + scope: 'live', + apiVersion: '3.0', + streamName: 'mystream' + } + const smResponse = { + serverAddress: '127.0.0.0', + scope: '/live2', + name: 'mystream1' + } + + beforeEach(() => { + environment.fetch = jest.fn(() => { + return new Promise(resolve => { + resolve({ + status: 200, + headers: { + get: jest.fn(() => 'application/json') + }, + json: jest.fn(() => new Promise(resolve => resolve(smResponse))) + }) + }) + }) + }) + + afterEach(() => { + environment.fetch.mockClear() + environment.fetch.mockRestore() + }) + + it('should request on properly structured URL', async () => { + const endpoint = 'https://sm.company.org/streammanager/api/3.0/event/live/mystream?action=broadcast' + await req.default({...autoscaleConfig}) + expect(environment.fetch).toHaveBeenCalledWith(endpoint) + }) +}) + +describe.skip('autoscaleInit:failure', () => { let proxy const autoscaleConfig = { retryLimit: 3, @@ -52,27 +100,142 @@ describe('autoscaleInit', () => { beforeEach(() => { jest.useFakeTimers() - proxy = new Object() - request.default = jest.fn(() => { - new Promise((resolve, reject) => { - console.log('nope') - reject('uh-oh') + environment.fetch = jest.fn(() => { + return new Promise(resolve => { + resolve({ + status: 400, + headers: { + get: jest.fn(() => false) + } + }) }) }) }) afterEach(() => { - proxy = undefined - request.default.mockClear() - request.default.mockRestore() + environment.fetch.mockClear() + environment.fetch.mockRestore() }) it('should reject on retry limit', async () => { try { - let p = await autoscaleInit(proxy, autoscaleConfig, initConfig) + await autoscaleInit(proxy, autoscaleConfig, initConfig) } catch (e) { - console.log(e) - expect(request.default.mock.calls.length).toEqual(autoscaleConfig.retryLimit) + expect(req.default).toHaveBeenCalledTimes(autoscaleConfig.retryLimit) + } + }) +}) + +describe('modifyInitConfigWithStreamManagerResponse', () => { + const autoscaleConfig = { + retryLimit: 3, + retryDelay: 500, + action: 'broadcast', + protocol: 'https', + host: 'sm.company.org', + scope: 'live', + apiVersion: '3.0', + streamName: 'mystream' + } + const initConfig = { + host: 'sm.company.org', + app: 'live', + streamName: 'mystream' + } + const smResponse = { + serverAddress: '127.0.0.0', + scope: '/live2', + name: 'mystream1' + } + + beforeEach(() => { + }) + + afterEach(() => { + }) + + it('should set connectionParams with single config and useProxy', () => { + let aC = {...autoscaleConfig, useProxy: true} + let iC = {...initConfig, protocol: 'wss', port: 8083} + const result = modifyInitConfigWithStreamManagerResponse(iC, smResponse, aC) + expect(result).toEqual({...iC, + protocol: 'wss', + port: 8083, + host: aC.host, + app: 'streammanager', + streamName: smResponse.name, + connectionParams: { + host: smResponse.serverAddress, + app: smResponse.scope.substr(1, smResponse.scope.length-1) + } + }) + }) + + it('should set connectionParams with multiple config and useProxy', () => { + let aC = {...autoscaleConfig, useProxy: true} + let iC = { + rtc: {...initConfig, protocol: 'wss', port: 8083}, + rtmp: initConfig } + let rtcConfig = {...iC.rtc, + protocol: 'wss', + port: 8083, + host: aC.host, + app: 'streammanager', + streamName: smResponse.name, + connectionParams: { + host: smResponse.serverAddress, + app: smResponse.scope.substr(1, smResponse.scope.length-1) + } + } + let rtmpConfig = {...iC.rtmp, + host: smResponse.serverAddress, + streamName: smResponse.name, + app: smResponse.scope.substr(1, smResponse.scope.length-1) + } + const result = modifyInitConfigWithStreamManagerResponse(iC, smResponse, aC) + expect(result).toEqual({...iC, + rtc: rtcConfig, + rtmp: rtmpConfig + }) }) + + it('should not set connectionParams with single config and not useProxy', () => { + let aC = {...autoscaleConfig, useProxy: false} + let iC = {...initConfig, protocol: 'wss', port: 8083} + const result = modifyInitConfigWithStreamManagerResponse(iC, smResponse, aC) + expect(result).toEqual({...iC, + protocol: 'wss', + port: 8083, + host: smResponse.serverAddress, + app: smResponse.scope.substr(1, smResponse.scope.length-1), + streamName: smResponse.name + }) + }) + + it('should not set connectionParams with multiple config and not useProxy', () => { + let aC = {...autoscaleConfig, useProxy: false} + let iC = { + rtc: {...initConfig, protocol: 'wss', port: 8083}, + rtmp: initConfig + } + let rtcConfig = {...iC.rtc, + protocol: 'wss', + port: 8083, + host: smResponse.serverAddress, + app: smResponse.scope.substr(1, smResponse.scope.length-1), + streamName: smResponse.name + } + let rtmpConfig = {...iC.rtmp, + host: smResponse.serverAddress, + streamName: smResponse.name, + app: smResponse.scope.substr(1, smResponse.scope.length-1) + } + const result = modifyInitConfigWithStreamManagerResponse(iC, smResponse, aC) + expect(result).toEqual({...iC, + rtc: rtcConfig, + rtmp: rtmpConfig + }) + }) + }) diff --git a/src/js/autoscale/index.js b/src/js/autoscale/index.js index 6274299..ddf4625 100644 --- a/src/js/autoscale/index.js +++ b/src/js/autoscale/index.js @@ -1,70 +1,12 @@ import req from './request.js' import { debug } from '../log' +import { + timeout, + asyncWrap, + modifyInitConfigWithStreamManagerResponse +} from './util' const NAME = 'Red5ProStreamManagerExt' -const isFailoverConfig = /(rtc|rtmp|hls)/ -const isRTC = /(wss|ws)/ -// const isRTMP = /(rtmps|rtmp)/ -// const isHLS = /(https|http)/ - -const timeout = (delay) => { - return new Promise(resolve => setTimeout(resolve, delay)) -} - -/** - * Modifies the intialization configuration used for publisher or subscriber. - * This configuration can vary based on target tech and the `useProxy` attribute of the autoscale configuration. - * - * @private - */ -const modifyInitConfigWithResponse = (config, response, autoscaleConfig) => { - let c - // WebRTC most likely will require `useProxy`. - // This is due to Origin and Edge IPs being returned from the Stream Manager API. - // Only Fully Qualified Domain Names can have an associated cert and WebRTC requires SSL. - if (autoscaleConfig.useProxy && isRTC.test(config.protocol)) { - // The structure of a "proxied" configuration is to pass `connectionParams` - // describing the endpoint (Origin/Edge) and requesting through the Stream Manager webapp. - const connectionParams = {...config.connectionParams, - host: response.serverAddress, - app: response.scope.substr(1, response.scope.length-1) - } - c = {...config, - protocol: config.protocol, - port: config.port, - streamName: response.name, - host: autoscaleConfig.host, - app: 'streammanager', - connectionParams: connectionParams - } - } else { - // If we don't need to proxy, then just inject the Stream Manager response attributes. - c = {...config, - host: response.serverAddress, - app: response.scope.substr(1, response.scope.length-1), - streamName: response.name - } - } - return c -} - -/** - * Nicely wraps an async in a promise so we can use in-line without try...catch. - * - * @private - */ -const asyncWrap = (p) => { - return new Promise(resolve => { - p.then(response => { - resolve(response) - }).catch(e => { - resolve({ - error: e.message, - message: e.response.errorMessage - }) - }) - }) -} /** * Allows for retry in requesting on the Stream Manager API. @@ -107,17 +49,9 @@ const autoscaleInit = async (proxy, autoscaleConfig, initConfig) => { try { response = await execute(autoscaleConfig, retryCount, retryLimit, retryDelay) - const keys = Object.keys(initConfig) - if (isFailoverConfig.test(keys.toString())) { - let key - for (key in initConfig) { - initConfig[key] = modifyInitConfigWithResponse(initConfig[key], response, autoscaleConfig) - } - } else { - initConfig = modifyInitConfigWithResponse(initConfig, response, autoscaleConfig) - } - debug(NAME, `[init-config]:: ${JSON.stringify(initConfig, null, 2)}`) - return proxy.init(initConfig) + const config = modifyInitConfigWithStreamManagerResponse(initConfig, response, autoscaleConfig) + debug(NAME, `[init-config]:: ${JSON.stringify(config, null, 2)}`) + return proxy.init(config) } catch (e) { throw e } diff --git a/src/js/autoscale/util.js b/src/js/autoscale/util.js new file mode 100644 index 0000000..89e81c3 --- /dev/null +++ b/src/js/autoscale/util.js @@ -0,0 +1,88 @@ +const isFailoverConfig = /(rtc|rtmp|hls)/ +const isRTC = /(wss|ws)/ +// const isRTMP = /(rtmps|rtmp)/ +// const isHLS = /(https|http)/ + +const assignConnectionParams = (config, response, autoscaleConfig) => { + let c + // WebRTC most likely will require `useProxy`. + // This is due to Origin and Edge IPs being returned from the Stream Manager API. + // Only Fully Qualified Domain Names can have an associated cert and WebRTC requires SSL. + if (autoscaleConfig.useProxy && isRTC.test(config.protocol)) { + // The structure of a "proxied" configuration is to pass `connectionParams` + // describing the endpoint (Origin/Edge) and requesting through the Stream Manager webapp. + const connectionParams = {...config.connectionParams, + host: response.serverAddress, + app: response.scope.substr(1, response.scope.length-1) + } + c = {...config, + protocol: config.protocol, + port: config.port, + streamName: response.name, + host: autoscaleConfig.host, + app: 'streammanager', + connectionParams: connectionParams + } + } else { + // If we don't need to proxy, then just inject the Stream Manager response attributes. + c = {...config, + host: response.serverAddress, + app: response.scope.substr(1, response.scope.length-1), + streamName: response.name + } + } + return c +} + +/** + * Modifies and returns new intialization configuration used for publisher or subscriber. + * This configuration can vary based on target tech and the `useProxy` attribute of the autoscale configuration. + * + * @param {Object} initConfig + * The initialization configuration to modify. + * @param {Object} respnose + * The response configuration from the Stream Manager. + * @param {Object} autoscaleConfig + * The original configuration used for accessing the Stream Manager API. + * @returns {Object} + */ +const modifyInitConfigWithStreamManagerResponse = (initConfig, response, autoscaleConfig) => { + let modifiedConfig = {} + const keys = Object.keys(initConfig) + if (isFailoverConfig.test(keys.toString())) { + let key + for (key in initConfig) { + if (initConfig.hasOwnProperty(key)) { + modifiedConfig[key] = assignConnectionParams(initConfig[key], response, autoscaleConfig) + } + } + } else { + modifiedConfig = assignConnectionParams(initConfig, response, autoscaleConfig) + } + return modifiedConfig +} + +/** + * Nicely wraps an async in a promise so we can use in-line without try...catch. + */ +const asyncWrap = (p) => { + return new Promise(resolve => { + p.then(response => { + resolve(response) + }).catch(e => { + resolve({ + error: e.message, + message: e.response.errorMessage + }) + }) + }) +} + +/** + * Promisified setTimeout. + */ +const timeout = (delay) => { + return new Promise(resolve => setTimeout(resolve, delay)) +} + +export { timeout, asyncWrap, modifyInitConfigWithStreamManagerResponse } From 5ca0aafa88a13a5470d96f02fe0d4cbac0d88d85 Mon Sep 17 00:00:00 2001 From: bustardcelly Date: Tue, 12 Jun 2018 16:47:04 -0400 Subject: [PATCH 12/15] new build. --- .../lib/red5pro/red5pro-ext-stream-manager.js | 236 ++++++++++-------- 1 file changed, 138 insertions(+), 98 deletions(-) diff --git a/examples/browser/lib/red5pro/red5pro-ext-stream-manager.js b/examples/browser/lib/red5pro/red5pro-ext-stream-manager.js index 4c0e939..f6b3ef1 100644 --- a/examples/browser/lib/red5pro/red5pro-ext-stream-manager.js +++ b/examples/browser/lib/red5pro/red5pro-ext-stream-manager.js @@ -4467,10 +4467,6 @@ var _stringify = __webpack_require__(/*! babel-runtime/core-js/json/stringify */ var _stringify2 = _interopRequireDefault(_stringify); -var _keys = __webpack_require__(/*! babel-runtime/core-js/object/keys */ "./node_modules/babel-runtime/core-js/object/keys.js"); - -var _keys2 = _interopRequireDefault(_keys); - var _regenerator = __webpack_require__(/*! babel-runtime/regenerator */ "./node_modules/babel-runtime/regenerator/index.js"); var _regenerator2 = _interopRequireDefault(_regenerator); @@ -4479,88 +4475,17 @@ var _asyncToGenerator2 = __webpack_require__(/*! babel-runtime/helpers/asyncToGe var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2); -var _extends2 = __webpack_require__(/*! babel-runtime/helpers/extends */ "./node_modules/babel-runtime/helpers/extends.js"); - -var _extends3 = _interopRequireDefault(_extends2); - -var _promise = __webpack_require__(/*! babel-runtime/core-js/promise */ "./node_modules/babel-runtime/core-js/promise.js"); - -var _promise2 = _interopRequireDefault(_promise); - var _request = __webpack_require__(/*! ./request.js */ "./src/js/autoscale/request.js"); var _request2 = _interopRequireDefault(_request); var _log = __webpack_require__(/*! ../log */ "./src/js/log/index.js"); +var _util = __webpack_require__(/*! ./util */ "./src/js/autoscale/util.js"); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var NAME = 'Red5ProStreamManagerExt'; -var isFailoverConfig = /(rtc|rtmp|hls)/; -var isRTC = /(wss|ws)/; -// const isRTMP = /(rtmps|rtmp)/ -// const isHLS = /(https|http)/ - -var timeout = function timeout(delay) { - return new _promise2.default(function (resolve) { - return setTimeout(resolve, delay); - }); -}; - -/** - * Modifies the intialization configuration used for publisher or subscriber. - * This configuration can vary based on target tech and the `useProxy` attribute of the autoscale configuration. - * - * @private - */ -var modifyInitConfigWithResponse = function modifyInitConfigWithResponse(config, response, autoscaleConfig) { - var c = void 0; - // WebRTC most likely will require `useProxy`. - // This is due to Origin and Edge IPs being returned from the Stream Manager API. - // Only Fully Qualified Domain Names can have an associated cert and WebRTC requires SSL. - if (autoscaleConfig.useProxy && isRTC.test(config.protocol)) { - // The structure of a "proxied" configuration is to pass `connectionParams` - // describing the endpoint (Origin/Edge) and requesting through the Stream Manager webapp. - var connectionParams = (0, _extends3.default)({}, config.connectionParams, { - host: response.serverAddress, - app: response.scope.substr(1, response.scope.length - 1) - }); - c = (0, _extends3.default)({}, config, { - protocol: config.protocol, - port: config.port, - streamName: response.name, - host: autoscaleConfig.host, - app: 'streammanager', - connectionParams: connectionParams - }); - } else { - // If we don't need to proxy, then just inject the Stream Manager response attributes. - c = (0, _extends3.default)({}, config, { - host: response.serverAddress, - app: response.scope.substr(1, response.scope.length - 1), - streamName: response.name - }); - } - return c; -}; - -/** - * Nicely wraps an async in a promise so we can use in-line without try...catch. - * - * @private - */ -var asyncWrap = function asyncWrap(p) { - return new _promise2.default(function (resolve) { - p.then(function (response) { - resolve(response); - }).catch(function (e) { - resolve({ - error: e.message, - message: e.response.errorMessage - }); - }); - }); -}; /** * Allows for retry in requesting on the Stream Manager API. @@ -4576,7 +4501,7 @@ var execute = function () { case 0: (0, _log.debug)(NAME, 'Attempting ' + (count + 1) + ' of ' + limit + ' with ' + delay + ' millisecond delay...'); _context.next = 3; - return asyncWrap((0, _request2.default)(config)); + return (0, _util.asyncWrap)((0, _request2.default)(config)); case 3: response = _context.sent; @@ -4594,11 +4519,11 @@ var execute = function () { (0, _log.debug)(NAME, 'Attempting ' + (count + 1) + ' of ' + limit + ' with ' + delay + ' millisecond delay...'); _context.next = 9; - return timeout(delay); + return (0, _util.timeout)(delay); case 9: _context.next = 11; - return asyncWrap((0, _request2.default)(config)); + return (0, _util.asyncWrap)((0, _request2.default)(config)); case 11: response = _context.sent; @@ -4648,7 +4573,7 @@ var execute = function () { */ var autoscaleInit = function () { var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(proxy, autoscaleConfig, initConfig) { - var retryCount, retryLimit, retryDelay, response, keys, key; + var retryCount, retryLimit, retryDelay, response, config; return _regenerator2.default.wrap(function _callee2$(_context2) { while (1) { switch (_context2.prev = _context2.next) { @@ -4662,31 +4587,22 @@ var autoscaleInit = function () { case 6: response = _context2.sent; - keys = (0, _keys2.default)(initConfig); - - if (isFailoverConfig.test(keys.toString())) { - key = void 0; + config = (0, _util.modifyInitConfigWithStreamManagerResponse)(initConfig, response, autoscaleConfig); - for (key in initConfig) { - initConfig[key] = modifyInitConfigWithResponse(initConfig[key], response, autoscaleConfig); - } - } else { - initConfig = modifyInitConfigWithResponse(initConfig, response, autoscaleConfig); - } - (0, _log.debug)(NAME, '[init-config]:: ' + (0, _stringify2.default)(initConfig, null, 2)); - return _context2.abrupt('return', proxy.init(initConfig)); + (0, _log.debug)(NAME, '[init-config]:: ' + (0, _stringify2.default)(config, null, 2)); + return _context2.abrupt('return', proxy.init(config)); - case 13: - _context2.prev = 13; + case 12: + _context2.prev = 12; _context2.t0 = _context2['catch'](3); throw _context2.t0; - case 16: + case 15: case 'end': return _context2.stop(); } } - }, _callee2, undefined, [[3, 13]]); + }, _callee2, undefined, [[3, 12]]); })); return function autoscaleInit(_x5, _x6, _x7) { @@ -4897,6 +4813,130 @@ exports.default = req; /***/ }), +/***/ "./src/js/autoscale/util.js": +/*!**********************************!*\ + !*** ./src/js/autoscale/util.js ***! + \**********************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.modifyInitConfigWithStreamManagerResponse = exports.asyncWrap = exports.timeout = undefined; + +var _promise = __webpack_require__(/*! babel-runtime/core-js/promise */ "./node_modules/babel-runtime/core-js/promise.js"); + +var _promise2 = _interopRequireDefault(_promise); + +var _keys = __webpack_require__(/*! babel-runtime/core-js/object/keys */ "./node_modules/babel-runtime/core-js/object/keys.js"); + +var _keys2 = _interopRequireDefault(_keys); + +var _extends2 = __webpack_require__(/*! babel-runtime/helpers/extends */ "./node_modules/babel-runtime/helpers/extends.js"); + +var _extends3 = _interopRequireDefault(_extends2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var isFailoverConfig = /(rtc|rtmp|hls)/; +var isRTC = /(wss|ws)/; +// const isRTMP = /(rtmps|rtmp)/ +// const isHLS = /(https|http)/ + +var assignConnectionParams = function assignConnectionParams(config, response, autoscaleConfig) { + var c = void 0; + // WebRTC most likely will require `useProxy`. + // This is due to Origin and Edge IPs being returned from the Stream Manager API. + // Only Fully Qualified Domain Names can have an associated cert and WebRTC requires SSL. + if (autoscaleConfig.useProxy && isRTC.test(config.protocol)) { + // The structure of a "proxied" configuration is to pass `connectionParams` + // describing the endpoint (Origin/Edge) and requesting through the Stream Manager webapp. + var connectionParams = (0, _extends3.default)({}, config.connectionParams, { + host: response.serverAddress, + app: response.scope.substr(1, response.scope.length - 1) + }); + c = (0, _extends3.default)({}, config, { + protocol: config.protocol, + port: config.port, + streamName: response.name, + host: autoscaleConfig.host, + app: 'streammanager', + connectionParams: connectionParams + }); + } else { + // If we don't need to proxy, then just inject the Stream Manager response attributes. + c = (0, _extends3.default)({}, config, { + host: response.serverAddress, + app: response.scope.substr(1, response.scope.length - 1), + streamName: response.name + }); + } + return c; +}; + +/** + * Modifies and returns new intialization configuration used for publisher or subscriber. + * This configuration can vary based on target tech and the `useProxy` attribute of the autoscale configuration. + * + * @param {Object} initConfig + * The initialization configuration to modify. + * @param {Object} respnose + * The response configuration from the Stream Manager. + * @param {Object} autoscaleConfig + * The original configuration used for accessing the Stream Manager API. + * @returns {Object} + */ +var modifyInitConfigWithStreamManagerResponse = function modifyInitConfigWithStreamManagerResponse(initConfig, response, autoscaleConfig) { + var modifiedConfig = {}; + var keys = (0, _keys2.default)(initConfig); + if (isFailoverConfig.test(keys.toString())) { + var key = void 0; + for (key in initConfig) { + if (initConfig.hasOwnProperty(key)) { + modifiedConfig[key] = assignConnectionParams(initConfig[key], response, autoscaleConfig); + } + } + } else { + modifiedConfig = assignConnectionParams(initConfig, response, autoscaleConfig); + } + return modifiedConfig; +}; + +/** + * Nicely wraps an async in a promise so we can use in-line without try...catch. + */ +var asyncWrap = function asyncWrap(p) { + return new _promise2.default(function (resolve) { + p.then(function (response) { + resolve(response); + }).catch(function (e) { + resolve({ + error: e.message, + message: e.response.errorMessage + }); + }); + }); +}; + +/** + * Promisified setTimeout. + */ +var timeout = function timeout(delay) { + return new _promise2.default(function (resolve) { + return setTimeout(resolve, delay); + }); +}; + +exports.timeout = timeout; +exports.asyncWrap = asyncWrap; +exports.modifyInitConfigWithStreamManagerResponse = modifyInitConfigWithStreamManagerResponse; + +/***/ }), + /***/ "./src/js/env/browser.js": /*!*******************************!*\ !*** ./src/js/env/browser.js ***! @@ -5299,4 +5339,4 @@ module.exports = __webpack_require__(/*! /Users/toddanderson/Documents/Workplace /******/ }); }); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9yZWQ1cHJvc2RrX2V4dF9zdHJlYW1fbWFuYWdlci93ZWJwYWNrL3VuaXZlcnNhbE1vZHVsZURlZmluaXRpb24iLCJ3ZWJwYWNrOi8vcmVkNXByb3Nka19leHRfc3RyZWFtX21hbmFnZXIvd2VicGFjay9ib290c3RyYXAiLCJ3ZWJwYWNrOi8vcmVkNXByb3Nka19leHRfc3RyZWFtX21hbmFnZXIvLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL2pzb24vc3RyaW5naWZ5LmpzIiwid2VicGFjazovL3JlZDVwcm9zZGtfZXh0X3N0cmVhbV9tYW5hZ2VyLy4vbm9kZV9tb2R1bGVzL2JhYmVsLXJ1bnRpbWUvY29yZS1qcy9vYmplY3QvYXNzaWduLmpzIiwid2VicGFjazovL3JlZDVwcm9zZGtfZXh0X3N0cmVhbV9tYW5hZ2VyLy4vbm9kZV9tb2R1bGVzL2JhYmVsLXJ1bnRpbWUvY29yZS1qcy9vYmplY3QvZGVmaW5lLXByb3BlcnR5LmpzIiwid2VicGFjazovL3JlZDVwcm9zZGtfZXh0X3N0cmVhbV9tYW5hZ2VyLy4vbm9kZV9tb2R1bGVzL2JhYmVsLXJ1bnRpbWUvY29yZS1qcy9vYmplY3Qva2V5cy5qcyIsIndlYnBhY2s6Ly9yZWQ1cHJvc2RrX2V4dF9zdHJlYW1fbWFuYWdlci8uL25vZGVfbW9kdWxlcy9iYWJlbC1ydW50aW1lL2NvcmUtanMvcHJvbWlzZS5qcyIsIndlYnBhY2s6Ly9yZWQ1cHJvc2RrX2V4dF9zdHJlYW1fbWFuYWdlci8uL25vZGVfbW9kdWxlcy9iYWJlbC1ydW50aW1lL2hlbHBlcnMvYXN5bmNUb0dlbmVyYXRvci5qcyIsIndlYnB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YW4nIHx8IHR5cGVvZiBvYmogPT09ICdudW1iZXInKSB7XG4gICAgICAgIHJldHVybiBvYmo7XG4gICAgfVxuICAgIHJldHVybiAnXFwnJyArIG9iai50b1N0cmluZygpICsgJ1xcJyc7XG59XG5cbmZ1bmN0aW9uIGZvcm1hdChmKSB7XG4gICAgdmFyIGFyZ3VtZW50cyQxID0gYXJndW1lbnRzO1xuXG4gICAgaWYgKHR5cGVvZiBmICE9PSAnc3RyaW5nJykge1xuICAgICAgICB2YXIgb2JqZWN0cyA9IG5ldyBBcnJheShhcmd1bWVudHMubGVuZ3RoKTtcbiAgICAgICAgZm9yICh2YXIgaSQxID0gMDtpJDEgPCBhcmd1bWVudHMubGVuZ3RoOyBpJDErKykge1xuICAgICAgICAgICAgb2JqZWN0c1tpJDFdID0gaW5zcGVjdChhcmd1bWVudHMkMVtpJDFdKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gb2JqZWN0cy5qb2luKCcgJyk7XG4gICAgfVxuICAgIHZhciBmb3JtYXRSZWdFeHAgPSAvJVtzZGolXS9nO1xuICAgIHZhciBpID0gMTtcbiAgICB2YXIgYXJncyA9IGFyZ3VtZW50cztcbiAgICB2YXIgbGVuID0gYXJncy5sZW5ndGg7XG4gICAgdmFyIHN0ciA9IFN0cmluZyhmKS5yZXBsYWNlKGZvcm1hdFJlZ0V4cCwgZnVuY3Rpb24gKHgpIHtcbiAgICAgICAgaWYgKHggPT09ICclJScpIHtcbiAgICAgICAgICAgIHJldHVybiAnJSc7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGkgPj0gbGVuKSB7XG4gICAgICAgICAgICByZXR1cm4geDtcbiAgICAgICAgfVxuICAgICAgICBzd2l0Y2ggKHgpIHtcbiAgICAgICAgICAgIGNhc2UgJyVzJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gU3RyaW5nKGFyZ3NbaSsrXSk7XG4gICAgICAgICAgICBjYXNlICclZCc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIE51bWJlcihhcmdzW2krK10pO1xuICAgICAgICAgICAgY2FzZSAnJWonOlxuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeShhcmdzW2krK10pO1xuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKF8pIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbQ2lyY3VsYXJdJztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgIHJldHVybiB4O1xuICAgICAgICB9XG4gICAgfSk7XG4gICAgZm9yICh2YXIgeCA9IGFyZ3NbaV07aSA8IGxlbjsgeCA9IGFyZ3NbKytpXSkge1xuICAgICAgICBzdHIgKz0gJyAnICsgeDtcbiAgICB9XG4gICAgcmV0dXJuIHN0cjtcbn1cblxuZnVuY3Rpb24gZXh0cmFjdFNyY0Zyb21TdGFja3RyYWNlKHN0YWNrLCBsZXZlbCkge1xuICAgIHZhciBzdGFja0xpbmVzID0gc3RhY2suc3BsaXQoJ1xcbicpO1xuICAgIGlmIChzdGFja0xpbmVzWzBdICYmIHN0YWNrTGluZXNbMF0uaW5kZXhPZihDQUxMX1NUQUNLX0VSUk9SKSA+PSAwKSB7XG4gICAgICAgIHN0YWNrTGluZXMuc2hpZnQoKTtcbiAgICB9XG4gICAgdmFyIHRhcmdldExpbmUgPSBzdGFja0xpbmVzW2xldmVsXTtcbiAgICB2YXIgbGluZUluZm8gPSBudWxsO1xuICAgIGlmICh0YXJnZXRMaW5lKSB7XG4gICAgICAgIHZhciBleGVjUmVzdWx0ID0gL15cXHMqKGF0fC4qQClcXHMqKC4rKT8kLy5leGVjKHRhcmdldExpbmUpO1xuICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShleGVjUmVzdWx0KSAmJiBleGVjUmVzdWx0WzJdKSB7XG4gICAgICAgICAgICBsaW5lSW5mbyA9IGV4ZWNSZXN1bHRbMl07XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBsaW5lSW5mbyA9IHRhcmdldExpbmU7XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIGxpbmVJbmZvO1xufVxuXG5mdW5jdGlvbiBfaW5kZW50KHMsIGluZGVudCkge1xuICAgIGlmICghaW5kZW50KSB7XG4gICAgICAgIGluZGVudCA9ICcgICAgJztcbiAgICB9XG4gICAgdmFyIGxpbmVzID0gcy5zcGxpdCgvXFxyP1xcbi9nKTtcbiAgICByZXR1cm4gaW5kZW50ICsgbGluZXMuam9pbignXFxuJyArIGluZGVudCk7XG59XG5cbnZhciBfd2FybmVkID0ge307XG5mdW5jdGlvbiBfd2Fybihtc2csIGRlZHVwS2V5KSB7XG4gICAgaWYgKGRlZHVwS2V5KSB7XG4gICAgICAgIGlmIChfd2FybmVkW2RlZHVwS2V5XSkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIF93YXJuZWRbZGVkdXBLZXldID0gdHJ1ZTtcbiAgICB9XG4gICAgY29uc29sZS5lcnJvcihtc2cgKyAnXFxuJyk7XG59XG5cbmZ1bmN0aW9uIF9oYXZlV2FybmVkKGRlZHVwS2V5KSB7XG4gICAgcmV0dXJuIF93YXJuZWRbZGVkdXBLZXldO1xufVxuXG5mdW5jdGlvbiBzYWZlQ3ljbGVzKCkge1xuICAgIHZhciBzZWVuID0gW107XG4gICAgcmV0dXJuIGZ1bmN0aW9uIChrZXksIHZhbCkge1xuICAgICAgICBpZiAoIXZhbCB8fCB0eXBlb2YgdmFsICE9PSAnb2JqZWN0Jykge1xuICAgICAgICAgICAgcmV0dXJuIHZhbDtcbiAgICAgICAgfVxuICAgICAgICBpZiAoc2Vlbi5pbmRleE9mKHZhbCkgIT09IC0xKSB7XG4gICAgICAgICAgICByZXR1cm4gJ1tDaXJjdWxhcl0nO1xuICAgICAgICB9XG4gICAgICAgIHNlZW4ucHVzaCh2YWwpO1xuICAgICAgICByZXR1cm4gdmFs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GRzKTtcbiAgICAgICAgZm9yIChpID0gMDsgaSA8IHBhcmVudEZpZWxkTmFtZXMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIG5hbWUgPSBwYXJlbnRGaWVsZE5hbWVzW2ldO1xuICAgICAgICAgICAgZmllbGRzW25hbWVdID0gcGFyZW50LmZpZWxkc1tuYW1lXTtcbiAgICAgICAgfVxuICAgICAgICB2YXIgbmFtZXMgPSBPYmplY3Qua2V5cyhvcHRpb25zKTtcbiAgICAgICAgZm9yIChpID0gMDsgaSA8IG5hbWVzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICBuYW1lID0gbmFtZXNbaV07XG4gICAgICAgICAgICBmaWVsZHNbbmFtZV0gPSBvcHRpb25zW25hbWVdO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybjtcbiAgICB9XG4gICAgaWYgKHBhcmVudCkge1xuICAgICAgICB0aGlzLl9sZXZlbCA9IHBhcmVudC5fbGV2ZWw7XG4gICAgICAgIHRoaXMuc3RyZWFtcyA9IFtdO1xuICAgICAgICBmb3IgKGkgPSAwOyBpIDwgcGFyZW50LnN0cmVhbXMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIHZhciBzID0gb2JqQ29weShwYXJlbnQuc3RyZWFtc1tpXSk7XG4gICAgICAgICAgICB0aGlzJDEuc3RyZWFtcy5wdXNoKHMpO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMuc2VyaWFsaXplcnMgPSBvYmpDb3B5KHBhcmVudC5zZXJpYWxpemVycyk7XG4gICAgICAgIHRoaXMuc3JjID0gcGFyZW50LnNyYztcbiAgICAgICAgdGhpcy5maWVsZHMgPSBvYmpDb3B5KHBhcmVudC5maWVsZHMpO1xuICAgICAgICBpZiAob3B0aW9ucy5sZXZlbCkge1xuICAgICAgICAgICAgdGhpcy5sZXZlbChvcHRpb25zLmxldmVsKTtcbiAgICAgICAgfVxuICAgIH0gZWxzZSB7XG4gICAgICAgIHRoaXMuX2xldmVsID0gTnVtYmVyLlBPU0lUSVZFX0lORklOSVRZO1xuICAgICAgICB0aGlzLnN0cmVhbXMgPSBbXTtcbiAgICAgICAgdGhpcy5zZXJpYWxpemVycyA9IG51bGw7XG4gICAgICAgIHRoaXMuc3JjID0gZmFsc2U7XG4gICAgICAgIHRoaXMuZmllbGRzID0ge307XG4gICAgfVxuICAgIGlmIChvcHRpb25zLnN0cmVhbSkge1xuICAgICAgICB0aGlzLmFkZFN0cmVhbSh7XG4gICAgICAgICAgICB0eXBlOiAnc3RyZWFtJyxcbiAgICAgICAgICAgIHN0cmVhbTogb3B0aW9ucy5zdHJlYW0sXG4gICAgICAgICAgICBsZXZlbDogb3B0aW9ucy5sZXZlbFxuICAgICAgICB9KTtcbiAgICB9IGVsc2UgaWYgKG9wdGlvbnMuc3RyZWFtcykge1xuICAgICAgICBvcHRpb25zLnN0cmVhbXMuZm9yRWFjaChmdW5jdGlvbiAocykge1xuICAgICAgICAgICAgdGhpcyQxLmFkZFN0cmVhbShzLCBvcHRpb25zLmxldmVsKTtcbiAgICAgICAgfSk7XG4gICAgfSBlbHNlIGlmIChwYXJlbnQgJiYgb3B0aW9ucy5sZXZlbCkge1xuICAgICAgICB0aGlzLmxldmVsKG9wdGlvbnMubGV2ZWwpO1xuICAgIH0gZWxzZSBpZiAoIXBhcmVudCkge1xuICAgICAgICB0aGlzLmFkZFN0cmVhbSh7XG4gICAgICAgICAgICB0eXBlOiAncmF3JyxcbiAgICAgICAgICAgIHN0cmVhbTogbmV3IENvbnNvbGVSYXdTdHJlYW0oKSxcbiAgICAgICAgICAgIGxldmVsOiBvcHRpb25zLmxldmVsXG4gICAgICAgIH0pO1xuICAgIH1cbiAgICBpZiAob3B0aW9ucy5zZXJpYWxpemVycykge1xuICAgICAgICB0aGlzLmFkZFNlcmlhbGl6ZXJzKG9wdGlvbnMuc2VyaWFsaXplcnMpO1xuICAgIH1cbiAgICBpZiAob3B0aW9ucy5zcmMpIHtcbiAgICAgICAgdGhpcy5zcmMg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ICAgICAgICBmaWVsZHMgPSB7XG4gICAgICAgICAgICAgICAgICAgIGVycjogbG9nLnNlcmlhbGl6ZXJzICYmIGxvZy5zZXJpYWxpemVycy5lcnIgPyBsb2cuc2VyaWFsaXplcnMuZXJyKGFyZ3NbMF0pIDogc3RkU2VyaWFsaXplcnMuZXJyKGFyZ3NbMF0pXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICBleGNsdWRlRmllbGRzID0ge1xuICAgICAgICAgICAgICAgICAgICBlcnI6IHRydWVcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIGlmIChhcmdzLmxlbmd0aCA9PT0gMSkge1xuICAgICAgICAgICAgICAgICAgICBtc2dBcmdzID0gW2ZpZWxkcy5lcnIubWVzc2FnZV07XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgbXNnQXJncyA9IEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKGFyZ3MsIDEpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIGFyZ3NbMF0gIT09ICdvYmplY3QnICYmIGFyZ3NbMF0gIT09IG51bGwgfHwgQXJyYXkuaXNBcnJheShhcmdzWzBdKSkge1xuICAgICAgICAgICAgICAgIGZpZWxkcyA9IG51bGw7XG4gICAgICAgICAgICAgICAgbXNnQXJncyA9IEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKGFyZ3MpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBmaWVsZHMgPSBhcmdzWzBdO1xuICAgICAgICAgICAgICAgIGlmIChhcmdzLmxlbmd0aCA9PT0gMSAmJiBmaWVsZHMuZXJyICYmIGZpZWxkcy5lcnIgaW5zdGFuY2VvZiBFcnJvcikge1xuICAgICAgICAgICAgICAgICAgICBtc2dBcmdzID0gW2ZpZWxkcy5lcnIubWVzc2FnZV07XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgbXNnQXJncyA9IEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKGFyZ3MsIDEpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciByZWMgPSBvYmpDb3B5KGxvZy5maWVsZHMpO1xuICAgICAgICAgICAgcmVjLmxldmVsID0gbWluTGV2ZWw7XG4gICAgICAgICAgICB2YXIgcmVjRmllbGRzID0gZmllbGRzID8gb2JqQ29weShmaWVsZHMpIDogbnVsbDtcbiAgICAgICAgICAgIGlmIChyZWNGaWVsZHMpIHtcbiAgICAgICAgICAgICAgICBpZiAobG9nLnNlcmlhbGl6ZXJzKSB7XG4gICAgICAgICAgICAgICAgICAgIGxvZy5fYXBwbHlTZXJpYWxpemVycyhyZWNGaWVsZHMsIGV4Y2x1ZGVGaWVsZHMpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBPYmplY3Qua2V5cyhyZWNGaWVsZHMpLmZvckVhY2goZnVuY3Rpb24gKGspIHtcbiAgICAgICAgICAgICAgICAgICAgcmVjW2tdID0gcmVjRmllbGRzW2tdO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVjLmxldmVsTmFtZSA9IG5hbWVGcm9tTGV2ZWxbbWluTGV2ZWxdO1xuICAgICAgICAgICAgcmVjLm1zZyA9IG1zZ0FyZ3MubGVuZ3RoID8gZm9ybWF0LmFwcGx5KGxvZywgbXNnQXJncykgOiAnJztcbiAgICAgICAgICAgIGlmICghcmVjLnRpbWUpIHtcbiAgICAgICAgICAgICAgICByZWMudGltZSA9IG5ldyBEYXRlKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAobG9nLnNyYyAmJiAhcmVjLnNyYykge1xuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihDQUxMX1NUQUNLX0VSUk9SKTtcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHNyYyA9IGV4dHJhY3RTcmNGcm9tU3RhY2t0cmFjZShlcnIuc3RhY2ssIDIpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIXNyYyAmJiAhX2hhdmVXYXJuZWQoJ3NyYycpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBfd2FybignVW5hYmxlIHRvIGRldGVybWluZSBzcmMgbGluZSBpbmZvJywgJ3NyYycpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJlYy5zcmMgPSBzcmMgfHwgJyc7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVjLnYgPSBMT0dfVkVSU0lPTjtcbiAgICAgICAgICAgIHJldHVybiByZWM7XG4gICAgICAgIH1cbiAgICAgICAgXG4gICAgICAgIHZhciBmaWVsZHMgPSBudWxsO1xuICAgICAgICB2YXIgbXNnQXJncyA9IGFyZ3VtZW50cztcbiAgICAgICAgdmFyIHJlYyA9IG51bGw7XG4gICAgICAgIGlmIChhcmd1bWVudHMubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5fbGV2ZWwgPD0gbWluTGV2ZWw7XG4gICAgICAgIH0gZWxzZSBpZiAodGhpcy5fbGV2ZWwgPiBtaW5MZXZlbCkge30gZWxzZSB7XG4gICAgICAgICAgICByZWMgPSBta1JlY29yZChtc2dBcmdzKTtcbiAgICAgICAgICAgIHRoaXMuX2VtaXQocmVjKTtcbiAgICAgICAgfVxuICAgIH07XG59XG5cbkxvZ2dlci5wcm90b3R5cGUudHJhY2UgPSBta0xvZ0VtaXR0ZXIoVFJBQ0UpO1xuTG9nZ2VyLnByb3RvdHlwZS5kZWJ1ZyA9IG1rTG9nRW1pdHRlcihERUJVRyk7XG5Mb2dnZXIucHJvd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2F0aW9uLlxuICAgICAgICAgIHN0YXRlID0gY29udGV4dC5kb25lXG4gICAgICAgICAgICA/IEdlblN0YXRlQ29tcGxldGVkXG4gICAgICAgICAgICA6IEdlblN0YXRlU3VzcGVuZGVkWWllbGQ7XG5cbiAgICAgICAgICBpZiAocmVjb3JkLmFyZyA9PT0gQ29udGludWVTZW50aW5lbCkge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHZhbHVlOiByZWNvcmQuYXJnLFxuICAgICAgICAgICAgZG9uZTogY29udGV4dC5kb25lXG4gICAgICAgICAgfTtcblxuICAgICAgICB9IGVsc2UgaWYgKHJlY29yZC50eXBlID09PSBcInRocm93XCIpIHtcbiAgICAgICAgICBzdGF0ZSA9IEdlblN0YXRlQ29tcGxldGVkO1xuICAgICAgICAgIC8vIERpc3BhdGNoIHRoZSBleGNlcHRpb24gYnkgbG9vcGluZyBiYWNrIGFyb3VuZCB0byB0aGVcbiAgICAgICAgICAvLyBjb250ZXh0LmRpc3BhdGNoRXhjZXB0aW9uKGNvbnRleHQuYXJnKSBjYWxsIGFib3ZlLlxuICAgICAgICAgIGNvbnRleHQubWV0aG9kID0gXCJ0aHJvd1wiO1xuICAgICAgICAgIGNvbnRleHQuYXJnID0gcmVjb3JkLmFyZztcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH07XG4gIH1cblxuICAvLyBDYWxsIGRlbGVnYXRlLml0ZXJhdG9yW2NvbnRleHQubWV0aG9kXShjb250ZXh0LmFyZykgYW5kIGhhbmRsZSB0aGVcbiAgLy8gcmVzdWx0LCBlaXRoZXIgYnkgcmV0dXJuaW5nIGEgeyB2YWx1ZSwgZG9uZSB9IHJlc3VsdCBmcm9tIHRoZVxuICAvLyBkZWxlZ2F0ZSBpdGVyYXRvciwgb3IgYnkgbW9kaWZ5aW5nIGNvbnRleHQubWV0aG9kIGFuZCBjb250ZXh0LmFyZyxcbiAgLy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BibG9jayBoYW5kbGUgdGhlIGV4Y2VwdGlvbiBub3JtYWxseS5cbiAgICAgICAgICBjb250ZXh0Lm1ldGhvZCA9IFwibmV4dFwiO1xuICAgICAgICAgIGNvbnRleHQuYXJnID0gdW5kZWZpbmVkO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuICEhIGNhdWdodDtcbiAgICAgIH1cblxuICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG4gICAgICAgIHZhciByZWNvcmQgPSBlbnRyeS5jb21wbGV0aW9uO1xuXG4gICAgICAgIGlmIChlbnRyeS50cnlMb2MgPT09IFwicm9vdFwiKSB7XG4gICAgICAgICAgLy8gRXhjZXB0aW9uIHRocm93biBvdXRzaWRlIG9mIGFueSB0cnkgYmxvY2sgdGhhdCBjb3VsZCBoYW5kbGVcbiAgICAgICAgICAvLyBpdCwgc28gc2V0IHRoZSBjb21wbGV0aW9uIHZhbHVlIG9mIHRoZSBlbnRpcmUgZnVuY3Rpb24gdG9cbiAgICAgICAgICAvLyB0aHJvdyB0aGUgZXhjZXB0aW9uLlxuICAgICAgICAgIHJldHVybiBoYW5kbGUoXCJlbmRcIik7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoZW50cnkudHJ5TG9jIDw9IHRoaXMucHJldikge1xuICAgICAgICAgIHZhciBoYXNDYXRjaCA9IGhhc093bi5jYWxsKGVudHJ5LCBcImNhdGNoTG9jXCIpO1xuICAgICAgICAgIHZhciBoYXNGaW5hbGx5ID0gaGFzT3duLmNhbGwoZW50cnksIFwiZmluYWxseUxvY1wiKTtcblxuICAgICAgICAgIGlmIChoYXNDYXRjaCAmJiBoYXNGaW5hbGx5KSB7XG4gICAgICAgICAgICBpZiAodGhpcy5wcmV2IDwgZW50cnkuY2F0Y2hMb2MpIHtcbiAgICAgICAgICAgICAg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5wcmV2IDwgZW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAgIHZhciBmaW5hbGx5RW50cnkgPSBlbnRyeTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBpZiAoZmluYWxseUVudHJ5ICYmXG4gICAgICAgICAgKHR5cGUgPT09IFwiYnJlYWtcIiB8fFxuICAgICAgICAgICB0eXBlID09PSBcImNvbnRpbnVlXCIpICYmXG4gICAgICAgICAgZmluYWxseUVudHJ5LnRyeUxvYyA8PSBhcmcgJiZcbiAgICAgICAgICBhcmcgPD0gZmluYWxseUVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgLy8gSWdub3JlIHRoZSBmaW5hbGx5IGVudHJ5IGlmIGNvbnRyb2wgaXMgbm90IGp1bXBpbmcgdG8gYVxuICAgICAgICAvLyBsb2NhdGlvbiBvdXRzaWRlIHRoZSB0cnkvY2F0Y2ggYmxvY2suXG4gICAgICAgIGZpbmFsbHlFbnRyeSA9IG51bGw7XG4gICAgICB9XG5cbiAgICAgIHZhciByZWNvcmQgPSBmaW5hbGx5RW50cnkgPyBmaW5hbGx5RW50cnkuY29tcGxldGlvbiA6IHt9O1xuICAgICAgcmVjb3JkLnR5cGUgPSB0eXBlO1xuICAgICAgcmVjb3JkLmFyZyA9IGFyZztcblxuICAgICAgaWYgKGZpbmFsbHlFbnRyeSkge1xuICAgICAgICB0aGlzLm1ldGhvZCA9IFwibmV4dFwiO1xuICAgICAgICB0aGlzLm5leHQgPSBmaW5hbGx5RW50cnkuZmluYWxseUxvYztcbiAgICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiB0aGlzLmNvbXBsZXRlKHJlY29yZCk7XG4gICAgfSxcblxuICAgIGNvbXBsZXRlOiBmdW5jdGlvbihyZWNvcmQsIGFmdGVyTG9jKSB7XG4gICAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwidGhyb3dcIikge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yBzZGsuXG4gKiAgICAgICAgIHNtX2V4dC5kZWNvcmF0ZSgpO1xuICogXG4gKiAgICAgICAgIHZhciBydGNQdWJsaXNoZXIgPSBuZXcgcmVkNXByb3Nkay5SVENQdWJsaXNoZXIoKTtcbiAqICAgICAgICAgdmFyIHJ0Y1N1YnNjcmliZXIgPSBuZXcgcmVkNXByb3Nkay5SVENTdWJzY3JpYmVyKCk7XG4gKiBcbiAqICAgICAgICAgdmFyIGF1dG9zY2FsZUNvbmZpZyA9IHtcbiAqICAgICAgICAgICBwcm90b2NvbDogJ2h0dHBzJyxcbiAqICAgICAgICAgICBob3N0OiAnc3RyZWFtbWFuYWdlci5jb21wYW55Lm9yZycsXG4gKiAgICAgICAgICAgc3RyZWFtTmFtZTogJ215c3RyZWFtJyxcbiAqICAgICAgICAgICBzY29wZTogJ2xpdmUnLFxuICogICAgICAgICAgIGFwaVZlcnNpb246ICczLjAnLFxuICogICAgICAgICAgIHVzZVByb3h5OiB0cnVlXG4gKiAgICAgICAgIH07XG4gKiBcbiAqICAgICAgICAgdmFyIGluaXRDb25maWcgPSB7XG4gKiAgICAgICAgICAgcHJvdG9jb2w6ICd3c3MnLFxuICogICAgICAgICAgIGhvc3Q6ICdzdHJlYW1tYW5hZ2VyLmNvbXBhbnkub3JnJyxcbiAqICAgICAgICAgICBwb3J0OiA4MDgzOixcbiAqICAgICAgICAgICBhcHA6ICdsaXZlJyxcbiAqICAgICAgICAgICBzdHJlYW1OYW1lOiAnbXlzdHJlYW0nLFxuICogICAgICAgICAgIGljZVNlcnZlcnM6IFt7dXJsczogJ3N0dW46c3R1bjIubC5nb29nbGUuY29tOjE5MzAyJ31dXG4gKiAgICAgICAgIH07XG4gKiBcbiAqICAgICAgICAgdmFyIHB1Ymxpc2hBdXRvc2NhbGVDb25maWcgPSBPYmplY3QuYXNzaWduKHt9LCBhdXRvc2NhbGVDb25maWcsIHtcbiAqICAgICAgICAgICBhY3Rpb246ICdicm9hZGNhc3QnXG4gKiAgICAg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4gICAgfSBlbHNlIHtcbiAgICAgICAgcmV0dXJuIG9iajtcbiAgICB9XG59XG5cbmZ1bmN0aW9uIGluc3BlY3Qob2JqKSB7XG4gICAgaWYgKHR5cGVvZiBvYmogPT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgIHJldHVybiAndW5kZWZpbmVkJztcbiAgICB9XG4gICAgaWYgKG9iaiA9PT0gbnVsbCkge1xuICAgICAgICByZXR1cm4gJ251bGwnO1xuICAgIH1cbiAgICBpZiAoQXJyYXkuaXNBcnJheShvYmopKSB7XG4gICAgICAgIHZhciBpdGVtcyA9IG9iai5tYXAoZnVuY3Rpb24gKG9iaikgeyByZXR1cm4gaW5zcGVjdChvYmopOyB9KTtcbiAgICAgICAgcmV0dXJuICdbICcgKyBpdGVtcy5qb2luKCcsICcpICsgJyBdJztcbiAgICB9XG4gICAgaWYgKHR5cGVvZiBvYmogPT09ICdvYmplY3QnKSB7XG4gICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeShvYmopO1xuICAgIH1cbiAgICBpZiAodHlwZW9mIG9iaiA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICByZXR1cm4gJ1tGdW5jdGlvbjogJyArIG9iai5uYW1lICsgJ10nO1xuICAgIH1cbiAgICBpZiAodHlwZW9mIG9iaiA9PT0gJ2Jvb2xlYW4nIHx8IHR5cGVvZiBvYmogPT09ICdudW1iZXInKSB7XG4gICAgICAgIHJldHVybiBvYmo7XG4gICAgfVxuICAgIHJldHVybiAnXFwnJyArIG9iai50b1N0cmluZygpICsgJ1xcJyc7XG59XG5cbmZ1bmN0aW9uIGZvcm1hdChmKSB7XG4gICAgdmFyIGFyZ3VtZW50cyQxID0gYXJndW1lbnRzO1xuXG4gICAgaWYgKHR5cGVvZiBmICE9PSAnc3RyaW5nJykge1xuICAgICAgICB2YXIgb2JqZWN0cyA9IG5ldyBBcnJheShhcmd1bWVudHMubGVuZ3RoKTtcbiAgICAgICAgZm9yICh2YXIgaSQxID0gMDtpJDEgPCBhcmd1bWVudHMubGVuZ3RoOyBpJDErKykge1xuICAgICAgICAgICAgb2JqZWN0c1tpJDFdID0gaW5zcGVjdChhcmd1bWVudHMkMVtpJDFdKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gb2JqZWN0cy5qb2luKCcgJyk7XG4gICAgfVxuICAgIHZhciBmb3JtYXRSZWdFeHAgPSAvJVtzZGolXS9nO1xuICAgIHZhciBpID0gMTtcbiAgICB2YXIgYXJncyA9IGFyZ3VtZW50cztcbiAgICB2YXIgbGVuID0gYXJncy5sZW5ndGg7XG4gICAgdmFyIHN0ciA9IFN0cmluZyhmKS5yZXBsYWNlKGZvcm1hdFJlZ0V4cCwgZnVuY3Rpb24gKHgpIHtcbiAgICAgICAgaWYgKHggPT09ICclJScpIHtcbiAgICAgICAgICAgIHJldHVybiAnJSc7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGkgPj0gbGVuKSB7XG4gICAgICAgICAgICByZXR1cm4geDtcbiAgICAgICAgfVxuICAgICAgICBzd2l0Y2ggKHgpIHtcbiAgICAgICAgICAgIGNhc2UgJyVzJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gU3RyaW5nKGFyZ3NbaSsrXSk7XG4gICAgICAgICAgICBjYXNlICclZCc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIE51bWJlcihhcmdzW2krK10pO1xuICAgICAgICAgICAgY2FzZSAnJWonOlxuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeShhcmdzW2krK10pO1xuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKF8pIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbQ2lyY3VsYXJdJztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgIHJldHVybiB4O1xuICAgICAgICB9XG4gICAgfSk7XG4gICAgZm9yICh2YXIgeCA9IGFy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G4gICAgICAgICAgICBmaWVsZHNbbmFtZV0gPSBvcHRpb25zW25hbWVdO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybjtcbiAgICB9XG4gICAgaWYgKHBhcmVudCkge1xuICAgICAgICB0aGlzLl9sZXZlbCA9IHBhcmVudC5fbGV2ZWw7XG4gICAgICAgIHRoaXMuc3RyZWFtcyA9IFtdO1xuICAgICAgICBmb3IgKGkgPSAwOyBpIDwgcGFyZW50LnN0cmVhbXMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIHZhciBzID0gb2JqQ29weShwYXJlbnQuc3RyZWFtc1tpXSk7XG4gICAgICAgICAgICB0aGlzJDEuc3RyZWFtcy5wdXNoKHMpO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMuc2VyaWFsaXplcnMgPSBvYmpDb3B5KHBhcmVudC5zZXJpYWxpemVycyk7XG4gICAgICAgIHRoaXMuc3JjID0gcGFyZW50LnNyYztcbiAgICAgICAgdGhpcy5maWVsZHMgPSBvYmpDb3B5KHBhcmVudC5maWVsZHMpO1xuICAgICAgICBpZiAob3B0aW9ucy5sZXZlbCkge1xuICAgICAgICAgICAgdGhpcy5sZXZlbChvcHRpb25zLmxldmVsKTtcbiAgICAgICAgfVxuICAgIH0gZWxzZSB7XG4gICAgICAgIHRoaXMuX2xldmVsID0gTnVtYmVyLlBPU0lUSVZFX0lORklOSVRZO1xuICAgICAgICB0aGlzLnN0cmVhbXMgPSBbXTtcbiAgICAgICAgdGhpcy5zZXJpYWxpemVycyA9IG51bGw7XG4gICAgICAgIHRoaXMuc3JjID0gZmFsc2U7XG4gICAgICAgIHRoaXMuZmllbGRzID0ge307XG4gICAgfVxuICAgIGlmIChvcHRpb25zLnN0cmVhbSkge1xuICAgICAgICB0aGlzLmFkZFN0cmVhbSh7XG4gICAgICAgICAgICB0eXBlOiAnc3RyZWFtJyxcbiAgICAgICAgICAgIHN0cmVhbTogb3B0aW9ucy5zdHJlYW0sXG4gICAgICAgICAgICBsZXZl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aW4gSlNPTi5zdHJpbmdpZnkocmVjKTogJWouIFNlZSBzdGRlcnIgZm9yIGRldGFpbHMuKVxcbicsIGUubWVzc2FnZSk7XG4gICAgICAgIH1cbiAgICB9XG4gICAgaWYgKG5vZW1pdCkge1xuICAgICAgICByZXR1cm4gc3RyO1xuICAgIH1cbiAgICB2YXIgbGV2ZWwgPSByZWMubGV2ZWw7XG4gICAgZm9yIChpID0gMDsgaSA8IHRoaXMuc3RyZWFtcy5sZW5ndGg7IGkrKykge1xuICAgICAgICB2YXIgcyA9IHRoaXMkMS5zdHJlYW1zW2ldO1xuICAgICAgICBpZiAocy5sZXZlbCA8PSBsZXZlbCkge1xuICAgICAgICAgICAgcy5zdHJlYW0ud3JpdGUocmVjKTtcbiAgICAgICAgfVxuICAgIH1cbiAgICByZXR1cm4gc3RyO1xufTtcbmZ1bmN0aW9uIG1rTG9nRW1pdHRlcihtaW5MZXZlbCkge1xuICAgIHJldHVybiBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHZhciBsb2cgPSB0aGlzO1xuICAgICAgICBmdW5jdGlvbiBta1JlY29yZChhcmdzKSB7XG4gICAgICAgICAgICB2YXIgZXhjbHVkZUZpZWxkcztcbiAgICAgICAgICAgIGlmIChhcmdzWzBdIGluc3RhbmNlb2YgRXJyb3IpIHtcbiAgICAgICAgICAgICAgICBmaWVsZHMgPSB7XG4gICAgICAgICAgICAgICAgICAgIGVycjogbG9nLnNlcmlhbGl6ZXJzICYmIGxvZy5zZXJpYWxpemVycy5lcnIgPyBsb2cuc2VyaWFsaXplcnMuZXJyKGFyZ3NbMF0pIDogc3RkU2VyaWFsaXplcnMuZXJyKGFyZ3NbMF0pXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICBleGNsdWRlRmllbGRzID0ge1xuICAgICAgICAgICAgICAgICAgICBlcnI6IHRydWVcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIGlmIChhcmdzLmxlbmd0aCA9PT0gMSkge1xuICAgICAgICAgICAgICAgICAgICBtc2dBcmdzID0gW2ZpZWxkcy5lcnIubWVzc2FnZV07XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgbXNnQXJncyA9IEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKGFyZ3MsIDEpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIGFyZ3NbMF0gIT09ICdvYmplY3QnICYmIGFyZ3NbMF0gIT09IG51bGwgfHwgQXJyYXkuaXNBcnJheShhcmdzWzBdKSkge1xuICAgICAgICAgICAgICAgIGZpZWxkcyA9IG51bGw7XG4gICAgICAgICAgICAgICAgbXNnQXJncyA9IEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKGFyZ3MpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBmaWVsZHMgPSBhcmdzWzBdO1xuICAgICAgICAgICAgICAgIGlmIChhcmdzLmxlbmd0aCA9PT0gMSAmJiBmaWVsZHMuZXJyICYmIGZpZWxkcy5lcnIgaW5zdGFuY2VvZiBFcnJvcikge1xuICAgICAgICAgICAgICAgICAgICBtc2dBcmdzID0gW2ZpZWxkcy5lcnIubWVzc2FnZV07XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgbXNnQXJncyA9IEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKGFyZ3MsIDEpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciByZWMgPSBvYmpDb3B5KGxvZy5maWVsZHMpO1xuICAgICAgICAgICAgcmVjLmxldmVsID0gbWluTGV2ZWw7XG4gICAgICAgICAgICB2YXIgcmVjRmllbGRzID0gZmllbGRzID8gb2JqQ29weShmaWVsZHMpIDogbnVsbDtcbiAgICAgICAgICAgIGlmIChyZWNGaWVsZHMpIHtcbiAgICAgICAgICAgICAgICBpZiAobG9nLnNlcmlhbGl6ZXJzKSB7XG4gICAgICAgICAgICAgICAgICAgIGxvZy5fYXBwbHlTZXJpYWxpemVycyhyZWNGaWVsZHMsIGV4Y2x1ZGVGaWVsZHMpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBPYmplY3Qua2V5cyhyZWNGaWVsZHMpLmZvckVhY2goZnVuY3Rpb24gKGspIHtcbiAgICAgICAgICAgICAgICAgICAgcmVjW2tdID0gcmVjRmllbGRzW2tdO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVjLmxldmVsTmFtZSA9IG5hbWVGcm9tTGV2ZWxbbWluTGV2ZWxdO1xuICAgICAgICAgICAgcmVjLm1zZyA9IG1zZ0FyZ3MubGVuZ3RoID8gZm9ybWF0LmFwcGx5KGxvZywgbXNnQXJncykgOiAnJztcbiAgICAgICAgICAgIGlmICghcmVjLnRpbWUpIHtcbiAgICAgICAgICAgICAgICByZWMudGltZSA9IG5ldyBEYXRlKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAobG9nLnNyYyAmJiAhcmVjLnNyYykge1xuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihDQUxMX1NUQUNLX0VSUk9SKTtcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHNyYyA9IGV4dHJhY3RTcmNGcm9tU3RhY2t0cmFjZShlcnIuc3RhY2ssIDIpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIXNyYyAmJiAhX2hhdmVXYXJuZWQoJ3NyYycpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBfd2FybignVW5hYmxlIHRvIGRldGVybWluZSBzcmMgbGluZSBpbmZvJywgJ3NyYycpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAg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ZW5TdGF0ZVN1c3BlbmRlZFN0YXJ0KSB7XG4gICAgICAgICAgICBzdGF0ZSA9IEdlblN0YXRlQ29tcGxldGVkO1xuICAgICAgICAgICAgdGhyb3cgY29udGV4dC5hcmc7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgY29udGV4dC5kaXNwYXRjaEV4Y2VwdGlvbihjb250ZXh0LmFyZyk7XG5cbiAgICAgICAgfSBlbHNlIGlmIChjb250ZXh0Lm1ldGhvZCA9PT0gXCJyZXR1cm5cIikge1xuICAgICAgICAgIGNvbnRleHQuYWJydXB0KFwicmV0dXJuXCIsIGNvbnRleHQuYXJnKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHN0YXRlID0gR2VuU3RhdGVFeGVjdXRpbmc7XG5cbiAgICAgICAgdmFyIHJlY29yZCA9IHRyeUNhdGNoKGlubmVyRm4sIHNlbGYsIGNvbnRleHQpO1xuICAgICAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwibm9ybWFsXCIpIHtcbiAgICAgICAgICAvLyBJZiBhbiBleGNlcHRpb24gaXMgdGhyb3duIGZyb20gaW5uZXJGbiwgd2UgbGVhdmUgc3RhdGUgPT09XG4gICAgICAgICAgLy8gR2VuU3RhdGVFeGVjdXRpbmcgYW5kIGxvb3AgYmFjayBmb3IgYW5vdGhlciBpbnZvY2F0aW9uLlxuICAgICAgICAgIHN0YXRlID0gY29udGV4dC5kb25lXG4gICAgICAgICAgICA/IEdlblN0YXRlQ29tcGxldGVkXG4gICAgICAgICAgICA6IEdlblN0YXRlU3VzcGVuZGVkWWllbGQ7XG5cbiAgICAgICAgICBpZiAocmVjb3JkLmFyZyA9PT0gQ29udGludWVTZW50aW5lbCkge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHZhbHVlOiByZWNvcmQuYXJnLFxuICAgICAgICAgICAgZG9uZTogY29udGV4dC5kb25lXG4gICAgICAgICAgfTt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9jLCB0cnVlKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIH0gZWxzZSBpZiAoaGFzRmluYWxseSkge1xuICAgICAgICAgICAgaWYgKHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5maW5hbGx5TG9jKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCJ0cnkgc3RhdGVtZW50IHdpdGhvdXQgY2F0Y2ggb3IgZmluYWxseVwiKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9LFxuXG4gICAgYWJydXB0OiBmdW5jdGlvbih0eXBlLCBhcmcpIHtcbiAgICAgIGZvciAodmFyIGkgPSB0aGlzLnRyeUVudHJpZXMubGVuZ3RoIC0gMTsgaSA+PSAwOyAtLWkpIHtcbiAgICAgICAgdmFyIGVudHJ5ID0gdGhpcy50cnlFbnRyaWVzW2ldO1xuICAgICAgICBpZiAoZW50cnkudHJ5TG9jIDw9IHRoaXMucHJldiAmJlxuICAgICAgICAgICAgaGFzT3duLmNhbGwoZW50cnksIFwiZmluYWxseUxvY1wiKSAmJlxuICAgICAgICAgICAgdGhpcy5wcmV2IDwgZW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAgIHZhciBmaW5hbGx5RW50cnkgPSBlbnRyeTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBpZiAoZmluYWxseUVudHJ5ICYmXG4gICAgICAgICAgKHR5cGUgPT09IFwiYnJlYWtcIiB8fFxuICAgICAgICAgICB0eXBlID09PSBcImNvbnRpbnVlXCIpICYmXG4gICAgICAgICAgZmluYWxseUVudHJ5LnRyeUxvYyA8PSBhcmcgJiZcbiAgICAgICAgICBhcmcgPD0gZmluYWxseUVudHJ5LmZpbmFsbHlMb2MpIHtcb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XG4gICAgICAgIHRoaXMubmV4dCA9IFwiZW5kXCI7XG4gICAgICB9IGVsc2UgaWYgKHJlY29yZC50eXBlID09PSBcIm5vcm1hbFwiICYmIGFmdGVyTG9jKSB7XG4gICAgICAgIHRoaXMubmV4dCA9IGFmdGVyTG9jO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gQ29udGludWVTZW50aW5lbDtcbiAgICB9LFxuXG4gICAgZmluaXNoOiBmdW5jdGlvbihmaW5hbGx5TG9jKSB7XG4gICAgICBmb3IgKHZhciBpID0gdGhpcy50cnlFbnRyaWVzLmxlbmd0aCAtIDE7IGkgPj0gMDsgLS1pKSB7XG4gICAgICAgIHZhciBlbnRyeSA9IHRoaXMudHJ5RW50cmllc1tpXTtcbiAgICAgICAgaWYgKGVudHJ5LmZpbmFsbHlMb2MgPT09IGZpbmFsbHlMb2MpIHtcbiAgICAgICAgICB0aGlzLmNvbXBsZXRlKGVudHJ5LmNvbXBsZXRpb24sIGVudHJ5LmFmdGVyTG9jKTtcbiAgICAgICAgICByZXNldFRyeUVudHJ5KGVudHJ5KTtcbiAgICAgICAgICByZXR1cm4gQ29udGludWVTZW50aW5lbDtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0sXG5cbiAgICBcImNhdGNoXCI6IGZ1bmN0aW9uKHRyeUxvYykge1xuICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG4gICAgICAgIGlmIChlbnRyeS50cnlMb2MgPT09IHRyeUxvYykge1xuICAgICAgICAgIHZhciByZWNvcmQgPSBlbnRyeS5jb21wbGV0aW9uO1xuICAgICAgICAgIGlmIChyZWNvcmQudHlwZSA9PT0gXCJ0aHJvd1wiKSB7XG4gICAgICAgICAgICB2YXIgdGhyb3duID0gcmVjb3JkLmFyZztcbiAgICAgICAgICAgIHJlc2V0VHJ5RW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N0cmVhbU5hbWU6ICdteXN0cmVhbScsXG4gKiAgICAgICAgICAgc2NvcGU6ICdsaXZlJyxcbiAqICAgICAgICAgICBhcGlWZXJzaW9uOiAnMy4wJyxcbiAqICAgICAgICAgICB1c2VQcm94eTogdHJ1ZVxuICogICAgICAgICB9O1xuICogXG4gKiAgICAgICAgIHZhciBpbml0Q29uZmlnID0ge1xuICogICAgICAgICAgIHByb3RvY29sOiAnd3NzJyxcbiAqICAgICAgICAgICBob3N0OiAnc3RyZWFtbWFuYWdlci5jb21wYW55Lm9yZycsXG4gKiAgICAgICAgICAgcG9ydDogODA4MzosXG4gKiAgICAgICAgICAgYXBwOiAnbGl2ZScsXG4gKiAgICAgICAgICAgc3RyZWFtTmFtZTogJ215c3RyZWFtJyxcbiAqICAgICAgICAgICBpY2VTZXJ2ZXJzOiBbe3VybHM6ICdzdHVuOnN0dW4yLmwuZ29vZ2xlLmNvbToxOTMwMid9XVxuICogICAgICAgICB9O1xuICogXG4gKiAgICAgICAgIHZhciBwdWJsaXNoQXV0b3NjYWxlQ29uZmlnID0gT2JqZWN0LmFzc2lnbih7fSwgYXV0b3NjYWxlQ29uZmlnLCB7XG4gKiAgICAgICAgICAgYWN0aW9uOiAnYnJvYWRjYXN0J1xuICogICAgICAgICB9KTtcbiAqICAgICAgICAgdmFyIHN1YnNjcmliZUF1dG9zY2FsZUNvbmZpZyA9IE9iamVjdC5hc3NpZ24oe30sIGF1dG9zY2FsZUNvbmZpZywge1xuICogICAgICAgICAgIGFjdGlvbjogJ3N1YnNjcmliZSdcbiAqICAgICAgICAgfSk7XG4gKiBcbiAqICAgICAgICAgZnVuY3Rpb24gc3Vic2NyaWJlICgpIHtcbiAqICAgICAgICAgICBydGNTdWJzY3JpYmVyXG4gKiAgICAgICAgICAgICAuYXV0b3NjYWxlKHN1YnNjcmliZUF1dG9zY2FsZUNvbmZpZywgaW5pdENvbmZpZylcbiAqICAgICAgICAgICAgIC50aGVuKGZ1bmN0aW9uICgpIHtcbiAqICAgICAgICAgICAgICAgcmV0dXJuIHJ0Y1N1YnNjcmliZXIuc3Vic2NyaWJlKCk7XG4gKiAgICAgICAgICAgICB9KVxuICogICAgICAgICAgICAgLmNhdGNoKGZ1bmN0aW9uIChlcnJvcikge1xuICogICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKCdDb3VsZCBub3QgcGxheTogJyArIGVycm9yKTtcbiAqICAgICAgICAgICAgIH0pO1xuICogICAgICAgICB9XG4gKiBcbiAqICAgICAgICAgLy8gRmlyc3QgY29ubmVjdCBBdXRvc2NhbGUtZCBQdWJsaXNoZXIuXG4gKiAgICAgICAgIHJ0Y1B1Ymxpc2hlclxuICogICAgICAgICAgIC5hdXRvc2NhbGUocHVibGlzaEF1dG9zY2FsZUNvbmZpZywgaW5pdENvbmZpZylcbiAqICAgICAgICAgICAudGhlbihmdW5jdGlvbiAoKSB7XG4gKiAgICAgICAgICAgICAvLyBPbmNlIHB1Ymxpc2hpbmcsIHdlIHdpbGwgc3RhcnQgdGhlIEF1dG9zY2FsZS1kIFN1YnNjcmliZXIuXG4gKiAgICAgICAgICAgICBydGNQdWJsaXNoZXIub24ocmVkNXByb3Nkay5QdWJsaXNoZXJFdmVudFR5cGVzLlBVQkxJU0hfU1RBUlQsIHN1YnNjcmliZSk7XG4gKiAgICAgICAgICAgICByZXR1cm4gcnRjUHVibGlzaGVyLnB1Ymxpc2goKTtcbiAqICAgICAgICAgICB9KVxuICogICAgICAgICAgIC5jYXRjaChmdW5jdGlvbiAoZXJyb3IpIHtcbiAqICAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoJ0NvdWxkIG5vdCBwdWJsaXNoOiAnICsgZXJyb3IpXG4gKiAgICAgICAgICAgfSk7XG4gKiBcbiAqICAgICAgIH0od2luZG93LnJlZDVwcm9zZGssIHdpbmRvdy5yZWQ1cHJvc2RrX2V4dF9zdHJlYW1fbWFuYWdlcikpO1xuICogICAgIDwvc2NyaXB0PlxuICogICA8L2JvZHk+XG4gKiA8L2h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HN0cmVhbXMgPSBzdHJlYW1zLmNvbmNhdChsaXN0KVxuICB9XG4gIGxvZ2dlciA9IGNyZWF0ZUxvZ2dlcih7XG4gICAgbGV2ZWw6IGxldmVsLFxuICAgIG5hbWU6ICdyZWQ1cHJvLWV4dC1zbScsXG4gICAgc3RyZWFtczogc3RyZWFtc1xuICB9KVxufVxuXG4vKipcbiAqIFJldHVybiB0aGUgZGV0ZXJtaW5lZCBsb2dnZXIgaW5zdGFuY2UuXG4gKlxuICogQHJldHVybiB7T2JqZWN0fVxuICpcbiAqIEBwcml2YXRlXG4gKi9cbmV4cG9ydCBjb25zdCBnZXRMb2dnZXIgPSAoKSA9PiB7XG4gIHJldHVybiBsb2dnZXJcbn1cblxuLyogUXVpY2sgYWNjZXNzIHRvIGxvZ2dlciBsZXZlbCB0eXBlcy4gKi9cbmV4cG9ydCBjb25zdCB0cmFjZSA9IGRlY29yYXRlKExFVkVMUy5UUkFDRSlcbmV4cG9ydCBjb25zdCBpbmZvID0gZGVjb3JhdGUoTEVWRUxTLklORk8pXG5leHBvcnQgY29uc3QgZGVidWcgPSBkZWNvcmF0ZShMRVZFTFMuREVCVUcpXG5leHBvcnQgY29uc3Qgd2FybiA9IGRlY29yYXRlKExFVkVMUy5XQVJOKVxuZXhwb3J0IGNvbnN0IGVycm9yID0gZGVjb3JhdGUoTEVWRUxTLkVSUk9SKVxuZXhwb3J0IGNvbnN0IGZhdGFsID0gZGVjb3JhdGUoTEVWRUxTLkZBVEFMKVxuIl0sInNvdXJjZVJvb3QiOiIifQ== \ No newline at end of file From 74c661ec6aa923fbdd69d5cf1fc072d400ff1f29 Mon Sep 17 00:00:00 2001 From: bustardcelly Date: Wed, 13 Jun 2018 11:02:55 -0400 Subject: [PATCH 13/15] doc updates. --- README.md | 330 ++++++++++++++++++ assets/red5pro_logo.png | Bin 0 -> 4629 bytes assets/red5pro_logo.svg | 38 ++ docs/api/global.html | 308 ++++++++++++++-- docs/api/index.html | 2 +- .../module-red5prosdk_ext_stream_manager.html | 2 +- .../lib/red5pro/red5pro-ext-stream-manager.js | 7 +- examples/browser/subscriber-failover.html | 7 +- src/js/autoscale/request.js | 5 - 9 files changed, 647 insertions(+), 52 deletions(-) create mode 100644 README.md create mode 100644 assets/red5pro_logo.png create mode 100644 assets/red5pro_logo.svg diff --git a/README.md b/README.md new file mode 100644 index 0000000..19eceae --- /dev/null +++ b/README.md @@ -0,0 +1,330 @@ +

        + Red5 Pro Logo +

        +

        + red5pro-extension-stream-manager +

        + +--- + +# Stream Manager Extension for Red5 Pro HTML SDK + +> The **Stream Manager Extension** for Red5 Pro HTML SDK is an extension library that allows for ease in setting up a client-side autoscale solution. The extension library does most of the heavy lifting in communication with the [Stream Manager API](https://www.red5pro.com/docs/autoscale/) of the [Red5 Pro Server](https://www.red5pro.com/), providing a familiar API and setup flow similar to the [Red5 Pro HTML SDK](https://account.red5pro.com/download). + +* [Quickstart](#quickstart) + * [Installation](#installation) +* [Requirements](#requirements) +* [Usage](#usage) + * [decorate](#decorate) + * [Autoscale](#autoscale) +* [Autoscale Configuraiton](#autoscale-configuration) + +# Quickstart + +Before creating the following client-side example, you will first need to set up your remote **Red5 Pro Server** to support autoscaling: [Red5 Pro Autoscaling and Stream Manager](https://www.red5pro.com/docs/autoscale/). + +## Installation + +In a browser: +1. [Download the latest Red5 Pro HTML SDK Release](https://account.red5pro.com/download) +2. [Download the latest Red5 Pro Stream Manager Extension Release](https://github.com/infrared5/red5pro-extension-stream-manager/releases) + +```html + + + + + + + +
        + +
        +
        + +
        + + + + + + + + +``` + +The **Stream Manager Extension** uses the provided configurations in the `autoscale` method to: + +1. Make required requests on the [Stream Manager API](https://www.red5pro.com/docs/autoscale/streammanagerapi.html) to obtain Origin and Edge information. +2. Proceed to initialize the Publisher or Subscriber implementation based on API response. + +> This example demonstrates setting up a Publisher and Subscriber targeting WebRTC. However, the **Stream Manager Extension** also suports proper failover of the **Red5 Pro HTML SDK**. + +# Requirements + +The **Red5 Pro HTML SDK** is intended to communicate with a [Red5 Pro Server](https://www.red5pro.com/), which allows for broadcasting and consuming live streams utilizing [WebRTC](https://developer.mozilla.org/en-US/docs/Web/Guide/API/WebRTC) and other protocols, including [RTMP](https://en.wikipedia.org/wiki/Real_Time_Messaging_Protocol) and [HLS](https://en.wikipedia.org/wiki/HTTP_Live_Streaming). + +As such, you will need a distribution of the [Red5 Pro Server](https://www.red5pro.com/) running locally or accessible from the web, such as [Amazon Web Services](https://www.red5pro.com/docs/server/awsinstall/). + +Additionally, to utilize the **Stream Manager Extension**, you will need to enable the [Red5 Pro Autoscaling Feature](https://www.red5pro.com/docs/autoscale/). + +> **[Click here to start using the Red5 Pro Server today!](https://account.red5pro.com/login)** + +# Usage + +The section describes the API and configuration schemas required in using the **Stream Manager Extension** for the [Red5 Pro HTML SDK](https://account.red5pro.com/download). + +> For clarity and toe minimize verbosity, the following examples demonstrate esatblishing a client-side autoscale solution using Publishers, however, the same can be applied to Subscribers. + +## Access + +When the **Stream Manager Extension** is loaded in a browser, the extension is accessible on the `window` global at `red5prosdk_ext_stream_manager`: + +```html + + + + + + + + + var sm_extension = window.red5prosdk_ext_stream_manager; + + +``` + +## decorate() + +When the **Stream Manager Extension** is loaded in a browser, the `decorate()` method can be called to auto-magically assign an `autoscale` method to the Publisher and Subscriber class references of the **Red5 Pro HTML SDK**: + +```js +(function (red5prosdk, sm_extension) { + + // Turn on/up logging. + sm_extension.setLogLevel('debug'); + + // Invoking `decorate` will define an `autoscale` method + // on all accessible Publisher and Subscriber class refs + // from the loaded in Red5 Pro HTML SDK. + sm_extension.decorate(); + +})(window.red5prosdk, window.red5prosdk_ext_stream_manager); +``` + +With the Publisher and Subscriber references from the **Red5 Pro HTML SDK** decorated by the extension, you provide an [autoscaling configuration](#autoscaling-configuration) and an [initialization configuration](https://github.com/infrared5/red5pro-html-sdk/blob/master/PUBLISHER_README.md#auto-failover-and-order) as you normally would in setting up a non-autoscaled Publisher or Subscriber: + +```js +(function (red5prosdk, sm_extension) { + + sm_extension.setLogLevel('debug'); + sm_extension.decorate(); + + var autoscaleConfig = { + protocol: 'https', + host: 'streammanager.company.org', + streamName: 'mystream', + scope: 'live', + apiVersion: '2.0', + useProxy: true + }; + var initConfig = { + rtc: { + protocol: 'wss', + host: 'streammanager.company.org', + port: 8083, + app: 'live', + streamName: 'mystream', + iceServers: [{urls: 'stun:stun2.l.google.com:19302'}] + }, + rtmp: { + protocol: 'rtmp', + host: 'streammanager.company.org', + port: 1935, + app: 'live', + streamName: 'mystream' + } + }; + + // Call the `autoscale` method now + // declared on publisher and subscriber refs. + new red5prosdk.Red5ProPublisher() + .setPublishOrder(['rtc', 'rtmp']) + .autoscale(autoscaleConfig, initConfig) + .then(function (publisher) { + return publisher.publish() + }) + .catch(function (error) { + console.error(error) + }); + +})(window.red5prosdk, window.red5prosdk_ext_stream_manager); +``` + +The initialization flow of the failover `Red5ProPublisher` is similar to the initialization flow you would use when using the **Red5 Pro HTML SDK** for a non-autoscaled solution. + +Right after setting the publish order (using `setPublishOrder`), you invoke the `autoscale` method with an [autoscale configuration](#autoscale-configuration) and the _initialization configuration_. + +> This differs from a non-autoscaled solution when using the **Red5 Pro HTML SDK**, in which case you would invoke the `init` method with an _initialization configuration_. + +The `autoscale` method returns a `Promise`-like object that will either resolve with the chosen Publisher instance from failover, or reject with an error that occured within the process of communicating with the **Stream Manager API** through establishing a Publisher instance. + +## Autoscale + +In the case in which you will not want to use `decorate` (described [above](#decorate)) to define an `autoscale` method on Publisher and Subscriber references from the **Red5 Pro HTML SDK**, a top-level method, `Autoscale()` is available to provide a previously instantiated Publisher or Subscriber instance: + +```js +(function (red5prosdk, sm_extension) { + + sm_extension.setLogLevel('debug'); + sm_extension.decorate(); + + var autoscaleConfig = { + protocol: 'https', + host: 'streammanager.company.org', + streamName: 'mystream', + scope: 'live', + apiVersion: '2.0', + useProxy: true + }; + var initConfig = { + rtc: { + protocol: 'wss', + host: 'streammanager.company.org', + port: 8083, + app: 'live', + streamName: 'mystream', + iceServers: [{urls: 'stun:stun2.l.google.com:19302'}] + }, + rtmp: { + protocol: 'rtmp', + host: 'streammanager.company.org', + port: 1935, + app: 'live', + streamName: 'mystream' + } + }; + + // Create a failover publisher + // that will determine the target publisher tech. + var failover = new red5prosdk.Red5ProPublisher() + .setPublishOrder(['rtc', 'rtmp']); + + // Request to setup with autoscaling + // using `Autoscale`. + sm_extension.Autoscale(failover) + .init(autoscaleConfig, initConfig) + .then(function (publisher) { + return publisher.publish() + }) + .catch(function (error) { + console.error(error) + }); + +})(window.red5prosdk, window.red5prosdk_ext_stream_manager); +``` + +You can use the `Autoscale` method to start a client-side autoscale solution with an already instantiated Publisher or Subscriber (include the failover entry instance, as shown above). + +Calling `init` will do the same series of communication and initialization as describe in the [decorate](#decorate) section above. + +# Autoscale Configuration + +The following describes the available required and optional properties to provide as the _autoscale configuration_. + +| Property | Required | Default | Description | +| :--- | :---: | :---: | :--- | +| action | [x] | *None* | The `action` request on the Stream Manager. Either `broadcast` or `subscribe`. | +| protocol | [x] | `https` | The protocol portion of the Stream Manager endpoint. | +| host | [x] | *None* | The host portion of the Stream Manager endpoint. | +| port | [-] | *None* | The port portion of the Stream Manager endpoint. If `protocol` is `https`, assumes port as `443`. | +| scope | [x] | `live` | The webapp scope in which the stream will reside. | +| streamName | [x] | *None* | The stream name to broadcast or subscribe to. | +| apiVersion | [x] | `3.0` | The Stream Manager API version to use. | +| accessToken | [-] | *None* | The optional `accessToken` to use in a authorized Stream Manager API call. | +| retryLimit | [-] | `0` | The optional retry amount. The Stream Manager API call will be re-attempted N-number of times based on this value until it treats a failure as a fault. (Setting `-1` will make unlimited re-attempts). | +| retryDelay | [-] | `1000` | The delay - in milliseconds - to wait until perfoming a re-attempt on the Stream Manager API. | +| useProxy | [-] | `true` | Mostly pertaining to WebRTC Publishers and Subscribers, this property declares that the connection to Origins and Edges should be done through the Stream Manager as a proxy; this is a requirement when Origins and Edges do not have certs and cannot be connected to over SSL. | + +## Autoscale Configuration Example + +```js +var autoscaleConfiguration = { + action: 'broadcast, // required + protocol: 'https', // required, default=https + host: 'sm.company.org', // required + port: undefined, // optional (will assume 443/naked with protocol=https) + scope: 'live', // optional, default=live + streamName: 'mystream', // required + apiVersion: '3.0', // required, default=3.0 + accessToken: 'foobar', // optional + retryLimit: 3, // optional, default (no retry) + retryDelay: 2000, // optional, default=1000 + useProxy: true // optional, default=true. Enforces connection proxy for WebRTC clients +}; +``` + + +> The _initialization configuration_ is described in the **Red5 Pro HTML SDK** documentation. Please refer to that documentation in understanding the configuration options required for different tech targets. diff --git a/assets/red5pro_logo.png b/assets/red5pro_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..5b3a008e8f61483de24059dbf9a2b35d0259979a GIT binary patch literal 4629 zcmb7I=QkS;7e)}ZHAd{xie0m2QMg)pYA>Po^w;pP4yXQxoFAA$QTUn>sXMHkw^clHEF2-#py79 zhJT6L-AG@D?CL*z-TgNAA9F4EzFp`)1@=ED*Agj;{6_-A3`}%^%hc2i^s1h?+d^by zEGPpVO{>TsyCqRbtNuJp+?*PK2FyGpjhmSP2+)3NGPGI+naJ1v&Ia37fQJT5=+$iq z!qMsx;dj3HWRyX^gJCELw4x0RMJ?YP0P1D;zoQWp84ELm1Juo(|7<&)={vDgd!5dA z$DGLo$KtX4{Bq$z*y5;Pv(=WH#T1&%l>ZMBo!G6%`a6bxjS>faAAfmzgH^i&v0^Bv zz?5*4QJbuoh8Ozn&5e>_;!@<##Y(nVBVL%*%e=YsLEmF{*-_N>MHPxMsnt^j*Yq+4+VJ`z@d52k4Mwk#Y z%~kXIJ^l#5#|<(;$I{FOvC8%en?E(DcLKy39WD?x@o~W9Ha#~WGXRBgT&7(J5n+#& zM(K)pa4!LF)3>E5kww;w(Z&_88@?{riSYsKQK5m20=Pdm%Z)G2zVF%l^-BJHg4PXj z+DfL+T2pP0oCWr-A=4UOy{5$%dDXSudbQFZ9aL!e^7Su32I~xSbw7TF<;U0 zkjEkE!r!7$x%x?Lx%PqS$1loxcZ10Ag6C?()XSf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oA!E!WzJy|*iA@QC63@VRi1uh|8y<6$}5PoY1UuH zI>$R{*tm`o2NOK)X}VlU;B)WuBpOA}NEJ31AJKZ$b4@_yb5k{VpTZ0k zX|!%vf%@p1Qm*nDET1wnaf<;EeNkDsmB$?7n#7MYPDnc)`U3LoQKLijw5L@vUmJt$ zcMJXOLkQr6$0))Ng^pD@$Xbtm;?#pv2ET!`G|FP(Zz<1P=@BKqj(rZ*N^zP|kgB;{oq5J(C|u(8-3i zb^`v$57t2fVE-GkZyj7{R_IB~P8Q^W%`O3~XfOKmGR(F4Zs}*8y!CBc88x3{57|-U zy3xYL;|OmKkY0@WcSkSiah_*>O>vhJeNbGFYyKA8Ju}l0`Xz>MAkjUUQ(Ob|8|T0> zDa|2~X*J99O(iEcA=XTGP|{G2%8-xlD%zIAg|8cZkZp$|iW`+KRaiuLBtNUUVdkb_ zAw}a$7WBNc%w;X6#Z>`ZpRMnaLQ%KuWyD}J+jf8L7yxDLZF|tSVM%2x+&EXhqq|}Y zgeT0&?$>-vI^Q+*kY>39Bo}sT6<$s8vfaZ|Ub48#Udcgz9q~Q3y7U=35cXWToDQ}M zEv`sAK@Z4_b2S-LKzt*UR~5sszHJS9e@=Ar`D> + + + + + + + + + + + + + + + + + diff --git a/docs/api/global.html b/docs/api/global.html index 29766c9..20afcb4 100644 --- a/docs/api/global.html +++ b/docs/api/global.html @@ -35,7 +35,7 @@

        red5pro-extension-stream-manager

          - +
          @@ -69,29 +69,52 @@

          Global

          -

          Members

          + + +

          Methods

          - +
          -

          - constant Autoscale -

          - +

          + + asyncWrap() + + +

          + +
          +
          -

          Top-level decorate function.

          +

          Nicely wraps an async in a promise so we can use in-line without try...catch.

          - + + + + + + + + + + + + + + + + + + @@ -132,38 +155,133 @@

          -

          - +
          -

          - constant Decorate -

          - +

          + + async autoscaleInit(proxy, autoscaleConfig, initConfig) + + +

          + +
          +
          -

          Class decorator for Publisher and Subscriber types from the Red5 Pro HTML SDK.

          +

          Attempts to make requests on the Stream Manager for Origin/Edge information.

          - + -
          + +
          +
          Parameters:
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          NameTypeDescription
          proxy + + +Object + + + +

          The established Publisher or Subscriber instance of the Red5 Pro SDK.

          autoscaleConfig + + +Object + + + +

          The configuration object used in communicating with the Stream Manager.

          initConfig + + +Object + + + +

          The initialization configuration to be used in the init call on the proxy instance once the Stream Manager call has been resolved.

          +
          @@ -180,6 +298,9 @@

          + +
          + @@ -191,28 +312,39 @@

          -

          + -

          -
          -

          Methods

          -
          + + + + + + + +
          + + + + + + +
          -

          +

          - async autoscaleInit(proxy, autoscaleConfig, initConfig) + modifyInitConfigWithStreamManagerResponse(initConfig, respnose, autoscaleConfig) → {Object}

          @@ -224,7 +356,8 @@

          -

          Attempts to make requests on the Stream Manager for Origin/Edge information.

          +

          Modifies and returns new intialization configuration used for publisher or subscriber. +This configuration can vary based on target tech and the useProxy attribute of the autoscale configuration.

          @@ -260,7 +393,7 @@

          Parameters:
          - proxy + initConfig @@ -276,14 +409,14 @@
          Parameters:
          -

          The established Publisher or Subscriber instance of the Red5 Pro SDK.

          +

          The initialization configuration to modify.

          - autoscaleConfig + respnose @@ -299,14 +432,14 @@
          Parameters:
          -

          The configuration object used in communicating with the Stream Manager.

          +

          The response configuration from the Stream Manager.

          - initConfig + autoscaleConfig @@ -322,7 +455,7 @@
          Parameters:
          -

          The initialization configuration to be used in the init call on the proxy instance once the Stream Manager call has been resolved.

          +

          The original configuration used for accessing the Stream Manager API.

          @@ -343,6 +476,25 @@
          Parameters:
          +
          +
          Returns:
          + + + + + +Object + + + + + + + + + +
          + @@ -390,9 +542,9 @@
          Parameters:
          -

          +

          - async request(config) + async req(config)

          @@ -536,6 +688,90 @@
          Example
          + + + + + +
          + +

          + + timeout() + + +

          + + + +
          +
          + + +
          +

          Promisified setTimeout.

          +
          + + + + + + + + + + + + + + + + + + + + + + + + + +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          + + + +

          diff --git a/docs/api/index.html b/docs/api/index.html index f5d0e21..fbf04d9 100644 --- a/docs/api/index.html +++ b/docs/api/index.html @@ -35,7 +35,7 @@

          red5pro-extension-stream-manager

            - +
            diff --git a/docs/api/module-red5prosdk_ext_stream_manager.html b/docs/api/module-red5prosdk_ext_stream_manager.html index 1bf8062..5c04dd5 100644 --- a/docs/api/module-red5prosdk_ext_stream_manager.html +++ b/docs/api/module-red5prosdk_ext_stream_manager.html @@ -35,7 +35,7 @@

            red5pro-extension-stream-manager

              - +
              diff --git a/examples/browser/lib/red5pro/red5pro-ext-stream-manager.js b/examples/browser/lib/red5pro/red5pro-ext-stream-manager.js index f6b3ef1..8fa5bf8 100644 --- a/examples/browser/lib/red5pro/red5pro-ext-stream-manager.js +++ b/examples/browser/lib/red5pro/red5pro-ext-stream-manager.js @@ -4686,7 +4686,6 @@ var defaultConfig = { scope: 'live', // optional, default=live streamName: undefined, // required apiVersion: '3.0', // required, default=3.0 - region: undefined, // optional accessToken: undefined, // optional retryLimit: 0, // optional, default (no retry) retryDelay: 1000, // optional, default=1000 @@ -4702,14 +4701,10 @@ var defaultConfig = { scope = configuration.scope, streamName = configuration.streamName, apiVersion = configuration.apiVersion, - region = configuration.region, accessToken = configuration.accessToken; var portURI = port ? ':' + port : ''; var url = protocol + '://' + host + portURI + '/streammanager/api/' + apiVersion + '/event/' + scope + '/' + streamName + '?action=' + action; - if (region) { - url += '®ion=' + region; - } if (accessToken) { url += '&accessToken=' + accessToken; } @@ -5339,4 +5334,4 @@ module.exports = __webpack_require__(/*! /Users/toddanderson/Documents/Workplace /******/ }); }); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9yZWQ1cHJvc2RrX2V4dF9zdHJlYW1fbWFuYWdlci93ZWJwYWNrL3VuaXZlcnNhbE1vZHVsZURlZmluaXRpb24iLCJ3ZWJwYWNr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NlKGZvcm1hdFJlZ0V4cCwgZnVuY3Rpb24gKHgpIHtcbiAgICAgICAgaWYgKHggPT09ICclJScpIHtcbiAgICAgICAgICAgIHJldHVybiAnJSc7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGkgPj0gbGVuKSB7XG4gICAgICAgICAgICByZXR1cm4geDtcbiAgICAgICAgfVxuICAgICAgICBzd2l0Y2ggKHgpIHtcbiAgICAgICAgICAgIGNhc2UgJyVzJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gU3RyaW5nKGFyZ3NbaSsrXSk7XG4gICAgICAgICAgICBjYXNlICclZCc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIE51bWJlcihhcmdzW2krK10pO1xuICAgICAgICAgICAgY2FzZSAnJWonOlxuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeShhcmdzW2krK10pO1xuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKF8pIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbQ2lyY3VsYXJdJztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgIHJldHVybiB4O1xuICAgICAgICB9XG4gICAgfSk7XG4gICAgZm9yICh2YXIgeCA9IGFyZ3NbaV07aSA8IGxlbjsgeCA9IGFyZ3NbKytpXSkge1xuICAgICAgICBzdHIgKz0gJyAnICsgeDtcbiAgICB9XG4gICAgcmV0dXJuIHN0cjtcbn1cblxuZnVuY3Rpb24gZXh0cmFjdFNyY0Zyb21TdGFja3RyYWNlKHN0YWNrLCBsZXZlbCkge1xuICAgIHZhciBzdGFja0xpbmVzID0gc3RhY2suc3BsaXQoJ1xcbicpO1xuICAgIGlmIChzdGFja0xpbmVzWzBdICYmIHN0YWNrTGluZXNbMF0uaW5kZXhPZihDQUxMX1NUQUNLX0VSUk9SKSA+PSAwKSB7XG4gICAgICAgIHN0YWNrTGluZXMuc2hpZnQoKTtcbiAgICB9XG4gICAgdmFyIHRhcmdldExpbmUgPSBzdGFja0xpbmVzW2xldmVsXTtcbiAgICB2YXIgbGluZUluZm8gPSBudWxsO1xuICAgIGlmICh0YXJnZXRMaW5lKSB7XG4gICAgICAgIHZhciBleGVjUmVzdWx0ID0gL15cXHMqKGF0fC4qQClcXHMqKC4rKT8kLy5leGVjKHRhcmdldExpbmUpO1xuICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShleGVjUmVzdWx0KSAmJiBleGVjUmVzdWx0WzJdKSB7XG4gICAgICAgICAgICBsaW5lSW5mbyA9IGV4ZWNSZXN1bHRbMl07XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBsaW5lSW5mbyA9IHRhcmdldExpbmU7XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIGxpbmVJbmZvO1xufVxuXG5mdW5jdGlvbiBfaW5kZW50KHMsIGluZGVudCkge1xuICAgIGlmICghaW5kZW50KSB7XG4gICAgICAgIGluZGVudCA9ICcgICAgJztcbiAgICB9XG4gICAgdmFyIGxpbmVzID0gcy5zcGxpdCgvXFxyP1xcbi9nKTtcbiAgICByZXR1cm4gaW5kZW50ICsgbGluZXMuam9pbignXFxuJyArIGluZGVudCk7XG59XG5cbnZhciBfd2FybmVkID0ge307XG5mdW5jdGlvbiBfd2Fybihtc2csIGRlZHVwS2V5KSB7XG4gICAgaWYgKGRlZHVwS2V5KSB7XG4gICAgICAgIGlmIChfd2FybmVkW2RlZHVwS2V5XSkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIF93YXJuZWRbZGVkdXBLZXldID0gdHJ1ZTtcbiAgICB9XG4gICAgY29uc29sZS5lcnJvcihtc2cgKyAnXFxuJyk7XG59XG5cbmZ1bmN0aW9uIF9oYXZlV2FybmVkKGRlZHVwS2V5KSB7XG4gICAgcmV0dXJuIF93YXJuZWRbZGVkdXBLZXldO1xufVxuXG5mdW5jdG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0aGlzJDEuc3RyZWFtcy5wdXNoKHMpO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMuc2VyaWFsaXplcnMgPSBvYmpDb3B5KHBhcmVudC5zZXJpYWxpemVycyk7XG4gICAgICAgIHRoaXMuc3JjID0gcGFyZW50LnNyYztcbiAgICAgICAgdGhpcy5maWVsZHMgPSBvYmpDb3B5KHBhcmVudC5maWVsZHMpO1xuICAgICAgICBpZiAob3B0aW9ucy5sZXZlbCkge1xuICAgICAgICAgICAgdGhpcy5sZXZlbChvcHRpb25zLmxldmVsKTtcbiAgICAgICAgfVxuICAgIH0gZWxzZSB7XG4gICAgICAgIHRoaXMuX2xldmVsID0gTnVtYmVyLlBPU0lUSVZFX0lORklOSVRZO1xuICAgICAgICB0aGlzLnN0cmVhbXMgPSBbXTtcbiAgICAgICAgdGhpcy5zZXJpYWxpemVycyA9IG51bGw7XG4gICAgICAgIHRoaXMuc3JjID0gZmFsc2U7XG4gICAgICAgIHRoaXMuZmllbGRzID0ge307XG4gICAgfVxuICAgIGlmIChvcHRpb25zLnN0cmVhbSkge1xuICAgICAgICB0aGlzLmFkZFN0cmVhbSh7XG4gICAgICAgICAgICB0eXBlOiAnc3RyZWFtJyxcbiAgICAgICAgICAgIHN0cmVhbTogb3B0aW9ucy5zdHJlYW0sXG4gICAgICAgICAgICBsZXZlbDogb3B0aW9ucy5sZXZlbFxuICAgICAgICB9KTtcbiAgICB9IGVsc2UgaWYgKG9wdGlvbnMuc3RyZWFtcykge1xuICAgICAgICBvcHRpb25zLnN0cmVhbXMuZm9yRWFjaChmdW5jdGlvbiAocykge1xuICAgICAgICAgICAgdGhpcyQxLmFkZFN0cmVhbShzLCBvcHRpb25zLmxldmVsKTtcbiAgICAgICAgfSk7XG4gICAgfSBlbHNlIGlmIChwYXJlbnQgJiYgb3B0aW9ucy5sZXZlbCkge1xuICAgICAgICB0aGlzLmxldmVsKG9wdGlvbnMubGV2ZWwpO1xuICAgIH0gZWxzZSBpZiAoIXBhcmVud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Zm9yICh2YXIgaSA9IDA7aSA8IGxlbjsgaSsrKSB7XG4gICAgICAgICAgICB2YXIgcyA9IHRoaXMkMS5zdHJlYW1zW2ldO1xuICAgICAgICAgICAgaWYgKHMubmFtZSA9PT0gbmFtZSkge1xuICAgICAgICAgICAgICAgIHN0cmVhbSA9IHM7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCFzdHJlYW0pIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihmb3JtYXQoJ25vIHN0cmVhbSB3aXRoIG5hbWUgXCIlc1wiJywgbmFtZSkpO1xuICAgICAgICB9XG4gICAgfVxuICAgIGlmICh2YWx1ZSA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgIHJldHVybiBzdHJlYW0ubGV2ZWw7XG4gICAgfSBlbHNlIHtcbiAgICAgICAgdmFyIG5ld0xldmVsID0gcmVzb2x2ZUxldmVsKHZhbHVlKTtcbiAgICAgICAgc3RyZWFtLmxldmVsID0gbmV3TGV2ZWw7XG4gICAgICAgIGlmIChuZXdMZXZlbCA8IHRoaXMuX2xldmVsKSB7XG4gICAgICAgICAgICB0aGlzLl9sZXZlbCA9IG5ld0xldmVsO1xuICAgICAgICB9XG4gICAgfVxufTtcbkxvZ2dlci5wcm90b3R5cGUuX2FwcGx5U2VyaWFsaXplcnMgPSBmdW5jdGlvbiBfYXBwbHlTZXJpYWxpemVycyAoZmllbGRzLCBleGNsdWRlRmllbGRzKSB7XG4gICAgICAgIHZhciB0aGlzJDEgPSB0aGlzO1xuXG4gICAgT2JqZWN0LmtleXModGhpcy5zZXJpYWxpemVycykuZm9yRWFjaChmdW5jdGlvbiAobmFtZSkge1xuICAgICAgICBpZiAoZmllbGRzW25hbWVdID09PSB1bmRlZmluZWQgfHwgZXhjbHVkZUZpZWxkcyAmJiBleGNsdWRlRmllbGRzW25hbWVdKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAg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XZlbCkge1xuICAgICAgICAgICAgcy5zdHJlYW0ud3JpdGUocmVjKTtcbiAgICAgICAgfVxuICAgIH1cbiAgICByZXR1cm4gc3RyO1xufTtcbmZ1bmN0aW9uIG1rTG9nRW1pdHRlcihtaW5MZXZlbCkge1xuICAgIHJldHVybiBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHZhciBsb2cgPSB0aGlzO1xuICAgICAgICBmdW5jdGlvbiBta1JlY29yZChhcmdzKSB7XG4gICAgICAgICAgICB2YXIgZXhjbHVkZUZpZWxkcztcbiAgICAgICAgICAgIGlmIChhcmdzWzBdIGluc3RhbmNlb2YgRXJyb3IpIHtcbiAgICAgICAgICAgICAgICBmaWVsZHMgPSB7XG4gICAgICAgICAgICAgICAgICAgIGVycjogbG9nLnNlcmlhbGl6ZXJzICYmIGxvZy5zZXJpYWxpemVycy5lcnIgPyBsb2cuc2VyaWFsaXplcnMuZXJyKGFyZ3NbMF0pIDogc3RkU2VyaWFsaXplcnMuZXJyKGFyZ3NbMF0pXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICBleGNsdWRlRmllbGRzID0ge1xuICAgICAgICAgICAgICAgICAgICBlcnI6IHRydWVcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIGlmIChhcmdzLmxlbmd0aCA9PT0gMSkge1xuICAgICAgICAgICAgICAgICAgICBtc2dBcmdzID0gW2ZpZWxkcy5lcnIubWVzc2FnZV07XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgbXNnQXJncyA9IEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKGFyZ3MsIDEpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIGFyZ3NbMF0gIT09ICdvYmplY3QnICYmIGFyZ3NbMF0gIT09IG51bGwgfHwgQXJyYXkuaXNBcnJheShhcmdzWzBdKSkge1xuICAgICAgICAgICAgICAgIGZpZWxkcyA9IG51bGw7XG4gICAgICAgICAgICAgICAgbXNnQXJncyA9IEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKGFyZ3MpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBmaWVsZHMgPSBhcmdzWzBdO1xuICAgICAgICAgICAgICAgIGlmIChhcmdzLmxlbmd0aCA9PT0gMSAmJiBmaWVsZHMuZXJyICYmIGZpZWxkcy5lcnIgaW5zdGFuY2VvZiBFcnJvcikge1xuICAgICAgICAgICAgICAgICAgICBtc2dBcmdzID0gW2ZpZWxkcy5lcnIubWVzc2FnZV07XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgbXNnQXJncyA9IEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKGFyZ3MsIDEpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciByZWMgPSBvYmpDb3B5KGxvZy5maWVsZHMpO1xuICAgICAgICAgICAgcmVjLmxldmVsID0gbWluTGV2ZWw7XG4gICAgICAgICAgICB2YXIgcmVjRmllbGRzID0gZmllbGRzID8gb2JqQ29weShmaWVsZHMpIDogbnVsbDtcbiAgICAgICAgICAgIGlmIChyZWNGaWVsZHMpIHtcbiAgICAgICAgICAgICAgICBpZiAobG9nLnNlcmlhbGl6ZXJzKSB7XG4gICAgICAgICAgICAgICAgICAgIGxvZy5fYXBwbHlTZXJpYWxpemVycyhyZWNGaWVsZHMsIGV4Y2x1ZGVGaWVsZHMpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBPYmplY3Qua2V5cyhyZWNGaWVsZHMpLmZvckVhY2goZnVuY3Rpb24gKGspIHtcbiAgICAgICAgICAgICAgICAgICAgcmVjW2tdID0gcmVjRmllbGRzW2tdO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVjLmxldmVsTmFtZSA9IG5hbWVGcm9tTGV2ZWxbbWluTGV2ZWxdO1xuICAgICAgICAgICAgcmVjLm1zZyA9IG1zZ0FyZ3MubGVuZ3RoID8gZm9ybWF0LmFwcGx5KGxvZywgbXNnQXJncykgOiAnJztcbiAgICAgICAgICAgIGlmICghcmVjLnRpbWUpIHtcbiAgICAgICAgICAgICAgICByZWMudGltZSA9IG5ldyBEYXRlKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAobG9nLnNyYyAmJiAhcmVjLnNyYykge1xuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihDQUxMX1NUQUNLX0VSUk9SKTtcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHNyYyA9IGV4dHJhY3RTcmNGcm9tU3RhY2t0cmFjZShlcnIuc3RhY2ssIDIpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIXNyYyAmJiAhX2hhdmVXYXJuZWQoJ3NyYycpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBfd2FybignVW5hYmxlIHRvIGRldGVybWluZSBzcmMgbGluZSBpbmZvJywgJ3NyYycpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJlYy5zcmMgPSBzcmMgfHwgJyc7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVjLnYgPSBMT0dfVkVSU0lPTjtcbiAgICAgICAgICAgIHJldHVybiByZWM7XG4gICAgICAgIH1cbiAgICAgICAgXG4gICAgICAgIHZhciBmaWVsZHMgPSBudWxsO1xuICAgICAgICB2YXIgbXNnQXJncyA9IGFyZ3VtZW50cztcbiAgICAgICAgdmFyIHJlYyA9IG51bGw7XG4gICAgICAgIGlmIChhcmd1bWVudHMubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgICByZXR1cm4gdGh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gICAgfVxuXG4gICAgICAgIHN0YXRlID0gR2VuU3RhdGVFeGVjdXRpbmc7XG5cbiAgICAgICAgdmFyIHJlY29yZCA9IHRyeUNhdGNoKGlubmVyRm4sIHNlbGYsIGNvbnRleHQpO1xuICAgICAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwibm9ybWFsXCIpIHtcbiAgICAgICAgICAvLyBJZiBhbiBleGNlcHRpb24gaXMgdGhyb3duIGZyb20gaW5uZXJGbiwgd2UgbGVhdmUgc3RhdGUgPT09XG4gICAgICAgICAgLy8gR2VuU3RhdGVFeGVjdXRpbmcgYW5kIGxvb3AgYmFjayBmb3IgYW5vdGhlciBpbnZvY2F0aW9uLlxuICAgICAgICAgIHN0YXRlID0gY29udGV4dC5kb25lXG4gICAgICAgICAgICA/IEdlblN0YXRlQ29tcGxldGVkXG4gICAgICAgICAgICA6IEdlblN0YXRlU3VzcGVuZGVkWWllbGQ7XG5cbiAgICAgICAgICBpZiAocmVjb3JkLmFyZyA9PT0gQ29udGludWVTZW50aW5lbCkge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHZhbHVlOiByZWNvcmQuYXJnLFxuICAgICAgICAgICAgZG9uZTogY29udGV4dC5kb25lXG4gICAgICAgICAgfTtcblxuICAgICAgICB9IGVsc2UgaWYgKHJlY29yZC50eXBlID09PSBcInRocm93XCIpIHtcbiAgICAgICAgICBzdGF0ZSA9IEdlblN0YXRlQ29tcGxldGVkO1xuICAgICAgICAgIC8vIERpc3BhdGNoIHRoZSBleGNlcHRpb24gYnkgbG9vcGluZyBiYWNrIGFyb3VuZCB0byB0aGVcbiAgICAgICAgICAvLyBjb250ZXh0LmRpc3BhdGNoRXhjZXB0aW9uKGNvbnRleHQuYXJnKSBjYWxsIGFib3ZlLlxuICAgICAgICAgIGNvbnRleHQubWV0aG9kID0gXCJ0aHJvd1wiO1xuICAgICAgICAgIGNvbnRleHQu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bmRcIik7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoZW50cnkudHJ5TG9jIDw9IHRoaXMucHJldikge1xuICAgICAgICAgIHZhciBoYXNDYXRjaCA9IGhhc093bi5jYWxsKGVudHJ5LCBcImNhdGNoTG9jXCIpO1xuICAgICAgICAgIHZhciBoYXNGaW5hbGx5ID0gaGFzT3duLmNhbGwoZW50cnksIFwiZmluYWxseUxvY1wiKTtcblxuICAgICAgICAgIGlmIChoYXNDYXRjaCAmJiBoYXNGaW5hbGx5KSB7XG4gICAgICAgICAgICBpZiAodGhpcy5wcmV2IDwgZW50cnkuY2F0Y2hMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5jYXRjaExvYywgdHJ1ZSk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5maW5hbGx5TG9jKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIH0gZWxzZSBpZiAoaGFzQ2F0Y2gpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnByZXYgPCBlbnRyeS5jYXRjaExvYykge1xuICAgICAgICAgICAgICByZXR1cm4gaGFuZGxlKGVudHJ5LmNhdGNoTG9jLCB0cnVlKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIH0gZWxzZSBpZiAoaGFzRmluYWxseSkge1xuICAgICAgICAgICAgaWYgKHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5maW5hbGx5TG9jKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCJ0cnkgc3RhdGVtZW50IHdpdGhvdXQgY2F0Y2ggb3IgZmluYWxseVwiKTtcbiAgICAgIC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IGFyZztcblxuICAgICAgaWYgKGZpbmFsbHlFbnRyeSkge1xuICAgICAgICB0aGlzLm1ldGhvZCA9IFwibmV4dFwiO1xuICAgICAgICB0aGlzLm5leHQgPSBmaW5hbGx5RW50cnkuZmluYWxseUxvYztcbiAgICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiB0aGlzLmNvbXBsZXRlKHJlY29yZCk7XG4gICAgfSxcblxuICAgIGNvbXBsZXRlOiBmdW5jdGlvbihyZWNvcmQsIGFmdGVyTG9jKSB7XG4gICAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwidGhyb3dcIikge1xuICAgICAgICB0aHJvdyByZWNvcmQuYXJnO1xuICAgICAgfVxuXG4gICAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwiYnJlYWtcIiB8fFxuICAgICAgICAgIHJlY29yZC50eXBlID09PSBcImNvbnRpbnVlXCIpIHtcbiAgICAgICAgdGhpcy5uZXh0ID0gcmVjb3JkLmFyZztcbiAgICAgIH0gZWxzZSBpZiAocmVjb3JkLnR5cGUgPT09IFwicmV0dXJuXCIpIHtcbiAgICAgICAgdGhpcy5ydmFsID0gdGhpcy5hcmcgPSByZWNvcmQuYXJnO1xuICAgICAgICB0aGlzLm1ldGhvZCA9IFwicmV0dXJuXCI7XG4gICAgICAgIHRoaXMubmV4dCA9IFwiZW5kXCI7XG4gICAgICB9IGVsc2UgaWYgKHJlY29yZC50eXBlID09PSBcIm5vcm1hbFwiICYmIGFmdGVyTG9jKSB7XG4gICAgICAgIHRoaXMubmV4dCA9IGFmdGVyTG9jO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gQ29udGludWVTZW50aW5lbDtcbiAgICB9LFxuXG4gICAgZmluaXNoOiBmdW5jdGlvbihmaW5hbGx5TG9jKSB7XG4gICAgICBmb3IgKHZhciBpID0gdGhpcy50cnlFbnRyaWVzLmxlbmd0aCAtIDE7IGkgPj0gMDsgLS1pKSB7XG4gICAgICAgIHZhciBlbnRyeSA9IHRoaXMudHJ5RW50cmllc1tpXTtcbiAgICAgICAgaWYgKGVudHJ5LmZpbmFsbHlMb2MgPT09IGZpbmFsbHlMb2MpIHtcbiAgICAgICAgICB0aGlzLmNvbXBsZXRlKGVudHJ5LmNvbXBsZXRpb24sIGVudHJ5LmFmdGVyTG9jKTtcbiAgICAgICAgICByZXNldFRyeUVudHJ5KGVudHJ5KTtcbiAgICAgICAgICByZXR1cm4gQ29udGludWVTZW50aW5lbDtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0sXG5cbiAgICBcImNhdGNoXCI6IGZ1bmN0aW9uKHRyeUxvYykge1xuICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG4gICAgICAgIGlmIChlbnRyeS50cnlMb2MgPT09IHRyeUxvYykge1xuICAgICAgICAgIHZhciByZWNvcmQgPSBlbnRyeS5jb21wbGV0aW9uO1xuICAgICAgICAgIGlmIChyZWNvcmQudHlwZSA9PT0gXCJ0aHJvd1wiKSB7XG4gICAgICAgICAgICB2YXIgdGhyb3duID0gcmVjb3JkLmFyZztcbiAgICAgICAgICAgIHJlc2V0VHJ5RW50cnkoZW50cnkpO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gdGhyb3duO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIC8vIFRoZSBjb250ZXh0LmNhdGNoIG1ldGhvZCBtdXN0IG9ubHkgYmUgY2FsbGVkIHdpdGggYSBsb2NhdGlvblxuICAgICAgLy8gYXJndW1lbnQgdGhhdCBjb3JyZXNwb25kcyB0byBhIGtub3duIGNhdGNoIGJsb2NrLlxuICAgICAgdGhyb3cgbmV3IEVycm9yKFwiaWxsZWdhbCBjYXRjaCBhdHRlbXB0XCIpO1xuICAgIH0sXG5cbiAgICBkZWxlZ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EtLSBDcmVhdGUgUHViL1N1YiB3aXRoIFN0cmVhbSBNYW5hZ2VyIHN1cHBvcnQtLT5cbiAqICAgICA8c2NyaXB0PlxuICogICAgICAgKGZ1bmN0aW9uKHJlZDVwcm9zZGssIHNtX2V4dCkge1xuICogICAgICAgICAndXNlIHN0cmljdCc7XG4gKiAgICAgICAgIHJlZDVwcm9zZGsuc2V0TG9nTGV2ZWwoJ2RlYnVnJyk7XG4gKiAgICAgICAgIHNtX2V4dC5zZXRMb2dMZXZlbCgnZGVidWcnKTtcbiAqIFxuICogICAgICAgICAvLyBFeHRlbmQgdGhlIFJlZDVQcm8gc2RrLlxuICogICAgICAgICBzbV9leHQuZGVjb3JhdGUoKTtcbiAqIFxuICogICAgICAgICB2YXIgcnRjUHVibGlzaGVyID0gbmV3IHJlZDVwcm9zZGsuUlRDUHVibGlzaGVyKCk7XG4gKiAgICAgICAgIHZhciBydGNTdWJzY3JpYmVyID0gbmV3IHJlZDVwcm9zZGsuUlRDU3Vic2NyaWJlcigpO1xuICogXG4gKiAgICAgICAgIHZhciBhdXRvc2NhbGVDb25maWcgPSB7XG4gKiAgICAgICAgICAgcHJvdG9jb2w6ICdodHRwcycsXG4gKiAgICAgICAgICAgaG9zdDogJ3N0cmVhbW1hbmFnZXIuY29tcGFueS5vcmcnLFxuICogICAgICAgICAgIHN0cmVhbU5hbWU6ICdteXN0cmVhbScsXG4gKiAgICAgICAgICAgc2NvcGU6ICdsaXZlJyxcbiAqICAgICAgICAgICBhcGlWZXJzaW9uOiAnMy4wJyxcbiAqICAgICAgICAgICB1c2VQcm94eTogdHJ1ZVxuICogICAgICAgICB9O1xuICogXG4gKiAgICAgICAgIHZhciBpbml0Q29uZmlnID0ge1xuICogICAgICAgICAgIHByb3RvY29sOiAnd3NzJyxcbiAqICAgICAgICAgICBob3N0OiAnc3RyZWFtbWFuYWdlci5jb21wYW55Lm9yZycsXG4gKiAgICAgICAgICAgcG9ydDogODA4MzosXG4gKiAgICAgICAgICAgYXBwOiAnbGl2ZScsXG4gKiAgICAgICAgICAgc3RyZWFtTmFtZTogJ215c3RyZWFtJyxcbiAqICAgICAgICAgICBpY2VTZXJ2ZXJzOiBbe3VybHM6ICdzdHVuOnN0dW4yLmwuZ29vZ2xlLmNvbToxOTMwMid9XVxuICogICAgICAgICB9O1xuICogXG4gKiAgICAgICAgIHZhciBwdWJsaXNoQXV0b3NjYWxlQ29uZmlnID0gT2JqZWN0LmFzc2lnbih7fSwgYXV0b3NjYWxlQ29uZmlnLCB7XG4gKiAgICAgICAgICAgYWN0aW9uOiAnYnJvYWRjYXN0J1xuICogICAgICAgICB9KTtcbiAqICAgICAgICAgdmFyIHN1YnNjcmliZUF1dG9zY2FsZUNvbmZpZyA9IE9iamVjdC5hc3NpZ24oe30sIGF1dG9zY2FsZUNvbmZpZywge1xuICogICAgICAgICAgIGFjdGlvbjogJ3N1YnNjcmliZSdcbiAqICAgICAgICAgfSk7XG4gKiBcbiAqICAgICAgICAgZnVuY3Rpb24gc3Vic2NyaWJlICgpIHtcbiAqICAgICAgICAgICBydGNTdWJzY3JpYmVyXG4gKiAgICAgICAgICAgICAuYXV0b3NjYWxlKHN1YnNjcmliZUF1dG9zY2FsZUNvbmZpZywgaW5pdENvbmZpZylcbiAqICAgICAgICAgICAgIC50aGVuKGZ1bmN0aW9uICgpIHtcbiAqICAgICAgICAgICAgICAgcmV0dXJuIHJ0Y1N1YnNjcmliZXIuc3Vic2NyaWJlKCk7XG4gKiAgICAgICAgICAgICB9KVxuICogICAgICAgICAgICAgLmNhdGNoKGZ1bmN0aW9uIChlcnJvcikge1xuICogICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKCdDb3VsZCBub3QgcGxheTogJyArIGVycm9yKTtcbiAqICAgICAgICAgICAgIH0pO1xuICogICAgICAgICB9XG4gKiBcbiAqICAgICAgICAgLy8gRmlyc3QgY29ubmVjdCBBdXRvc2NhbGUtZCBQdWJsaXNoZXIuXG4gKiAgICAgICAgIHJ0Y1B1Ymxpc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VvZiBmICE9PSAnc3RyaW5nJykge1xuICAgICAgICB2YXIgb2JqZWN0cyA9IG5ldyBBcnJheShhcmd1bWVudHMubGVuZ3RoKTtcbiAgICAgICAgZm9yICh2YXIgaSQxID0gMDtpJDEgPCBhcmd1bWVudHMubGVuZ3RoOyBpJDErKykge1xuICAgICAgICAgICAgb2JqZWN0c1tpJDFdID0gaW5zcGVjdChhcmd1bWVudHMkMVtpJDFdKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gb2JqZWN0cy5qb2luKCcgJyk7XG4gICAgfVxuICAgIHZhciBmb3JtYXRSZWdFeHAgPSAvJVtzZGolXS9nO1xuICAgIHZhciBpID0gMTtcbiAgICB2YXIgYXJncyA9IGFyZ3VtZW50cztcbiAgICB2YXIgbGVuID0gYXJncy5sZW5ndGg7XG4gICAgdmFyIHN0ciA9IFN0cmluZyhmKS5yZXBsYWNlKGZvcm1hdFJlZ0V4cCwgZnVuY3Rpb24gKHgpIHtcbiAgICAgICAgaWYgKHggPT09ICclJScpIHtcbiAgICAgICAgICAgIHJldHVybiAnJSc7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGkgPj0gbGVuKSB7XG4gICAgICAgICAgICByZXR1cm4geDtcbiAgICAgICAgfVxuICAgICAgICBzd2l0Y2ggKHgpIHtcbiAgICAgICAgICAgIGNhc2UgJyVzJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gU3RyaW5nKGFyZ3NbaSsrXSk7XG4gICAgICAgICAgICBjYXNlICclZCc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIE51bWJlcihhcmdzW2krK10pO1xuICAgICAgICAgICAgY2FzZSAnJWonOlxuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeShhcmdzW2krK10pO1xuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKF8pIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbQ2lyY3VsYXJdJztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgIHJldHVybiB4O1xuICAgICAgICB9XG4gICAgfSk7XG4gICAgZm9yICh2YXIgeCA9IGFyZ3NbaV07aSA8IGxlbjsgeCA9IGFyZ3NbKytpXSkge1xuICAgICAgICBzdHIgKz0gJyAnICsgeDtcbiAgICB9XG4gICAgcmV0dXJuIHN0cjtcbn1cblxuZnVuY3Rpb24gZXh0cmFjdFNyY0Zyb21TdGFja3RyYWNlKHN0YWNrLCBsZXZlbCkge1xuICAgIHZhciBzdGFja0xpbmVzID0gc3RhY2suc3BsaXQoJ1xcbicpO1xuICAgIGlmIChzdGFja0xpbmVzWzBdICYmIHN0YWNrTGluZXNbMF0uaW5kZXhPZihDQUxMX1NUQUNLX0VSUk9SKSA+PSAwKSB7XG4gICAgICAgIHN0YWNrTGluZXMuc2hpZnQoKTtcbiAgICB9XG4gICAgdmFyIHRhcmdldExpbmUgPSBzdGFja0xpbmVzW2xldmVsXTtcbiAgICB2YXIgbGluZUluZm8gPSBudWxsO1xuICAgIGlmICh0YXJnZXRMaW5lKSB7XG4gICAgICAgIHZhciBleGVjUmVzdWx0ID0gL15cXHMqKGF0fC4qQClcXHMqKC4rKT8kLy5leGVjKHRhcmdldExpbmUpO1xuICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShleGVjUmVzdWx0KSAmJiBleGVjUmVzdWx0WzJdKSB7XG4gICAgICAgICAgICBsaW5lSW5mbyA9IGV4ZWNSZXN1bHRbMl07XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBsaW5lSW5mbyA9IHRhcmdldExpbmU7XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIGxpbmVJbmZvO1xufVxuXG5mdW5jdGlvbiBfaW5kZW50KHMsIGluZGVudCkge1xuICAgIGlmICghaW5kZW50KSB7XG4gICAgICAgIGluZGVudCA9ICcgICAgJztcbiAgICB9XG4gICAgdmFyIGx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gPSBPYmplY3Qua2V5cyhvcHRpb25zKTtcbiAgICAgICAgZm9yIChpID0gMDsgaSA8IG5hbWVzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICBuYW1lID0gbmFtZXNbaV07XG4gICAgICAgICAgICBmaWVsZHNbbmFtZV0gPSBvcHRpb25zW25hbWVdO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybjtcbiAgICB9XG4gICAgaWYgKHBhcmVudCkge1xuICAgICAgICB0aGlzLl9sZXZlbCA9IHBhcmVudC5fbGV2ZWw7XG4gICAgICAgIHRoaXMuc3RyZWFtcyA9IFtdO1xuICAgICAgICBmb3IgKGkgPSAwOyBpIDwgcGFyZW50LnN0cmVhbXMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIHZhciBzID0gb2JqQ29weShwYXJlbnQuc3RyZWFtc1tpXSk7XG4gICAgICAgICAgICB0aGlzJDEuc3RyZWFtcy5wdXNoKHMpO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMuc2VyaWFsaXplcnMgPSBvYmpDb3B5KHBhcmVudC5zZXJpYWxpemVycyk7XG4gICAgICAgIHRoaXMuc3JjID0gcGFyZW50LnNyYztcbiAgICAgICAgdGhpcy5maWVsZHMgPSBvYmpDb3B5KHBhcmVudC5maWVsZHMpO1xuICAgICAgICBpZiAob3B0aW9ucy5sZXZlbCkge1xuICAgICAgICAgICAgdGhpcy5sZXZlbChvcHRpb25zLmxldmVsKTtcbiAgICAgICAgfVxuICAgIH0gZWxzZSB7XG4gICAgICAgIHRoaXMuX2xldmVsID0gTnVtYmVyLlBPU0lUSVZFX0lORklOSVRZO1xuICAgICAgICB0aGlzLnN0cmVhbXMgPSBbXTtcbiAgICAgICAgdGhpcy5zZXJpYWxpemVycyA9IG51bGw7XG4gICAgICAgIHRoaXMuc3JjID0gZmFsc2U7XG4gICAgICAgIHRoaXMuZmllbGRzID0ge307XG4gICAgfVxuICAgIGlmIChvcHRpb25zLnN0cmVhbSkge1xuICAgICAgIC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GNsdWRlRmllbGRzID0ge1xuICAgICAgICAgICAgICAgICAgICBlcnI6IHRydWVcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIGlmIChhcmdzLmxlbmd0aCA9PT0gMSkge1xuICAgICAgICAgICAgICAgICAgICBtc2dBcmdzID0gW2ZpZWxkcy5lcnIubWVzc2FnZV07XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgbXNnQXJncyA9IEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKGFyZ3MsIDEpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIGFyZ3NbMF0gIT09ICdvYmplY3QnICYmIGFyZ3NbMF0gIT09IG51bGwgfHwgQXJyYXkuaXNBcnJheShhcmdzWzBdKSkge1xuICAgICAgICAgICAgICAgIGZpZWxkcyA9IG51bGw7XG4gICAgICAgICAgICAgICAgbXNnQXJncyA9IEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKGFyZ3MpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBmaWVsZHMgPSBhcmdzWzBdO1xuICAgICAgICAgICAgICAgIGlmIChhcmdzLmxlbmd0aCA9PT0gMSAmJiBmaWVsZHMuZXJyICYmIGZpZWxkcy5lcnIgaW5zdGFuY2VvZiBFcnJvcikge1xuICAgICAgICAgICAgICAgICAgICBtc2dBcmdzID0gW2ZpZWxkcy5lcnIubWVzc2FnZV07XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgbXNnQXJncyA9IEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKGFyZ3MsIDEpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciByZWMgPSBvYmpDb3B5KGxvZy5maWVsZHMpO1xuICAgICAgICAgICAgcmVjLmxldmVsID0gbWluTGV2ZWw7XG4gICAgICAgICAgICB2YXIgcmVjRmllbGRzID0gZmllbGRzID8gb2JqQ29weShmaWVsZHMpIDogbnVsbDtcbiAgICAgICAgICAgIGlmIChyZWNGaWVsZHMpIHtcbiAgICAgICAgICAgICAgICBpZiAobG9nLnNlcmlhbGl6ZXJzKSB7XG4gICAgICAgICAgICAgICAgICAgIGxvZy5fYXBwbHlTZXJpYWxpemVycyhyZWNGaWVsZHMsIGV4Y2x1ZGVGaWVsZHMpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBPYmplY3Qua2V5cyhyZWNGaWVsZHMpLmZvckVhY2goZnVuY3Rpb24gKGspIHtcbiAgICAgICAgICAgICAgICAgICAgcmVjW2tdID0gcmVjRmllbGRzW2tdO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVjLmxldmVsTmFtZSA9IG5hbWVGcm9tTGV2ZWxbbWluTGV2ZWxdO1xuICAgICAgICAgICAgcmVjLm1zZyA9IG1zZ0FyZ3MubGVuZ3RoID8gZm9ybWF0LmFwcGx5KGxvZywgbXNnQXJncykgOiAnJztcbiAgICAgICAgICAgIGlmICghcmVjLnRpbWUpIHtcbiAgICAgICAgICAgICAgICByZWMudGltZSA9IG5ldyBEYXRlKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAobG9nLnNyYyAmJiAhcmVjLnNyYykge1xuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihDQUxMX1NUQUNLX0VSUk9SKTtcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHNyYyA9IGV4dHJhY3RTcmNGcm9tU3RhY2t0cmFjZShlcnIuc3RhY2ssIDIpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIXNyYyAmJiAhX2hhdmVXYXJuZWQoJ3NyYycpKSB7XG4gICA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ZW50ID0gY29udGV4dC5hcmc7XG5cbiAgICAgICAgfSBlbHNlIGlmIChjb250ZXh0Lm1ldGhvZCA9PT0gXCJ0aHJvd1wiKSB7XG4gICAgICAgICAgaWYgKHN0YXRlID09PSBHZW5TdGF0ZVN1c3BlbmRlZFN0YXJ0KSB7XG4gICAgICAgICAgICBzdGF0ZSA9IEdlblN0YXRlQ29tcGxldGVkO1xuICAgICAgICAgICAgdGhyb3cgY29udGV4dC5hcmc7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgY29udGV4dC5kaXNwYXRjaEV4Y2VwdGlvbihjb250ZXh0LmFyZyk7XG5cbiAgICAgICAgfSBlbHNlIGlmIChjb250ZXh0Lm1ldGhvZCA9PT0gXCJyZXR1cm5cIikge1xuICAgICAgICAgIGNvbnRleHQuYWJydXB0KFwicmV0dXJuXCIsIGNvbnRleHQuYXJnKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHN0YXRlID0gR2VuU3RhdGVFeGVjdXRpbmc7XG5cbiAgICAgICAgdmFyIHJlY29yZCA9IHRyeUNhdGNoKGlubmVyRm4sIHNlbGYsIGNvbnRleHQpO1xuICAgICAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwibm9ybWFsXCIpIHtcbiAgICAgICAgICAvLyBJZiBhbiBleGNlcHRpb24gaXMgdGhyb3duIGZyb20gaW5uZXJGbiwgd2UgbGVhdmUgc3RhdGUgPT09XG4gICAgICAgICAgLy8gR2VuU3RhdGVFeGVjdXRpbmcgYW5kIGxvb3AgYmFjayBmb3IgYW5vdGhlciBpbnZvY2F0aW9uLlxuICAgICAgICAgIHN0YXRlID0gY29udGV4dC5kb25lXG4gICAgICAgICAgICA/IEdlblN0YXRlQ29tcGxldGVkXG4gICAgICAgICAgICA6IEdlblN0YXRlU3VzcGVuZGVkWWllbGQ7XG5cbiAgICAgICAgICBpZiAocmVjb3JkLmFyZyA9PT0gQ29udGludWVTZW50aW5lbCkge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgIC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RoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG4gICAgICAgIHZhciByZWNvcmQgPSBlbnRyeS5jb21wbGV0aW9uO1xuXG4gICAgICAgIGlmIChlbnRyeS50cnlMb2MgPT09IFwicm9vdFwiKSB7XG4gICAgICAgICAgLy8gRXhjZXB0aW9uIHRocm93biBvdXRzaWRlIG9mIGFueSB0cnkgYmxvY2sgdGhhdCBjb3VsZCBoYW5kbGVcbiAgICAgICAgICAvLyBpdCwgc28gc2V0IHRoZSBjb21wbGV0aW9uIHZhbHVlIG9mIHRoZSBlbnRpcmUgZnVuY3Rpb24gdG9cbiAgICAgICAgICAvLyB0aHJvdyB0aGUgZXhjZXB0aW9uLlxuICAgICAgICAgIHJldHVybiBoYW5kbGUoXCJlbmRcIik7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoZW50cnkudHJ5TG9jIDw9IHRoaXMucHJldikge1xuICAgICAgICAgIHZhciBoYXNDYXRjaCA9IGhhc093bi5jYWxsKGVudHJ5LCBcImNhdGNoTG9jXCIpO1xuICAgICAgICAgIHZhciBoYXNGaW5hbGx5ID0gaGFzT3duLmNhbGwoZW50cnksIFwiZmluYWxseUxvY1wiKTtcblxuICAgICAgICAgIGlmIChoYXNDYXRjaCAmJiBoYXNGaW5hbGx5KSB7XG4gICAgICAgICAgICBpZiAodGhpcy5wcmV2IDwgZW50cnkuY2F0Y2hMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5jYXRjaExvYywgdHJ1ZSk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5maW5hbGx5TG9jKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIH0gZWxzZSBpZiAoaGFzQ2F0Y2gpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnByZXYgPCBlbnRyeS5jYXRjaExvYykge1xuICAgICAgICAgICAgICByZXR1cm4gaGFuZGxlKGVudHJ5LmNhdGNoTG9jLCB0cnVlKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIH0gZWxzZSBpZiAoaGFzRmluYWxseSkge1xuICAgICAgICAgICAgaWYgKHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5maW5hbGx5TG9jKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCJ0cnkgc3RhdGVtZW50IHdpdGhvdXQgY2F0Y2ggb3IgZmluYWxseVwiKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9LFxuXG4gICAgYWJydXB0OiBmdW5jdGlvbih0eXBlLCBhcmcpIHtcbiAgICAgIGZvciAodmFyIGkgPSB0aGlzLnRyeUVudHJpZXMubGVuZ3RoIC0gMTsgaSA+PSAwOyAtLWkpIHtcbiAgICAgICAgdmFyIGVudHJ5ID0gdGhpcy50cnlFbnRyaWVzW2ldO1xuICAgICAgICBpZiAoZW50cnkudHJ5TG9jIDw9IHRoaXMucHJldiAmJlxuICAgICAgICAgICAgaGFzT3duLmNhbGwoZW50cnksIFwiZmluYWxseUxvY1wiKSAmJlxuICAgICAgICAgICAgdGhpcy5wcmV2IDwgZW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAgIHZhciBmaW5hbGx5RW50cnkgPSBlbnRyeTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBpZiAoZmluYWxseUVudHJ5ICYmXG4gICAgICAgICAgKHR5cGUgPT09IFwiYnJlYWtcIiB8fFxuICAgICAgICAgICB0eXBlID09PSBcImNv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cGUgPT09IFwicmV0dXJuXCIpIHtcbiAgICAgICAgdGhpcy5ydmFsID0gdGhpcy5hcmcgPSByZWNvcmQuYXJnO1xuICAgICAgICB0aGlzLm1ldGhvZCA9IFwicmV0dXJuXCI7XG4gICAgICAgIHRoaXMubmV4dCA9IFwiZW5kXCI7XG4gICAgICB9IGVsc2UgaWYgKHJlY29yZC50eXBlID09PSBcIm5vcm1hbFwiICYmIGFmdGVyTG9jKSB7XG4gICAgICAgIHRoaXMubmV4dCA9IGFmdGVyTG9jO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gQ29udGludWVTZW50aW5lbDtcbiAgICB9LFxuXG4gICAgZmluaXNoOiBmdW5jdGlvbihmaW5hbGx5TG9jKSB7XG4gICAgICBmb3IgKHZhciBpID0gdGhpcy50cnlFbnRyaWVzLmxlbmd0aCAtIDE7IGkgPj0gMDsgLS1pKSB7XG4gICAgICAgIHZhciBlbnRyeSA9IHRoaXMudHJ5RW50cmllc1tpXTtcbiAgICAgICAgaWYgKGVudHJ5LmZpbmFsbHlMb2MgPT09IGZpbmFsbHlMb2MpIHtcbiAgICAgICAgICB0aGlzLmNvbXBsZXRlKGVudHJ5LmNvbXBsZXRpb24sIGVudHJ5LmFmdGVyTG9jKTtcbiAgICAgICAgICByZXNldFRyeUVudHJ5KGVudHJ5KTtcbiAgICAgICAgICByZXR1cm4gQ29udGludWVTZW50aW5lbDtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0sXG5cbiAgICBcImNhdGNoXCI6IGZ1bmN0aW9uKHRyeUxvYykge1xuICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG4gICAgICAgIGlmIChlbnRyeS50cnlMb2MgPT09IHRyeUxvYykge1xuICAgICAgICAgIHZhciByZWNvcmQgPSBlbnRyeS5jb21wbGV0aW9uO1xuICAg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TmFtZTogJ215c3RyZWFtJyxcbiAqICAgICAgICAgICBzY29wZTogJ2xpdmUnLFxuICogICAgICAgICAgIGFwaVZlcnNpb246ICczLjAnLFxuICogICAgICAgICAgIHVzZVByb3h5OiB0cnVlXG4gKiAgICAgICAgIH07XG4gKiBcbiAqICAgICAgICAgdmFyIGluaXRDb25maWcgPSB7XG4gKiAgICAgICAgICAgcHJvdG9jb2w6ICd3c3MnLFxuICogICAgICAgICAgIGhvc3Q6ICdzdHJlYW1tYW5hZ2VyLmNvbXBhbnkub3JnJyxcbiAqICAgICAgICAgICBwb3J0OiA4MDgzOixcbiAqICAgICAgICAgICBhcHA6ICdsaXZlJyxcbiAqICAgICAgICAgICBzdHJlYW1OYW1lOiAnbXlzdHJlYW0nLFxuICogICAgICAgICAgIGljZVNlcnZlcnM6IFt7dXJsczogJ3N0dW46c3R1bjIubC5nb29nbGUuY29tOjE5MzAyJ31dXG4gKiAgICAgICAgIH07XG4gKiBcbiAqICAgICAgICAgdmFyIHB1Ymxpc2hBdXRvc2NhbGVDb25maWcgPSBPYmplY3QuYXNzaWduKHt9LCBhdXRvc2NhbGVDb25maWcsIHtcbiAqICAgICAgICAgICBhY3Rpb246ICdicm9hZGNhc3QnXG4gKiAgICAgICAgIH0pO1xuICogICAgICAgICB2YXIgc3Vic2NyaWJlQXV0b3NjYWxlQ29uZmlnID0gT2JqZWN0LmFzc2lnbih7fSwgYXV0b3NjYWxlQ29uZmlnLCB7XG4gKiAgICAgICAgICAgYWN0aW9uOiAnc3Vic2NyaWJlJ1xuICogICAgICAgICB9KTtcbiAqIFxuICogICAgICAgICBmdW5jdGlvbiBzdWJzY3JpYmUgKCkge1xuICogICAgICAgICAgIHJ0Y1N1YnNjcmliZXJcbiAqICAgICAgICAgICAgIC5hdXRvc2NhbGUoc3Vic2NyaWJlQXV0b3NjYWxlQ29uZmlnLCBpbml0Q29uZmlnKVxuICogICAgICAgICAgICAgLnRoZW4oZnVuY3Rpb24gKCkge1xuICogICAgICAg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cyA9IHN0cmVhbXMuY29uY2F0KGxpc3QpXG4gIH1cbiAgbG9nZ2VyID0gY3JlYXRlTG9nZ2VyKHtcbiAgICBsZXZlbDogbGV2ZWwsXG4gICAgbmFtZTogJ3JlZDVwcm8tZXh0LXNtJyxcbiAgICBzdHJlYW1zOiBzdHJlYW1zXG4gIH0pXG59XG5cbi8qKlxuICogUmV0dXJuIHRoZSBkZXRlcm1pbmVkIGxvZ2dlciBpbnN0YW5jZS5cbiAqXG4gKiBAcmV0dXJuIHtPYmplY3R9XG4gKlxuICogQHByaXZhdGVcbiAqL1xuZXhwb3J0IGNvbnN0IGdldExvZ2dlciA9ICgpID0+IHtcbiAgcmV0dXJuIGxvZ2dlclxufVxuXG4vKiBRdWljayBhY2Nlc3MgdG8gbG9nZ2VyIGxldmVsIHR5cGVzLiAqL1xuZXhwb3J0IGNvbnN0IHRyYWNlID0gZGVjb3JhdGUoTEVWRUxTLlRSQUNFKVxuZXhwb3J0IGNvbnN0IGluZm8gPSBkZWNvcmF0ZShMRVZFTFMuSU5GTylcbmV4cG9ydCBjb25zdCBkZWJ1ZyA9IGRlY29yYXRlKExFVkVMUy5ERUJVRylcbmV4cG9ydCBjb25zdCB3YXJuID0gZGVjb3JhdGUoTEVWRUxTLldBUk4pXG5leHBvcnQgY29uc3QgZXJyb3IgPSBkZWNvcmF0ZShMRVZFTFMuRVJST1IpXG5leHBvcnQgY29uc3QgZmF0YWwgPSBkZWNvcmF0ZShMRVZFTFMuRkFUQUwpXG4iXSwic291cmNlUm9vdCI6IiJ9 \ No newline at end of file diff --git a/examples/browser/subscriber-failover.html b/examples/browser/subscriber-failover.html index cc88bd3..ce9c63c 100644 --- a/examples/browser/subscriber-failover.html +++ b/examples/browser/subscriber-failover.html @@ -14,6 +14,10 @@ red5prosdk.setLogLevel('debug'); sm_ext.setLogLevel('debug'); + window.subscriberLog = function (message) { + console.log('[RTMPSubscriber] :: ' + message); + } + var autoscaleConfig = { protocol: 'https', host: 'nafarat.red5.org', @@ -90,9 +94,6 @@ }); */ - window.subscriberLog = function (message) { - console.log('[RTMPSubscriber] :: ' + message); - } })(window.red5prosdk, window.red5prosdk_ext_stream_manager); diff --git a/src/js/autoscale/request.js b/src/js/autoscale/request.js index d9fd119..c33abf8 100644 --- a/src/js/autoscale/request.js +++ b/src/js/autoscale/request.js @@ -8,7 +8,6 @@ const defaultConfig = { scope: 'live', // optional, default=live streamName: undefined, // required apiVersion: '3.0', // required, default=3.0 - region: undefined, // optional accessToken: undefined, // optional retryLimit: 0, // optional, default (no retry) retryDelay: 1000, // optional, default=1000 @@ -25,14 +24,10 @@ const endpointFromConfiguration = (configuration) => { scope, streamName, apiVersion, - region, accessToken } = configuration const portURI = port ? ':' + port : '' let url = `${protocol}://${host}${portURI}/streammanager/api/${apiVersion}/event/${scope}/${streamName}?action=${action}` - if (region) { - url += `®ion=${region}` - } if (accessToken) { url += `&accessToken=${accessToken}` } From ce44437f0c8f596d4d4e33939383e9cdcacb22b5 Mon Sep 17 00:00:00 2001 From: bustardcelly Date: Wed, 13 Jun 2018 11:10:19 -0400 Subject: [PATCH 14/15] readme update. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 19eceae..5e94ff8 100644 --- a/README.md +++ b/README.md @@ -312,7 +312,7 @@ The following describes the available required and optional properties to provid ```js var autoscaleConfiguration = { - action: 'broadcast, // required + action: 'broadcast', // required protocol: 'https', // required, default=https host: 'sm.company.org', // required port: undefined, // optional (will assume 443/naked with protocol=https) From 96199aa30ed5011e0fe4cc293a5da62a4745dad9 Mon Sep 17 00:00:00 2001 From: bustardcelly Date: Wed, 13 Jun 2018 11:39:02 -0400 Subject: [PATCH 15/15] initial release prep. --- CHANGES.md | 5 + CONTRIBUTING.md | 169 ++++++++++++++ README.md | 12 +- examples/browser/dual-rtc.html | 8 +- examples/browser/publisher-failover.html | 12 +- examples/browser/subscriber-failover.html | 16 +- gulpfile.js | 17 ++ package-lock.json | 259 ++++++++++++++++++++++ package.json | 7 + 9 files changed, 482 insertions(+), 23 deletions(-) create mode 100644 CHANGES.md create mode 100644 CONTRIBUTING.md diff --git a/CHANGES.md b/CHANGES.md new file mode 100644 index 0000000..0e47805 --- /dev/null +++ b/CHANGES.md @@ -0,0 +1,5 @@ +# Changes + +## 1.0.0 + +- initial project release. (bustardcelly) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..2fbb4b1 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,169 @@ +

              + Red5 Pro Logo +

              +

              + requirements • + quickstart • + library structure +

              +------- + +# Contributing to Red5 Pro HTML SDK + +> The following document describes how to contribute to Red5 Pro Stream Manager Extension library. + +* [Requirements](#requirements) +* [Developer Quickstart](#developer-quickstart) + * [Testing](#testing) + * [Building](#building) + * [Releasing](#releasing) +* [Tagging and Releases](#tagging-and-releases) +* [Library Structure](#library-structure) + * [Babel Transpiler](#babel-transpiler) + * [Webpack Builds](#webpack-builds) + * [Jest Unit Tests](#jest-unit-tests) + * [ESLint](#eslint) + +--- + +# Requirements + +Developing and build the **Red5 Pro Stream Manager Extension** library requires: + +* [NodeJS](https://nodejs.org/en/) +* NPM (should be installed as part of Node) + +_The Stream Manager Extension is actively being developed against Node 10+._ + +## Installation of Requirements + +The *Stream Manager Extension* library was develop using [NodeJS v10](https://nodejs.org/en/blog/release/v10.0.0/), though - most likely - will be compatable with *NodeJS >= 8*. + +The preferred *NodeJS* version manager is [n](https://github.com/tj/n); `n` makes it very easy to manage different versions of NodeJS for your development needs. Read and follow the instructions regarding [n on Github](https://github.com/tj/n). As a quick walk through to set up development for this project: + +```sh +$ npm install -g n +$ n stable +``` + +# Developer Quickstart + +## Installation + +```sh +$ npm install +``` + +## Testing + +To run the test suite: +```sh +$ npm run test +``` + +To watch for file change and run tests while updating test suite: +```sh +$ npm run test:watch +``` + +Optionally, if want to run/watch a target test suite: +```sh +$ npm run test:watch [path-to-test-file] +``` + +## Building + +To build the library targeting the browser: + +```sh +$ npm run webpack:build +``` + +Build is placed in the `build` directory with the current `version` defined in the [package.json](package.json). + +## Staging + +To build a minified version of the library without bumping the version: + +```sh +$ npm run webpack:build-min +``` + +Build is placed in the `build` directory with the current `version` defined in the [package.json](package.json). + +## Releasing + +To build a release for public consumption: + +```sh +$ npm run webpack:dist +``` + +Build is placed in the `dist` directory with the updated `version` defined in the [package.json](package.json). + +### Versioning + +By default, running `webpack:dist` will bump the `PATCH` digit of the semver (i.e., changing release `1.0.0` to `1.0.1`). + +You can specify the version target when appropriate by defining a `BUMP` env variable when issuing `webpack:dist`. For instance, to build a release with an updated `MAJOR` version: + +```sh +$ BUMP=major npm run webpack:dist +``` + +The follow excepted `BUMP` env variable values are: + +* `major` +* `minor` +* `patch` + +> More information about semantic versioning: [http://semver.org/](http://semver.org/). + +# Tagging and Releases + +The workflow in generating a release version in `develop` to be moved up the chain for CI deployment is as follows: + +## Release Distribution + +1. Develop all work off of `develop` branch +2. Continually PR work into `develop` branch +3. When `develop` has been QA'd and available for release, change the release semver in `package.json` +4. Issue the following command to update the changelog: `git pull && npm run changes` +5. Preview & edit the changelog as needed +6. Commit the changes into `develop` branch with the following command (replacing `$version` with the version in `package.json`): `$ git commit -m "$version"` +7. Issue the following command to make a distribution to be attached to tagged versions: `$ npm run webpack:dist` +8. The distribution will be in the `dist` directory under the version number you set in step #3 +7. PR `develop` into `qa`, and tag a **$version-staging** version for CI +8. PR `qa` into `master, and tag a *v$version-release** version for CI +9. Add the zipped up distribution you created in step #8 to the tag(s) + + +# Library Structure + +The library is composed of modules written in module syntax of [es2015](http://www.ecma-international.org/ecma-262/6.0/), transpiled using [Babel](https://babeljs.io/) and built using [Webpack](https://github.com/webpack/webpack) for browsers of today. + +## Babel Transpiler + +[Babel](https://babeljs.io/) is used as a transpiler. This allows for the library source to be written using new features from and syntax of [es2015](https://babeljs.io/docs/learn-es2015/), in the hope/attempt to remove the transpilation once "modern" browsers vendors adopt support for *es2015*. + +## Webpack Builds + +[Webpack](https://github.com/webpack/webpack) is used to build and deploy the *Red5 Pro Stream Manager Extension* library. It supports running the code through the [Babel](https://babeljs.io/) transpiler and minification through the [Uglify Plugin](https://webpack.github.io/docs/list-of-plugins.html#uglifyjsplugin). + +You can find the *webpack* build configuration at [webpack.config.babel.js](webpack.config.babel.js). + +## Jest Unit Tests + +[Jest](https://facebook.github.io/jest/) is used for the testing framework. Essentially, it is [jasmine2](http://jasmine.github.io/2.0/introduction.html) with built in mocking and capability to write tests in using [es2015](http://www.ecma-international.org/ecma-262/6.0/) syntax and [babel](https://babeljs.io/). + +## ESLint + +[ESLint](http://eslint.org/) is used as a linting tool for code structure. The default [eslint:recommended](http://eslint.org/docs/user-guide/migrating-to-1.0.0) settings are defined as the base rule set. + +To install *eslint* to be used in your preferred editor: + +```sh +$ npm install -g eslint +``` + +[Please visit the documentation on proper integration with your preferred editor/IDE](http://eslint.org/docs/user-guide/integrations). diff --git a/README.md b/README.md index 5e94ff8..a15aa2a 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,8 @@ * [Autoscale](#autoscale) * [Autoscale Configuraiton](#autoscale-configuration) +--- + # Quickstart Before creating the following client-side example, you will first need to set up your remote **Red5 Pro Server** to support autoscaling: [Red5 Pro Autoscaling and Stream Manager](https://www.red5pro.com/docs/autoscale/). @@ -63,19 +65,19 @@ In a browser: var autoscaleConfig = { protocol: 'https', - host: 'nafarat.red5.org', - streamName: 'stream1todd', + host: 'streammanager.company.org', + streamName: 'mystream', scope: 'live', - apiVersion: '2.0', + apiVersion: '3.0', useProxy: true }; var initConfig = { protocol: 'wss', - host: 'nafarat.red5.org', + host: 'streammanager.company.org', port: 8083, app: 'live', - streamName: 'stream1todd', + streamName: 'mystream', iceServers: [{urls: 'stun:stun2.l.google.com:19302'}] }; diff --git a/examples/browser/dual-rtc.html b/examples/browser/dual-rtc.html index 39ca315..ecf301a 100644 --- a/examples/browser/dual-rtc.html +++ b/examples/browser/dual-rtc.html @@ -32,8 +32,8 @@ var autoscaleConfig = { protocol: 'https', - host: 'nafarat.red5.org', - streamName: 'stream1todd', + host: '127.0.0.0', + streamName: 'mystream', scope: 'live', apiVersion: '2.0', useProxy: true @@ -41,10 +41,10 @@ var initConfig = { protocol: 'wss', - host: 'nafarat.red5.org', + host: '127.0.0.0', port: 8083, app: 'live', - streamName: 'stream1todd', + streamName: 'mystream', iceServers: [{urls: 'stun:stun2.l.google.com:19302'}] }; diff --git a/examples/browser/publisher-failover.html b/examples/browser/publisher-failover.html index f31a2c4..4f77ff5 100644 --- a/examples/browser/publisher-failover.html +++ b/examples/browser/publisher-failover.html @@ -16,8 +16,8 @@ var autoscaleConfig = { protocol: 'https', - host: 'nafarat.red5.org', - streamName: 'stream1todd', + host: '127.0.0.0', + streamName: 'mystream', scope: 'live', apiVersion: '2.0', action: 'broadcast', @@ -26,14 +26,14 @@ var config = { rtc: { protocol: 'wss', - host: 'nafarat.red5.org', + host: '127.0.0.0', port: 8083, app: "live", bandwidth: { 'audio': 50, 'video': 256 }, - streamName: 'stream1todd', + streamName: 'mystream', iceServers: [{urls: 'stun:stun2.l.google.com:19302'}], connectionParams: { validation_url: encodeURIComponent('https://mmd-rt-vep.lldns.net/jaker/some_slot_id/validate?s=1527102700&e=1527102705&h=31d9b5dc23c68c6362dac42bada104c2') @@ -41,12 +41,12 @@ }, rtmp: { protocol: 'rtmp', - host: 'nafarat.red5.org', + host: '127.0.0.0', port: 1935, app: 'live', embedWidth: '100%', embedHeight: 360, - streamName: 'stream1todd', + streamName: 'mystream', swf: './lib/red5pro/red5pro-publisher.swf', swfobjectURL: './lib/swfobject/swfobject.js', productInstallURL: './lib/swfobject/playerProductInstall.swf', diff --git a/examples/browser/subscriber-failover.html b/examples/browser/subscriber-failover.html index ce9c63c..47dcf7c 100644 --- a/examples/browser/subscriber-failover.html +++ b/examples/browser/subscriber-failover.html @@ -20,8 +20,8 @@ var autoscaleConfig = { protocol: 'https', - host: 'nafarat.red5.org', - streamName: 'stream1todd', + host: '127.0.0.0', + streamName: 'mystream', scope: 'live', apiVersion: '2.0', action: 'subscribe', @@ -32,14 +32,14 @@ var config = { rtc: { protocol: 'wss', - host: 'nafarat.red5.org', + host: '127.0.0.0', port: 8083, app: "live", bandwidth: { 'audio': 50, 'video': 256 }, - streamName: 'stream1todd', + streamName: 'mystream', iceServers: [{urls: 'stun:stun2.l.google.com:19302'}], connectionParams: { validation_url: encodeURIComponent('https://mmd-rt-vep.lldns.net/jaker/some_slot_id/validate?s=1527102700&e=1527102705&h=31d9b5dc23c68c6362dac42bada104c2') @@ -47,12 +47,12 @@ }, rtmp: { protocol: 'rtmp', - host: 'nafarat.red5.org', + host: '127.0.0.0', port: 1935, app: 'live', embedWidth: '100%', embedHeight: 360, - streamName: 'stream1todd', + streamName: 'mystream', swf: './lib/red5pro/red5pro-publisher.swf', swfobjectURL: './lib/swfobject/swfobject.js', productInstallURL: './lib/swfobject/playerProductInstall.swf', @@ -62,10 +62,10 @@ }, hls: { protocol: 'http', - host: 'nafarat.red5.org', + host: '127.0.0.0', port: 5080, app: 'live', - streamName: 'stream1todd' + streamName: 'mystream' } }; // ---- OPTION 1 ---- // diff --git a/gulpfile.js b/gulpfile.js index 0010b07..58e731e 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,6 +1,7 @@ /* eslint no-console: 0 */ var path = require('path'); var gulp = require('gulp'); +var bump = require('gulp-bump'); var pkg = path.join(process.cwd(), 'package.json') var version = require(pkg).version; @@ -17,3 +18,19 @@ gulp.task('move-build-to-examples', [], function(cb) { return gulp.src([path.join(buildDir, '**', '*')]).pipe(gulp.dest(path.join(examplesDir, 'lib', 'red5pro'))); }); +gulp.task('bump-version', function() { + var versionType = process.env.BUMP !== undefined ? process.env.BUMP : 'patch'; + var files = [pkg]; + if (versionType === 'none') { + gulp.src(files).pipe(gulp.dest(__dirname)); + } + else { + gulp.src(files) + .pipe(bump({ + type: versionType + })) + .pipe(gulp.dest(__dirname)); + } +}); + + diff --git a/package-lock.json b/package-lock.json index cac0320..e93c8bf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -197,6 +197,29 @@ "resolved": "https://registry.npmjs.org/@browser-bunyan/levels/-/levels-1.3.0.tgz", "integrity": "sha1-oFIwOuXRofm2Pus6lElaL0KfSDE=" }, + "@studio/changes": { + "version": "git+https://github.com/infrared5/studio-changes.git#28b9b8da08e7d6f1e5d1a5d97ce3928875d2184c", + "dev": true, + "requires": { + "detect-indent": "5.0.0", + "editor": "1.0.0", + "minimist": "1.2.0" + }, + "dependencies": { + "detect-indent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz", + "integrity": "sha1-OHHMCmoALow+Wzz38zYmRnXwa50=", + "dev": true + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, "@types/node": { "version": "10.3.2", "resolved": "https://registry.npmjs.org/@types/node/-/node-10.3.2.tgz", @@ -480,6 +503,15 @@ "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", "dev": true }, + "ansi-cyan": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-cyan/-/ansi-cyan-0.1.1.tgz", + "integrity": "sha1-U4rlKK+JgvKK4w2G8vF0VtJgmHM=", + "dev": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, "ansi-escapes": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", @@ -495,6 +527,15 @@ "ansi-wrap": "0.1.0" } }, + "ansi-red": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-red/-/ansi-red-0.1.1.tgz", + "integrity": "sha1-jGOPnRCAgAo1PJwoyKgcpHBdlGw=", + "dev": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", @@ -589,6 +630,12 @@ "integrity": "sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=", "dev": true }, + "array-find-index": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", + "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", + "dev": true + }, "array-slice": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", @@ -1844,6 +1891,16 @@ "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", "dev": true }, + "bump-regex": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/bump-regex/-/bump-regex-3.1.1.tgz", + "integrity": "sha512-NinFibU11G1ad/2Ji3J04lRC9mLpUGr3C0vtt4Yp049cDeW21NRkmUaZZc+snwlL6gE+Ja5cQfe/hf86Ahj+WQ==", + "dev": true, + "requires": { + "semver": "5.5.0", + "xtend": "4.0.1" + } + }, "cacache": { "version": "10.0.4", "resolved": "https://registry.npmjs.org/cacache/-/cacache-10.0.4.tgz", @@ -1903,6 +1960,24 @@ "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", "dev": true }, + "camelcase-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", + "dev": true, + "requires": { + "camelcase": "2.1.1", + "map-obj": "1.0.1" + }, + "dependencies": { + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", + "dev": true + } + } + }, "caniuse-lite": { "version": "1.0.30000850", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000850.tgz", @@ -2362,6 +2437,15 @@ "cssom": "0.3.2" } }, + "currently-unhandled": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", + "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", + "dev": true, + "requires": { + "array-find-index": "1.0.2" + } + }, "cyclist": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz", @@ -2711,6 +2795,12 @@ "jsbn": "0.1.1" } }, + "editor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/editor/-/editor-1.0.0.tgz", + "integrity": "sha1-YMf4e9YrzGqJT6jM1q+3gjok90I=", + "dev": true + }, "electron-to-chromium": { "version": "1.3.48", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.48.tgz", @@ -4125,6 +4215,12 @@ "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=", "dev": true }, + "get-stdin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", + "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", + "dev": true + }, "get-stream": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", @@ -4478,6 +4574,19 @@ } } }, + "gulp-bump": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/gulp-bump/-/gulp-bump-3.1.1.tgz", + "integrity": "sha512-4lVWz2L/8G2lYBjYGzql2BiVIa1Mml03YcHQc1pERk8jH/8nZbrdQ8dHABDnAcBNP4rKAh9AVycjNJ4/4AHkwQ==", + "dev": true, + "requires": { + "bump-regex": "3.1.1", + "plugin-error": "0.1.2", + "plugin-log": "0.1.0", + "semver": "5.5.0", + "through2": "2.0.3" + } + }, "gulp-util": { "version": "3.0.8", "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.8.tgz", @@ -4856,6 +4965,15 @@ "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", "dev": true }, + "indent-string": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", + "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", + "dev": true, + "requires": { + "repeating": "2.0.1" + } + }, "indexof": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", @@ -7027,6 +7145,16 @@ "js-tokens": "3.0.2" } }, + "loud-rejection": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", + "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", + "dev": true, + "requires": { + "currently-unhandled": "0.4.1", + "signal-exit": "3.0.2" + } + }, "lru-cache": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", @@ -7076,6 +7204,12 @@ "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", "dev": true }, + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true + }, "map-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", @@ -7126,6 +7260,32 @@ "readable-stream": "2.3.6" } }, + "meow": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", + "dev": true, + "requires": { + "camelcase-keys": "2.1.0", + "decamelize": "1.2.0", + "loud-rejection": "1.6.0", + "map-obj": "1.0.1", + "minimist": "1.2.0", + "normalize-package-data": "2.4.0", + "object-assign": "4.1.1", + "read-pkg-up": "1.0.1", + "redent": "1.0.0", + "trim-newlines": "1.0.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, "merge": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/merge/-/merge-1.2.0.tgz", @@ -7953,6 +8113,80 @@ "find-up": "2.1.0" } }, + "plugin-error": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-0.1.2.tgz", + "integrity": "sha1-O5uzM1zPAPQl4HQ34ZJ2ln2kes4=", + "dev": true, + "requires": { + "ansi-cyan": "0.1.1", + "ansi-red": "0.1.1", + "arr-diff": "1.1.0", + "arr-union": "2.1.0", + "extend-shallow": "1.1.4" + }, + "dependencies": { + "arr-diff": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-1.1.0.tgz", + "integrity": "sha1-aHwydYFjWI/vfeezb6vklesaOZo=", + "dev": true, + "requires": { + "arr-flatten": "1.1.0", + "array-slice": "0.2.3" + } + }, + "arr-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-2.1.0.tgz", + "integrity": "sha1-IPnqtexw9cfSFbEHexw5Fh0pLH0=", + "dev": true + }, + "array-slice": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz", + "integrity": "sha1-3Tz7gO15c6dRF82sabC5nshhhvU=", + "dev": true + }, + "extend-shallow": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-1.1.4.tgz", + "integrity": "sha1-Gda/lN/AnXa6cR85uHLSH/TdkHE=", + "dev": true, + "requires": { + "kind-of": "1.1.0" + } + }, + "kind-of": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz", + "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=", + "dev": true + } + } + }, + "plugin-log": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/plugin-log/-/plugin-log-0.1.0.tgz", + "integrity": "sha1-hgSc9qsQgzOYqTHzaJy67nteEzM=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "dateformat": "1.0.12" + }, + "dependencies": { + "dateformat": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.12.tgz", + "integrity": "sha1-nxJLZ1lMk3/3BpMuSmQsyo27/uk=", + "dev": true, + "requires": { + "get-stdin": "4.0.1", + "meow": "3.7.0" + } + } + } + }, "pluralize": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", @@ -8247,6 +8481,16 @@ "resolve": "1.7.1" } }, + "redent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", + "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", + "dev": true, + "requires": { + "indent-string": "2.1.0", + "strip-indent": "1.0.1" + } + }, "regenerate": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", @@ -9187,6 +9431,15 @@ "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", "dev": true }, + "strip-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", + "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", + "dev": true, + "requires": { + "get-stdin": "4.0.1" + } + }, "strip-json-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", @@ -9447,6 +9700,12 @@ "punycode": "2.1.1" } }, + "trim-newlines": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", + "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", + "dev": true + }, "trim-right": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", diff --git a/package.json b/package.json index 4215bce..ed86802 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ ] }, "devDependencies": { + "@studio/changes": "git+https://github.com/infrared5/studio-changes.git#ir5/ci", "babel-core": "^6.26.3", "babel-eslint": "^8.2.3", "babel-jest": "^23.0.1", @@ -42,6 +43,7 @@ "colors": "^1.3.0", "eslint": "^4.19.1", "gulp": "^3.9.1", + "gulp-bump": "^3.1.1", "jest-cli": "^23.1.0", "jsdoc": "^3.5.5", "webpack": "^4.11.1", @@ -56,8 +58,13 @@ "webpack:build-min": "NODE_ENV=staging webpack", "webpack:dist": "NODE_ENV=production webpack", "postwebpack:build": "gulp move-build-to-examples", + "postwebpack:build-min": "gulp move-build-to-examples", + "prewebpack:dist": "NODE_ENV=production gulp bump-version", "lint": "eslint ./src --ext .js", "test": "jest", + "test:watch": "jest --watch", + "test:coverage": "jest --coverage", + "changes": "changes", "docs:api": "jsdoc -r src/js -d docs/api -c .jsdoc" } }