!function(_){_.__DEV__=!1,_.__BUNDLE_START_TIME__=Date.now()}("undefined"!=typeof global?global:"undefined"!=typeof self?self:this); !function(r){"use strict";function e(r,e,t){e in u||(u[e]={dependencyMap:t,exports:void 0,factory:r,hasError:!1,isInitialized:!1})}function t(r){var e=r,t=u[e];return t&&t.isInitialized?t.exports:i(e,t)}function i(e,t){if(!c&&r.ErrorUtils){c=!0;var i=void 0;try{i=n(e,t)}catch(e){r.ErrorUtils.reportFatalError(e)}return c=!1,i}return n(e,t)}function n(e,i){var n=r.nativeRequire;if(!i&&n&&(n(e),i=u[e]),!i)throw o(e);if(i.hasError)throw a(e);i.isInitialized=!0;var c=i.exports={},s=i,d=s.factory,f=s.dependencyMap;try{var l={exports:c};return d(r,t,l,c,f),i.factory=void 0,i.exports=l.exports}catch(r){throw i.hasError=!0,i.isInitialized=!1,i.exports=void 0,r}}function o(r){var e='Requiring unknown module "'+r+'".';return Error(e)}function a(r){return Error('Requiring module "'+r+'", which threw an exception.')}r.require=t,r.__d=e;var u=Object.create(null),c=!1}("undefined"!=typeof global?global:"undefined"!=typeof self?self:this); !function(n){Object.assign=function(n,e){for(var f=1;f=o.error&&(a=o.warn),n.__inspectorLog&&n.__inspectorLog(i[a],t,[].slice.call(arguments),u),n.nativeLoggingHook(t,a)}}function a(n,r){return Array.apply(null,Array(r)).map(function(){return n})}function c(r){function e(n,r){var e=n.map(function(n,r){return n+a(" ",p[r]-n.length).join("")});return r=r||" ",e.join(r+"|"+r)}if(!Array.isArray(r)){var i=r;r=[];for(var u in i)if(i.hasOwnProperty(u)){var c=i[u];c[t]=u,r.push(c)}}if(0===r.length)return void n.nativeLoggingHook("",o.info);var l=Object.keys(r[0]).sort(),f=[],p=[];l.forEach(function(n,e){p[e]=n.length;for(var t=0;t=0||p.indexOf("description")>=0))return i(r);if(0===p.length){if(m(r)){var g=r.name?": "+r.name:"";return n.stylize("[Function"+g+"]","special")}if(v(r))return n.stylize(RegExp.prototype.toString.call(r),"regexp");if(h(r))return n.stylize(Date.prototype.toString.call(r),"date");if(b(r))return i(r)}var y="",d=!1,j=["{","}"];if(l(r)&&(d=!0,j=["[","]"]),m(r)){y=" [Function"+(r.name?": "+r.name:"")+"]"}if(v(r)&&(y=" "+RegExp.prototype.toString.call(r)),h(r)&&(y=" "+Date.prototype.toUTCString.call(r)),b(r)&&(y=" "+i(r)),0===p.length&&(!d||0==r.length))return j[0]+y+j[1];if(t<0)return v(r)?n.stylize(RegExp.prototype.toString.call(r),"regexp"):n.stylize("[Object]","special");n.seen.push(r);var z;return z=d?u(n,r,t,s,p):p.map(function(e){return a(n,r,t,s,e,d)}),n.seen.pop(),c(z,y,j)}function o(n,r){if(y(r))return n.stylize("undefined","undefined");if(g(r)){var e="'"+JSON.stringify(r).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return n.stylize(e,"string")}return s(r)?n.stylize(""+r,"number"):f(r)?n.stylize(""+r,"boolean"):p(r)?n.stylize("null","null"):void 0}function i(n){return"["+Error.prototype.toString.call(n)+"]"}function u(n,r,e,t,o){for(var i=[],u=0,c=r.length;u-1&&(c=u?c.split("\n").map(function(n){return" "+n}).join("\n").substr(2):"\n"+c.split("\n").map(function(n){return" "+n}).join("\n"))):c=n.stylize("[Circular]","special")),y(a)){if(u&&i.match(/^\d+$/))return c;a=JSON.stringify(""+i),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=n.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=n.stylize(a,"string"))}return a+": "+c}function c(n,r,e){var t=0;return n.reduce(function(n,r){return t++,r.indexOf("\n")>=0&&t++,n+r.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?e[0]+(""===r?"":r+"\n ")+" "+n.join(",\n ")+" "+e[1]:e[0]+r+" "+n.join(", ")+" "+e[1]}function l(n){return Array.isArray(n)}function f(n){return"boolean"==typeof n}function p(n){return null===n}function s(n){return"number"==typeof n}function g(n){return"string"==typeof n}function y(n){return void 0===n}function v(n){return d(n)&&"[object RegExp]"===j(n)}function d(n){return"object"==typeof n&&null!==n}function h(n){return d(n)&&"[object Date]"===j(n)}function b(n){return d(n)&&("[object Error]"===j(n)||n instanceof Error)}function m(n){return"function"==typeof n}function j(n){return Object.prototype.toString.call(n)}function z(n,r){return Object.prototype.hasOwnProperty.call(n,r)}return n}(),t="(index)",o={trace:0,info:1,warn:2,error:3},i=[];i[o.trace]="debug",i[o.info]="log",i[o.warn]="warning",i[o.error]="error";var u=1;"undefined"!=typeof module?module.exports=r:r(n)}("undefined"!=typeof global?global:"undefined"!=typeof self?self:this); !function(r){var n=0,t=function(r){throw r},o={setGlobalHandler:function(r){t=r},getGlobalHandler:function(){return t},reportError:function(r){t&&t(r)},reportFatalError:function(r){t&&t(r,!0)},applyWithGuard:function(r,t,u){try{return n++,r.apply(t,u)}catch(r){o.reportError(r)}finally{n--}},applyWithGuardIfNeeded:function(r,n,t){if(o.inGuard())return r.apply(n,t);o.applyWithGuard(r,n,t)},inGuard:function(){return n},guard:function(r,n,t){function u(){return o.applyWithGuard(r,t||this,arguments,null,n)}return"function"!=typeof r?(console.warn("A function must be passed to ErrorUtils.guard, got ",r),null):(n=n||r.name||"",u)}};r.ErrorUtils=o}("undefined"!=typeof global?global:"undefined"!=typeof self?self:this); !function(e){if(void 0===Number.EPSILON&&Object.defineProperty(Number,"EPSILON",{value:Math.pow(2,-52)}),void 0===Number.MAX_SAFE_INTEGER&&Object.defineProperty(Number,"MAX_SAFE_INTEGER",{value:Math.pow(2,53)-1}),void 0===Number.MIN_SAFE_INTEGER&&Object.defineProperty(Number,"MIN_SAFE_INTEGER",{value:-(Math.pow(2,53)-1)}),!Number.isNaN){var r=e.isNaN;Object.defineProperty(Number,"isNaN",{configurable:!0,enumerable:!1,value:function(e){return"number"==typeof e&&r(e)},writable:!0})}}("undefined"!=typeof global?global:"undefined"!=typeof self?self:this); !function(t){String.prototype.startsWith||(String.prototype.startsWith=function(t){"use strict";if(null==this)throw TypeError();var r=String(this),n=arguments.length>1?Number(arguments[1])||0:0,e=Math.min(Math.max(n,0),r.length);return r.indexOf(String(t),n)===e}),String.prototype.endsWith||(String.prototype.endsWith=function(t){"use strict";if(null==this)throw TypeError();var r=String(this),n=r.length,e=String(t),i=arguments.length>1?Number(arguments[1])||0:n,o=Math.min(Math.max(i,0),n),h=o-e.length;return!(h<0)&&r.lastIndexOf(e,h)===h}),String.prototype.repeat||(String.prototype.repeat=function(t){"use strict";if(null==this)throw TypeError();var r=String(this);if((t=Number(t)||0)<0||t===1/0)throw RangeError();if(1===t)return r;for(var n="";t;)1&t&&(n+=r),(t>>=1)&&(r+=r);return n}),String.prototype.includes||(String.prototype.includes=function(t,r){"use strict";return"number"!=typeof r&&(r=0),!(r+t.length>this.length)&&-1!==this.indexOf(t,r)})}("undefined"!=typeof global?global:"undefined"!=typeof self&&self); !function(e){function r(e,r){if(null==this)throw new TypeError("Array.prototype.findIndex called on null or undefined");if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var n=Object(this),t=n.length>>>0,o=0;o=0?t=o:(t=n+o)<0&&(t=0);for(var i;t=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},t.possibleConstructorReturn=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},t.slicedToArray=function(){function e(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var f,u=e["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(n=(f=u.next()).done)&&(r.push(f.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{!n&&u.return&&u.return()}finally{if(o)throw i}}return r}return function(t,r){if(Array.isArray(t))return t;if(("function"==typeof Symbol?Symbol.iterator:"@@iterator")in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),t.taggedTemplateLiteral=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))},t.toArray=function(e){return Array.isArray(e)?e:Array.from(e)},t.toConsumableArray=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t-1}},31); __d(function(r,t,n,o){"use strict";var e=t(33);n.exports=function(r){if(!e(r))throw new TypeError(r+" is not a symbol");return r}},32); __d(function(t,o,r,n){"use strict";r.exports=function(t){return!!t&&("symbol"==typeof t||!!t.constructor&&("Symbol"===t.constructor.name&&"Symbol"===t[t.constructor.toStringTag]))}},33); __d(function(t,s,c,e){"use strict";c.exports=s(35)},34); __d(function(e,t,n,r){"use strict";var o=t(36),a=t(37),c=t(46),l=t(54),m=t(48),i=t(55),p=t(60),s=t(61),u=t(63),E=m.createElement,y=m.createFactory,C=m.cloneElement,d=o,f=function(e){return e},_={Children:{map:c.map,forEach:c.forEach,count:c.count,toArray:c.toArray,only:u},Component:a.Component,PureComponent:a.PureComponent,createElement:E,cloneElement:C,isValidElement:m.isValidElement,PropTypes:i,createClass:s,createFactory:y,createMixin:f,DOM:l,version:p,__spread:d};n.exports=_},35); __d(function(r,e,t,n){"use strict";function o(r){if(null===r||void 0===r)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(r)}var c=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var r=new String("abc");if(r[5]="de","5"===Object.getOwnPropertyNames(r)[0])return!1;for(var e={},t=0;t<10;t++)e["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(r){return e[r]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(r){n[r]=r}),"abcdefghijklmnopqrst"===Object.keys(babelHelpers.extends({},n)).join("")}catch(r){return!1}}()?Object.assign:function(r,e){for(var t,n,f=o(r),s=1;s1){for(var _=Array(y),d=0;d1){for(var h=Array(v),P=0;P>>0===e&&e>=0&&e<=4294967295?e:null:(r=b.hex6.exec(e))?parseInt(r[1]+"ff",16)>>>0:m.hasOwnProperty(e)?m[e]:(r=b.rgb.exec(e))?(u(r[1])<<24|u(r[2])<<16|u(r[3])<<8|255)>>>0:(r=b.rgba.exec(e))?(u(r[1])<<24|u(r[2])<<16|u(r[3])<<8|g(r[4]))>>>0:(r=b.hex3.exec(e))?parseInt(r[1]+r[1]+r[2]+r[2]+r[3]+r[3]+"ff",16)>>>0:(r=b.hex8.exec(e))?parseInt(r[1],16)>>>0:(r=b.hex4.exec(e))?parseInt(r[1]+r[1]+r[2]+r[2]+r[3]+r[3]+r[4]+r[4],16)>>>0:(r=b.hsl.exec(e))?(255|i(d(r[1]),s(r[2]),s(r[3])))>>>0:(r=b.hsla.exec(e))?(i(d(r[1]),s(r[2]),s(r[3]))|g(r[4]))>>>0:null}function t(e,r,a){return a<0&&(a+=1),a>1&&(a-=1),a<.16666666666666666?e+6*(r-e)*a:a<.5?r:a<.6666666666666666?e+(r-e)*(.6666666666666666-a)*6:e}function i(e,r,a){var l=a<.5?a*(1+r):a+r-a*r,n=2*a-l,i=t(n,l,e+.3333333333333333),o=t(n,l,e),u=t(n,l,e-.3333333333333333);return Math.round(255*i)<<24|Math.round(255*o)<<16|Math.round(255*u)<<8}function o(){for(var e=arguments.length,r=Array(e),a=0;a255?255:r}function d(e){return(parseFloat(e)%360+360)%360/360}function g(e){var r=parseFloat(e);return r<0?0:r>1?255:Math.round(255*r)}function s(e){var r=parseFloat(e,10);return r<0?0:r>100?1:r/100}var h="[-+]?\\d*\\.?\\d+",c=h+"%",b={rgb:new RegExp("rgb"+o(h,h,h)),rgba:new RegExp("rgba"+o(h,h,h,h)),hsl:new RegExp("hsl"+o(h,c,c)),hsla:new RegExp("hsla"+o(h,c,c,h)),hex3:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex4:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#([0-9a-fA-F]{6})$/,hex8:/^#([0-9a-fA-F]{8})$/},m={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199};a.exports=n},68); __d(function(i,t,n,e){"use strict";function s(i,t){return function(){if(t&&(!i.isMounted||i.isMounted()))return t.apply(i,arguments)}}var u=t(70),o=t(74),r=t(94),a=t(95),f=t(44),c={measure:function(i){r.measure(a(this),s(this,i))},measureInWindow:function(i){r.measureInWindow(a(this),s(this,i))},measureLayout:function(i,t,n){r.measureLayout(a(this),i,s(this,n),s(this,t))},setNativeProps:function(i){if(!this.viewConfig){var t=this.constructor,n=t.displayName||t.name||"";f(!1,n+' "viewConfig" is not defined.')}var e=u.create(i,this.viewConfig.validAttributes);r.updateView(a(this),this.viewConfig.uiViewClassName,e)},focus:function(){o.focusTextInput(a(this))},blur:function(){o.blurTextInput(a(this))}};n.exports=c},69); __d(function(r,n,f,o){"use strict";function t(r,n){return"object"!=typeof n||null===n||d(r,n)}function e(r){return"number"==typeof r?v.getByID(r):r}function i(r,n,f){if(Array.isArray(n))for(var o=n.length;o--&&b>0;)i(r,n[o],f);else if(n&&b>0){var t=e(n);for(var u in h)if(h[u]){var c=t[u];if(void 0!==c){var y=f[u];if(y){if("function"==typeof c&&(c=!0),void 0===c&&(c=null),"object"!=typeof y)r[u]=c;else if("function"==typeof y.diff||"function"==typeof y.process){var s="function"==typeof y.process?y.process(c):c;r[u]=s}h[u]=!1,b--}}}}}function u(r,n,f,o){var t,e=n.length0&&r&&(i(r,u,e),h=null);for(l in n)void 0===f[l]&&(e=o[l])&&(r&&void 0!==r[l]||void 0!==(y=n[l])&&("object"!=typeof e||"function"==typeof e.diff||"function"==typeof e.process?((r||(r={}))[l]=null,h||(h={}),h[l]||(h[l]=!0,b++)):r=s(r,y,e)));return r}function p(r,n,f){return l(r,g,n,f)}function a(r,n,f){return l(r,n,g,f)}var v=n(71),d=n(72),A=n(73),g={},h=null,b=0,j={create:function(r,n){return p(null,r,n)},diff:function(r,n,f){return l(null,r,n,f)}};f.exports=j},70); __d(function(e,n,r,t){"use strict";var l={},i=1,a={},s=function(){function e(){babelHelpers.classCallCheck(this,e)}return babelHelpers.createClass(e,null,[{key:"register",value:function(e){var n=++i;return l[n]=e,n}},{key:"getByID",value:function(e){if(!e)return a;var n=l[e];return n||(console.warn("Invalid style with id `"+e+"`. Skipping ..."),a)}}]),e}();r.exports=s},71); __d(function(r,t,n,e){"use strict";var f=function r(t,n){if(t===n)return!1;if("function"==typeof t&&"function"==typeof n)return!1;if("object"!=typeof t||null===t)return t!==n;if("object"!=typeof n||null===n)return!0;if(t.constructor!==n.constructor)return!0;if(Array.isArray(t)){var e=t.length;if(n.length!==e)return!0;for(var f=0;f0?r[r.length-1]:null,i=r.length>1?r[r.length-2]:null,u="function"==typeof a,l="function"==typeof i;l&&c(u,"Cannot have a non-function arg after a function arg.");var s=u?a:null,v=l?i:null,d=u+l;r=r.slice(0,r.length-d),f.enqueueNativeCall(n,t,r,v,s)},o.type=r,o}function u(e,n){return-1!==e.indexOf(n)}function l(e){var n=e.message,t=babelHelpers.objectWithoutProperties(e,["message"]),r=new Error(n);return r.framesToPop=1,babelHelpers.extends(r,t)}var f=n(77),s=n(93),c=n(44);e.__fbGenNativeModule=o;var v={};if(e.nativeModuleProxy)v=e.nativeModuleProxy;else{var d=e.__fbBatchedBridgeConfig;c(d,"__fbBatchedBridgeConfig is not set, cannot invoke native modules"),(d.remoteModuleConfig||[]).forEach(function(e,n){var t=o(e,n);t&&(t.module?v[t.name]=t.module:s(v,t.name,{get:function(){return a(t.name,n)}}))})}t.exports=v},76); __d(function(e,l,r,a){"use strict";var t=l(78),i=new t;i.registerCallableModule("Systrace",l(81)),i.registerCallableModule("JSTimersExecution",l(80)),i.registerCallableModule("HeapCapture",l(91)),i.registerCallableModule("SamplingProfiler",l(92)),Object.defineProperty(e,"__fbBatchedBridge",{configurable:!0,value:i}),r.exports=i},77); __d(function(e,t,l,u){"use strict";var s=t(79),i=t(80),n=t(81),a=(t(89),t(44)),h=(t(90),function(e){try{e()}catch(e){s.reportFatalError(e)}}),c=function(){function t(){babelHelpers.classCallCheck(this,t),this._callableModules={},this._queue=[[],[],[],0],this._callbacks=[],this._callbackID=0,this._callID=0,this._lastFlush=0,this._eventLoopStartTime=(new Date).getTime(),this.callFunctionReturnFlushedQueue=this.callFunctionReturnFlushedQueue.bind(this),this.callFunctionReturnResultAndFlushedQueue=this.callFunctionReturnResultAndFlushedQueue.bind(this),this.flushedQueue=this.flushedQueue.bind(this),this.invokeCallbackAndReturnFlushedQueue=this.invokeCallbackAndReturnFlushedQueue.bind(this)}return babelHelpers.createClass(t,[{key:"callFunctionReturnFlushedQueue",value:function(e,t,l){var u=this;return h(function(){u.__callFunction(e,t,l),u.__callImmediates()}),this.flushedQueue()}},{key:"callFunctionReturnResultAndFlushedQueue",value:function(e,t,l){var u=this,s=void 0;return h(function(){s=u.__callFunction(e,t,l),u.__callImmediates()}),[s,this.flushedQueue()]}},{key:"invokeCallbackAndReturnFlushedQueue",value:function(e,t){var l=this;return h(function(){l.__invokeCallback(e,t),l.__callImmediates()}),this.flushedQueue()}},{key:"flushedQueue",value:function(){this.__callImmediates();var e=this._queue;return this._queue=[[],[],[],this._callID],e[0].length?e:null}},{key:"getEventLoopRunningTime",value:function(){return(new Date).getTime()-this._eventLoopStartTime}},{key:"registerCallableModule",value:function(e,t){this._callableModules[e]=t}},{key:"enqueueNativeCall",value:function(t,l,u,s,i){(s||i)&&(s&&u.push(this._callbackID),this._callbacks[this._callbackID++]=s,i&&u.push(this._callbackID),this._callbacks[this._callbackID++]=i),this._callID++,this._queue[0].push(t),this._queue[1].push(l),this._queue[2].push(u);var a=(new Date).getTime();e.nativeFlushQueueImmediate&&a-this._lastFlush>=5&&(e.nativeFlushQueueImmediate(this._queue),this._queue=[[],[],[],this._callID],this._lastFlush=a),n.counterEvent("pending_js_to_native_queue",this._queue[0].length)}},{key:"createDebugLookup",value:function(e,t,l){}},{key:"__callImmediates",value:function(){n.beginEvent("JSTimersExecution.callImmediates()"),h(function(){return i.callImmediates()}),n.endEvent()}},{key:"__callFunction",value:function(e,t,l){this._lastFlush=(new Date).getTime(),this._eventLoopStartTime=this._lastFlush,n.beginEvent(e+"."+t+"()");var u=this._callableModules[e];a(!!u,"Module %s is not a registered callable module (calling %s)",e,t),a(!!u[t],"Method %s does not exist on module %s",t,e);var s=u[t].apply(u,l);return n.endEvent(),s}},{key:"__invokeCallback",value:function(e,t){this._lastFlush=(new Date).getTime(),this._eventLoopStartTime=this._lastFlush;var l=this._callbacks[e];l&&(this._callbacks[-2&e]=null,this._callbacks[1|e]=null,l.apply(null,t))}}],[{key:"spy",value:function(e){t.prototype.__spy=!0===e?function(e){console.log((0===e.type?"N->JS":"JS->N")+" : "+(e.module?e.module+".":"")+e.method+"("+JSON.stringify(e.args)+")")}:!1===e?null:e}}]),t}();l.exports=c},78); __d(function(r,o,t,i){t.exports=r.ErrorUtils},79); __d(function(e,r,t,l){"use strict";var i=r(81),a=r(44),n=r(82),s=r(40),o=!1,c={GUID:1,callbacks:[],types:[],timerIDs:[],immediates:[],requestIdleCallbacks:[],identifiers:[],errors:null,callTimer:function(e,r){s(e<=c.GUID,"Tried to call timer with ID %s but no such timer exists.",e);var t=c.timerIDs.indexOf(e);if(-1!==t){var l=c.types[t],i=c.callbacks[t];if(!i||!l)return void console.error("No callback found for timerID "+e);"setTimeout"!==l&&"setImmediate"!==l&&"requestAnimationFrame"!==l&&"requestIdleCallback"!==l||c._clearIndex(t);try{"setTimeout"===l||"setInterval"===l||"setImmediate"===l?i():"requestAnimationFrame"===l?i(n()):"requestIdleCallback"===l?i({timeRemaining:function(){return Math.max(0,16.666666666666668-(n()-r))}}):console.error("Tried to call a callback with invalid type: "+l)}catch(e){c.errors?c.errors.push(e):c.errors=[e]}}},callTimers:function(e){a(0!==e.length,"Cannot call `callTimers` with an empty list of IDs."),c.errors=null;for(var t=0;t1)for(var n=1;n0){var t=c.requestIdleCallbacks.slice();c.requestIdleCallbacks=[];for(var l=0;l0){var e=c.immediates.slice();c.immediates=[];for(var r=0;r0},callImmediates:function(){for(c.errors=null;c.callImmediatesPass(););c.errors&&c.errors.forEach(function(e){return r(85).setTimeout(function(){throw e},0)})},emitTimeDriftWarning:function(e){o||(o=!0,console.warn(e))},_clearIndex:function(e){c.timerIDs[e]=null,c.callbacks[e]=null,c.types[e]=null,c.identifiers[e]=null}};t.exports=c},80); __d(function(n,e,t,i){"use strict";var c=!1,o=0,r={setEnabled:function(n){c!==n&&(c=n)},beginEvent:function(e,t){c&&(e="function"==typeof e?e():e,n.nativeTraceBeginSection(131072,e,t))},endEvent:function(){c&&n.nativeTraceEndSection(131072)},beginAsyncEvent:function(e){var t=o;return c&&(o++,e="function"==typeof e?e():e,n.nativeTraceBeginAsyncSection(131072,e,t,0)),t},endAsyncEvent:function(e,t){c&&(e="function"==typeof e?e():e,n.nativeTraceEndAsyncSection(131072,e,t,0))},counterEvent:function(e,t){c&&(e="function"==typeof e?e():e,n.nativeTraceCounter&&n.nativeTraceCounter(131072,e,t))},attachToRelayProfiler:function(n){n.attachProfileHandler("*",function(n){var e=r.beginAsyncEvent(n);return function(){r.endAsyncEvent(n,e)}}),n.attachAggregateHandler("*",function(n,e){r.beginEvent(n),e(),r.endEvent()})},swizzleJSON:function(){r.measureMethods(JSON,"JSON",["parse","stringify"])},measureMethods:function(n,e,t){},measure:function(n,e,t){return t}};t.exports=r},81); __d(function(n,t,o,r){"use strict";var u,e=t(83);u=e.now?function(){return e.now()}:function(){return Date.now()},o.exports=u},82); __d(function(e,n,r,o){"use strict";var w,c=n(84);c.canUseDOM&&(w=window.performance||window.msPerformance||window.webkitPerformance),r.exports=w||{}},83); __d(function(e,n,t,o){"use strict";var d=!("undefined"==typeof window||!window.document||!window.document.createElement),i={canUseDOM:d,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:d&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:d&&!!window.screen,isInWorker:!d};t.exports=i},84); __d(function(e,t,r,n){"use strict";function a(){var e=s.timerIDs.indexOf(null);return-1===e&&(e=s.timerIDs.length),e}function i(e,t){var r=s.GUID++,n=a();return s.timerIDs[n]=r,s.callbacks[n]=e,s.types[n]=t,r}function l(e){if(null!=e){var t=s.timerIDs.indexOf(e);if(-1!==t){s._clearIndex(t);var r=s.types[t];"setImmediate"!==r&&"requestIdleCallback"!==r&&u.deleteTimer(e)}}}var u=t(76).Timing,s=t(80),c=(t(86),{setTimeout:function(e,t){for(var r=arguments.length,n=Array(r>2?r-2:0),a=2;a2?r-2:0),a=2;a1?t-1:0),n=1;n",lineNumber:+n[4],column:n[5]?+n[5]:null};else if(n=t.exec(i[c]))o={file:n[2],methodName:n[1]||"",lineNumber:+n[3],column:n[4]?+n[4]:null};else{if(!(n=u.exec(i[c])))continue;o={file:n[2],methodName:n[1]||"",lineNumber:+n[3],column:n[4]?+n[4]:null}}s.push(o)}return s}};o.exports=l},88); __d(function(t,n,c,i){"use strict";function o(t){}c.exports=o},89); __d(function(t,n,i,e){"use strict";function f(t){var n,i=typeof t;if(void 0===t)n="undefined";else if(null===t)n="null";else if("string"===i)n='"'+t+'"';else if("function"===i)try{n=t.toString()}catch(t){n="[function unknown]"}else try{n=JSON.stringify(t)}catch(i){if("function"==typeof t.toString)try{n=t.toString()}catch(t){}}return n||'["'+i+'" failed to stringify]'}i.exports=f},90); __d(function(e,t,a,r){"use strict";var p={captureHeap:function(a){var r=null;try{e.nativeCaptureHeap(a),console.log("HeapCapture.captureHeap succeeded: "+a)}catch(e){console.log("HeapCapture.captureHeap error: "+e.toString()),r=e.toString()}t(76).JSCHeapCapture.captureComplete(a,r)}};a.exports=p},91); __d(function(o,r,l,e){"use strict";var n={poke:function(l){var e=null,n=null;try{n=o.pokeSamplingProfiler(),null===n?console.log("The JSC Sampling Profiler has started"):console.log("The JSC Sampling Profiler has stopped")}catch(o){console.log("Error occured when restarting Sampling Profiler: "+o.toString()),e=o.toString()}r(76).JSCSamplingProfiler.operationComplete(l,n,e)}};l.exports=n},92); __d(function(e,t,n,r){"use strict";function i(e,t,n){function r(){return c||(c=!0,i(u())),b}function i(n){b=n,c=!0,Object.defineProperty(e,t,{value:n,configurable:!0,enumerable:o,writable:a})}var u=n.get,o=!1!==n.enumerable,a=!1!==n.writable,b=void 0,c=!1;Object.defineProperty(e,t,{get:r,set:i,configurable:!0,enumerable:o})}n.exports=i},93); __d(function(n,e,t,r){"use strict";var a=e(76),o=(e(75),e(93)),c=e(95),i=e(44),u=a.UIManager;i(u,"UIManager is undefined. The native module config is probably incorrect.");var s=u.takeSnapshot;u.takeSnapshot=function(n,e){return regeneratorRuntime.async(function(t){for(;;)switch(t.prev=t.next){case 0:if(s){t.next=3;break}return console.warn("UIManager.takeSnapshot is not available on this platform"),t.abrupt("return");case 3:return"number"!=typeof n&&"window"!==n&&(n=c(n)||"window"),t.abrupt("return",s(n,e));case 5:case"end":return t.stop()}},null,this)},Object.keys(u).forEach(function(n){var e=u[n];e.Manager&&(o(e,"Constants",{get:function(){var n=a[e.Manager],t={};return n&&Object.keys(n).forEach(function(e){var r=n[e];"function"!=typeof r&&(t[e]=r)}),t}}),o(e,"Commands",{get:function(){var n=a[e.Manager],t={},r=0;return n&&Object.keys(n).forEach(function(e){"function"==typeof n[e]&&(t[e]=r++)}),t}}))}),t.exports=u},94); __d(function(e,n,o,t){"use strict";function r(e){if(null==e)return null;if("number"==typeof e)return e;var n=e,o=d.get(n);if(o)return o.getHostNode();var t=n._rootNodeID;if(t)return t;f("object"==typeof n&&"_rootNodeID"in n||null!=n.render&&"function"==typeof n.render,"findNodeHandle(...): Argument is not a component (type: %s, keys: %s)",typeof n,Object.keys(n)),f(!1,"findNodeHandle(...): Unable to find node handle for unmounted component.")}var d=(n(49),n(96)),f=n(44);n(40);o.exports=r},95); __d(function(n,t,e,r){"use strict";var a={remove:function(n){n._reactInternalInstance=void 0},get:function(n){return n._reactInternalInstance},has:function(n){return void 0!==n._reactInternalInstance},set:function(n,t){n._reactInternalInstance=t}};e.exports=a},96); __d(function(t,s,c,e){"use strict";c.exports=s(35)},97); __d(function(e,t,r,o){"use strict";var i=t(99),s=t(71),l=t(112),a=t(129),n=t(73),u=i.roundToNearestPixel(.4);0===u&&(u=1/i.get());var b={position:"absolute",left:0,right:0,top:0,bottom:0},c=s.register(b);r.exports={hairlineWidth:u,absoluteFill:c,absoluteFillObject:b,flatten:n,setStyleAttributePreprocessor:function(e,t){var r=void 0;if("string"==typeof l[e])r={};else{if("object"!=typeof l[e])return void console.error(e+" is not a valid style attribute");r=l[e]}l[e]=babelHelpers.extends({},r,{process:t})},create:function(e){var t={};for(var r in e)a.validateStyle(r,e),t[r]=s.register(e[r]);return t}}},98); __d(function(e,t,n,u){"use strict";var r=t(100),a=function(){function e(){babelHelpers.classCallCheck(this,e)}return babelHelpers.createClass(e,null,[{key:"get",value:function(){return r.get("window").scale}},{key:"getFontScale",value:function(){return r.get("window").fontScale||e.get()}},{key:"getPixelSizeForLayoutSize",value:function(t){return Math.round(t*e.get())}},{key:"roundToNearestPixel",value:function(t){var n=e.get();return Math.round(t*n)/n}},{key:"startDetecting",value:function(){}}]),e}();n.exports=a},99); __d(function(e,s,i,n){"use strict";var t=(s(75),s(94)),l=s(101),a=s(44),c={},o=function(){function e(){babelHelpers.classCallCheck(this,e)}return babelHelpers.createClass(e,null,[{key:"set",value:function(e){if(e&&e.windowPhysicalPixels){e=JSON.parse(JSON.stringify(e));var s=e.windowPhysicalPixels;e.window={width:s.width/s.scale,height:s.height/s.scale,scale:s.scale,fontScale:s.fontScale},e.screen=e.window,delete e.windowPhysicalPixels}babelHelpers.extends(c,e)}},{key:"get",value:function(e){return a(c[e],"No dimension set for key "+e),c[e]}}]),e}();o.set(t.Dimensions),l.addListener("didUpdateDimensions",function(e){o.set(e)}),i.exports=o},100); __d(function(e,t,r,o){"use strict";var s=t(102),l=t(105),n=t(77),i=function(e){function r(){babelHelpers.classCallCheck(this,r);var e=new l,t=babelHelpers.possibleConstructorReturn(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e));return t.sharedSubscriber=e,t}return babelHelpers.inherits(r,e),babelHelpers.createClass(r,[{key:"_nativeEventModule",value:function(e){if(e){if(0===e.lastIndexOf("statusBar",0))return console.warn("`%s` event should be registered via the StatusBarIOS module",e),t(106);if(0===e.lastIndexOf("keyboard",0))return console.warn("`%s` event should be registered via the Keyboard module",e),t(108);if("appStateDidChange"===e||"memoryWarning"===e)return console.warn("`%s` event should be registered via the AppState module",e),t(110)}return null}},{key:"addListener",value:function(e,t,o){var s=this._nativeEventModule(e);return s?s.addListener(e,t,o):babelHelpers.get(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"addListener",this).call(this,e,t,o)}},{key:"removeAllListeners",value:function(e){var t=this._nativeEventModule(e);t&&e?t.removeAllListeners(e):babelHelpers.get(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"removeAllListeners",this).call(this,e)}},{key:"removeSubscription",value:function(e){e.emitter!==this?e.emitter.removeSubscription(e):babelHelpers.get(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"removeSubscription",this).call(this,e)}}]),r}(s);i=new i,n.registerCallableModule("RCTDeviceEventEmitter",i),r.exports=i},101); __d(function(e,r,t,i){"use strict";var s=r(103),n=r(105),u=r(41),o=r(44),c=function(){function e(r){babelHelpers.classCallCheck(this,e),this._subscriber=r||new n}return babelHelpers.createClass(e,[{key:"addListener",value:function(e,r,t){return this._subscriber.addSubscription(e,new s(this,this._subscriber,r,t))}},{key:"once",value:function(e,r,t){var i=this;return this.addListener(e,function(){for(var e=arguments.length,s=Array(e),n=0;n>>8)>>>0}var e=(r(75),r(68));t.exports=i},125); __d(function(t,n,r,u){"use strict";function c(t){return t}n(127),n(75),n(44),n(90);r.exports=c},126); __d(function(t,e,n,a){"use strict";var r=e(44),o={createIdentityMatrix:function(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]},createCopy:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]},createOrthographic:function(t,e,n,a,r,o){return[2/(e-t),0,0,0,0,2/(a-n),0,0,0,0,-2/(o-r),0,-(e+t)/(e-t),-(a+n)/(a-n),-(o+r)/(o-r),1]},createFrustum:function(t,e,n,a,r,o){var i=1/(e-t),u=1/(a-n),s=1/(r-o);return[r*i*2,0,0,0,0,r*u*2,0,0,(e+t)*i,(a+n)*u,(o+r)*s,-1,0,0,o*r*s*2,0]},createPerspective:function(t,e,n,a){var r=1/Math.tan(t/2),o=1/(n-a);return[r/e,0,0,0,0,r,0,0,0,0,(a+n)*o,-1,0,0,a*n*o*2,0]},createTranslate2d:function(t,e){var n=o.createIdentityMatrix();return o.reuseTranslate2dCommand(n,t,e),n},reuseTranslate2dCommand:function(t,e,n){t[12]=e,t[13]=n},reuseTranslate3dCommand:function(t,e,n,a){t[12]=e,t[13]=n,t[14]=a},createScale:function(t){var e=o.createIdentityMatrix();return o.reuseScaleCommand(e,t),e},reuseScaleCommand:function(t,e){t[0]=e,t[5]=e},reuseScale3dCommand:function(t,e,n,a){t[0]=e,t[5]=n,t[10]=a},reusePerspectiveCommand:function(t,e){t[11]=-1/e},reuseScaleXCommand:function(t,e){t[0]=e},reuseScaleYCommand:function(t,e){t[5]=e},reuseScaleZCommand:function(t,e){t[10]=e},reuseRotateXCommand:function(t,e){t[5]=Math.cos(e),t[6]=Math.sin(e),t[9]=-Math.sin(e),t[10]=Math.cos(e)},reuseRotateYCommand:function(t,e){t[0]=Math.cos(e),t[2]=-Math.sin(e),t[8]=Math.sin(e),t[10]=Math.cos(e)},reuseRotateZCommand:function(t,e){t[0]=Math.cos(e),t[1]=Math.sin(e),t[4]=-Math.sin(e),t[5]=Math.cos(e)},createRotateZ:function(t){var e=o.createIdentityMatrix();return o.reuseRotateZCommand(e,t),e},reuseSkewXCommand:function(t,e){t[4]=Math.tan(e)},reuseSkewYCommand:function(t,e){t[1]=Math.tan(e)},multiplyInto:function(t,e,n){var a=e[0],r=e[1],o=e[2],i=e[3],u=e[4],s=e[5],c=e[6],m=e[7],v=e[8],l=e[9],f=e[10],d=e[11],h=e[12],M=e[13],C=e[14],p=e[15],T=n[0],x=n[1],y=n[2],b=n[3];t[0]=T*a+x*u+y*v+b*h,t[1]=T*r+x*s+y*l+b*M,t[2]=T*o+x*c+y*f+b*C,t[3]=T*i+x*m+y*d+b*p,T=n[4],x=n[5],y=n[6],b=n[7],t[4]=T*a+x*u+y*v+b*h,t[5]=T*r+x*s+y*l+b*M,t[6]=T*o+x*c+y*f+b*C,t[7]=T*i+x*m+y*d+b*p,T=n[8],x=n[9],y=n[10],b=n[11],t[8]=T*a+x*u+y*v+b*h,t[9]=T*r+x*s+y*l+b*M,t[10]=T*o+x*c+y*f+b*C,t[11]=T*i+x*m+y*d+b*p,T=n[12],x=n[13],y=n[14],b=n[15],t[12]=T*a+x*u+y*v+b*h,t[13]=T*r+x*s+y*l+b*M,t[14]=T*o+x*c+y*f+b*C,t[15]=T*i+x*m+y*d+b*p},determinant:function(t){var e=babelHelpers.slicedToArray(t,16),n=e[0],a=e[1],r=e[2],o=e[3],i=e[4],u=e[5],s=e[6],c=e[7],m=e[8],v=e[9],l=e[10],f=e[11],d=e[12],h=e[13],M=e[14],C=e[15];return o*s*v*d-r*c*v*d-o*u*l*d+a*c*l*d+r*u*f*d-a*s*f*d-o*s*m*h+r*c*m*h+o*i*l*h-n*c*l*h-r*i*f*h+n*s*f*h+o*u*m*M-a*c*m*M-o*i*v*M+n*c*v*M+a*i*f*M-n*u*f*M-r*u*m*C+a*s*m*C+r*i*v*C-n*s*v*C-a*i*l*C+n*u*l*C},inverse:function(t){var e=o.determinant(t);if(!e)return t;var n=babelHelpers.slicedToArray(t,16),a=n[0],r=n[1],i=n[2],u=n[3],s=n[4],c=n[5],m=n[6],v=n[7],l=n[8],f=n[9],d=n[10],h=n[11],M=n[12],C=n[13],p=n[14],T=n[15];return[(m*h*C-v*d*C+v*f*p-c*h*p-m*f*T+c*d*T)/e,(u*d*C-i*h*C-u*f*p+r*h*p+i*f*T-r*d*T)/e,(i*v*C-u*m*C+u*c*p-r*v*p-i*c*T+r*m*T)/e,(u*m*f-i*v*f-u*c*d+r*v*d+i*c*h-r*m*h)/e,(v*d*M-m*h*M-v*l*p+s*h*p+m*l*T-s*d*T)/e,(i*h*M-u*d*M+u*l*p-a*h*p-i*l*T+a*d*T)/e,(u*m*M-i*v*M-u*s*p+a*v*p+i*s*T-a*m*T)/e,(i*v*l-u*m*l+u*s*d-a*v*d-i*s*h+a*m*h)/e,(c*h*M-v*f*M+v*l*C-s*h*C-c*l*T+s*f*T)/e,(u*f*M-r*h*M-u*l*C+a*h*C+r*l*T-a*f*T)/e,(r*v*M-u*c*M+u*s*C-a*v*C-r*s*T+a*c*T)/e,(u*c*l-r*v*l-u*s*f+a*v*f+r*s*h-a*c*h)/e,(m*f*M-c*d*M-m*l*C+s*d*C+c*l*p-s*f*p)/e,(r*d*M-i*f*M+i*l*C-a*d*C-r*l*p+a*f*p)/e,(i*c*M-r*m*M-i*s*C+a*m*C+r*s*p-a*c*p)/e,(r*m*l-i*c*l+i*s*f-a*m*f-r*s*d+a*c*d)/e]},transpose:function(t){return[t[0],t[4],t[8],t[12],t[1],t[5],t[9],t[13],t[2],t[6],t[10],t[14],t[3],t[7],t[11],t[15]]},multiplyVectorByMatrix:function(t,e){var n=babelHelpers.slicedToArray(t,4),a=n[0],r=n[1],o=n[2],i=n[3];return[a*e[0]+r*e[4]+o*e[8]+i*e[12],a*e[1]+r*e[5]+o*e[9]+i*e[13],a*e[2]+r*e[6]+o*e[10]+i*e[14],a*e[3]+r*e[7]+o*e[11]+i*e[15]]},v3Length:function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2])},v3Normalize:function(t,e){var n=1/(e||o.v3Length(t));return[t[0]*n,t[1]*n,t[2]*n]},v3Dot:function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]},v3Combine:function(t,e,n,a){return[n*t[0]+a*e[0],n*t[1]+a*e[1],n*t[2]+a*e[2]]},v3Cross:function(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]},quaternionToDegreesXYZ:function(t,e,n){var a=babelHelpers.slicedToArray(t,4),r=a[0],i=a[1],u=a[2],s=a[3],c=s*s,m=r*r,v=i*i,l=u*u,f=r*i+u*s,d=c+m+v+l,h=180/Math.PI;return f>.49999*d?[0,2*Math.atan2(r,s)*h,90]:f<-.49999*d?[0,-2*Math.atan2(r,s)*h,-90]:[o.roundTo3Places(Math.atan2(2*r*s-2*i*u,1-2*m-2*l)*h),o.roundTo3Places(Math.atan2(2*i*s-2*r*u,1-2*v-2*l)*h),o.roundTo3Places(Math.asin(2*r*i+2*u*s)*h)]},roundTo3Places:function(t){var e=t.toString().split("e");return.001*Math.round(e[0]+"e"+(e[1]?+e[1]-3:3))},decomposeMatrix:function(t){r(16===t.length,"Matrix decomposition needs a list of 3d matrix values, received %s",t);var e=[],n=[],a=[],i=[],u=[];if(t[15]){for(var s=[],c=[],m=0;m<4;m++){s.push([]);for(var v=0;v<4;v++){var l=t[4*m+v]/t[15];s[m].push(l),c.push(3===v?0:l)}}if(c[15]=1,o.determinant(c)){if(0!==s[0][3]||0!==s[1][3]||0!==s[2][3])var f=[s[0][3],s[1][3],s[2][3],s[3][3]],d=o.inverse(c),h=o.transpose(d),e=o.multiplyVectorByMatrix(f,h);else e[0]=e[1]=e[2]=0,e[3]=1;for(var m=0;m<3;m++)u[m]=s[3][m];var M=[];for(m=0;m<3;m++)M[m]=[s[m][0],s[m][1],s[m][2]];a[0]=o.v3Length(M[0]),M[0]=o.v3Normalize(M[0],a[0]),i[0]=o.v3Dot(M[0],M[1]),M[1]=o.v3Combine(M[1],M[0],1,-i[0]),i[0]=o.v3Dot(M[0],M[1]),M[1]=o.v3Combine(M[1],M[0],1,-i[0]),a[1]=o.v3Length(M[1]),M[1]=o.v3Normalize(M[1],a[1]),i[0]/=a[1],i[1]=o.v3Dot(M[0],M[2]),M[2]=o.v3Combine(M[2],M[0],1,-i[1]),i[2]=o.v3Dot(M[1],M[2]),M[2]=o.v3Combine(M[2],M[1],1,-i[2]),a[2]=o.v3Length(M[2]),M[2]=o.v3Normalize(M[2],a[2]),i[1]/=a[2],i[2]/=a[2];var C=o.v3Cross(M[1],M[2]);if(o.v3Dot(M[0],C)<0)for(m=0;m<3;m++)a[m]*=-1,M[m][0]*=-1,M[m][1]*=-1,M[m][2]*=-1;n[0]=.5*Math.sqrt(Math.max(1+M[0][0]-M[1][1]-M[2][2],0)),n[1]=.5*Math.sqrt(Math.max(1-M[0][0]+M[1][1]-M[2][2],0)),n[2]=.5*Math.sqrt(Math.max(1-M[0][0]-M[1][1]+M[2][2],0)),n[3]=.5*Math.sqrt(Math.max(1+M[0][0]+M[1][1]+M[2][2],0)),M[2][1]>M[1][2]&&(n[0]=-n[0]),M[0][2]>M[2][0]&&(n[1]=-n[1]),M[1][0]>M[0][1]&&(n[2]=-n[2]);var p;return p=n[0]<.001&&n[0]>=0&&n[1]<.001&&n[1]>=0?[0,0,o.roundTo3Places(180*Math.atan2(M[0][1],M[0][0])/Math.PI)]:o.quaternionToDegreesXYZ(n,s,M),{rotationDegrees:p,perspective:e,quaternion:n,scale:a,skew:i,translation:u,rotate:p[2],rotateX:p[0],rotateY:p[1],scaleX:a[0],scaleY:a[1],translateX:u[0],translateY:u[1]}}}}};n.exports=o},127); __d(function(t,i,h,d){"use strict";var e={width:void 0,height:void 0},n=function(t,i){return t=t||e,i=i||e,t!==i&&(t.width!==i.width||t.height!==i.height)};h.exports=n},128); __d(function(e,l,a,t){"use strict";var r=l(113),n=(l(121),l(120),l(122)),d=l(123),i=(l(44),function(){function e(){babelHelpers.classCallCheck(this,e)}return babelHelpers.createClass(e,null,[{key:"validateStyleProp",value:function(e,l,a){return}},{key:"validateStyle",value:function(e,l){return}},{key:"addValidStylePropTypes",value:function(e){for(var l in e)s[l]=e[l]}}]),e}()),s={};i.addValidStylePropTypes(r),i.addValidStylePropTypes(n),i.addValidStylePropTypes(d),a.exports=i},129); __d(function(e,n,o,t){"use strict";var s=n(131),i=n(69),a=n(76),r=n(75),c=n(97),l=(n(112),n(136)),d=n(137),p=n(123),u=n(44),b={};r.isTVOS&&(b=n(138));var f=n(139),y=c.PropTypes,T=d(p),R=["none","button","link","header","search","image","selected","plays","key","text","summary","disabled","frequentUpdates","startsMedia","adjustable","allowsDirectInteraction","pageTurn"],h=["none","button","radiobutton_checked","radiobutton_unchecked"],v=a.IOSConstants&&a.IOSConstants.forceTouchAvailable||!1,S={AccessibilityTraits:R,AccessibilityComponentType:h,forceTouchAvailable:v},m=c.createClass({displayName:"View",mixins:[i],viewConfig:{uiViewClassName:"RCTView",validAttributes:l.RCTView},statics:babelHelpers.extends({},S),propTypes:babelHelpers.extends({},b,{accessible:y.bool,accessibilityLabel:y.node,accessibilityComponentType:y.oneOf(h),accessibilityLiveRegion:y.oneOf(["none","polite","assertive"]),importantForAccessibility:y.oneOf(["auto","yes","no","no-hide-descendants"]),accessibilityTraits:y.oneOfType([y.oneOf(R),y.arrayOf(y.oneOf(R))]),onAccessibilityTap:y.func,onMagicTap:y.func,testID:y.string,onResponderGrant:y.func,onResponderMove:y.func,onResponderReject:y.func,onResponderRelease:y.func,onResponderTerminate:y.func,onResponderTerminationRequest:y.func,onStartShouldSetResponder:y.func,onStartShouldSetResponderCapture:y.func,onMoveShouldSetResponder:y.func,onMoveShouldSetResponderCapture:y.func,hitSlop:s,onLayout:y.func,pointerEvents:y.oneOf(["box-none","none","box-only","auto"]),style:T,removeClippedSubviews:y.bool,renderToHardwareTextureAndroid:y.bool,shouldRasterizeIOS:y.bool,collapsable:y.bool,needsOffscreenAlphaCompositing:y.bool}),contextTypes:{isInAParentText:c.PropTypes.bool},render:function(){return u((this.context.isInAParentText,!0),"Nesting of within is not supported on Android."),c.createElement(x,this.props)}}),x=f("RCTView",m,{nativeOnly:{nativeBackgroundAndroid:!0,nativeForegroundAndroid:!0}}),A=x;babelHelpers.extends(x,S),o.exports=A},130); __d(function(r,t,e,n){"use strict";var o=t(97),u=o.PropTypes,b=t(132),m=b({top:u.number,left:u.number,bottom:u.number,right:u.number});e.exports=m},131); __d(function(n,e,i,t){"use strict";function r(n){function e(e,i,t,r,d){if(!i[t])return void(e&&s(!1,"Required object `"+t+"` was not specified in `"+r+"`."));var a=i[t],c=typeof a,f=d&&o[d]||"(unknown)";"object"!==c&&s(!1,"Invalid "+f+" `"+t+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");var p=l(i[t],n);for(var v in p){var y=n[v];y||s(!1,"Invalid props."+t+" key `"+v+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(i[t],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(n),null," "));var b=y(a,v,r,d,null,u);b&&s(!1,b.message+"\nBad object: "+JSON.stringify(i[t],null," "))}}function i(n,i,t,r){return e(!1,n,i,t,r)}return i.isRequired=e.bind(null,!0),i}var o=e(67),u=e(120),s=e(44),l=e(133);i.exports=r},132); __d(function(r,t,n,u){"use strict";var c=t(134),e=function(r,t){var n={};return c(n,r),c(n,t),n};n.exports=e},133); __d(function(e,r,c,t){"use strict";function n(e,r){if(f(e),null!=r){i(r);for(var c in r)r.hasOwnProperty(c)&&(e[c]=r[c])}}var o=r(135),i=o.checkMergeObjectArg,f=o.checkMergeIntoObjectArg;c.exports=n},134); __d(function(e,r,t,n){"use strict";var c=r(44),o=r(115),a=function(e){return"object"!=typeof e||null===e},i={MAX_MERGE_DEPTH:36,isTerminal:a,normalizeMergeArg:function(e){return void 0===e||null===e?{}:e},checkMergeArrayArgs:function(e,r){c(Array.isArray(e)&&Array.isArray(r),"Tried to merge arrays, instead got %s and %s.",e,r)},checkMergeObjectArgs:function(e,r){i.checkMergeObjectArg(e),i.checkMergeObjectArg(r)},checkMergeObjectArg:function(e){c(!a(e)&&!Array.isArray(e),"Tried to merge an object, instead got %s.",e)},checkMergeIntoObjectArg:function(e){c(!(a(e)&&"function"!=typeof e||Array.isArray(e)),"Tried to merge into an object, instead got %s.",e)},checkMergeLevel:function(e){c(e<36,"Maximum deep merge depth exceeded. You may be attempting to merge circular structures in an unsupported way.")},checkArrayStrategy:function(e){c(void 0===e||e in i.ArrayStrategies,"You must provide an array strategy to deep merge functions to instruct the deep merge how to resolve merging two arrays.")},ArrayStrategies:o({Clobber:!0,IndexByIndex:!0})};t.exports=i},135); __d(function(e,i,s,t){"use strict";var a=i(112),c={};c.UIView={pointerEvents:!0,accessible:!0,accessibilityLabel:!0,accessibilityComponentType:!0,accessibilityLiveRegion:!0,accessibilityTraits:!0,importantForAccessibility:!0,testID:!0,renderToHardwareTextureAndroid:!0,shouldRasterizeIOS:!0,onLayout:!0,onAccessibilityTap:!0,onMagicTap:!0,collapsable:!0,needsOffscreenAlphaCompositing:!0,style:a},c.RCTView=babelHelpers.extends({},c.UIView,{removeClippedSubviews:!0}),s.exports=c},136); __d(function(r,n,t,u){"use strict";function c(r){var n=e(r);return function(r,t,u,c){var e=r;return r[t]&&(e={},e[t]=i(r[t])),n(e,t,u,c)}}var e=n(132),i=n(73);t.exports=c},137); __d(function(a,e,r,t){"use strict";var l=e(97).PropTypes,i={isTVSelectable:l.bool,hasTVPreferredFocus:l.bool,tvParallaxProperties:l.object,tvParallaxShiftDistanceX:l.number,tvParallaxShiftDistanceY:l.number,tvParallaxTiltAngle:l.number,tvParallaxMagnification:l.number};r.exports=i},138); __d(function(r,e,o,t){"use strict";function a(r,e,o){var t=n[r];if(!t||!t.NativeProps)return c(!1,'Native component for "%s" does not exist',r),C;t.uiViewClassName=r,t.validAttributes={},t.propTypes=e&&e.propTypes;var a=babelHelpers.extends({},n.RCTView.NativeProps,t.NativeProps);for(var s in a){var l=!1,v={},u=m[a[s]];u&&(v.diff=u,l=!0);var f=A[a[s]];f&&(v.process=f,l=!0),t.validAttributes[s]=!l||v}return t.validAttributes.style=i,p(t)}function s(r){return r&&r.map(f)}var i=e(112),n=e(94),C=e(140),p=e(141),l=e(178),v=e(124),u=e(179),f=e(125),d=e(180),I=e(128),c=(e(184),e(40)),m={CATransform3D:v,CGPoint:u,CGSize:I,UIEdgeInsets:l},A={CGColor:f,CGColorArray:s,UIColor:f,UIColorArray:s,CGImage:d,UIImage:d,RCTImageSource:d,Color:f,ColorArray:s};o.exports=a},139); __d(function(e,r,t,l){"use strict";var s=r(97),n=r(98),o=function(e){function t(){var e,r,l,s;babelHelpers.classCallCheck(this,t);for(var n=arguments.length,o=Array(n),a=0;a-1,"EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.",e),!l.plugins[t]){o(n.extractEvents,"EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.",e),l.plugins[t]=n;var i=n.eventTypes;for(var r in i)o(a(i[r],n,r),"EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.",r,e)}}}function a(e,n,t){o(!l.eventNameDispatchConfigs.hasOwnProperty(t),"EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.",t),l.eventNameDispatchConfigs[t]=e;var i=e.phasedRegistrationNames;if(i){for(var r in i)if(i.hasOwnProperty(r)){var a=i[r];s(a,n,t)}return!0}return!!e.registrationName&&(s(e.registrationName,n,t),!0)}function s(e,n,t){o(!l.registrationNameModules[e],"EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.",e),l.registrationNameModules[e]=n,l.registrationNameDependencies[e]=n.eventTypes[t].dependencies}var o=n(44),u=null,g={},l={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(e){o(!u,"EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React."),u=Array.prototype.slice.call(e),r()},injectEventPluginsByName:function(e){var n=!1;for(var t in e)if(e.hasOwnProperty(t)){var i=e[t];g.hasOwnProperty(t)&&g[t]===i||(o(!g[t],"EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.",t),g[t]=i,n=!0)}n&&r()},getPluginModuleForEvent:function(e){var n=e.dispatchConfig;if(n.registrationName)return l.registrationNameModules[n.registrationName]||null;if(void 0!==n.phasedRegistrationNames){var t=n.phasedRegistrationNames;for(var i in t)if(t.hasOwnProperty(i)){var r=l.registrationNameModules[t[i]];if(r)return r}}return null},_resetEventPlugins:function(){u=null;for(var e in g)g.hasOwnProperty(e)&&delete g[e];l.plugins.length=0;var n=l.eventNameDispatchConfigs;for(var t in n)n.hasOwnProperty(t)&&delete n[t];var i=l.registrationNameModules;for(var r in i)i.hasOwnProperty(r)&&delete i[r]}};t.exports=l},146); __d(function(e,t,n,r){"use strict";function s(e){return"topMouseUp"===e||"topTouchEnd"===e||"topTouchCancel"===e}function a(e){return"topMouseMove"===e||"topTouchMove"===e}function c(e){return"topMouseDown"===e||"topTouchStart"===e}function o(e,t,n,r){var s=e.type||"unknown-event";e.currentTarget=_.getNodeFromInstance(r),t?v.invokeGuardedCallbackWithCatch(s,n,e):v.invokeGuardedCallback(s,n,e),e.currentTarget=null}function i(e,t){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var s=0;s=t)return e[r];return e[e.length-1]||1}}]),e}();r.exports=l},182); __d(function(e,r,t,n){"use strict";function a(e){switch(e){case.75:return"ldpi";case 1:return"mdpi";case 1.5:return"hdpi";case 2:return"xhdpi";case 3:return"xxhdpi";case 4:return"xxxhdpi"}}function i(e,r){var t=a(r);if(!t)throw new Error("Don't know which android drawable suffix to use for asset: "+JSON.stringify(e));return"drawable-"+t}function s(e){return(o(e)+"/"+e.name).toLowerCase().replace(/\//g,"_").replace(/([^a-z0-9_])/g,"").replace(/^assets_/,"")}function o(e){var r=e.httpServerLocation;return"/"===r[0]&&(r=r.substr(1)),r}t.exports={getAndroidAssetSuffix:a,getAndroidDrawableFolderName:i,getAndroidResourceIdentifier:s,getBasePath:o}},183); __d(function(e,o,r,a){"use strict";function p(e,o,r){if(o){var a=e.displayName||e.name||"unknown";if(!e.propTypes)throw new Error("`"+a+"` has no propTypes defined`");var p=o.NativeProps;for(var t in p)if(!(e.propTypes[t]||n[t]||r&&r[t])){var i;throw i=e.propTypes.hasOwnProperty(t)?"`"+a+"` has incorrectly defined propType for native prop `"+o.uiViewClassName+"."+t+"` of native type `"+p[t]:"`"+a+"` has no propType for native prop `"+o.uiViewClassName+"."+t+"` of native type `"+p[t]+"`",i+="\nIf you haven't changed this prop yourself, this usually means that your versions of the native code and JavaScript code are out of sync. Updating both should make this error go away.",new Error(i)}}}var n=o(112);r.exports=p},184); __d(function(e,t,r,n){"use strict";function i(e,t){if(null==e||null==t)return!0;if(e.length!==t.length)return!0;for(var r=0;r must be a child of a "),W.createElement(M,{opacity:u(e),transform:a(e)},this.props.children)}}]),t}(W.Component);U.contextTypes={isInSurface:W.PropTypes.bool.isRequired};var $=function(e){function t(){return babelHelpers.classCallCheck(this,t),babelHelpers.possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"render",value:function(){var e=this.props,t=s(e.x,0),r=s(e.y,0),n=s(e.width,0),i=s(e.height,0),l=[t,r,n,i],o=j(e);return delete o.x,delete o.y,W.createElement(M,{clipping:l,opacity:u(e),transform:a(o)},this.props.children)}}]),t}(W.Component),B=0,K=1,Q=2,Z=3,ee=function(e){function t(){return babelHelpers.classCallCheck(this,t),babelHelpers.possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"render",value:function(){var e=this.props,t=e.d||o(e.children),r=new T(t).toJSON();return W.createElement(X,{fill:y(e.fill,e),opacity:u(e),stroke:g(e.stroke),strokeCap:m(e.strokeCap),strokeDash:e.strokeDash||null,strokeJoin:v(e.strokeJoin),strokeWidth:s(e.strokeWidth,1),transform:a(e),d:r})}}]),t}(W.Component),te={},re=/^[\s"']*/,ne=/[\s"']*$/,ie=/\n/g,le=function(e){function t(){return babelHelpers.classCallCheck(this,t),babelHelpers.possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"render",value:function(){var e=this.props,t=e.path?new T(e.path).toJSON():null,r=S(e.font,o(e.children));return W.createElement(Y,{fill:y(e.fill,e),opacity:u(e),stroke:g(e.stroke),strokeCap:m(e.strokeCap),strokeDash:e.strokeDash||null,strokeJoin:v(e.strokeJoin),strokeWidth:s(e.strokeWidth,1),transform:a(e),alignment:w(e.alignment),frame:r,path:t})}}]),t}(W.Component),oe={LinearGradient:H,RadialGradient:x,Pattern:O,Transform:P,Path:T,Surface:q,Group:U,ClippingRectangle:$,Shape:ee,Text:le};r.exports=oe},185); __d(function(t,r,e,n){var a={maroon:"#800000",red:"#ff0000",orange:"#ffA500",yellow:"#ffff00",olive:"#808000",purple:"#800080",fuchsia:"#ff00ff",white:"#ffffff",lime:"#00ff00",green:"#008000",navy:"#000080",blue:"#0000ff",aqua:"#00ffff",teal:"#008080",black:"#000000",silver:"#c0c0c0",gray:"#808080"},h=function(t,r){for(var e=[],n=0,a=t.length;nY?(p-=v,c-=X):l>0&&0!=Y&&(p-=l/Y*v,c-=l/Y*X),a=p*p+c*c,p=s-t,c=h-i,l=p*v+c*X,l>Y?(p-=v,c-=X):l>0&&0!=Y&&(p-=l/Y*v,c-=l/Y*X),u=p*p+c*c,a<.01&&u<.01)return void this.onLine(t,i,o,r);if(isNaN(a)||isNaN(u))throw new Error("Bad input");var f=.5*(n+s),M=.5*(e+h),b=.5*(n+t),T=.5*(e+i),k=.5*(b+f),w=.5*(T+M),_=.5*(o+s),D=.5*(r+h),z=.5*(_+f),C=.5*(D+M),m=.5*(k+z),B=.5*(w+C);this.onBezierCurve(t,i,b,T,k,w,m,B),this.onBezierCurve(m,B,z,C,_,D,o,r)},onArc:function(t,i,n,e,s,h,o,r,a,u,p,c){var l=c?c*Math.PI/180:0,v=Math.cos(l),X=Math.sin(l),Y=v*o,f=-X*r,M=X*o,b=v*r,T=u-a;T<0&&!p?T+=2*Math.PI:T>0&&p&&(T-=2*Math.PI);for(var k=Math.ceil(Math.abs(T/(Math.PI/2))),w=T/k,_=1.3333333333333333*Math.tan(w/4),D=Math.cos(a),z=Math.sin(a),C=0;Ci.yy/i.xy?-1:1;return(i.xx<0?i.xy>=0:i.xy<0)&&(n=-n),this.rotate(t-180*Math.atan2(n*i.yx,n*i.xx)/Math.PI,x,y)},scaleTo:function(t,x){var y=this,i=Math.sqrt(y.xx*y.xx+y.yx*y.yx);return y.xx/=i,y.yx/=i,i=Math.sqrt(y.yy*y.yy+y.xy*y.xy),y.yy/=i,y.xy/=i,this.scale(t,x)},resizeTo:function(t,x){var y=this.width,i=this.height;return y&&i?this.scaleTo(t/y,x/i):this},inversePoint:function(t,x){var y=this.xx,i=this.yx,n=this.xy,r=this.yy,s=this.x,h=this.y,o=i*n-y*r;return 0==o?null:{x:(r*(s-t)+n*(x-h))/o,y:(y*(h-x)+i*(t-s))/o}},point:function(t,x){var y=this;return{x:y.xx*t+y.xy*x+y.x,y:y.yx*t+y.yy*x+y.y}}})},190); __d(function(e,t,s,r){"use strict";var o=t(66),i=(t(75),t(97)),l=t(98),n=t(192),a=(t(199),t(200)),p=t(130),c=t(44),b=function(e){function t(){return babelHelpers.classCallCheck(this,t),babelHelpers.possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"render",value:function(){var e=this.props,t=e.accessibilityLabel,s=e.color,r=e.onPress,o=e.title,l=e.disabled,b=e.testID,u=[d.button],y=[d.text],h=a;s?y.push({color:s}):s&&u.push({backgroundColor:s}),l&&(u.push(d.buttonDisabled),y.push(d.textDisabled)),c("string"==typeof o,"The title prop of a Button must be a string");var f=o;return i.createElement(h,{accessibilityComponentType:"button",accessibilityLabel:t,accessibilityTraits:["button"],testID:b,disabled:l,onPress:r},i.createElement(p,{style:u},i.createElement(n,{style:y},f)))}}]),t}(i.Component);b.propTypes={title:i.PropTypes.string.isRequired,accessibilityLabel:i.PropTypes.string,color:o,disabled:i.PropTypes.bool,onPress:i.PropTypes.func.isRequired,testID:i.PropTypes.string};var u="#2196F3";u="#0C42FD";var d=l.create({button:{},text:{color:u,textAlign:"center",padding:8,fontSize:18},buttonDisabled:{},textDisabled:{color:"#cdcdcd"}});s.exports=b},191); __d(function(e,s,t,n){"use strict";var o=s(66),i=s(131),r=s(69),l=(s(75),s(97)),a=s(136),p=s(137),h=s(122),d=s(193),u=s(125),c=s(141),b=s(198),g=l.PropTypes,f=p(h),R={validAttributes:b(a.UIView,{isHighlighted:!0,numberOfLines:!0,ellipsizeMode:!0,allowFontScaling:!0,selectable:!0,selectionColor:!0,adjustsFontSizeToFit:!0,minimumFontScale:!0,textBreakStrategy:!0}),uiViewClassName:"RCTText"},H=l.createClass({displayName:"Text",propTypes:{ellipsizeMode:g.oneOf(["head","middle","tail","clip"]),numberOfLines:g.number,textBreakStrategy:g.oneOf(["simple","highQuality","balanced"]),onLayout:g.func,onPress:g.func,onLongPress:g.func,pressRetentionOffset:i,selectable:g.bool,selectionColor:o,suppressHighlighting:g.bool,style:f,testID:g.string,allowFontScaling:g.bool,accessible:g.bool,adjustsFontSizeToFit:g.bool,minimumFontScale:g.number},getDefaultProps:function(){return{accessible:!0,allowFontScaling:!0,ellipsizeMode:"tail"}},getInitialState:function(){return b(d.Mixin.touchableGetInitialState(),{isHighlighted:!1})},mixins:[r],viewConfig:R,getChildContext:function(){return{isInAParentText:!0}},childContextTypes:{isInAParentText:g.bool},contextTypes:{isInAParentText:g.bool},_handlers:null,_hasPressHandler:function(){return!!this.props.onPress||!!this.props.onLongPress},touchableHandleActivePressIn:null,touchableHandleActivePressOut:null,touchableHandlePress:null,touchableHandleLongPress:null,touchableGetPressRectOffset:null,render:function(){var e=this,s=this.props;return(this.props.onStartShouldSetResponder||this._hasPressHandler())&&(this._handlers||(this._handlers={onStartShouldSetResponder:function(){var s=e.props.onStartShouldSetResponder&&e.props.onStartShouldSetResponder(),t=s||e._hasPressHandler();if(t&&!e.touchableHandleActivePressIn){for(var n in d.Mixin)"function"==typeof d.Mixin[n]&&(e[n]=d.Mixin[n].bind(e));e.touchableHandleActivePressIn=function(){!e.props.suppressHighlighting&&e._hasPressHandler()&&e.setState({isHighlighted:!0})},e.touchableHandleActivePressOut=function(){!e.props.suppressHighlighting&&e._hasPressHandler()&&e.setState({isHighlighted:!1})},e.touchableHandlePress=function(s){e.props.onPress&&e.props.onPress(s)},e.touchableHandleLongPress=function(s){e.props.onLongPress&&e.props.onLongPress(s)},e.touchableGetPressRectOffset=function(){return this.props.pressRetentionOffset||P}}return t},onResponderGrant:function(e,s){this.touchableHandleResponderGrant(e,s),this.props.onResponderGrant&&this.props.onResponderGrant.apply(this,arguments)}.bind(this),onResponderMove:function(e){this.touchableHandleResponderMove(e),this.props.onResponderMove&&this.props.onResponderMove.apply(this,arguments)}.bind(this),onResponderRelease:function(e){this.touchableHandleResponderRelease(e),this.props.onResponderRelease&&this.props.onResponderRelease.apply(this,arguments)}.bind(this),onResponderTerminate:function(e){this.touchableHandleResponderTerminate(e),this.props.onResponderTerminate&&this.props.onResponderTerminate.apply(this,arguments)}.bind(this),onResponderTerminationRequest:function(){var e=this.touchableHandleResponderTerminationRequest();return e&&this.props.onResponderTerminationRequest&&(e=this.props.onResponderTerminationRequest.apply(this,arguments)),e}.bind(this)}),s=babelHelpers.extends({},this.props,this._handlers,{isHighlighted:this.state.isHighlighted})),null!=s.selectionColor&&(s=babelHelpers.extends({},s,{selectionColor:u(s.selectionColor)})),d.TOUCH_TARGET_DEBUG&&s.onPress&&(s=babelHelpers.extends({},s,{style:[this.props.style,{color:"magenta"}]})),this.context.isInAParentText?l.createElement(S,s):l.createElement(m,s)}}),P={top:20,left:20,right:20,bottom:30},m=c(R),S=m;t.exports=H},192); __d(function(E,t,e,R){"use strict";var i=t(194),_=t(75),s=t(195),S=(t(97),t(196)),o=t(197),n=t(94),a=(t(130),t(95)),l=t(115),T=(t(68),l({NOT_RESPONDER:null,RESPONDER_INACTIVE_PRESS_IN:null,RESPONDER_INACTIVE_PRESS_OUT:null,RESPONDER_ACTIVE_PRESS_IN:null,RESPONDER_ACTIVE_PRESS_OUT:null,RESPONDER_ACTIVE_LONG_PRESS_IN:null,RESPONDER_ACTIVE_LONG_PRESS_OUT:null,ERROR:null})),N={RESPONDER_ACTIVE_PRESS_OUT:!0,RESPONDER_ACTIVE_PRESS_IN:!0},h={RESPONDER_INACTIVE_PRESS_IN:!0,RESPONDER_ACTIVE_PRESS_IN:!0,RESPONDER_ACTIVE_LONG_PRESS_IN:!0},P={RESPONDER_ACTIVE_LONG_PRESS_IN:!0},O=l({DELAY:null,RESPONDER_GRANT:null,RESPONDER_RELEASE:null,RESPONDER_TERMINATED:null,ENTER_PRESS_RECT:null,LEAVE_PRESS_RECT:null,LONG_PRESS_DETECTED:null}),u={NOT_RESPONDER:{DELAY:T.ERROR,RESPONDER_GRANT:T.RESPONDER_INACTIVE_PRESS_IN,RESPONDER_RELEASE:T.ERROR,RESPONDER_TERMINATED:T.ERROR,ENTER_PRESS_RECT:T.ERROR,LEAVE_PRESS_RECT:T.ERROR,LONG_PRESS_DETECTED:T.ERROR},RESPONDER_INACTIVE_PRESS_IN:{DELAY:T.RESPONDER_ACTIVE_PRESS_IN,RESPONDER_GRANT:T.ERROR,RESPONDER_RELEASE:T.NOT_RESPONDER,RESPONDER_TERMINATED:T.NOT_RESPONDER,ENTER_PRESS_RECT:T.RESPONDER_INACTIVE_PRESS_IN,LEAVE_PRESS_RECT:T.RESPONDER_INACTIVE_PRESS_OUT,LONG_PRESS_DETECTED:T.ERROR},RESPONDER_INACTIVE_PRESS_OUT:{DELAY:T.RESPONDER_ACTIVE_PRESS_OUT,RESPONDER_GRANT:T.ERROR,RESPONDER_RELEASE:T.NOT_RESPONDER,RESPONDER_TERMINATED:T.NOT_RESPONDER,ENTER_PRESS_RECT:T.RESPONDER_INACTIVE_PRESS_IN,LEAVE_PRESS_RECT:T.RESPONDER_INACTIVE_PRESS_OUT,LONG_PRESS_DETECTED:T.ERROR},RESPONDER_ACTIVE_PRESS_IN:{DELAY:T.ERROR,RESPONDER_GRANT:T.ERROR,RESPONDER_RELEASE:T.NOT_RESPONDER,RESPONDER_TERMINATED:T.NOT_RESPONDER,ENTER_PRESS_RECT:T.RESPONDER_ACTIVE_PRESS_IN,LEAVE_PRESS_RECT:T.RESPONDER_ACTIVE_PRESS_OUT,LONG_PRESS_DETECTED:T.RESPONDER_ACTIVE_LONG_PRESS_IN},RESPONDER_ACTIVE_PRESS_OUT:{DELAY:T.ERROR,RESPONDER_GRANT:T.ERROR,RESPONDER_RELEASE:T.NOT_RESPONDER,RESPONDER_TERMINATED:T.NOT_RESPONDER,ENTER_PRESS_RECT:T.RESPONDER_ACTIVE_PRESS_IN,LEAVE_PRESS_RECT:T.RESPONDER_ACTIVE_PRESS_OUT,LONG_PRESS_DETECTED:T.ERROR},RESPONDER_ACTIVE_LONG_PRESS_IN:{DELAY:T.ERROR,RESPONDER_GRANT:T.ERROR,RESPONDER_RELEASE:T.NOT_RESPONDER,RESPONDER_TERMINATED:T.NOT_RESPONDER,ENTER_PRESS_RECT:T.RESPONDER_ACTIVE_LONG_PRESS_IN,LEAVE_PRESS_RECT:T.RESPONDER_ACTIVE_LONG_PRESS_OUT,LONG_PRESS_DETECTED:T.RESPONDER_ACTIVE_LONG_PRESS_IN},RESPONDER_ACTIVE_LONG_PRESS_OUT:{DELAY:T.ERROR,RESPONDER_GRANT:T.ERROR,RESPONDER_RELEASE:T.NOT_RESPONDER,RESPONDER_TERMINATED:T.NOT_RESPONDER,ENTER_PRESS_RECT:T.RESPONDER_ACTIVE_LONG_PRESS_IN,LEAVE_PRESS_RECT:T.RESPONDER_ACTIVE_LONG_PRESS_OUT,LONG_PRESS_DETECTED:T.ERROR},error:{DELAY:T.NOT_RESPONDER,RESPONDER_GRANT:T.RESPONDER_INACTIVE_PRESS_IN,RESPONDER_RELEASE:T.NOT_RESPONDER,RESPONDER_TERMINATED:T.NOT_RESPONDER,ENTER_PRESS_RECT:T.NOT_RESPONDER,LEAVE_PRESS_RECT:T.NOT_RESPONDER,LONG_PRESS_DETECTED:T.NOT_RESPONDER}},r={componentDidMount:function(){_.isTVOS&&(this._tvEventHandler=new S,this._tvEventHandler.enable(this,function(E,t){var e=a(E);t.dispatchConfig={},e===t.tag&&("focus"===t.eventType?E.touchableHandleActivePressIn&&E.touchableHandleActivePressIn(t):"blur"===t.eventType?E.touchableHandleActivePressOut&&E.touchableHandleActivePressOut(t):"select"===t.eventType&&E.touchableHandlePress&&E.touchableHandlePress(t))}))},componentWillUnmount:function(){this._tvEventHandler&&(this._tvEventHandler.disable(),delete this._tvEventHandler),this.touchableDelayTimeout&&clearTimeout(this.touchableDelayTimeout),this.longPressDelayTimeout&&clearTimeout(this.longPressDelayTimeout),this.pressOutDelayTimeout&&clearTimeout(this.pressOutDelayTimeout)},touchableGetInitialState:function(){return{touchable:{touchState:void 0,responderID:null}}},touchableHandleResponderTerminationRequest:function(){return!this.props.rejectResponderTermination},touchableHandleStartShouldSetResponder:function(){return!this.props.disabled},touchableLongPressCancelsPress:function(){return!0},touchableHandleResponderGrant:function(E){var t=E.currentTarget;E.persist(),this.pressOutDelayTimeout&&clearTimeout(this.pressOutDelayTimeout),this.pressOutDelayTimeout=null,this.state.touchable.touchState=T.NOT_RESPONDER,this.state.touchable.responderID=t,this._receiveSignal(O.RESPONDER_GRANT,E);var e=void 0!==this.touchableGetHighlightDelayMS?Math.max(this.touchableGetHighlightDelayMS(),0):130;e=isNaN(e)?130:e,0!==e?this.touchableDelayTimeout=setTimeout(this._handleDelay.bind(this,E),e):this._handleDelay(E);var R=void 0!==this.touchableGetLongPressDelayMS?Math.max(this.touchableGetLongPressDelayMS(),10):370;R=isNaN(R)?370:R,this.longPressDelayTimeout=setTimeout(this._handleLongDelay.bind(this,E),R+e)},touchableHandleResponderRelease:function(E){this._receiveSignal(O.RESPONDER_RELEASE,E)},touchableHandleResponderTerminate:function(E){this._receiveSignal(O.RESPONDER_TERMINATED,E)},touchableHandleResponderMove:function(E){if(this.state.touchable.touchState!==T.RESPONDER_INACTIVE_PRESS_IN&&this.state.touchable.positionOnActivate){var t=this.state.touchable.positionOnActivate,e=this.state.touchable.dimensionsOnActivate,R=this.touchableGetPressRectOffset?this.touchableGetPressRectOffset():{left:20,right:20,top:20,bottom:20},i=R.left,_=R.top,s=R.right,S=R.bottom,n=this.touchableGetHitSlop?this.touchableGetHitSlop():null;n&&(i+=n.left,_+=n.top,s+=n.right,S+=n.bottom);var a=o.extractSingleTouch(E.nativeEvent),l=a&&a.pageX,N=a&&a.pageY;if(this.pressInLocation){this._getDistanceBetweenPoints(l,N,this.pressInLocation.pageX,this.pressInLocation.pageY)>10&&this._cancelLongPressDelayTimeout()}if(l>t.left-i&&N>t.top-_&&l0,r=n&&n.length>0;return!c&&r?n[0]:c?e[0]:t}};n.exports=r},197); __d(function(r,n,t,i){"use strict";var o=function(r,n){var t={};for(var i in r)t[i]=r[i];for(var o in n)t[o]=n[o];return t};t.exports=o},198); __d(function(e,t,r,n){"use strict";var o=t(97),s=t(98),i=t(192),l=t(130),a=function(e){function t(){return babelHelpers.classCallCheck(this,t),babelHelpers.possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"render",value:function(){return o.createElement(l,{style:[c.container,this.props.style]},o.createElement(i,{style:c.info},"TouchableNativeFeedback is not supported on this platform!"))}}]),t}(o.Component),c=s.create({container:{height:100,width:300,backgroundColor:"#ffbcbc",borderWidth:1,borderColor:"red",alignItems:"center",justifyContent:"center",margin:10},info:{color:"#333333",margin:20}});r.exports=a},199); __d(function(t,e,s,i){"use strict";var o=e(201),n=e(217),r=e(69),p=e(97),a=e(276),c=e(193),l=e(277),h=e(278),u=e(73),y={top:20,left:20,right:20,bottom:30},d=p.createClass({displayName:"TouchableOpacity",mixins:[a,c.Mixin,r],propTypes:babelHelpers.extends({},l.propTypes,{activeOpacity:p.PropTypes.number,focusedOpacity:p.PropTypes.number,tvParallaxProperties:p.PropTypes.object}),getDefaultProps:function(){return{activeOpacity:.2,focusedOpacity:.7}},getInitialState:function(){return babelHelpers.extends({},this.touchableGetInitialState(),{anim:new o.Value(1)})},componentDidMount:function(){h(this.props)},componentWillReceiveProps:function(t){h(t)},setOpacityTo:function(t,e){o.timing(this.state.anim,{toValue:t,duration:e,easing:n.inOut(n.quad),useNativeDriver:!0}).start()},touchableHandleActivePressIn:function(t){"onResponderGrant"===t.dispatchConfig.registrationName?this._opacityActive(0):this._opacityActive(150),this.props.onPressIn&&this.props.onPressIn(t)},touchableHandleActivePressOut:function(t){this._opacityInactive(250),this.props.onPressOut&&this.props.onPressOut(t)},touchableHandlePress:function(t){this.props.onPress&&this.props.onPress(t)},touchableHandleLongPress:function(t){this.props.onLongPress&&this.props.onLongPress(t)},touchableGetPressRectOffset:function(){return this.props.pressRetentionOffset||y},touchableGetHitSlop:function(){return this.props.hitSlop},touchableGetHighlightDelayMS:function(){return this.props.delayPressIn||0},touchableGetLongPressDelayMS:function(){return 0===this.props.delayLongPress?0:this.props.delayLongPress||500},touchableGetPressOutDelayMS:function(){return this.props.delayPressOut},_opacityActive:function(t){this.setOpacityTo(this.props.activeOpacity,t)},_opacityInactive:function(t){var e=u(this.props.style)||{};this.setOpacityTo(void 0===e.opacity?1:e.opacity,t)},_opacityFocused:function(){this.setOpacityTo(this.props.focusedOpacity)},render:function(){return p.createElement(o.View,{accessible:!1!==this.props.accessible,accessibilityLabel:this.props.accessibilityLabel,accessibilityComponentType:this.props.accessibilityComponentType,accessibilityTraits:this.props.accessibilityTraits,style:[this.props.style,{opacity:this.state.anim}],testID:this.props.testID,onLayout:this.props.onLayout,isTVSelectable:!0,tvParallaxProperties:this.props.tvParallaxProperties,hitSlop:this.props.hitSlop,onStartShouldSetResponder:this.touchableHandleStartShouldSetResponder,onResponderTerminationRequest:this.touchableHandleResponderTerminationRequest,onResponderGrant:this.touchableHandleResponderGrant,onResponderMove:this.touchableHandleResponderMove,onResponderRelease:this.touchableHandleResponderRelease,onResponderTerminate:this.touchableHandleResponderTerminate},this.props.children,c.renderDebugView({color:"cyan",hitSlop:this.props.hitSlop}))}});s.exports=d},200); __d(function(e,t,n,a){"use strict";var o=t(202),m=t(219),r=t(192),i=t(130),c=t(221);n.exports=babelHelpers.extends({},o,{View:o.createAnimatedComponent(i),Text:o.createAnimatedComponent(r),Image:o.createAnimatedComponent(m),ScrollView:o.createAnimatedComponent(c)})},201); __d(function(t,e,i,a){"use strict";function n(t){return t.useNativeDriver&&!h.isNativeAnimatedAvailable()?(k||(console.warn("Animated: `useNativeDriver` is not supported because the native animated module is missing. Falling back to JS-based animation. To resolve this, add `RCTAnimation` module to this app, or remove `useNativeDriver`. More info: https://github.com/facebook/react-native/issues/11094#issuecomment-263240420"),k=!0),!1):t.useNativeDriver||!1}function s(t){function e(t){"function"==typeof t.update?i.add(t):t.__getChildren().forEach(e)}var i=new v;e(t),i.forEach(function(t){return t.update()})}function o(){if(!H){var t=e(217);H=t.inOut(t.ease)}return H}function r(t,e){return void 0===t||null===t?e:t}function _(t){var e=function(e){function i(t){babelHelpers.classCallCheck(this,i);var e=babelHelpers.possibleConstructorReturn(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,t));return e._setComponentRef=e._setComponentRef.bind(e),e}return babelHelpers.inherits(i,e),babelHelpers.createClass(i,[{key:"componentWillUnmount",value:function(){this._propsAnimated&&this._propsAnimated.__detach(),this._detachNativeEvents(this.props)}},{key:"setNativeProps",value:function(t){this._component.setNativeProps(t)}},{key:"componentWillMount",value:function(){this._attachProps(this.props)}},{key:"componentDidMount",value:function(){this._propsAnimated.setNativeView(this._component),this._attachNativeEvents(this.props)}},{key:"_attachNativeEvents",value:function(t){t!==this.props&&this._detachNativeEvents(this.props);var e=this._component.getScrollableNode?this._component.getScrollableNode():this._component;for(var i in t){var a=t[i];a instanceof it&&a.__isNative&&a.__attach(e,i)}}},{key:"_detachNativeEvents",value:function(t){var e=this._component.getScrollableNode?this._component.getScrollableNode():this._component;for(var i in t){var a=t[i];a instanceof it&&a.__isNative&&a.__detach(e,i)}}},{key:"_attachProps",value:function(t){var e=this,i=this._propsAnimated,a=function(){if(e._component.setNativeProps){if(e._propsAnimated.__isNative)throw new Error('Attempting to run JS driven animation on animated node that has been moved to "native" earlier by starting an animation with `useNativeDriver: true`');e._component.setNativeProps(e._propsAnimated.__getAnimatedValue())}else e.forceUpdate()};this._propsAnimated=new S(t,a),this._component&&this._propsAnimated.setNativeView(this._component),i&&i.__detach()}},{key:"componentWillReceiveProps",value:function(t){this._attachProps(t),this._attachNativeEvents(t)}},{key:"render",value:function(){return c.createElement(t,babelHelpers.extends({},this._propsAnimated.__getValue(),{ref:this._setComponentRef}))}},{key:"_setComponentRef",value:function(t){this._component=t}},{key:"getNode",value:function(){return this._component}}]),i}(c.Component);return e.propTypes={style:function(e,i,a){if(t.propTypes)for(var n in f)t.propTypes[n]||void 0===e[n]||console.warn("You are setting the style `{ "+n+": ... }` as a prop. You should nest it in a style object. E.g. `{ style: { "+n+": ... } }`")}},e}var l=e(203),u=e(212),h=e(213),c=e(97),v=e(204),p=e(214),f=e(123),d=e(95),y=e(73),m=e(44),b=e(215),g=h.API,k=!1,N=function(){function t(){babelHelpers.classCallCheck(this,t)}return babelHelpers.createClass(t,[{key:"__attach",value:function(){}},{key:"__detach",value:function(){this.__isNative&&null!=this.__nativeTag&&(g.dropAnimatedNode(this.__nativeTag),this.__nativeTag=void 0)}},{key:"__getValue",value:function(){}},{key:"__getAnimatedValue",value:function(){return this.__getValue()}},{key:"__addChild",value:function(t){}},{key:"__removeChild",value:function(t){}},{key:"__getChildren",value:function(){return[]}},{key:"__makeNative",value:function(){if(!this.__isNative)throw new Error('This node cannot be made a "native" animated node')}},{key:"__getNativeTag",value:function(){if(h.assertNativeAnimatedModule(),m(this.__isNative,'Attempt to get native tag from node not marked as "native"'),null==this.__nativeTag){var t=h.generateNewNodeTag();g.createAnimatedNode(t,this.__getNativeConfig()),this.__nativeTag=t}return this.__nativeTag}},{key:"__getNativeConfig",value:function(){throw new Error("This JS animated node type cannot be used as native animated node")}},{key:"toJSON",value:function(){return this.__getValue()}}]),t}(),C=function(){function t(){babelHelpers.classCallCheck(this,t)}return babelHelpers.createClass(t,[{key:"start",value:function(t,e,i,a,n){}},{key:"stop",value:function(){this.__nativeId&&g.stopAnimation(this.__nativeId)}},{key:"__getNativeAnimationConfig",value:function(){throw new Error("This animation type cannot be offloaded to native")}},{key:"__debouncedOnEnd",value:function(t){var e=this.__onEnd;this.__onEnd=null,e&&e(t)}},{key:"__startNativeAnimation",value:function(t){t.__makeNative(),this.__nativeId=h.generateNewAnimationId(),g.startAnimatingNode(this.__nativeId,t.__getNativeTag(),this.__getNativeAnimationConfig(),this.__debouncedOnEnd.bind(this))}}]),t}(),V=function(t){function e(){babelHelpers.classCallCheck(this,e);var t=babelHelpers.possibleConstructorReturn(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t._children=[],t}return babelHelpers.inherits(e,t),babelHelpers.createClass(e,[{key:"__makeNative",value:function(){if(!this.__isNative){this.__isNative=!0;for(var t=this._children,e=Array.isArray(t),i=0,t=e?t:t["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var a;if(e){if(i>=t.length)break;a=t[i++]}else{if(i=t.next(),i.done)break;a=i.value}var n=a;n.__makeNative(),g.connectAnimatedNodes(this.__getNativeTag(),n.__getNativeTag())}}}},{key:"__addChild",value:function(t){0===this._children.length&&this.__attach(),this._children.push(t),this.__isNative&&(t.__makeNative(),g.connectAnimatedNodes(this.__getNativeTag(),t.__getNativeTag()))}},{key:"__removeChild",value:function(t){var e=this._children.indexOf(t);if(-1===e)return void console.warn("Trying to remove a child that doesn't exist");this.__isNative&&t.__isNative&&g.disconnectAnimatedNodes(this.__getNativeTag(),t.__getNativeTag()),this._children.splice(e,1),0===this._children.length&&this.__detach()}},{key:"__getChildren",value:function(){return this._children}}]),e}(N),H=void 0,O=function(e){function i(t){babelHelpers.classCallCheck(this,i);var e=babelHelpers.possibleConstructorReturn(this,(i.__proto__||Object.getPrototypeOf(i)).call(this));return e._toValue=t.toValue,e._easing=void 0!==t.easing?t.easing:o(),e._duration=void 0!==t.duration?t.duration:500,e._delay=void 0!==t.delay?t.delay:0,e.__isInteraction=void 0===t.isInteraction||t.isInteraction,e._useNativeDriver=n(t),e}return babelHelpers.inherits(i,e),babelHelpers.createClass(i,[{key:"__getNativeAnimationConfig",value:function(){for(var t=[],e=0;e=this._startTime+this._duration)return 0===this._duration?this._onUpdate(this._toValue):this._onUpdate(this._fromValue+this._easing(1)*(this._toValue-this._fromValue)),void this.__debouncedOnEnd({finished:!0});this._onUpdate(this._fromValue+this._easing((t-this._startTime)/this._duration)*(this._toValue-this._fromValue)),this.__active&&(this._animationFrame=b(this.onUpdate.bind(this)))}},{key:"stop",value:function(){babelHelpers.get(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"stop",this).call(this),this.__active=!1,clearTimeout(this._timeout),t.cancelAnimationFrame(this._animationFrame),this.__debouncedOnEnd({finished:!1})}}]),i}(C),T=function(e){function i(t){babelHelpers.classCallCheck(this,i);var e=babelHelpers.possibleConstructorReturn(this,(i.__proto__||Object.getPrototypeOf(i)).call(this));return e._deceleration=void 0!==t.deceleration?t.deceleration:.998,e._velocity=t.velocity,e._useNativeDriver=n(t),e.__isInteraction=void 0===t.isInteraction||t.isInteraction,e}return babelHelpers.inherits(i,e),babelHelpers.createClass(i,[{key:"__getNativeAnimationConfig",value:function(){return{type:"decay",deceleration:this._deceleration,velocity:this._velocity}}},{key:"start",value:function(t,e,i,a,n){this.__active=!0,this._lastValue=t,this._fromValue=t,this._onUpdate=e,this.__onEnd=i,this._startTime=Date.now(),this._useNativeDriver?this.__startNativeAnimation(n):this._animationFrame=b(this.onUpdate.bind(this))}},{key:"onUpdate",value:function(){var t=Date.now(),e=this._fromValue+this._velocity/(1-this._deceleration)*(1-Math.exp(-(1-this._deceleration)*(t-this._startTime)));if(this._onUpdate(e),Math.abs(this._lastValue-e)<.1)return void this.__debouncedOnEnd({finished:!0});this._lastValue=e,this.__active&&(this._animationFrame=b(this.onUpdate.bind(this)))}},{key:"stop",value:function(){babelHelpers.get(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"stop",this).call(this),this.__active=!1,t.cancelAnimationFrame(this._animationFrame),this.__debouncedOnEnd({finished:!1})}}]),i}(C),A=function(e){function i(t){babelHelpers.classCallCheck(this,i);var e=babelHelpers.possibleConstructorReturn(this,(i.__proto__||Object.getPrototypeOf(i)).call(this));e._overshootClamping=r(t.overshootClamping,!1),e._restDisplacementThreshold=r(t.restDisplacementThreshold,.001),e._restSpeedThreshold=r(t.restSpeedThreshold,.001),e._initialVelocity=t.velocity,e._lastVelocity=r(t.velocity,0),e._toValue=t.toValue,e._useNativeDriver=n(t),e.__isInteraction=void 0===t.isInteraction||t.isInteraction;var a;return void 0!==t.bounciness||void 0!==t.speed?(m(void 0===t.tension&&void 0===t.friction,"You can only define bounciness/speed or tension/friction but not both"),a=p.fromBouncinessAndSpeed(r(t.bounciness,8),r(t.speed,12))):a=p.fromOrigamiTensionAndFriction(r(t.tension,40),r(t.friction,7)),e._tension=a.tension,e._friction=a.friction,e}return babelHelpers.inherits(i,e),babelHelpers.createClass(i,[{key:"__getNativeAnimationConfig",value:function(){return{type:"spring",overshootClamping:this._overshootClamping,restDisplacementThreshold:this._restDisplacementThreshold,restSpeedThreshold:this._restSpeedThreshold,tension:this._tension,friction:this._friction,initialVelocity:r(this._initialVelocity,this._lastVelocity),toValue:this._toValue}}},{key:"start",value:function(t,e,a,n,s){if(this.__active=!0,this._startPosition=t,this._lastPosition=this._startPosition,this._onUpdate=e,this.__onEnd=a,this._lastTime=Date.now(),n instanceof i){var o=n.getInternalState();this._lastPosition=o.lastPosition,this._lastVelocity=o.lastVelocity,this._lastTime=o.lastTime}void 0!==this._initialVelocity&&null!==this._initialVelocity&&(this._lastVelocity=this._initialVelocity),this._useNativeDriver?this.__startNativeAnimation(s):this.onUpdate()}},{key:"getInternalState",value:function(){return{lastPosition:this._lastPosition,lastVelocity:this._lastVelocity,lastTime:this._lastTime}}},{key:"onUpdate",value:function(){var t=this._lastPosition,e=this._lastVelocity,i=this._lastPosition,a=this._lastVelocity,n=Date.now();n>this._lastTime+64&&(n=this._lastTime+64);for(var s=Math.floor((n-this._lastTime)/1),o=0;othis._toValue:t1&&void 0!==arguments[1]?arguments[1]:{};babelHelpers.classCallCheck(this,t),this._argMapping=e,this._listener=i.listener,this.__isNative=n(i),this.__isNative&&m(!this._listener,"Listener is not supported for native driven events.")} return babelHelpers.createClass(t,[{key:"__attach",value:function(t,e){m(this.__isNative,"Only native driven events need to be attached.");var i=[];m(this._argMapping[0]&&this._argMapping[0].nativeEvent,"Native driven events only support animated values contained inside `nativeEvent`."),function t(e,a){if(e instanceof P)e.__makeNative(),i.push({nativeEventPath:a,animatedValueTag:e.__getNativeTag()});else if("object"==typeof e)for(var n in e)t(e[n],a.concat(n))}(this._argMapping[0].nativeEvent,[]);var a=d(t);i.forEach(function(t){g.addAnimatedEventToView(a,e,t)})}},{key:"__detach",value:function(t,e){m(this.__isNative,"Only native driven events need to be detached."),g.removeAnimatedEventFromView(t,e)}},{key:"__getHandler",value:function(){var t=this;return function(){for(var e=arguments.length,i=Array(e),a=0;a0?setTimeout(a,0+m):setImmediate(a))}function a(){E=0;var e=v.size;h.forEach(function(e){return v.add(e)}),w.forEach(function(e){return v.delete(e)});var n=v.size;if(0!==e&&0===n?f.emit(p.Events.interactionComplete):0===e&&0!==n&&f.emit(p.Events.interactionStart),0===n)for(;T.hasTasksToProcess();)if(T.processNext(),b>0&&i.getEventLoopRunningTime()>=b){o();break}h.clear(),w.clear()}var i=n(77),c=n(102),s=n(204),u=n(210),d=(n(211),n(44)),l=n(115),f=new c,m=0,p={Events:l({interactionStart:!0,interactionComplete:!0}),runAfterInteractions:function(e){var n=[],t=new Promise(function(t){o(),e&&n.push(e),n.push({run:t,name:"resolve "+(e&&e.name||"?")}),T.enqueueTasks(n)});return{then:t.then.bind(t),done:function(){if(t.done)return t.done.apply(t,arguments);console.warn("Tried to call done when not supported by current Promise implementation.")},cancel:function(){T.cancelTasks(n)}}},createInteractionHandle:function(){o();var e=++k;return h.add(e),e},clearInteractionHandle:function(e){d(!!e,"Must provide a handle to clear."),o(),h.delete(e),w.add(e)},addListener:f.addListener.bind(f),setDeadline:function(e){b=e}},v=new s,h=new s,w=new s,T=new u({onMoreTasks:o}),E=0,k=0,b=-1;t.exports=p},203); __d(function(e,t,n,s){"use strict";var i=t(205),r=t(206),a=t(209);n.exports=function(e){function t(e){e._map=new i,e.size=e._map.size}if(!r("Set"))return e.Set;var n=function(){function e(n){if(babelHelpers.classCallCheck(this,e),null==this||"object"!=typeof this&&"function"!=typeof this)throw new TypeError("Wrong set object type.");if(t(this),null!=n)for(var s,i=a(n);!(s=i.next()).done;)this.add(s.value)}return babelHelpers.createClass(e,[{key:"add",value:function(e){return this._map.set(e,e),this.size=this._map.size,this}},{key:"clear",value:function(){t(this)}},{key:"delete",value:function(e){var t=this._map.delete(e);return this.size=this._map.size,t}},{key:"entries",value:function(){return this._map.entries()}},{key:"forEach",value:function(e){for(var t,n=arguments[1],s=this._map.keys();!(t=s.next()).done;)e.call(n,t.value,t.value,this)}},{key:"has",value:function(e){return this._map.has(e)}},{key:"values",value:function(){return this._map.values()}}]),e}();return n.prototype[a.ITERATOR_SYMBOL]=n.prototype.values,n.prototype.keys=n.prototype.values,n}(Function("return this")())},204); __d(function(e,t,r,n){"use strict";var i=t(206),a=t(207),o=t(208),u=t(209);r.exports=function(e,t){function r(e,t){if(l(t)){var r=x(t);return e._objectIndex[r]}var n=d+t;return"string"==typeof t?e._stringIndex[n]:e._otherIndex[n]}function n(e,t,r){var n=null==r;if(l(t)){var i=x(t);n?delete e._objectIndex[i]:e._objectIndex[i]=r}else{var a=d+t;"string"==typeof t?n?delete e._stringIndex[a]:e._stringIndex[a]=r:n?delete e._otherIndex[a]:e._otherIndex[a]=r}}function s(e){e._mapData=[],e._objectIndex={},e._stringIndex={},e._otherIndex={},e.size=0}function l(e){return null!=e&&("object"==typeof e||"function"==typeof e)}function p(e,t){return{value:e,done:t}}function f(e){return!I||Object.isExtensible(e)}function c(e){var t;switch(e.nodeType){case 1:t=e.uniqueID;break;case 9:t=e.documentElement.uniqueID;break;default:return null}return t?y+t:null}if(!i("Map"))return e.Map;var h="key",v="value",b="key+value",d="$map_",y="IE_HASH_",_=function(){function e(t){if(babelHelpers.classCallCheck(this,e),!l(this))throw new TypeError("Wrong map object type.");if(s(this),null!=t)for(var r,n=u(t);!(r=n.next()).done;){if(!l(r.value))throw new TypeError("Expected iterable items to be pair objects.");this.set(r.value[0],r.value[1])}}return babelHelpers.createClass(e,[{key:"clear",value:function(){s(this)}},{key:"has",value:function(e){var t=r(this,e);return!(null==t||!this._mapData[t])}},{key:"set",value:function(e,t){var i=r(this,e);return null!=i&&this._mapData[i]?this._mapData[i][1]=t:(i=this._mapData.push([e,t])-1,n(this,e,i),this.size+=1),this}},{key:"get",value:function(e){var t=r(this,e);return null==t?void 0:this._mapData[t][1]}},{key:"delete",value:function(e){var t=r(this,e);return!(null==t||!this._mapData[t])&&(n(this,e,void 0),this._mapData[t]=void 0,this.size-=1,!0)}},{key:"entries",value:function(){return new m(this,b)}},{key:"keys",value:function(){return new m(this,h)}},{key:"values",value:function(){return new m(this,v)}},{key:"forEach",value:function(e,t){if("function"!=typeof e)throw new TypeError("Callback must be callable.");for(var r=e.bind(t||void 0),n=this._mapData,i=0;i=n?(this._iteratedObject=void 0,t(void 0,!0)):(this._nextIndex=i+1,"key"===a?t(i,!1):"value"===a?t(r[i],!1):"key+value"===a?t([i,r[i]],!1):void 0)}},{key:"@@iterator",value:function(){return this}}]),e}(),r=function(){function e(t){if(babelHelpers.classCallCheck(this,e),"string"!=typeof t)throw new TypeError("Object is not a string");this._iteratedString=t,this._nextIndex=0}return babelHelpers.createClass(e,[{key:"next",value:function(){if(!this instanceof e)throw new TypeError("Object is not a StringIterator");if(null==this._iteratedString)return t(void 0,!0);var r=this._nextIndex,n=this._iteratedString,i=n.length;if(r>=i)return this._iteratedString=void 0,t(void 0,!0);var a,o=n.charCodeAt(r);if(o<55296||o>56319||r+1===i)a=n[r];else{var s=n.charCodeAt(r+1);a=s<56320||s>57343?n[r]:n[r]+n[r+1]}return this._nextIndex=r+a.length,t(a,!1)}},{key:"@@iterator",value:function(){return this}}]),e}();return function(t,n){return"string"==typeof t?new r(t):Array.isArray(t)?new e(t,n||"value"):t[i]()}}()}();babelHelpers.extends(a,{KIND_KEY:"key",KIND_VALUE:"value",KIND_KEY_VAL:"key+value",ITERATOR_SYMBOL:i}),r.exports=a},209); __d(function(e,t,s,u){"use strict";var n=(t(211),t(44)),a=function(){function e(t){var s=t.onMoreTasks;babelHelpers.classCallCheck(this,e),this._onMoreTasks=s,this._queueStack=[{tasks:[],popable:!1}]}return babelHelpers.createClass(e,[{key:"enqueue",value:function(e){this._getCurrentQueue().push(e)}},{key:"enqueueTasks",value:function(e){var t=this;e.forEach(function(e){return t.enqueue(e)})}},{key:"cancelTasks",value:function(e){this._queueStack=this._queueStack.map(function(t){return babelHelpers.extends({},t,{tasks:t.tasks.filter(function(t){return-1===e.indexOf(t)})})}).filter(function(e,t){return e.tasks.length>0||0===t})}},{key:"hasTasksToProcess",value:function(){return this._getCurrentQueue().length>0}},{key:"processNext",value:function(){var e=this._getCurrentQueue();if(e.length){var t=e.shift();try{t.gen?this._genPromise(t):t.run?t.run():(n("function"==typeof t,"Expected Function, SimpleTask, or PromiseTask, but got:\n"+JSON.stringify(t,null,2)),t())}catch(e){throw e.message="TaskQueue: Error with task "+(t.name||"")+": "+e.message,e}}}},{key:"_getCurrentQueue",value:function(){var e=this._queueStack.length-1,t=this._queueStack[e];return t.popable&&0===t.tasks.length&&this._queueStack.length>1?(this._queueStack.pop(),this._getCurrentQueue()):t.tasks}},{key:"_genPromise",value:function(e){var t=this;this._queueStack.push({tasks:[],popable:!1});var s=this._queueStack.length-1;e.gen().then(function(){t._queueStack[s].popable=!0,t.hasTasksToProcess()&&t._onMoreTasks()}).catch(function(t){throw t.message="TaskQueue: Error resolving Promise in task "+e.name+": "+t.message,t}).done()}}]),e}();s.exports=a},210); __d(function(n,o,t,r){"use strict";function c(){var n;return(n=console).log.apply(n,arguments)}t.exports=c},211); __d(function(t,n,e,a){"use strict";function r(t,n,e,a,r,u,i,o){var l=t;if(le){if("identity"===o)return l;"clamp"===o&&(l=e)}return a===r?a:n===e?t<=n?a:r:(n===-1/0?l=-l:e===1/0?l-=n:l=(l-n)/(e-n),l=u(l),a===-1/0?l=-l:r===1/0?l+=a:l=l*(r-a)+a,l)}function u(t){var n=h(t);return null===n?t:"rgba("+((4278190080&(n=n||0))>>>24)+", "+((16711680&n)>>>16)+", "+((65280&n)>>>8)+", "+(255&n)/255+")"}function i(t){var n=t.outputRange;g(n.length>=2,"Bad output range"),n=n.map(u),l(n);var e=n[0].match(m).map(function(){return[]});n.forEach(function(t){t.match(m).forEach(function(t,n){e[n].push(+t)})});var a=n[0].match(m).map(function(n,a){return v.create(babelHelpers.extends({},t,{outputRange:e[a]}))}),r=o(n[0]);return function(t){var e=0;return n[0].replace(m,function(){var n=+a[e++](t),u=r&&e<4?Math.round(n):Math.round(1e3*n)/1e3;return String(u)})}}function o(t){return"string"==typeof t&&t.startsWith("rgb")}function l(t){for(var n=t[0].replace(m,""),e=1;e=t);++e);return e-1}function p(t){g(t.length>=2,"inputRange must have at least 2 elements");for(var n=1;n=t[n-1],"inputRange must be monotonically increasing "+t)}function f(t,n){g(n.length>=2,t+" must have at least 2 elements"),g(2!==n.length||n[0]!==-1/0||n[1]!==1/0,t+"cannot be ]-infinity;+infinity[ "+n)}var g=n(44),h=n(68),s=function(t){return t},v=function(){function t(){babelHelpers.classCallCheck(this,t)}return babelHelpers.createClass(t,null,[{key:"create",value:function(t){if(t.outputRange&&"string"==typeof t.outputRange[0])return i(t);var n=t.outputRange;f("outputRange",n);var e=t.inputRange;f("inputRange",e),p(e),g(e.length===n.length,"inputRange ("+e.length+") and outputRange ("+n.length+") must have the same length");var a=t.easing||s,u="extend";void 0!==t.extrapolateLeft?u=t.extrapolateLeft:void 0!==t.extrapolate&&(u=t.extrapolate);var o="extend";return void 0!==t.extrapolateRight?o=t.extrapolateRight:void 0!==t.extrapolate&&(o=t.extrapolate),function(t){g("number"==typeof t,"Cannot interpolation an input which is not a number");var i=c(t,e);return r(t,e[i],e[i+1],n[i],n[i+1],a,u,o)}}}]),t}(),m=/[0-9\.-]+/g;e.exports=v},212); __d(function(e,t,n,o){"use strict";function a(e){e.forEach(function(e){if(!y.hasOwnProperty(e.property))throw new Error("Property '"+e.property+"' is not supported by native animated module")})}function i(e){for(var t in e)if(!w.hasOwnProperty(t))throw new Error("Style property '"+t+"' is not supported by native animated module")}function d(e){var t={inputRange:!0,outputRange:!0,extrapolate:!0,extrapolateRight:!0,extrapolateLeft:!0};for(var n in e)if(!t.hasOwnProperty(n))throw new Error("Interpolation property '"+n+"' is not supported by native animated module")}function r(){return l++}function s(){return p++}function c(){A(f,"Native animated module is not available")}function m(){return!!f}var f=t(76).NativeAnimatedModule,u=t(107),A=t(44),l=1,p=1,N=void 0,v={createAnimatedNode:function(e,t){c(),f.createAnimatedNode(e,t)},startListeningToAnimatedNodeValue:function(e){c(),f.startListeningToAnimatedNodeValue(e)},stopListeningToAnimatedNodeValue:function(e){c(),f.stopListeningToAnimatedNodeValue(e)},connectAnimatedNodes:function(e,t){c(),f.connectAnimatedNodes(e,t)},disconnectAnimatedNodes:function(e,t){c(),f.disconnectAnimatedNodes(e,t)},startAnimatingNode:function(e,t,n,o){c(),f.startAnimatingNode(e,t,n,o)},stopAnimation:function(e){c(),f.stopAnimation(e)},setAnimatedNodeValue:function(e,t){c(),f.setAnimatedNodeValue(e,t)},setAnimatedNodeOffset:function(e,t){c(),f.setAnimatedNodeOffset(e,t)},flattenAnimatedNodeOffset:function(e){c(),f.flattenAnimatedNodeOffset(e)},extractAnimatedNodeOffset:function(e){c(),f.extractAnimatedNodeOffset(e)},connectAnimatedNodeToView:function(e,t){c(),f.connectAnimatedNodeToView(e,t)},disconnectAnimatedNodeFromView:function(e,t){c(),f.disconnectAnimatedNodeFromView(e,t)},dropAnimatedNode:function(e){c(),f.dropAnimatedNode(e)},addAnimatedEventToView:function(e,t,n){c(),f.addAnimatedEventToView(e,t,n)},removeAnimatedEventFromView:function(e,t){c(),f.removeAnimatedEventFromView(e,t)}},w={opacity:!0,transform:!0,scaleX:!0,scaleY:!0,translateX:!0,translateY:!0},y={translateX:!0,translateY:!0,scale:!0,scaleX:!0,scaleY:!0,rotate:!0,rotateX:!0,rotateY:!0,perspective:!0};n.exports={API:v,validateStyles:i,validateTransform:a,validateInterpolation:d,generateNewNodeTag:r,generateNewAnimationId:s,assertNativeAnimatedModule:c,isNativeAnimatedAvailable:m,get nativeEventEmitter(){return N||(N=new u(f)),N}}},213); __d(function(n,t,r,o){"use strict";function u(n){return 3.62*(n-30)+194}function i(n){return 3*(n-8)+25}function e(n,t){return{tension:u(n),friction:i(t)}}function c(n,t){function r(n,t,r){return(n-t)/(r-t)}function o(n,t,r){return t+n*(r-t)}function e(n,t,r){return n*r+(1-n)*t}function c(n){return 7e-4*Math.pow(n,3)-.031*Math.pow(n,2)+.64*n+1.28}function f(n){return 44e-6*Math.pow(n,3)-.006*Math.pow(n,2)+.36*n+2}function a(n){return 4.5e-7*Math.pow(n,3)-332e-6*Math.pow(n,2)+.1078*n+5.84}var p=r(n/1.7,0,20);p=o(p,0,.8);var s=r(t/1.7,0,20),h=o(s,.5,200),w=function(n,t,r){return e(2*n-n*n,t,r)}(p,function(n){return n<=18?c(n):n>18&&n<=44?f(n):a(n)}(h),.01);return{tension:u(h),friction:i(w)}}r.exports={fromOrigamiTensionAndFriction:e,fromBouncinessAndSpeed:c}},214); __d(function(t,n,e,o){"use strict";var a=n(41),r=n(216),u=0,i=r||function(n){var e=Date.now(),o=Math.max(0,16-(e-u));return u=e+o,t.setTimeout(function(){n(Date.now())},o)};i(a),e.exports=i},215); __d(function(e,t,i,m){"use strict";var n=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame;i.exports=n},216); __d(function(e,n,u,t){"use strict";var r=void 0,a=function(){function e(){babelHelpers.classCallCheck(this,e)}return babelHelpers.createClass(e,null,[{key:"step0",value:function(e){return e>0?1:0}},{key:"step1",value:function(e){return e>=1?1:0}},{key:"linear",value:function(e){return e}},{key:"ease",value:function(n){return r||(r=e.bezier(.42,0,1,1)),r(n)}},{key:"quad",value:function(e){return e*e}},{key:"cubic",value:function(e){return e*e*e}},{key:"poly",value:function(e){return function(n){return Math.pow(n,e)}}},{key:"sin",value:function(e){return 1-Math.cos(e*Math.PI/2)}},{key:"circle",value:function(e){return 1-Math.sqrt(1-e*e)}},{key:"exp",value:function(e){return Math.pow(2,10*(e-1))}},{key:"elastic",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,n=e*Math.PI;return function(e){return 1-Math.pow(Math.cos(e*Math.PI/2),3)*Math.cos(e*n)}}},{key:"back",value:function(e){return void 0===e&&(e=1.70158),function(n){return n*n*((e+1)*n-e)}}},{key:"bounce",value:function(e){return e<.36363636363636365?7.5625*e*e:e<.7272727272727273?7.5625*(e-=.5454545454545454)*e+.75:e<.9090909090909091?7.5625*(e-=.8181818181818182)*e+.9375:7.5625*(e-=.9545454545454546)*e+.984375}},{key:"bezier",value:function(e,u,t,r){return n(218)(e,u,t,r)}},{key:"in",value:function(e){return e}},{key:"out",value:function(e){return function(n){return 1-e(1-n)}}},{key:"inOut",value:function(e){return function(n){return n<.5?e(2*n)/2:1-e(2*(1-n))/2}}}]),e}();u.exports=a},217); __d(function(r,n,t,u){"use strict";function e(r,n){return 1-3*n+3*r}function o(r,n){return 3*n-6*r}function f(r){return 3*r}function i(r,n,t){return((e(n,t)*r+o(n,t))*r+f(n))*r}function a(r,n,t){return 3*e(n,t)*r*r+2*o(n,t)*r+f(n)}function c(r,n,t,u,e){var o,f,a=0;do{f=n+(t-n)/2,o=i(f,u,e)-r,o>0?t=f:n=f}while(Math.abs(o)>w&&++a=.001?v(n,s,r,t):0===w?s:c(n,u,u+b,r,t)}if(!(0<=r&&r<=1&&0<=t&&t<=1))throw new Error("bezier x values must be in [0, 1] range");var o=h?new Float32Array(y):new Array(y);if(r!==n||t!==u)for(var f=0;f component requires a `source` property rather than `src`."),d.createElement(z,babelHelpers.extends({},this.props,{style:s,resizeMode:n,tintColor:a,source:r}))}}),y=p.create({base:{overflow:"hidden"}}),z=g("RCTImageView",w);s.exports=w},219); __d(function(e,r,n,t){"use strict";var s=r(97),a=s.PropTypes,c=a.shape({uri:a.string,bundle:a.string,method:a.string,headers:a.objectOf(a.string),body:a.string,cache:a.oneOf(["default","reload","force-cache","only-if-cached"]),width:a.number,height:a.number,scale:a.number}),i=a.oneOfType([c,a.number,a.arrayOf(c)]);n.exports=i},220); __d(function(e,o,n,l){"use strict";var t=o(66),r=o(131),s=(o(75),o(222)),i=o(97),a=o(223),c=o(273),d=o(98),p=o(137),h=o(130),u=o(123),S=(o(109),o(73),o(44)),m=o(275),f=i.PropTypes,R=o(139),b=i.createClass({displayName:"ScrollView",propTypes:babelHelpers.extends({},h.propTypes,{automaticallyAdjustContentInsets:f.bool,contentInset:r,contentOffset:s,bounces:f.bool,bouncesZoom:f.bool,alwaysBounceHorizontal:f.bool,alwaysBounceVertical:f.bool,centerContent:f.bool,contentContainerStyle:p(u),decelerationRate:f.oneOfType([f.oneOf(["fast","normal"]),f.number]),horizontal:f.bool,indicatorStyle:f.oneOf(["default","black","white"]),directionalLockEnabled:f.bool,canCancelContentTouches:f.bool,keyboardDismissMode:f.oneOf(["none","interactive","on-drag"]),keyboardShouldPersistTaps:f.oneOf(["always","never","handled",!1,!0]),maximumZoomScale:f.number,minimumZoomScale:f.number,onScroll:f.func,onScrollAnimationEnd:f.func,onContentSizeChange:f.func,pagingEnabled:f.bool,scrollEnabled:f.bool,scrollEventThrottle:f.number,scrollIndicatorInsets:r,scrollsToTop:f.bool,showsHorizontalScrollIndicator:f.bool,showsVerticalScrollIndicator:f.bool,stickyHeaderIndices:f.arrayOf(f.number),style:p(u),snapToInterval:f.number,snapToAlignment:f.oneOf(["start","center","end"]),removeClippedSubviews:f.bool,zoomScale:f.number,refreshControl:f.element,endFillColor:t,scrollPerfTag:f.string,overScrollMode:f.oneOf(["auto","always","never"])}),mixins:[c.Mixin],getInitialState:function(){return this.scrollResponderMixinGetInitialState()},setNativeProps:function(e){this._scrollViewRef&&this._scrollViewRef.setNativeProps(e)},getScrollResponder:function(){return this},getScrollableNode:function(){return a.findNodeHandle(this._scrollViewRef)},getInnerViewNode:function(){return a.findNodeHandle(this._innerViewRef)},scrollTo:function(e,o,n){if("number"==typeof e)console.warn("`scrollTo(y, x, animated)` is deprecated. Use `scrollTo({x: 5, y: 5, animated: true})` instead.");else{var l=e||{};o=l.x,e=l.y,n=l.animated}this.getScrollResponder().scrollResponderScrollTo({x:o||0,y:e||0,animated:!1!==n})},scrollToEnd:function(e){var o=!1!==(e&&e.animated);this.getScrollResponder().scrollResponderScrollToEnd({animated:o})},scrollWithoutAnimationTo:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;console.warn("`scrollWithoutAnimationTo` is deprecated. Use `scrollTo` instead"),this.scrollTo({x:o,y:e,animated:!1})},_handleScroll:function(e){this.scrollResponderHandleScroll(e)},_handleContentOnLayout:function(e){var o=e.nativeEvent.layout,n=o.width,l=o.height;this.props.onContentSizeChange&&this.props.onContentSizeChange(n,l)},_scrollViewRef:null,_setScrollViewRef:function(e){this._scrollViewRef=e},_innerViewRef:null,_setInnerViewRef:function(e){this._innerViewRef=e},render:function(){var e=[this.props.horizontal&&w.contentContainerHorizontal,this.props.contentContainerStyle],o={};this.props.onContentSizeChange&&(o={onLayout:this._handleContentOnLayout});var n=i.createElement(h,babelHelpers.extends({},o,{ref:this._setInnerViewRef,style:e,removeClippedSubviews:this.props.removeClippedSubviews,collapsable:!1}),this.props.children),l=void 0!==this.props.alwaysBounceHorizontal?this.props.alwaysBounceHorizontal:this.props.horizontal,t=void 0!==this.props.alwaysBounceVertical?this.props.alwaysBounceVertical:!this.props.horizontal,r=this.props.horizontal?w.baseHorizontal:w.baseVertical,s=babelHelpers.extends({},this.props,{alwaysBounceHorizontal:l,alwaysBounceVertical:t,style:[r,this.props.style],onContentSizeChange:null,onTouchStart:this.scrollResponderHandleTouchStart,onTouchMove:this.scrollResponderHandleTouchMove,onTouchEnd:this.scrollResponderHandleTouchEnd,onScrollBeginDrag:this.scrollResponderHandleScrollBeginDrag,onScrollEndDrag:this.scrollResponderHandleScrollEndDrag,onMomentumScrollBegin:this.scrollResponderHandleMomentumScrollBegin,onMomentumScrollEnd:this.scrollResponderHandleMomentumScrollEnd,onStartShouldSetResponder:this.scrollResponderHandleStartShouldSetResponder,onStartShouldSetResponderCapture:this.scrollResponderHandleStartShouldSetResponderCapture,onScrollShouldSetResponder:this.scrollResponderHandleScrollShouldSetResponder,onScroll:this._handleScroll,onResponderGrant:this.scrollResponderHandleResponderGrant,onResponderTerminationRequest:this.scrollResponderHandleTerminationRequest,onResponderTerminate:this.scrollResponderHandleTerminate,onResponderRelease:this.scrollResponderHandleResponderRelease,onResponderReject:this.scrollResponderHandleResponderReject,sendMomentumEvents:!(!this.props.onMomentumScrollBegin&&!this.props.onMomentumScrollEnd)}),a=this.props.decelerationRate;a&&(s.decelerationRate=m(a));var c=void 0;c=y,S(void 0!==c,"ScrollViewClass must not be undefined");var d=this.props.refreshControl;return d?i.createElement(c,babelHelpers.extends({},s,{ref:this._setScrollViewRef}),d,n):i.createElement(c,babelHelpers.extends({},s,{ref:this._setScrollViewRef}),n)}}),w=d.create({baseVertical:{flexGrow:1,flexShrink:1,flexDirection:"column",overflow:"scroll"},baseHorizontal:{flexGrow:1,flexShrink:1,flexDirection:"row",overflow:"scroll"},contentContainerHorizontal:{flexDirection:"row"}}),v=void 0,y=void 0;v={nativeOnly:{onMomentumScrollBegin:!0,onMomentumScrollEnd:!0,onScrollBeginDrag:!0,onScrollEndDrag:!0}},y=R("RCTScrollView",b,v),n.exports=b},221); __d(function(r,e,n,s){"use strict";var t=e(97).PropTypes,u=e(132),o=u({x:t.number,y:t.number});n.exports=o},222); __d(function(e,n,t,o){"use strict";var d=n(143),r=n(224),_=n(271),u=n(153),a=n(95);r.inject();var c=function(e,n,t){return _.renderComponent(e,n,t)},i={hasReactNativeInitialized:!1,findNodeHandle:a,render:c,unmountComponentAtNode:_.unmountComponentAtNode,unstable_batchedUpdates:u.batchedUpdates,unmountComponentAtNodeAndRemoveContainer:_.unmountComponentAtNodeAndRemoveContainer};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ComponentTree:{getClosestInstanceFromNode:function(e){return d.getClosestInstanceFromNode(e)},getNodeFromInstance:function(e){for(;e._renderedComponent;)e=e._renderedComponent;return e?d.getNodeFromInstance(e):null}},Mount:_,Reconciler:n(157)}),t.exports=i},223); __d(function(n,e,t,i){"use strict";function c(){r.register(E),o.injection.injectEventPluginOrder(d),a.injection.injectComponentTree(g),a.injection.injectTreeTraversal(R),h.injection.injectGlobalResponderHandler(y),o.injection.injectEventPluginsByName({ResponderEventPlugin:h,ReactNativeBridgeEventPlugin:u}),f.injection.injectReconcileTransaction(v.ReactReconcileTransaction),f.injection.injectBatchingStrategy(l),j.injection.injectEnvironment(v);var n=function(n){var t=e(130);return new T(s.createElement(t,{collapsable:!0,style:{position:"absolute"}}),n)};p.injection.injectEmptyComponentFactory(n),m.injection.injectTextComponentClass(C),m.injection.injectGenericComponentClass(function(n){var e="";"string"==typeof n&&/^[a-z]/.test(n)&&(e+=" Each component name should start with an uppercase letter."),P(!1,"Expected a component class, got %s.%s",n,e)})}e(225);var o=e(145),a=e(147),r=e(253),s=e(97),j=e(163),l=e(254),p=e(170),u=e(255),m=e(171),v=e(258),g=e(143),E=e(144),d=e(262),y=e(263),C=e(264),R=e(265),T=e(266),f=e(153),h=e(267),P=e(44);t.exports={inject:c}},224); __d(function(e,r,t,n){"use strict";function o(e,r,t,n){var o=Object.getOwnPropertyDescriptor(e,r);if(o){var i="original"+r[0].toUpperCase()+r.substr(1);Object.defineProperty(e,i,babelHelpers.extends({},o,{value:e[r]}))}var u=o||{},c=u.enumerable,l=u.writable,s=u.configurable;if(o&&!s)return void console.error("Failed to set polyfill. "+r+" is not configurable.");!0===n?Object.defineProperty(e,r,{configurable:!0,enumerable:!1!==c,writable:!1!==l,value:t()}):a(e,r,{get:t,enumerable:!1!==c,writable:!1!==l})}void 0===e.GLOBAL&&(e.GLOBAL=e),void 0===e.window&&(e.window=e);var a=r(93);e.process=e.process||{},e.process.env=e.process.env||{},e.process.env.NODE_ENV||(e.process.env.NODE_ENV="production"),r(81).setEnabled(e.__RCTProfileIsProfiling||!1);var i=r(226);if(i.installConsoleErrorReporter(),r(227),!e.__fbDisableExceptionsManager){var u=function(e,r){try{i.handleException(e,r)}catch(r){throw console.log("Failed to print error: ",r.message),e}};r(79).setGlobalHandler(u)}var c=function(t){o(e,t,function(){return r(85)[t]})};c("setTimeout"),c("setInterval"),c("setImmediate"),c("clearTimeout"),c("clearInterval"),c("clearImmediate"),c("requestAnimationFrame"),c("cancelAnimationFrame"),c("requestIdleCallback"),c("cancelIdleCallback"),e.alert||(e.alert=function(e){r(228).alert("Alert",""+e)}),o(e,"Promise",function(){return r(230)}),o(e,"regeneratorRuntime",function(){return delete e.regeneratorRuntime,r(235),e.regeneratorRuntime}),o(e,"XMLHttpRequest",function(){return r(236)}),o(e,"FormData",function(){return r(242)}),o(e,"fetch",function(){return r(246).fetch}),o(e,"Headers",function(){return r(246).Headers}),o(e,"Request",function(){return r(246).Request}),o(e,"Response",function(){return r(246).Response}),o(e,"WebSocket",function(){return r(248)});var l=e.navigator;void 0===l&&(e.navigator=l={}),o(l,"product",function(){return"ReactNative"},!0),o(l,"geolocation",function(){return r(250)}),o(e,"Map",function(){return r(205)},!0),o(e,"Set",function(){return r(204)},!0),r(101),r(251),r(252)},225); __d(function(r,o,e,n){"use strict";function s(r,e){var n=o(76),s=n.ExceptionsManager;if(s){var i=o(86),c=i(r),l=++a;e?s.reportFatalException(r.message,c,l):s.reportSoftException(r.message,c,l)}}function i(r,o){r.message||(r=new Error(r)),console._errorOriginal?console._errorOriginal(r.message):console.error(r.message),s(r,o)}function c(){if(console._errorOriginal.apply(console,arguments),console.reportErrorsAsExceptions)if(arguments[0]&&arguments[0].stack)s(arguments[0],!1);else{var r=o(90),e=Array.prototype.map.call(arguments,r).join(", ");if('"Warning: '===e.slice(0,10))return;var n=new Error("console.error: "+e);n.framesToPop=1,s(n,!1)}}function l(){console._errorOriginal||(console._errorOriginal=console.error.bind(console),console.error=c,void 0===console.reportErrorsAsExceptions&&(console.reportErrorsAsExceptions=!0))}var a=0;e.exports={handleException:i,installConsoleErrorReporter:l}},226); __d(function(e,o,r,l){"use strict";var n=o(77),a=o(44),t={log:"log",info:"info",warn:"warn",error:"error",fatal:"error"},s=function(){function o(){babelHelpers.classCallCheck(this,o)}return babelHelpers.createClass(o,null,[{key:"logIfNoNativeHook",value:function(){var o=Array.prototype.slice.call(arguments),r=o.shift(),l=t[r];return a(l,'Level "'+r+'" not one of '+Object.keys(t)),void 0===e.nativeLoggingHook&&console[l].apply(console,o),!0}}]),o}();n.registerCallableModule("RCTLog",s),r.exports=s},227); __d(function(e,t,l,n){"use strict";var s=t(229),a=(t(75),t(76).DialogManagerAndroid),r=function(){function e(){babelHelpers.classCallCheck(this,e)}return babelHelpers.createClass(e,null,[{key:"alert",value:function(e,t,l,n,a){if(void 0!==a)return console.warn('Alert.alert() with a 5th "type" parameter is deprecated and will be removed. Use AlertIOS.prompt() instead.'),void s.alert(e,t,l,a);s.alert(e,t,l)}}]),e}();!function(){function e(){babelHelpers.classCallCheck(this,e)}babelHelpers.createClass(e,null,[{key:"alert",value:function(e,t,l,n){var s={title:e||"",message:t||""};n&&(s=babelHelpers.extends({},s,{cancelable:n.cancelable}));var r=l?l.slice(0,3):[{text:"OK"}],o=r.pop(),i=r.pop(),b=r.pop();b&&(s=babelHelpers.extends({},s,{buttonNeutral:b.text||""})),i&&(s=babelHelpers.extends({},s,{buttonNegative:i.text||""})),o&&(s=babelHelpers.extends({},s,{buttonPositive:o.text||""})),a.showAlert(s,function(e){return console.warn(e)},function(e,t){e===a.buttonClicked&&(t===a.buttonNeutral?b.onPress&&b.onPress():t===a.buttonNegative?i.onPress&&i.onPress():t===a.buttonPositive&&o.onPress&&o.onPress())})}}])}();l.exports=r},228); __d(function(t,e,a,r){"use strict";var n=e(76).AlertManager,l=function(){function t(){babelHelpers.classCallCheck(this,t)}return babelHelpers.createClass(t,null,[{key:"alert",value:function(t,e,a,r){if(void 0!==r)return console.warn('AlertIOS.alert() with a 4th "type" parameter is deprecated and will be removed. Use AlertIOS.prompt() instead.'),void this.prompt(t,e,a,r);this.prompt(t,e,a,"default")}},{key:"prompt",value:function(t,e,a){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"plain-text",l=arguments[4],i=arguments[5];if("function"==typeof r){console.warn('You passed a callback function as the "type" argument to AlertIOS.prompt(). React Native is assuming you want to use the deprecated AlertIOS.prompt(title, defaultValue, buttons, callback) signature. The current signature is AlertIOS.prompt(title, message, callbackOrButtons, type, defaultValue, keyboardType) and the old syntax will be removed in a future version.');var o=r,l=e;return void n.alertWithArgs({title:t||void 0,type:"plain-text",defaultValue:l},function(t,e){o(e)})}var s,u,c=[],p=[];"function"==typeof a?c=[a]:a instanceof Array&&a.forEach(function(t,e){if(c[e]=t.onPress,"cancel"===t.style?s=String(e):"destructive"===t.style&&(u=String(e)),t.text||e<(a||[]).length-1){var r={};r[e]=t.text||"",p.push(r)}}),n.alertWithArgs({title:t||void 0,message:e||void 0,buttons:p,type:r||void 0,defaultValue:l,cancelButtonKey:s,destructiveButtonKey:u,keyboardType:i},function(t,e){var a=c[t];a&&a(e)})}}]),t}();a.exports=l},229); __d(function(t,r,s,c){"use strict";var e=r(231);s.exports=e},230); __d(function(t,n,r,e){"use strict";var i=n(232);n(234),i.prototype.finally=function(t){return this.then(t,t)},r.exports=i},231); __d(function(n,t,e,r){"use strict";function o(n){var t=new f(f._61);return t._65=1,t._55=n,t}var f=t(233);e.exports=f;var i=o(!0),u=o(!1),c=o(null),a=o(void 0),l=o(0),h=o("");f.resolve=function(n){if(n instanceof f)return n;if(null===n)return c;if(void 0===n)return a;if(!0===n)return i;if(!1===n)return u;if(0===n)return l;if(""===n)return h;if("object"==typeof n||"function"==typeof n)try{var t=n.then;if("function"==typeof t)return new f(t.bind(n))}catch(n){return new f(function(t,e){e(n)})}return o(n)},f.all=function(n){var t=Array.prototype.slice.call(n);return new f(function(n,e){function r(i,u){if(u&&("object"==typeof u||"function"==typeof u)){if(u instanceof f&&u.then===f.prototype.then){for(;3===u._65;)u=u._55;return 1===u._65?r(i,u._55):(2===u._65&&e(u._55),void u.then(function(n){r(i,n)},e))}var c=u.then;if("function"==typeof c){return void new f(c.bind(u)).then(function(n){r(i,n)},e)}}t[i]=u,0==--o&&n(t)}if(0===t.length)return n([]);for(var o=t.length,i=0;i=0;--n){var o=this.tryEntries[n],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var a=d.call(o,"catchLoc"),c=d.call(o,"finallyLoc");if(a&&c){if(this.prev=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&d.call(n,"finallyLoc")&&this.prev=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),h(e),G}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;h(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,e){return this.delegate={iterator:y(t),resultName:r,nextLoc:e},G}}}("object"==typeof t?t:"object"==typeof window?window:"object"==typeof self?self:this)},235); __d(function(e,t,s,r){"use strict";var i=t(237),n=t(241),o=t(245),a=t(44),h=t(40),p=0,d=1,u=2,l=3,_=4,c={arraybuffer:"function"==typeof e.ArrayBuffer,blob:"function"==typeof e.Blob,document:!1,json:!0,text:!0,"":!0},y=["abort","error","load","loadstart","progress","timeout","loadend"],b=y.concat("readystatechange"),f=function(e){function t(){return babelHelpers.classCallCheck(this,t),babelHelpers.possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return babelHelpers.inherits(t,e),t}(i.apply(void 0,y)),v=function(t){function s(){babelHelpers.classCallCheck(this,s);var e=babelHelpers.possibleConstructorReturn(this,(s.__proto__||Object.getPrototypeOf(s)).call(this));return e.UNSENT=p,e.OPENED=d,e.HEADERS_RECEIVED=u,e.LOADING=l,e.DONE=_,e.readyState=p,e.status=0,e.timeout=0,e.upload=new f,e._aborted=!1,e._hasError=!1,e._method=null,e._response="",e._url=null,e._timedOut=!1,e._trackingName="unknown",e._incrementalEvents=!1,e._reset(),e}return babelHelpers.inherits(s,t),babelHelpers.createClass(s,null,[{key:"setInterceptor",value:function(e){s._interceptor=e}}]),babelHelpers.createClass(s,[{key:"_reset",value:function(){this.readyState=this.UNSENT,this.responseHeaders=void 0,this.status=0,delete this.responseURL,this._requestId=null,this._cachedResponse=void 0,this._hasError=!1,this._headers={},this._response="",this._responseType="",this._sent=!1,this._lowerCaseResponseHeaders={},this._clearSubscriptions(),this._timedOut=!1}},{key:"__didCreateRequest",value:function(e){this._requestId=e,s._interceptor&&s._interceptor.requestSent(e,this._url||"",this._method||"GET",this._headers)}},{key:"__didUploadProgress",value:function(e,t,s){e===this._requestId&&this.upload.dispatchEvent({type:"progress",lengthComputable:!0,loaded:t,total:s})}},{key:"__didReceiveResponse",value:function(e,t,r,i){e===this._requestId&&(this.status=t,this.setResponseHeaders(r),this.setReadyState(this.HEADERS_RECEIVED),i||""===i?this.responseURL=i:delete this.responseURL,s._interceptor&&s._interceptor.responseReceived(e,i||this._url||"",t,r||{}))}},{key:"__didReceiveData",value:function(e,t){e===this._requestId&&(this._response=t,this._cachedResponse=void 0,this.setReadyState(this.LOADING),s._interceptor&&s._interceptor.dataReceived(e,t))}},{key:"__didReceiveIncrementalData",value:function(e,t,r,i){e===this._requestId&&(this._response?this._response+=t:this._response=t,s._interceptor&&s._interceptor.dataReceived(e,t),this.setReadyState(this.LOADING),this.__didReceiveDataProgress(e,r,i))}},{key:"__didReceiveDataProgress",value:function(e,t,s){e===this._requestId&&this.dispatchEvent({type:"progress",lengthComputable:s>=0,loaded:t,total:s})}},{key:"__didCompleteResponse",value:function(e,t,r){e===this._requestId&&(t&&(""!==this._responseType&&"text"!==this._responseType||(this._response=t),this._hasError=!0,r&&(this._timedOut=!0)),this._clearSubscriptions(),this._requestId=null,this.setReadyState(this.DONE),t?s._interceptor&&s._interceptor.loadingFailed(e,t):s._interceptor&&s._interceptor.loadingFinished(e,this._response.length))}},{key:"_clearSubscriptions",value:function(){(this._subscriptions||[]).forEach(function(e){e.remove()}),this._subscriptions=[]}},{key:"getAllResponseHeaders",value:function(){if(!this.responseHeaders)return null;var e=this.responseHeaders||{};return Object.keys(e).map(function(t){return t+": "+e[t]}).join("\r\n")}},{key:"getResponseHeader",value:function(e){var t=this._lowerCaseResponseHeaders[e.toLowerCase()];return void 0!==t?t:null}},{key:"setRequestHeader",value:function(e,t){if(this.readyState!==this.OPENED)throw new Error("Request has not been opened");this._headers[e.toLowerCase()]=String(t)}},{key:"setTrackingName",value:function(e){return this._trackingName=e,this}},{key:"open",value:function(e,t,s){if(this.readyState!==this.UNSENT)throw new Error("Cannot open, already sending");if(void 0!==s&&!s)throw new Error("Synchronous http requests are not supported");if(!t)throw new Error("Cannot load an empty url");this._method=e.toUpperCase(),this._url=t,this._aborted=!1,this.setReadyState(this.OPENED)}},{key:"send",value:function(e){var t=this;if(this.readyState!==this.OPENED)throw new Error("Request has not been opened");if(this._sent)throw new Error("Request has already been sent");this._sent=!0;var s=this._incrementalEvents||!!this.onreadystatechange||!!this.onprogress;this._subscriptions.push(n.addListener("didSendNetworkData",function(e){return t.__didUploadProgress.apply(t,babelHelpers.toConsumableArray(e))})),this._subscriptions.push(n.addListener("didReceiveNetworkResponse",function(e){return t.__didReceiveResponse.apply(t,babelHelpers.toConsumableArray(e))})),this._subscriptions.push(n.addListener("didReceiveNetworkData",function(e){return t.__didReceiveData.apply(t,babelHelpers.toConsumableArray(e))})),this._subscriptions.push(n.addListener("didReceiveNetworkIncrementalData",function(e){return t.__didReceiveIncrementalData.apply(t,babelHelpers.toConsumableArray(e))})),this._subscriptions.push(n.addListener("didReceiveNetworkDataProgress",function(e){return t.__didReceiveDataProgress.apply(t,babelHelpers.toConsumableArray(e))})),this._subscriptions.push(n.addListener("didCompleteNetworkResponse",function(e){return t.__didCompleteResponse.apply(t,babelHelpers.toConsumableArray(e))}));var r="text";"arraybuffer"!==this._responseType&&"blob"!==this._responseType||(r="base64"),a(this._method,"Request method needs to be defined."),a(this._url,"Request URL needs to be defined."),n.sendRequest(this._method,this._trackingName,this._url,this._headers,e,r,s,this.timeout,this.__didCreateRequest.bind(this))}},{key:"abort",value:function(){this._aborted=!0,this._requestId&&n.abortRequest(this._requestId),this.readyState===this.UNSENT||this.readyState===this.OPENED&&!this._sent||this.readyState===this.DONE||(this._reset(),this.setReadyState(this.DONE)),this._reset()}},{key:"setResponseHeaders",value:function(e){this.responseHeaders=e||null;var t=e||{};this._lowerCaseResponseHeaders=Object.keys(t).reduce(function(e,s){return e[s.toLowerCase()]=t[s],e},{})}},{key:"setReadyState",value:function(e){this.readyState=e,this.dispatchEvent({type:"readystatechange"}),e===this.DONE&&(this._aborted?this.dispatchEvent({type:"abort"}):this._hasError?this._timedOut?this.dispatchEvent({type:"timeout"}):this.dispatchEvent({type:"error"}):this.dispatchEvent({type:"load"}),this.dispatchEvent({type:"loadend"}))}},{key:"addEventListener",value:function(e,t){"readystatechange"!==e&&"progress"!==e||(this._incrementalEvents=!0),babelHelpers.get(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"addEventListener",this).call(this,e,t)}},{key:"responseType",get:function(){return this._responseType},set:function(e){if(this._sent)throw new Error("Failed to set the 'responseType' property on 'XMLHttpRequest': The response type cannot be set after the request has been sent.");if(!c.hasOwnProperty(e))return void h(!1,"The provided value '"+e+"' is not a valid 'responseType'.");a(c[e]||"document"===e,"The provided value '"+e+"' is unsupported in this environment."),this._responseType=e}},{key:"responseText",get:function(){if(""!==this._responseType&&"text"!==this._responseType)throw new Error("The 'responseText' property is only available if 'responseType' is set to '' or 'text', but it is '"+this._responseType+"'.");return this.readyState0){for(var t=Array(arguments.length),n=0;n0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===r[t-2]?2:"="===r[t-1]?1:0}function a(r){return 3*r.length/4-o(r)}function h(r){var t,n,e,a,h,c=r.length;a=o(r),h=new f(3*c/4-a),n=a>0?c-4:c;var u=0;for(t=0;t>16&255,h[u++]=e>>8&255,h[u++]=255&e;return 2===a?(e=d[r.charCodeAt(t)]<<2|d[r.charCodeAt(t+1)]>>4,h[u++]=255&e):1===a&&(e=d[r.charCodeAt(t)]<<10|d[r.charCodeAt(t+1)]<<4|d[r.charCodeAt(t+2)]>>2,h[u++]=e>>8&255,h[u++]=255&e),h}function c(r){return A[r>>18&63]+A[r>>12&63]+A[r>>6&63]+A[63&r]}function u(r,t,n){for(var e,o=[],a=t;ac?c:h+16383));return 1===e?(t=r[n-1],o+=A[t>>2],o+=A[t<<4&63],o+="=="):2===e&&(t=(r[n-2]<<8)+r[n-1],o+=A[t>>10],o+=A[t>>4&63],o+=A[t<<2&63],o+="="),a.push(o),a.join("")}e.byteLength=a,e.toByteArray=h,e.fromByteArray=i;for(var A=[],d=[],f="undefined"!=typeof Uint8Array?Uint8Array:Array,C="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",y=0,g=C.length;y-1?e:t}function c(t,e){e=e||{};var r=e.body;if("string"==typeof t)this.url=t;else{if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new n(t.headers)),this.method=t.method,this.mode=t.mode,r||null==t._bodyInit||(r=t._bodyInit,t.bodyUsed=!0)}if(this.credentials=e.credentials||this.credentials||"omit",!e.headers&&this.headers||(this.headers=new n(e.headers)),this.method=d(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function l(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var r=t.split("="),o=r.shift().replace(/\+/g," "),n=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(o),decodeURIComponent(n))}}),e}function p(t){var e=new n;return t.split("\r\n").forEach(function(t){var r=t.split(":"),o=r.shift().trim();if(o){var n=r.join(":").trim();e.append(o,n)}}),e}function b(t,e){e||(e={}),this.type="default",this.status="status"in e?e.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new n(e.headers),this.url=e.url||"",this._initBody(t)}if(!t.fetch){var m={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(m.arrayBuffer)var w=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],v=function(t){return t&&DataView.prototype.isPrototypeOf(t)},_=ArrayBuffer.isView||function(t){return t&&w.indexOf(Object.prototype.toString.call(t))>-1};n.prototype.append=function(t,o){t=e(t),o=r(o);var n=this.map[t];n||(n=[],this.map[t]=n),n.push(o)},n.prototype.delete=function(t){delete this.map[e(t)]},n.prototype.get=function(t){var r=this.map[e(t)];return r?r[0]:null},n.prototype.getAll=function(t){return this.map[e(t)]||[]},n.prototype.has=function(t){return this.map.hasOwnProperty(e(t))},n.prototype.set=function(t,o){this.map[e(t)]=[r(o)]},n.prototype.forEach=function(t,e){Object.getOwnPropertyNames(this.map).forEach(function(r){this.map[r].forEach(function(o){t.call(e,o,r,this)},this)},this)},n.prototype.keys=function(){var t=[];return this.forEach(function(e,r){t.push(r)}),o(t)},n.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),o(t)},n.prototype.entries=function(){var t=[];return this.forEach(function(e,r){t.push([r,e])}),o(t)},m.iterable&&(n.prototype["function"==typeof Symbol?Symbol.iterator:"@@iterator"]=n.prototype.entries);var B=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];c.prototype.clone=function(){return new c(this,{body:this._bodyInit})},y.call(c.prototype),y.call(b.prototype),b.prototype.clone=function(){return new b(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new n(this.headers),url:this.url})},b.error=function(){var t=new b(null,{status:0,statusText:""});return t.type="error",t};var A=[301,302,303,307,308];b.redirect=function(t,e){if(-1===A.indexOf(e))throw new RangeError("Invalid status code");return new b(null,{status:e,headers:{location:t}})},t.Headers=n,t.Request=c,t.Response=b,t.fetch=function(t,e){return new Promise(function(r,o){var n=new c(t,e),i=new XMLHttpRequest;i.onload=function(){var t={status:i.status,statusText:i.statusText,headers:p(i.getAllResponseHeaders()||"")};t.url="responseURL"in i?i.responseURL:t.headers.get("X-Request-URL");var e="response"in i?i.response:i.responseText;r(new b(e,t))},i.onerror=function(){o(new TypeError("Network request failed"))},i.ontimeout=function(){o(new TypeError("Network request failed"))},i.open(n.method,n.url,!0),"include"===n.credentials&&(i.withCredentials=!0),"responseType"in i&&m.blob&&(i.responseType="blob"),n.headers.forEach(function(t,e){i.setRequestHeader(e,t)}),i.send(void 0===n._bodyInit?null:n._bodyInit)})},t.fetch.polyfill=!0}}("undefined"!=typeof self?self:this)},247); __d(function(e,t,s,r){"use strict";var i=t(107),n=(t(75),t(76).WebSocketModule),o=t(249),a=t(244),c=t(237),d=t(245),u=0,h=1,l=2,E=3,_=["close","error","message","open"],f=0,p=function(e){function t(e,s,r){babelHelpers.classCallCheck(this,t);var o=babelHelpers.possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return o.CONNECTING=u,o.OPEN=h,o.CLOSING=l,o.CLOSED=E,o.readyState=u,"string"==typeof s&&(s=[s]),Array.isArray(s)||(s=null),o._eventEmitter=new i(n),o._socketId=f++,n.connect(e,s,r,o._socketId),o._registerEvents(),o}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"close",value:function(e,t){this.readyState!==this.CLOSING&&this.readyState!==this.CLOSED&&(this.readyState=this.CLOSING,this._close(e,t))}},{key:"send",value:function(e){if(this.readyState===this.CONNECTING)throw new Error("INVALID_STATE_ERR");if("string"==typeof e)return void n.send(e,this._socketId);if(e instanceof ArrayBuffer||ArrayBuffer.isView(e))return void n.sendBinary(a(e),this._socketId);throw new Error("Unsupported data type")}},{key:"ping",value:function(){if(this.readyState===this.CONNECTING)throw new Error("INVALID_STATE_ERR");n.ping(this._socketId)}},{key:"_close",value:function(e,t){n.close(this._socketId)}},{key:"_unregisterEvents",value:function(){this._subscriptions.forEach(function(e){return e.remove()}),this._subscriptions=[]}},{key:"_registerEvents",value:function(){var e=this;this._subscriptions=[this._eventEmitter.addListener("websocketMessage",function(t){t.id===e._socketId&&e.dispatchEvent(new o("message",{data:"binary"===t.type?d.toByteArray(t.data).buffer:t.data}))}),this._eventEmitter.addListener("websocketOpen",function(t){t.id===e._socketId&&(e.readyState=e.OPEN,e.dispatchEvent(new o("open")))}),this._eventEmitter.addListener("websocketClosed",function(t){t.id===e._socketId&&(e.readyState=e.CLOSED,e.dispatchEvent(new o("close",{code:t.code,reason:t.reason})),e._unregisterEvents(),e.close())}),this._eventEmitter.addListener("websocketFailed",function(t){t.id===e._socketId&&(e.readyState=e.CLOSED,e.dispatchEvent(new o("error",{message:t.message})),e.dispatchEvent(new o("close",{message:t.message})),e._unregisterEvents(),e.close())})]}}]),t}(c.apply(void 0,_));p.CONNECTING=u,p.OPEN=h,p.CLOSING=l,p.CLOSED=E,s.exports=p},248); __d(function(e,t,s,i){"use strict";var l=function e(t,s){babelHelpers.classCallCheck(this,e),this.type=t.toString(),babelHelpers.extends(this,s)};s.exports=l},249); __d(function(e,r,t,o){"use strict";var n=r(107),i=r(76).LocationObserver,s=r(44),a=r(111),v=r(40),c=new n(i),g=[],u=!1,l={getCurrentPosition:function(e,r,t){s("function"==typeof e,"Must provide a valid geo_success callback."),i.getCurrentPosition(t||{},e,r||a)},watchPosition:function(e,r,t){u||(i.startObserving(t||{}),u=!0);var o=g.length;return g.push([c.addListener("geolocationDidChange",e),r?c.addListener("geolocationError",r):null]),o},clearWatch:function(e){var r=g[e];if(r){r[0].remove();var t=r[1];t&&t.remove(),g[e]=void 0;for(var o=!0,n=0;n0&&a.length<20?t+" (keys: "+a.join(", ")+")":t}function l(e,n){var t=i.get(e);return t||null}var i=(n(49),n(96)),r=(n(160),n(153)),o=n(44),p=(n(40),{isMounted:function(e){var n=i.get(e);return!!n&&!!n._renderedComponent},enqueueCallback:function(e,n,t){p.validateCallback(n,t);var a=l(e);if(!a)return null;a._pendingCallbacks?a._pendingCallbacks.push(n):a._pendingCallbacks=[n],u(a)},enqueueCallbackInternal:function(e,n){e._pendingCallbacks?e._pendingCallbacks.push(n):e._pendingCallbacks=[n],u(e)},enqueueForceUpdate:function(e){var n=l(e,"forceUpdate");n&&(n._pendingForceUpdate=!0,u(n))},enqueueReplaceState:function(e,n){var t=l(e,"replaceState");t&&(t._pendingStateQueue=[n],t._pendingReplaceState=!0,u(t))},enqueueSetState:function(e,n){var t=l(e,"setState");if(t){(t._pendingStateQueue||(t._pendingStateQueue=[])).push(n),u(t)}},enqueueElementInternal:function(e,n,t){e._pendingElement=n,e._context=t,u(e)},validateCallback:function(e,n){o(!e||"function"==typeof e,"%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",n,c(e))}});t.exports=p},261); __d(function(e,t,n,i){"use strict";var r=["ResponderEventPlugin","ReactNativeBridgeEventPlugin"];n.exports=r},262); __d(function(e,n,o,r){"use strict";var t=n(94),s={onChange:function(e,n,o){null!==n?t.setJSResponder(n._rootNodeID,o):t.clearJSResponder()}};o.exports=s},263); __d(function(t,e,n,i){"use strict";var o=e(143),r=e(152),s=e(94),h=e(44),u=function(t){this._currentElement=t,this._stringText=""+t,this._hostParent=null,this._rootNodeID=0};babelHelpers.extends(u.prototype,{mountComponent:function(t,e,n,i){h(i.isInAParentText,'RawText "%s" must be wrapped in an explicit component.',this._stringText),this._hostParent=e;var u=r.allocateTag();this._rootNodeID=u;var a=n._tag;return s.createView(u,"RCTRawText",a,{text:this._stringText}),o.precacheNode(this,u),u},getHostNode:function(){return this._rootNodeID},receiveComponent:function(t,e,n){if(t!==this._currentElement){this._currentElement=t;var i=""+t;i!==this._stringText&&(this._stringText=i,s.updateView(this._rootNodeID,"RCTRawText",{text:this._stringText}))}},unmountComponent:function(){o.uncacheNode(this),this._currentElement=null,this._stringText=null,this._rootNodeID=0}}),n.exports=u},264); __d(function(r,t,e,n){"use strict";function o(r,t){for(var e=0,n=r;n;n=n._hostParent)e++;for(var o=0,a=t;a;a=a._hostParent)o++;for(;e-o>0;)r=r._hostParent,e--;for(;o-e>0;)t=t._hostParent,o--;for(var s=e;s--;){if(r===t)return r;r=r._hostParent,t=t._hostParent}return null}function a(r,t){for(;t;){if(t===r)return!0;t=t._hostParent}return!1}function s(r){return r._hostParent}function f(r,t,e){for(var n=[];r;)n.push(r),r=r._hostParent;var o;for(o=n.length;o-- >0;)t(n[o],"captured",e);for(o=0;o0;)e(u[h],"captured",a)}e.exports={isAncestor:a,getLowestCommonAncestor:o,getParentInstance:s,traverseTwoPhase:f,traverseEnterLeave:u}},265); __d(function(n,e,t,o){"use strict";var r=e(157),u=function(n,e){this._currentElement=null,this._renderedComponent=e(n)};babelHelpers.extends(u.prototype,{mountComponent:function(n,e,t,o,u){return r.mountComponent(this._renderedComponent,n,e,t,o,u)},receiveComponent:function(){},getHostNode:function(){return r.getHostNode(this._renderedComponent)},unmountComponent:function(){r.unmountComponent(this._renderedComponent),this._renderedComponent=null}}),t.exports=u},266); __d(function(e,o,t,r){"use strict";function n(e,o,t,r){var n=p(e)?D.startShouldSetResponder:h(e)?D.moveShouldSetResponder:"topSelectionChange"===e?D.selectionChangeShouldSetResponder:D.scrollShouldSetResponder,s=v?i.getLowestCommonAncestor(v,o):o,a=s===v,S=c.getPooled(n,s,t,r);S.touchHistory=d.touchHistory,a?l.accumulateTwoPhaseDispatchesSkipTarget(S):l.accumulateTwoPhaseDispatches(S);var H=m(S);if(S.isPersistent()||S.constructor.release(S),!H||H===v)return null;var b,T=c.getPooled(D.responderGrant,H,t,r);T.touchHistory=d.touchHistory,l.accumulateDirectDispatches(T);var y=!0===R(T);if(v){var C=c.getPooled(D.responderTerminationRequest,v,t,r);C.touchHistory=d.touchHistory,l.accumulateDirectDispatches(C);var N=!g(C)||R(C);if(C.isPersistent()||C.constructor.release(C),N){var G=c.getPooled(D.responderTerminate,v,t,r);G.touchHistory=d.touchHistory,l.accumulateDirectDispatches(G),b=u(b,[T,G]),f(H,y)}else{var P=c.getPooled(D.responderReject,H,t,r);P.touchHistory=d.touchHistory,l.accumulateDirectDispatches(P),b=u(b,P)}}else b=u(b,T),f(H,y);return b}function s(e,o,t){return o&&("topScroll"===e&&!t.responderIgnoreScroll||H>0&&"topSelectionChange"===e||p(e)||h(e))}function a(e){var o=e.touches;if(!o||0===o.length)return!0;for(var t=0;t=0))return console.error("Ended a touch event which was not counted in `trackedTouchCount`."),null;H-=1}d.recordTouchTrack(e,t);var i=s(e,o,t)?n(e,o,t,r):null,R=v&&p(e),g=v&&h(e),m=v&&S(e),y=R?D.responderStart:g?D.responderMove:m?D.responderEnd:null;if(y){var C=c.getPooled(y,v,t,r);C.touchHistory=d.touchHistory,l.accumulateDirectDispatches(C),i=u(i,C)}var N=v&&"topTouchCancel"===e,G=v&&!N&&S(e)&&a(t),P=N?D.responderTerminate:G?D.responderRelease:null;if(P){var I=c.getPooled(P,v,t,r);I.touchHistory=d.touchHistory,l.accumulateDirectDispatches(I),i=u(i,I),f(null)}var j=d.touchHistory.numberActiveTouches;return T.GlobalInteractionHandler&&j!==b&&T.GlobalInteractionHandler.onChange(j),b=j,i},GlobalResponderHandler:null,GlobalInteractionHandler:null,injection:{injectGlobalResponderHandler:function(e){T.GlobalResponderHandler=e},injectGlobalInteractionHandler:function(e){T.GlobalInteractionHandler=e}}};t.exports=T},267); __d(function(t,n,u,r){"use strict";function s(t,n,u,r){return c.call(this,t,n,u,r)}var c=n(257),i={touchHistory:function(t){return null}};c.augmentClass(s,i),u.exports=s},268); __d(function(e,t,r,i){"use strict";function a(e){return e.timeStamp||e.timestamp}function n(e){return{touchActive:!0,startPageX:e.pageX,startPageY:e.pageY,startTimeStamp:a(e),currentPageX:e.pageX,currentPageY:e.pageY,currentTimeStamp:a(e),previousPageX:e.pageX,previousPageY:e.pageY,previousTimeStamp:a(e)}}function c(e,t){e.touchActive=!0,e.startPageX=t.pageX,e.startPageY=t.pageY,e.startTimeStamp=a(t),e.currentPageX=t.pageX,e.currentPageY=t.pageY,e.currentTimeStamp=a(t),e.previousPageX=t.pageX,e.previousPageY=t.pageY,e.previousTimeStamp=a(t)}function u(e){var t=e.identifier;return v(null!=t,"Touch object is missing identifier."),T(t<=S,"Touch identifier %s is greater than maximum supported %s which causes performance issues backfilling array locations for all of the indices.",t,S),t}function o(e){var t=u(e),r=X[t];r?c(r,e):X[t]=n(e),Y.mostRecentTimeStamp=a(e)}function s(e){var t=X[u(e)];t?(t.touchActive=!0,t.previousPageX=t.currentPageX,t.previousPageY=t.currentPageY,t.previousTimeStamp=t.currentTimeStamp,t.currentPageX=e.pageX,t.currentPageY=e.pageY,t.currentTimeStamp=a(e),Y.mostRecentTimeStamp=a(e)):console.error("Cannot record touch move without a touch start.\nTouch Move: %s\n","Touch Bank: %s",p(e),m())}function g(e){var t=X[u(e)];t?(t.touchActive=!1,t.previousPageX=t.currentPageX,t.previousPageY=t.currentPageY,t.previousTimeStamp=t.currentTimeStamp,t.currentPageX=e.pageX,t.currentPageY=e.pageY,t.currentTimeStamp=a(e),Y.mostRecentTimeStamp=a(e)):console.error("Cannot record touch end without a touch start.\nTouch End: %s\n","Touch Bank: %s",p(e),m())}function p(e){return JSON.stringify({identifier:e.identifier,pageX:e.pageX,pageY:e.pageY,timestamp:a(e)})}function m(){var e=JSON.stringify(X.slice(0,S));return X.length>S&&(e+=" (original size: "+X.length+")"),e}var h=t(147),v=t(44),T=t(40),f=h.isEndish,P=h.isMoveish,l=h.isStartish,S=20,X=[],Y={touchBank:X,numberActiveTouches:0,indexOfSingleActiveTouch:-1,mostRecentTimeStamp:0},d={recordTouchTrack:function(e,t){if(P(e))t.changedTouches.forEach(s);else if(l(e))t.changedTouches.forEach(o),Y.numberActiveTouches=t.touches.length,1===Y.numberActiveTouches&&(Y.indexOfSingleActiveTouch=t.touches[0].identifier);else if(f(e)&&(t.changedTouches.forEach(g),Y.numberActiveTouches=t.touches.length,1===Y.numberActiveTouches))for(var r=0;r")),p.TOUCH_TARGET_DEBUG&&e.type&&"View"===e.type.displayName&&(s=r.Children.toArray(s),s.push(p.renderDebugView({color:"red",hitSlop:this.props.hitSlop})));var t=p.TOUCH_TARGET_DEBUG&&e.type&&"Text"===e.type.displayName?[e.props.style,{color:"red"}]:e.props.style;return r.cloneElement(e,{accessible:!1!==this.props.accessible,accessibilityLabel:this.props.accessibilityLabel,accessibilityComponentType:this.props.accessibilityComponentType,accessibilityTraits:this.props.accessibilityTraits,testID:this.props.testID,onLayout:this.props.onLayout,hitSlop:this.props.hitSlop,onStartShouldSetResponder:this.touchableHandleStartShouldSetResponder,onResponderTerminationRequest:this.touchableHandleResponderTerminationRequest,onResponderGrant:this.touchableHandleResponderGrant,onResponderMove:this.touchableHandleResponderMove,onResponderRelease:this.touchableHandleResponderRelease,onResponderTerminate:this.touchableHandleResponderTerminate,style:t,children:s})}});t.exports=u},277); __d(function(e,n,s,t){"use strict";var a=n(44),o=function(e){a(!(e.delayPressIn<0||e.delayPressOut<0||e.delayLongPress<0),"Touchable components cannot have negative delay properties")};s.exports=o},278); __d(function(e,t,n,i){"use strict";var a=t(69),r=t(97),m=t(98),s=t(130),o=t(139),u=r.PropTypes,p=r.createClass({displayName:"DatePickerIOS",_picker:void 0,mixins:[a],propTypes:babelHelpers.extends({},s.propTypes,{date:u.instanceOf(Date).isRequired,onDateChange:u.func.isRequired,maximumDate:u.instanceOf(Date),minimumDate:u.instanceOf(Date),mode:u.oneOf(["date","time","datetime"]),minuteInterval:u.oneOf([1,2,3,4,5,6,10,12,15,20,30]),timeZoneOffsetInMinutes:u.number}),getDefaultProps:function(){return{mode:"datetime"}},_onChange:function(e){var t=e.nativeEvent.timestamp;this.props.onDateChange&&this.props.onDateChange(new Date(t)),this.props.onChange&&this.props.onChange(e);var n=this.props.date.getTime();this._picker&&t!==n&&this._picker.setNativeProps({date:n})},render:function(){var e=this,t=this.props;return r.createElement(s,{style:t.style},r.createElement(c,{ref:function(t){e._picker=t},style:d.datePickerIOS,date:t.date.getTime(),maximumDate:t.maximumDate?t.maximumDate.getTime():void 0,minimumDate:t.minimumDate?t.minimumDate.getTime():void 0,mode:t.mode,minuteInterval:t.minuteInterval,timeZoneOffsetInMinutes:t.timeZoneOffsetInMinutes,onChange:this._onChange,onStartShouldSetResponder:function(){return!0},onResponderTerminationRequest:function(){return!1}}))}}),d=m.create({datePickerIOS:{height:216}}),c=o("RCTDatePicker",{propTypes:babelHelpers.extends({},p.propTypes,{date:u.number,minimumDate:u.number,maximumDate:u.number,onDateChange:function(){return null},onChange:u.func})});n.exports=p},279); __d(function(t,s,c,e){"use strict";c.exports=s(140)},280); __d(function(e,a,n,l){"use strict";var r=a(76).ImageEditingManager,t=function(){function e(){babelHelpers.classCallCheck(this,e)}return babelHelpers.createClass(e,null,[{key:"cropImage",value:function(e,a,n,l){r.cropImage(e,a,n,l)}}]),e}();n.exports=t},281); __d(function(e,a,o,r){"use strict";var n=a(76).ImageStoreManager,g=function(){function e(){babelHelpers.classCallCheck(this,e)}return babelHelpers.createClass(e,null,[{key:"hasImageForTag",value:function(e,a){n.hasImageForTag?n.hasImageForTag(e,a):console.warn("hasImageForTag() not implemented")}},{key:"removeImageForTag",value:function(e){n.removeImageForTag?n.removeImageForTag(e):console.warn("removeImageForTag() not implemented")}},{key:"addImageFromBase64",value:function(e,a,o){n.addImageFromBase64(e,a,o)}},{key:"getBase64ForTag",value:function(e,a,o){n.getBase64ForTag(e,a,o)}}]),e}();o.exports=g},282); __d(function(e,t,o,r){"use strict";var i=t(108),n=t(284),a=(t(75),t(97)),s=t(276),h=t(130),l=a.PropTypes,p=a.createClass({displayName:"KeyboardAvoidingView",mixins:[s],propTypes:babelHelpers.extends({},h.propTypes,{behavior:l.oneOf(["height","position","padding"]),contentContainerStyle:h.propTypes.style,keyboardVerticalOffset:l.number.isRequired}),getDefaultProps:function(){return{keyboardVerticalOffset:0}},getInitialState:function(){return{bottom:0}},subscriptions:[],frame:null,relativeKeyboardHeight:function(e){var t=this.frame;if(!t||!e)return 0;var o=Math.max(t.y,e.screenY-this.props.keyboardVerticalOffset),r=Math.min(t.y+t.height,e.screenY+e.height-this.props.keyboardVerticalOffset);return t.y>e.screenY?t.y+t.height-e.screenY-this.props.keyboardVerticalOffset:Math.max(r-o,0)},onKeyboardChange:function(e){if(!e)return void this.setState({bottom:0});var t=e.duration,o=e.easing,r=e.endCoordinates,i=this.relativeKeyboardHeight(r);t&&o&&n.configureNext({duration:t,update:{duration:t,type:n.Types[o]||"keyboard"}}),this.setState({bottom:i})},onLayout:function(e){this.frame=e.nativeEvent.layout},componentWillUpdate:function(e,t,o){t.bottom===this.state.bottom&&"height"===this.props.behavior&&"height"===e.behavior&&(t.bottom=0)},componentWillMount:function(){this.subscriptions=[i.addListener("keyboardWillChangeFrame",this.onKeyboardChange)]},componentWillUnmount:function(){this.subscriptions.forEach(function(e){return e.remove()})},render:function(){var e=this.props,t=e.behavior,o=e.children,r=e.style,i=babelHelpers.objectWithoutProperties(e,["behavior","children","style"]);switch(t){case"height":var n=void 0;return this.frame&&(n={height:this.frame.height-this.state.bottom,flex:0}),a.createElement(h,babelHelpers.extends({ref:"VIEW",style:[r,n],onLayout:this.onLayout},i),o);case"position":var s={bottom:this.state.bottom},l=this.props.contentContainerStyle;return a.createElement(h,babelHelpers.extends({ref:"VIEW",style:r,onLayout:this.onLayout},i),a.createElement(h,{style:[l,s]},o));case"padding":var p={paddingBottom:this.state.bottom};return a.createElement(h,babelHelpers.extends({ref:"VIEW",style:[r,p],onLayout:this.onLayout},i),o);default:return a.createElement(h,babelHelpers.extends({ref:"VIEW",onLayout:this.onLayout,style:r},i),o)}}});o.exports=p},283); __d(function(e,n,t,i){"use strict";function r(e,n){b({config:e},"config","LayoutAnimation.configureNext"),u.configureNextLayoutAnimation(e,n||function(){},function(){})}function a(e,n,t){return{duration:e,create:{type:n,property:t},update:{type:n},delete:{type:n,property:t}}}var p=n(97),o=p.PropTypes,u=n(94),s=n(132),c=n(115),y={spring:!0,linear:!0,easeInEaseOut:!0,easeIn:!0,easeOut:!0,keyboard:!0},l=c(y),d={opacity:!0,scaleXY:!0},g=c(d),f=s({duration:o.number,delay:o.number,springDamping:o.number,initialVelocity:o.number,type:o.oneOf(Object.keys(l)).isRequired,property:o.oneOf(Object.keys(g))}),b=s({duration:o.number.isRequired,create:f,update:f,delete:f}),O={easeInEaseOut:a(300,l.easeInEaseOut,g.opacity),linear:a(500,l.linear,g.opacity),spring:{duration:700,create:{type:l.linear,property:g.opacity},update:{type:l.spring,springDamping:.4},delete:{type:l.linear,property:g.opacity}}},m={configureNext:r,create:a,Types:l,Properties:g,configChecker:b,Presets:O,easeInEaseOut:r.bind(null,O.easeInEaseOut),linear:r.bind(null,O.linear),spring:r.bind(null,O.spring)};t.exports=m},284); __d(function(e,t,o,n){"use strict";var r=t(286),s=t(97),i=t(223),l=t(76).ScrollViewManager,d=t(221),a=t(273),h=t(288),c=t(276),p=t(289),u=t(287),R=t(133),g=s.PropTypes,w=s.createClass({displayName:"ListView",_childFrames:[],_sentEndForContentLength:null,_scrollComponent:null,_prevRenderedRowsCount:0,_visibleRows:{},scrollProperties:{},mixins:[a.Mixin,c],statics:{DataSource:r},propTypes:babelHelpers.extends({},d.propTypes,{dataSource:g.instanceOf(r).isRequired,renderSeparator:g.func,renderRow:g.func.isRequired,initialListSize:g.number.isRequired,onEndReached:g.func,onEndReachedThreshold:g.number.isRequired,pageSize:g.number.isRequired,renderFooter:g.func,renderHeader:g.func,renderSectionHeader:g.func,renderScrollComponent:s.PropTypes.func.isRequired,scrollRenderAheadDistance:s.PropTypes.number.isRequired,onChangeVisibleRows:s.PropTypes.func,removeClippedSubviews:s.PropTypes.bool,stickySectionHeadersEnabled:s.PropTypes.bool,stickyHeaderIndices:g.arrayOf(g.number).isRequired,enableEmptySections:g.bool}),getMetrics:function(){return{contentLength:this.scrollProperties.contentLength,totalRows:this.props.enableEmptySections?this.props.dataSource.getRowAndSectionCount():this.props.dataSource.getRowCount(),renderedRows:this.state.curRenderedRowsCount,visibleRows:Object.keys(this._visibleRows).length}},getScrollResponder:function(){if(this._scrollComponent&&this._scrollComponent.getScrollResponder)return this._scrollComponent.getScrollResponder()},getScrollableNode:function(){return this._scrollComponent&&this._scrollComponent.getScrollableNode?this._scrollComponent.getScrollableNode():i.findNodeHandle(this._scrollComponent)},scrollTo:function(){if(this._scrollComponent&&this._scrollComponent.scrollTo){var e;(e=this._scrollComponent).scrollTo.apply(e,arguments)}},scrollToEnd:function(e){this._scrollComponent&&(this._scrollComponent.scrollToEnd?this._scrollComponent.scrollToEnd(e):console.warn("The scroll component used by the ListView does not support scrollToEnd. Check the renderScrollComponent prop of your ListView."))},setNativeProps:function(e){this._scrollComponent&&this._scrollComponent.setNativeProps(e)},getDefaultProps:function(){return{initialListSize:10,pageSize:1,renderScrollComponent:function(e){return s.createElement(d,e)},scrollRenderAheadDistance:1e3,onEndReachedThreshold:1e3,stickySectionHeadersEnabled:!0,stickyHeaderIndices:[]}},getInitialState:function(){return{curRenderedRowsCount:this.props.initialListSize,highlightedRow:{}}},getInnerViewNode:function(){return this._scrollComponent.getInnerViewNode()},componentWillMount:function(){this.scrollProperties={visibleLength:null,contentLength:null,offset:0},this._childFrames=[],this._visibleRows={},this._prevRenderedRowsCount=0,this._sentEndForContentLength=null},componentDidMount:function(){var e=this;this.requestAnimationFrame(function(){e._measureAndUpdateScrollProps()})},componentWillReceiveProps:function(e){var t=this;this.props.dataSource===e.dataSource&&this.props.initialListSize===e.initialListSize||this.setState(function(e,o){return t._prevRenderedRowsCount=0,{curRenderedRowsCount:Math.min(Math.max(e.curRenderedRowsCount,o.initialListSize),o.enableEmptySections?o.dataSource.getRowAndSectionCount():o.dataSource.getRowCount())}},function(){return t._renderMoreRowsIfNeeded()})},componentDidUpdate:function(){var e=this;this.requestAnimationFrame(function(){e._measureAndUpdateScrollProps()})},_onRowHighlighted:function(e,t){this.setState({highlightedRow:{sectionID:e,rowID:t}})},render:function(){for(var e=[],o=this.props.dataSource,n=o.rowIdentities,r=0,i=[],l=this.props.renderHeader&&this.props.renderHeader(),d=this.props.renderFooter&&this.props.renderFooter(),a=l?1:0,c=0;c=this._prevRenderedRowsCount&&o.sectionHeaderShouldUpdate(c);e.push(s.createElement(h,{key:"s_"+u,shouldUpdate:!!g,render:this.props.renderSectionHeader.bind(null,o.getSectionHeaderData(c),u)})),this.props.stickySectionHeadersEnabled&&i.push(a++)}for(var w=0;w=this._prevRenderedRowsCount&&o.rowShouldUpdate(c,w),C=s.createElement(h,{key:"r_"+f,shouldUpdate:!!m,render:this.props.renderRow.bind(null,o.getRowData(c,w),u,S,this._onRowHighlighted)});if(e.push(C),a++,this.props.renderSeparator&&(w!==R.length-1||c===n.length-1)){var b=this.state.highlightedRow.sectionID===u&&(this.state.highlightedRow.rowID===S||this.state.highlightedRow.rowID===R[w+1]),_=this.props.renderSeparator(u,S,b);_&&(e.push(_),a++)}if(++r===this.state.curRenderedRowsCount)break}if(r>=this.state.curRenderedRowsCount)break}var v=this.props,y=v.renderScrollComponent,E=babelHelpers.objectWithoutProperties(v,["renderScrollComponent"]);return E.scrollEventThrottle||(E.scrollEventThrottle=50),void 0===E.removeClippedSubviews&&(E.removeClippedSubviews=!0),babelHelpers.extends(E,{onScroll:this._onScroll,stickyHeaderIndices:this.props.stickyHeaderIndices.concat(i),onKeyboardWillShow:void 0,onKeyboardWillHide:void 0,onKeyboardDidShow:void 0,onKeyboardDidHide:void 0}),p(y(E),{ref:this._setScrollComponentRef,onContentSizeChange:this._onContentSizeChange,onLayout:this._onLayout},l,e,d)},_measureAndUpdateScrollProps:function(){var e=this.getScrollResponder();e&&e.getInnerViewNode&&l&&l.calculateChildFrames&&l.calculateChildFrames(i.findNodeHandle(e),this._updateVisibleRows)},_setScrollComponentRef:function(e){this._scrollComponent=e},_onContentSizeChange:function(e,t){var o=this.props.horizontal?e:t;o!==this.scrollProperties.contentLength&&(this.scrollProperties.contentLength=o,this._updateVisibleRows(),this._renderMoreRowsIfNeeded()),this.props.onContentSizeChange&&this.props.onContentSizeChange(e,t)},_onLayout:function(e){var t=e.nativeEvent.layout,o=t.width,n=t.height,r=this.props.horizontal?o:n;r!==this.scrollProperties.visibleLength&&(this.scrollProperties.visibleLength=r,this._updateVisibleRows(),this._renderMoreRowsIfNeeded()),this.props.onLayout&&this.props.onLayout(e)},_maybeCallOnEndReached:function(e){return!!(this.props.onEndReached&&this.scrollProperties.contentLength!==this._sentEndForContentLength&&this._getDistanceFromEnd(this.scrollProperties)s||_this.props.onEndReachedThreshold&&(this._sentEndForContentLength=null),this.props.onScroll&&this.props.onScroll(e)}});o.exports=w},285); __d(function(t,e,i,n){"use strict";function s(t,e,i){return t[e][i]}function a(t,e){return t[e]}function o(t){for(var e=0,i=0;i=this.rowIdentities[i].length))return this.rowIdentities[i][e];e-=this.rowIdentities[i].length}return null}},{key:"getSectionIDForFlatIndex",value:function(t){for(var e=t,i=0;i=this.rowIdentities[i].length))return this.sectionIdentities[i];e-=this.rowIdentities[i].length}return null}},{key:"getSectionLengths",value:function(){for(var t=[],e=0;e2?c-2:0),a=2;a=1,"Navigator requires props.initialRoute or props.initialRouteStack.");var n=e.length-1;return this.props.initialRoute&&(n=e.indexOf(this.props.initialRoute),b(-1!==n,"initialRoute is not in initialRouteStack.")),{sceneConfigStack:e.map(function(n){return t.props.configureScene(n,e)}),routeStack:e,presentedIndex:n,transitionFromIndex:null,activeGesture:null,pendingGestureProgress:null,transitionQueue:[]}},componentWillMount:function(){var t=this;this.__defineGetter__("navigationContext",this._getNavigationContext),this._subRouteFocus=[],this.parentNavigator=this.props.navigator,this._handlers={},this.springSystem=new G.SpringSystem,this.spring=this.springSystem.createSpring(),this.spring.setRestSpeedThreshold(.05),this.spring.setCurrentValue(0).setAtRest(),this.spring.addListener({onSpringEndStateChange:function(){t._interactionHandle||(t._interactionHandle=t.createInteractionHandle())},onSpringUpdate:function(){t._handleSpringUpdate()},onSpringAtRest:function(){t._completeTransition()}}),this.panGesture=p.create({onMoveShouldSetPanResponder:this._handleMoveShouldSetPanResponder,onPanResponderRelease:this._handlePanResponderRelease,onPanResponderMove:this._handlePanResponderMove,onPanResponderTerminate:this._handlePanResponderTerminate}),this._interactionHandle=null,this._emitWillFocus(this.state.routeStack[this.state.presentedIndex])},componentDidMount:function(){this._handleSpringUpdate(),this._emitDidFocus(this.state.routeStack[this.state.presentedIndex]),this._enableTVEventHandler()},componentWillUnmount:function(){this._navigationContext&&(this._navigationContext.dispose(),this._navigationContext=null),this.spring.destroy(),this._interactionHandle&&this.clearInteractionHandle(this._interactionHandle),this._disableTVEventHandler()},immediatelyResetRouteStack:function(t){var e=this,n=t.length-1;this._emitWillFocus(t[n]),this.setState({routeStack:t,sceneConfigStack:t.map(function(n){return e.props.configureScene(n,t)}),presentedIndex:n,activeGesture:null,transitionFromIndex:null,transitionQueue:[]},function(){e._handleSpringUpdate();var t=e._navBar;t&&t.immediatelyRefresh&&t.immediatelyRefresh(),e._emitDidFocus(e.state.routeStack[e.state.presentedIndex])})},_transitionTo:function(t,e,n,s){if(this.state.presentedIndex===t)return void(s&&s());if(null!==this.state.transitionFromIndex)return void this.state.transitionQueue.push({destIndex:t,velocity:e,cb:s});this.state.transitionFromIndex=this.state.presentedIndex,this.state.presentedIndex=t,this.state.transitionCb=s,this._onAnimationStart(),a&&a.startRecordingFps();var i=this.state.sceneConfigStack[this.state.transitionFromIndex]||this.state.sceneConfigStack[this.state.presentedIndex];b(i,"Cannot configure scene at index "+this.state.transitionFromIndex),null!=n&&this.spring.setCurrentValue(n),this.spring.setOvershootClampingEnabled(!0),this.spring.getSpringConfig().friction=i.springFriction,this.spring.getSpringConfig().tension=i.springTension,this.spring.setVelocity(e||i.defaultTransitionVelocity),this.spring.setEndValue(1)},_handleSpringUpdate:function(){if(this.isMounted())if(null!=this.state.transitionFromIndex)this._transitionBetween(this.state.transitionFromIndex,this.state.presentedIndex,this.spring.getCurrentValue());else if(null!=this.state.activeGesture){var t=this.state.presentedIndex+this._deltaForGestureAction(this.state.activeGesture);this._transitionBetween(this.state.presentedIndex,t,this.spring.getCurrentValue())}},_completeTransition:function(){if(this.isMounted()){if(1!==this.spring.getCurrentValue()&&0!==this.spring.getCurrentValue())return void(this.state.pendingGestureProgress&&(this.state.pendingGestureProgress=null));this._onAnimationEnd();var t=this.state.presentedIndex,e=this._subRouteFocus[t]||this.state.routeStack[t];if(a&&a.stopRecordingFps(Date.now()),this.state.transitionFromIndex=null,this.spring.setCurrentValue(0).setAtRest(),this._hideScenes(),this.state.transitionCb&&(this.state.transitionCb(),this.state.transitionCb=null),this._emitDidFocus(e),this._interactionHandle&&(this.clearInteractionHandle(this._interactionHandle),this._interactionHandle=null),this.state.pendingGestureProgress){var n=this.state.presentedIndex+this._deltaForGestureAction(this.state.activeGesture);return this._enableScene(n),void this.spring.setEndValue(this.state.pendingGestureProgress)}if(this.state.transitionQueue.length){var s=this.state.transitionQueue.shift();this._enableScene(s.destIndex),this._emitWillFocus(this.state.routeStack[s.destIndex]),this._transitionTo(s.destIndex,s.velocity,null,s.cb)}}},_emitDidFocus:function(t){this.navigationContext.emit("didfocus",{route:t}),this.props.onDidFocus&&this.props.onDidFocus(t)},_emitWillFocus:function(t){this.navigationContext.emit("willfocus",{route:t});var e=this._navBar;e&&e.handleWillFocus&&e.handleWillFocus(t),this.props.onWillFocus&&this.props.onWillFocus(t)},_hideScenes:function(){var t=null;this.state.activeGesture&&(t=this.state.presentedIndex+this._deltaForGestureAction(this.state.activeGesture));for(var e=0;e=this.state.routeStack.length-1&&"jumpForward"===t||e},_deltaForGestureAction:function(t){switch(t){case"pop":case"jumpBack":return-1;case"jumpForward":return 1;default:return void b(!1,"Unsupported gesture action "+t)}},_handlePanResponderRelease:function(t,e){var n=this,s=this.state.sceneConfigStack[this.state.presentedIndex],i=this.state.activeGesture;if(i){var r=s.gestures[i],a=this.state.presentedIndex+this._deltaForGestureAction(this.state.activeGesture);if(0===this.spring.getCurrentValue())return this.spring.setCurrentValue(0).setAtRest(),void this._completeTransition();var o,u,h="top-to-bottom"===r.direction||"bottom-to-top"===r.direction,c="right-to-left"===r.direction||"bottom-to-top"===r.direction;h?(o=c?-e.vy:e.vy,u=c?-e.dy:e.dy):(o=c?-e.vx:e.vx,u=c?-e.dx:e.dx);var d=x(-10,o,10);if(Math.abs(o)r.fullDistance*r.stillCompletionRatio?r.snapVelocity:-r.snapVelocity}if(d<0||this._doesGestureOverswipe(i)){if(null==this.state.transitionFromIndex){var l=this.state.presentedIndex;this.state.presentedIndex=a,this._transitionTo(l,-d,1-this.spring.getCurrentValue())}}else this._emitWillFocus(this.state.routeStack[a]),this._transitionTo(a,d,null,function(){"pop"===i&&n._cleanScenesPastIndex(a)});this._detachGesture()}},_handlePanResponderTerminate:function(t,e){if(null!=this.state.activeGesture){var n=this.state.presentedIndex+this._deltaForGestureAction(this.state.activeGesture);this._detachGesture();var s=this.state.presentedIndex;this.state.presentedIndex=n,this._transitionTo(s,null,1-this.spring.getCurrentValue())}},_attachGesture:function(t){this.state.activeGesture=t;var e=this.state.presentedIndex+this._deltaForGestureAction(this.state.activeGesture);this._enableScene(e)},_detachGesture:function(){this.state.activeGesture=null,this.state.pendingGestureProgress=null,this._hideScenes()},_handlePanResponderMove:function(t,e){void 0!==this._isMoveGestureAttached&&(b(this._expectingGestureGrant,"Responder granted unexpectedly."),this._attachGesture(this._expectingGestureGrant),this._onAnimationStart(),this._expectingGestureGrant=void 0);var n=this.state.sceneConfigStack[this.state.presentedIndex];if(this.state.activeGesture){var s=n.gestures[this.state.activeGesture];return this._moveAttachedGesture(s,e)}var i=this._matchGestureAction(w,n.gestures,e);i&&this._attachGesture(i)},_moveAttachedGesture:function(t,e){var n="top-to-bottom"===t.direction||"bottom-to-top"===t.direction,s="right-to-left"===t.direction||"bottom-to-top"===t.direction,i=n?e.dy:e.dx;i=s?-i:i;var r=t.gestureDetectMovement,a=(i-r)/(t.fullDistance-r);if(a<0&&t.isDetachable){var o=this.state.presentedIndex+this._deltaForGestureAction(this.state.activeGesture);return this._transitionBetween(this.state.presentedIndex,o,0),this._detachGesture(),void(null!=this.state.pendingGestureProgress&&this.spring.setCurrentValue(0))}if(t.overswipe&&this._doesGestureOverswipe(this.state.activeGesture)){var u=t.overswipe.frictionConstant,h=t.overswipe.frictionByDistance;a*=1/(u+Math.abs(a)*h)}a=x(0,a,1),null!=this.state.transitionFromIndex?this.state.pendingGestureProgress=a:this.state.pendingGestureProgress?this.spring.setEndValue(a):this.spring.setCurrentValue(a)},_matchGestureAction:function(t,e,n){var s=this;if(!e||!t||!t.some)return null;var i=null;return t.some(function(t,r){var a=e[t];if(a){if(null==a.overswipe&&s._doesGestureOverswipe(t))return!1;var o="top-to-bottom"===a.direction||"bottom-to-top"===a.direction,u="right-to-left"===a.direction||"bottom-to-top"===a.direction,h=o?n.y0:n.x0,c=o?n.moveY:n.moveX,d=o?n.dy:n.dx,l=o?n.dx:n.dy,p=a.edgeHitWidth;u&&(h=-h,c=-c,d=-d,l=-l,p=o?-(k-p):-(y-p)),0===h&&(h=c);if(!(null==a.edgeHitWidth||h=a.gestureDetectMovement))return!1;if(Math.abs(d)>Math.abs(l)*a.directionRatio)return i=t,!0;s._eligibleGestures=s._eligibleGestures.slice().splice(r,1)}}),i||null},_transitionSceneStyle:function(t,e,n,s){var i=this._sceneRefs[s];if(null!==i&&void 0!==i){var r=t=0&&t>=0&&s.updateProgress(n,t,e)},_handleResponderTerminationRequest:function(){return!1},_getDestIndexWithinBounds:function(t){var e=this.state.presentedIndex,n=e+t;b(n>=0,"Cannot jump before the first route.");var s=this.state.routeStack.length-1;return b(s>=n,"Cannot jump past the last route."),n},_jumpN:function(t){var e=this._getDestIndexWithinBounds(t);this._enableScene(e),this._emitWillFocus(this.state.routeStack[e]),this._transitionTo(e)},jumpTo:function(t){var e=this.state.routeStack.indexOf(t);b(-1!==e,"Cannot jump to route that is not in the route stack"),this._jumpN(e-this.state.presentedIndex)},jumpForward:function(){this._jumpN(1)},jumpBack:function(){this._jumpN(-1)},push:function(t){var e=this;b(!!t,"Must supply route to push");var n=this.state.presentedIndex+1,s=this.state.routeStack.slice(0,n),i=this.state.sceneConfigStack.slice(0,n),r=s.concat([t]),a=r.length-1,o=this.props.configureScene(t,r),u=i.concat([o]);this._emitWillFocus(r[a]),this.setState({routeStack:r,sceneConfigStack:u},function(){e._enableScene(a),e._transitionTo(a,o.defaultTransitionVelocity)})},popN:function(t){var e=this;if(b("number"==typeof t,"Must supply a number to popN"),!((t=parseInt(t,10))<=0||this.state.presentedIndex-t<0)){var n=this.state.presentedIndex-t,s=this.state.routeStack[this.state.presentedIndex],i=this.props.configureScene(s);this._enableScene(n),this._clearTransformations(n),this._emitWillFocus(this.state.routeStack[n]),this._transitionTo(n,i.defaultTransitionVelocity,null,function(){e._cleanScenesPastIndex(n)})}},pop:function(){this.state.transitionQueue.length||this.popN(1)},replaceAtIndex:function(t,e,n){var s=this;if(b(!!t,"Must supply route to replace"),e<0&&(e+=this.state.routeStack.length),!(this.state.routeStack.length<=e)){var i=this.state.routeStack.slice(),r=this.state.sceneConfigStack.slice();i[e]=t,r[e]=this.props.configureScene(t,i),e===this.state.presentedIndex&&this._emitWillFocus(t),this.setState({routeStack:i,sceneConfigStack:r},function(){e===s.state.presentedIndex&&s._emitDidFocus(t),n&&n()})}},replace:function(t){this.replaceAtIndex(t,this.state.presentedIndex)},replacePrevious:function(t){this.replaceAtIndex(t,this.state.presentedIndex-1)},popToTop:function(){this.popToRoute(this.state.routeStack[0])},popToRoute:function(t){var e=this.state.routeStack.indexOf(t);b(-1!==e,"Calling popToRoute for a route that doesn't exist!");var n=this.state.presentedIndex-e;this.popN(n)},replacePreviousAndPop:function(t){this.state.routeStack.length<2||(this.replacePrevious(t),this.pop())},resetTo:function(t){var e=this;b(!!t,"Must supply route to push"),this.replaceAtIndex(t,0,function(){e.popN(e.state.presentedIndex)})},getCurrentRoutes:function(){return this.state.routeStack.slice()},_cleanScenesPastIndex:function(t){var e=t+1;e0){var s=Array.prototype.slice.call(arguments);return void this._emitQueue.push(s)}if(this._emitCounter++,p.has(e))this.__emit(e,t,null,{defaultPrevented:!1,eventPhase:l,propagationStopped:!0,target:this});else{for(var u=[this],a=this.parent;a;)u.unshift(a),a=a.parent;var o=!1,h=!1,c=function(e){o=o||e.isPropagationStopped(),h=h||e.defaultPrevented};u.some(function(i){if(o)return!0;var r={defaultPrevented:h,eventPhase:_,propagationStopped:o,target:n};i.__emit(e,t,c,r)},this),u.reverse().some(function(i){if(o)return!0;var r={defaultPrevented:h,eventPhase:v,propagationStopped:o,target:n};i.__emit(e,t,c,r)},this)}if(i){var d=r.pool(e,this,t);o&&d.stopPropagation(),h&&d.preventDefault(),i.call(this,d),d.dispose()}for(this._emitCounter--;this._emitQueue.length;){var s=this._emitQueue.shift();this.emit.apply(this,s)}}},{key:"dispose",value:function(){this._bubbleEventEmitter&&this._bubbleEventEmitter.removeAllListeners(),this._captureEventEmitter&&this._captureEventEmitter.removeAllListeners(),this._bubbleEventEmitter=null,this._captureEventEmitter=null,this._currentRoute=null}},{key:"__emit",value:function(e,t,i,n){var r;switch(n.eventPhase){case _:r=this._captureEventEmitter;break;case l:case v:r=this._bubbleEventEmitter;break;default:h(!1,"invalid event phase %s",n.eventPhase)}n.target===this&&(n.eventPhase=l),r&&r.emit(e,t,i,n)}},{key:"_onFocus",value:function(e){h(e.data&&e.data.hasOwnProperty("route"),'event type "%s" should provide route',e.type),this._currentRoute=e.data.route}},{key:"parent",get:function(){var e=this.__node.getParent();return e?e.getValue():null}},{key:"top",get:function(){for(var e=null,t=this.__node.getParent();t;)e=t.getValue(),t=t.getParent();return e}},{key:"currentRoute",get:function(){return this._currentRoute}}]),e}();i.exports=c},296); __d(function(t,e,s,n){"use strict";var i=e(44),a=function(){function t(){babelHelpers.classCallCheck(this,t),this._list=[]}return babelHelpers.createClass(t,[{key:"get",value:function(t,e,s){var n=void 0;return this._list.length>0?(n=this._list.pop(),n.constructor.call(n,t,e,s)):n=new u(t,e,s),n}},{key:"put",value:function(t){this._list.push(t)}}]),t}(),r=new a,u=function(){function t(e,s,n){babelHelpers.classCallCheck(this,t),this.target=s,this.eventPhase=t.NONE,this._type=e,this._currentTarget=s,this._data=n,this._defaultPrevented=!1,this._disposed=!1,this._propagationStopped=!1}return babelHelpers.createClass(t,null,[{key:"pool",value:function(t,e,s){return r.get(t,e,s)}}]),babelHelpers.createClass(t,[{key:"preventDefault",value:function(){this._defaultPrevented=!0}},{key:"stopPropagation",value:function(){this._propagationStopped=!0}},{key:"stop",value:function(){this.preventDefault(),this.stopPropagation()}},{key:"isPropagationStopped",value:function(){return this._propagationStopped}},{key:"dispose",value:function(){i(!this._disposed,"NavigationEvent is already disposed"),this._disposed=!0,this.target=null,this.eventPhase=t.NONE,this._type="",this._currentTarget=null,this._data=null,this._defaultPrevented=!1,r.put(this)}},{key:"type",get:function(){return this._type}},{key:"currentTarget",get:function(){return this._currentTarget}},{key:"data",get:function(){return this._data}},{key:"defaultPrevented",get:function(){return this._defaultPrevented}}]),t}();u.NONE=0,u.CAPTURING_PHASE=1,u.AT_TARGET=2,u.BUBBLING_PHASE=3,s.exports=u},297); __d(function(t,e,i,r){"use strict";var s=e(102),a=e(297),o=function(t){function e(t){babelHelpers.classCallCheck(this,e);var i=babelHelpers.possibleConstructorReturn(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return i._emitting=!1,i._emitQueue=[],i._target=t,i}return babelHelpers.inherits(e,t),babelHelpers.createClass(e,[{key:"emit",value:function(t,i,r,s){if(this._emitting){var o=Array.prototype.slice.call(arguments);return void this._emitQueue.push(o)}this._emitting=!0;var l=a.pool(t,this._target,i);for(s&&(s.target&&(l.target=s.target),s.eventPhase&&(l.eventPhase=s.eventPhase),s.defaultPrevented&&l.preventDefault(),s.propagationStopped&&l.stopPropagation()),babelHelpers.get(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"emit",this).call(this,String(t),l),"function"==typeof r&&r.call(this._target,l),l.dispose(),this._emitting=!1;this._emitQueue.length;){var o=this._emitQueue.shift();this.emit.apply(this,o)}}}]),e}(s);i.exports=o},298); __d(function(e,n,t,i){"use strict";var r=n(44),l=n(300),h=l.List,u=function(){function e(n){babelHelpers.classCallCheck(this,e),this.__parent=null,this._children=new h,this._value=n}return babelHelpers.createClass(e,[{key:"getValue",value:function(){return this._value}},{key:"getParent",value:function(){return this.__parent}},{key:"getChildrenCount",value:function(){return this._children.size}},{key:"getChildAt",value:function(e){return e>-1&&e-1,"The node to be removed is not a child of this node."),e.__parent=null,this._children=this._children.splice(n,1)}},{key:"indexOf",value:function(e){return this._children.indexOf(e)}},{key:"forEach",value:function(e,n){this._children.forEach(e,n)}},{key:"map",value:function(e,n){return this._children.map(e,n).toJS()}},{key:"some",value:function(e,n){return this._children.some(e,n)}}]),e}();t.exports=u},299); __d(function(t,e,r,n){!function(t,e){"object"==typeof n&&void 0!==r?r.exports=e():"function"==typeof define&&define.amd?define(e):t.Immutable=e()}(this,function(){"use strict";function t(t,e){e&&(t.prototype=Object.create(e.prototype)),t.prototype.constructor=t}function e(t){return o(t)?t:O(t)}function r(t){return u(t)?t:x(t)}function n(t){return s(t)?t:k(t)}function i(t){return o(t)&&!a(t)?t:A(t)}function o(t){return!(!t||!t[ar])}function u(t){return!(!t||!t[hr])}function s(t){return!(!t||!t[fr])}function a(t){return u(t)||s(t)}function h(t){return!(!t||!t[cr])}function f(t){return t.value=!1,t}function c(t){t&&(t.value=!0)}function _(){}function p(t,e){e=e||0;for(var r=Math.max(0,t.length-e),n=new Array(r),i=0;i>>0;if(""+r!==e||4294967295===r)return NaN;e=r}return e<0?l(t)+e:e}function y(){return!0}function d(t,e,r){return(0===t||void 0!==r&&t<=-r)&&(void 0===e||void 0!==r&&e>=r)}function m(t,e){return w(t,e,0)}function g(t,e){return w(t,e,e)}function w(t,e,r){return void 0===t?r:t<0?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}function S(t){this.next=t}function z(t,e,r,n){var i=0===t?e:1===t?r:[e,r];return n?n.value=i:n={value:i,done:!1},n}function I(){return{value:void 0,done:!0}}function b(t){return!!M(t)}function q(t){return t&&"function"==typeof t.next}function D(t){var e=M(t);return e&&e.call(t)}function M(t){var e=t&&(Sr&&t[Sr]||t[zr]);if("function"==typeof e)return e}function E(t){return t&&"number"==typeof t.length}function O(t){return null===t||void 0===t?T():o(t)?t.toSeq():C(t)}function x(t){return null===t||void 0===t?T().toKeyedSeq():o(t)?u(t)?t.toSeq():t.fromEntrySeq():W(t)}function k(t){return null===t||void 0===t?T():o(t)?u(t)?t.entrySeq():t.toIndexedSeq():B(t)}function A(t){return(null===t||void 0===t?T():o(t)?u(t)?t.entrySeq():t:B(t)).toSetSeq()}function j(t){this._array=t,this.size=t.length}function K(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}function R(t){this._iterable=t,this.size=t.length||t.size}function U(t){this._iterator=t,this._iteratorCache=[]}function L(t){return!(!t||!t[br])}function T(){return qr||(qr=new j([]))}function W(t){var e=Array.isArray(t)?new j(t).fromEntrySeq():q(t)?new U(t).fromEntrySeq():b(t)?new R(t).fromEntrySeq():"object"==typeof t?new K(t):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+t);return e}function B(t){var e=J(t);if(!e)throw new TypeError("Expected Array or iterable object of values: "+t);return e}function C(t){var e=J(t)||"object"==typeof t&&new K(t);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+t);return e}function J(t){return E(t)?new j(t):q(t)?new U(t):b(t)?new R(t):void 0}function N(t,e,r,n){var i=t._cache;if(i){for(var o=i.length-1,u=0;u<=o;u++){var s=i[r?o-u:u];if(!1===e(s[1],n?s[0]:u,t))return u+1}return u}return t.__iterateUncached(e,r)}function P(t,e,r,n){var i=t._cache;if(i){var o=i.length-1,u=0;return new S(function(){var t=i[r?o-u:u];return u++>o?I():z(e,n?t[0]:u-1,t[1])})}return t.__iteratorUncached(e,r)}function H(t,e){return e?V(e,t,"",{"":t}):Y(t)}function V(t,e,r,n){return Array.isArray(e)?t.call(n,r,k(e).map(function(r,n){return V(t,r,n,e)})):Q(e)?t.call(n,r,x(e).map(function(r,n){return V(t,r,n,e)})):e}function Y(t){return Array.isArray(t)?k(t).map(Y).toList():Q(t)?x(t).map(Y).toMap():t}function Q(t){return t&&(t.constructor===Object||void 0===t.constructor)}function X(t,e){if(t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if(t=t.valueOf(),e=e.valueOf(),t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1}return!("function"!=typeof t.equals||"function"!=typeof e.equals||!t.equals(e))}function F(t,e){if(t===e)return!0;if(!o(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||u(t)!==u(e)||s(t)!==s(e)||h(t)!==h(e))return!1;if(0===t.size&&0===e.size)return!0;var r=!a(t);if(h(t)){var n=t.entries();return e.every(function(t,e){var i=n.next().value;return i&&X(i[1],t)&&(r||X(i[0],e))})&&n.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{i=!0;var f=t;t=e,e=f}var c=!0,_=e.__iterate(function(e,n){if(r?!t.has(e):i?!X(e,t.get(n,vr)):!X(t.get(n,vr),e))return c=!1,!1});return c&&t.size===_}function G(t,e){if(!(this instanceof G))return new G(t,e);if(this._value=t,this.size=void 0===e?1/0:Math.max(0,e),0===this.size){if(Dr)return Dr;Dr=this}}function Z(t,e){if(!t)throw new Error(e)}function $(t,e,r){if(!(this instanceof $))return new $(t,e,r);if(Z(0!==r,"Cannot step a Range by 0"),t=t||0,void 0===e&&(e=1/0),r=void 0===r?1:Math.abs(r),e>>1&1073741824|3221225471&t}function ot(t){if(!1===t||null===t||void 0===t)return 0;if("function"==typeof t.valueOf&&(!1===(t=t.valueOf())||null===t||void 0===t))return 0;if(!0===t)return 1;var e=typeof t;if("number"===e){var r=0|t;for(r!==t&&(r^=4294967295*t);t>4294967295;)t/=4294967295,r^=t;return it(r)}if("string"===e)return t.length>Rr?ut(t):st(t);if("function"==typeof t.hashCode)return t.hashCode();if("object"===e)return at(t);if("function"==typeof t.toString)return st(t.toString());throw new Error("Value type "+e+" cannot be hashed.")}function ut(t){var e=Tr[t];return void 0===e&&(e=st(t),Lr===Ur&&(Lr=0,Tr={}),Lr++,Tr[t]=e),e}function st(t){for(var e=0,r=0;r0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}function ft(t){Z(t!==1/0,"Cannot perform this action with an infinite size.")}function ct(t){return null===t||void 0===t?zt():_t(t)&&!h(t)?t:zt().withMutations(function(e){var n=r(t);ft(n.size),n.forEach(function(t,r){return e.set(r,t)})})}function _t(t){return!(!t||!t[Wr])}function pt(t,e){this.ownerID=t,this.entries=e}function lt(t,e,r){this.ownerID=t,this.bitmap=e,this.nodes=r}function vt(t,e,r){this.ownerID=t,this.count=e,this.nodes=r}function yt(t,e,r){this.ownerID=t,this.keyHash=e,this.entries=r}function dt(t,e,r){this.ownerID=t,this.keyHash=e,this.entry=r}function mt(t,e,r){this._type=e,this._reverse=r,this._stack=t._root&&wt(t._root)}function gt(t,e){return z(t,e[0],e[1])}function wt(t,e){return{node:t,index:0,__prev:e}}function St(t,e,r,n){var i=Object.create(Br);return i.size=t,i._root=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function zt(){return Cr||(Cr=St(0))}function It(t,e,r){var n,i;if(t._root){var o=f(yr),u=f(dr);if(n=bt(t._root,t.__ownerID,0,void 0,e,r,o,u),!u.value)return t;i=t.size+(o.value?r===vr?-1:1:0)}else{if(r===vr)return t;i=1,n=new pt(t.__ownerID,[[e,r]])}return t.__ownerID?(t.size=i,t._root=n,t.__hash=void 0,t.__altered=!0,t):n?St(i,n):zt()}function bt(t,e,r,n,i,o,u,s){return t?t.update(e,r,n,i,o,u,s):o===vr?t:(c(s),c(u),new dt(e,n,[i,o]))}function qt(t){return t.constructor===dt||t.constructor===yt}function Dt(t,e,r,n,i){if(t.keyHash===n)return new yt(e,n,[t.entry,i]);var o,u=(0===r?t.keyHash:t.keyHash>>>r)&lr,s=(0===r?n:n>>>r)&lr;return new lt(e,1<>>=1)u[s]=1&r?e[o++]:void 0;return u[n]=i,new vt(t,o+1,u)}function xt(t,e,n){for(var i=[],u=0;u>1&1431655765,t=(858993459&t)+(t>>2&858993459),t=t+(t>>4)&252645135,t+=t>>8,127&(t+=t>>16)}function Ut(t,e,r,n){var i=n?t:p(t);return i[e]=r,i}function Lt(t,e,r,n){var i=t.length+1;if(n&&e+1===i)return t[e]=r,t;for(var o=new Array(i),u=0,s=0;s0&&io?0:o-r,h=u-r;return h>pr&&(h=pr),function(){if(i===h)return Qr;var t=e?--h:i++;return n&&n[t]}}function i(t,n,i){var s,a=t&&t.array,h=i>o?0:o-i>>n,f=1+(u-i>>n);return f>pr&&(f=pr),function(){for(;;){if(s){var t=s();if(t!==Qr)return t;s=null}if(h===f)return Qr;var o=e?--f:h++;s=r(a&&a[o],n-_r,i+(o<=t.size||e<0)return t.withMutations(function(t){e<0?Xt(t,e).set(0,r):Xt(t,0,e+1).set(e,r)});e+=t._origin;var n=t._tail,i=t._root,o=f(dr);return e>=Gt(t._capacity)?n=Vt(n,t.__ownerID,0,e,r,o):i=Vt(i,t.__ownerID,t._level,e,r,o),o.value?t.__ownerID?(t._root=i,t._tail=n,t.__hash=void 0,t.__altered=!0,t):Nt(t._origin,t._capacity,t._level,i,n):t}function Vt(t,e,r,n,i,o){var u=n>>>r&lr,s=t&&u0){var h=t&&t.array[u],f=Vt(h,e,r-_r,n,i,o);return f===h?t:(a=Yt(t,e),a.array[u]=f,a)}return s&&t.array[u]===i?t:(c(o),a=Yt(t,e),void 0===i&&u===a.array.length-1?a.array.pop():a.array[u]=i,a)}function Yt(t,e){return e&&t&&e===t.ownerID?t:new Ct(t?t.array.slice():[],e)}function Qt(t,e){if(e>=Gt(t._capacity))return t._tail;if(e<1<0;)r=r.array[e>>>n&lr],n-=_r;return r}}function Xt(t,e,r){void 0!==e&&(e|=0),void 0!==r&&(r|=0);var n=t.__ownerID||new _,i=t._origin,o=t._capacity,u=i+e,s=void 0===r?o:r<0?o+r:i+r;if(u===i&&s===o)return t;if(u>=s)return t.clear();for(var a=t._level,h=t._root,f=0;u+f<0;)h=new Ct(h&&h.array.length?[void 0,h]:[],n),a+=_r,f+=1<=1<c?new Ct([],n):l;if(l&&p>c&&u_r;d-=_r){var m=c>>>d&lr;y=y.array[m]=Yt(y.array[m],n)}y.array[c>>>_r&lr]=l}if(s=p)u-=p,s-=p,a=_r,h=null,v=v&&v.removeBefore(n,0,u);else if(u>i||p>>a&lr;if(g!==p>>>a&lr)break;g&&(f+=(1<i&&(h=h.removeBefore(n,a,u-f)),h&&pu&&(u=h.size),o(a)||(h=h.map(function(t){return H(t)})),i.push(h)}return u>t.size&&(t=t.setSize(u)),jt(t,e,i)}function Gt(t){return t>>_r<<_r}function Zt(t){return null===t||void 0===t?ee():$t(t)?t:ee().withMutations(function(e){var n=r(t);ft(n.size),n.forEach(function(t,r){return e.set(r,t)})})}function $t(t){return _t(t)&&h(t)}function te(t,e,r,n){var i=Object.create(Zt.prototype);return i.size=t?t.size:0,i._map=t,i._list=e,i.__ownerID=r,i.__hash=n,i}function ee(){return Xr||(Xr=te(zt(),Pt()))}function re(t,e,r){var n,i,o=t._map,u=t._list,s=o.get(e),a=void 0!==s;if(r===vr){if(!a)return t;u.size>=pr&&u.size>=2*o.size?(i=u.filter(function(t,e){return void 0!==t&&s!==e}),n=i.toKeyedSeq().map(function(t){return t[0]}).flip().toMap(),t.__ownerID&&(n.__ownerID=i.__ownerID=t.__ownerID)):(n=o.remove(e),i=s===u.size-1?u.pop():u.set(s,void 0))}else if(a){if(r===u.get(s)[1])return t;n=o,i=u.set(s,[e,r])}else n=o.set(e,u.size),i=u.set(u.size,[e,r]);return t.__ownerID?(t.size=n.size,t._map=n,t._list=i,t.__hash=void 0,t):te(n,i)}function ne(t,e){this._iter=t,this._useKeys=e,this.size=t.size}function ie(t){this._iter=t,this.size=t.size}function oe(t){this._iter=t,this.size=t.size}function ue(t){this._iter=t,this.size=t.size}function se(t){var e=Ee(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.includes(e)},e.includes=function(e){return t.has(e)},e.cacheResult=Oe,e.__iterateUncached=function(e,r){var n=this;return t.__iterate(function(t,r){return!1!==e(r,t,n)},r)},e.__iteratorUncached=function(e,r){if(e===wr){var n=t.__iterator(e,r);return new S(function(){var t=n.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t})}return t.__iterator(e===gr?mr:gr,r)},e}function ae(t,e,r){var n=Ee(t);return n.size=t.size,n.has=function(e){return t.has(e)},n.get=function(n,i){var o=t.get(n,vr);return o===vr?i:e.call(r,o,n,t)},n.__iterateUncached=function(n,i){var o=this;return t.__iterate(function(t,i,u){return!1!==n(e.call(r,t,i,u),i,o)},i)},n.__iteratorUncached=function(n,i){var o=t.__iterator(wr,i);return new S(function(){var i=o.next();if(i.done)return i;var u=i.value,s=u[0];return z(n,s,e.call(r,u[1],s,t),i)})},n}function he(t,e){var r=Ee(t);return r._iter=t,r.size=t.size,r.reverse=function(){return t},t.flip&&(r.flip=function(){var e=se(t);return e.reverse=function(){return t.flip()},e}),r.get=function(r,n){return t.get(e?r:-1-r,n)},r.has=function(r){return t.has(e?r:-1-r)},r.includes=function(e){return t.includes(e)},r.cacheResult=Oe,r.__iterate=function(e,r){var n=this;return t.__iterate(function(t,r){return e(t,r,n)},!r)},r.__iterator=function(e,r){return t.__iterator(e,!r)},r}function fe(t,e,r,n){var i=Ee(t);return n&&(i.has=function(n){var i=t.get(n,vr);return i!==vr&&!!e.call(r,i,n,t)},i.get=function(n,i){var o=t.get(n,vr);return o!==vr&&e.call(r,o,n,t)?o:i}),i.__iterateUncached=function(i,o){var u=this,s=0;return t.__iterate(function(t,o,a){if(e.call(r,t,o,a))return s++,i(t,n?o:s-1,u)},o),s},i.__iteratorUncached=function(i,o){var u=t.__iterator(wr,o),s=0;return new S(function(){for(;;){var o=u.next();if(o.done)return o;var a=o.value,h=a[0],f=a[1];if(e.call(r,f,h,t))return z(i,n?h:s++,f,o)}})},i}function ce(t,e,r){var n=ct().asMutable();return t.__iterate(function(i,o){n.update(e.call(r,i,o,t),0,function(t){return t+1})}),n.asImmutable()}function _e(t,e,r){var n=u(t),i=(h(t)?Zt():ct()).asMutable();t.__iterate(function(o,u){i.update(e.call(r,o,u,t),function(t){return t=t||[],t.push(n?[u,o]:o),t})});var o=Me(t);return i.map(function(e){return be(t,o(e))})}function pe(t,e,r,n){var i=t.size;if(void 0!==e&&(e|=0),void 0!==r&&(r|=0),d(e,r,i))return t;var o=m(e,i),u=g(r,i);if(o!==o||u!==u)return pe(t.toSeq().cacheResult(),e,r,n);var s,a=u-o;a===a&&(s=a<0?0:a);var h=Ee(t);return h.size=0===s?s:t.size&&s||void 0,!n&&L(t)&&s>=0&&(h.get=function(e,r){return e=v(this,e),e>=0&&es)return I();var t=i.next();return n||e===gr?t:e===mr?z(e,a-1,void 0,t):z(e,a-1,t.value[1],t)})},h}function le(t,e,r){var n=Ee(t);return n.__iterateUncached=function(n,i){var o=this;if(i)return this.cacheResult().__iterate(n,i);var u=0;return t.__iterate(function(t,i,s){return e.call(r,t,i,s)&&++u&&n(t,i,o)}),u},n.__iteratorUncached=function(n,i){var o=this;if(i)return this.cacheResult().__iterator(n,i);var u=t.__iterator(wr,i),s=!0;return new S(function(){if(!s)return I();var t=u.next();if(t.done)return t;var i=t.value,a=i[0],h=i[1];return e.call(r,h,a,o)?n===wr?t:z(n,a,h,t):(s=!1,I())})},n}function ve(t,e,r,n){var i=Ee(t);return i.__iterateUncached=function(i,o){var u=this;if(o)return this.cacheResult().__iterate(i,o);var s=!0,a=0;return t.__iterate(function(t,o,h){if(!s||!(s=e.call(r,t,o,h)))return a++,i(t,n?o:a-1,u)}),a},i.__iteratorUncached=function(i,o){var u=this;if(o)return this.cacheResult().__iterator(i,o);var s=t.__iterator(wr,o),a=!0,h=0;return new S(function(){var t,o,f;do{if(t=s.next(),t.done)return n||i===gr?t:i===mr?z(i,h++,void 0,t):z(i,h++,t.value[1],t);var c=t.value;o=c[0],f=c[1],a&&(a=e.call(r,f,o,u))}while(a);return i===wr?t:z(i,o,f,t)})},i}function ye(t,e){var n=u(t),i=[t].concat(e).map(function(t){return o(t)?n&&(t=r(t)):t=n?W(t):B(Array.isArray(t)?t:[t]),t}).filter(function(t){return 0!==t.size});if(0===i.length)return t;if(1===i.length){var a=i[0];if(a===t||n&&u(a)||s(t)&&s(a))return a}var h=new j(i);return n?h=h.toKeyedSeq():s(t)||(h=h.toSetSeq()),h=h.flatten(!0),h.size=i.reduce(function(t,e){if(void 0!==t){var r=e.size;if(void 0!==r)return t+r}},0),h}function de(t,e,r){var n=Ee(t);return n.__iterateUncached=function(n,i){function u(t,h){var f=this;t.__iterate(function(t,i){return(!e||h0}function Ie(t,r,n){var i=Ee(t);return i.size=new j(n).map(function(t){return t.size}).min(),i.__iterate=function(t,e){for(var r,n=this.__iterator(gr,e),i=0;!(r=n.next()).done&&!1!==t(r.value,i++,this););return i},i.__iteratorUncached=function(t,i){var o=n.map(function(t){return t=e(t),D(i?t.reverse():t)}),u=0,s=!1;return new S(function(){var e;return s||(e=o.map(function(t){return t.next()}),s=e.some(function(t){return t.done})),s?I():z(t,u++,r.apply(null,e.map(function(t){return t.value})))})},i}function be(t,e){return L(t)?e:t.constructor(e)}function qe(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function De(t){return ft(t.size),l(t)}function Me(t){return u(t)?r:s(t)?n:i}function Ee(t){return Object.create((u(t)?x:s(t)?k:A).prototype)}function Oe(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):O.prototype.cacheResult.call(this)}function xe(t,e){return t>e?1:te?-1:0}function ir(t){if(t.size===1/0)return 0;var e=h(t),r=u(t),n=e?1:0;return or(t.__iterate(r?e?function(t,e){n=31*n+ur(ot(t),ot(e))|0}:function(t,e){n=n+ur(ot(t),ot(e))|0}:e?function(t){n=31*n+ot(t)|0}:function(t){n=n+ot(t)|0}),n)}function or(t,e){return e=Or(e,3432918353),e=Or(e<<15|e>>>-15,461845907),e=Or(e<<13|e>>>-13,5),e=(e+3864292196|0)^t,e=Or(e^e>>>16,2246822507),e=Or(e^e>>>13,3266489909),e=it(e^e>>>16)}function ur(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}var sr=Array.prototype.slice;t(r,e),t(n,e),t(i,e),e.isIterable=o,e.isKeyed=u,e.isIndexed=s,e.isAssociative=a,e.isOrdered=h,e.Keyed=r,e.Indexed=n,e.Set=i;var ar="@@__IMMUTABLE_ITERABLE__@@",hr="@@__IMMUTABLE_KEYED__@@",fr="@@__IMMUTABLE_INDEXED__@@",cr="@@__IMMUTABLE_ORDERED__@@",_r=5,pr=1<<_r,lr=pr-1,vr={},yr={value:!1},dr={value:!1},mr=0,gr=1,wr=2,Sr="function"==typeof Symbol&&("function"==typeof Symbol?Symbol.iterator:"@@iterator"),zr="@@iterator",Ir=Sr||zr;S.prototype.toString=function(){return"[Iterator]"},S.KEYS=mr,S.VALUES=gr,S.ENTRIES=wr,S.prototype.inspect=S.prototype.toSource=function(){return this.toString()},S.prototype[Ir]=function(){return this},t(O,e),O.of=function(){return O(arguments)},O.prototype.toSeq=function(){return this},O.prototype.toString=function(){return this.__toString("Seq {","}")},O.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},O.prototype.__iterate=function(t,e){return N(this,t,e,!0)},O.prototype.__iterator=function(t,e){return P(this,t,e,!0)},t(x,O),x.prototype.toKeyedSeq=function(){return this},t(k,O),k.of=function(){return k(arguments)},k.prototype.toIndexedSeq=function(){return this},k.prototype.toString=function(){return this.__toString("Seq [","]")},k.prototype.__iterate=function(t,e){return N(this,t,e,!1)},k.prototype.__iterator=function(t,e){return P(this,t,e,!1)},t(A,O),A.of=function(){return A(arguments)},A.prototype.toSetSeq=function(){return this},O.isSeq=L,O.Keyed=x,O.Set=A,O.Indexed=k;var br="@@__IMMUTABLE_SEQ__@@";O.prototype[br]=!0,t(j,k),j.prototype.get=function(t,e){return this.has(t)?this._array[v(this,t)]:e},j.prototype.__iterate=function(t,e){for(var r=this._array,n=r.length-1,i=0;i<=n;i++)if(!1===t(r[e?n-i:i],i,this))return i+1;return i},j.prototype.__iterator=function(t,e){var r=this._array,n=r.length-1,i=0;return new S(function(){return i>n?I():z(t,i,r[e?n-i++:i++])})},t(K,x),K.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},K.prototype.has=function(t){return this._object.hasOwnProperty(t)},K.prototype.__iterate=function(t,e){for(var r=this._object,n=this._keys,i=n.length-1,o=0;o<=i;o++){var u=n[e?i-o:o];if(!1===t(r[u],u,this))return o+1}return o},K.prototype.__iterator=function(t,e){var r=this._object,n=this._keys,i=n.length-1,o=0;return new S(function(){var u=n[e?i-o:o];return o++>i?I():z(t,u,r[u])})},K.prototype[cr]=!0,t(R,k),R.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var r=this._iterable,n=D(r),i=0;if(q(n))for(var o;!(o=n.next()).done&&!1!==t(o.value,i++,this););return i},R.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=this._iterable,n=D(r);if(!q(n))return new S(I);var i=0;return new S(function(){var e=n.next();return e.done?e:z(t,i++,e.value)})},t(U,k),U.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var r=this._iterator,n=this._iteratorCache,i=0;i=n.length){var e=r.next();if(e.done)return e;n[i]=e.value}return z(t,i,n[i++])})};var qr;t(G,k),G.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},G.prototype.get=function(t,e){return this.has(t)?this._value:e},G.prototype.includes=function(t){return X(this._value,t)},G.prototype.slice=function(t,e){var r=this.size;return d(t,e,r)?this:new G(this._value,g(e,r)-m(t,r))},G.prototype.reverse=function(){return this},G.prototype.indexOf=function(t){return X(this._value,t)?0:-1},G.prototype.lastIndexOf=function(t){return X(this._value,t)?this.size:-1},G.prototype.__iterate=function(t,e){for(var r=0;r1?" by "+this._step:"")+" ]"},$.prototype.get=function(t,e){return this.has(t)?this._start+v(this,t)*this._step:e},$.prototype.includes=function(t){var e=(t-this._start)/this._step;return e>=0&&e=0&&rr?I():z(t,o++,u)})},$.prototype.equals=function(t){return t instanceof $?this._start===t._start&&this._end===t._end&&this._step===t._step:F(this,t)};var Mr;t(tt,e),t(et,tt),t(rt,tt),t(nt,tt),tt.Keyed=et,tt.Indexed=rt,tt.Set=nt;var Er,Or="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){t|=0,e|=0;var r=65535&t,n=65535&e;return r*n+((t>>>16)*n+r*(e>>>16)<<16>>>0)|0},xr=Object.isExtensible,kr=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}(),Ar="function"==typeof WeakMap;Ar&&(Er=new WeakMap);var jr=0,Kr="__immutablehash__";"function"==typeof Symbol&&(Kr=Symbol(Kr));var Rr=16,Ur=255,Lr=0,Tr={};t(ct,et),ct.prototype.toString=function(){return this.__toString("Map {","}")},ct.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},ct.prototype.set=function(t,e){return It(this,t,e)},ct.prototype.setIn=function(t,e){return this.updateIn(t,vr,function(){return e})},ct.prototype.remove=function(t){return It(this,t,vr)},ct.prototype.deleteIn=function(t){return this.updateIn(t,function(){return vr})},ct.prototype.update=function(t,e,r){return 1===arguments.length?t(this):this.updateIn([t],e,r)},ct.prototype.updateIn=function(t,e,r){r||(r=e,e=void 0);var n=Kt(this,ke(t),e,r);return n===vr?void 0:n},ct.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):zt()},ct.prototype.merge=function(){return xt(this,void 0,arguments)},ct.prototype.mergeWith=function(t){return xt(this,t,sr.call(arguments,1))},ct.prototype.mergeIn=function(t){var e=sr.call(arguments,1);return this.updateIn(t,zt(),function(t){return"function"==typeof t.merge?t.merge.apply(t,e):e[e.length-1]})},ct.prototype.mergeDeep=function(){return xt(this,kt,arguments)},ct.prototype.mergeDeepWith=function(t){var e=sr.call(arguments,1);return xt(this,At(t),e)},ct.prototype.mergeDeepIn=function(t){var e=sr.call(arguments,1);return this.updateIn(t,zt(),function(t){return"function"==typeof t.mergeDeep?t.mergeDeep.apply(t,e):e[e.length-1]})},ct.prototype.sort=function(t){return Zt(we(this,t))},ct.prototype.sortBy=function(t,e){return Zt(we(this,e,t))},ct.prototype.withMutations=function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this}, ct.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new _)},ct.prototype.asImmutable=function(){return this.__ensureOwner()},ct.prototype.wasAltered=function(){return this.__altered},ct.prototype.__iterator=function(t,e){return new mt(this,t,e)},ct.prototype.__iterate=function(t,e){var r=this,n=0;return this._root&&this._root.iterate(function(e){return n++,t(e[1],e[0],r)},e),n},ct.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?St(this.size,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},ct.isMap=_t;var Wr="@@__IMMUTABLE_MAP__@@",Br=ct.prototype;Br[Wr]=!0,Br.delete=Br.remove,Br.removeIn=Br.deleteIn,pt.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,u=i.length;o=Jr)return Mt(t,a,n,i);var l=t&&t===this.ownerID,v=l?a:p(a);return _?s?h===f-1?v.pop():v[h]=v.pop():v[h]=[n,i]:v.push([n,i]),l?(this.entries=v,this):new pt(t,v)}},lt.prototype.get=function(t,e,r,n){void 0===e&&(e=ot(r));var i=1<<((0===t?e:e>>>t)&lr),o=this.bitmap;return 0==(o&i)?n:this.nodes[Rt(o&i-1)].get(t+_r,e,r,n)},lt.prototype.update=function(t,e,r,n,i,o,u){void 0===r&&(r=ot(n));var s=(0===e?r:r>>>e)&lr,a=1<=Nr)return Ot(t,_,h,s,l);if(f&&!l&&2===_.length&&qt(_[1^c]))return _[1^c];if(f&&l&&1===_.length&&qt(l))return l;var v=t&&t===this.ownerID,y=f?l?h:h^a:h|a,d=f?l?Ut(_,c,l,v):Tt(_,c,v):Lt(_,c,l,v);return v?(this.bitmap=y,this.nodes=d,this):new lt(t,y,d)},vt.prototype.get=function(t,e,r,n){void 0===e&&(e=ot(r));var i=(0===t?e:e>>>t)&lr,o=this.nodes[i];return o?o.get(t+_r,e,r,n):n},vt.prototype.update=function(t,e,r,n,i,o,u){void 0===r&&(r=ot(n));var s=(0===e?r:r>>>e)&lr,a=i===vr,h=this.nodes,f=h[s];if(a&&!f)return this;var c=bt(f,t,e+_r,r,n,i,o,u);if(c===f)return this;var _=this.count;if(f){if(!c&&--_=0&&t>>e&lr;if(n>=this.array.length)return new Ct([],t);var i,o=0===n;if(e>0){var u=this.array[n];if((i=u&&u.removeBefore(t,e-_r,r))===u&&o)return this}if(o&&!i)return this;var s=Yt(this,t);if(!o)for(var a=0;a>>e&lr;if(n>=this.array.length)return this;var i;if(e>0){var o=this.array[n];if((i=o&&o.removeAfter(t,e-_r,r))===o&&n===this.array.length-1)return this}var u=Yt(this,t);return u.array.splice(n+1),i&&(u.array[n]=i),u};var Yr,Qr={};t(Zt,ct),Zt.of=function(){return this(arguments)},Zt.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Zt.prototype.get=function(t,e){var r=this._map.get(t);return void 0!==r?this._list.get(r)[1]:e},Zt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):ee()},Zt.prototype.set=function(t,e){return re(this,t,e)},Zt.prototype.remove=function(t){return re(this,t,vr)},Zt.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Zt.prototype.__iterate=function(t,e){var r=this;return this._list.__iterate(function(e){return e&&t(e[1],e[0],r)},e)},Zt.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},Zt.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),r=this._list.__ensureOwner(t);return t?te(e,r,t,this.__hash):(this.__ownerID=t,this._map=e,this._list=r,this)},Zt.isOrderedMap=$t,Zt.prototype[cr]=!0,Zt.prototype.delete=Zt.prototype.remove;var Xr;t(ne,x),ne.prototype.get=function(t,e){return this._iter.get(t,e)},ne.prototype.has=function(t){return this._iter.has(t)},ne.prototype.valueSeq=function(){return this._iter.valueSeq()},ne.prototype.reverse=function(){var t=this,e=he(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},ne.prototype.map=function(t,e){var r=this,n=ae(this,t,e);return this._useKeys||(n.valueSeq=function(){return r._iter.toSeq().map(t,e)}),n},ne.prototype.__iterate=function(t,e){var r,n=this;return this._iter.__iterate(this._useKeys?function(e,r){return t(e,r,n)}:(r=e?De(this):0,function(i){return t(i,e?--r:r++,n)}),e)},ne.prototype.__iterator=function(t,e){if(this._useKeys)return this._iter.__iterator(t,e);var r=this._iter.__iterator(gr,e),n=e?De(this):0;return new S(function(){var i=r.next();return i.done?i:z(t,e?--n:n++,i.value,i)})},ne.prototype[cr]=!0,t(ie,k),ie.prototype.includes=function(t){return this._iter.includes(t)},ie.prototype.__iterate=function(t,e){var r=this,n=0;return this._iter.__iterate(function(e){return t(e,n++,r)},e)},ie.prototype.__iterator=function(t,e){var r=this._iter.__iterator(gr,e),n=0;return new S(function(){var e=r.next();return e.done?e:z(t,n++,e.value,e)})},t(oe,A),oe.prototype.has=function(t){return this._iter.includes(t)},oe.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate(function(e){return t(e,e,r)},e)},oe.prototype.__iterator=function(t,e){var r=this._iter.__iterator(gr,e);return new S(function(){var e=r.next();return e.done?e:z(t,e.value,e.value,e)})},t(ue,x),ue.prototype.entrySeq=function(){return this._iter.toSeq()},ue.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate(function(e){if(e){qe(e);var n=o(e);return t(n?e.get(1):e[1],n?e.get(0):e[0],r)}},e)},ue.prototype.__iterator=function(t,e){var r=this._iter.__iterator(gr,e);return new S(function(){for(;;){var e=r.next();if(e.done)return e;var n=e.value;if(n){qe(n);var i=o(n);return z(t,i?n.get(0):n[0],i?n.get(1):n[1],e)}}})},ie.prototype.cacheResult=ne.prototype.cacheResult=oe.prototype.cacheResult=ue.prototype.cacheResult=Oe,t(Ae,et),Ae.prototype.toString=function(){return this.__toString(Ke(this)+" {","}")},Ae.prototype.has=function(t){return this._defaultValues.hasOwnProperty(t)},Ae.prototype.get=function(t,e){if(!this.has(t))return e;var r=this._defaultValues[t];return this._map?this._map.get(t,r):r},Ae.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var t=this.constructor;return t._empty||(t._empty=je(this,zt()))},Ae.prototype.set=function(t,e){if(!this.has(t))throw new Error('Cannot set unknown key "'+t+'" on '+Ke(this));var r=this._map&&this._map.set(t,e);return this.__ownerID||r===this._map?this:je(this,r)},Ae.prototype.remove=function(t){if(!this.has(t))return this;var e=this._map&&this._map.remove(t);return this.__ownerID||e===this._map?this:je(this,e)},Ae.prototype.wasAltered=function(){return this._map.wasAltered()},Ae.prototype.__iterator=function(t,e){var n=this;return r(this._defaultValues).map(function(t,e){return n.get(e)}).__iterator(t,e)},Ae.prototype.__iterate=function(t,e){var n=this;return r(this._defaultValues).map(function(t,e){return n.get(e)}).__iterate(t,e)},Ae.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map&&this._map.__ensureOwner(t);return t?je(this,e,t):(this.__ownerID=t,this._map=e,this)};var Fr=Ae.prototype;Fr.delete=Fr.remove,Fr.deleteIn=Fr.removeIn=Br.removeIn,Fr.merge=Br.merge,Fr.mergeWith=Br.mergeWith,Fr.mergeIn=Br.mergeIn,Fr.mergeDeep=Br.mergeDeep,Fr.mergeDeepWith=Br.mergeDeepWith,Fr.mergeDeepIn=Br.mergeDeepIn,Fr.setIn=Br.setIn,Fr.update=Br.update,Fr.updateIn=Br.updateIn,Fr.withMutations=Br.withMutations,Fr.asMutable=Br.asMutable,Fr.asImmutable=Br.asImmutable,t(Le,nt),Le.of=function(){return this(arguments)},Le.fromKeys=function(t){return this(r(t).keySeq())},Le.prototype.toString=function(){return this.__toString("Set {","}")},Le.prototype.has=function(t){return this._map.has(t)},Le.prototype.add=function(t){return We(this,this._map.set(t,!0))},Le.prototype.remove=function(t){return We(this,this._map.remove(t))},Le.prototype.clear=function(){return We(this,this._map.clear())},Le.prototype.union=function(){var t=sr.call(arguments,0);return t=t.filter(function(t){return 0!==t.size}),0===t.length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(e){for(var r=0;r=0;r--)e={value:arguments[r],next:e};return this.__ownerID?(this.size=t,this._head=e,this.__hash=void 0,this.__altered=!0,this):Qe(t,e)},Ve.prototype.pushAll=function(t){if(t=n(t),0===t.size)return this;ft(t.size);var e=this.size,r=this._head;return t.reverse().forEach(function(t){e++,r={value:t,next:r}}),this.__ownerID?(this.size=e,this._head=r,this.__hash=void 0,this.__altered=!0,this):Qe(e,r)},Ve.prototype.pop=function(){return this.slice(1)},Ve.prototype.unshift=function(){return this.push.apply(this,arguments)},Ve.prototype.unshiftAll=function(t){return this.pushAll(t)},Ve.prototype.shift=function(){return this.pop.apply(this,arguments)},Ve.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Xe()},Ve.prototype.slice=function(t,e){if(d(t,e,this.size))return this;var r=m(t,this.size);if(g(e,this.size)!==this.size)return rt.prototype.slice.call(this,t,e);for(var n=this.size-r,i=this._head;r--;)i=i.next;return this.__ownerID?(this.size=n,this._head=i,this.__hash=void 0,this.__altered=!0,this):Qe(n,i)},Ve.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Qe(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Ve.prototype.__iterate=function(t,e){if(e)return this.reverse().__iterate(t);for(var r=0,n=this._head;n&&!1!==t(n.value,r++,this);)n=n.next;return r},Ve.prototype.__iterator=function(t,e){if(e)return this.reverse().__iterator(t);var r=0,n=this._head;return new S(function(){if(n){var e=n.value;return n=n.next,z(t,r++,e)}return I()})},Ve.isStack=Ye;var rn="@@__IMMUTABLE_STACK__@@",nn=Ve.prototype;nn[rn]=!0,nn.withMutations=Br.withMutations,nn.asMutable=Br.asMutable,nn.asImmutable=Br.asImmutable,nn.wasAltered=Br.wasAltered;var on;e.Iterator=S,Fe(e,{toArray:function(){ft(this.size);var t=new Array(this.size||0);return this.valueSeq().__iterate(function(e,r){t[r]=e}),t},toIndexedSeq:function(){return new ie(this)},toJS:function(){return this.toSeq().map(function(t){return t&&"function"==typeof t.toJS?t.toJS():t}).__toJS()},toJSON:function(){return this.toSeq().map(function(t){return t&&"function"==typeof t.toJSON?t.toJSON():t}).__toJS()},toKeyedSeq:function(){return new ne(this,!0)},toMap:function(){return ct(this.toKeyedSeq())},toObject:function(){ft(this.size);var t={};return this.__iterate(function(e,r){t[r]=e}),t},toOrderedMap:function(){return Zt(this.toKeyedSeq())},toOrderedSet:function(){return Je(u(this)?this.valueSeq():this)},toSet:function(){return Le(u(this)?this.valueSeq():this)},toSetSeq:function(){return new oe(this)},toSeq:function(){return s(this)?this.toIndexedSeq():u(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Ve(u(this)?this.valueSeq():this)},toList:function(){return Wt(u(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(t,e){return 0===this.size?t+e:t+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+e},concat:function(){return be(this,ye(this,sr.call(arguments,0)))},includes:function(t){return this.some(function(e){return X(e,t)})},entries:function(){return this.__iterator(wr)},every:function(t,e){ft(this.size);var r=!0;return this.__iterate(function(n,i,o){if(!t.call(e,n,i,o))return r=!1,!1}),r},filter:function(t,e){return be(this,fe(this,t,e,!0))},find:function(t,e,r){var n=this.findEntry(t,e);return n?n[1]:r},findEntry:function(t,e){var r;return this.__iterate(function(n,i,o){if(t.call(e,n,i,o))return r=[i,n],!1}),r},findLastEntry:function(t,e){return this.toSeq().reverse().findEntry(t,e)},forEach:function(t,e){return ft(this.size),this.__iterate(e?t.bind(e):t)},join:function(t){ft(this.size),t=void 0!==t?""+t:",";var e="",r=!0;return this.__iterate(function(n){r?r=!1:e+=t,e+=null!==n&&void 0!==n?n.toString():""}),e},keys:function(){return this.__iterator(mr)},map:function(t,e){return be(this,ae(this,t,e))},reduce:function(t,e,r){ft(this.size);var n,i;return arguments.length<2?i=!0:n=e,this.__iterate(function(e,o,u){i?(i=!1,n=e):n=t.call(r,n,e,o,u)}),n},reduceRight:function(t,e,r){var n=this.toKeyedSeq().reverse();return n.reduce.apply(n,arguments)},reverse:function(){return be(this,he(this,!0))},slice:function(t,e){return be(this,pe(this,t,e,!0))},some:function(t,e){return!this.every($e(t),e)},sort:function(t){return be(this,we(this,t))},values:function(){return this.__iterator(gr)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(t,e){return l(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return ce(this,t,e)},equals:function(t){return F(this,t)},entrySeq:function(){var t=this;if(t._cache)return new j(t._cache);var e=t.toSeq().map(Ze).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){return this.filter($e(t),e)},findLast:function(t,e,r){return this.toKeyedSeq().reverse().find(t,e,r)},first:function(){return this.find(y)},flatMap:function(t,e){return be(this,me(this,t,e))},flatten:function(t){return be(this,de(this,t,!0))},fromEntrySeq:function(){return new ue(this)},get:function(t,e){return this.find(function(e,r){return X(r,t)},void 0,e)},getIn:function(t,e){for(var r,n=this,i=ke(t);!(r=i.next()).done;){var o=r.value;if((n=n&&n.get?n.get(o,vr):vr)===vr)return e}return n},groupBy:function(t,e){return _e(this,t,e)},has:function(t){return this.get(t,vr)!==vr},hasIn:function(t){return this.getIn(t,vr)!==vr},isSubset:function(t){return t="function"==typeof t.includes?t:e(t),this.every(function(e){return t.includes(e)})},isSuperset:function(t){return t="function"==typeof t.isSubset?t:e(t),t.isSubset(this)},keySeq:function(){return this.toSeq().map(Ge).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},max:function(t){return Se(this,t)},maxBy:function(t,e){return Se(this,e,t)},min:function(t){return Se(this,t?tr(t):nr)},minBy:function(t,e){return Se(this,e?tr(e):nr,t)},rest:function(){return this.slice(1)},skip:function(t){return this.slice(Math.max(0,t))},skipLast:function(t){return be(this,this.toSeq().reverse().skip(t).reverse())},skipWhile:function(t,e){return be(this,ve(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile($e(t),e)},sortBy:function(t,e){return be(this,we(this,e,t))},take:function(t){return this.slice(0,Math.max(0,t))},takeLast:function(t){return be(this,this.toSeq().reverse().take(t).reverse())},takeWhile:function(t,e){return be(this,le(this,t,e))},takeUntil:function(t,e){return this.takeWhile($e(t),e)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=ir(this))}});var un=e.prototype;un[ar]=!0,un[Ir]=un.values,un.__toJS=un.toArray,un.__toStringMapper=er,un.inspect=un.toSource=function(){return this.toString()},un.chain=un.flatMap,un.contains=un.includes,function(){try{Object.defineProperty(un,"length",{get:function(){if(!e.noLengthWarning){var t;try{throw new Error}catch(e){t=e.stack}if(-1===t.indexOf("_wrapObject"))return console&&console.warn&&console.warn("iterable.length has been deprecated, use iterable.size or iterable.count(). This warning will become a silent error in a future version. "+t),this.size}}})}catch(t){}}(),Fe(r,{flip:function(){return be(this,se(this))},findKey:function(t,e){var r=this.findEntry(t,e);return r&&r[0]},findLastKey:function(t,e){return this.toSeq().reverse().findKey(t,e)},keyOf:function(t){return this.findKey(function(e){return X(e,t)})},lastKeyOf:function(t){return this.findLastKey(function(e){return X(e,t)})},mapEntries:function(t,e){var r=this,n=0;return be(this,this.toSeq().map(function(i,o){return t.call(e,[o,i],n++,r)}).fromEntrySeq())},mapKeys:function(t,e){var r=this;return be(this,this.toSeq().flip().map(function(n,i){return t.call(e,n,i,r)}).flip())}});var sn=r.prototype;return sn[hr]=!0,sn[Ir]=un.entries,sn.__toJS=un.toObject,sn.__toStringMapper=function(t,e){return JSON.stringify(e)+": "+er(t)},Fe(n,{toKeyedSeq:function(){return new ne(this,!1)},filter:function(t,e){return be(this,fe(this,t,e,!1))},findIndex:function(t,e){var r=this.findEntry(t,e);return r?r[0]:-1},indexOf:function(t){var e=this.toKeyedSeq().keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.toKeyedSeq().reverse().keyOf(t);return void 0===e?-1:e},reverse:function(){return be(this,he(this,!1))},slice:function(t,e){return be(this,pe(this,t,e,!1))},splice:function(t,e){var r=arguments.length;if(e=Math.max(0|e,0),0===r||2===r&&!e)return this;t=m(t,t<0?this.count():this.size);var n=this.slice(0,t);return be(this,1===r?n:n.concat(p(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var r=this.toKeyedSeq().findLastKey(t,e);return void 0===r?-1:r},first:function(){return this.get(0)},flatten:function(t){return be(this,de(this,t,!1))},get:function(t,e){return t=v(this,t),t<0||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find(function(e,r){return r===t},void 0,e)},has:function(t){return(t=v(this,t))>=0&&(void 0!==this.size?this.size===1/0||tr?t:1-t,a=e-r,i=e-s;h(d[e],"Cannot find breadcrumb interpolators for "+e),o=a>0&&0===i||i>0&&0===a?d[e].RightToCenter:a<0&&0===i||i<0&&0===a?d[e].CenterToLeft:a===i?d[e].RightToCenter:d[e].RightToLeft,o.Crumb(g[e].style,n)&&this._setPropsIfExists("crumb_"+e,g[e]),o.Icon(m[e].style,n)&&this._setPropsIfExists("icon_"+e,m[e]),o.Separator(b[e].style,n)&&this._setPropsIfExists("separator_"+e,b[e]),o.Title(T[e].style,n)&&this._setPropsIfExists("title_"+e,T[e]);var p=this.refs["right_"+e],u=k[e].style;p&&o.RightItem(u,n)&&p.setNativeProps({style:u,pointerEvents:0===u.opacity?"none":"auto"})}},{key:"updateProgress",value:function(t,e,r){for(var s=Math.max(e,r),o=Math.min(e,r),n=o;n<=s;n++)this._updateIndexProgress(t,n,e,r)}},{key:"onAnimationStart",value:function(t,e){for(var r=Math.max(t,e),s=Math.min(t,e),o=s;o<=r;o++)this._setRenderViewsToHardwareTextureAndroid(o,!0)}},{key:"onAnimationEnd",value:function(){for(var t=this.props.navState.routeStack.length-1,e=0;e<=t;e++)this._setRenderViewsToHardwareTextureAndroid(e,!1)}},{key:"_setRenderViewsToHardwareTextureAndroid",value:function(t,e){var r={renderToHardwareTextureAndroid:e};this._setPropsIfExists("icon_"+t,r),this._setPropsIfExists("separator_"+t,r),this._setPropsIfExists("title_"+t,r),this._setPropsIfExists("right_"+t,r)}},{key:"componentWillMount",value:function(){this._reset()}},{key:"render",value:function(){var t=this.props.navState,e=t&&t.routeStack.map(this._getBreadcrumb),r=t.routeStack.map(this._getTitle),s=t.routeStack.map(this._getRightButton);return p.createElement(l,{key:this._key,style:[S.breadCrumbContainer,this.props.style]},r,e,s)}},{key:"immediatelyRefresh",value:function(){this._reset(),this.forceUpdate()}},{key:"_reset",value:function(){this._key=c(),this._descriptors={title:new _,right:new _}}},{key:"_setPropsIfExists",value:function(t,e){var t=this.refs[t];t&&t.setNativeProps(e)}}]),e}(p.Component);R.propTypes={navigator:v.shape({push:v.func,pop:v.func,replace:v.func,popToRoute:v.func,popToTop:v.func}),routeMapper:v.shape({rightContentForRoute:v.func,titleContentForRoute:v.func,iconForRoute:v.func}),navState:p.PropTypes.shape({routeStack:p.PropTypes.arrayOf(p.PropTypes.object),presentedIndex:p.PropTypes.number}),style:l.propTypes.style},R.Styles=a;var S=u.create({breadCrumbContainer:{overflow:"hidden",position:"absolute",height:y.General.TotalNavHeight,top:0,left:0,right:0}});r.exports=R},301); __d(function(t,e,o,i){"use strict";for(var a=e(100),r=e(303),p=e(304),n=e(133),c=a.get("window").width,l=r.General.StatusBarHeight,h=r.General.NavBarHeight,y={position:"absolute",flexDirection:"row",top:l,width:49,height:h,backgroundColor:"transparent"},m={width:40,height:h},f={width:9,height:h},g={position:"absolute",top:l,height:h,backgroundColor:"transparent"},u=n(g,{left:0,right:0,alignItems:"center",height:h}),I={position:"absolute",top:l,right:4,overflow:"hidden",opacity:1,height:h,backgroundColor:"transparent"},s=[],d=[],T=[],b=0;b<10;b++){var C=49*b+4;s[b]={Crumb:n(y,{left:C}),Icon:n(m,{opacity:.6}),Separator:n(f,{opacity:1}),Title:n(g,{left:C,opacity:0}),RightItem:n(I,{opacity:0})},d[b]={Crumb:n(y,{left:C}),Icon:n(m,{opacity:1}),Separator:n(f,{opacity:0}),Title:n(g,{left:C+40,opacity:1}),RightItem:n(I,{opacity:1})};var R=c-100;T[b]={Crumb:n(y,{left:R}),Icon:n(m,{opacity:0}),Separator:n(f,{opacity:0}),Title:n(g,{left:R+40,opacity:0}),RightItem:n(I,{opacity:0})}}d[0]={Crumb:n(y,{left:c/4}),Icon:n(m,{opacity:0}),Separator:n(f,{opacity:0}),Title:n(u,{opacity:1}),RightItem:d[0].RightItem},s[0].Title=n(u,{left:-c/4,opacity:0}),T[0].Title=n(u,{opacity:0});var x=function(t,e){return{Crumb:p({left:{type:"linear",from:t.Crumb.left,to:e.Crumb.left,min:0,max:1,extrapolate:!0}}),Icon:p({opacity:{type:"linear",from:t.Icon.opacity,to:e.Icon.opacity,min:0,max:1}}),Separator:p({opacity:{type:"linear",from:t.Separator.opacity,to:e.Separator.opacity,min:0,max:1}}),Title:p({opacity:{type:"linear",from:t.Title.opacity,to:e.Title.opacity,min:0,max:1},left:{type:"linear",from:t.Title.left,to:e.Title.left,min:0,max:1,extrapolate:!0}}),RightItem:p({opacity:{type:"linear",from:t.RightItem.opacity,to:e.RightItem.opacity,min:0,max:1,round:100}})}},S=d.map(function(t,e){return{RightToCenter:x(T[e],d[e]),CenterToLeft:x(d[e],s[e]),RightToLeft:x(T[e],s[e])}});o.exports={Interpolators:S,Left:s,Center:d,Right:T,IconWidth:40,IconHeight:h,SeparatorWidth:9,SeparatorHeight:h}},302); __d(function(t,e,o,i){"use strict";function n(t,e){return{Title:l({opacity:{type:"linear",from:t.Title.opacity,to:e.Title.opacity,min:0,max:1},left:{type:"linear",from:t.Title.left,to:e.Title.left,min:0,max:1,extrapolate:!0}}),LeftButton:l({opacity:{type:"linear",from:t.LeftButton.opacity,to:e.LeftButton.opacity,min:0,max:1,round:g},left:{type:"linear",from:t.LeftButton.left,to:e.LeftButton.left,min:0,max:1}}),RightButton:l({opacity:{type:"linear",from:t.RightButton.opacity,to:e.RightButton.opacity,min:0,max:1,round:g},left:{type:"linear",from:t.RightButton.left,to:e.RightButton.left,min:0,max:1,extrapolate:!0}})}}var a=e(100),l=e(304),r=e(133),f=a.get("window").width,p={Title:{position:"absolute",top:20,left:0,right:0,alignItems:"center",height:44,backgroundColor:"transparent"},LeftButton:{position:"absolute",top:20,left:0,overflow:"hidden",opacity:1,height:44,backgroundColor:"transparent"},RightButton:{position:"absolute",top:20,right:0,overflow:"hidden",opacity:1,alignItems:"flex-end",height:44,backgroundColor:"transparent"}},u={Left:{Title:r(p.Title,{left:-f/2,opacity:0}),LeftButton:r(p.LeftButton,{left:0,opacity:0}),RightButton:r(p.RightButton,{opacity:0})},Center:{Title:r(p.Title,{left:0,opacity:1}),LeftButton:r(p.LeftButton,{left:0,opacity:1}),RightButton:r(p.RightButton,{opacity:1})},Right:{Title:r(p.Title,{left:f/2,opacity:0}),LeftButton:r(p.LeftButton,{left:0,opacity:0}),RightButton:r(p.RightButton,{opacity:0})}},g=100,h={RightToCenter:n(u.Right,u.Center),CenterToLeft:n(u.Center,u.Left),RightToLeft:n(u.Right,u.Left)};o.exports={General:{NavBarHeight:44,StatusBarHeight:20,TotalNavHeight:64},Interpolators:h,Stages:u}},303); __d(function(a,t,r,n){for(var m=t(305),u=m({x:null}),V=m({y:null}),o=m({z:null}),e=m({w:null}),i=m({transformRotateRadians:null}),Q={transformRotateRadians:!0,transformScale:!0,transformTranslate:!0},v={transformRotateRadians:[0,0,0,1],transformTranslate:[0,0,0],transformScale:[1,1,1]},l=/([^\s,]+)/g,x=function(a,t){var r=a.slice(a.indexOf("(")+1,a.indexOf(")")).match(l)||[],n=r.map(function(a){return"\\b"+a+"\\b"}).join("|"),m=new RegExp(n,"g");return a.substring(a.indexOf("{")+1,a.lastIndexOf("}")).replace(m,function(a){var n=r.indexOf(a);return t[n]}).split("\n")},f={unroll:"function(matVar, m0, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15) {\n m0 = matVar[0];\n m1 = matVar[1];\n m2 = matVar[2];\n m3 = matVar[3];\n m4 = matVar[4];\n m5 = matVar[5];\n m6 = matVar[6];\n m7 = matVar[7];\n m8 = matVar[8];\n m9 = matVar[9];\n m10 = matVar[10];\n m11 = matVar[11];\n m12 = matVar[12];\n m13 = matVar[13];\n m14 = matVar[14];\n m15 = matVar[15];\n }",matrixDiffers:"function(retVar, matVar, m0, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15) {\n retVar = retVar ||\n m0 !== matVar[0] ||\n m1 !== matVar[1] ||\n m2 !== matVar[2] ||\n m3 !== matVar[3] ||\n m4 !== matVar[4] ||\n m5 !== matVar[5] ||\n m6 !== matVar[6] ||\n m7 !== matVar[7] ||\n m8 !== matVar[8] ||\n m9 !== matVar[9] ||\n m10 !== matVar[10] ||\n m11 !== matVar[11] ||\n m12 !== matVar[12] ||\n m13 !== matVar[13] ||\n m14 !== matVar[14] ||\n m15 !== matVar[15];\n }",transformScale:"function(matVar, opVar) {\n // Scaling matVar by opVar\n var x = opVar[0];\n var y = opVar[1];\n var z = opVar[2];\n matVar[0] = matVar[0] * x;\n matVar[1] = matVar[1] * x;\n matVar[2] = matVar[2] * x;\n matVar[3] = matVar[3] * x;\n matVar[4] = matVar[4] * y;\n matVar[5] = matVar[5] * y;\n matVar[6] = matVar[6] * y;\n matVar[7] = matVar[7] * y;\n matVar[8] = matVar[8] * z;\n matVar[9] = matVar[9] * z;\n matVar[10] = matVar[10] * z;\n matVar[11] = matVar[11] * z;\n matVar[12] = matVar[12];\n matVar[13] = matVar[13];\n matVar[14] = matVar[14];\n matVar[15] = matVar[15];\n }",transformTranslate:"function(matVar, opVar) {\n // Translating matVar by opVar\n var x = opVar[0];\n var y = opVar[1];\n var z = opVar[2];\n matVar[12] = matVar[0] * x + matVar[4] * y + matVar[8] * z + matVar[12];\n matVar[13] = matVar[1] * x + matVar[5] * y + matVar[9] * z + matVar[13];\n matVar[14] = matVar[2] * x + matVar[6] * y + matVar[10] * z + matVar[14];\n matVar[15] = matVar[3] * x + matVar[7] * y + matVar[11] * z + matVar[15];\n }",transformRotateRadians:"function(matVar, q) {\n // Rotating matVar by q\n var xQuat = q[0], yQuat = q[1], zQuat = q[2], wQuat = q[3];\n var x2Quat = xQuat + xQuat;\n var y2Quat = yQuat + yQuat;\n var z2Quat = zQuat + zQuat;\n var xxQuat = xQuat * x2Quat;\n var xyQuat = xQuat * y2Quat;\n var xzQuat = xQuat * z2Quat;\n var yyQuat = yQuat * y2Quat;\n var yzQuat = yQuat * z2Quat;\n var zzQuat = zQuat * z2Quat;\n var wxQuat = wQuat * x2Quat;\n var wyQuat = wQuat * y2Quat;\n var wzQuat = wQuat * z2Quat;\n // Step 1: Inlines the construction of a quaternion matrix ('quatMat')\n var quatMat0 = 1 - (yyQuat + zzQuat);\n var quatMat1 = xyQuat + wzQuat;\n var quatMat2 = xzQuat - wyQuat;\n var quatMat4 = xyQuat - wzQuat;\n var quatMat5 = 1 - (xxQuat + zzQuat);\n var quatMat6 = yzQuat + wxQuat;\n var quatMat8 = xzQuat + wyQuat;\n var quatMat9 = yzQuat - wxQuat;\n var quatMat10 = 1 - (xxQuat + yyQuat);\n // quatMat3/7/11/12/13/14 = 0, quatMat15 = 1\n\n // Step 2: Inlines multiplication, takes advantage of constant quatMat cells\n var a00 = matVar[0];\n var a01 = matVar[1];\n var a02 = matVar[2];\n var a03 = matVar[3];\n var a10 = matVar[4];\n var a11 = matVar[5];\n var a12 = matVar[6];\n var a13 = matVar[7];\n var a20 = matVar[8];\n var a21 = matVar[9];\n var a22 = matVar[10];\n var a23 = matVar[11];\n\n var b0 = quatMat0, b1 = quatMat1, b2 = quatMat2;\n matVar[0] = b0 * a00 + b1 * a10 + b2 * a20;\n matVar[1] = b0 * a01 + b1 * a11 + b2 * a21;\n matVar[2] = b0 * a02 + b1 * a12 + b2 * a22;\n matVar[3] = b0 * a03 + b1 * a13 + b2 * a23;\n b0 = quatMat4; b1 = quatMat5; b2 = quatMat6;\n matVar[4] = b0 * a00 + b1 * a10 + b2 * a20;\n matVar[5] = b0 * a01 + b1 * a11 + b2 * a21;\n matVar[6] = b0 * a02 + b1 * a12 + b2 * a22;\n matVar[7] = b0 * a03 + b1 * a13 + b2 * a23;\n b0 = quatMat8; b1 = quatMat9; b2 = quatMat10;\n matVar[8] = b0 * a00 + b1 * a10 + b2 * a20;\n matVar[9] = b0 * a01 + b1 * a11 + b2 * a21;\n matVar[10] = b0 * a02 + b1 * a12 + b2 * a22;\n matVar[11] = b0 * a03 + b1 * a13 + b2 * a23;\n }"},s={transformScale:"function(matVar, opVar) {\n // Scaling matVar known to be identity by opVar\n matVar[0] = opVar[0];\n matVar[1] = 0;\n matVar[2] = 0;\n matVar[3] = 0;\n matVar[4] = 0;\n matVar[5] = opVar[1];\n matVar[6] = 0;\n matVar[7] = 0;\n matVar[8] = 0;\n matVar[9] = 0;\n matVar[10] = opVar[2];\n matVar[11] = 0;\n matVar[12] = 0;\n matVar[13] = 0;\n matVar[14] = 0;\n matVar[15] = 1;\n }",transformTranslate:"function(matVar, opVar) {\n // Translating matVar known to be identity by opVar;\n matVar[0] = 1;\n matVar[1] = 0;\n matVar[2] = 0;\n matVar[3] = 0;\n matVar[4] = 0;\n matVar[5] = 1;\n matVar[6] = 0;\n matVar[7] = 0;\n matVar[8] = 0;\n matVar[9] = 0;\n matVar[10] = 1;\n matVar[11] = 0;\n matVar[12] = opVar[0];\n matVar[13] = opVar[1];\n matVar[14] = opVar[2];\n matVar[15] = 1;\n }",transformRotateRadians:"function(matVar, q) {\n\n // Rotating matVar which is known to be identity by q\n var xQuat = q[0], yQuat = q[1], zQuat = q[2], wQuat = q[3];\n var x2Quat = xQuat + xQuat;\n var y2Quat = yQuat + yQuat;\n var z2Quat = zQuat + zQuat;\n var xxQuat = xQuat * x2Quat;\n var xyQuat = xQuat * y2Quat;\n var xzQuat = xQuat * z2Quat;\n var yyQuat = yQuat * y2Quat;\n var yzQuat = yQuat * z2Quat;\n var zzQuat = zQuat * z2Quat;\n var wxQuat = wQuat * x2Quat;\n var wyQuat = wQuat * y2Quat;\n var wzQuat = wQuat * z2Quat;\n // Step 1: Inlines the construction of a quaternion matrix ('quatMat')\n var quatMat0 = 1 - (yyQuat + zzQuat);\n var quatMat1 = xyQuat + wzQuat;\n var quatMat2 = xzQuat - wyQuat;\n var quatMat4 = xyQuat - wzQuat;\n var quatMat5 = 1 - (xxQuat + zzQuat);\n var quatMat6 = yzQuat + wxQuat;\n var quatMat8 = xzQuat + wyQuat;\n var quatMat9 = yzQuat - wxQuat;\n var quatMat10 = 1 - (xxQuat + yyQuat);\n // quatMat3/7/11/12/13/14 = 0, quatMat15 = 1\n\n // Step 2: Inlines the multiplication with identity matrix.\n var b0 = quatMat0, b1 = quatMat1, b2 = quatMat2;\n matVar[0] = b0;\n matVar[1] = b1;\n matVar[2] = b2;\n matVar[3] = 0;\n b0 = quatMat4; b1 = quatMat5; b2 = quatMat6;\n matVar[4] = b0;\n matVar[5] = b1;\n matVar[6] = b2;\n matVar[7] = 0;\n b0 = quatMat8; b1 = quatMat9; b2 = quatMat10;\n matVar[8] = b0;\n matVar[9] = b1;\n matVar[10] = b2;\n matVar[11] = 0;\n matVar[12] = 0;\n matVar[13] = 0;\n matVar[14] = 0;\n matVar[15] = 1;\n }"},y=function(a,t){return" if (!didChange) {\n var prevVal = result."+a+";\n result."+a+" = "+t+";\n didChange = didChange || ("+t+" !== prevVal);\n } else {\n result."+a+" = "+t+";\n }\n"},b=(function(a,t,r,n){var m="round"in a,u=a.round,V=" ratio = (value - "+a.min+") / "+(a.max-a.min)+";\n";return a.extrapolate||(V+=" ratio = ratio > 1 ? 1 : (ratio < 0 ? 0 : ratio);\n"),V+=" "+n+" = "+(m?"Math.round("+u+" * ":"")+"("+t+" * (1 - ratio) + "+r+" * ratio)"+(m?") / "+u:"")+";\n"}),c=function(a){return b(a,a.from,a.to,"nextScalarVal")},z=function(a){return" nextScalarVal = "+JSON.stringify(a.value)+";\n"},q=function(a){return" nextScalarVal = value >= "+a.threshold+" ? "+a.to+" : "+a.from+";\n"},p=function(a){return a+"ReuseOp"},M=function(a){var t="";for(var r in a)Q[r]&&(t+="var "+p(r)+" = [];\n");return t},d=function(a){return"\n"+a.join("\n")+"\n"},w=function(a,t,r,n){var m=p(t)+"["+n+"]";return void 0!==a.from[r]&&void 0!==a.to[r]?" "+a.from[r]!==a.to[r]?b(a,a.from[r],a.to[r],m):m+" = "+a.from[r]+";":" "+m+" = "+v[t][n]+";"},h=[],S=0;S<16;S++)h.push("m"+S);var g=function(a){var t=[" var transform = result.transform !== undefined ? result.transform : (result.transform = [{ matrix: [] }]); var transformMatrix = transform[0].matrix;"];t.push.apply(t,x(f.unroll,["transformMatrix"].concat(h)));for(var r=0;rr?e:1-e,a=t-r,i=t-n;s=a>0&&0===i||i>0&&0===a?o.props.navigationStyles.Interpolators.RightToCenter:a<0&&0===i||i<0&&0===a?o.props.navigationStyles.Interpolators.CenterToLeft:a===i?o.props.navigationStyles.Interpolators.RightToCenter:o.props.navigationStyles.Interpolators.RightToLeft,y.forEach(function(e){var r=this._components[e].get(this.props.navState.routeStack[t]),o=this._getReusableProps(e,t);r&&s[e](o.style,p)&&(o.pointerEvents=0===o.style.opacity?"none":"box-none",r.setNativeProps(o))},o)},o.updateProgress=function(e,t,r){for(var n=Math.max(t,r),s=Math.min(t,r),p=s;p<=n;p++)o._updateIndexProgress(e,p,t,r)},o._getComponent=function(e,t,r){if(o._descriptors[e].includes(t))return o._descriptors[e].get(t);var s=null,p=o.props.routeMapper[e](o.props.navState.routeStack[r],o.props.navigator,r,o.props.navState);if(!p)return null;var a=r===v(o.props.navState),l=a?o.props.navigationStyles.Stages.Center:o.props.navigationStyles.Stages.Left;return s=n.createElement(i,{ref:function(r){o._components[e]=o._components[e].set(t,r)},pointerEvents:a?"box-none":"none",style:l[e]},p),o._descriptors[e]=o._descriptors[e].set(t,s),s},s=r,babelHelpers.possibleConstructorReturn(o,s)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"componentWillMount",value:function(){this._reset()}},{key:"render",value:function(){var e=this,t={height:this.props.navigationStyles.General.TotalNavHeight},r=this.props.navState,o=r.routeStack.map(function(t,r){return y.map(function(o){return e._getComponent(o,t,r)})});return n.createElement(i,{key:this._key,style:[d.navBarContainer,t,this.props.style]},o)}}]),t}(n.Component);g.propTypes={navigator:n.PropTypes.object,routeMapper:n.PropTypes.shape({Title:n.PropTypes.func.isRequired,LeftButton:n.PropTypes.func.isRequired,RightButton:n.PropTypes.func.isRequired}).isRequired,navState:n.PropTypes.shape({routeStack:n.PropTypes.arrayOf(n.PropTypes.object),presentedIndex:n.PropTypes.number}),navigationStyles:n.PropTypes.object,style:i.propTypes.style},g.Styles=f,g.StylesAndroid=s,g.StylesIOS=p,g.defaultProps={navigationStyles:f};var d=a.create({navBarContainer:{position:"absolute",top:0,left:0,right:0,backgroundColor:"transparent"}});r.exports=g},307); __d(function(e,t,a,r){"use strict";var o=t(100),n=t(293),l=t(99),s=t(304),i=n.isRTL,p=o.get("window").width,m=o.get("window").height,d=l.get(),x={transformTranslate:{from:{x:0,y:0,z:0},to:{x:.3*-p,y:0,z:0},min:0,max:1,type:"linear",extrapolate:!0,round:d},opacity:{value:1,type:"constant"}},u=babelHelpers.extends({},x,{transformTranslate:{from:{x:0,y:0,z:0},to:{x:.3*p,y:0,z:0}}}),y={transformTranslate:{from:{x:0,y:0,z:0},to:{x:-Math.round(.3*p),y:0,z:0},min:0,max:1,type:"linear",extrapolate:!0,round:d},transformScale:{from:{x:1,y:1,z:1},to:{x:.95,y:.95,z:1},min:0,max:1,type:"linear",extrapolate:!0},opacity:{from:1,to:.3,min:0,max:1,type:"linear",extrapolate:!1,round:100},translateX:{from:0,to:-Math.round(.3*p),min:0,max:1,type:"linear",extrapolate:!0,round:d},scaleX:{from:1,to:.95,min:0,max:1,type:"linear",extrapolate:!0},scaleY:{from:1,to:.95,min:0,max:1,type:"linear",extrapolate:!0}},T=babelHelpers.extends({},y,{transformTranslate:{from:{x:0,y:0,z:0},to:{x:Math.round(.3*p),y:0,z:0}},translateX:{from:0,to:Math.round(.3*p)}}),b={opacity:{from:0,to:1,min:.5,max:1,type:"linear",extrapolate:!1,round:100}},c={opacity:{from:1,to:0,min:0,max:.5,type:"linear",extrapolate:!1,round:100}},h={transformTranslate:{from:{x:0,y:0,z:0},to:{x:-p,y:0,z:0},min:0,max:1,type:"linear",extrapolate:!0,round:d},opacity:{value:1,type:"constant"},translateX:{from:0,to:-p,min:0,max:1,type:"linear",extrapolate:!0,round:d}},f={transformTranslate:{from:{x:0,y:0,z:0},to:{x:p,y:0,z:0},min:0,max:1,type:"linear",extrapolate:!0,round:d},opacity:{value:1,type:"constant"},translateX:{from:0,to:p,min:0,max:1,type:"linear",extrapolate:!0,round:d}},H={transformTranslate:{from:{x:0,y:0,z:0},to:{x:0,y:-m,z:0},min:0,max:1,type:"linear",extrapolate:!0,round:d},opacity:{value:1,type:"constant"},translateY:{from:0,to:-m,min:0,max:1,type:"linear",extrapolate:!0,round:d}},S={transformTranslate:{from:{x:0,y:0,z:0},to:{x:0,y:m,z:0},min:0,max:1,type:"linear",extrapolate:!0,round:d},opacity:{value:1,type:"constant"},translateY:{from:0,to:m,min:0,max:1,type:"linear",extrapolate:!0,round:d}},F={opacity:{value:1,type:"constant"},transformTranslate:{from:{x:p,y:0,z:0},to:{x:0,y:0,z:0},min:0,max:1,type:"linear",extrapolate:!0,round:d},translateX:{from:p,to:0,min:0,max:1,type:"linear",extrapolate:!0,round:d},scaleX:{value:1,type:"constant"},scaleY:{value:1,type:"constant"}},g=babelHelpers.extends({},F,{transformTranslate:{from:{x:-p,y:0,z:0},to:{x:0,y:0,z:0},min:0,max:1,type:"linear",extrapolate:!0,round:d},translateX:{from:-p,to:0,min:0,max:1,type:"linear",extrapolate:!0,round:d}}),z=babelHelpers.extends({},F,{transformTranslate:{from:{y:m,x:0,z:0},to:{x:0,y:0,z:0},min:0,max:1,type:"linear",extrapolate:!0,round:d},translateY:{from:m,to:0,min:0,max:1,type:"linear",extrapolate:!0,round:d}}),E=babelHelpers.extends({},F,{transformTranslate:{from:{y:-m,x:0,z:0},to:{x:0,y:0,z:0},min:0,max:1,type:"linear",extrapolate:!0,round:d},translateY:{from:-m,to:0,min:0,max:1,type:"linear",extrapolate:!0,round:d}}),w={transformTranslate:{from:{x:0,y:0,z:0},to:{x:0,y:0,z:0},min:0,max:1,type:"linear",extrapolate:!0,round:d},transformScale:{from:{x:1,y:1,z:1},to:{x:.95,y:.95,z:1},min:0,max:1,type:"linear",extrapolate:!0},opacity:{from:1,to:.3,min:0,max:1,type:"linear",extrapolate:!1,round:100},scaleX:{from:1,to:.95,min:0,max:1,type:"linear",extrapolate:!0},scaleY:{from:1,to:.95,min:0,max:1,type:"linear",extrapolate:!0}},v={opacity:{value:1,type:"constant"},transformTranslate:{from:{x:0,y:m,z:0},to:{x:0,y:0,z:0},min:0,max:1,type:"linear",extrapolate:!0,round:d},translateY:{from:m,to:0,min:0,max:1,type:"linear",extrapolate:!0,round:d},scaleX:{value:1,type:"constant"},scaleY:{value:1,type:"constant"}},B={opacity:{value:1,type:"constant"}},D={opacity:{from:0,to:1,min:.5,max:1,type:"linear",extrapolate:!1,round:100},transformTranslate:{from:{x:0,y:100,z:0},to:{x:0,y:0,z:0},min:0,max:1,type:"linear",extrapolate:!0,round:d},translateY:{from:100,to:0,min:0,max:1,type:"linear",extrapolate:!0,round:d}},I={frictionConstant:1,frictionByDistance:1.5},G={isDetachable:!1,gestureDetectMovement:2,notMoving:.3,directionRatio:.66,snapVelocity:2,edgeHitWidth:30,stillCompletionRatio:.6,fullDistance:p,direction:"left-to-right"},W=babelHelpers.extends({},G,{direction:"right-to-left"}),j=babelHelpers.extends({},G,{fullDistance:m,direction:"bottom-to-top"}),X=babelHelpers.extends({},G,{fullDistance:m,direction:"top-to-bottom"}),Y={ToTheStartIOS:x,ToTheEndIOS:u,FadeToTheStart:y,FadeToTheEnd:T,ToTheStart:h,ToTheEnd:f,FromTheStart:g,FromTheEnd:F,BaseStartToEndGesture:G,BaseEndToStartGesture:W};i&&(Y={ToTheStartIOS:u,ToTheEndIOS:x,FadeToTheStart:T,FadeToTheEnd:y,ToTheStart:f,ToTheEnd:h,FromTheStart:F,FromTheEnd:g,BaseStartToEndGesture:W,BaseEndToStartGesture:G});var k={gestures:{pop:Y.BaseStartToEndGesture},springFriction:26,springTension:200,defaultTransitionVelocity:1.5,animationInterpolators:{into:s(Y.FromTheEnd),out:s(Y.FadeToTheStart)}},M={PushFromRight:babelHelpers.extends({},k,{animationInterpolators:{into:s(Y.FromTheEnd),out:s(Y.ToTheStartIOS)}}),PushFromLeft:babelHelpers.extends({},k,{animationInterpolators:{into:s(Y.FromTheStart),out:s(Y.ToTheEndIOS)}}),FloatFromRight:babelHelpers.extends({},k),FloatFromLeft:babelHelpers.extends({},k,{gestures:{pop:Y.BaseEndToStartGesture},animationInterpolators:{into:s(Y.FromTheStart),out:s(Y.FadeToTheEnd)}}),FloatFromBottom:babelHelpers.extends({},k,{gestures:{pop:babelHelpers.extends({},Y.BaseStartToEndGesture,{edgeHitWidth:150,direction:"top-to-bottom",fullDistance:m})},animationInterpolators:{into:s(v),out:s(w)}}),FloatFromBottomAndroid:babelHelpers.extends({},k,{gestures:null,defaultTransitionVelocity:3,springFriction:20,animationInterpolators:{into:s(D),out:s(B)}}),FadeAndroid:babelHelpers.extends({},k,{gestures:null,animationInterpolators:{into:s(b),out:s(c)}}),SwipeFromLeft:babelHelpers.extends({},k,{gestures:{jumpBack:babelHelpers.extends({},Y.BaseEndToStartGesture,{overswipe:I,edgeHitWidth:null,isDetachable:!0}),jumpForward:babelHelpers.extends({},Y.BaseStartToEndGesture,{overswipe:I,edgeHitWidth:null,isDetachable:!0})},animationInterpolators:{into:s(Y.FromTheStart),out:s(Y.ToTheEnd)}}),HorizontalSwipeJump:babelHelpers.extends({},k,{gestures:{jumpBack:babelHelpers.extends({},Y.BaseStartToEndGesture,{overswipe:I,edgeHitWidth:null,isDetachable:!0}),jumpForward:babelHelpers.extends({},Y.BaseEndToStartGesture,{overswipe:I,edgeHitWidth:null,isDetachable:!0})},animationInterpolators:{into:s(Y.FromTheEnd),out:s(Y.ToTheStart)}}),HorizontalSwipeJumpFromRight:babelHelpers.extends({},k,{gestures:{jumpBack:babelHelpers.extends({},Y.BaseEndToStartGesture,{overswipe:I,edgeHitWidth:null,isDetachable:!0}),jumpForward:babelHelpers.extends({},Y.BaseStartToEndGesture,{overswipe:I,edgeHitWidth:null,isDetachable:!0}),pop:Y.BaseEndToStartGesture},animationInterpolators:{into:s(Y.FromTheStart),out:s(Y.FadeToTheEnd)}}),HorizontalSwipeJumpFromLeft:babelHelpers.extends({},k,{gestures:{jumpBack:babelHelpers.extends({},Y.BaseEndToStartGesture,{overswipe:I,edgeHitWidth:null,isDetachable:!0}),jumpForward:babelHelpers.extends({},Y.BaseStartToEndGesture,{overswipe:I,edgeHitWidth:null,isDetachable:!0}),pop:Y.BaseEndToStartGesture},animationInterpolators:{into:s(Y.FromTheStart),out:s(Y.ToTheEnd)}}),VerticalUpSwipeJump:babelHelpers.extends({},k,{gestures:{jumpBack:babelHelpers.extends({},X,{overswipe:I,edgeHitWidth:null,isDetachable:!0}),jumpForward:babelHelpers.extends({},j,{overswipe:I,edgeHitWidth:null,isDetachable:!0})},animationInterpolators:{into:s(z),out:s(H)}}),VerticalDownSwipeJump:babelHelpers.extends({},k,{gestures:{jumpBack:babelHelpers.extends({},j,{overswipe:I,edgeHitWidth:null,isDetachable:!0}),jumpForward:babelHelpers.extends({},X,{overswipe:I,edgeHitWidth:null,isDetachable:!0})},animationInterpolators:{into:s(E),out:s(S)}})};a.exports=M},308); __d(function(e,n,o,t){"use strict";function r(e,n,o,t){e.handle&&(a.clearInteractionHandle(e.handle),e.handle=null),n&&n(o,t)}var a=n(203),u=n(310),s=u.currentCentroidXOfTouchesChangedAfter,d=u.currentCentroidYOfTouchesChangedAfter,i=u.previousCentroidXOfTouchesChangedAfter,c=u.previousCentroidYOfTouchesChangedAfter,p=u.currentCentroidX,v=u.currentCentroidY,h={_initializeGestureState:function(e){e.moveX=0,e.moveY=0,e.x0=0,e.y0=0,e.dx=0,e.dy=0,e.vx=0,e.vy=0,e.numberActiveTouches=0,e._accountsForMovesUpTo=0},_updateGestureStateOnMove:function(e,n){e.numberActiveTouches=n.numberActiveTouches,e.moveX=s(n,e._accountsForMovesUpTo),e.moveY=d(n,e._accountsForMovesUpTo);var o=e._accountsForMovesUpTo,t=i(n,o),r=s(n,o),a=c(n,o),u=d(n,o),p=e.dx+(r-t),v=e.dy+(u-a),h=n.mostRecentTimeStamp-e._accountsForMovesUpTo;e.vx=(p-e.dx)/h,e.vy=(v-e.dy)/h,e.dx=p,e.dy=v,e._accountsForMovesUpTo=n.mostRecentTimeStamp},create:function(e){var n={handle:null},o={stateID:Math.random()};return h._initializeGestureState(o),{panHandlers:{onStartShouldSetResponder:function(n){return void 0!==e.onStartShouldSetPanResponder&&e.onStartShouldSetPanResponder(n,o)},onMoveShouldSetResponder:function(n){return void 0!==e.onMoveShouldSetPanResponder&&e.onMoveShouldSetPanResponder(n,o)},onStartShouldSetResponderCapture:function(n){return 1===n.nativeEvent.touches.length&&h._initializeGestureState(o),o.numberActiveTouches=n.touchHistory.numberActiveTouches,void 0!==e.onStartShouldSetPanResponderCapture&&e.onStartShouldSetPanResponderCapture(n,o)},onMoveShouldSetResponderCapture:function(n){var t=n.touchHistory;return o._accountsForMovesUpTo!==t.mostRecentTimeStamp&&(h._updateGestureStateOnMove(o,t),!!e.onMoveShouldSetPanResponderCapture&&e.onMoveShouldSetPanResponderCapture(n,o))},onResponderGrant:function(t){return n.handle||(n.handle=a.createInteractionHandle()),o.x0=p(t.touchHistory),o.y0=v(t.touchHistory),o.dx=0,o.dy=0,e.onPanResponderGrant&&e.onPanResponderGrant(t,o),void 0===e.onShouldBlockNativeResponder||e.onShouldBlockNativeResponder()},onResponderReject:function(t){r(n,e.onPanResponderReject,t,o)},onResponderRelease:function(t){r(n,e.onPanResponderRelease,t,o),h._initializeGestureState(o)},onResponderStart:function(n){var t=n.touchHistory;o.numberActiveTouches=t.numberActiveTouches,e.onPanResponderStart&&e.onPanResponderStart(n,o)},onResponderMove:function(n){var t=n.touchHistory;o._accountsForMovesUpTo!==t.mostRecentTimeStamp&&(h._updateGestureStateOnMove(o,t),e.onPanResponderMove&&e.onPanResponderMove(n,o))},onResponderEnd:function(t){var a=t.touchHistory;o.numberActiveTouches=a.numberActiveTouches,r(n,e.onPanResponderEnd,t,o)},onResponderTerminate:function(t){r(n,e.onPanResponderTerminate,t,o),h._initializeGestureState(o)},onResponderTerminationRequest:function(n){return void 0===e.onPanResponderTerminationRequest||e.onPanResponderTerminationRequest(n,o)}},getInteractionHandle:function(){return n.handle}}}};o.exports=h},309); __d(function(e,n,r,t){"use strict";var i={centroidDimension:function(e,n,r,t){var o=e.touchBank,u=0,c=0,d=1===e.numberActiveTouches?e.touchBank[e.indexOfSingleActiveTouch]:null;if(null!==d)d.touchActive&&d.currentTimeStamp>n&&(u+=t&&r?d.currentPageX:t&&!r?d.currentPageY:!t&&r?d.previousPageX:d.previousPageY,c=1);else for(var s=0;s=n){var f;f=t&&r?a.currentPageX:t&&!r?a.currentPageY:!t&&r?a.previousPageX:a.previousPageY,u+=f,c++}}return c>0?u/c:i.noCentroid},currentCentroidXOfTouchesChangedAfter:function(e,n){return i.centroidDimension(e,n,!0,!0)},currentCentroidYOfTouchesChangedAfter:function(e,n){return i.centroidDimension(e,n,!1,!0)},previousCentroidXOfTouchesChangedAfter:function(e,n){return i.centroidDimension(e,n,!0,!1)},previousCentroidYOfTouchesChangedAfter:function(e,n){return i.centroidDimension(e,n,!1,!1)},currentCentroidX:function(e){return i.centroidDimension(e,0,!0,!0)},currentCentroidY:function(e){return i.centroidDimension(e,0,!1,!0)},noCentroid:-1};r.exports=i},310); __d(function(t,n,r,u){"use strict";function c(t,n,r){return nr?r:n}r.exports=c},311); __d(function(t,i,e,n){!function(){function t(t,i){var e=t.indexOf(i);-1!=e&&t.splice(e,1)}var i={},e=i.util={},s=Array.prototype.concat,r=Array.prototype.slice;e.bind=function(t,i){var e=r.call(arguments,2);return function(){t.apply(i,s.call(e,r.call(arguments)))}},e.extend=function(t,i){for(var e in i)i.hasOwnProperty(e)&&(t[e]=i[e])};var o=i.SpringSystem=function(t){this._springRegistry={},this._activeSprings=[],this.listeners=[],this._idleSpringIndices=[],this.looper=t||new l,this.looper.springSystem=this};e.extend(o.prototype,{_springRegistry:null,_isIdle:!0,_lastTimeMillis:-1,_activeSprings:null,listeners:null,_idleSpringIndices:null,setLooper:function(t){this.looper=t,t.springSystem=this},createSpring:function(t,i){var e;return e=void 0===t||void 0===i?u.DEFAULT_ORIGAMI_SPRING_CONFIG:u.fromOrigamiTensionAndFriction(t,i),this.createSpringWithConfig(e)},createSpringWithBouncinessAndSpeed:function(t,i){var e;return e=void 0===t||void 0===i?u.DEFAULT_ORIGAMI_SPRING_CONFIG:u.fromBouncinessAndSpeed(t,i),this.createSpringWithConfig(e)},createSpringWithConfig:function(t){var i=new a(this);return this.registerSpring(i),i.setSpringConfig(t),i},getIsIdle:function(){return this._isIdle},getSpringById:function(t){return this._springRegistry[t]},getAllSprings:function(){var t=[];for(var i in this._springRegistry)this._springRegistry.hasOwnProperty(i)&&t.push(this._springRegistry[i]);return t},registerSpring:function(t){this._springRegistry[t.getId()]=t},deregisterSpring:function(i){t(this._activeSprings,i),delete this._springRegistry[i.getId()]},advance:function(t,i){for(;this._idleSpringIndices.length>0;)this._idleSpringIndices.pop();for(var e=0,n=this._activeSprings.length;e0;){var r=this._idleSpringIndices.pop();r>=0&&this._activeSprings.splice(r,1)}},loop:function(t){var i;-1===this._lastTimeMillis&&(this._lastTimeMillis=t-1);var e=t-this._lastTimeMillis;this._lastTimeMillis=t;var n=0,s=this.listeners.length;for(n=0;n0&&(ti||t>i&&this.getCurrentValue()a.MAX_DELTA_TIME_SEC&&(n=a.MAX_DELTA_TIME_SEC),this._timeAccumulator+=n;for(var s,r,o,h,u,l,c,p,g,_,S=this._springConfig.tension,d=this._springConfig.friction,f=this._currentState.position,m=this._currentState.velocity,v=this._tempState.position,E=this._tempState.velocity;this._timeAccumulator>=a.SOLVER_TIMESTEP_SEC;)this._timeAccumulator-=a.SOLVER_TIMESTEP_SEC,this._timeAccumulator0&&this._interpolate(this._timeAccumulator/a.SOLVER_TIMESTEP_SEC),(this.isAtRest()||this._overshootClampingEnabled&&this.isOvershooting())&&(this._springConfig.tension>0?(this._startValue=this._endValue,this._currentState.position=this._endValue):(this._endValue=this._currentState.position,this._startValue=this._endValue),this.setVelocity(0),e=!0);var I=!1;this._wasAtRest&&(this._wasAtRest=!1,I=!0);var y=!1;e&&(this._wasAtRest=!0,y=!0),this.notifyPositionUpdated(I,y)}},notifyPositionUpdated:function(t,i){for(var e=0,n=this.listeners.length;e18&&t<=44?this.b3Friction2(t):this.b3Friction3(t)}}),e.extend(u,{fromOrigamiTensionAndFriction:function(t,i){return new u(c.tensionFromOrigamiValue(t),c.frictionFromOrigamiValue(i))},fromBouncinessAndSpeed:function(t,e){var n=new i.BouncyConversion(t,e);return this.fromOrigamiTensionAndFriction(n.bouncyTension,n.bouncyFriction)},coastingConfigWithOrigamiFriction:function(t){return new u(0,c.frictionFromOrigamiValue(t))}}),u.DEFAULT_ORIGAMI_SPRING_CONFIG=u.fromOrigamiTensionAndFriction(40,7),e.extend(u.prototype,{friction:0,tension:0});var g={};e.hexToRGB=function(t){if(g[t])return g[t];t=t.replace("#",""),3===t.length&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]);var i=t.match(/.{2}/g),e={r:parseInt(i[0],16),g:parseInt(i[1],16),b:parseInt(i[2],16)};return g[t]=e,e},e.rgbToHex=function(t,i,e){return t=t.toString(16),i=i.toString(16),e=e.toString(16),t=t.length<2?"0"+t:t,i=i.length<2?"0"+i:i,e=e.length<2?"0"+e:e,"#"+t+i+e};var _=i.MathUtil={mapValueInRange:function(t,i,e,n,s){return n+(t-i)/(e-i)*(s-n)},interpolateColor:function(t,i,n,s,r,o){s=void 0===s?0:s,r=void 0===r?1:r,i=e.hexToRGB(i),n=e.hexToRGB(n);var a=Math.floor(e.mapValueInRange(t,s,r,i.r,n.r)),h=Math.floor(e.mapValueInRange(t,s,r,i.g,n.g)),u=Math.floor(e.mapValueInRange(t,s,r,i.b,n.b));return o?"rgb("+a+","+h+","+u+")":e.rgbToHex(a,h,u)},degreesToRadians:function(t){return t*Math.PI/180},radiansToDegrees:function(t){return 180*t/Math.PI}};e.extend(e,_);var S;"undefined"!=typeof window&&(S=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||function(t){window.setTimeout(t,16.666666666666668)}),S||"undefined"==typeof process||"node"!==process.title||(S=setImmediate),e.onFrame=function(t){return S(t)},void 0!==n?e.extend(n,i):"undefined"!=typeof window&&(window.rebound=i)}()},312); __d(function(t,e,o,s){"use strict";function i(){return T++}var a=e(102),n=e(219),r=e(296),c=e(76).NavigatorManager,u=e(97),p=e(223),l=e(314),d=e(98),h=e(196),v=e(130),f=e(44),g=e(111),k=e(139),S=e(115),m=u.PropTypes,T=0,b=function(t){function e(){return babelHelpers.classCallCheck(this,e),babelHelpers.possibleConstructorReturn(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return babelHelpers.inherits(e,t),babelHelpers.createClass(e,[{key:"requestSchedulingNavigation",value:function(t){c.requestSchedulingJavaScriptNavigation(p.findNodeHandle(this),g,t)}},{key:"render",value:function(){return u.createElement(N,this.props)}}]),e}(u.Component),O={done:!0,cancel:!0,edit:!0,save:!0,add:!0,compose:!0,reply:!0,action:!0,organize:!0,bookmarks:!0,search:!0,refresh:!0,stop:!0,camera:!0,trash:!0,play:!0,pause:!0,rewind:!0,"fast-forward":!0,undo:!0,redo:!0,"page-curl":!0},y=S(O),_=u.createClass({displayName:"NavigatorIOS",propTypes:{initialRoute:m.shape({component:m.func.isRequired,title:m.string.isRequired,titleImage:n.propTypes.source,passProps:m.object,backButtonIcon:n.propTypes.source,backButtonTitle:m.string,leftButtonIcon:n.propTypes.source,leftButtonTitle:m.string,leftButtonSystemIcon:m.oneOf(Object.keys(y)),onLeftButtonPress:m.func,rightButtonIcon:n.propTypes.source,rightButtonTitle:m.string,rightButtonSystemIcon:m.oneOf(Object.keys(y)),onRightButtonPress:m.func,wrapperStyle:v.propTypes.style,navigationBarHidden:m.bool,shadowHidden:m.bool,tintColor:m.string,barTintColor:m.string,titleTextColor:m.string,translucent:m.bool}).isRequired,navigationBarHidden:m.bool,shadowHidden:m.bool,itemWrapperStyle:v.propTypes.style,tintColor:m.string,barTintColor:m.string,titleTextColor:m.string,translucent:m.bool,interactivePopGestureEnabled:m.bool},navigator:void 0,navigationContext:new r,componentWillMount:function(){this.navigator={push:this.push,pop:this.pop,popN:this.popN,replace:this.replace,replaceAtIndex:this.replaceAtIndex,replacePrevious:this.replacePrevious,replacePreviousAndPop:this.replacePreviousAndPop,resetTo:this.resetTo,popToRoute:this.popToRoute,popToTop:this.popToTop,navigationContext:this.navigationContext},this._emitWillFocus(this.state.routeStack[this.state.observedTopOfStack])},componentDidMount:function(){this._emitDidFocus(this.state.routeStack[this.state.observedTopOfStack]),this._enableTVEventHandler()},componentWillUnmount:function(){this.navigationContext.dispose(),this.navigationContext=new r,this._disableTVEventHandler()},getDefaultProps:function(){return{translucent:!0}},getInitialState:function(){return{idStack:[i()],routeStack:[this.props.initialRoute],requestedTopOfStack:0,observedTopOfStack:0,progress:1,fromIndex:0,toIndex:0,makingNavigatorRequest:!1,updatingAllIndicesAtOrBeyond:0}},_toFocusOnNavigationComplete:void 0,_handleFocusRequest:function(t){this.state.makingNavigatorRequest?this._toFocusOnNavigationComplete=t:this._getFocusEmitter().emit("focus",t)},_focusEmitter:void 0,_getFocusEmitter:function(){var t=this._focusEmitter;return t||(t=new a,this._focusEmitter=t),t},getChildContext:function(){return{onFocusRequested:this._handleFocusRequest,focusEmitter:this._getFocusEmitter()}},childContextTypes:{onFocusRequested:u.PropTypes.func,focusEmitter:u.PropTypes.instanceOf(a)},_tryLockNavigator:function(t){this.refs.transitionerRef.requestSchedulingNavigation(function(e){return e&&t()})},_handleNavigatorStackChanged:function(t){var e=t.nativeEvent.stackLength-1;this._emitDidFocus(this.state.routeStack[e]),f(e<=this.state.requestedTopOfStack,"No navigator item should be pushed without JS knowing about it %s %s",e,this.state.requestedTopOfStack),this.state.requestedTopOfStack!==this.state.observedTopOfStack&&f(e===this.state.requestedTopOfStack,"If waiting for observedTopOfStack to reach requestedTopOfStack, the only valid observedTopOfStack should be requestedTopOfStack.");var o={observedTopOfStack:e,makingNavigatorRequest:!1,updatingAllIndicesAtOrBeyond:null,progress:1,toIndex:e,fromIndex:e};this.setState(o,this._eliminateUnneededChildren)},_eliminateUnneededChildren:function(){var t=this.state.routeStack.length>this.state.observedTopOfStack+1?this.state.observedTopOfStack+1:null;this.setState({idStack:this.state.idStack.slice(0,this.state.observedTopOfStack+1),routeStack:this.state.routeStack.slice(0,this.state.observedTopOfStack+1),requestedTopOfStack:this.state.observedTopOfStack,makingNavigatorRequest:!0,updatingAllIndicesAtOrBeyond:t})},_emitDidFocus:function(t){this.navigationContext.emit("didfocus",{route:t})},_emitWillFocus:function(t){this.navigationContext.emit("willfocus",{route:t})},push:function(t){var e=this;f(!!t,"Must supply route to push"),this.state.requestedTopOfStack===this.state.observedTopOfStack&&this._tryLockNavigator(function(){e._emitWillFocus(t);var o=e.state.routeStack.concat([t]),s=e.state.idStack.concat([i()]);e.setState({idStack:s,routeStack:o,requestedTopOfStack:o.length-1,makingNavigatorRequest:!0,updatingAllIndicesAtOrBeyond:o.length-1})})},popN:function(t){var e=this;0!==t&&this.state.requestedTopOfStack===this.state.observedTopOfStack&&this.state.requestedTopOfStack>0&&this._tryLockNavigator(function(){var o=e.state.requestedTopOfStack-t;f(o>=0,"Cannot pop below 0"),e._emitWillFocus(e.state.routeStack[o]),e.setState({requestedTopOfStack:o,makingNavigatorRequest:!0,updatingAllIndicesAtOrBeyond:e.state.requestedTopOfStack-t})})},pop:function(){this.popN(1)},replaceAtIndex:function(t,e){if(f(!!t,"Must supply route to replace"),e<0&&(e+=this.state.routeStack.length),!(this.state.routeStack.length<=e)){var o=this.state.idStack.slice(),s=this.state.routeStack.slice();o[e]=i(),s[e]=t,this.setState({idStack:o,routeStack:s,makingNavigatorRequest:!1,updatingAllIndicesAtOrBeyond:e}),this._emitWillFocus(t),this._emitDidFocus(t)}},replace:function(t){this.replaceAtIndex(t,-1)},replacePrevious:function(t){this.replaceAtIndex(t,-2)},popToTop:function(){this.popToRoute(this.state.routeStack[0])},popToRoute:function(t){var e=this.state.routeStack.indexOf(t);f(-1!==e,"Calling pop to route for a route that doesn't exist!");var o=this.state.routeStack.length-e-1;this.popN(o)},replacePreviousAndPop:function(t){var e=this;this.state.requestedTopOfStack===this.state.observedTopOfStack&&(this.state.routeStack.length<2||this._tryLockNavigator(function(){e.replacePrevious(t),e.setState({requestedTopOfStack:e.state.requestedTopOfStack-1,makingNavigatorRequest:!0})}))},resetTo:function(t){f(!!t,"Must supply route to push"),this.state.requestedTopOfStack===this.state.observedTopOfStack&&(this.replaceAtIndex(t,0),this.popToRoute(t))},_handleNavigationComplete:function(t){t.stopPropagation(),this._toFocusOnNavigationComplete&&(this._getFocusEmitter().emit("focus",this._toFocusOnNavigationComplete),this._toFocusOnNavigationComplete=null),this._handleNavigatorStackChanged(t)},_routeToStackItem:function(t,e){var o=t.component,s=t.wrapperStyle,i=t.passProps,a=babelHelpers.objectWithoutProperties(t,["component","wrapperStyle","passProps"]),n=this.props,r=n.itemWrapperStyle,c=babelHelpers.objectWithoutProperties(n,["itemWrapperStyle"]),p=null!=this.state.updatingAllIndicesAtOrBeyond&&this.state.updatingAllIndicesAtOrBeyond>=e,d=o;return u.createElement(l,{key:"nav"+e,shouldUpdate:p},u.createElement(C,babelHelpers.extends({},c,a,{style:[q.stackItem,r,s]}),u.createElement(d,babelHelpers.extends({navigator:this.navigator,route:a},i))))},_renderNavigationStackItems:function(){var t=this.state.makingNavigatorRequest||null!==this.state.updatingAllIndicesAtOrBeyond,e=t?this.state.routeStack.map(this._routeToStackItem):null;return u.createElement(l,{shouldUpdate:t},u.createElement(b,{ref:"transitionerRef",style:q.transitioner,vertical:this.props.vertical,requestedTopOfStack:this.state.requestedTopOfStack,onNavigationComplete:this._handleNavigationComplete,interactivePopGestureEnabled:this.props.interactivePopGestureEnabled},e))},_tvEventHandler:void 0,_enableTVEventHandler:function(){this._tvEventHandler=new h,this._tvEventHandler.enable(this,function(t,e){e&&"menu"===e.eventType&&t.pop()})},_disableTVEventHandler:function(){this._tvEventHandler&&(this._tvEventHandler.disable(),delete this._tvEventHandler)},render:function(){return u.createElement(v,{style:this.props.style},this._renderNavigationStackItems())}}),q=d.create({stackItem:{backgroundColor:"white",overflow:"hidden",position:"absolute",top:0,left:0,right:0,bottom:0},transitioner:{flex:1}}),N=k("RCTNavigator"),C=k("RCTNavItem");o.exports=_},313); __d(function(e,t,r,n){"use strict";var l=t(97),s=function(e){function t(){return babelHelpers.classCallCheck(this,t),babelHelpers.possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"shouldComponentUpdate",value:function(e){return!!e.shouldUpdate}},{key:"render",value:function(){var e=this.props.children;return null===e||!1===e?null:l.Children.only(e)}}]),t}(l.Component);r.exports=s},314); __d(function(e,r,t,s){"use strict";var o,p,l=r(66),n=r(316),a=(r(317),r(75),r(97)),i=r(137),b=r(122),u=(r(140),r(130)),c=r(123),y=i(b),d=i(babelHelpers.extends({},c,{color:l})),h=function(e){function r(){return babelHelpers.classCallCheck(this,r),babelHelpers.possibleConstructorReturn(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return babelHelpers.inherits(r,e),babelHelpers.createClass(r,[{key:"render",value:function(){return a.createElement(n,this.props,this.props.children)}}]),r}(a.Component);h.MODE_DIALOG="dialog",h.MODE_DROPDOWN="dropdown",h.defaultProps={mode:"dialog"},h.propTypes=babelHelpers.extends({},u.propTypes,{style:d,selectedValue:a.PropTypes.any,onValueChange:a.PropTypes.func,enabled:a.PropTypes.bool,mode:a.PropTypes.oneOf(["dialog","dropdown"]),itemStyle:y,prompt:a.PropTypes.string,testID:a.PropTypes.string}),h.Item=(p=o=function(e){function r(){return babelHelpers.classCallCheck(this,r),babelHelpers.possibleConstructorReturn(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return babelHelpers.inherits(r,e),babelHelpers.createClass(r,[{key:"render",value:function(){throw null}}]),r}(a.Component),o.propTypes={label:a.PropTypes.string.isRequired,value:a.PropTypes.any,color:l,testID:a.PropTypes.string},p),t.exports=h},315); __d(function(e,t,n,s){"use strict";var r,o,p=t(69),i=t(97),a=t(98),l=t(137),c=t(122),u=t(130),h=t(125),d=l(c),y=t(139),v=i.createClass({displayName:"PickerIOS",mixins:[p],propTypes:babelHelpers.extends({},u.propTypes,{itemStyle:d,onValueChange:i.PropTypes.func,selectedValue:i.PropTypes.any}),getInitialState:function(){return this._stateFromProps(this.props)},componentWillReceiveProps:function(e){this.setState(this._stateFromProps(e))},_stateFromProps:function(e){var t=0,n=[];return i.Children.toArray(e.children).forEach(function(s,r){s.props.value===e.selectedValue&&(t=r),n.push({value:s.props.value,label:s.props.label,textColor:h(s.props.color)})}),{selectedIndex:t,items:n}},render:function(){var e=this;return i.createElement(u,{style:this.props.style},i.createElement(f,{ref:function(t){return e._picker=t},style:[C.pickerIOS,this.props.itemStyle],items:this.state.items,selectedIndex:this.state.selectedIndex,onChange:this._onChange,onStartShouldSetResponder:function(){return!0},onResponderTerminationRequest:function(){return!1}}))},_onChange:function(e){this.props.onChange&&this.props.onChange(e),this.props.onValueChange&&this.props.onValueChange(e.nativeEvent.newValue,e.nativeEvent.newIndex),this._picker&&this.state.selectedIndex!==e.nativeEvent.newIndex&&this._picker.setNativeProps({selectedIndex:this.state.selectedIndex})}});v.Item=(o=r=function(e){function t(){return babelHelpers.classCallCheck(this,t),babelHelpers.possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"render",value:function(){return null}}]),t}(i.Component),r.propTypes={value:i.PropTypes.any,label:i.PropTypes.string,color:i.PropTypes.string},o);var C=a.create({pickerIOS:{height:216}}),f=y("RCTPicker",{propTypes:{style:d}},{nativeOnly:{items:!0,onChange:!0,selectedIndex:!0}});n.exports=v},316); __d(function(t,s,c,e){"use strict";c.exports=s(140)},317); __d(function(t,s,c,e){"use strict";c.exports=s(140)},318); __d(function(e,r,s,p){"use strict";var o=r(219),t=r(69),i=r(97),n=r(98),a=r(130),g=r(139),l=i.PropTypes,c=i.createClass({displayName:"ProgressViewIOS",mixins:[t],propTypes:babelHelpers.extends({},a.propTypes,{progressViewStyle:l.oneOf(["default","bar"]),progress:l.number,progressTintColor:l.string,trackTintColor:l.string,progressImage:o.propTypes.source,trackImage:o.propTypes.source}),render:function(){return i.createElement(u,babelHelpers.extends({},this.props,{style:[y.progressView,this.props.style]}))}}),y=n.create({progressView:{height:2}}),u=g("RCTProgressView",c);s.exports=c},319); __d(function(e,n,t,o){"use strict";var s=n(69),r=n(97),a=n(98),l=n(130),p=n(139),i=r.PropTypes,g=r.createClass({displayName:"SegmentedControlIOS",mixins:[s],propTypes:babelHelpers.extends({},l.propTypes,{values:i.arrayOf(i.string),selectedIndex:i.number,onValueChange:i.func,onChange:i.func,enabled:i.bool,tintColor:i.string,momentary:i.bool}),getDefaultProps:function(){return{values:[],enabled:!0}},_onChange:function(e){this.props.onChange&&this.props.onChange(e),this.props.onValueChange&&this.props.onValueChange(e.nativeEvent.value)},render:function(){return r.createElement(u,babelHelpers.extends({},this.props,{ref:"segmentedcontrol",style:[h.segmentedControl,this.props.style],onChange:this._onChange}))}}),h=a.create({segmentedControl:{height:28}}),u=p("RCTSegmentedControl",g);t.exports=g},320); __d(function(e,n,r,t){"use strict";var i=n(219),a=n(66),o=n(69),l=n(136),s=(n(75),n(97)),u=n(98),m=n(130),p=n(139),d=s.PropTypes,c=s.createClass({displayName:"Slider",mixins:[o],propTypes:babelHelpers.extends({},m.propTypes,{style:m.propTypes.style,value:d.number,step:d.number,minimumValue:d.number,maximumValue:d.number,minimumTrackTintColor:a,maximumTrackTintColor:a,disabled:d.bool,trackImage:i.propTypes.source,minimumTrackImage:i.propTypes.source,maximumTrackImage:i.propTypes.source,thumbImage:i.propTypes.source,thumbTintColor:a,onValueChange:d.func,onSlidingComplete:d.func,testID:d.string}),getDefaultProps:function(){return{disabled:!1,value:0,minimumValue:0,maximumValue:1,step:0}},viewConfig:{uiViewClassName:"RCTSlider",validAttributes:babelHelpers.extends({},l.RCTView,{value:!0})},render:function(){var e=this.props,n=e.style,r=e.onValueChange,t=e.onSlidingComplete,i=babelHelpers.objectWithoutProperties(e,["style","onValueChange","onSlidingComplete"]);return i.style=[b.slider,n],i.onValueChange=r&&function(e){r&&!0&&r(e.nativeEvent.value)},i.onChange=i.onValueChange,i.onSlidingComplete=t&&function(e){t&&t(e.nativeEvent.value)},s.createElement(T,babelHelpers.extends({},i,{enabled:!this.props.disabled,onStartShouldSetResponder:function(){return!0},onResponderTerminationRequest:function(){return!1}}))}}),b=void 0;b=u.create({slider:{height:40}});var C={},T=p("RCTSlider",c,C);r.exports=c},321); __d(function(e,t,s,r){"use strict";var n=t(97),o=t(98),p=t(76),a=p.TestModule,l=t(94),i=t(130),c=t(139),h=function(e){function t(){var e,s,r,n;babelHelpers.classCallCheck(this,t);for(var o=arguments.length,p=Array(o),l=0;l0},_swipeFullSpeed:function(e){this.state.currentLeft.setValue(this._previousLeft+e.dx)},_swipeSlowSpeed:function(e){this.state.currentLeft.setValue(this._previousLeft+e.dx/4)},_isSwipingExcessivelyRightFromClosedPosition:function(e){var n=c?-e.dx:e.dx;return this._isSwipingRightFromClosed(e)&&n>120},_onPanResponderTerminationRequest:function(e,n){return!1},_animateTo:function(e){var n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l;o.timing(this.state.currentLeft,{duration:i,toValue:e}).start(function(){n._previousLeft=e,t()})},_animateToOpenPosition:function(){var e=c?-this.props.maxSwipeDistance:this.props.maxSwipeDistance;this._animateTo(-e)},_animateToOpenPositionWith:function(e,n){e=e>.3?e:.3;var i=Math.abs((this.props.maxSwipeDistance-Math.abs(n))/e),t=c?-this.props.maxSwipeDistance:this.props.maxSwipeDistance;this._animateTo(-t,i)},_animateToClosedPosition:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:300;this._animateTo(0,e)},_animateToClosedPositionDuringBounce:function(){this._animateToClosedPosition(300)},_animateBounceBack:function(e){var n=c?-30:30;this._animateTo(-n,e,this._animateToClosedPositionDuringBounce)},_isValidSwipe:function(e){return Math.abs(e.dx)>10},_shouldAnimateRemainder:function(e){return Math.abs(e.dx)>this.props.swipeThreshold||e.vx>.3},_handlePanResponderEnd:function(e,n){var i=c?-n.dx:n.dx;this._isSwipingRightFromClosed(n)?(this.props.onOpen(),this._animateBounceBack(300)):this._shouldAnimateRemainder(n)?i<0?(this.props.onOpen(),this._animateToOpenPositionWith(n.vx,i)):(this.props.onClose(),this._animateToClosedPosition()):0===this._previousLeft?this._animateToClosedPosition():this._animateToOpenPosition(),this.props.onSwipeEnd()}}),m=p.create({slideOutContainer:{bottom:0,left:0,position:"absolute",right:0,top:0},swipeableContainer:{flex:1}});i.exports=_},328); __d(function(e,t,o,r){"use strict";var s=t(66),n=t(97),l=t(98),i=t(330),p=t(130),a=t(139),c=function(e){function t(){return babelHelpers.classCallCheck(this,t),babelHelpers.possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"render",value:function(){return n.createElement(b,{style:[u.tabGroup,this.props.style],unselectedTintColor:this.props.unselectedTintColor,unselectedItemTintColor:this.props.unselectedItemTintColor,tintColor:this.props.tintColor,barTintColor:this.props.barTintColor,itemPositioning:this.props.itemPositioning,translucent:!1!==this.props.translucent},this.props.children)}}]),t}(n.Component);c.Item=i,c.propTypes=babelHelpers.extends({},p.propTypes,{style:p.propTypes.style,unselectedTintColor:s,tintColor:s,unselectedItemTintColor:s,barTintColor:s,translucent:n.PropTypes.bool,itemPositioning:n.PropTypes.oneOf(["fill","center","auto"])});var u=l.create({tabGroup:{flex:1}}),b=a("RCTTabBar",c);o.exports=c},329); __d(function(e,t,s,r){"use strict";var o=t(66),l=t(219),p=t(97),n=t(314),a=t(98),c=t(130),i=t(139),b=function(e){function t(){var e,s,r,o;babelHelpers.classCallCheck(this,t);for(var l=arguments.length,p=Array(l),n=0;n=1&&(n=l.createElement(u,{style:t.style},n)),t.inputView&&(n=[n,t.inputView]),e=l.createElement(T,babelHelpers.extends({ref:this._setNativeRef},t,{children:n,onFocus:this._onFocus,onBlur:this._onBlur,onChange:this._onChange,onContentSizeChange:this.props.onContentSizeChange,onSelectionChange:this._onSelectionChange,onTextInput:this._onTextInput,onSelectionChangeShouldSetResponder:g.thatReturnsTrue,text:this._getText(),dataDetectorTypes:this.props.dataDetectorTypes,onScroll:this._onScroll}))}else e=l.createElement(x,babelHelpers.extends({ref:this._setNativeRef},t,{onFocus:this._onFocus,onBlur:this._onBlur,onChange:this._onChange,onSelectionChange:this._onSelectionChange,onSelectionChangeShouldSetResponder:g.thatReturnsTrue,text:this._getText()}));return l.createElement(f,{onLayout:t.onLayout,onPress:this._onPress,rejectResponderTermination:!0,accessible:t.accessible,accessibilityLabel:t.accessibilityLabel,accessibilityTraits:t.accessibilityTraits,testID:t.testID},e)},_renderAndroid:function(){var e=babelHelpers.extends({},this.props);e.style=[this.props.style],e.autoCapitalize=b.AndroidTextInput.Constants.AutoCapitalizationType[this.props.autoCapitalize];var t=this.props.children,n=0;l.Children.forEach(t,function(){return++n}),_(!(this.props.value&&n),"Cannot specify both value and children."),n>1&&(t=l.createElement(u,null,t)),e.selection&&null==e.selection.end&&(e.selection={start:e.selection.start,end:e.selection.start});var s=l.createElement(AndroidTextInput,babelHelpers.extends({ref:this._setNativeRef},e,{mostRecentEventCount:0,onFocus:this._onFocus,onBlur:this._onBlur,onChange:this._onChange,onSelectionChange:this._onSelectionChange,onTextInput:this._onTextInput,text:this._getText(),children:t,disableFullscreenUI:this.props.disableFullscreenUI,textBreakStrategy:this.props.textBreakStrategy}));return l.createElement(f,{onLayout:this.props.onLayout,onPress:this._onPress,accessible:this.props.accessible,accessibilityLabel:this.props.accessibilityLabel,accessibilityComponentType:this.props.accessibilityComponentType,testID:this.props.testID},s)},_onFocus:function(e){this.props.onFocus&&this.props.onFocus(e),this.props.selectionState&&this.props.selectionState.focus()},_onPress:function(e){(this.props.editable||void 0===this.props.editable)&&this.focus()},_onChange:function(e){this._inputRef&&this._inputRef.setNativeProps({mostRecentEventCount:e.nativeEvent.eventCount});var t=e.nativeEvent.text;this.props.onChange&&this.props.onChange(e),this.props.onChangeText&&this.props.onChangeText(t),this._inputRef&&(this._lastNativeText=t,this.forceUpdate())},_onSelectionChange:function(e){this.props.onSelectionChange&&this.props.onSelectionChange(e),this._inputRef&&(this._lastNativeSelection=e.nativeEvent.selection,(this.props.selection||this.props.selectionState)&&this.forceUpdate())},componentDidUpdate:function(){var e={};this._lastNativeText!==this.props.value&&"string"==typeof this.props.value&&(e.text=this.props.value);var t=this.props.selection;this._lastNativeSelection&&t&&(this._lastNativeSelection.start!==t.start||this._lastNativeSelection.end!==t.end)&&(e.selection=this.props.selection),Object.keys(e).length>0&&this._inputRef&&this._inputRef.setNativeProps(e),this.props.selectionState&&t&&this.props.selectionState.update(t.start,t.end)},_onBlur:function(e){this.blur(),this.props.onBlur&&this.props.onBlur(e),this.props.selectionState&&this.props.selectionState.blur()},_onTextInput:function(e){this.props.onTextInput&&this.props.onTextInput(e)},_onScroll:function(e){this.props.onScroll&&this.props.onScroll(e)}}),F=p.create({input:{alignSelf:"stretch"}});n.exports=m},331); __d(function(s,t,e,f){"use strict";var u=t(333),h=function(){function s(t,e){babelHelpers.classCallCheck(this,s),this._anchorOffset=t,this._focusOffset=e,this._hasFocus=!1}return babelHelpers.createClass(s,[{key:"update",value:function(s,t){this._anchorOffset===s&&this._focusOffset===t||(this._anchorOffset=s,this._focusOffset=t,this.emit("update"))}},{key:"constrainLength",value:function(s){this.update(Math.min(this._anchorOffset,s),Math.min(this._focusOffset,s))}},{key:"focus",value:function(){this._hasFocus||(this._hasFocus=!0,this.emit("focus"))}},{key:"blur",value:function(){this._hasFocus&&(this._hasFocus=!1,this.emit("blur"))}},{key:"hasFocus",value:function(){return this._hasFocus}},{key:"isCollapsed",value:function(){return this._anchorOffset===this._focusOffset}},{key:"isBackward",value:function(){return this._anchorOffset>this._focusOffset}},{key:"getAnchorOffset",value:function(){return this._hasFocus?this._anchorOffset:null}},{key:"getFocusOffset",value:function(){return this._hasFocus?this._focusOffset:null}},{key:"getStartOffset",value:function(){return this._hasFocus?Math.min(this._anchorOffset,this._focusOffset):null}},{key:"getEndOffset",value:function(){return this._hasFocus?Math.max(this._anchorOffset,this._focusOffset):null}},{key:"overlaps",value:function(s,t){return this.hasFocus()&&this.getStartOffset()<=t&&s<=this.getEndOffset()}}]),s}();u(h,{blur:!0,focus:!0,update:!0}),e.exports=h},332); __d(function(t,e,n,i){"use strict";function r(t,e){E(e,"Must supply set of valid event types");var n=t.prototype||t;E(!n.__eventEmitter,"An active emitter is already mixed in");var i=t.constructor;i&&E(i===Object||i===Function,"Mix EventEmitter into a class, not an instance"),n.hasOwnProperty(u)?v(n.__types,e):n.__types?n.__types=v({},n.__types,e):n.__types=e,v(n,c)}var s=e(102),_=e(334),o=e(335),a=e(336),v=e(337),E=e(44),d=e(305),u=d({__types:!0}),c={emit:function(t,e,n,i,r,s,_){return this.__getEventEmitter().emit(t,e,n,i,r,s,_)},emitAndHold:function(t,e,n,i,r,s,_){return this.__getEventEmitter().emitAndHold(t,e,n,i,r,s,_)},addListener:function(t,e,n){return this.__getEventEmitter().addListener(t,e,n)},once:function(t,e,n){return this.__getEventEmitter().once(t,e,n)},addRetroactiveListener:function(t,e,n){return this.__getEventEmitter().addRetroactiveListener(t,e,n)},addListenerMap:function(t,e){return this.__getEventEmitter().addListenerMap(t,e)},addRetroactiveListenerMap:function(t,e){return this.__getEventEmitter().addListenerMap(t,e)},removeAllListeners:function(){this.__getEventEmitter().removeAllListeners()},removeCurrentListener:function(){this.__getEventEmitter().removeCurrentListener()},releaseHeldEventType:function(t){this.__getEventEmitter().releaseHeldEventType(t)},__getEventEmitter:function(){if(!this.__eventEmitter){var t=new s;t=a.addValidation(t,this.__types);var e=new o;this.__eventEmitter=new _(t,e)}return this.__eventEmitter}};n.exports=r},333); __d(function(e,t,n,r){"use strict";var i=function(){function e(t,n){babelHelpers.classCallCheck(this,e),this._emitter=t,this._eventHolder=n,this._currentEventToken=null,this._emittingHeldEvents=!1}return babelHelpers.createClass(e,[{key:"addListener",value:function(e,t,n){return this._emitter.addListener(e,t,n)}},{key:"once",value:function(e,t,n){return this._emitter.once(e,t,n)}},{key:"addRetroactiveListener",value:function(e,t,n){var r=this._emitter.addListener(e,t,n);return this._emittingHeldEvents=!0,this._eventHolder.emitToListener(e,t,n),this._emittingHeldEvents=!1,r}},{key:"removeAllListeners",value:function(e){this._emitter.removeAllListeners(e)}},{key:"removeCurrentListener",value:function(){this._emitter.removeCurrentListener()}},{key:"listeners",value:function(e){return this._emitter.listeners(e)}},{key:"emit",value:function(e){for(var t,n=arguments.length,r=Array(n>1?n-1:0),i=1;i1?r-1:0),s=1;s1?r-1:0),i=1;i=a.length)break;l=a[n++]}else{if(n=a.next(),n.done)break;l=n.value}var u=l,c=babelHelpers.slicedToArray(u,2),s=c[0],f=c[1];t[s]=f()}for(var d={},b=e._fileSources,y=Array.isArray(b),_=0,b=y?b:b["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var v;if(y){if(_>=b.length)break;v=b[_++]}else{if(_=b.next(),_.done)break;v=_.value}var S=v,p=babelHelpers.slicedToArray(S,2),x=p[0],k=p[1];d[x]=k()}i("BugReporting extraData:",t);var m=r(76).BugReporting;return m&&m.setExtraData&&m.setExtraData(t,d),{extras:t,files:d}}}]),e}();u._extraSources=new l,u._fileSources=new l,u._subscription=null,t.exports=u},347); __d(function(r,e,t,n){"use strict";function a(){try{return o()}catch(r){return"Failed to dump react tree: "+r}}function o(){for(var r="",e=Object.getOwnPropertyNames(s._instancesByContainerID),t=e,n=Array.isArray(t),a=0,t=n?t:t["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var o;if(n){if(a>=t.length)break;o=t[a++]}else{if(a=t.next(),a.done)break;o=a.value}var f=o,u=s._instancesByContainerID[f];r+="============ Root ID: "+f+" ============\n",r+=i(u,0),r+="============ End root ID: "+f+" ============\n"}return r}function i(r,e){var t=p(r);if("Text"===t.nodeType)return l(e)+t.text+"\n";if("Empty"===t.nodeType)return"";var n=l(e)+"<"+t.name;if("Composite"===t.nodeType)for(var a=Object.getOwnPropertyNames(t.props||{}),o=Array.isArray(a),u=0,a=o?a:a["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var y;if(o){if(u>=a.length)break;y=a[u++]}else{if(u=a.next(),u.done)break;y=u.value}var s=y;if(f(s))try{var b=c(t.props[s]);b&&(n+=" "+s+"="+b)}catch(r){var v="[Failed to get property: "+r+"]";n+=" "+s+"="+v}}for(var d="",m=t.children||[],g=Array.isArray(m),h=0,m=g?m:m["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var S;if(g){if(h>=m.length)break;S=m[h++]}else{if(h=m.next(),h.done)break;S=h.value}d+=i(S,e+1)}return n+=d?">\n"+d+l(e)+"\n":" />\n"}function f(r){switch(r){case"children":case"key":case"ref":return!1;default:return!0}}function u(r,e){if(e>=v)return"[...omitted]";for(var t="{",n=!0,a=Object.getOwnPropertyNames(r),o=Array.isArray(a),i=0,a=o?a:a["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var f;if(o){if(i>=a.length)break;f=a[i++]}else{if(i=a.next(),i.done)break;f=i.value}var u=f;n||(t+=", "),t+=u+": "+c(r[u],e+1),n=!1}return t+"}"}function c(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!r)return null;switch(typeof r){case"string":return JSON.stringify(y(r).replace("\n","\\n"));case"boolean":case"number":return JSON.stringify(r);case"function":return"[function]";case"object":return u(r,e);default:return null}}function y(r){return r.length>d?r.slice(0,d)+"...":r}function l(r){return" ".repeat(r*b)}var s=e(271),p=e(349),b=2,v=2,d=50;t.exports=a},348); __d(function(e,n,t,r){"use strict";function l(e){var n=null,t=null,r=null,l=null,c=null,d=null,s=null,i=null,_=null,m="Native";if("object"!=typeof e?(m="Text",i=e+""):null===e._currentElement||!1===e._currentElement?m="Empty":e._renderedComponent?(m="NativeWrapper",n=[e._renderedComponent],t=e._instance.props,r=e._instance.state,(l=e._instance.context)&&0===Object.keys(l).length&&(l=null)):e._renderedChildren?n=a(e._renderedChildren):e._currentElement&&e._currentElement.props&&(n=e._currentElement.props.children),!t&&e._currentElement&&e._currentElement.props&&(t=e._currentElement.props),null!=e._currentElement&&(s=e._currentElement.type,"string"==typeof s?d=s:e.getName?(m="Composite",d=e.getName(),e._renderedComponent&&e._currentElement.props===e._renderedComponent._currentElement&&(m="Wrapper"),null===d&&(d="No display name")):e._stringText?(m="Text",i=e._stringText):d=s.displayName||s.name||"Unknown"),e._instance){var f=e._instance;c={setState:f.setState&&f.setState.bind(f),forceUpdate:f.forceUpdate&&f.forceUpdate.bind(f),setInProps:f.forceUpdate&&p.bind(null,e),setInState:f.forceUpdate&&o.bind(null,f),setInContext:f.forceUpdate&&u.bind(null,f)},_=f,f._renderedChildren&&(n=a(f._renderedChildren))}return{nodeType:m,type:s,name:d,props:t,state:r,context:l,children:n,text:i,updater:c,publicInstance:_}}function p(e,n,t){var r=e._currentElement;e._currentElement=babelHelpers.extends({},r,{props:s(r.props,n,t)}),e._instance.forceUpdate()}function o(e,n,t){c(e.state,n,t),e.forceUpdate()}function u(e,n,t){c(e.context,n,t),e.forceUpdate()}function c(e,n,t){var r=n.pop(),l=n.reduce(function(e,n){return e?e[n]:null},e);l&&(l[r]=t)}function a(e){var n=[];for(var t in e)n.push(e[t]);return n}function d(e,n,t,r){if(t>=n.length)return r;var l=n[t],p=Array.isArray(e)?e.slice():babelHelpers.extends({},e);return p[l]=d(e[l],n,t+1,r),p}function s(e,n,t){return d(e,n,0,t)}t.exports=l},349); __d(function(e,t,a,o){"use strict";function r(e,t,a){d(a,"Expect to have a valid rootTag, instead got ",a),s.render(c.createElement(n,{rootTag:a},c.createElement(e,babelHelpers.extends({},t,{rootTag:a}))),a)}var n=t(292),c=t(97),s=t(223),d=t(44);t(351),a.exports=r},350); __d(function(e,t,n,r){"use strict";function i(){}var o={exitApp:i,addEventListener:function(){return{remove:i}},removeEventListener:i};n.exports=o},351); __d(function(e,t,n,u){"use strict";function r(e){return e?(Array.isArray(e)?e:[e]).map(function(e){return i(e)}):null}function i(e){if(!e)return null;var t=new Error(e.message);return t.key=e.key,t}var l=t(76),o=l.AsyncSQLiteDBStorage,s=l.AsyncRocksDBStorage,c=l.AsyncLocalStorage,m=s||o||c,f={_getRequests:[],_getKeys:[],_immediate:null,getItem:function(e,t){return new Promise(function(n,u){m.multiGet([e],function(e,i){var l=i&&i[0]&&i[0][1]?i[0][1]:null,o=r(e);t&&t(o&&o[0],l),o?u(o[0]):n(l)})})},setItem:function(e,t,n){return new Promise(function(u,i){m.multiSet([[e,t]],function(e){var t=r(e);n&&n(t&&t[0]),t?i(t[0]):u(null)})})},removeItem:function(e,t){return new Promise(function(n,u){m.multiRemove([e],function(e){var i=r(e);t&&t(i&&i[0]),i?u(i[0]):n(null)})})},mergeItem:function(e,t,n){return new Promise(function(u,i){m.multiMerge([[e,t]],function(e){var t=r(e);n&&n(t&&t[0]),t?i(t[0]):u(null)})})},clear:function(e){return new Promise(function(t,n){m.clear(function(u){e&&e(i(u)),u&&i(u)?n(i(u)):t(null)})})},getAllKeys:function(e){return new Promise(function(t,n){m.getAllKeys(function(u,r){e&&e(i(u),r),u?n(i(u)):t(r)})})},flushGetRequests:function(){var e=this._getRequests,t=this._getKeys;this._getRequests=[],this._getKeys=[],m.multiGet(t,function(t,n){var u={};n&&n.forEach(function(e){var t=babelHelpers.slicedToArray(e,2),n=t[0],r=t[1];return u[n]=r,r});for(var r=e.length,i=0;i=0&&(s="video"),t.saveToCameraRoll(e,s)}},{key:"getPhotos",value:function(e){if(arguments.length>1){console.warn("CameraRoll.getPhotos(tag, success, error) is deprecated. Use the returned Promise instead");var r=arguments[1],s=arguments[2]||function(){};t.getPhotos(e).then(r,s)}return t.getPhotos(e)}}]),e}());m.GroupTypesOptions=l,m.AssetTypeOptions=d,s.exports=m},353); __d(function(t,n,r,i){"use strict";var e=n(76).Clipboard;r.exports={getString:function(){return e.getString()},setString:function(t){e.setString(t)}}},354); __d(function(e,r,t,n){"use strict";var s={open:function(e){return regeneratorRuntime.async(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.reject({message:"DatePickerAndroid is not supported on this platform."}));case 1:case"end":return e.stop()}},null,this)}};t.exports=s},355); __d(function(e,n,o,a){"use strict";var r=n(76).ImagePickerIOS,t={canRecordVideos:function(e){return r.canRecordVideos(e)},canUseCamera:function(e){return r.canUseCamera(e)},openCameraDialog:function(e,n,o){return e=babelHelpers.extends({videoMode:!1},e),r.openCameraDialog(e,n,o)},openSelectDialog:function(e,n,o){return e=babelHelpers.extends({showImages:!0,showVideos:!1},e),r.openSelectDialog(e,n,o)}};o.exports=t},356); __d(function(e,t,n,i){"use strict";var a=t(107),r=t(76),s=(t(75),t(44)),l=r.LinkingManager,o=function(e){function t(){return babelHelpers.classCallCheck(this,t),babelHelpers.possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,l))}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"addEventListener",value:function(e,t){this.addListener(e,t)}},{key:"removeEventListener",value:function(e,t){this.removeListener(e,t)}},{key:"openURL",value:function(e){return this._validateURL(e),l.openURL(e)}},{key:"canOpenURL",value:function(e){return this._validateURL(e),l.canOpenURL(e)}},{key:"getInitialURL",value:function(){return l.getInitialURL()}},{key:"_validateURL",value:function(e){s("string"==typeof e,"Invalid URL: should be a string. Was: "+e),s(e,"Invalid URL: cannot be empty")}}]),t}(a);n.exports=new o},357); __d(function(r,t,a,e){"use strict";var s=t(359),i=t(368),d=t(371),n=t(367),o=t(378),c=t(369),p={StateUtils:o,Transitioner:c,Card:s,CardStack:i,Header:d,PropTypes:n};a.exports=p},358); __d(function(e,r,t,n){"use strict";var o=r(201),a=r(360),s=r(362),p=r(363),i=r(364),l=r(365),c=r(367),d=r(97),b=r(98),u=d.PropTypes,h=function(e){function r(){return babelHelpers.classCallCheck(this,r),babelHelpers.possibleConstructorReturn(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return babelHelpers.inherits(r,e),babelHelpers.createClass(r,[{key:"render",value:function(){var e=this.props,r=e.panHandlers,t=e.pointerEvents,n=e.renderScene,p=e.style,i=babelHelpers.objectWithoutProperties(e,["panHandlers","pointerEvents","renderScene","style"]),l=void 0===p?s.forHorizontal(i):p,c=void 0===r?a.forHorizontal(babelHelpers.extends({},i,{onNavigateBack:this.props.onNavigateBack})):r;return d.createElement(o.View,babelHelpers.extends({},c,{pointerEvents:t,ref:this.props.onComponentRef,style:[f.main,l]}),n(i))}}]),r}(d.Component);h.propTypes=babelHelpers.extends({},c.SceneRendererProps,{onComponentRef:u.func.isRequired,onNavigateBack:u.func,panHandlers:c.panHandlers,pointerEvents:u.string.isRequired,renderScene:u.func.isRequired,style:u.any});var f=b.create({main:{backgroundColor:"#E9E9EF",bottom:0,left:0,position:"absolute",right:0,shadowColor:"black",shadowOffset:{width:0,height:0},shadowOpacity:.4,shadowRadius:10,top:0}});h=l.create(h),h.CardStackPanResponder=a,h.CardStackStyleInterpolator=s,h.PagerPanResponder=p,h.PagerStyleInterpolator=i,t.exports=h},359); __d(function(e,t,i,n){"use strict";function s(e,t){return new c(e,t).panHandlers}function a(e){return s(d.HORIZONTAL,e)}function o(e){return s(d.VERTICAL,e)}var r=t(201),_=t(293),u=t(361),l=t(311),p=function(){},d={HORIZONTAL:"horizontal",VERTICAL:"vertical"},c=function(e){function t(e,i){babelHelpers.classCallCheck(this,t);var n=babelHelpers.possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n._isResponding=!1,n._isVertical=e===d.VERTICAL,n._props=i,n._startValue=0,n._addNativeListener(n._props.layout.width),n._addNativeListener(n._props.layout.height),n._addNativeListener(n._props.position),n}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"onMoveShouldSetPanResponder",value:function(e,t){var i=this._props;if(i.navigationState.index!==i.scene.index)return!1;var n=i.layout,s=this._isVertical,a=i.navigationState.index,o=t[s?"dy":"dx"],r=t[s?"moveY":"moveX"],_=s?n.height.__getValue():n.width.__getValue(),u=s?i.gestureResponseDistance:i.gestureResponseDistance||30;return!(null!=u&&r>u)&&(Math.abs(o)>15&&_>0&&a>0)}},{key:"onPanResponderGrant",value:function(){var e=this;this._isResponding=!1,this._props.position.stopAnimation(function(t){e._isResponding=!0,e._startValue=t})}},{key:"onPanResponderMove",value:function(e,t){if(this._isResponding){var i=this._props,n=i.layout,s=this._isVertical,a=s?"dy":"dx",o=i.navigationState.index,r=s?n.height.__getValue():n.width.__getValue(),u=_.isRTL&&"dx"===a?this._startValue+t[a]/r:this._startValue-t[a]/r,p=l(o-1,u,o);i.position.setValue(p)}}},{key:"onPanResponderRelease",value:function(e,t){var i=this;if(this._isResponding){this._isResponding=!1;var n=this._props,s=this._isVertical,a=s?"dy":"dx",o=n.navigationState.index,r=_.isRTL&&"dx"===a?-t[a]:t[a];n.position.stopAnimation(function(e){i._reset(),n.onNavigateBack&&(r>100||e<=o-.3333333333333333)&&n.onNavigateBack()})}}},{key:"onPanResponderTerminate",value:function(){this._isResponding=!1,this._reset()}},{key:"_reset",value:function(){var e=this._props;r.timing(e.position,{toValue:e.navigationState.index,duration:250,useNativeDriver:e.position.__isNative}).start()}},{key:"_addNativeListener",value:function(e){e.__isNative&&0===Object.keys(e._listeners).length&&e.addListener(p)}}]),t}(u);i.exports={ANIMATION_DURATION:250,DISTANCE_THRESHOLD:100,POSITION_THRESHOLD:.3333333333333333,RESPOND_THRESHOLD:15,Directions:d,forHorizontal:a,forVertical:o}},360); __d(function(n,e,a,s){"use strict";var o=e(309),t=e(44),l={onMoveShouldSetPanResponder:null,onPanResponderGrant:null,onPanResponderMove:null,onPanResponderRelease:null,onPanResponderTerminate:null},r=function n(){var e=this;babelHelpers.classCallCheck(this,n);var a={};Object.keys(l).forEach(function(n){var s=e[n];t("function"==typeof s,"subclass of `NavigationAbstractPanResponder` must implement method %s",n),a[n]=s.bind(e)},this),this.panHandlers=o.create(a).panHandlers};a.exports=r},361); __d(function(t,n,e,a){"use strict";function i(t){var n=t.navigationState,e=t.scene,a=n.index===e.index,i=a?1:0,r=a?0:1e6;return{opacity:i,transform:[{translateX:r},{translateY:r}]}}function r(t){var n=t.layout,e=t.position,a=t.scene;if(!n.isMeasured)return i(t);var r=a.index,o=[r-1,r,r+.99,r+1],u=n.initWidth,p=s.isRTL?[-u,0,10,10]:[u,0,-10,-10];return{opacity:e.interpolate({inputRange:o,outputRange:[1,1,.3,0]}),transform:[{scale:e.interpolate({inputRange:o,outputRange:[1,1,.95,.95]})},{translateX:e.interpolate({inputRange:o,outputRange:p})},{translateY:0}]}}function o(t){var n=t.layout,e=t.position,a=t.scene;if(!n.isMeasured)return i(t);var r=a.index,o=[r-1,r,r+.99,r+1],u=n.initHeight;return{opacity:e.interpolate({inputRange:o,outputRange:[1,1,.3,0]}),transform:[{scale:e.interpolate({inputRange:o,outputRange:[1,1,.95,.95]})},{translateX:0},{translateY:e.interpolate({inputRange:o,outputRange:[u,0,-10,-10]})}]}}function u(t){return!0}var s=n(293);e.exports={forHorizontal:r,forVertical:o,canUseNativeDriver:u}},362); __d(function(t,e,i,n){"use strict";function s(t,e){return new v(t,e).panHandlers}function a(t){return s(c.HORIZONTAL,t)}var o=e(201),r=e(361),u=e(360),l=e(293),_=e(311),p=u.ANIMATION_DURATION,d=u.POSITION_THRESHOLD,h=u.RESPOND_THRESHOLD,c=u.Directions,v=function(t){function e(t,i){babelHelpers.classCallCheck(this,e);var n=babelHelpers.possibleConstructorReturn(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return n._isResponding=!1,n._isVertical=t===c.VERTICAL,n._props=i,n._startValue=0,n}return babelHelpers.inherits(e,t),babelHelpers.createClass(e,[{key:"onMoveShouldSetPanResponder",value:function(t,e){var i=this._props;if(i.navigationState.index!==i.scene.index)return!1;var n=i.layout,s=this._isVertical,a=s?"dy":"dx",o=i.navigationState.index,r=s?n.height.__getValue():n.width.__getValue();return Math.abs(e[a])>h&&r>0&&o>=0}},{key:"onPanResponderGrant",value:function(){var t=this;this._isResponding=!1,this._props.position.stopAnimation(function(e){t._isResponding=!0,t._startValue=e})}},{key:"onPanResponderMove",value:function(t,e){if(this._isResponding){var i=this._props,n=i.layout,s=i.navigationState,a=i.position,o=i.scenes,r=this._isVertical,u=r?"dy":"dx",p=s.index,d=r?n.height.__getValue():n.width.__getValue(),h=l.isRTL&&"dx"===u?this._startValue+e[u]/d:this._startValue-e[u]/d,c=Math.max(0,p-1),v=Math.min(p+1,o.length-1),g=_(c,h,v);a.setValue(g)}}},{key:"onPanResponderRelease",value:function(t,e){var i=this;if(this._isResponding){this._isResponding=!1;var n=this._props,s=n.navigationState,a=n.onNavigateBack,o=n.onNavigateForward,r=n.position,u=this._isVertical,_=u?"dy":"dx",p=u?"vy":"vx",h=s.index,c=l.isRTL&&"dx"===_?-e[_]:e[_],v=l.isRTL&&"vx"===p?-e[p]:e[p];r.stopAnimation(function(t){if(i._reset(),c>50||t<=h-d||v>1.5)return void(a&&a());(c<-50||t>=h+d||v<-1.5)&&o&&o()})}}},{key:"onPanResponderTerminate",value:function(){this._isResponding=!1,this._reset()}},{key:"_reset",value:function(){var t=this._props;o.timing(t.position,{toValue:t.navigationState.index,duration:p}).start()}}]),e}(r);i.exports={forHorizontal:a}},363); __d(function(t,n,a,e){"use strict";function r(t){var n=t.navigationState,a=t.scene,e=n.index===a.index,r=e?1:0,i=a.index>n.index?1:-1,o=e?0:1e6*i;return{opacity:r,transform:[{translateX:o},{translateY:o}]}}function i(t){var n=t.layout,a=t.position,e=t.scene;if(!n.isMeasured)return r(t);var i=e.index,s=[i-1,i,i+1],u=n.initWidth,d=o.isRTL?[-u,0,u]:[u,0,-u];return{opacity:1,shadowColor:"transparent",shadowRadius:0,transform:[{scale:1},{translateX:a.interpolate({inputRange:s,outputRange:d})},{translateY:0}]}}var o=n(293);a.exports={forHorizontal:i}},364); __d(function(e,t,n,o){"use strict";function i(e){return function(t){function n(e,t){babelHelpers.classCallCheck(this,n);var o=babelHelpers.possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t));return o._pointerEvents=o._computePointerEvents(),o}return babelHelpers.inherits(n,t),babelHelpers.createClass(n,[{key:"componentWillMount",value:function(){this._onPositionChange=this._onPositionChange.bind(this),this._onComponentRef=this._onComponentRef.bind(this)}},{key:"componentDidMount",value:function(){this._bindPosition(this.props)}},{key:"componentWillUnmount",value:function(){this._positionListener&&this._positionListener.remove()}},{key:"componentWillReceiveProps",value:function(e){this._bindPosition(e)}},{key:"render",value:function(){return this._pointerEvents=this._computePointerEvents(),s.createElement(e,babelHelpers.extends({},this.props,{pointerEvents:this._pointerEvents,onComponentRef:this._onComponentRef}))}},{key:"_onComponentRef",value:function(e){this._component=e,e&&p("function"==typeof e.setNativeProps,"component must implement method `setNativeProps`")}},{key:"_bindPosition",value:function(e){this._positionListener&&this._positionListener.remove(),this._positionListener=new r(e.position,this._onPositionChange)}},{key:"_onPositionChange",value:function(){if(this._component){var e=this._computePointerEvents();this._pointerEvents!==e&&(this._pointerEvents=e,this._component.setNativeProps({pointerEvents:e}))}}},{key:"_computePointerEvents",value:function(){var e=this.props,t=e.navigationState,n=e.position,o=e.scene;if(o.isStale||t.index!==o.index)return o.index>t.index?"box-only":"none";var i=n.__getAnimatedValue()-t.index;return Math.abs(i)>a?"box-only":"auto"}}]),n}(s.Component)}var s=t(97),r=t(366),p=t(44),a=.01;n.exports={create:i}},365); __d(function(e,t,s,n){"use strict";var i=function(){function e(t,s){babelHelpers.classCallCheck(this,e),this._value=t,this._token=t.addListener(s)}return babelHelpers.createClass(e,[{key:"remove",value:function(){this._value.removeListener(this._token)}}]),e}();s.exports=i},366); __d(function(e,i,n,r){"use strict";function s(e){return{layout:e.layout,navigationState:e.navigationState,position:e.position,progress:e.progress,scene:e.scene,scenes:e.scenes}}var o=i(201),u=i(97),t=u.PropTypes,d=t.shape({type:t.string.isRequired}),R=t.instanceOf(o.Value),a=t.shape({key:t.string.isRequired}),p=t.shape({index:t.number.isRequired,routes:t.arrayOf(a)}),q=t.shape({height:R,initHeight:t.number.isRequired,initWidth:t.number.isRequired,isMeasured:t.bool.isRequired,width:R}),c=t.shape({index:t.number.isRequired,isActive:t.bool.isRequired,isStale:t.bool.isRequired,key:t.string.isRequired,route:a.isRequired}),S={layout:q.isRequired,navigationState:p.isRequired,position:R.isRequired,progress:R.isRequired,scene:c.isRequired,scenes:t.arrayOf(c).isRequired},f=t.shape(S),h=t.shape({onMoveShouldSetResponder:t.func.isRequired,onMoveShouldSetResponderCapture:t.func.isRequired,onResponderEnd:t.func.isRequired,onResponderGrant:t.func.isRequired,onResponderMove:t.func.isRequired,onResponderReject:t.func.isRequired,onResponderRelease:t.func.isRequired,onResponderStart:t.func.isRequired,onResponderTerminate:t.func.isRequired,onResponderTerminationRequest:t.func.isRequired,onStartShouldSetResponder:t.func.isRequired,onStartShouldSetResponderCapture:t.func.isRequired});n.exports={extractSceneRendererProps:s,SceneRendererProps:S,SceneRenderer:f,action:d,navigationState:p,navigationRoute:a,panHandlers:h}},367); __d(function(e,r,t,n){"use strict";var s=r(76).NativeAnimatedModule,i=r(359),a=r(360),o=r(362),l=r(367),c=r(369),p=r(97),u=r(98),d=r(130),f=p.PropTypes,v=a.Directions,y=function(e){function r(e,t){babelHelpers.classCallCheck(this,r);var n=babelHelpers.possibleConstructorReturn(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t));return n._configureTransition=function(){var e="vertical"===n.props.direction,r={};return s&&!n.props.enableGestures&&o.canUseNativeDriver(e)&&(r.useNativeDriver=!0),r},n}return babelHelpers.inherits(r,e),babelHelpers.createClass(r,[{key:"componentWillMount",value:function(){this._render=this._render.bind(this),this._renderScene=this._renderScene.bind(this)}},{key:"render",value:function(){return p.createElement(c,{configureTransition:this._configureTransition,navigationState:this.props.navigationState,render:this._render,style:this.props.style})}},{key:"_render",value:function(e){var r=this,t=this.props.renderHeader,n=t?p.createElement(d,null,t(e)):null,s=e.scenes.map(function(t){return r._renderScene(babelHelpers.extends({},e,{scene:t}))});return p.createElement(d,{style:h.container},p.createElement(d,{style:[h.scenes,this.props.scenesStyle]},s),n)}},{key:"_renderScene",value:function(e){var r="vertical"===this.props.direction,t=this.props.cardStyleInterpolator||(r?o.forVertical:o.forHorizontal),n=t(e),s=null;if(this.props.enableGestures){var l=babelHelpers.extends({},e,{onNavigateBack:this.props.onNavigateBack,gestureResponseDistance:this.props.gestureResponseDistance});s=r?a.forVertical(l):a.forHorizontal(l)}return p.createElement(i,babelHelpers.extends({},e,{key:"card_"+e.scene.key,panHandlers:s,renderScene:this.props.renderScene,style:[n,this.props.cardStyle]}))}}]),r}(p.Component);y.propTypes={cardStyle:f.any,direction:f.oneOf([v.HORIZONTAL,v.VERTICAL]),gestureResponseDistance:f.number,cardStyleInterpolator:f.func,enableGestures:f.bool,navigationState:l.navigationState.isRequired,onNavigateBack:f.func,renderHeader:f.func,renderScene:f.func.isRequired,style:d.propTypes.style,scenesStyle:d.propTypes.style},y.defaultProps={direction:v.HORIZONTAL,enableGestures:!0};var h=u.create({container:{flex:1,flexDirection:"column-reverse"},scenes:{flex:1}});t.exports=y},368); __d(function(t,i,n,e){"use strict";function s(t,i){var n=t.navigationState,e=i.layout,s=i.position,o=i.progress,r=i.scenes,p=r.find(a);return d(p,"No active scene when building navigation transition props."),{layout:e,navigationState:n,position:s,progress:o,scenes:r,scene:p}}function o(t){return!t.isStale}function a(t){return t.isActive}var r=i(201),p=i(217),u=i(367),l=i(370),h=i(97),c=i(98),v=i(130),d=i(44),_=h.PropTypes,g={duration:250,easing:p.inOut(p.ease),timing:r.timing},f=function(t){function i(t,n){babelHelpers.classCallCheck(this,i);var e=babelHelpers.possibleConstructorReturn(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,t,n)),o={height:new r.Value(0),initHeight:0,initWidth:0,isMeasured:!1,width:new r.Value(0)};return e.state={layout:o,position:new r.Value(e.props.navigationState.index),progress:new r.Value(1),scenes:l([],e.props.navigationState)},e._prevTransitionProps=null,e._transitionProps=s(t,e.state),e._isMounted=!1,e}return babelHelpers.inherits(i,t),babelHelpers.createClass(i,[{key:"componentWillMount",value:function(){this._onLayout=this._onLayout.bind(this),this._onTransitionEnd=this._onTransitionEnd.bind(this)}},{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1}},{key:"componentWillReceiveProps",value:function(t){var i=this,n=l(this.state.scenes,t.navigationState,this.props.navigationState);if(n!==this.state.scenes){var e=babelHelpers.extends({},this.state,{scenes:n}),o=e.position,a=e.progress;a.setValue(0),this._prevTransitionProps=this._transitionProps,this._transitionProps=s(t,e);var p=t.configureTransition?t.configureTransition(this._transitionProps,this._prevTransitionProps):null,u=babelHelpers.extends({},g,p),h=u.timing;delete u.timing;var c=[h(a,babelHelpers.extends({},u,{toValue:1}))];t.navigationState.index!==this.props.navigationState.index&&c.push(h(o,babelHelpers.extends({},u,{toValue:t.navigationState.index}))),this.setState(e,function(){t.onTransitionStart&&t.onTransitionStart(i._transitionProps,i._prevTransitionProps),r.parallel(c).start(i._onTransitionEnd)})}}},{key:"render",value:function(){return h.createElement(v,{onLayout:this._onLayout,style:[b.main,this.props.style]},this.props.render(this._transitionProps,this._prevTransitionProps))}},{key:"_onLayout",value:function(t){var i=t.nativeEvent.layout,n=i.height,e=i.width;if(this.state.layout.initWidth!==e||this.state.layout.initHeight!==n){var o=babelHelpers.extends({},this.state.layout,{initHeight:n,initWidth:e,isMeasured:!0});o.height.setValue(n),o.width.setValue(e);var a=babelHelpers.extends({},this.state,{layout:o});this._transitionProps=s(this.props,a),this.setState(a)}}},{key:"_onTransitionEnd",value:function(){var t=this;if(this._isMounted){var i=this._prevTransitionProps;this._prevTransitionProps=null;var n=babelHelpers.extends({},this.state,{scenes:this.state.scenes.filter(o)});this._transitionProps=s(this.props,n),this.setState(n,function(){t.props.onTransitionEnd&&t.props.onTransitionEnd(t._transitionProps,i)})}}}]),i}(h.Component);f.propTypes={configureTransition:_.func,navigationState:u.navigationState.isRequired,onTransitionEnd:_.func,onTransitionStart:_.func,render:_.func.isRequired};var b=c.create({main:{flex:1}});n.exports=f},369); __d(function(e,t,n,i){"use strict";function r(e,t){var n=e.length-t.length;return n>0?1:n<0?-1:e>t?1:-1}function a(e,t){return e.index>t.index?1:e.index2)return null;var c=babelHelpers.extends({},e,{onNavigateBack:this.props.onNavigateBack}),d=n(c);if(null===d)return null;var f=0!==u||s?"none":"box-none";return l.createElement(h.View,{pointerEvents:f,key:t+"_"+p,style:[m[t],{marginTop:this.props.statusBarHeight},r(e)]},d)}}]),t}(l.Component);v.defaultProps={renderTitleComponent:function(e){var t=String(e.scene.route.title||"");return l.createElement(a,null,t)},renderLeftComponent:function(e){return 0!==e.scene.index&&e.onNavigateBack?l.createElement(o,{onPress:e.onNavigateBack}):null},renderRightComponent:function(e){return null},statusBarHeight:20},v.propTypes=babelHelpers.extends({},s.SceneRendererProps,{onNavigateBack:b.func,renderLeftComponent:b.func,renderRightComponent:b.func,renderTitleComponent:b.func,style:f.propTypes.style,statusBarHeight:b.number,viewProps:b.shape(f.propTypes)}),v.HEIGHT=64,v.Title=a,v.BackButton=o;var m=d.create({appbar:{alignItems:"center",backgroundColor:"#EFEFF2",borderBottomColor:"rgba(0, 0, 0, .15)",borderBottomWidth:d.hairlineWidth,elevation:4,flexDirection:"row",justifyContent:"flex-start"},title:{bottom:0,left:44,position:"absolute",right:44,top:0},left:{bottom:0,left:0,position:"absolute",top:0},right:{bottom:0,position:"absolute",right:0,top:0}});n.exports=v},371); __d(function(e,t,n,r){"use strict";var o=t(34),s=t(64),a=s.I18nManager,i=s.Image,c=(s.Platform,s.StyleSheet),l=s.TouchableOpacity,u=function(e){return o.createElement(l,{style:[y.buttonContainer,e.style],onPress:e.onPress},o.createElement(i,{style:[y.button,e.imageStyle],source:t(373)}))};u.propTypes={onPress:o.PropTypes.func.isRequired};var y=c.create({buttonContainer:{flex:1,flexDirection:"row",alignItems:"center",justifyContent:"center"},button:{height:24,width:24,margin:10,resizeMode:"contain",transform:[{scaleX:a.isRTL?-1:1}]}});n.exports=u},372); __d(function(e,s,t,a){t.exports=s(181).registerAsset({__packager_asset:!0,httpServerLocation:"/assets/node_modules/react-native/Libraries/CustomComponents/NavigationExperimental/assets",width:24,height:24,scales:[1,1.5,2,3,4],hash:"40cb2e3978cf9a18d3566dab9deded67",name:"back-icon",type:"png"})},373); __d(function(t,n,e,i){"use strict";function o(t){var n=t.position,e=t.scene,i=e.index;return{opacity:n.interpolate({inputRange:[i-1,i,i+1],outputRange:[0,1,0]})}}function r(t){var n=t.position,e=t.scene,i=e.index;return{opacity:n.interpolate({inputRange:[i-1,i,i+1],outputRange:[0,1,0]}),transform:[{translateX:n.interpolate({inputRange:[i-1,i+1],outputRange:u.isRTL?[-200,200]:[200,-200]})}]}}function a(t){var n=t.position,e=t.scene,i=e.index;return{opacity:n.interpolate({inputRange:[i-1,i,i+1],outputRange:[0,1,0]})}}var u=n(293);e.exports={forCenter:r,forLeft:o,forRight:a}},374); __d(function(e,t,l,r){"use strict";var i=t(34),n=t(64),o=(n.Platform,n.StyleSheet),s=n.View,p=n.Text,y=function(e){var t=e.children,l=e.style,r=e.textStyle,n=e.viewProps;return i.createElement(s,babelHelpers.extends({style:[c.title,l]},n),i.createElement(p,{style:[c.titleText,r]},t))},c=o.create({title:{flex:1,flexDirection:"row",alignItems:"center",marginHorizontal:16},titleText:{flex:1,fontSize:18,fontWeight:"500",color:"rgba(0, 0, 0, .9)",textAlign:"center"}});y.propTypes={children:i.PropTypes.node.isRequired,style:s.propTypes.style,textStyle:p.propTypes.style},l.exports=y},375); __d(function(t,n,o,e){"use strict";var r=n(377),s={shouldComponentUpdate:function(t,n){return r(this,t,n)}};o.exports=s},376); __d(function(t,r,n,s){"use strict";function e(t,r,n){return!o(t.props,r)||!o(t.state,n)}var o=r(168);n.exports=e},377); __d(function(e,n,r,t){"use strict";var u=n(44),i={get:function(e,n){return e.routes.find(function(e){return e.key===n})||null},indexOf:function(e,n){return e.routes.map(function(e){return e.key}).indexOf(n)},has:function(e,n){return!!e.routes.some(function(e){return e.key===n})},push:function(e,n){u(-1===i.indexOf(e,n.key),"should not push route with duplicated key %s",n.key);var r=e.routes.slice();return r.push(n),babelHelpers.extends({},e,{index:r.length-1,routes:r})},pop:function(e){if(e.index<=0)return e;var n=e.routes.slice(0,-1);return babelHelpers.extends({},e,{index:n.length-1,routes:n})},jumpToIndex:function(e,n){return n===e.index?e:(u(!!e.routes[n],"invalid index %s to jump to",n),babelHelpers.extends({},e,{index:n}))},jumpTo:function(e,n){var r=i.indexOf(e,n);return i.jumpToIndex(e,r)},back:function(e){var n=e.index-1;return e.routes[n]?i.jumpToIndex(e,n):e},forward:function(e){var n=e.index+1;return e.routes[n]?i.jumpToIndex(e,n):e},replaceAt:function(e,n,r){var t=i.indexOf(e,n);return i.replaceAtIndex(e,t,r)},replaceAtIndex:function(e,n,r){if(u(!!e.routes[n],"invalid index %s for replacing route %s",n,r.key),e.routes[n]===r)return e;var t=e.routes.slice();return t[n]=r,babelHelpers.extends({},e,{index:n,routes:t})},reset:function(e,n,r){u(n.length&&Array.isArray(n),"invalid routes to replace");var t=void 0===r?n.length-1:r;if(e.routes.length===n.length&&e.index===t){var i=function(e,r){return n[r]===e};if(e.routes.every(i))return e}return u(!!n[t],"invalid index %s to reset",t),babelHelpers.extends({},e,{index:t,routes:n})}};r.exports=i},378); __d(function(e,n,t,r){"use strict";var o=n(205),i=n(107),u=n(76),v=(n(75),u.NetInfo),c=new i(v),f=new o,s=void 0;s=function(e){return"none"!==e&&"unknown"!==e};var d=new o,a={addEventListener:function(e,n){var t=c.addListener("networkStatusDidChange",function(e){n(e.network_info)});return f.set(n,t),{remove:function(){return a.removeEventListener(e,n)}}},removeEventListener:function(e,n){var t=f.get(n);t&&(t.remove(),f.delete(n))},fetch:function(){return v.getCurrentConnectivity().then(function(e){return e.network_info})},isConnected:{addEventListener:function(e,n){var t=function(e){n(s(e))};return d.set(n,t),a.addEventListener(e,t),{remove:function(){return a.isConnected.removeEventListener(e,n)}}},removeEventListener:function(e,n){var t=d.get(n);a.removeEventListener(e,t),d.delete(n)},fetch:function(){return a.fetch().then(function(e){return s(e)})}},isConnectionExpensive:function(){return Promise.reject(new Error("Currently not supported on iOS"))}};t.exports=a},379); __d(function(e,r,i,n){"use strict";var s=r(76).DialogManagerAndroid,o=r(76).PermissionsAndroid,E=function(){function e(){babelHelpers.classCallCheck(this,e),this.PERMISSIONS={READ_CALENDAR:"android.permission.READ_CALENDAR",WRITE_CALENDAR:"android.permission.WRITE_CALENDAR",CAMERA:"android.permission.CAMERA",READ_CONTACTS:"android.permission.READ_CONTACTS",WRITE_CONTACTS:"android.permission.WRITE_CONTACTS",GET_ACCOUNTS:"android.permission.GET_ACCOUNTS",ACCESS_FINE_LOCATION:"android.permission.ACCESS_FINE_LOCATION",ACCESS_COARSE_LOCATION:"android.permission.ACCESS_COARSE_LOCATION",RECORD_AUDIO:"android.permission.RECORD_AUDIO",READ_PHONE_STATE:"android.permission.READ_PHONE_STATE",CALL_PHONE:"android.permission.CALL_PHONE",READ_CALL_LOG:"android.permission.READ_CALL_LOG",WRITE_CALL_LOG:"android.permission.WRITE_CALL_LOG",ADD_VOICEMAIL:"com.android.voicemail.permission.ADD_VOICEMAIL",USE_SIP:"android.permission.USE_SIP",PROCESS_OUTGOING_CALLS:"android.permission.PROCESS_OUTGOING_CALLS",BODY_SENSORS:"android.permission.BODY_SENSORS",SEND_SMS:"android.permission.SEND_SMS",RECEIVE_SMS:"android.permission.RECEIVE_SMS",READ_SMS:"android.permission.READ_SMS",RECEIVE_WAP_PUSH:"android.permission.RECEIVE_WAP_PUSH",RECEIVE_MMS:"android.permission.RECEIVE_MMS",READ_EXTERNAL_STORAGE:"android.permission.READ_EXTERNAL_STORAGE",WRITE_EXTERNAL_STORAGE:"android.permission.WRITE_EXTERNAL_STORAGE"},this.RESULTS={GRANTED:"granted",DENIED:"denied",NEVER_ASK_AGAIN:"never_ask_again"}}return babelHelpers.createClass(e,[{key:"checkPermission",value:function(e){return console.warn('"PermissionsAndroid.checkPermission" is deprecated. Use "PermissionsAndroid.check" instead'),o.checkPermission(e)}},{key:"check",value:function(e){return o.checkPermission(e)}},{key:"requestPermission",value:function(e,r){var i;return regeneratorRuntime.async(function(n){for(;;)switch(n.prev=n.next){case 0:return console.warn('"PermissionsAndroid.requestPermission" is deprecated. Use "PermissionsAndroid.request" instead'),n.next=3,regeneratorRuntime.awrap(this.request(e,r));case 3:return i=n.sent,n.abrupt("return",i===this.RESULTS.GRANTED);case 5:case"end":return n.stop()}},null,this)}},{key:"request",value:function(e,r){var i;return regeneratorRuntime.async(function(n){for(;;)switch(n.prev=n.next){case 0:if(!r){n.next=6;break}return n.next=3,regeneratorRuntime.awrap(o.shouldShowRequestPermissionRationale(e));case 3:if(!(i=n.sent)){n.next=6;break}return n.abrupt("return",new Promise(function(i,n){s.showAlert(r,function(){return n(new Error("Error showing rationale"))},function(){return i(o.requestPermission(e))})}));case 6:return n.abrupt("return",o.requestPermission(e));case 7:case"end":return n.stop()}},null,this)}},{key:"requestMultiple",value:function(e){return o.requestMultiplePermissions(e)}}]),e}();E=new E,i.exports=E},380); __d(function(e,t,i,o){"use strict";var n=t(107),a=t(76).PushNotificationManager,c=t(44),r=new n(a),s=new Map,l=function(){function e(t){var i=this;babelHelpers.classCallCheck(this,e),this._data={},this._remoteNotificationCompleteCalllbackCalled=!1,this._isRemote=t.remote,this._isRemote&&(this._notificationId=t.notificationId),t.remote?Object.keys(t).forEach(function(e){var o=t[e];"aps"===e?(i._alert=o.alert,i._sound=o.sound,i._badgeCount=o.badge):i._data[e]=o}):(this._badgeCount=t.applicationIconBadgeNumber,this._sound=t.soundName,this._alert=t.alertBody,this._data=t.userInfo)}return babelHelpers.createClass(e,null,[{key:"presentLocalNotification",value:function(e){a.presentLocalNotification(e)}},{key:"scheduleLocalNotification",value:function(e){a.scheduleLocalNotification(e)}},{key:"cancelAllLocalNotifications",value:function(){a.cancelAllLocalNotifications()}},{key:"setApplicationIconBadgeNumber",value:function(e){a.setApplicationIconBadgeNumber(e)}},{key:"getApplicationIconBadgeNumber",value:function(e){a.getApplicationIconBadgeNumber(e)}},{key:"cancelLocalNotifications",value:function(e){a.cancelLocalNotifications(e)}},{key:"getScheduledLocalNotifications",value:function(e){a.getScheduledLocalNotifications(e)}},{key:"addEventListener",value:function(t,i){c("notification"===t||"register"===t||"registrationError"===t||"localNotification"===t,"PushNotificationIOS only supports `notification`, `register`, `registrationError`, and `localNotification` events");var o;"notification"===t?o=r.addListener("remoteNotificationReceived",function(t){i(new e(t))}):"localNotification"===t?o=r.addListener("localNotificationReceived",function(t){i(new e(t))}):"register"===t?o=r.addListener("remoteNotificationsRegistered",function(e){i(e.deviceToken)}):"registrationError"===t&&(o=r.addListener("remoteNotificationRegistrationError",function(e){i(e)})),s.set(t,o)}},{key:"removeEventListener",value:function(e,t){c("notification"===e||"register"===e||"registrationError"===e||"localNotification"===e,"PushNotificationIOS only supports `notification`, `register`, `registrationError`, and `localNotification` events");var i=s.get(e);i&&(i.remove(),s.delete(e))}},{key:"requestPermissions",value:function(e){var t={};return t=e?{alert:!!e.alert,badge:!!e.badge,sound:!!e.sound}:{alert:!0,badge:!0,sound:!0},a.requestPermissions(t)}},{key:"abandonPermissions",value:function(){a.abandonPermissions()}},{key:"checkPermissions",value:function(e){c("function"==typeof e,"Must provide a valid callback"),a.checkPermissions(e)}},{key:"getInitialNotification",value:function(){return a.getInitialNotification().then(function(t){return t&&new e(t)})}}]),babelHelpers.createClass(e,[{key:"finish",value:function(e){this._isRemote&&this._notificationId&&!this._remoteNotificationCompleteCalllbackCalled&&(this._remoteNotificationCompleteCalllbackCalled=!0,a.onFinishRemoteNotification(this._notificationId,e))}},{key:"getMessage",value:function(){return this._alert}},{key:"getSound",value:function(){return this._sound}},{key:"getAlert",value:function(){return this._alert}},{key:"getBadgeCount",value:function(){return this._badgeCount}},{key:"getData",value:function(){return this._data}}]),e}();l.FetchResult={NewData:"UIBackgroundFetchResultNewData",NoData:"UIBackgroundFetchResultNoData",ResultFailed:"UIBackgroundFetchResultFailed"},i.exports=l},381); __d(function(t,s,e,n){"use strict";var i=s(101),a=s(76).SettingsManager,r=s(44),c=[],l={_settings:a&&a.settings,get:function(t){return this._settings[t]},set:function(t){this._settings=babelHelpers.extends(this._settings,t),a.setValues(t)},watchKeys:function(t,s){"string"==typeof t&&(t=[t]),r(Array.isArray(t),"keys should be a string or array of strings");var e=c.length;return c.push({keys:t,callback:s}),e},clearWatch:function(t){t1&&void 0!==arguments[1]?arguments[1]:{};return r("object"==typeof e&&null!==e,"Content to share must be a valid object"),r("string"==typeof e.url||"string"==typeof e.message,"At least one of URL and message is required"),r("object"==typeof t&&null!==t,"Options must be a valid object"),new Promise(function(n,i){s.showShareActionSheetWithOptions(babelHelpers.extends({},e,t,{tintColor:a(t.tintColor)}),function(e){return i(e)},function(e,t){n(e?{action:"sharedAction",activityType:t}:{action:"dismissedAction"})})})}},{key:"sharedAction",get:function(){return"sharedAction"}},{key:"dismissedAction",get:function(){return"dismissedAction"}}]),e}();n.exports=c},383); __d(function(e,r,t,n){"use strict";var s={open:function(e){return regeneratorRuntime.async(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.reject({message:"TimePickerAndroid is not supported on this platform."}));case 1:case"end":return e.stop()}},null,this)}};t.exports=s},384); __d(function(i,r,t,n){"use strict";function e(i){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!a){if(a=!0,0===i[0]&&(u.vibrate(),i=i.slice(1)),0===i.length)return void(a=!1);setTimeout(function(){return o(++f,i,r,1)},i[0])}}function o(i,r,t,n){if(a&&i===f){if(u.vibrate(),n>=r.length){if(!t)return void(a=!1);n=0}setTimeout(function(){return o(i,r,t,n+1)},r[n])}}var u=r(76).Vibration,a=(r(75),!1),f=0,v={vibrate:function(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:400,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!a)if("number"==typeof i)u.vibrate();else{if(!Array.isArray(i))throw new Error("Vibration pattern should be a number or array");e(i,r)}},cancel:function(){a=!1}};t.exports=v},385); __d(function(t,i,r,n){"use strict";var o=i(76).Vibration,a=i(44),e={vibrate:function(){a(void 0===arguments[0],"Vibration patterns not supported."),o.vibrate()}};r.exports=e},386); __d(function(t,e,n,r){"use strict";var i=e(388),s=e(389),a={linkState:function(t){return new i(this.state[t],s.createStateKeySetter(this,t))}};n.exports=a},387); __d(function(t,e,s,i){"use strict";function n(t,e){this.value=t,this.requestChange=e}s.exports=n},388); __d(function(t,e,r,n){"use strict";function a(t,e){var r={};return function(n){r[e]=n,t.setState(r)}}var c={createStateSetter:function(t,e){return function(r,n,a,c,S,u){var i=e.call(t,r,n,a,c,S,u);i&&t.setState(i)}},createStateKeySetter:function(t,e){var r=t.__keySetters||(t.__keySetters={});return r[e]||(r[e]=a(t,e))}};c.Mixin={createStateSetter:function(t){return c.createStateSetter(this,t)},createStateKeySetter:function(t){return c.createStateKeySetter(this,t)}},r.exports=c},389); __d(function(r,t,e,n){"use strict";var i=t(38),a=t(46),o=t(48),u=t(41),f=(t(44),t(40),{create:function(r){if("object"!=typeof r||!r||Array.isArray(r))return r;if(o.isValidElement(r))return r;1===r.nodeType&&i("0");var t=[];for(var e in r)a.mapIntoWithKeyPrefixInternal(r[e],t,e,u.thatReturnsArgument);return t}});e.exports=f},390); __d(function(r,t,a,c){"use strict";function n(r){return Array.isArray(r)?r.concat():r&&"object"==typeof r?f(new r.constructor,r):r}function o(r,t,a){Array.isArray(r)||i("1",a,r);var c=t[a];Array.isArray(c)||i("2",a,c)}function e(r,t){if("object"!=typeof t&&i("3",j.join(", "),p),y.call(t,p))return 1!==Object.keys(t).length&&i("4",p),t[p];var a=n(r);if(y.call(t,A)){var c=t[A];c&&"object"==typeof c||i("5",A,c),a&&"object"==typeof a||i("6",A,a),f(a,t[A])}y.call(t,s)&&(o(r,t,s),t[s].forEach(function(r){a.push(r)})),y.call(t,u)&&(o(r,t,u),t[u].forEach(function(r){a.unshift(r)})),y.call(t,l)&&(Array.isArray(r)||i("7",l,r),Array.isArray(t[l])||i("8",l,t[l]),t[l].forEach(function(r){Array.isArray(r)||i("8",l,t[l]),a.splice.apply(a,r)})),y.call(t,h)&&("function"!=typeof t[h]&&i("9",h,t[h]),a=t[h](a));for(var b in t)$.hasOwnProperty(b)&&$[b]||(a[b]=e(r[b],t[b]));return a}var i=t(38),f=t(36),y=(t(44),{}.hasOwnProperty),s="$push",u="$unshift",l="$splice",p="$set",A="$merge",h="$apply",j=[s,u,l,p,A,h],$={};j.forEach(function(r){$[r]=!0}),a.exports=e},391); __d(function(e,t,n,r){Object.defineProperty(r,"__esModule",{value:!0});var u=t(393);Object.keys(u).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(r,e,{enumerable:!0,get:function(){return u[e]}})});var o=t(671);Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(r,e,{enumerable:!0,get:function(){return o[e]}})});var c=t(672);Object.keys(c).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(r,e,{enumerable:!0,get:function(){return c[e]}})});var f=t(693);Object.keys(f).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(r,e,{enumerable:!0,get:function(){return f[e]}})}),t(986),t(987)},392); __d(function(t,o,n,e){function r(t){return function(o,n){return u(o,n,(0,L.parseURIString)(t))}}function i(t,o,n){function e(o,n){if(!o)return r().then(function(){return t((0,h.setConfig)(n))})}function r(){return t((0,s.setLocationURL)(new URL(n.toString())))}function i(){return t((0,f.setRoom)(n.room))}var u=o()["features/base/connection"].locationURL;(u?u.host:void 0)===n.host?r().then(i):a(n).then(function(t){return e(void 0,t)},function(t){return e(t,void 0)}).then(i)}function u(t,o,n){if(!n||!n.host){var e=(0,L.parseURIString)(o()["features/app"].app._getDefaultURL());n?(n.host=e.host,n.hostname=e.hostname,n.port=e.port,n.protocol=e.protocol):n=e}n.protocol||(n.protocol="https:"),i(t,o,n)}function p(t){return function(o){o({type:P.APP_WILL_MOUNT,app:t}),"object"==typeof APP&&APP.API.init()}}function c(t){return{type:P.APP_WILL_UNMOUNT,app:t}}function a(t){var o=t.protocol.toLowerCase();return"http:"!==o&&"https:"!==o&&(o="https:"),(0,l.loadConfig)(o+"//"+t.host+(t.contextRoot||"/"))}Object.defineProperty(e,"__esModule",{value:!0}),e.appNavigate=r,e.appWillMount=p,e.appWillUnmount=c;var f=o(394),s=o(610),h=o(458),l=o(396),L=o(491),P=o(671)},393); __d(function(e,t,n,r){Object.defineProperty(r,"__esModule",{value:!0});var u=t(395);Object.keys(u).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(r,e,{enumerable:!0,get:function(){return u[e]}})});var o=t(606);Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(r,e,{enumerable:!0,get:function(){return o[e]}})});var c=t(607);Object.keys(c).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(r,e,{enumerable:!0,get:function(){return c[e]}})});var f=t(608);Object.keys(f).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(r,e,{enumerable:!0,get:function(){return f[e]}})}),t(609),t(615)},394); __d(function(e,n,t,r){function o(e,n){e.on(R.JitsiConferenceEvents.CONFERENCE_FAILED,function(){for(var t=arguments.length,r=Array(t),o=0;o","text/xml");void 0===a.addEventListener&&(a.addEventListener=function(){});var u=Object.getPrototypeOf(a);u&&void 0===u.querySelector&&(u.querySelector=function(e){return i(this.elementNode,e)});var f=Object.getPrototypeOf(a.documentElement);f&&(void 0===f.querySelector&&(f.querySelector=function(e){return i(this,e)}),f.hasOwnProperty("innerHTML")||Object.defineProperty(f,"innerHTML",{get:function(){return this.childNodes.toString()},set:function(e){this.textContent="";for(var t=(new r).parseFromString("
"+e+"
","text/xml"),n=t.documentElement,o=void 0;o=n.firstChild;)this.appendChild(o)}}));var s=o(u,f);if(s&&s!==Object.getPrototypeOf({})){var v=e.console;if(v){var c=t(426).levels;Object.keys(c).forEach(function(e){var t=c[e],r=v[t];"function"==typeof r&&(v[t]=function(){for(var e=arguments.length,t=Array(e),n=0;n0&&-1===o.indexOf(r)&&(r=o+" "+r)}p.userAgent=r}()),void 0===e.performance&&(e.performance={now:function(){return 0}}),void 0===e.sessionStorage&&(e.sessionStorage={getItem:function(){},removeItem:function(){},setItem:function(){}}),t(430),e.XMLHttpRequest){var m=e.XMLHttpRequest.prototype;m&&!m.hasOwnProperty("responseXML")&&Object.defineProperty(m,"responseXML",{get:function(){var e=this.responseText,t=void 0;return e&&(t=(new r).parseFromString(e,"text/xml")),t}})}e.clearTimeout=window.clearTimeout=l.default.clearTimeout.bind(l.default),e.clearInterval=window.clearInterval=l.default.clearInterval.bind(l.default),e.setInterval=window.setInterval=l.default.setInterval.bind(l.default),e.setTimeout=window.setTimeout=l.default.setTimeout.bind(l.default)}(e||window||this)},400); __d(function(_,t,e,n){"use strict";var i,o=t(402),r=t(18),s=t(403),h=t(26),d=t(17),c=t(404),f=t(409),u=Object.defineProperty,l=Object.defineProperties;e.exports=i=function(_,t){if(!(this instanceof i))return new i(_,t);l(this,{__list__:d("w",h(_)),__context__:d("w",t),__nextIndex__:d("w",0)}),t&&(s(t.on),t.on("_add",this._onAdd),t.on("_delete",this._onDelete),t.on("_clear",this._onClear))},l(i.prototype,r({constructor:d(i),_next:d(function(){var _;if(this.__list__)return this.__redo__&&void 0!==(_=this.__redo__.shift())?_:this.__nextIndex__=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__)return void u(this,"__redo__",d("c",[_]));this.__redo__.forEach(function(t,e){t>=_&&(this.__redo__[e]=++t)},this),this.__redo__.push(_)}}),_onDelete:d(function(_){var t;_>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(t=this.__redo__.indexOf(_),-1!==t&&this.__redo__.splice(t,1),this.__redo__.forEach(function(t,e){t>_&&(this.__redo__[e]=--t)},this)))}),_onClear:d(function(){this.__redo__&&o.call(this.__redo__),this.__nextIndex__=0})}))),u(i.prototype,"function"==typeof f?f.iterator:"@@iterator",d(function(){return this})),u(i.prototype,"function"==typeof f?f.toStringTag:"@@toStringTag",d("","Iterator"))},401); __d(function(t,n,i,r){"use strict";var s=n(26);i.exports=function(){return s(this).length=0,this}},402); __d(function(n,t,o,r){"use strict";o.exports=function(n){if("function"!=typeof n)throw new TypeError(n+" is not a function");return n}},403); __d(function(e,t,n,r){"use strict";var o,i=t(405),l=t(27),u=t(403),s=t(418),c=t(403),v=t(26),a=Function.prototype.bind,f=Object.defineProperty,p=Object.prototype.hasOwnProperty;o=function(e,t,n){var r,o=v(t)&&c(t.value);return r=i(t),delete r.writable,delete r.value,r.get=function(){return!n.overwriteDefinition&&p.call(this,e)?o:(t.value=a.call(o,n.resolveContext?n.resolveContext(this):this),f(this,e,t),this[e])},r},n.exports=function(e){var t=l(arguments[1]);return null!=t.resolveContext&&u(t.resolveContext),s(e,function(e,n){return o(n,e,t)})}},404); __d(function(n,r,t,e){"use strict";var u=r(406),c=r(18),i=r(26);t.exports=function(n){var r=Object(i(n)),t=arguments[1],e=Object(arguments[2]);if(r!==n&&!t)return r;var f={};return t?u(t,function(r){(e.ensure||r in n)&&(f[r]=n[r])}):c(f,n),f}},405); __d(function(r,t,o,s){"use strict";o.exports=t(407)()?Array.from:t(408)},406); __d(function(r,n,o,t){"use strict";o.exports=function(){var r,n,o=Array.from;return"function"==typeof o&&(r=["raz","dwa"],n=o(r),Boolean(n&&n!==r&&"dwa"===n[1]))}},407); __d(function(e,r,l,t){"use strict";var n=r(409).iterator,a=r(410),i=r(411),u=r(412),o=r(403),f=r(26),c=r(24),v=r(417),h=Array.isArray,s=Function.prototype.call,y={configurable:!0,enumerable:!0,writable:!0,value:null},A=Object.defineProperty;l.exports=function(e){var r,l,t,d,g,p,w,b,x,j,O=arguments[1],_=arguments[2];if(e=Object(f(e)),c(O)&&o(O),this&&this!==Array&&i(this))r=this;else{if(!O){if(a(e))return 1!==(g=e.length)?Array.apply(null,e):(d=new Array(1),d[0]=e[0],d);if(h(e)){for(d=new Array(g=e.length),l=0;l=55296&&p<=56319&&(j+=e[++l]),j=O?s.call(O,_,j,t):j,r?(y.value=j,A(d,t,y)):d[t]=j,++t;g=t}if(void 0===g)for(g=u(e.length),r&&(d=new r(g)),l=0;l0?1:-1}},416); __d(function(t,n,o,e){"use strict";var r=Object.prototype.toString,c=r.call("");o.exports=function(t){return"string"==typeof t||t&&"object"==typeof t&&(t instanceof String||r.call(t)===c)||!1}},417); __d(function(t,n,c,o){"use strict";var r=n(403),u=n(419),i=Function.prototype.call;c.exports=function(t,n){var c={},o=arguments[2];return r(n),u(t,function(t,r,u,a){c[r]=i.call(n,o,t,r,u,a)}),c}},418); __d(function(t,c,o,r){"use strict";o.exports=c(420)("forEach")},419); __d(function(t,n,o,c){"use strict";var e=n(403),r=n(26),u=Function.prototype.bind,i=Function.prototype.call,l=Object.keys,p=Object.prototype.propertyIsEnumerable;o.exports=function(t,n){return function(o,c){var a,f=arguments[2],y=arguments[3];return o=Object(r(o)),e(c),a=l(o),y&&a.sort("function"==typeof y?u.call(y,o):void 0),"function"!=typeof t&&(t=a[t]),i.call(t,a,function(t,e){return p.call(o,t)?i.call(c,f,o[t],t,o,e):n})}}},420); __d(function(e,t,a,l){Object.defineProperty(l,"__esModule",{value:!0});var c=t(64),i=c.NativeModules.RNBackgroundTimer,s=new c.NativeEventEmitter(i),u=function(){function e(){var t=this;babelHelpers.classCallCheck(this,e),this.uniqueId=0,this.callbacks={},s.addListener("backgroundTimer.timeout",function(e){if(t.callbacks[e]){var a=t.callbacks[e].callback;t.callbacks[e].interval?i.setTimeout(e,t.callbacks[e].timeout):delete t.callbacks[e],a()}})}return babelHelpers.createClass(e,[{key:"start",value:function(e){return i.start(e)}},{key:"stop",value:function(){return i.stop()}},{key:"setTimeout",value:function(e,t){var a=++this.uniqueId;return this.callbacks[a]={callback:e,interval:!1,timeout:t},i.setTimeout(a,t),a}},{key:"clearTimeout",value:function(e){this.callbacks[e]&&delete this.callbacks[e]}},{key:"setInterval",value:function(e,t){var a=++this.uniqueId;return this.callbacks[a]={callback:e,interval:!0,timeout:t},i.setTimeout(a,t),a}},{key:"clearInterval",value:function(e){this.callbacks[e]&&delete this.callbacks[e]}}]),e}();l.default=new u},421); __d(function(t,e,s,i){!function(t){"use strict";function e(t){return void 0!==_[t]}function s(){n.call(this),this._isInvalid=!0}function i(t){return""==t&&s.call(this),t.toLowerCase()}function a(t){var e=t.charCodeAt(0);return e>32&&e<127&&-1==[34,35,60,62,63,96].indexOf(e)?t:encodeURIComponent(t)}function h(t){var e=t.charCodeAt(0);return e>32&&e<127&&-1==[34,35,60,62,96].indexOf(e)?t:encodeURIComponent(t)}function r(t,r,n){function o(t){g.push(t)}var c=r||"scheme start",l=0,m="",d=!1,b=!1,g=[];t:for(;(t[l-1]!=f||0==l)&&!this._isInvalid;){var j=t[l];switch(c){case"scheme start":if(!j||!p.test(j)){if(r){o("Invalid scheme.");break t}m="",c="no scheme";continue}m+=j.toLowerCase(),c="scheme";break;case"scheme":if(j&&v.test(j))m+=j.toLowerCase();else{if(":"!=j){if(r){if(f==j)break t;o("Code point not allowed in scheme: "+j);break t}m="",l=0,c="no scheme";continue}if(this._scheme=m,m="",r)break t;e(this._scheme)&&(this._isRelative=!0),c="file"==this._scheme?"relative":this._isRelative&&n&&n._scheme==this._scheme?"relative or authority":this._isRelative?"authority first slash":"scheme data"}break;case"scheme data":"?"==j?(query="?",c="query"):"#"==j?(this._fragment="#",c="fragment"):f!=j&&"\t"!=j&&"\n"!=j&&"\r"!=j&&(this._schemeData+=a(j));break;case"no scheme":if(n&&e(n._scheme)){c="relative";continue}o("Missing scheme."),s.call(this);break;case"relative or authority":if("/"!=j||"/"!=t[l+1]){o("Expected /, got: "+j),c="relative";continue}c="authority ignore slashes";break;case"relative":if(this._isRelative=!0,"file"!=this._scheme&&(this._scheme=n._scheme),f==j){this._host=n._host,this._port=n._port,this._path=n._path.slice(),this._query=n._query,this._username=n._username,this._password=n._password;break t}if("/"==j||"\\"==j)"\\"==j&&o("\\ is an invalid code point."),c="relative slash";else if("?"==j)this._host=n._host,this._port=n._port,this._path=n._path.slice(),this._query="?",this._username=n._username,this._password=n._password,c="query";else{if("#"!=j){var y=t[l+1],w=t[l+2];("file"!=this._scheme||!p.test(j)||":"!=y&&"|"!=y||f!=w&&"/"!=w&&"\\"!=w&&"?"!=w&&"#"!=w)&&(this._host=n._host,this._port=n._port,this._username=n._username,this._password=n._password,this._path=n._path.slice(),this._path.pop()),c="relative path";continue}this._host=n._host,this._port=n._port,this._path=n._path.slice(),this._query=n._query,this._fragment="#",this._username=n._username,this._password=n._password,c="fragment"}break;case"relative slash":if("/"!=j&&"\\"!=j){"file"!=this._scheme&&(this._host=n._host,this._port=n._port,this._username=n._username,this._password=n._password),c="relative path";continue}"\\"==j&&o("\\ is an invalid code point."),c="file"==this._scheme?"file host":"authority ignore slashes";break;case"authority first slash":if("/"!=j){o("Expected '/', got: "+j),c="authority ignore slashes";continue}c="authority second slash";break;case"authority second slash":if(c="authority ignore slashes","/"!=j){o("Expected '/', got: "+j);continue}break;case"authority ignore slashes":if("/"!=j&&"\\"!=j){c="authority";continue}o("Expected authority, got: "+j);break;case"authority":if("@"==j){d&&(o("@ already seen."),m+="%40"),d=!0;for(var k=0;k=e+n||e?new java.lang.String(t,e,n)+"":t}function u(t,e){t.currentElement?t.currentElement.appendChild(e):t.doc.appendChild(e)}o.prototype.parseFromString=function(t,e){var n=this.options,r=new m,o=n.domBuilder||new c,a=n.errorHandler,l=n.locator,s=n.xmlns||{},u={lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return l&&o.setDocumentLocator(l),r.errorHandler=i(a,o,l),r.domBuilder=n.domBuilder||o,/\/x?html?$/.test(e)&&(u.nbsp="\xa0",u.copy="\xa9",s[""]="http://www.w3.org/1999/xhtml"),s.xml=s.xml||"http://www.w3.org/XML/1998/namespace",t?r.parse(t,s,u):r.errorHandler.error("invalid doc source"),o.doc},c.prototype={startDocument:function(){this.doc=(new h).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(t,e,n,r){var o=this.doc,i=o.createElementNS(t,n||e),c=r.length;u(this,i),this.currentElement=i,this.locator&&a(this.locator,i);for(var l=0;l65535){e-=65536;var r=55296+(e>>10),t=56320+(1023&e);return String.fromCharCode(r,t)}return String.fromCharCode(e)}function f(e){var r=e.slice(1,-1);return r in t?t[r]:"#"===r.charAt(0)?s(parseInt(r.substr(1).replace("x","0x"))):(n.error("entity not found:"+e),e)}function g(r){if(r>D){var t=e.substring(D,r).replace(/&#?\w+;/g,f);x&&p(D),a.characters(t,0,r-D),D=r}}function p(r,t){for(;r>=b&&(t=v.exec(e));)w=t.index,b=w+t[0].length,x.lineNumber++;x.columnNumber=r-w+1}for(var w=0,b=0,v=/.*(?:\r\n?|\n)|.*$/g,x=a.locator,N=[{currentNSMap:r}],F={},D=0;;){try{var k=e.indexOf("<",D);if(k<0){if(!e.substr(D).match(/^\s*$/)){var E=a.doc,C=E.createTextNode(e.substr(D));E.appendChild(C),a.currentElement=C}return}switch(k>D&&g(k),e.charAt(k+1)){case"/":var $=e.indexOf(">",k+3),A=e.substring(k+2,$),M=N.pop();$<0?(A=e.substring(k+2).replace(/[\s<].*/,""),n.error("end tag name: "+A+" is not complete:"+M.tagName),$=k+1+A.length):A.match(/\sD?D=$:g(Math.max(k,D)+1)}}function c(e,r){return r.lineNumber=e.lineNumber,r.columnNumber=e.columnNumber,r}function i(e,r,t,a,n,s){for(var c,i,u=++r,o=x;;){var l=e.charAt(u);switch(l){case"=":if(o===N)c=e.slice(r,u),o=D;else{if(o!==F)throw new Error("attribute equal must after attrName");o=D}break;case"'":case'"':if(o===D||o===N){if(o===N&&(s.warning('attribute value must after "="'),c=e.slice(r,u)),r=u+1,!((u=e.indexOf(l,r))>0))throw new Error("attribute value no end '"+l+"' match");i=e.slice(r,u).replace(/&#?\w+;/g,n),t.add(c,i,r-1),o=E}else{if(o!=k)throw new Error('attribute value must after "="');i=e.slice(r,u).replace(/&#?\w+;/g,n),t.add(c,i,r),s.warning('attribute "'+c+'" missed start quot('+l+")!!"),r=u+1,o=E}break;case"/":switch(o){case x:t.setTagName(e.slice(r,u));case E:case C:case $:o=$,t.closed=!0;case k:case N:case F:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return s.error("unexpected end of input"),o==x&&t.setTagName(e.slice(r,u)),u;case">":switch(o){case x:t.setTagName(e.slice(r,u));case E:case C:case $:break;case k:case N:i=e.slice(r,u),"/"===i.slice(-1)&&(t.closed=!0,i=i.slice(0,-1));case F:o===F&&(i=c),o==k?(s.warning('attribute "'+i+'" missed quot(")!!'),t.add(c,i.replace(/&#?\w+;/g,n),r)):("http://www.w3.org/1999/xhtml"===a[""]&&i.match(/^(?:disabled|checked|selected)$/i)||s.warning('attribute "'+i+'" missed value!! "'+i+'" instead!!'),t.add(i,i,r));break;case D:throw new Error("attribute value missed!!")}return u;case"\x80":l=" ";default:if(l<=" ")switch(o){case x:t.setTagName(e.slice(r,u)),o=C;break;case N:c=e.slice(r,u),o=F;break;case k:var i=e.slice(r,u).replace(/&#?\w+;/g,n);s.warning('attribute "'+i+'" missed quot(")!!'),t.add(c,i,r);case E:o=C}else switch(o){case F:t.tagName;"http://www.w3.org/1999/xhtml"===a[""]&&c.match(/^(?:disabled|checked|selected)$/i)||s.warning('attribute "'+c+'" missed value!! "'+c+'" instead2!!'),t.add(c,c,r),r=u,o=N;break;case E:s.warning('attribute space is required"'+c+'"!!');case C:o=N,r=u;break;case D:o=k,r=u;break;case $:throw new Error("elements closed character '/' and '>' must be connected to")}}u++}}function u(e,r,t){for(var a=e.tagName,n=null,s=e.length;s--;){var c=e[s],i=c.qName,u=c.value,o=i.indexOf(":");if(o>0)var l=c.prefix=i.slice(0,o),d=i.slice(o+1),m="xmlns"===l&&d;else d=i,l=null,m="xmlns"===i&&"";c.localName=d,!1!==m&&(null==n&&(n={},f(t,t={})),t[m]=n[m]=u,c.uri="http://www.w3.org/2000/xmlns/",r.startPrefixMapping(m,u))}for(var s=e.length;s--;){c=e[s];var l=c.prefix;l&&("xml"===l&&(c.uri="http://www.w3.org/XML/1998/namespace"),"xmlns"!==l&&(c.uri=t[l||""]))}var o=a.indexOf(":");o>0?(l=e.prefix=a.slice(0,o),d=e.localName=a.slice(o+1)):(l=null,d=e.localName=a);var h=e.uri=t[l||""];if(r.startElement(h,d,a,e),!e.closed)return e.currentNSMap=t,e.localNSMap=n,!0;if(r.endElement(h,d,a),n)for(l in n)r.endPrefixMapping(l)}function o(e,r,t,a,n){if(/^(?:script|textarea)$/i.test(t)){var s=e.indexOf("",r),c=e.substring(r+1,s);if(/[&<]/.test(c))return/^script$/i.test(t)?(n.characters(c,0,c.length),s):(c=c.replace(/&#?\w+;/g,a),n.characters(c,0,c.length),s)}return r+1}function l(e,r,t,a){var n=a[t];return null==n&&(n=e.lastIndexOf(""),nr?(t.comment(e,r+4,n-r-4),n+3):(a.error("Unclosed comment"),-1)}return-1;default:if("CDATA["==e.substr(r+3,6)){var n=e.indexOf("]]>",r+9);return t.startCDATA(),t.characters(e,r+9,n-r-9),t.endCDATA(),n+3}var s=p(e,r),c=s.length;if(c>1&&/!doctype/i.test(s[0][0])){var i=s[1][0],u=c>3&&/^public$/i.test(s[2][0])&&s[3][0],o=c>4&&s[4][0],l=s[c-1];return t.startDTD(i,u&&u.replace(/^(['"])(.*?)\1$/,"$2"),o&&o.replace(/^(['"])(.*?)\1$/,"$2")),t.endDTD(),l.index+l[0].length}}return-1}function m(e,r,t){var a=e.indexOf("?>",r);if(a){var n=e.substring(r,a).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(n){n[0].length;return t.processingInstruction(n[1],n[2]),a+2}return-1}return-1}function h(e){}function g(e,r){return e.__proto__=r,e}function p(e,r){var t,a=[],n=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(n.lastIndex=r,n.exec(e);t=n.exec(e);)if(a.push(t),t[1])return a}var w=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,b=new RegExp("[\\-\\.0-9"+w.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),v=new RegExp("^"+w.source+b.source+"*(?::"+w.source+b.source+"*)?$"),x=0,N=1,F=2,D=3,k=4,E=5,C=6,$=7;n.prototype={parse:function(e,r,t){var a=this.domBuilder;a.startDocument(),f(r,r={}),s(e,r,t,a,this.errorHandler),a.endDocument()}},h.prototype={setTagName:function(e){if(!v.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},add:function(e,r,t){if(!v.test(e))throw new Error("invalid attribute:"+e);this[this.length++]={qName:e,value:r,offset:t}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},g({},g.prototype)instanceof g||(g=function(e,r){function t(){}t.prototype=r,t=new t;for(r in e)t[r]=e[r];return t}),a.XMLReader=n},424); __d(function(e,t,n,r){function i(e,t){for(var n in e)t[n]=e[n]}function o(e,t){function n(){}var r=e.prototype;if(Object.create){var o=Object.create(t.prototype);r.__proto__=o}r instanceof t||(n.prototype=t.prototype,n=new n,i(r,n),e.prototype=r=n),r.constructor!=e&&("function"!=typeof e&&console.error("unknow Class:"+e),r.constructor=e)}function a(e,t){if(t instanceof Error)var n=t;else n=this,Error.call(this,ae[e]),this.message=ae[e],Error.captureStackTrace&&Error.captureStackTrace(this,a);return n.code=e,t&&(this.message=this.message+": "+t),n}function u(){}function s(e,t){this._node=e,this._refresh=t,l(this)}function l(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var n=e._refresh(e._node);z(e,"length",n.length),i(n,e),e._inc=t}}function c(){}function h(e,t){for(var n=e.length;n--;)if(e[n]===t)return n}function p(e,t,n,r){if(r?t[h(t,r)]=n:t[t.length++]=n,e){n.ownerElement=e;var i=e.ownerDocument;i&&(r&&E(i,e,r),w(i,e,n))}}function d(e,t,n){var r=h(t,n);if(!(r>=0))throw a(se,new Error(e.tagName+"@"+n));for(var i=t.length-1;r"==e&&">"||"&"==e&&"&"||'"'==e&&"""||"&#"+e.charCodeAt()+";"}function v(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(v(e,t))return!0}while(e=e.nextSibling)}function g(){}function w(e,t,n){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&(t._nsMap[n.prefix?n.localName:""]=n.value)}function E(e,t,n,r){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&delete t._nsMap[n.prefix?n.localName:""]}function y(e,t,n){if(e&&e._inc){e._inc++;var r=t.childNodes;if(n)r[r.length++]=n;else{for(var i=t.firstChild,o=0;i;)r[o++]=i,i=i.nextSibling;r.length=o}}}function b(e,t){var n=t.previousSibling,r=t.nextSibling;return n?n.nextSibling=r:e.firstChild=r,r?r.previousSibling=n:e.lastChild=n,y(e.ownerDocument,e),t}function T(e,t,n){var r=t.parentNode;if(r&&r.removeChild(t),t.nodeType===re){var i=t.firstChild;if(null==i)return t;var o=t.lastChild}else i=o=t;var a=n?n.previousSibling:e.lastChild;i.previousSibling=a,o.nextSibling=n,a?a.nextSibling=i:e.firstChild=i,null==n?e.lastChild=o:n.previousSibling=o;do{i.parentNode=e}while(i!==o&&(i=i.nextSibling));return y(e.ownerDocument||e,e),t.nodeType==re&&(t.firstChild=t.lastChild=null),t}function _(e,t){var n=t.parentNode;if(n){var r=e.lastChild;n.removeChild(t);var r=e.lastChild}var r=e.lastChild;return t.parentNode=e,t.previousSibling=r,t.nextSibling=null,r?r.nextSibling=t:e.firstChild=t,e.lastChild=t,y(e.ownerDocument,e,t),t}function D(){this._nsMap={}}function S(){}function C(){}function I(){}function A(){}function R(){}function x(){}function O(){}function U(){}function M(){}function B(){}function P(){}function L(){}function V(e,t){var n=[],r=9==this.nodeType?this.documentElement:this,i=r.prefix,o=r.namespaceURI;if(o&&null==i){var i=r.lookupPrefix(o);if(null==i)var a=[{namespace:o,prefix:null}]}return j(this,n,e,t,a),n.join("")}function k(e,t,n){var r=e.prefix||"",i=e.namespaceURI;if(!r&&!i)return!1;if("xml"===r&&"http://www.w3.org/XML/1998/namespace"===i||"http://www.w3.org/2000/xmlns/"==i)return!1;for(var o=n.length;o--;){var a=n[o];if(a.prefix==r)return a.namespace!=i}return!0}function j(e,t,n,r,i){if(r){if(!(e=r(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case H:i||(i=[]);var o=(i.length,e.attributes),a=o.length,u=e.firstChild,s=e.tagName;n=X===e.namespaceURI||n,t.push("<",s);for(var l=0;l"),n&&/^script$/i.test(s))for(;u;)u.data?t.push(u.data):j(u,t,n,r,i),u=u.nextSibling;else for(;u;)j(u,t,n,r,i),u=u.nextSibling;t.push("")}else t.push("/>");return;case te:case re:for(var u=e.firstChild;u;)j(u,t,n,r,i),u=u.nextSibling;return;case W:return t.push(" ",e.name,'="',e.value.replace(/[<&"]/g,N),'"');case q:return t.push(e.data.replace(/[<&]/g,N));case Z:return t.push("");case ee:return t.push("\x3c!--",e.data,"--\x3e");case ne:var f=e.publicId,m=e.systemId;if(t.push("');else if(m&&"."!=m)t.push(' SYSTEM "',m,'">');else{var v=e.internalSubset;v&&t.push(" [",v,"]"),t.push(">")}return;case K:return t.push("");case Q:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function F(e,t,n){var r;switch(t.nodeType){case H:r=t.cloneNode(!1),r.ownerDocument=e;case re:break;case W:n=!0}if(r||(r=t.cloneNode(!1)),r.ownerDocument=e,r.parentNode=null,n)for(var i=t.firstChild;i;)r.appendChild(F(e,i,n)),i=i.nextSibling;return r}function Y(e,t,n){var r=new t.constructor;for(var i in t){var o=t[i];"object"!=typeof o&&o!=r[i]&&(r[i]=o)}switch(t.childNodes&&(r.childNodes=new u),r.ownerDocument=e,r.nodeType){case H:var a=t.attributes,s=r.attributes=new c,l=a.length;s._ownerElement=r;for(var h=0;h0},lookupPrefix:function(e){for(var t=this;t;){var n=t._nsMap;if(n)for(var r in n)if(n[r]==e)return r;t=t.nodeType==W?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&e in n)return n[e];t=t.nodeType==W?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},i(G,m),i(G,m.prototype),g.prototype={nodeName:"#document",nodeType:te,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==re){for(var n=e.firstChild;n;){var r=n.nextSibling;this.insertBefore(n,t),n=r}return e}return null==this.documentElement&&e.nodeType==H&&(this.documentElement=e),T(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),b(this,e)},importNode:function(e,t){return F(this,e,t)},getElementById:function(e){var t=null;return v(this.documentElement,function(n){if(n.nodeType==H&&n.getAttribute("id")==e)return t=n,!0}),t},createElement:function(e){var t=new D;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.childNodes=new u,(t.attributes=new c)._ownerElement=t,t},createDocumentFragment:function(){var e=new B;return e.ownerDocument=this,e.childNodes=new u,e},createTextNode:function(e){var t=new I;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new A;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new R;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new P;return n.ownerDocument=this,n.tagName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new S;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new M;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new D,r=t.split(":"),i=n.attributes=new c;return n.childNodes=new u,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,i._ownerElement=n,n},createAttributeNS:function(e,t){var n=new S,r=t.split(":");return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,n}},o(g,m),D.prototype={nodeType:H,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var n=this.ownerDocument.createAttribute(e);n.value=n.nodeValue=""+t,this.setAttributeNode(n)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===re?this.insertBefore(e,null):_(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n&&n.value||""},setAttributeNS:function(e,t,n){var r=this.ownerDocument.createAttributeNS(e,t);r.value=r.nodeValue=""+n,this.setAttributeNode(r)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new s(this,function(t){var n=[];return v(t,function(r){r===t||r.nodeType!=H||"*"!==e&&r.tagName!=e||n.push(r)}),n})},getElementsByTagNameNS:function(e,t){return new s(this,function(n){var r=[];return v(n,function(i){i===n||i.nodeType!==H||"*"!==e&&i.namespaceURI!==e||"*"!==t&&i.localName!=t||r.push(i)}),r})}},g.prototype.getElementsByTagName=D.prototype.getElementsByTagName,g.prototype.getElementsByTagNameNS=D.prototype.getElementsByTagNameNS,o(D,m),S.prototype.nodeType=W,o(S,m),C.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(ae[ue])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,n){n=this.data.substring(0,e)+n+this.data.substring(e+t),this.nodeValue=this.data=n,this.length=n.length}},o(C,m),I.prototype={nodeName:"#text",nodeType:q,splitText:function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var r=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}},o(I,C),A.prototype={nodeName:"#comment",nodeType:ee},o(A,C),R.prototype={nodeName:"#cdata-section",nodeType:Z},o(R,C),x.prototype.nodeType=ne,o(x,m),O.prototype.nodeType=ie,o(O,m),U.prototype.nodeType=J,o(U,m),M.prototype.nodeType=Q,o(M,m),B.prototype.nodeName="#document-fragment",B.prototype.nodeType=re,o(B,m),P.prototype.nodeType=K,o(P,m),L.prototype.serializeToString=function(e,t,n){return V.call(e,t,n)},m.prototype.toString=V;try{Object.defineProperty&&(Object.defineProperty(s.prototype,"length",{get:function(){return l(this),this.$$length}}),Object.defineProperty(m.prototype,"textContent",{get:function(){return $(this)},set:function(e){switch(this.nodeType){case H:case re:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),z=function(e,t,n){e["$$"+t]=n})}catch(e){}r.DOMImplementation=f,r.XMLSerializer=L},425); __d(function(e,o,r,l){var n=o(427),t=o(428),a={},v=[],s=n.levels.TRACE;r.exports={addGlobalTransport:function(e){n.addGlobalTransport(e)},removeGlobalTransport:function(e){n.removeGlobalTransport(e)},getLogger:function(e,o,r){var l=new n(s,e,o,r);return e?(a[e]=a[e]||[],a[e].push(l)):v.push(l),l},setLogLevelById:function(e,o){for(var r=o?a[o]||[]:v,l=0;l: ").apply(c,e)}}function s(t,n,e,o){this.id=n,this.format=o,this.transports=e,this.transports||(this.transports=[]),this.level=a[t];for(var r=Object.keys(a),s=0;s=this.maxEntryLength&&this._flush(!0,!0)},o.prototype.start=function(){this._reschedulePublishInterval()},o.prototype._reschedulePublishInterval=function(){this.storeLogsIntervalID&&(window.clearTimeout(this.storeLogsIntervalID),this.storeLogsIntervalID=null),this.storeLogsIntervalID=window.setTimeout(this._flush.bind(this,!1,!0),this.storeInterval)},o.prototype.flush=function(){this._flush(!1,!0)},o.prototype._flush=function(t,e){this.totalLen>0&&(this.logStorage.isReady()||t)&&(this.logStorage.isReady()?(this.outputCache.length&&(this.outputCache.forEach(function(t){this.logStorage.storeLogs(t)}.bind(this)),this.outputCache=[]),this.logStorage.storeLogs(this.queue)):this.outputCache.push(this.queue),this.queue=[],this.totalLen=0),e&&this._reschedulePublishInterval()},o.prototype.stop=function(){this._flush(!1,!1)},s.exports=o},428); __d(function(e,s,t,a){t.exports={_from:"react-native@0.42.3",_id:"react-native@0.42.3",_inBundle:!1,_integrity:"sha1-RQyKA6Xj6ZGgikJvIndt2P64CyY=",_location:"/react-native",_phantomChildren:{ansi:"0.3.1","ansi-regex":"2.1.1","are-we-there-yet":"1.1.4","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","basic-auth-connect":"1.0.0","brace-expansion":"1.1.8",chalk:"1.1.3","cli-width":"2.1.0",cliui:"3.2.0","code-point-at":"1.1.0",compression:"1.5.2","connect-timeout":"1.6.2","content-type":"1.0.2","convert-source-map":"1.5.0","cookie-parser":"1.3.5","cookie-signature":"1.0.6","core-js":"2.5.0",csurf:"1.8.3",debug:"2.6.8",decamelize:"1.2.0",destroy:"1.0.4",errorhandler:"1.4.3","escape-string-regexp":"1.0.5","exit-hook":"1.1.1","express-session":"1.11.3","get-caller-file":"1.0.2","has-unicode":"2.0.1",inflight:"1.0.6",inherits:"2.0.3",lodash:"4.17.4","lodash.pad":"4.5.1","lodash.padend":"4.6.1","lodash.padstart":"4.6.1","media-typer":"0.3.0","method-override":"2.3.9","mime-db":"1.29.0",morgan:"1.6.1",multiparty:"3.3.2","number-is-nan":"1.0.1","object-assign":"4.1.1","on-finished":"2.3.0","on-headers":"1.0.1",once:"1.4.0","os-locale":"1.4.0",parseurl:"1.3.1","path-is-absolute":"1.0.1",pause:"0.1.0",private:"0.1.7","read-pkg-up":"1.0.1",readline2:"1.0.1","require-directory":"2.1.1","require-main-filename":"1.0.1","response-time":"2.3.2","serve-favicon":"2.3.2","set-blocking":"2.0.0",slash:"1.0.0","source-map":"0.5.6",statuses:"1.3.1","strip-ansi":"3.0.1",through:"2.3.8",unpipe:"1.0.0","utils-merge":"1.0.0",vhost:"3.0.2","which-module":"1.0.0",y18n:"3.2.1","yargs-parser":"4.2.1"},_requested:{type:"version",registry:!0,raw:"react-native@0.42.3",name:"react-native",escapedName:"react-native",rawSpec:"0.42.3",saveSpec:null,fetchSpec:"0.42.3"},_requiredBy:["/"],_resolved:"https://registry.npmjs.org/react-native/-/react-native-0.42.3.tgz",_shasum:"450c8a03a5e3e991a08a426f22776dd8feb80b26",_spec:"react-native@0.42.3",_where:"/Users/manu/UC/matrix/github/release/jitsi-meet",bin:{"react-native":"local-cli/wrong-react-native.js"},bugs:{url:"https://github.com/facebook/react-native/issues"},bundleDependencies:!1,dependencies:{"absolute-path":"^0.0.0",art:"^0.10.0",async:"^2.0.1","babel-core":"^6.21.0","babel-generator":"^6.21.0","babel-plugin-external-helpers":"^6.18.0","babel-plugin-syntax-trailing-function-commas":"^6.20.0","babel-plugin-transform-flow-strip-types":"^6.21.0","babel-plugin-transform-object-rest-spread":"^6.20.2","babel-polyfill":"^6.20.0","babel-preset-es2015-node":"^6.1.1","babel-preset-fbjs":"^2.1.0","babel-preset-react-native":"^1.9.1","babel-register":"^6.18.0","babel-runtime":"^6.20.0","babel-traverse":"^6.21.0","babel-types":"^6.21.0",babylon:"^6.14.1","base64-js":"^1.1.2",bser:"^1.0.2",chalk:"^1.1.1",commander:"^2.9.0",connect:"^2.8.3","core-js":"^2.2.2",debug:"^2.2.0",denodeify:"^1.2.1","event-target-shim":"^1.0.5",fbjs:"^0.8.5","fbjs-scripts":"^0.7.0","fs-extra":"^0.26.2",glob:"^5.0.15","graceful-fs":"^4.1.3","image-size":"^0.3.5",immutable:"~3.7.6",imurmurhash:"^0.1.4",inquirer:"^0.12.0","jest-haste-map":"18.0.0",joi:"^6.6.1","json-stable-stringify":"^1.0.1",json5:"^0.4.0","left-pad":"^1.1.3",lodash:"^4.16.6",mime:"^1.3.4","mime-types":"2.1.11",minimist:"^1.2.0",mkdirp:"^0.5.1","node-fetch":"^1.3.3",npmlog:"^2.0.4",opn:"^3.0.2",optimist:"^0.6.1",plist:"^1.2.0",promise:"^7.1.1","react-clone-referenced-element":"^1.0.1","react-timer-mixin":"^0.13.2","react-transform-hmr":"^1.0.4",rebound:"^0.0.13","regenerator-runtime":"^0.9.5",request:"^2.79.0",rimraf:"^2.5.4",sane:"~1.4.1",semver:"^5.0.3","shell-quote":"1.6.1","source-map":"^0.5.6","stacktrace-parser":"^0.1.3",temp:"0.8.3",throat:"^3.0.0","uglify-js":"^2.6.2","whatwg-fetch":"^1.0.0",wordwrap:"^1.0.0","worker-farm":"^1.3.1","write-file-atomic":"^1.2.0",ws:"^1.1.0",xcode:"^0.8.9",xmldoc:"^0.4.0",yargs:"^6.4.0"},deprecated:!1,description:"A framework for building native apps using React",devDependencies:{"babel-eslint":"^7.1.1",eslint:"^3.8.1","eslint-plugin-babel":"^3.3.0","eslint-plugin-flowtype":"^2.20.0","eslint-plugin-react":"^6.4.1","flow-bin":"^0.38.0",jest:"18.0.0","jest-repl":"18.0.0","jest-runtime":"18.0.0","mock-fs":"^3.11.0",react:"~15.4.1","react-dom":"~15.4.1","react-test-renderer":"~15.4.1",shelljs:"0.6.0",sinon:"^2.0.0-pre.2"},engines:{node:">=4"},files:[".flowconfig","android","cli.js","flow","init.sh","ios-install-third-party.sh","jest-preset.json","jest","lib","setupBabel.js","Libraries","LICENSE","local-cli","packager","PATENTS","react.gradle","React.podspec","React","ReactAndroid","ReactCommon","README.md"],homepage:"https://github.com/facebook/react-native#readme",jest:{automock:!0,transform:{".*":"./jest/preprocessor.js"},setupFiles:["./jest/setup.js"],timers:"fake",moduleNameMapper:{"^React$":"/Libraries/react-native/React.js","^[./a-zA-Z0-9$_-]+\\.png$":"RelativeImageStub"},testPathIgnorePatterns:["/node_modules/","/website/","local-cli/templates/"],haste:{defaultPlatform:"ios",providesModuleNodeModules:["react-native"],platforms:["ios","android"]},modulePathIgnorePatterns:["Libraries/react-native/","/node_modules/(?!react|fbjs|react-native|react-transform-hmr|core-js|promise)/","node_modules/react/node_modules/fbjs/","node_modules/react/lib/ReactDOM.js","node_modules/fbjs/lib/Map.js","node_modules/fbjs/lib/Promise.js","node_modules/fbjs/lib/fetch.js","node_modules/fbjs/lib/ErrorUtils.js","node_modules/fbjs/lib/URI.js","node_modules/fbjs/lib/Deferred.js","node_modules/fbjs/lib/PromiseMap.js","node_modules/fbjs/lib/UserAgent.js","node_modules/fbjs/lib/areEqual.js","node_modules/fbjs/lib/base62.js","node_modules/fbjs/lib/crc32.js","node_modules/fbjs/lib/everyObject.js","node_modules/fbjs/lib/fetchWithRetries.js","node_modules/fbjs/lib/filterObject.js","node_modules/fbjs/lib/flattenArray.js","node_modules/fbjs/lib/forEachObject.js","node_modules/fbjs/lib/isEmpty.js","node_modules/fbjs/lib/nullthrows.js","node_modules/fbjs/lib/removeFromArray.js","node_modules/fbjs/lib/resolveImmediate.js","node_modules/fbjs/lib/someObject.js","node_modules/fbjs/lib/sprintf.js","node_modules/fbjs/lib/xhrSimpleDataSerializer.js","node_modules/jest-cli","node_modules/react/dist","node_modules/fbjs/.*/__mocks__/","node_modules/fbjs/node_modules/","/website/"],unmockedModulePathPatterns:["promise","source-map","fastpath","denodeify","fbjs","sinon"]},license:"BSD-3-Clause",main:"Libraries/react-native/react-native.js",name:"react-native",peerDependencies:{react:"~15.4.1"},repository:{type:"git",url:"git+ssh://git@github.com/facebook/react-native.git"},scripts:{flow:"flow",lint:"eslint Examples/ Libraries/",start:"/usr/bin/env bash -c './packager/packager.sh \"$@\" || true' --",test:"jest"},version:"0.42.3"}},429); __d(function(e,i,a,t){var d=i(431),r=i(448),n=babelHelpers.interopRequireDefault(r);!function(e){void 0===e.webkitMediaStream&&(e.webkitMediaStream=d.MediaStream),void 0===e.MediaStreamTrack&&(e.MediaStreamTrack=d.MediaStreamTrack),void 0===e.webkitRTCPeerConnection&&(e.webkitRTCPeerConnection=n.default),void 0===e.RTCSessionDescription&&(e.RTCSessionDescription=d.RTCSessionDescription),void 0===e.RTCIceCandidate&&(e.RTCIceCandidate=d.RTCIceCandidate);var i=e.navigator;i&&void 0===i.webkitGetUserMedia&&(i.webkitGetUserMedia=d.getUserMedia)}(e||window||this)},430); __d(function(e,t,a,r){"use strict";var l=t(432),i=babelHelpers.interopRequireDefault(l),u=t(442),p=babelHelpers.interopRequireDefault(u),f=t(441),n=babelHelpers.interopRequireDefault(f),b=t(445),s=babelHelpers.interopRequireDefault(b),d=t(433),o=babelHelpers.interopRequireDefault(d),R=t(436),D=babelHelpers.interopRequireDefault(R),q=t(446),H=babelHelpers.interopRequireDefault(q);a.exports={RTCPeerConnection:i.default,RTCIceCandidate:p.default,RTCSessionDescription:n.default,RTCView:s.default,MediaStream:o.default,MediaStreamTrack:D.default,getUserMedia:H.default}},431); __d(function(e,n,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var a=n(237),r=babelHelpers.interopRequireDefault(a),o=n(64),c=n(433),d=babelHelpers.interopRequireDefault(c),s=n(435),l=babelHelpers.interopRequireDefault(s),u=n(436),p=babelHelpers.interopRequireDefault(u),f=n(438),C=babelHelpers.interopRequireDefault(f),h=n(440),v=babelHelpers.interopRequireDefault(h),m=n(441),g=babelHelpers.interopRequireDefault(m),_=n(442),b=babelHelpers.interopRequireDefault(_),S=n(443),I=babelHelpers.interopRequireDefault(S),E=n(444),y=babelHelpers.interopRequireDefault(E),D=o.NativeModules.WebRTCModule,w={mandatory:{OfferToReceiveAudio:!0,OfferToReceiveVideo:!0},optional:[]},R={mandatory:{},optional:[{DtlsSrtpKeyAgreement:!0}]},k=["connectionstatechange","icecandidate","icecandidateerror","iceconnectionstatechange","icegatheringstatechange","negotiationneeded","signalingstatechange","datachannel","addstream","removestream"],H=0,O=function(e){function n(e){babelHelpers.classCallCheck(this,n);var t=babelHelpers.possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return t.signalingState="stable",t.iceGatheringState="new",t.iceConnectionState="new",t._remoteStreams=[],t._dataChannelIds=new Set,t._peerConnectionId=H++,D.peerConnectionInit(e,R,t._peerConnectionId),t._registerEvents(),t}return babelHelpers.inherits(n,e),babelHelpers.createClass(n,[{key:"addStream",value:function(e){D.peerConnectionAddStream(e.reactTag,this._peerConnectionId)}},{key:"removeStream",value:function(e){D.peerConnectionRemoveStream(e.reactTag,this._peerConnectionId)}},{key:"_mergeMediaConstraints",value:function(e){var n=babelHelpers.extends({},w);return e&&(e.mandatory&&(n.mandatory=babelHelpers.extends({},n.mandatory,e.mandatory)),e.optional&&Array.isArray(e.optional)&&(n.optional=e.optional.concat(n.optional))),n}},{key:"createOffer",value:function(e,n,t){D.peerConnectionCreateOffer(this._peerConnectionId,this._mergeMediaConstraints(t),function(t,i){t?e(new g.default(i)):n(i)})}},{key:"createAnswer",value:function(e,n,t){D.peerConnectionCreateAnswer(this._peerConnectionId,this._mergeMediaConstraints(t),function(t,i){t?e(new g.default(i)):n(i)})}},{key:"setConfiguration",value:function(e){D.peerConnectionSetConfiguration(e,this._peerConnectionId)}},{key:"setLocalDescription",value:function(e,n,t,i){var a=this;D.peerConnectionSetLocalDescription(e.toJSON(),this._peerConnectionId,function(i,r){i?(a.localDescription=e,n()):t(r)})}},{key:"setRemoteDescription",value:function(e,n,t){var i=this;D.peerConnectionSetRemoteDescription(e.toJSON(),this._peerConnectionId,function(a,r){a?(i.remoteDescription=e,n()):t(r)})}},{key:"addIceCandidate",value:function(e,n,t){D.peerConnectionAddICECandidate(e.toJSON(),this._peerConnectionId,function(e){e?n&&n():t&&t()})}},{key:"getStats",value:function(e,n,t){D.peerConnectionGetStats?D.peerConnectionGetStats(e&&e.id||"",this._peerConnectionId,function(e){if(n){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){return void t(e)}n(e)}}):console.warn("RTCPeerConnection getStats not supported")}},{key:"getRemoteStreams",value:function(){return this._remoteStreams.slice()}},{key:"close",value:function(){D.peerConnectionClose(this._peerConnectionId)}},{key:"_unregisterEvents",value:function(){this._subscriptions.forEach(function(e){return e.remove()}),this._subscriptions=[]}},{key:"_registerEvents",value:function(){var e=this;this._subscriptions=[o.DeviceEventEmitter.addListener("peerConnectionOnRenegotiationNeeded",function(n){n.id===e._peerConnectionId&&e.dispatchEvent(new y.default("negotiationneeded"))}),o.DeviceEventEmitter.addListener("peerConnectionIceConnectionChanged",function(n){n.id===e._peerConnectionId&&(e.iceConnectionState=n.iceConnectionState,e.dispatchEvent(new y.default("iceconnectionstatechange")),"closed"===n.iceConnectionState&&e._unregisterEvents())}),o.DeviceEventEmitter.addListener("peerConnectionSignalingStateChanged",function(n){n.id===e._peerConnectionId&&(e.signalingState=n.signalingState,e.dispatchEvent(new y.default("signalingstatechange")))}),o.DeviceEventEmitter.addListener("peerConnectionAddedStream",function(n){if(n.id===e._peerConnectionId){for(var t=new d.default(n.streamId,n.streamReactTag),i=n.tracks,a=0;a-1&&e._remoteStreams.splice(i,1)}e.dispatchEvent(new l.default("removestream",{stream:t}))}}),o.DeviceEventEmitter.addListener("peerConnectionGotICECandidate",function(n){if(n.id===e._peerConnectionId){var t=new b.default(n.candidate),i=new I.default("icecandidate",{candidate:t});e.dispatchEvent(i)}}),o.DeviceEventEmitter.addListener("peerConnectionIceGatheringChanged",function(n){n.id===e._peerConnectionId&&(e.iceGatheringState=n.iceGatheringState,"complete"===e.iceGatheringState&&e.dispatchEvent(new I.default("icecandidate",null)),e.dispatchEvent(new y.default("icegatheringstatechange")))}),o.DeviceEventEmitter.addListener("peerConnectionDidOpenDataChannel",function(n){if(n.id===e._peerConnectionId){var t=n.dataChannel,i=t.id;if("number"==typeof i&&-1!==i){var a=new C.default(e._peerConnectionId,t.label,t);e._dataChannelIds.add(i),e.dispatchEvent(new v.default("datachannel",{channel:a}))}}})]}},{key:"createDataChannel",value:function(e,n){var t=void 0,i=this._dataChannelIds;if(n&&"id"in n){if("number"!=typeof(t=n.id))throw new TypeError("DataChannel id must be a number: "+t);if(i.has(t))throw new ResourceInUse("DataChannel id already in use: "+t)}else{for(t=0;t<65535&&i.has(t);++t);n=babelHelpers.extends({id:t},n)}return D.createDataChannel(this._peerConnectionId,e,n),i.add(t),new C.default(this._peerConnectionId,e,n)}}]),n}((0,r.default)(k));i.default=O},432); __d(function(e,t,r,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var i=t(64),n=t(237),c=babelHelpers.interopRequireDefault(n),s=t(434),u=babelHelpers.interopRequireDefault(s),l=i.NativeModules.WebRTCModule,o=["active","inactive","addtrack","removetrack"],d=function(e){function t(e,r){babelHelpers.classCallCheck(this,t);var a=babelHelpers.possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return a.active=!0,a._tracks=[],a.id=e,a.reactTag=void 0===r?e:r,a}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"addTrack",value:function(e){this._tracks.push(e),this.dispatchEvent(new u.default("addtrack",{track:e}))}},{key:"removeTrack",value:function(e){var t=this._tracks.indexOf(e);-1!==t&&(l.mediaStreamTrackRelease(this.reactTag,e.id),this._tracks.splice(t,1),this.dispatchEvent(new u.default("removetrack",{track:e})))}},{key:"getTracks",value:function(){return this._tracks.slice()}},{key:"getTrackById",value:function(e){return this._tracks.find(function(t){return t.id===e})}},{key:"getAudioTracks",value:function(){return this._tracks.filter(function(e){return"audio"===e.kind})}},{key:"getVideoTracks",value:function(){return this._tracks.filter(function(e){return"video"===e.kind})}},{key:"clone",value:function(){throw new Error("Not implemented.")}},{key:"toURL",value:function(){return this.reactTag}},{key:"release",value:function(){l.mediaStreamRelease(this.reactTag)}}]),t}((0,c.default)(o));a.default=d},433); __d(function(e,t,s,l){"use strict";Object.defineProperty(l,"__esModule",{value:!0});var i=function e(t,s){babelHelpers.classCallCheck(this,e),this.type=t.toString(),babelHelpers.extends(this,s)};l.default=i},434); __d(function(e,t,s,l){"use strict";Object.defineProperty(l,"__esModule",{value:!0});var i=function e(t,s){babelHelpers.classCallCheck(this,e),this.type=t.toString(),babelHelpers.extends(this,s)};l.default=i},435); __d(function(e,t,r,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=t(64),a=t(237),l=babelHelpers.interopRequireDefault(a),o=t(437),s=(babelHelpers.interopRequireDefault(o),n.NativeModules.WebRTCModule),d=["ended","mute","unmute","overconstrained"],u=function(e){function t(e){babelHelpers.classCallCheck(this,t);var r=babelHelpers.possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),i=e.readyState.toLowerCase();return r._enabled=e.enabled,r.id=e.id,r.kind=e.kind,r.label=e.label,r.muted=!1,r.readonly=!0,r.remote=e.remote,r.readyState="initializing"===i||"live"===i?"live":"ended",r}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,null,[{key:"getSources",value:function(e){s.mediaStreamTrackGetSources(e)}}]),babelHelpers.createClass(t,[{key:"stop",value:function(){this.remote||(s.mediaStreamTrackStop(this.id),this._enabled=!1,this.readyState="ended",this.muted=!this._enabled)}},{key:"_switchCamera",value:function(){if(this.remote)throw new Error("Not implemented for remote tracks");if("video"!==this.kind)throw new Error("Only implemented for video tracks");s.mediaStreamTrackSwitchCamera(this.id)}},{key:"applyConstraints",value:function(){throw new Error("Not implemented.")}},{key:"clone",value:function(){throw new Error("Not implemented.")}},{key:"getCapabilities",value:function(){throw new Error("Not implemented.")}},{key:"getConstraints",value:function(){throw new Error("Not implemented.")}},{key:"getSettings",value:function(){throw new Error("Not implemented.")}},{key:"enabled",get:function(){return this._enabled},set:function(e){e!==this._enabled&&(s.mediaStreamTrackSetEnabled(this.id,!this._enabled),this._enabled=!this._enabled,this.muted=!this._enabled)}}]),t}((0,l.default)(d));i.default=u},436); __d(function(e,t,s,l){"use strict";Object.defineProperty(l,"__esModule",{value:!0});var i=function e(t,s){babelHelpers.classCallCheck(this,e),this.type=t.toString(),babelHelpers.extends(this,s)};l.default=i},437); __d(function(e,t,r,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var a=t(64),i=t(245),o=babelHelpers.interopRequireDefault(i),s=t(237),l=babelHelpers.interopRequireDefault(s),d=t(439),u=babelHelpers.interopRequireDefault(d),c=t(440),f=babelHelpers.interopRequireDefault(c),p=a.NativeModules.WebRTCModule,b=["open","message","bufferedamountlow","close","error"],h=(function(e){function t(){return babelHelpers.classCallCheck(this,t),babelHelpers.possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}babelHelpers.inherits(t,e)}(Error),function(e){function t(e,r,n){babelHelpers.classCallCheck(this,t);var a=babelHelpers.possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return a.binaryType="arraybuffer",a.bufferedAmount=0,a.bufferedAmountLowThreshold=0,a.maxPacketLifeTime=null,a.maxRetransmits=null,a.negotiated=!1,a.ordered=!0,a.protocol="",a.readyState="connecting",a._peerConnectionId=e,a.label=r,a.id="id"in n?n.id:-1,a.ordered=!!n.ordered,a.maxPacketLifeTime=n.maxPacketLifeTime,a.maxRetransmits=n.maxRetransmits,a.protocol=n.protocol||"",a.negotiated=!!n.negotiated,a._registerEvents(),a}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"send",value:function(e){if("string"==typeof e)return void p.dataChannelSend(this._peerConnectionId,this.id,e,"text");if(ArrayBuffer.isView(e)&&(e=e.buffer),!(e instanceof ArrayBuffer))throw new TypeError("Data must be either string, ArrayBuffer, or ArrayBufferView");p.dataChannelSend(this._peerConnectionId,this.id,o.default.fromByteArray(new Uint8Array(e)),"binary")}},{key:"close",value:function(){"closing"!==this.readyState&&"closed"!==this.readyState&&(this.readyState="closing",p.dataChannelClose(this._peerConnectionId,this.id))}},{key:"_unregisterEvents",value:function(){this._subscriptions.forEach(function(e){return e.remove()}),this._subscriptions=[]}},{key:"_registerEvents",value:function(){var e=this;this._subscriptions=[a.DeviceEventEmitter.addListener("dataChannelStateChanged",function(t){t.peerConnectionId===e._peerConnectionId&&t.id===e.id&&(e.readyState=t.state,"open"===e.readyState?e.dispatchEvent(new f.default("open",{channel:e})):"close"===e.readyState&&(e.dispatchEvent(new f.default("close",{channel:e})),e._unregisterEvents()))}),a.DeviceEventEmitter.addListener("dataChannelReceiveMessage",function(t){if(t.peerConnectionId===e._peerConnectionId&&t.id===e.id){var r=t.data;"binary"===t.type&&(r=o.default.toByteArray(t.data).buffer),e.dispatchEvent(new u.default("message",{data:r}))}})]}}]),t}((0,l.default)(b)));n.default=h},438); __d(function(e,t,s,l){"use strict";Object.defineProperty(l,"__esModule",{value:!0});var i=function e(t,s){babelHelpers.classCallCheck(this,e),this.type=t.toString(),babelHelpers.extends(this,s)};l.default=i},439); __d(function(e,t,s,l){"use strict";Object.defineProperty(l,"__esModule",{value:!0});var i=function e(t,s){babelHelpers.classCallCheck(this,e),this.type=t.toString(),babelHelpers.extends(this,s)};l.default=i},440); __d(function(e,t,s,l){"use strict";Object.defineProperty(l,"__esModule",{value:!0});var i=function(){function e(t){babelHelpers.classCallCheck(this,e),this.sdp=t.sdp,this.type=t.type}return babelHelpers.createClass(e,[{key:"toJSON",value:function(){return{sdp:this.sdp,type:this.type}}}]),e}();l.default=i},441); __d(function(e,d,i,s){"use strict";Object.defineProperty(s,"__esModule",{value:!0});var t=function(){function e(d){babelHelpers.classCallCheck(this,e),this.candidate=d.candidate,this.sdpMLineIndex=d.sdpMLineIndex,this.sdpMid=d.sdpMid}return babelHelpers.createClass(e,[{key:"toJSON",value:function(){return{candidate:this.candidate,sdpMLineIndex:this.sdpMLineIndex,sdpMid:this.sdpMid}}}]),e}();s.default=t},442); __d(function(e,t,a,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var d=function e(t,a){babelHelpers.classCallCheck(this,e),this.type=t.toString(),this.candidate=null,a&&a.candidate&&(this.candidate=a.candidate)};i.default=d},443); __d(function(e,t,s,l){"use strict";Object.defineProperty(l,"__esModule",{value:!0});var i=function e(t,s){babelHelpers.classCallCheck(this,e),this.type=t.toString(),babelHelpers.extends(this,s)};l.default=i},444); __d(function(e,i,o,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=i(64),n=i(34),s=(t.NativeModules.WebRTCModule,{name:"RTCVideoView",propTypes:{mirror:n.PropTypes.bool,objectFit:n.PropTypes.oneOf(["contain","cover"]),streamURL:n.PropTypes.string,zOrder:n.PropTypes.number}}),a=(0,t.requireNativeComponent)("RTCVideoView",s,{nativeOnly:{testID:!0,accessibilityComponentType:!0,renderToHardwareTextureAndroid:!0,accessibilityLabel:!0,accessibilityLiveRegion:!0,importantForAccessibility:!0,onLayout:!0,nativeID:!0}});r.default=a},445); __d(function(e,r,n,o){"use strict";function t(e,r,n){if("function"!=typeof r)throw new TypeError("successCallback is non-nullable and required");if("function"!=typeof n)throw new TypeError("errorCallback is non-nullable and required");if("object"!=typeof e)return void n(new TypeError("constraints is not a dictionary"));for(var o=0,t=["audio","video"],i=0;i=t.length)break;l=t[a++]}else{if(a=t.next(),a.done)break;l=a.value}var s=l;o.addTrack(new c.default(s))}r(o)},function(e,r){var o=void 0;switch(e){case"DOMException":"function"==typeof DOMException&&(o=new DOMException(void 0,r));break;case"OverconstrainedError":"function"==typeof OverconstrainedError&&(o=new OverconstrainedError(void 0,r));break;case"TypeError":o=new TypeError(r)}o||(o=new s.default({message:r,name:e})),n(o)})}Object.defineProperty(o,"__esModule",{value:!0}),o.default=t;var i=r(64),a=r(433),f=babelHelpers.interopRequireDefault(a),l=r(447),s=babelHelpers.interopRequireDefault(l),u=r(436),c=babelHelpers.interopRequireDefault(u),d=i.NativeModules.WebRTCModule},446); __d(function(e,s,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function e(s){babelHelpers.classCallCheck(this,e),this.name=s.name,this.message=s.message,this.constraintName=s.constraintName};a.default=n},447); __d(function(e,r,t,n){function o(){for(var e=this,r=arguments.length,t=Array(r),n=0;n=10&&"typ"===u[6]){for(var d=[u[4]],p=!1,c=8;c=l.length)break;h=l[y++]}else{if(y=l.next(),y.done)break;h=y.value}var m=h;if("break"===function(e){if(-1!==e.indexOf(":"))return p=!0,"break";o.has(e)||o.set(e,new Promise(function(r,t){var n=o.get(e);n&&"string"==typeof n?r(n):a(e).then(function(t){-1===t.indexOf(":")||t===o.get(e)?o.delete(e):o.set(e,t),r(t)},t)}))}(m))break}if(p){o.clear();break}s=u}}n.push(s)}while(t);return{ips:o,lines:n}}function d(e,r,t){if(0===r.size)return e;for(var n=0;n0&&(e=parseInt(t.substring(n+5,t.indexOf(".",n)),10));var r=t.indexOf("Trident/");if(!e&&r>0){var i=t.indexOf("rv:");e=parseInt(t.substring(i+3,t.indexOf(".",i)),10)}return e&&(h=v.RTC_BROWSER_IEXPLORER,m.info("This appears to be IExplorer, ver: "+e)),e}function c(){var e=void 0,t=window.navigator.userAgent,n=t.indexOf("Edge/");return!e&&n>0&&(e=parseInt(t.substring(n+5,t.indexOf(".",n)),10)),e&&(h=v.RTC_BROWSER_EDGE,m.info("This appears to be Edge, ver: "+e)),e}function u(){var e=navigator.userAgent;if(e.match(/Electron/)){h=v.RTC_BROWSER_ELECTRON;var t=e.match(/Electron\/([\d.]+)/)[1];return m.info("This appears to be Electron, ver: "+t),t}return null}function l(){var e=navigator.userAgent;if(e.match(/JitsiMeetNW/)){h=v.RTC_BROWSER_NWJS;var t=e.match(/JitsiMeetNW\/([\d.]+)/)[1];return m.info("This appears to be JitsiMeetNW, ver: "+t),t}return null}function d(){var e=navigator.userAgent.match(/\b(react[ \t_-]*native)(?:\/(\S+))?/i),t=void 0;if(e||"ReactNative"===navigator.product){h=v.RTC_BROWSER_REACT_NATIVE;var n=void 0;e&&e.length>2&&(n=e[1],t=e[2]),n||(n="react-native"),t||(t="unknown"),console.info("This appears to be "+n+", ver: "+t)}else t=null;return t}var p=n(0),f=void n.n(p),h=void 0,m=n.i(p.getLogger)(e),v={RTC_BROWSER_CHROME:"rtc_browser.chrome",RTC_BROWSER_OPERA:"rtc_browser.opera",RTC_BROWSER_FIREFOX:"rtc_browser.firefox",RTC_BROWSER_IEXPLORER:"rtc_browser.iexplorer",RTC_BROWSER_EDGE:"rtc_browser.edge",RTC_BROWSER_SAFARI:"rtc_browser.safari",RTC_BROWSER_NWJS:"rtc_browser.nwjs",RTC_BROWSER_ELECTRON:"rtc_browser.electron",RTC_BROWSER_REACT_NATIVE:"rtc_browser.react-native",doesVideoMuteByStreamRemove:function(){return!(v.isFirefox()||v.isEdge())},getBrowserType:function(){return h},getBrowserName:function(){return-1!==navigator.userAgent.indexOf("Android")?"android":h.split("rtc_browser.")[1]},isChrome:function(){return h===v.RTC_BROWSER_CHROME},isOpera:function(){return h===v.RTC_BROWSER_OPERA},isFirefox:function(){return h===v.RTC_BROWSER_FIREFOX},isIExplorer:function(){return h===v.RTC_BROWSER_IEXPLORER},isEdge:function(){return h===v.RTC_BROWSER_EDGE},isSafari:function(){return h===v.RTC_BROWSER_SAFARI},isNWJS:function(){return h===v.RTC_BROWSER_NWJS},isElectron:function(){return h===v.RTC_BROWSER_ELECTRON},isP2PSupported:function(){return!v.isEdge()},isReactNative:function(){return h===v.RTC_BROWSER_REACT_NATIVE},isTemasysPluginUsed:function(){return v.isSafari()||v.isIExplorer()&&v.getIExplorerVersion()<12},isVideoMuteOnConnInterruptedSupported:function(){return v.isChrome()},getFirefoxVersion:function(){return v.isFirefox()?f:null},getChromeVersion:function(){return v.isChrome()?f:null},getIExplorerVersion:function(){return v.isIExplorer()?f:null},getEdgeVersion:function(){return v.isEdge()?f:null},usesPlanB:function(){return!v.usesUnifiedPlan()},usesUnifiedPlan:function(){return v.isFirefox()},supportsBandwidthStatistics:function(){return!v.isFirefox()&&!v.isEdge()},supportsDataChannels:function(){return!v.isEdge()},supportsRTTStatistics:function(){return!v.isFirefox()&&!v.isEdge()},supportsSimulcast:function(){return v.isChrome()||v.isFirefox()||v.isElectron()||v.isNWJS()},supportsRtx:function(){return!v.isFirefox()},supportsRtpSender:function(){return v.isFirefox()}};f=function(){for(var e=void 0,t=[d,u,l,i,r,o,c,s,a],n=0;n=31}function i(){var e=arguments,n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return e;var r="color: "+this.color;e=[e[0],r,"color: inherit"].concat(Array.prototype.slice.call(e,1));var i=0,o=0;return e[0].replace(/%[a-z%]/g,function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))}),e.splice(o,0,r),e}function o(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function a(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}}function s(){var e;try{e=t.storage.debug}catch(e){}return e}t=e.exports=n(155),t.log=o,t.formatArgs=i,t.save=a,t.load=s,t.useColors=r,t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){return JSON.stringify(e)},t.enable(s())},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=n(14),o=n.n(i),a=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:new o.a;r(this,e),this.eventEmitter=t,this.addEventListener=this.on=this.addListener,this.removeEventListener=this.off=this.removeListener}return a(e,[{key:"addListener",value:function(e,t){this.eventEmitter.addListener(e,t)}},{key:"removeListener",value:function(e,t){this.eventEmitter.removeListener(e,t)}}]),e}();t.a=s},function(e,t,n){"use strict";function r(e,t,n){if("object"===(void 0===e?"undefined":a(e))&&void 0!==e.name)switch(this.gum={error:e,constraints:t,devices:n&&Array.isArray(n)?n.slice(0):void 0},e.name){case"PermissionDeniedError":case"SecurityError":this.name=o.PERMISSION_DENIED,this.message=s[this.name]+(this.gum.devices||[]).join(", ");break;case"DevicesNotFoundError":case"NotFoundError":this.name=o.NOT_FOUND,this.message=s[this.name]+(this.gum.devices||[]).join(", ");break;case"ConstraintNotSatisfiedError":case"OverconstrainedError":var r=e.constraintName||e.constraint;t&&t.video&&(!n||n.indexOf("video")>-1)&&("minWidth"===r||"maxWidth"===r||"minHeight"===r||"maxHeight"===r||"width"===r||"height"===r)?(this.name=o.UNSUPPORTED_RESOLUTION,this.message=s[this.name]+i(r,t)):(this.name=o.CONSTRAINT_FAILED,this.message=s[this.name]+e.constraintName);break;default:this.name=o.GENERAL,this.message=e.message||s[this.name]}else{if("string"!=typeof e)throw new Error("Invalid arguments");s[e]?(this.name=e,this.message=t||s[e]):this.message=e}this.stack=e.stack||(new Error).stack}function i(e,t){if(t&&t.video&&t.video.mandatory)switch(e){case"width":return t.video.mandatory.minWidth;case"height":return t.video.mandatory.minHeight;default:return t.video.mandatory[e]||""}return""}var o=n(15),a="function"==typeof Symbol&&"symbol"==typeof("function"==typeof Symbol?Symbol.iterator:"@@iterator")?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==("function"==typeof Symbol?Symbol.prototype:"@@prototype")?"symbol":typeof e},s={};s[o.UNSUPPORTED_RESOLUTION]="Video resolution is not supported: ",s[o.FIREFOX_EXTENSION_NEEDED]="Firefox extension is not installed",s[o.CHROME_EXTENSION_INSTALLATION_ERROR]="Failed to install Chrome extension",s[o.CHROME_EXTENSION_USER_GESTURE_REQUIRED]="Failed to install Chrome extension - installations can only be initiated by a user gesture.",s[o.CHROME_EXTENSION_USER_CANCELED]="User canceled Chrome's screen sharing prompt",s[o.CHROME_EXTENSION_GENERIC_ERROR]="Unknown error from Chrome extension",s[o.ELECTRON_DESKTOP_PICKER_ERROR]="Unkown error from desktop picker",s[o.ELECTRON_DESKTOP_PICKER_NOT_FOUND]="Failed to detect desktop picker",s[o.GENERAL]="Generic getUserMedia error",s[o.PERMISSION_DENIED]="User denied permission to use device(s): ",s[o.NOT_FOUND]="Requested device(s) was/were not found: ",s[o.CONSTRAINT_FAILED]="Constraint could not be satisfied: ",s[o.TRACK_IS_DISPOSED]="Track has been already disposed",s[o.TRACK_NO_STREAM_FOUND]="Track does not have an associated Media Stream",s[o.NO_DATA_FROM_SOURCE]="The track has stopped receiving data from it's source",r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,t.a=r},function(e,t,n){"use strict";(function(e){var r=n(0),i=(n.n(r),n(19)),o=n.n(i),a=n(1),s=n.i(r.getLogger)(e),c={filterSpecialChars:function(e){return e?e.replace(/[\\\/\{,\}\+]/g,""):e},iceparams:function(e,t){var n=null,r=void 0,i=void 0;return(i=c.findLine(e,"a=ice-ufrag:",t))&&(r=c.findLine(e,"a=ice-pwd:",t))&&(n={ufrag:c.parseICEUfrag(i),pwd:c.parseICEPwd(r)}),n},parseICEUfrag:function(e){return e.substring(12)},buildICEUfrag:function(e){return"a=ice-ufrag:"+e},parseICEPwd:function(e){return e.substring(10)},buildICEPwd:function(e){return"a=ice-pwd:"+e},parseMID:function(e){return e.substring(6)},parseMLine:function(e){var t={},n=e.substring(2).split(" ");return t.media=n.shift(),t.port=n.shift(),t.proto=n.shift(),""===n[n.length-1]&&n.pop(),t.fmt=n,t},buildMLine:function(e){return"m="+e.media+" "+e.port+" "+e.proto+" "+e.fmt.join(" ")},parseRTPMap:function(e){var t={},n=e.substring(9).split(" ");return t.id=n.shift(),n=n[0].split("/"),t.name=n.shift(),t.clockrate=n.shift(),t.channels=n.length?n.shift():"1",t},parseSCTPMap:function(e){var t=e.substring(10).split(" ");return[t[0],t[1],t.length>2?t[2]:null]},buildRTPMap:function(e){var t="a=rtpmap:"+e.getAttribute("id")+" "+e.getAttribute("name")+"/"+e.getAttribute("clockrate");return e.getAttribute("channels")&&"1"!==e.getAttribute("channels")&&(t+="/"+e.getAttribute("channels")),t},parseCrypto:function(e){var t={},n=e.substring(9).split(" ");return t.tag=n.shift(),t["crypto-suite"]=n.shift(),t["key-params"]=n.shift(),n.length&&(t["session-params"]=n.join(" ")),t},parseFingerprint:function(e){var t={},n=e.substring(14).split(" ");return t.hash=n.shift(),t.fingerprint=n.shift(),t},parseFmtp:function(e){var t=[],n=e.split(" ");n.shift(),n=n.join(" ").split(";");for(var r=0;r1&&0===n)){var r=null;if(1===t)r=e.ssrcs[0].id;else if(2===t){var i=e.ssrcGroups.find(function(e){return"FID"===e.semantics});i&&(r=i.ssrcs.split(" ")[0])}else if(t>=3){var o=e.ssrcGroups.find(function(e){return"SIM"===e.semantics});o&&(r=o.ssrcs.split(" ")[0])}return r}},generateSsrc:function(){return o.a.randomInt(1,4294967295)},getSsrcAttribute:function(e,t,n){for(var r=0;r0)return t[0].substr("a=ice-ufrag:".length)},preferVideoCodec:function(e,t){var n=null;if(t){for(var r=0;r0&&this._events[e].length>i&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function n(){this.removeListener(e,n),i||(i=!0,t.apply(this,arguments))}if(!r(t))throw TypeError("listener must be a function");var i=!1;return n.listener=t,this.on(e,n),this},n.prototype.removeListener=function(e,t){var n,i,a,s;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],a=n.length,i=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(n)){for(s=a;s-- >0;)if(n[s]===t||n[s].listener&&n[s].listener===t){i=s;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],r(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"CHROME_EXTENSION_GENERIC_ERROR",function(){return r}),n.d(t,"CHROME_EXTENSION_INSTALLATION_ERROR",function(){return i}),n.d(t,"CHROME_EXTENSION_USER_GESTURE_REQUIRED",function(){return o}),n.d(t,"CHROME_EXTENSION_USER_CANCELED",function(){return a}),n.d(t,"CONSTRAINT_FAILED",function(){return s}),n.d(t,"ELECTRON_DESKTOP_PICKER_ERROR",function(){return c}),n.d(t,"ELECTRON_DESKTOP_PICKER_NOT_FOUND",function(){return u}),n.d(t,"FIREFOX_EXTENSION_NEEDED",function(){return l}),n.d(t,"GENERAL",function(){return d}),n.d(t,"NOT_FOUND",function(){return p}),n.d(t,"PERMISSION_DENIED",function(){return f}),n.d(t,"TRACK_IS_DISPOSED",function(){return h}),n.d(t,"TRACK_NO_STREAM_FOUND",function(){return m}),n.d(t,"UNSUPPORTED_RESOLUTION",function(){return v}),n.d(t,"NO_DATA_FROM_SOURCE",function(){return y});var r="gum.chrome_extension_generic_error",i="gum.chrome_extension_installation_error",o="gum.chrome_extension_user_gesture_required",a="gum.chrome_extension_user_canceled",s="gum.constraint_failed",c="gum.electron_desktop_picker_error",u="gum.electron_desktop_picker_not_found",l="gum.firefox_extension_needed",d="gum.general",p="gum.not_found",f="gum.permission_denied",h="track.track_is_disposed",m="track.no_stream_found",v="gum.unsupported_resolution",y="track.no_data_from_source"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"LOCAL_TRACK_STOPPED",function(){return r}),n.d(t,"TRACK_AUDIO_LEVEL_CHANGED",function(){return i}),n.d(t,"TRACK_AUDIO_OUTPUT_CHANGED",function(){return o}),n.d(t,"TRACK_MUTE_CHANGED",function(){return a}),n.d(t,"TRACK_VIDEOTYPE_CHANGED",function(){return s}),n.d(t,"NO_DATA_FROM_SOURCE",function(){return c});var r="track.stopped",i="track.audioLevelsChanged",o="track.audioOutputChanged",a="track.trackMuteChanged",s="track.videoTypeChanged",c="track.no_data_from_source"},function(e,t){var n={CAMERA:"camera",DESKTOP:"desktop"};e.exports=n},function(e,t,n){(function(e){function r(e,n){return n("b"+t.packets[e.type]+e.data.data)}function i(e,n,r){if(!n)return t.encodeBase64Packet(e,r);var i=e.data,o=new Uint8Array(i),a=new Uint8Array(1+i.byteLength);a[0]=y[e.type];for(var s=0;s1?{type:g[i],data:e.substring(1)}:{type:g[i]}:b}var o=new Uint8Array(e),i=o[0],a=l(e,1);return S&&"blob"===n&&(a=new S([a])),{type:g[i],data:a}},t.decodeBase64Packet=function(t,n){var r=g[t.charAt(0)];if(!e.ArrayBuffer)return{type:r,data:{base64:!0,data:t.substr(1)}};var i=d.decode(t.substr(1));return"blob"===n&&S&&(i=new S([i])),{type:r,data:i}},t.encodePayload=function(e,n,r){function i(e){return e.length+":"+e}function o(e,r){t.encodePacket(e,!!a&&n,!0,function(e){r(null,i(e))})}"function"==typeof n&&(r=n,n=null);var a=u(e);return n&&a?S&&!v?t.encodePayloadAsBlob(e,r):t.encodePayloadAsArrayBuffer(e,r):e.length?void s(e,o,function(e,t){return r(t.join(""))}):r("0:")},t.decodePayload=function(e,n,r){if("string"!=typeof e)return t.decodePayloadAsBinary(e,n,r);"function"==typeof n&&(r=n,n=null);var i;if(""==e)return r(b,0,1);for(var o,a,s="",c=0,u=e.length;c0;){for(var s=new Uint8Array(i),c=0===s[0],u="",d=1;255!=s[d];d++){if(u.length>310){a=!0;break}u+=s[d]}if(a)return r(b,0,1);i=l(i,2+u.length),u=parseInt(u);var p=l(i,0,u);if(c)try{p=String.fromCharCode.apply(null,new Uint8Array(p))}catch(e){var f=new Uint8Array(p);p="";for(var d=0;d0&&void 0!==arguments[0]?arguments[0]:function(){function e(){o(this,e)}return e}();return function(e){function t(){var e;o(this,t);for(var n=arguments.length,i=Array(n),a=0;a1&&void 0!==arguments[1]?arguments[1]:{};r(this,t);var o=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return o.conference=e,o.peerConnections=new Map,o.peerConnectionIdCounter=1,o.localTracks=[],o.options=n,o._channel=null,o._channelOpen=!1,o._lastN=-1,o._lastNEndpoints=null,o._pinnedEndpoint=null,o._selectedEndpoint=null,o._lastNChangeListener=o._onLastNChanged.bind(o),b.a.isDeviceChangeAvailable("output")&&b.a.addListener(g.a.AUDIO_OUTPUT_DEVICE_CHANGED,function(e){var t=o.getRemoteTracks(v.a),n=!0,r=!1,i=void 0;try{for(var a,s=t["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(n=(a=s.next()).done);n=!0)a.value.setAudioOutput(e)}catch(e){r=!0,i=e}finally{try{!n&&s.return&&s.return()}finally{if(r)throw i}}}),o}return o(t,e),_(t,[{key:"initializeBridgeChannel",value:function(e,t){var n=this;this._channel=new c.a(e,t,this.eventEmitter),this._channelOpenListener=function(){n._channelOpen=!0;try{n._channel.sendPinnedEndpointMessage(n._pinnedEndpoint),n._channel.sendSelectedEndpointMessage(n._selectedEndpoint)}catch(e){l.a.callErrorHandler(e),w.error("Cannot send selected("+n._selectedEndpoint+")pinned("+n._pinnedEndpoint+") endpoint message.",e)}n.removeListener(g.a.DATA_CHANNEL_OPEN,n._channelOpenListener),n._channelOpenListener=null,-1!==n._lastN&&n._channel.sendSetLastNMessage(n._lastN)},this.addListener(g.a.DATA_CHANNEL_OPEN,this._channelOpenListener),this.addListener(g.a.LASTN_ENDPOINT_CHANGED,this._lastNChangeListener)}},{key:"_onLastNChanged",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=this._lastNEndpoints||[],r=[],i=[];this._lastNEndpoints=t,r=n.filter(function(t){return!e.isInLastN(t)}),i=t.filter(function(e){return-1===n.indexOf(e)}),this.conference.eventEmitter.emit(d.LAST_N_ENDPOINTS_CHANGED,r,i)}},{key:"onCallEnded",value:function(){this._channel&&(this._channel&&"websocket"===this._channel.mode&&this._channel.close(),this._channel=null,this._channelOpen=!1)}},{key:"setReceiverVideoConstraint",value:function(e){this._channel&&this._channel.sendReceiverVideoConstraintMessage(e)}},{key:"selectEndpoint",value:function(e){this._selectedEndpoint=e,this._channel&&this._channelOpen&&this._channel.sendSelectedEndpointMessage(e)}},{key:"pinEndpoint",value:function(e){this._pinnedEndpoint=e,this._channel&&this._channelOpen&&this._channel.sendPinnedEndpointMessage(e)}},{key:"createPeerConnection",value:function(e,n,r,i){var o=new S.a(this,this.peerConnectionIdCounter,e,n,t.getPCConstraints(r),r,i);return this.peerConnections.set(o.id,o),this.peerConnectionIdCounter+=1,o}},{key:"_removePeerConnection",value:function(e){var t=e.id;return!!this.peerConnections.has(t)&&(this.peerConnections.delete(t),!0)}},{key:"addLocalTrack",value:function(e){if(!e)throw new Error("track must not be null nor undefined");this.localTracks.push(e),e.conference=this.conference}},{key:"getLastN",value:function(){return this._lastN}},{key:"getLocalVideoTrack",value:function(){var e=this.getLocalTracks(v.b);return e.length?e[0]:void 0}},{key:"getLocalAudioTrack",value:function(){var e=this.getLocalTracks(v.a);return e.length?e[0]:void 0}},{key:"getLocalTracks",value:function(e){var t=this.localTracks.slice();return void 0!==e&&(t=t.filter(function(t){return t.getType()===e})),t}},{key:"getRemoteTracks",value:function(e){var t=[],n=!0,r=!1,i=void 0;try{for(var o,a=this.peerConnections.values()["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(n=(o=a.next()).done);n=!0){var s=o.value,c=s.getRemoteTracks(void 0,e);c&&(t=t.concat(c))}}catch(e){r=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}return t}},{key:"setAudioMute",value:function(e){var t=[];return this.getLocalTracks(v.a).forEach(function(n){t.push(e?n.mute():n.unmute())}),Promise.all(t)}},{key:"removeLocalTrack",value:function(e){var t=this.localTracks.indexOf(e);-1!==t&&this.localTracks.splice(t,1)}},{key:"removeRemoteTracks",value:function(e){var t=[],n=!0,r=!1,i=void 0;try{for(var o,a=this.peerConnections.values()["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(n=(o=a.next()).done);n=!0){var s=o.value,c=s.removeRemoteTracks(e);t=t.concat(c)}}catch(e){r=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}return w.debug("Removed remote tracks for "+e+" count: "+t.length),t}},{key:"closeBridgeChannel",value:function(){this._channel&&(this._channel.close(),this._channelOpen=!1,this.removeListener(g.a.LASTN_ENDPOINT_CHANGED,this._lastNChangeListener))}},{key:"setAudioLevel",value:function(e,t,n,r){var i=e.getTrackBySSRC(t);if(i){if(!i.isAudioTrack())return void w.warn("Received audio level for non-audio track: "+t);i.isLocal()!==r&&w.error(i+" was expected to "+(r?"be":"not be")+" local"),i.setAudioLevel(n,e)}}},{key:"sendChannelMessage",value:function(e,t){if(!this._channel)throw new Error("Channel support is disabled!");this._channel.sendMessage(e,t)}},{key:"setLastN",value:function(e){this._lastN!==e&&(this._lastN=e,this._channel&&this._channelOpen&&this._channel.sendSetLastNMessage(e),this.eventEmitter.emit(g.a.LASTN_VALUE_CHANGED,e))}},{key:"isInLastN",value:function(e){return!this._lastNEndpoints||this._lastNEndpoints.indexOf(e)>-1}}],[{key:"obtainAudioAndVideoPermissions",value:function(e){return b.a.obtainAudioAndVideoPermissions(e).then(function(t){var n=a(t,e);return n.some(function(e){return!e._isReceivingData()})?Promise.reject(new f.a(h.NO_DATA_FROM_SOURCE)):n})}},{key:"addListener",value:function(e,t){b.a.addListener(e,t)}},{key:"removeListener",value:function(e,t){b.a.removeListener(e,t)}},{key:"isRTCReady",value:function(){return b.a.isRTCReady()}},{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.options=e,b.a.init(this.options)}},{key:"getDeviceAvailability",value:function(){return b.a.getDeviceAvailability()}},{key:"getPCConstraints",value:function(e){return e?b.a.p2pPcConstraints:b.a.pcConstraints}},{key:"attachMediaStream",value:function(e,t){return b.a.attachMediaStream(e,t)}},{key:"getStreamID",value:function(e){return b.a.getStreamID(e)}},{key:"getTrackID",value:function(e){return b.a.getTrackID(e)}},{key:"isDeviceListAvailable",value:function(){return b.a.isDeviceListAvailable()}},{key:"isDeviceChangeAvailable",value:function(e){return b.a.isDeviceChangeAvailable(e)}},{key:"getAudioOutputDevice",value:function(){return b.a.getAudioOutputDevice()}},{key:"getCurrentlyAvailableMediaDevices",value:function(){return b.a.getCurrentlyAvailableMediaDevices()}},{key:"getEventDataForActiveDevice",value:function(e){return b.a.getEventDataForActiveDevice(e)}},{key:"setAudioOutputDevice",value:function(e){return b.a.setAudioOutputDevice(e)}},{key:"isUserStream",value:function(e){return t.isUserStreamById(b.a.getStreamID(e))}},{key:"isUserStreamById",value:function(e){return e&&"mixedmslabel"!==e&&"default"!==e}},{key:"enumerateDevices",value:function(e){b.a.enumerateDevices(e)}},{key:"stopMediaStream",value:function(e){b.a.stopMediaStream(e)}},{key:"isDesktopSharingEnabled",value:function(){return b.a.isDesktopSharingEnabled()}}]),t}(m.a);t.a=k}).call(t,"modules/RTC/RTC.js")},function(e,t,n){"use strict";(function(e){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t=0){if(n.video={mandatory:{},optional:[]},t.cameraDeviceId)r&&(n.video.deviceId=t.cameraDeviceId),n.video.optional.push({sourceId:t.cameraDeviceId});else{var i=t.facingMode||w.a.USER;r&&(n.video.facingMode=i),n.video.optional.push({facingMode:i})}(t.minFps||t.maxFps||t.fps)&&((t.minFps||t.fps)&&(t.minFps=t.minFps||t.fps,n.video.mandatory.minFrameRate=t.minFps),t.maxFps&&(n.video.mandatory.maxFrameRate=t.maxFps)),c(n,r,t.resolution)}if(e.indexOf("audio")>=0&&(x.a.isReactNative()?n.audio=!0:x.a.isFirefox()?t.micDeviceId?n.audio={mandatory:{},deviceId:t.micDeviceId,optional:[{sourceId:t.micDeviceId}]}:n.audio=!0:(n.audio={mandatory:{},optional:[]},t.micDeviceId&&(r&&(n.audio.deviceId=t.micDeviceId),n.audio.optional.push({sourceId:t.micDeviceId})),n.audio.optional.push({echoCancellation:!te&&!ee},{googEchoCancellation:!te&&!ee},{googAutoGainControl:!re&&!ee},{googNoiseSupression:!ne&&!ee},{googHighpassFilter:!ie&&!ee},{googNoiseSuppression2:!ne&&!ee},{googEchoCancellation2:!te&&!ee},{googAutoGainControl2:!re&&!ee}))),e.indexOf("screen")>=0)if(x.a.isChrome())n.video={mandatory:{chromeMediaSource:"screen",maxWidth:window.screen.width,maxHeight:window.screen.height,maxFrameRate:3},optional:[]};else if(x.a.isTemasysPluginUsed())n.video={optional:[{sourceId:q.WebRTCPlugin.plugin.screensharingKey}]};else if(x.a.isFirefox())n.video={mozMediaSource:"window",mediaSource:"window"};else{var o="'screen' WebRTC media source is supported only in Chrome and with Temasys plugin";I.a.callErrorHandler(new Error(o)),K.error(o)}return e.indexOf("desktop")>=0&&(n.video={mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:t.desktopStream,maxWidth:window.screen.width,maxHeight:window.screen.height,maxFrameRate:3},optional:[]}),t.bandwidth&&(n.video||(n.video={mandatory:{},optional:[]}),n.video.optional.push({bandwidth:t.bandwidth})),x.a.isFirefox()&&t.firefox_fake_device&&(n.fake=!0),n}function l(e,t){var n=t&&t.getAudioTracks().length>0,r=t&&t.getVideoTracks().length>0;-1!==e.indexOf("video")&&(Q.video=r),-1!==e.indexOf("audio")&&(Q.audio=n),z.emit(F.a.AVAILABLE_DEVICES_CHANGED,Q)}function d(e){function t(e){return JSON.stringify({kind:e.kind,deviceId:e.deviceId,groupId:e.groupId,label:e.label,facing:e.facing})}return e.length!==se.length||e.map(t).sort().join("")!==se.map(t).sort().join("")}function p(){ce&&ce(function(e){void 0===se?se=e.slice(0):d(e)&&f(e),window.setTimeout(p,X)})}function f(e){se=e.slice(0),K.info("list of media devices has changed:",se);var t=se.filter(function(e){return"videoinput"===e.kind}),n=se.filter(function(e){return"audioinput"===e.kind}),r=t.filter(function(e){return""===e.label}),i=n.filter(function(e){return""===e.label});t.length&&t.length===r.length&&(Q.video=!1),n.length&&n.length===i.length&&(Q.audio=!1),z.emit(F.a.DEVICE_LIST_CHANGED,e)}function h(e,t){e&&e.apply(void 0,a(t))}function m(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?function(t,n,r){return e(t).then(function(e){return h(n,[e]),e}).catch(function(e){throw h(r,[e]),e})}:function(t,n,r){e(t,function(e){h(n,[e])},function(e){h(r,[e])})}}function v(e){MediaStreamTrack.getSources(function(t){return e(t.map(y))})}function y(e){var t=(e.kind||"").toLowerCase();return{facing:e.facing||null,label:e.label,kind:t?"audiooutput"===t?t:t+"input":null,deviceId:e.id,groupId:e.groupId||null}}function g(e,t){var n=void 0,r=void 0,i=void 0,o=[];if(e){var a=e.audioVideo;if(a){var s=window.webkitMediaStream||window.MediaStream,c=a.getAudioTracks();if(c.length){n=new s;for(var u=0;u= 40.",r);t.RTCPeerConnectionType=mozRTCPeerConnection,t.getUserMedia=m(navigator.mozGetUserMedia.bind(navigator)),t.enumerateDevices=ce,t.pcConstraints={},t.attachMediaStream=_(function(e,t){return e&&(b(e,t),t&&e.play()),e}),t.getStreamID=function(e){var t=e.id;if(!t){var n=e.getVideoTracks();n&&0!==n.length||(n=e.getAudioTracks()),t=n[0].id}return J.a.filterSpecialChars(t)},t.getTrackID=function(e){return e.id},RTCSessionDescription=mozRTCSessionDescription,RTCIceCandidate=mozRTCIceCandidate}else if(x.a.isChrome()||x.a.isOpera()||x.a.isNWJS()||x.a.isElectron()||x.a.isReactNative()){t.RTCPeerConnectionType=webkitRTCPeerConnection;var o=navigator.webkitGetUserMedia.bind(navigator);t.getUserMedia=m(o),t.enumerateDevices=ce,t.attachMediaStream=_(function(e,t){return b(e,t),e}),t.getStreamID=function(e){var t=e.id;return"number"==typeof t?t:J.a.filterSpecialChars(t)},t.getTrackID=function(e){return e.id},t.pcConstraints={optional:[]},e.useIPv6&&t.pcConstraints.optional.push({googIPv6:!0}),webkitMediaStream.prototype.getVideoTracks||(webkitMediaStream.prototype.getVideoTracks=function(){return this.videoTracks}),webkitMediaStream.prototype.getAudioTracks||(webkitMediaStream.prototype.getAudioTracks=function(){return this.audioTracks}),t.p2pPcConstraints=JSON.parse(JSON.stringify(t.pcConstraints)),e.disableSuspendVideo||t.pcConstraints.optional.push({googSuspendBelowMinBitrate:!0}),t.p2pPcConstraints.optional.push({googSuspendBelowMinBitrate:!0})}else if(x.a.isEdge())t.RTCPeerConnectionType=U.a,t.getUserMedia=m(navigator.mediaDevices.getUserMedia.bind(navigator.mediaDevices),!0),t.enumerateDevices=ce,t.attachMediaStream=_(function(e,t){return b(e,t),e}),t.getStreamID=function(e){var t=e.jitsiRemoteId||e.id;return J.a.filterSpecialChars(t)},t.getTrackID=function(e){return e.jitsiRemoteId||e.id};else{if(!x.a.isTemasysPluginUsed())return void S("Browser does not appear to be WebRTC-capable",r);var a=function(){t.RTCPeerConnectionType=RTCPeerConnection,t.getUserMedia=window.getUserMedia,t.enumerateDevices=v,t.attachMediaStream=_(function(e,t){if(t){if("dummyAudio"===t.id||"dummyVideo"===t.id)return;var n=$(e);if(x.a.isTemasysPluginUsed()&&!n.is(":visible")&&n.show(),t.getVideoTracks().length>0&&!$(e).is(":visible"))throw new Error("video element must be visible to attach video stream")}return attachMediaStream(e,t)}),t.getStreamID=function(e){return J.a.filterSpecialChars(e.label)},t.getTrackID=function(e){return e.id},T(e,t.getUserMediaWithConstraints.bind(t))},s=new Promise(function(e){return q.webRTCReady(e)});q.WebRTCPlugin.isPluginInstalled(q.WebRTCPlugin.pluginInfo.prefix,q.WebRTCPlugin.pluginInfo.plugName,q.WebRTCPlugin.pluginInfo.type,function(){s.then(function(){a(),n()})},function(){var e=new Error("Temasys plugin is not installed");e.name="WEBRTC_NOT_READY",e.webRTCReadyPromise=s,r(e)})}t.p2pPcConstraints=t.p2pPcConstraints||t.pcConstraints,x.a.isTemasysPluginUsed()||(T(e,t.getUserMediaWithConstraints.bind(t)),n())})}},{key:"getUserMediaWithConstraints",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=u(e,r);K.info("Get media constraints",i);try{this.getUserMedia(i,function(n){K.log("onUserMediaSuccess"),l(e,n),t(n)},function(t){l(e,void 0),K.warn("Failed to get access to local media. Error ",t,i),n&&n(new O.a(t,i,e))})}catch(t){K.error("GUM failed: ",t),n&&n(new O.a(t,i,e))}}},{key:"obtainAudioAndVideoPermissions",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this,r=V({},t.desktopSharingExtensionExternalInstallation,{desktopSharingSources:t.desktopSharingSources});return new Promise(function(i,o){var a=function(e){i(g(e,t.resolution))};if(t.devices=t.devices||["audio","video"],B.a.isSupported()||-1===t.devices.indexOf("desktop")||o(new Error("Desktop sharing is not supported!")),x.a.isFirefox()||x.a.isReactNative()||x.a.isTemasysPluginUsed()){var s=function(e,n,r){this.getUserMediaWithConstraints(e,n,r,t)},c={audio:s.bind(n,["audio"]),video:s.bind(n,["video"])};B.a.isSupported()&&(c.desktop=B.a.obtainStream.bind(B.a,r)),E({devices:t.devices,streams:[],successCallback:a,errorCallback:o,deviceGUM:c})}else{var l=t.devices.indexOf("desktop")>-1;l&&t.devices.splice(t.devices.indexOf("desktop"),1),t.resolution=t.resolution||"360",t.devices.length?e.getUserMediaWithConstraints(t.devices,function(e){var i=-1!==t.devices.indexOf("audio"),s=-1!==t.devices.indexOf("video"),c=e.getAudioTracks().length>0,d=e.getVideoTracks().length>0;if(i&&!c||s&&!d){n.stopMediaStream(e);var p=[];return i&&!c&&p.push("audio"),s&&!d&&p.push("video"),void n.getUserMediaWithConstraints(p,function(){o(new O.a({name:"UnknownError"},u(t.devices,t),p))},function(e){o(e)},t)}l?B.a.obtainStream(r,function(t){a({audioVideo:e,desktop:t})},function(t){n.stopMediaStream(e),o(t)}):a({audioVideo:e})},function(e){return o(e)},t):l&&B.a.obtainStream(r,function(e){return a({desktop:e})},function(e){return o(e)})}})}},{key:"getDeviceAvailability",value:function(){return Q}},{key:"isRTCReady",value:function(){return le}},{key:"_isDeviceListAvailable",value:function(){if(!le)throw new Error("WebRTC not ready yet");return Boolean(navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices||"undefined"!=typeof MediaStreamTrack&&MediaStreamTrack.getSources)}},{key:"onRTCReady",value:function(){return le?Promise.resolve():new Promise(function(e){var t=function t(){z.removeListener(F.a.RTC_READY,t),e()};z.addListener(F.a.RTC_READY,t)})}},{key:"isDeviceListAvailable",value:function(){return this.onRTCReady().then(this._isDeviceListAvailable.bind(this))}},{key:"isDeviceChangeAvailable",value:function(e){return"output"===e||"audiooutput"===e?ae:x.a.isChrome()||x.a.isFirefox()||x.a.isOpera()||x.a.isTemasysPluginUsed()||x.a.isNWJS()||x.a.isElectron()||x.a.isEdge()}},{key:"stopMediaStream",value:function(e){e.getTracks().forEach(function(e){!x.a.isTemasysPluginUsed()&&e.stop&&e.stop()}),e.stop&&e.stop(),e.release&&e.release();var t=e.jitsiObjectURL;t&&(delete e.jitsiObjectURL,(URL||webkitURL).revokeObjectURL(t))}},{key:"isDesktopSharingEnabled",value:function(){return B.a.isSupported()}},{key:"setAudioOutputDevice",value:function(e){return this.isDeviceChangeAvailable("output")||Promise.reject(new Error("Audio output device change is not supported")),oe.setSinkId(e).then(function(){Y=e,Z=!0,K.log("Audio output device set to "+e),z.emit(F.a.AUDIO_OUTPUT_DEVICE_CHANGED,e)})}},{key:"getAudioOutputDevice",value:function(){return Y}},{key:"getCurrentlyAvailableMediaDevices",value:function(){return se}},{key:"getEventDataForActiveDevice",value:function(e){var t=[],n={deviceId:e.deviceId,kind:e.kind,label:e.label,groupId:e.groupId};return t.push(n),{deviceList:t}}}]),t}(D.a),pe=new de;t.a=pe}).call(t,"modules/RTC/RTCUtils.js")},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){return parseInt(e.ssrcs.split(" ")[0],10)}function o(e){return parseInt(e.ssrcs.split(" ")[1],10)}function a(e){return e.ssrcs?e.ssrcs.map(function(e){return e.id}).filter(function(e,t,n){return n.indexOf(e)===t}).length:0}t.c=i,t.b=o,n.d(t,"a",function(){return l});var s=n(13),c=(n.n(s),function(){function e(e,t){for(var n=0;n=i}},{key:"refreshConnectionStatusForAll",value:function(){var e=this.conference.getParticipants(),t=!0,n=!1,r=void 0;try{for(var i,o=e["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(t=(i=o.next()).done);t=!0){var a=i.value;this.figureOutConnectionStatus(a.getId())}}catch(e){n=!0,r=e}finally{try{!t&&o.return&&o.return()}finally{if(n)throw r}}}},{key:"figureOutConnectionStatus",value:function(t){var n=this.conference.getParticipantById(t);if(!n)return void f.warn("figure out conn status - no participant for: "+t);var r=this.conference.isP2PActive(),i=this._isRestoringTimedout(t),o=0===this.rtc.getLastN(),a=n.isVideoMuted()||o,s=this.isVideoTrackFrozen(n),c=this.rtc.isInLastN(t),u=this.connStatusFromJvb[t];"boolean"!=typeof u&&(f.debug("Assuming connection active by JVB - no notification"),u=!0);var l=r?e._getNewStateForP2PMode(a,s):e._getNewStateForJvbMode(u,c,i,a,s);l!==v.RESTORING&&this._clearRestoringTimer(t),f.debug("Figure out conn status for "+t+", is video muted: "+a+" is active(jvb): "+u+" video track frozen: "+s+" p2p mode: "+r+" is in last N: "+c+" currentStatus => newStatus: \n "+n.getConnectionStatus()+" => "+l),this._changeConnectionStatus(n,l)}},{key:"_onLastNChanged",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=Date.now();f.debug("leaving/entering lastN",e,t,n);var r=!0,i=!1,o=void 0;try{for(var a,s=e["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(r=(a=s.next()).done);r=!0){var c=a.value;this.enteredLastNTimestamp.delete(c),this._clearRestoringTimer(c),this.figureOutConnectionStatus(c)}}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}var u=!0,l=!1,d=void 0;try{for(var p,h=t["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(u=(p=h.next()).done);u=!0){var m=p.value;this.enteredLastNTimestamp.set(m,n),this.figureOutConnectionStatus(m)}}catch(e){l=!0,d=e}finally{try{!u&&h.return&&h.return()}finally{if(l)throw d}}}},{key:"_clearRestoringTimer",value:function(e){var t=this.restoringTimers.get(e);t&&(clearTimeout(t),this.restoringTimers.delete(e))}},{key:"_isRestoringTimedout",value:function(e){var t=this,n=this.enteredLastNTimestamp.get(e);return!!(n&&Date.now()-n>=5e3)||(this.restoringTimers.get(e)||this.restoringTimers.set(e,setTimeout(function(){return t.figureOutConnectionStatus(e)},5e3)),!1)}},{key:"onTrackRtcMuted",value:function(e){var t=this,n=e.getParticipantId(),r=this.conference.getParticipantById(n);if(f.debug("Detector track RTC muted: "+n,Date.now()),!r)return void f.error("No participant for id: "+n);if(this.rtcMutedTimestamp[n]=Date.now(),!r.isVideoMuted()){this.clearTimeout(n);var i=this._getVideoFrozenTimeout(n);this.trackTimers[n]=window.setTimeout(function(){f.debug("Set RTC mute timeout for: "+n+" of "+i+" ms"),t.clearTimeout(n),t.figureOutConnectionStatus(n)},i)}}},{key:"onTrackRtcUnmuted",value:function(e){var t=e.getParticipantId();f.debug("Detector track RTC unmuted: "+t,Date.now()),this.clearTimeout(t),this.clearRtcMutedTimestamp(t),this.figureOutConnectionStatus(t)}},{key:"onSignallingMuteChanged",value:function(e){var t=e.getParticipantId();f.debug("Detector on track signalling mute changed: "+t,e.isMuted()),this.figureOutConnectionStatus(t)}}]),e}();t.b=y}).call(t,"modules/connectivity/ParticipantConnectionStatus.js")},function(e,t,n){"use strict";(function(e){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(){var e="undefined"==typeof window?this:window,t=void 0;try{t=e.localStorage}catch(e){f.error(e)}return t}function o(){return(Math.random().toString(16)+"000000000").substr(2,8)}function a(){return o()+o()+o()+o()}function s(){var e=a();return f.log("generated id",e),e}function c(){var e=d.a.generateUsername();return f.log("generated callstats uid",e),e}var u=n(0),l=(n.n(u),n(115)),d=n.n(l),p=function(){function e(e,t){for(var n=0;n=0)e=navigator.userAgent.match(/OPR\/(\d+)/i)||[],webrtcDetectedBrowser="opera",webrtcDetectedVersion=parseInt(e[1]||"0",10),webrtcMinimumVersion=26,webrtcDetectedType="webkit",webrtcDetectedDCSupport="SCTP";else if(navigator.userAgent.match(/Bowser\/[0-9.]*/g)){e=navigator.userAgent.match(/Bowser\/[0-9.]*/g)||[];var t=parseInt((navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./i)||[])[2]||"0",10);webrtcDetectedBrowser="bowser",webrtcDetectedVersion=parseFloat((e[0]||"0/0").split("/")[1],10),webrtcMinimumVersion=0,webrtcDetectedType="webkit",webrtcDetectedDCSupport=t>30?"SCTP":"RTP"}else if(navigator.userAgent.indexOf("OPiOS")>0)e=navigator.userAgent.match(/OPiOS\/([0-9]+)\./),webrtcDetectedBrowser="opera",webrtcDetectedVersion=parseInt(e[1]||"0",10),webrtcMinimumVersion=0,webrtcDetectedType=null,webrtcDetectedDCSupport=null;else if(navigator.userAgent.indexOf("CriOS")>0)e=navigator.userAgent.match(/CriOS\/([0-9]+)\./)||[],webrtcDetectedBrowser="chrome",webrtcDetectedVersion=parseInt(e[1]||"0",10),webrtcMinimumVersion=0,webrtcDetectedType=null,webrtcDetectedDCSupport=null;else if(navigator.userAgent.indexOf("FxiOS")>0)e=navigator.userAgent.match(/FxiOS\/([0-9]+)\./)||[],webrtcDetectedBrowser="firefox",webrtcDetectedVersion=parseInt(e[1]||"0",10),webrtcMinimumVersion=0,webrtcDetectedType=null,webrtcDetectedDCSupport=null;else if(document.documentMode)e=/\brv[ :]+(\d+)/g.exec(navigator.userAgent)||[],webrtcDetectedBrowser="IE",webrtcDetectedVersion=parseInt(e[1],10),webrtcMinimumVersion=9,webrtcDetectedType="plugin",webrtcDetectedDCSupport="SCTP",webrtcDetectedVersion||(e=/\bMSIE[ :]+(\d+)/g.exec(navigator.userAgent)||[],webrtcDetectedVersion=parseInt(e[1]||"0",10));else if(window.StyleMedia||navigator.userAgent.match(/Edge\/(\d+).(\d+)$/))e=navigator.userAgent.match(/Edge\/(\d+).(\d+)$/)||[],webrtcDetectedBrowser="edge",webrtcDetectedVersion=parseFloat((e[0]||"0/0").split("/")[1],10),webrtcMinimumVersion=13.10547,webrtcDetectedType="ms",webrtcDetectedDCSupport=null;else if("undefined"!=typeof InstallTrigger||navigator.userAgent.indexOf("irefox")>0)e=navigator.userAgent.match(/Firefox\/([0-9]+)\./)||[],webrtcDetectedBrowser="firefox",webrtcDetectedVersion=parseInt(e[1]||"0",10),webrtcMinimumVersion=31,webrtcDetectedType="moz",webrtcDetectedDCSupport="SCTP";else if(window.chrome&&window.chrome.webstore||navigator.userAgent.indexOf("Chrom")>0)e=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./i)||[],webrtcDetectedBrowser="chrome",webrtcDetectedVersion=parseInt(e[2]||"0",10),webrtcMinimumVersion=38,webrtcDetectedType="webkit",webrtcDetectedDCSupport=webrtcDetectedVersion>30?"SCTP":"RTP";else if(/^((?!chrome|android).)*safari/i.test(navigator.userAgent)){e=navigator.userAgent.match(/version\/(\d+)/i)||[];var n=navigator.userAgent.match(/(iPhone|iPad)/gi)||[];webrtcDetectedBrowser="safari",webrtcDetectedVersion=parseInt(e[1]||"0",10),webrtcMinimumVersion=7,webrtcDetectedType=0===n.length?"plugin":null,webrtcDetectedDCSupport=0===n.length?"SCTP":null}window.webrtcDetectedBrowser=webrtcDetectedBrowser,window.webrtcDetectedVersion=webrtcDetectedVersion,window.webrtcMinimumVersion=webrtcMinimumVersion,window.webrtcDetectedType=webrtcDetectedType,window.webrtcDetectedDCSupport=webrtcDetectedDCSupport},a.addEvent=function(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent?e.attachEvent("on"+t,n):e[t]=n},a.renderNotificationBar=function(e,t,n,r,i){if("complete"===document.readyState){var o=window,s=document.createElement("iframe");s.name="adapterjs-alert",s.style.position="fixed",s.style.top="-41px",s.style.left=0,s.style.right=0,s.style.width="100%",s.style.height="40px",s.style.backgroundColor="#ffffe1",s.style.border="none",s.style.borderBottom="1px solid #888888",s.style.zIndex="9999999","string"==typeof s.style.webkitTransition?s.style.webkitTransition="all .5s ease-out":"string"==typeof s.style.transition&&(s.style.transition="all .5s ease-out"),document.body.appendChild(s);var c=s.contentWindow?s.contentWindow:s.contentDocument.document?s.contentDocument.document:s.contentDocument;c.document.open(),c.document.write(''+e+""), t&&n?(c.document.write(''),c.document.close(),a.addEvent(c.document.getElementById("okay"),"click",function(e){i&&a.renderNotificationBar(a.TEXT.EXTENSION?a.TEXT.EXTENSION.REQUIRE_REFRESH:a.TEXT.REFRESH.REQUIRE_REFRESH,a.TEXT.REFRESH.BUTTON,"javascript:location.reload()"),window.open(n,r?"_blank":"_top"),e.preventDefault();try{e.cancelBubble=!0}catch(e){}var t=setInterval(function(){isIE||navigator.plugins.refresh(!1),a.WebRTCPlugin.isPluginInstalled(a.WebRTCPlugin.pluginInfo.prefix,a.WebRTCPlugin.pluginInfo.plugName,a.WebRTCPlugin.pluginInfo.type,function(){clearInterval(t),a.WebRTCPlugin.defineWebRTCInterface()},function(){})},500)}),a.addEvent(c.document.getElementById("cancel"),"click",function(e){o.document.body.removeChild(s)})):c.document.close(),setTimeout(function(){"string"==typeof s.style.webkitTransform?s.style.webkitTransform="translateY(40px)":"string"==typeof s.style.transform?s.style.transform="translateY(40px)":s.style.top="0px"},300)}},webrtcDetectedType=null,checkMediaDataChannelSettings=function(e,t,n,r){if("function"==typeof n){var i=!0,a="firefox"===webrtcDetectedBrowser,s="moz"===webrtcDetectedType&&webrtcDetectedVersion>30,c="firefox"===e;if(a&&c||s)try{delete r.mandatory.MozDontOfferDataChannel}catch(e){o.error("Failed deleting MozDontOfferDataChannel"),o.error(e)}else a&&!c&&(r.mandatory.MozDontOfferDataChannel=!0);if(!a)for(var u in r.mandatory)r.mandatory.hasOwnProperty(u)&&-1!==u.indexOf("Moz")&&delete r.mandatory[u];!a||c||s||(i=!1),n(i,r)}},checkIceConnectionState=function(e,t,n){if("function"!=typeof n)return void o.warn("No callback specified in checkIceConnectionState. Aborted.");e=e||"peer",a._iceConnectionFiredStates[e]&&t!==a._iceConnectionStates.disconnected&&t!==a._iceConnectionStates.failed&&t!==a._iceConnectionStates.closed||(a._iceConnectionFiredStates[e]=[]),t=a._iceConnectionStates[t],a._iceConnectionFiredStates[e].indexOf(t)<0&&(a._iceConnectionFiredStates[e].push(t),t===a._iceConnectionStates.connected&&setTimeout(function(){a._iceConnectionFiredStates[e].push(a._iceConnectionStates.done),n(a._iceConnectionStates.done)},1e3),n(t))},createIceServer=null,createIceServers=null,RTCPeerConnection=null,RTCSessionDescription="function"==typeof RTCSessionDescription?RTCSessionDescription:null,RTCIceCandidate="function"==typeof RTCIceCandidate?RTCIceCandidate:null,getUserMedia=null,attachMediaStream=null,reattachMediaStream=null,webrtcDetectedBrowser=null,webrtcDetectedVersion=null,webrtcMinimumVersion=null,!(navigator.mozGetUserMedia||navigator.webkitGetUserMedia||navigator.mediaDevices&&navigator.userAgent.match(/Edge\/(\d+).(\d+)$/))||0===(navigator.userAgent.match(/android/gi)||[]).length&&0===(navigator.userAgent.match(/chrome/gi)||[]).length&&navigator.userAgent.indexOf("Safari/")>0?("object"==typeof o&&"function"==typeof o.log||(o={}||o,o.log=function(e){},o.info=function(e){},o.error=function(e){},o.dir=function(e){},o.exception=function(e){},o.trace=function(e){},o.warn=function(e){},o.count=function(e){},o.debug=function(e){},o.count=function(e){},o.time=function(e){},o.timeEnd=function(e){},o.group=function(e){},o.groupCollapsed=function(e){},o.groupEnd=function(e){}),a.parseWebrtcDetectedBrowser(),isIE="IE"===webrtcDetectedBrowser,a.WebRTCPlugin.WaitForPluginReady=function(){for(;a.WebRTCPlugin.pluginState!==a.WebRTCPlugin.PLUGIN_STATES.READY;);},a.WebRTCPlugin.callWhenPluginReady=function(e){if(a.WebRTCPlugin.pluginState===a.WebRTCPlugin.PLUGIN_STATES.READY)e();else var t=setInterval(function(){a.WebRTCPlugin.pluginState===a.WebRTCPlugin.PLUGIN_STATES.READY&&(clearInterval(t),e())},100)},a.WebRTCPlugin.setLogLevel=function(e){a.WebRTCPlugin.callWhenPluginReady(function(){a.WebRTCPlugin.plugin.setLogLevel(e)})},a.WebRTCPlugin.injectPlugin=function(){if("complete"===document.readyState&&a.WebRTCPlugin.pluginState===a.WebRTCPlugin.PLUGIN_STATES.INITIALIZING){if(a.WebRTCPlugin.pluginState=a.WebRTCPlugin.PLUGIN_STATES.INJECTING,"IE"===webrtcDetectedBrowser&&webrtcDetectedVersion<=10){var e=document.createDocumentFragment();for(a.WebRTCPlugin.plugin=document.createElement("div"),a.WebRTCPlugin.plugin.innerHTML=' '+(a.options.getAllCams?'':"")+"";a.WebRTCPlugin.plugin.firstChild;)e.appendChild(a.WebRTCPlugin.plugin.firstChild);document.body.appendChild(e),a.WebRTCPlugin.plugin=document.getElementById(a.WebRTCPlugin.pluginInfo.pluginId)}else a.WebRTCPlugin.plugin=document.createElement("object"),a.WebRTCPlugin.plugin.id=a.WebRTCPlugin.pluginInfo.pluginId,isIE?(a.WebRTCPlugin.plugin.width="1px",a.WebRTCPlugin.plugin.height="1px"):(a.WebRTCPlugin.plugin.width="0px",a.WebRTCPlugin.plugin.height="0px"),a.WebRTCPlugin.plugin.type=a.WebRTCPlugin.pluginInfo.type,a.WebRTCPlugin.plugin.innerHTML=' '+(a.options.getAllCams?'':"")+'',document.body.appendChild(a.WebRTCPlugin.plugin);a.WebRTCPlugin.pluginState=a.WebRTCPlugin.PLUGIN_STATES.INJECTED}},a.WebRTCPlugin.isPluginInstalled=function(e,t,n,r,i){if(isIE){try{new ActiveXObject(e+"."+t)}catch(e){return void i()}r()}else{for(var o=navigator.mimeTypes,a=0;a=0)return void r();i()}},a.WebRTCPlugin.defineWebRTCInterface=function(){if(a.WebRTCPlugin.pluginState===a.WebRTCPlugin.PLUGIN_STATES.READY)return void o.error("AdapterJS - WebRTC interface has already been defined");a.WebRTCPlugin.pluginState=a.WebRTCPlugin.PLUGIN_STATES.INITIALIZING,a.isDefined=function(e){return null!==e&&void 0!==e},createIceServer=function(e,t,n){var r=null,i=e.split(":");return 0===i[0].indexOf("stun")?r={url:e,hasCredentials:!1}:0===i[0].indexOf("turn")&&(r={url:e,hasCredentials:!0,credential:n,username:t}),r},createIceServers=function(e,t,n){for(var r=[],i=0;i1)return r&&(e.iceServers=r),a.WebRTCPlugin.plugin.PeerConnection(e);var o=t&&t.mandatory?t.mandatory:null,s=t&&t.optional?t.optional:null;return a.WebRTCPlugin.plugin.PeerConnection(a.WebRTCPlugin.pageId,r,o,s)},MediaStreamTrack=function(){},MediaStreamTrack.getSources=function(e){a.WebRTCPlugin.callWhenPluginReady(function(){a.WebRTCPlugin.plugin.GetSources(e)})};var e=function(e){if("object"!=typeof e||e.mandatory||e.optional)return e;var t={};return Object.keys(e).forEach(function(n){if("require"!==n&&"advanced"!==n&&"mediaSource"!==n){var r="object"==typeof e[n]?e[n]:{ideal:e[n]};void 0!==r.exact&&"number"==typeof r.exact&&(r.min=r.max=r.exact);var i=function(e,t){return e?e+t.charAt(0).toUpperCase()+t.slice(1):"deviceId"===t?"sourceId":t};if(void 0!==r.ideal){t.optional=t.optional||[];var o={};"number"==typeof r.ideal?(o[i("min",n)]=r.ideal,t.optional.push(o),o={},o[i("max",n)]=r.ideal,t.optional.push(o)):(o[i("",n)]=r.ideal,t.optional.push(o))}void 0!==r.exact&&"number"!=typeof r.exact?(t.mandatory=t.mandatory||{},t.mandatory[i("",n)]=r.exact):["min","max"].forEach(function(e){void 0!==r[e]&&(t.mandatory=t.mandatory||{},t.mandatory[i(e,n)]=r[e])})}}),e.advanced&&(t.optional=(t.optional||[]).concat(e.advanced)),t};getUserMedia=function(t,n,r){var i={};i.audio=!!t.audio&&e(t.audio),i.video=!!t.video&&e(t.video),a.WebRTCPlugin.callWhenPluginReady(function(){a.WebRTCPlugin.plugin.getUserMedia(i,n,r)})},window.navigator.getUserMedia=getUserMedia,navigator.mediaDevices||"undefined"==typeof Promise||(requestUserMedia=function(e){return new Promise(function(t,n){getUserMedia(e,t,n)})},navigator.mediaDevices={getUserMedia:requestUserMedia,enumerateDevices:function(){return new Promise(function(e){var t={audio:"audioinput",video:"videoinput"};return MediaStreamTrack.getSources(function(n){e(n.map(function(e){return{label:e.label,kind:t[e.kind],id:e.id,deviceId:e.id,groupId:""}}))})})}}),attachMediaStream=function(e,t){if(e&&e.parentNode){var n;null===t?n="":(void 0!==t.enableSoundTracks&&t.enableSoundTracks(!0),n=t.id);var r=0===e.id.length?Math.random().toString(36).slice(2):e.id,i=e.nodeName.toLowerCase();if("object"!==i){var o;switch(i){case"audio":o=a.WebRTCPlugin.TAGS.AUDIO;break;case"video":o=a.WebRTCPlugin.TAGS.VIDEO;break;default:o=a.WebRTCPlugin.TAGS.NONE}var s=document.createDocumentFragment(),c=document.createElement("div"),u="";for(e.className?u='class="'+e.className+'" ':e.attributes&&e.attributes.class&&(u='class="'+e.attributes.class.value+'" '),c.innerHTML=' ';c.firstChild;)s.appendChild(c.firstChild);var l="",d="";e.clientWidth||e.clientHeight?(d=e.clientWidth,l=e.clientHeight):(e.width||e.height)&&(d=e.width,l=e.height),e.parentNode.insertBefore(s,e),s=document.getElementById(r),s.width=d,s.height=l,e.parentNode.removeChild(e)}else{for(var p=e.children,f=0;f!==p.length;++f)if("streamId"===p[f].name){p[f].value=n;break}e.setStreamId(n)}var h=document.getElementById(r);return a.forwardEventHandlers(h,e,Object.getPrototypeOf(e)),h}},reattachMediaStream=function(e,t){for(var n=null,r=t.children,i=0;i!==r.length;++i)if("streamId"===r[i].name){a.WebRTCPlugin.WaitForPluginReady(),n=a.WebRTCPlugin.plugin.getStreamWithId(a.WebRTCPlugin.pageId,r[i].value);break}if(null!==n)return attachMediaStream(e,n);o.log("Could not find the stream associated with this element")},window.attachMediaStream=attachMediaStream,window.reattachMediaStream=reattachMediaStream,window.getUserMedia=getUserMedia,a.attachMediaStream=attachMediaStream,a.reattachMediaStream=reattachMediaStream,a.getUserMedia=getUserMedia,a.forwardEventHandlers=function(e,t,n){properties=Object.getOwnPropertyNames(n);for(var r in properties)r&&(propName=properties[r],"function"==typeof propName.slice&&"on"===propName.slice(0,2)&&"function"==typeof t[propName]&&a.addEvent(e,propName.slice(2),t[propName]));var i=Object.getPrototypeOf(n);i&&a.forwardEventHandlers(e,t,i)},RTCIceCandidate=function(e){return e.sdpMid||(e.sdpMid=""),a.WebRTCPlugin.WaitForPluginReady(),a.WebRTCPlugin.plugin.ConstructIceCandidate(e.sdpMid,e.sdpMLineIndex,e.candidate)},a.addEvent(document,"readystatechange",a.WebRTCPlugin.injectPlugin),a.WebRTCPlugin.injectPlugin()},a.WebRTCPlugin.pluginNeededButNotInstalledCb=a.WebRTCPlugin.pluginNeededButNotInstalledCb||function(){a.addEvent(document,"readystatechange",a.WebRTCPlugin.pluginNeededButNotInstalledCbPriv),a.WebRTCPlugin.pluginNeededButNotInstalledCbPriv()},a.WebRTCPlugin.pluginNeededButNotInstalledCbPriv=function(){if(!a.options.hidePluginInstallPrompt){var e=a.WebRTCPlugin.pluginInfo.downloadLink;if(e){var t;t=a.WebRTCPlugin.pluginInfo.portalLink?'This website requires you to install the '+a.WebRTCPlugin.pluginInfo.companyName+" WebRTC Plugin to work on this browser.":a.TEXT.PLUGIN.REQUIRE_INSTALLATION,a.renderNotificationBar(t,a.TEXT.PLUGIN.BUTTON,e)}else a.renderNotificationBar(a.TEXT.PLUGIN.NOT_SUPPORTED)}},a.WebRTCPlugin.isPluginInstalled(a.WebRTCPlugin.pluginInfo.prefix,a.WebRTCPlugin.pluginInfo.plugName,a.WebRTCPlugin.pluginInfo.type,a.WebRTCPlugin.defineWebRTCInterface,a.WebRTCPlugin.pluginNeededButNotInstalledCb)):(function(t){e.exports=function(){return function e(t,n,i){function o(s,c){if(!n[s]){if(!t[s]){var u="function"==typeof r&&r;if(!c&&u)return r(s,!0);if(a)return a(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var d=n[s]={exports:{}};t[s][0].call(d.exports,function(e){return o(t[s][1][e]||e)},d,d.exports,e,t,n,i)}return n[s].exports}for(var a="function"==typeof r&&r,s=0;s-1?(n.attribute=e.substr(t+1,r-t-1),n.value=e.substr(r+1)):n.attribute=e.substr(t+1),n},r.getDtlsParameters=function(e,t){var n=r.splitLines(e);n=n.concat(r.splitLines(t));var i=n.filter(function(e){return 0===e.indexOf("a=fingerprint:")})[0].substr(14);return{role:"auto",fingerprints:[{algorithm:i.split(" ")[0],value:i.split(" ")[1]}]}},r.writeDtlsParameters=function(e,t){var n="a=setup:"+t+"\r\n";return e.fingerprints.forEach(function(e){n+="a=fingerprint:"+e.algorithm+" "+e.value+"\r\n"}),n},r.getIceParameters=function(e,t){var n=r.splitLines(e);return n=n.concat(r.splitLines(t)),{usernameFragment:n.filter(function(e){return 0===e.indexOf("a=ice-ufrag:")})[0].substr(12),password:n.filter(function(e){return 0===e.indexOf("a=ice-pwd:")})[0].substr(10)}},r.writeIceParameters=function(e){return"a=ice-ufrag:"+e.usernameFragment+"\r\na=ice-pwd:"+e.password+"\r\n"},r.parseRtpParameters=function(e){for(var t={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},n=r.splitLines(e),i=n[0].split(" "),o=3;o0?"9":"0",n+=" UDP/TLS/RTP/SAVPF ",n+=t.codecs.map(function(e){return void 0!==e.preferredPayloadType?e.preferredPayloadType:e.payloadType}).join(" ")+"\r\n",n+="c=IN IP4 0.0.0.0\r\n",n+="a=rtcp:9 IN IP4 0.0.0.0\r\n",t.codecs.forEach(function(e){n+=r.writeRtpMap(e),n+=r.writeFmtp(e),n+=r.writeRtcpFb(e)}),n+="a=rtcp-mux\r\n"},r.parseRtpEncodingParameters=function(e){var t,n=[],i=r.parseRtpParameters(e),o=-1!==i.fecMechanisms.indexOf("RED"),a=-1!==i.fecMechanisms.indexOf("ULPFEC"),s=r.matchPrefix(e,"a=ssrc:").map(function(e){return r.parseSsrcMedia(e)}).filter(function(e){return"cname"===e.attribute}),c=s.length>0&&s[0].ssrc,u=r.matchPrefix(e,"a=ssrc-group:FID").map(function(e){var t=e.split(" ");return t.shift(),t.map(function(e){return parseInt(e,10)})});u.length>0&&u[0].length>1&&u[0][0]===c&&(t=u[0][1]),i.codecs.forEach(function(e){if("RTX"===e.name.toUpperCase()&&e.parameters.apt){var r={ssrc:c,codecPayloadType:parseInt(e.parameters.apt,10),rtx:{payloadType:e.payloadType,ssrc:t}};n.push(r),o&&(r=JSON.parse(JSON.stringify(r)),r.fec={ssrc:t,mechanism:a?"red+ulpfec":"red"},n.push(r))}}),0===n.length&&c&&n.push({ssrc:c});var l=r.matchPrefix(e,"b=");return l.length&&(0===l[0].indexOf("b=TIAS:")?l=parseInt(l[0].substr(7),10):0===l[0].indexOf("b=AS:")&&(l=parseInt(l[0].substr(5),10)),n.forEach(function(e){e.maxBitrate=l})),n},r.writeSessionBoilerplate=function(){return"v=0\r\no=thisisadapterortc 8169639915646943137 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"},r.writeMediaSection=function(e,t,n,i){var o=r.writeRtpDescription(e.kind,t);if(o+=r.writeIceParameters(e.iceGatherer.getLocalParameters()),o+=r.writeDtlsParameters(e.dtlsTransport.getLocalParameters(),"offer"===n?"actpass":"active"),o+="a=mid:"+e.mid+"\r\n",e.rtpSender&&e.rtpReceiver?o+="a=sendrecv\r\n":e.rtpSender?o+="a=sendonly\r\n":e.rtpReceiver?o+="a=recvonly\r\n":o+="a=inactive\r\n",e.rtpSender){var a="msid:"+i.id+" "+e.rtpSender.track.id+"\r\n";o+="a="+a,o+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" "+a}return o+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" cname:"+r.localCName+"\r\n"},r.getDirection=function(e,t){for(var n=r.splitLines(e),i=0;i0&&"function"==typeof e)return i(e,t);var a=function(e){var t={};return e.result().forEach(function(e){var n={id:e.id,timestamp:e.timestamp,type:e.type};e.names().forEach(function(t){n[t]=e.stat(t)}),t[n.id]=n}),t},s=function(e,t){var n=new Map(Object.keys(e).map(function(t){return[t,e[t]]}));return t=t||e,Object.keys(t).forEach(function(e){n[e]=t[e]}),n};if(arguments.length>=2){var c=function(e){o[1](s(a(e)))};return i.apply(this,[c,arguments[0]])}return new Promise(function(t,n){1===o.length&&"object"==typeof e?i.apply(r,[function(e){t(s(a(e)))},n]):i.apply(r,[function(e){t(s(a(e),e.result()))},n])}).then(t,n)},n},window.RTCPeerConnection.prototype=webkitRTCPeerConnection.prototype,webkitRTCPeerConnection.generateCertificate&&Object.defineProperty(window.RTCPeerConnection,"generateCertificate",{get:function(){return webkitRTCPeerConnection.generateCertificate}}),["createOffer","createAnswer"].forEach(function(e){var t=webkitRTCPeerConnection.prototype[e];webkitRTCPeerConnection.prototype[e]=function(){var e=this;if(arguments.length<1||1===arguments.length&&"object"==typeof arguments[0]){var n=1===arguments.length?arguments[0]:void 0;return new Promise(function(r,i){t.apply(e,[r,i,n])})}return t.apply(this,arguments)}}),i.version<51&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(e){var t=webkitRTCPeerConnection.prototype[e];webkitRTCPeerConnection.prototype[e]=function(){var e=arguments,n=this,r=new Promise(function(r,i){t.apply(n,[e[0],r,i])});return e.length<2?r:r.then(function(){e[1].apply(null,[])},function(t){e.length>=3&&e[2].apply(null,[t])})}}),["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(e){var t=webkitRTCPeerConnection.prototype[e];webkitRTCPeerConnection.prototype[e]=function(){return arguments[0]=new("addIceCandidate"===e?RTCIceCandidate:RTCSessionDescription)(arguments[0]),t.apply(this,arguments)}});var e=RTCPeerConnection.prototype.addIceCandidate;RTCPeerConnection.prototype.addIceCandidate=function(){return null===arguments[0]?Promise.resolve():e.apply(this,arguments)}}};t.exports={shimMediaStream:o.shimMediaStream,shimOnTrack:o.shimOnTrack,shimSourceObject:o.shimSourceObject,shimPeerConnection:o.shimPeerConnection,shimGetUserMedia:e("./getusermedia")}},{"../utils.js":10,"./getusermedia":4}],4:[function(e,t,n){"use strict";var r=e("../utils.js").log;t.exports=function(){var e=function(e){if("object"!=typeof e||e.mandatory||e.optional)return e;var t={};return Object.keys(e).forEach(function(n){if("require"!==n&&"advanced"!==n&&"mediaSource"!==n){var r="object"==typeof e[n]?e[n]:{ideal:e[n]};void 0!==r.exact&&"number"==typeof r.exact&&(r.min=r.max=r.exact);var i=function(e,t){return e?e+t.charAt(0).toUpperCase()+t.slice(1):"deviceId"===t?"sourceId":t};if(void 0!==r.ideal){t.optional=t.optional||[];var o={};"number"==typeof r.ideal?(o[i("min",n)]=r.ideal,t.optional.push(o),o={},o[i("max",n)]=r.ideal,t.optional.push(o)):(o[i("",n)]=r.ideal,t.optional.push(o))}void 0!==r.exact&&"number"!=typeof r.exact?(t.mandatory=t.mandatory||{},t.mandatory[i("",n)]=r.exact):["min","max"].forEach(function(e){void 0!==r[e]&&(t.mandatory=t.mandatory||{},t.mandatory[i(e,n)]=r[e])})}}),e.advanced&&(t.optional=(t.optional||[]).concat(e.advanced)),t},t=function(t,n){if(t=JSON.parse(JSON.stringify(t)),t&&t.audio&&(t.audio=e(t.audio)),t&&"object"==typeof t.video){var i=t.video.facingMode;if((i=i&&("object"==typeof i?i:{ideal:i}))&&("user"===i.exact||"environment"===i.exact||"user"===i.ideal||"environment"===i.ideal)&&(!navigator.mediaDevices.getSupportedConstraints||!navigator.mediaDevices.getSupportedConstraints().facingMode)&&(delete t.video.facingMode,"environment"===i.exact||"environment"===i.ideal))return navigator.mediaDevices.enumerateDevices().then(function(o){o=o.filter(function(e){return"videoinput"===e.kind});var a=o.find(function(e){return-1!==e.label.toLowerCase().indexOf("back")})||o.length&&o[o.length-1];return a&&(t.video.deviceId=i.exact?{exact:a.deviceId}:{ideal:a.deviceId}),t.video=e(t.video),r("chrome: "+JSON.stringify(t)),n(t)});t.video=e(t.video)}return r("chrome: "+JSON.stringify(t)),n(t)},n=function(e){return{name:{PermissionDeniedError:"NotAllowedError",ConstraintNotSatisfiedError:"OverconstrainedError"}[e.name]||e.name,message:e.message,constraint:e.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}},i=function(e){function t(t,n,r){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(e,r,i){t(e,function(e){navigator.webkitGetUserMedia(e,r,function(e){i(n(e))})})});navigator.getUserMedia=i;var o=function(e){return new Promise(function(t,n){navigator.getUserMedia(e,t,n)})};if(navigator.mediaDevices||(navigator.mediaDevices={getUserMedia:o,enumerateDevices:function(){return new Promise(function(e){var t={audio:"audioinput",video:"videoinput"};return MediaStreamTrack.getSources(function(n){e(n.map(function(e){return{label:e.label,kind:t[e.kind],deviceId:e.id,groupId:""}}))})})}}),navigator.mediaDevices.getUserMedia){var a=navigator.mediaDevices.getUserMedia.bind(navigator.mediaDevices);navigator.mediaDevices.getUserMedia=function(e){return t(e,function(e){return a(e).catch(function(e){return Promise.reject(n(e))})})}}else navigator.mediaDevices.getUserMedia=function(e){return o(e)};void 0===navigator.mediaDevices.addEventListener&&(navigator.mediaDevices.addEventListener=function(){r("Dummy mediaDevices.addEventListener called.")}),void 0===navigator.mediaDevices.removeEventListener&&(navigator.mediaDevices.removeEventListener=function(){r("Dummy mediaDevices.removeEventListener called.")})}},{"../utils.js":10}],5:[function(e,t,n){"use strict";var r=e("sdp"),i=e("../utils").browserDetails,o={shimPeerConnection:function(){window.RTCIceGatherer&&(window.RTCIceCandidate||(window.RTCIceCandidate=function(e){return e}),window.RTCSessionDescription||(window.RTCSessionDescription=function(e){return e})),window.RTCPeerConnection=function(e){var t=this,n=document.createDocumentFragment();if(["addEventListener","removeEventListener","dispatchEvent"].forEach(function(e){t[e]=n[e].bind(n)}),this.onicecandidate=null,this.onaddstream=null,this.ontrack=null,this.onremovestream=null,this.onsignalingstatechange=null,this.oniceconnectionstatechange=null,this.onnegotiationneeded=null,this.ondatachannel=null,this.localStreams=[],this.remoteStreams=[],this.getLocalStreams=function(){return t.localStreams},this.getRemoteStreams=function(){return t.remoteStreams},this.localDescription=new RTCSessionDescription({type:"",sdp:""}),this.remoteDescription=new RTCSessionDescription({type:"",sdp:""}),this.signalingState="stable",this.iceConnectionState="new",this.iceGatheringState="new",this.iceOptions={gatherPolicy:"all",iceServers:[]},e&&e.iceTransportPolicy)switch(e.iceTransportPolicy){case"all":case"relay":this.iceOptions.gatherPolicy=e.iceTransportPolicy;break;case"none":throw new TypeError('iceTransportPolicy "none" not supported')}if(this.usingBundle=e&&"max-bundle"===e.bundlePolicy,e&&e.iceServers){var r=JSON.parse(JSON.stringify(e.iceServers));this.iceOptions.iceServers=r.filter(function(e){if(e&&e.urls){var t=e.urls;return"string"==typeof t&&(t=[t]),!!(t=t.filter(function(e){return 0===e.indexOf("turn:")&&-1!==e.indexOf("transport=udp")&&-1===e.indexOf("turn:[")||0===e.indexOf("stun:")&&i.version>=14393})[0])}return!1})}this.transceivers=[],this._localIceCandidatesBuffer=[]},window.RTCPeerConnection.prototype._emitBufferedCandidates=function(){var e=this,t=r.splitSections(e.localDescription.sdp);this._localIceCandidatesBuffer.forEach(function(n){if(n.candidate&&0!==Object.keys(n.candidate).length)-1===n.candidate.candidate.indexOf("typ endOfCandidates")&&(t[n.candidate.sdpMLineIndex+1]+="a="+n.candidate.candidate+"\r\n");else for(var r=1;r-1&&(this.localStreams.splice(t,1),this._maybeFireNegotiationNeeded())},window.RTCPeerConnection.prototype.getSenders=function(){return this.transceivers.filter(function(e){return!!e.rtpSender}).map(function(e){return e.rtpSender})},window.RTCPeerConnection.prototype.getReceivers=function(){return this.transceivers.filter(function(e){return!!e.rtpReceiver}).map(function(e){return e.rtpReceiver})},window.RTCPeerConnection.prototype._getCommonCapabilities=function(e,t){var n={codecs:[],headerExtensions:[],fecMechanisms:[]};return e.codecs.forEach(function(e){for(var r=0;r0;t.forEach(function(e,t){var a=i.transceivers[t],s=a.iceGatherer,c=a.iceTransport,u=a.dtlsTransport,l=a.localCapabilities,d=a.remoteCapabilities;if("0"!==e.split("\n",1)[0].split(" ",2)[1]&&!a.isDatachannel){var p=r.getIceParameters(e,n);if(o){var f=r.matchPrefix(e,"a=candidate:").map(function(e){return r.parseCandidate(e)}).filter(function(e){return"1"===e.component});f.length&&c.setRemoteCandidates(f)}var h=r.getDtlsParameters(e,n);o&&(h.role="server"),i.usingBundle&&0!==t||(c.start(s,p,o?"controlling":"controlled"),u.start(h));var m=i._getCommonCapabilities(l,d);i._transceive(a,m.codecs.length>0,!1)}})}switch(this.localDescription={type:e.type,sdp:e.sdp},e.type){case"offer":this._updateSignalingState("have-local-offer");break;case"answer":this._updateSignalingState("stable");break;default:throw new TypeError('unsupported type "'+e.type+'"')}var a=arguments.length>1&&"function"==typeof arguments[1];if(a){var s=arguments[1];window.setTimeout(function(){s(),"new"===i.iceGatheringState&&(i.iceGatheringState="gathering"),i._emitBufferedCandidates()},0)}var c=Promise.resolve();return c.then(function(){a||("new"===i.iceGatheringState&&(i.iceGatheringState="gathering"),window.setTimeout(i._emitBufferedCandidates.bind(i),500))}),c},window.RTCPeerConnection.prototype.setRemoteDescription=function(e){var t=this,n=new MediaStream,i=[],o=r.splitSections(e.sdp),a=o.shift(),s=r.matchPrefix(a,"a=ice-lite").length>0;switch(this.usingBundle=r.matchPrefix(a,"a=group:BUNDLE ").length>0,o.forEach(function(o,c){var u=r.splitLines(o),l=u[0].substr(2).split(" "),d=l[0],p="0"===l[1],f=r.getDirection(o,a),h=r.matchPrefix(o,"a=mid:");if(h=h.length?h[0].substr(6):r.generateIdentifier(),"application"===d&&"DTLS/SCTP"===l[2])return void(t.transceivers[c]={mid:h,isDatachannel:!0});var m,v,y,g,b,S,E,T,_,C,w,R,k=r.parseRtpParameters(o);p||(w=r.getIceParameters(o,a),R=r.getDtlsParameters(o,a),R.role="client"),T=r.parseRtpEncodingParameters(o);var A,P=r.matchPrefix(o,"a=ssrc:").map(function(e){return r.parseSsrcMedia(e)}).filter(function(e){return"cname"===e.attribute})[0];P&&(A=P.value);var I=r.matchPrefix(o,"a=end-of-candidates",a).length>0,O=r.matchPrefix(o,"a=candidate:").map(function(e){return r.parseCandidate(e)}).filter(function(e){return"1"===e.component});if("offer"!==e.type||p)"answer"!==e.type||p||(m=t.transceivers[c],v=m.iceGatherer,y=m.iceTransport,g=m.dtlsTransport,b=m.rtpSender,S=m.rtpReceiver,E=m.sendEncodingParameters,_=m.localCapabilities,t.transceivers[c].recvEncodingParameters=T,t.transceivers[c].remoteCapabilities=k,t.transceivers[c].cname=A,(s||I)&&O.length&&y.setRemoteCandidates(O),t.usingBundle&&0!==c||(y.start(v,w,"controlling"),g.start(R)),t._transceive(m,"sendrecv"===f||"recvonly"===f,"sendrecv"===f||"sendonly"===f),!S||"sendrecv"!==f&&"sendonly"!==f?delete m.rtpReceiver:(C=S.track,i.push([C,S]),n.addTrack(C)));else{var D=t.usingBundle&&c>0?{iceGatherer:t.transceivers[0].iceGatherer,iceTransport:t.transceivers[0].iceTransport,dtlsTransport:t.transceivers[0].dtlsTransport}:t._createIceAndDtlsTransports(h,c);if(I&&D.iceTransport.setRemoteCandidates(O),_=RTCRtpReceiver.getCapabilities(d),E=[{ssrc:1001*(2*c+2)}],S=new RTCRtpReceiver(D.dtlsTransport,d),C=S.track,i.push([C,S]),n.addTrack(C),t.localStreams.length>0&&t.localStreams[0].getTracks().length>=c){var L;"audio"===d?L=t.localStreams[0].getAudioTracks()[0]:"video"===d&&(L=t.localStreams[0].getVideoTracks()[0]),L&&(b=new RTCRtpSender(L,D.dtlsTransport))}t.transceivers[c]={iceGatherer:D.iceGatherer,iceTransport:D.iceTransport,dtlsTransport:D.dtlsTransport,localCapabilities:_,remoteCapabilities:k,rtpSender:b,rtpReceiver:S,kind:d,mid:h,cname:A,sendEncodingParameters:E,recvEncodingParameters:T},t._transceive(t.transceivers[c],!1,"sendrecv"===f||"sendonly"===f)}}),this.remoteDescription={type:e.type,sdp:e.sdp},e.type){case"offer":this._updateSignalingState("have-remote-offer");break;case"answer":this._updateSignalingState("stable");break;default:throw new TypeError('unsupported type "'+e.type+'"')}return n.getTracks().length&&(t.remoteStreams.push(n),window.setTimeout(function(){var e=new Event("addstream");e.stream=n,t.dispatchEvent(e),null!==t.onaddstream&&window.setTimeout(function(){t.onaddstream(e)},0),i.forEach(function(r){var i=r[0],o=r[1],a=new Event("track");a.track=i,a.receiver=o,a.streams=[n],t.dispatchEvent(e),null!==t.ontrack&&window.setTimeout(function(){t.ontrack(a)},0)})},0)),arguments.length>1&&"function"==typeof arguments[1]&&window.setTimeout(arguments[1],0),Promise.resolve()},window.RTCPeerConnection.prototype.close=function(){this.transceivers.forEach(function(e){e.iceTransport&&e.iceTransport.stop(),e.dtlsTransport&&e.dtlsTransport.stop(),e.rtpSender&&e.rtpSender.stop(),e.rtpReceiver&&e.rtpReceiver.stop()}),this._updateSignalingState("closed")},window.RTCPeerConnection.prototype._updateSignalingState=function(e){this.signalingState=e;var t=new Event("signalingstatechange");this.dispatchEvent(t),null!==this.onsignalingstatechange&&this.onsignalingstatechange(t)},window.RTCPeerConnection.prototype._maybeFireNegotiationNeeded=function(){var e=new Event("negotiationneeded");this.dispatchEvent(e),null!==this.onnegotiationneeded&&this.onnegotiationneeded(e)},window.RTCPeerConnection.prototype._updateConnectionState=function(){var e,t=this,n={new:0,closed:0,connecting:0,checking:0,connected:0,completed:0,failed:0};if(this.transceivers.forEach(function(e){n[e.iceTransport.state]++,n[e.dtlsTransport.state]++}),n.connected+=n.completed,e="new",n.failed>0?e="failed":n.connecting>0||n.checking>0?e="connecting":n.disconnected>0?e="disconnected":n.new>0?e="new":(n.connected>0||n.completed>0)&&(e="connected"),e!==t.iceConnectionState){t.iceConnectionState=e;var r=new Event("iceconnectionstatechange");this.dispatchEvent(r),null!==this.oniceconnectionstatechange&&this.oniceconnectionstatechange(r)}},window.RTCPeerConnection.prototype.createOffer=function(){var e=this;if(this._pendingOffer)throw new Error("createOffer called while there is a pending offer.");var t;1===arguments.length&&"function"!=typeof arguments[0]?t=arguments[0]:3===arguments.length&&(t=arguments[2]);var n=[],i=0,o=0;if(this.localStreams.length&&(i=this.localStreams[0].getAudioTracks().length,o=this.localStreams[0].getVideoTracks().length),t){if(t.mandatory||t.optional)throw new TypeError("Legacy mandatory/optional constraints not supported.");void 0!==t.offerToReceiveAudio&&(i=t.offerToReceiveAudio),void 0!==t.offerToReceiveVideo&&(o=t.offerToReceiveVideo)}for(this.localStreams.length&&this.localStreams[0].getTracks().forEach(function(e){n.push({kind:e.kind,track:e,wantReceive:"audio"===e.kind?i>0:o>0}),"audio"===e.kind?i--:"video"===e.kind&&o--});i>0||o>0;)i>0&&(n.push({kind:"audio",wantReceive:!0}),i--),o>0&&(n.push({kind:"video",wantReceive:!0}),o--);var a=r.writeSessionBoilerplate(),s=[];n.forEach(function(t,n){var i,o,a=t.track,c=t.kind,u=r.generateIdentifier(),l=e.usingBundle&&n>0?{iceGatherer:s[0].iceGatherer,iceTransport:s[0].iceTransport,dtlsTransport:s[0].dtlsTransport}:e._createIceAndDtlsTransports(u,n),d=RTCRtpSender.getCapabilities(c),p=[{ssrc:1001*(2*n+1)}];a&&(i=new RTCRtpSender(a,l.dtlsTransport)),t.wantReceive&&(o=new RTCRtpReceiver(l.dtlsTransport,c)),s[n]={iceGatherer:l.iceGatherer,iceTransport:l.iceTransport,dtlsTransport:l.dtlsTransport,localCapabilities:d,remoteCapabilities:null,rtpSender:i,rtpReceiver:o,kind:c,mid:u,sendEncodingParameters:p,recvEncodingParameters:null}}),this.usingBundle&&(a+="a=group:BUNDLE "+s.map(function(e){return e.mid}).join(" ")+"\r\n"),n.forEach(function(t,n){var i=s[n];a+=r.writeMediaSection(i,i.localCapabilities,"offer",e.localStreams[0])}),this._pendingOffer=s;var c=new RTCSessionDescription({type:"offer",sdp:a});return arguments.length&&"function"==typeof arguments[0]&&window.setTimeout(arguments[0],0,c),Promise.resolve(c)},window.RTCPeerConnection.prototype.createAnswer=function(){var e=this,t=r.writeSessionBoilerplate();this.usingBundle&&(t+="a=group:BUNDLE "+this.transceivers.map(function(e){return e.mid}).join(" ")+"\r\n"),this.transceivers.forEach(function(n){if(n.isDatachannel)return void(t+="m=application 0 DTLS/SCTP 5000\r\nc=IN IP4 0.0.0.0\r\na=mid:"+n.mid+"\r\n");var i=e._getCommonCapabilities(n.localCapabilities,n.remoteCapabilities);t+=r.writeMediaSection(n,i,"answer",e.localStreams[0])});var n=new RTCSessionDescription({type:"answer",sdp:t});return arguments.length&&"function"==typeof arguments[0]&&window.setTimeout(arguments[0],0,n),Promise.resolve(n)},window.RTCPeerConnection.prototype.addIceCandidate=function(e){if(null===e)this.transceivers.forEach(function(e){e.iceTransport.addRemoteCandidate({})});else{var t=e.sdpMLineIndex;if(e.sdpMid)for(var n=0;n0?r.parseCandidate(e.candidate):{};if("tcp"===o.protocol&&(0===o.port||9===o.port))return;if("1"!==o.component)return;"endOfCandidates"===o.type&&(o={}),i.iceTransport.addRemoteCandidate(o);var a=r.splitSections(this.remoteDescription.sdp);a[t+1]+=(o.type?e.candidate.trim():"a=end-of-candidates")+"\r\n",this.remoteDescription.sdp=a.join("")}}return arguments.length>1&&"function"==typeof arguments[1]&&window.setTimeout(arguments[1],0),Promise.resolve()},window.RTCPeerConnection.prototype.getStats=function(){var e=[];this.transceivers.forEach(function(t){["rtpSender","rtpReceiver","iceGatherer","iceTransport","dtlsTransport"].forEach(function(n){t[n]&&e.push(t[n].getStats())})});var t=arguments.length>1&&"function"==typeof arguments[1]&&arguments[1];return new Promise(function(n){var r=new Map;Promise.all(e).then(function(e){e.forEach(function(e){Object.keys(e).forEach(function(t){r.set(t,e[t]),r[t]=e[t]})}),t&&window.setTimeout(t,0,r),n(r)})})}}};t.exports={shimPeerConnection:o.shimPeerConnection,shimGetUserMedia:e("./getusermedia")}},{"../utils":10,"./getusermedia":6,sdp:1}],6:[function(e,t,n){"use strict";t.exports=function(){var e=function(e){return{name:{PermissionDeniedError:"NotAllowedError"}[e.name]||e.name,message:e.message,constraint:e.constraint,toString:function(){return this.name}}},t=navigator.mediaDevices.getUserMedia.bind(navigator.mediaDevices);navigator.mediaDevices.getUserMedia=function(n){return t(n).catch(function(t){return Promise.reject(e(t))})}}},{}],7:[function(e,t,n){"use strict";var r=e("../utils").browserDetails,i={shimOnTrack:function(){"object"!=typeof window||!window.RTCPeerConnection||"ontrack"in window.RTCPeerConnection.prototype||Object.defineProperty(window.RTCPeerConnection.prototype,"ontrack",{get:function(){return this._ontrack},set:function(e){this._ontrack&&(this.removeEventListener("track",this._ontrack),this.removeEventListener("addstream",this._ontrackpoly)),this.addEventListener("track",this._ontrack=e),this.addEventListener("addstream",this._ontrackpoly=function(e){e.stream.getTracks().forEach(function(t){var n=new Event("track");n.track=t,n.receiver={track:t},n.streams=[e.stream],this.dispatchEvent(n)}.bind(this))}.bind(this))}})},shimSourceObject:function(){"object"==typeof window&&(!window.HTMLMediaElement||"srcObject"in window.HTMLMediaElement.prototype||Object.defineProperty(window.HTMLMediaElement.prototype,"srcObject",{get:function(){return this.mozSrcObject},set:function(e){this.mozSrcObject=e}}))},shimPeerConnection:function(){if("object"==typeof window&&(window.RTCPeerConnection||window.mozRTCPeerConnection)){window.RTCPeerConnection||(window.RTCPeerConnection=function(e,t){if(r.version<38&&e&&e.iceServers){for(var n=[],i=0;i=n&&parseInt(r[n],10)},detectBrowser:function(){var e={};if(e.browser=null,e.version=null,"undefined"==typeof window||!window.navigator)return e.browser="Not a browser.",e;if(navigator.mozGetUserMedia)e.browser="firefox",e.version=this.extractVersion(navigator.userAgent,/Firefox\/([0-9]+)\./,1);else if(navigator.webkitGetUserMedia)if(window.webkitRTCPeerConnection)e.browser="chrome",e.version=this.extractVersion(navigator.userAgent,/Chrom(e|ium)\/([0-9]+)\./,2);else{if(!navigator.userAgent.match(/Version\/(\d+).(\d+)/))return e.browser="Unsupported webkit-based browser with GUM support but no WebRTC support.",e;e.browser="safari",e.version=this.extractVersion(navigator.userAgent,/AppleWebKit\/([0-9]+)\./,1)}else{if(!navigator.mediaDevices||!navigator.userAgent.match(/Edge\/(\d+).(\d+)$/))return e.browser="Not a supported browser.",e;e.browser="edge",e.version=this.extractVersion(navigator.userAgent,/Edge\/(\d+).(\d+)$/,2)}return e}};t.exports={log:i.log,disableLog:i.disableLog,browserDetails:i.detectBrowser(),extractVersion:i.extractVersion}},{}]},{},[2])(2)}()}(),a.parseWebrtcDetectedBrowser(),navigator.mozGetUserMedia?(MediaStreamTrack.getSources=function(e){setTimeout(function(){e([{kind:"audio",id:"default",label:"",facing:""},{kind:"video",id:"default",label:"",facing:""}])},0)},attachMediaStream=function(e,t){return e.srcObject=t,e},reattachMediaStream=function(e,t){return e.srcObject=t.srcObject,e},createIceServer=function(e,t,n){o.warn("createIceServer is deprecated. It should be replaced with an application level implementation.");var r=null,i=e.split(":");if(0===i[0].indexOf("stun"))r={urls:[e]};else if(0===i[0].indexOf("turn"))if(webrtcDetectedVersion<27){var a=e.split("?");1!==a.length&&0!==a[1].indexOf("transport=udp")||(r={urls:[a[0]],credential:n,username:t})}else r={urls:[e],credential:n,username:t};return r},createIceServers=function(e,t,n){o.warn("createIceServers is deprecated. It should be replaced with an application level implementation.");var r=[];for(i=0;i=43?e.srcObject=t:void 0!==e.src?e.src=URL.createObjectURL(t):o.error("Error attaching stream to element."),e},reattachMediaStream=function(e,t){return webrtcDetectedVersion>=43?e.srcObject=t.srcObject:e.src=t.src,e},createIceServer=function(e,t,n){o.warn("createIceServer is deprecated. It should be replaced with an application level implementation.");var r=null,i=e.split(":");return 0===i[0].indexOf("stun")?r={url:e}:0===i[0].indexOf("turn")&&(r={url:e,credential:n,username:t}),r},createIceServers=function(e,t,n){o.warn("createIceServers is deprecated. It should be replaced with an application level implementation.");var r=[];if(webrtcDetectedVersion>=34)r={urls:e,credential:n,username:t};else for(i=0;i38?e.srcObject=t:void 0!==e.src&&(e.src=URL.createObjectURL(t))}),attachMediaStream=function(e,t){return"chrome"!==webrtcDetectedBrowser&&"opera"!==webrtcDetectedBrowser||t?attachMediaStream_base(e,t):e.src="",e},reattachMediaStream_base=reattachMediaStream,reattachMediaStream=function(e,t){return reattachMediaStream_base(e,t),e},window.attachMediaStream=attachMediaStream,window.reattachMediaStream=reattachMediaStream,window.getUserMedia=function(e,t,n){navigator.getUserMedia(e,t,n)},a.attachMediaStream=attachMediaStream,a.reattachMediaStream=reattachMediaStream,a.getUserMedia=getUserMedia,"undefined"==typeof Promise&&(requestUserMedia=null),a.maybeThroughWebRTCReady()),function(){"use strict";var e=null;a.TEXT.EXTENSION={REQUIRE_INSTALLATION_FF:"To enable screensharing you need to install the Skylink WebRTC tools Firefox Add-on.",REQUIRE_INSTALLATION_CHROME:"To enable screensharing you need to install the Skylink WebRTC tools Chrome Extension.",REQUIRE_REFRESH:"Please refresh this page after the Skylink WebRTC tools extension has been installed.",BUTTON_FF:"Install Now",BUTTON_CHROME:"Go to Chrome Web Store"};var t=function(e){if(null===e||"object"!=typeof e)return e;var t=e.constructor();for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t};if(window.navigator.mozGetUserMedia?(e=window.navigator.getUserMedia,navigator.getUserMedia=function(n,r,i){if(n&&n.video&&n.video.mediaSource){if("screen"!==n.video.mediaSource&&"window"!==n.video.mediaSource)return void i(new Error('GetUserMedia: Only "screen" and "window" are supported as mediaSource constraints'));var o=t(n);o.video.mozMediaSource=o.video.mediaSource;var s=setInterval(function(){"complete"===document.readyState&&(clearInterval(s),e(o,r,function(e){["PermissionDeniedError","SecurityError"].indexOf(e.name)>-1&&"https:"===window.parent.location.protocol?a.renderNotificationBar(a.TEXT.EXTENSION.REQUIRE_INSTALLATION_FF,a.TEXT.EXTENSION.BUTTON_FF,"https://addons.mozilla.org/en-US/firefox/addon/skylink-webrtc-tools/",!0,!0):i(e)}))},1)}else e(n,r,i)},a.getUserMedia=window.getUserMedia=navigator.getUserMedia):window.navigator.webkitGetUserMedia&&"safari"!==window.webrtcDetectedBrowser?(e=window.navigator.getUserMedia,navigator.getUserMedia=function(n,i,o){if(n&&n.video&&n.video.mediaSource){if("chrome"!==window.webrtcDetectedBrowser)return void o(new Error("Current browser does not support screensharing"));var s=t(n),c=function(t,n){t?o("permission-denied"===t?new Error("Permission denied for screen retrieval"):new Error("Failed retrieving selected screen")):(s.video.mandatory=s.video.mandatory||{},s.video.mandatory.chromeMediaSource="desktop",s.video.mandatory.maxWidth=window.screen.width>1920?window.screen.width:1920,s.video.mandatory.maxHeight=window.screen.height>1080?window.screen.height:1080,n&&(s.video.mandatory.chromeMediaSourceId=n),delete s.video.mediaSource,e(s,i,o))},u=function e(t){t.data&&(t.data.chromeMediaSourceId&&("PermissionDeniedError"===t.data.chromeMediaSourceId?c("permission-denied"):c(null,t.data.chromeMediaSourceId)),t.data.chromeExtensionStatus&&("not-installed"===t.data.chromeExtensionStatus?a.renderNotificationBar(a.TEXT.EXTENSION.REQUIRE_INSTALLATION_CHROME,a.TEXT.EXTENSION.BUTTON_CHROME,t.data.data,!0,!0):c(t.data.chromeExtensionStatus,null)),window.removeEventListener("message",e))};window.addEventListener("message",u),r({captureSourceId:!0})}else e(n,i,o)},a.getUserMedia=window.getUserMedia=navigator.getUserMedia,navigator.mediaDevices.getUserMedia=function(e){return new Promise(function(t,n){window.getUserMedia(e,t,n)})}):navigator.mediaDevices&&navigator.userAgent.match(/Edge\/(\d+).(\d+)$/)?o.warn("Edge does not support screensharing feature in getUserMedia"):(e=window.navigator.getUserMedia,navigator.getUserMedia=function(n,r,i){if(n&&n.video&&n.video.mediaSource){var o=t(n);a.WebRTCPlugin.callWhenPluginReady(function(){if(!a.WebRTCPlugin.plugin.HasScreensharingFeature||!a.WebRTCPlugin.plugin.isScreensharingAvailable)return void i(new Error("Your version of the WebRTC plugin does not support screensharing"));o.video.optional=o.video.optional||[],o.video.optional.push({sourceId:a.WebRTCPlugin.plugin.screensharingKey||"Screensharing"}),delete o.video.mediaSource,e(o,r,i)})}else e(n,r,i)},a.getUserMedia=getUserMedia=window.getUserMedia=navigator.getUserMedia,navigator.mediaDevices&&"undefined"!=typeof Promise&&(navigator.mediaDevices.getUserMedia=requestUserMedia)),"chrome"===window.webrtcDetectedBrowser){var n=document.createElement("iframe");n.onload=function(){n.isLoaded=!0},n.src="https://cdn.temasys.com.sg/skylink/extensions/detectRTC.html",n.style.display="none",(document.body||document.documentElement).appendChild(n);var r=function(e){if(e=e||{},!n.isLoaded)return void setTimeout(function(){n.contentWindow.postMessage(e,"*")},100);n.contentWindow.postMessage(e,"*")}}else"opera"===window.webrtcDetectedBrowser&&o.warn("Opera does not support screensharing feature in getUserMedia")}()}).call(t,"modules/RTC/adapter.screenshare.js")},function(e,t,n){function r(e){this.path=e.path,this.hostname=e.hostname,this.port=e.port,this.secure=e.secure,this.query=e.query,this.timestampParam=e.timestampParam,this.timestampRequests=e.timestampRequests,this.readyState="",this.agent=e.agent||!1,this.socket=e.socket,this.enablesXDR=e.enablesXDR,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.extraHeaders=e.extraHeaders}var i=n(18),o=n(36);e.exports=r,o(r.prototype),r.prototype.onError=function(e,t){var n=new Error(e);return n.type="TransportError",n.description=t,this.emit("error",n),this},r.prototype.open=function(){return"closed"!=this.readyState&&""!=this.readyState||(this.readyState="opening",this.doOpen()),this},r.prototype.close=function(){return"opening"!=this.readyState&&"open"!=this.readyState||(this.doClose(),this.onClose()),this},r.prototype.send=function(e){if("open"!=this.readyState)throw new Error("Transport not open");this.write(e)},r.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},r.prototype.onData=function(e){var t=i.decodePacket(e,this.socket.binaryType);this.onPacket(t)},r.prototype.onPacket=function(e){this.emit("packet",e)},r.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},function(e,t,n){var r=n(76);e.exports=function(e){var t=e.xdomain,n=e.xscheme,i=e.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!t||r))return new XMLHttpRequest}catch(e){}try{if("undefined"!=typeof XDomainRequest&&!n&&i)return new XDomainRequest}catch(e){}if(!t)try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}}},function(e,t){function n(e){if(e)return r(e)}function r(e){for(var t in n.prototype)e[t]=n.prototype[t];return e}e.exports=n,n.prototype.on=n.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks[e]=this._callbacks[e]||[]).push(t),this},n.prototype.once=function(e,t){function n(){r.off(e,n),t.apply(this,arguments)}var r=this;return this._callbacks=this._callbacks||{},n.fn=t,this.on(e,n),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n=this._callbacks[e];if(!n)return this;if(1==arguments.length)return delete this._callbacks[e],this;for(var r,i=0;i: ").apply(u,r)}}function i(e,t,n,i){this.id=t,this.format=i,this.transports=n,this.transports||(this.transports=[]),this.level=o[e];for(var a=Object.keys(o),s=0;s=0;--n){var r=t[n];e||h.a.attachMediaStream(r,null),e&&r!==e||t.splice(n,1)}e&&h.a.attachMediaStream(e,null)}},{key:"_attachTTFMTracker",value:function(e){}},{key:"dispose",value:function(){return this.removeAllListeners(),this.disposed=!0,Promise.resolve()}},{key:"isScreenSharing",value:function(){}},{key:"getId",value:function(){return this.stream?h.a.getStreamID(this.stream):null}},{key:"isActive",value:function(){return void 0===this.stream.active||this.stream.active}},{key:"setAudioLevel",value:function(e,t){this.audioLevel!==e&&(this.audioLevel=e,this.emit(d.TRACK_AUDIO_LEVEL_CHANGED,e,t))}},{key:"getMSID",value:function(){var e=this.getStreamId(),t=this.getTrackId();return e&&t?e+" "+t:null}},{key:"setAudioOutput",value:function(e){var t=this;return h.a.isDeviceChangeAvailable("output")?this.isVideoTrack()?Promise.resolve():Promise.all(this.containers.map(function(t){return t.setSinkId(e).catch(function(e){throw v.warn("Failed to change audio output device on element. Default or previously set audio output device will be used.",t,e),e})})).then(function(){t.emit(d.TRACK_AUDIO_OUTPUT_CHANGED,e)}):Promise.reject(new Error("Audio output device change is not supported"))}}]),t}(u.a);t.a=g}).call(t,"modules/RTC/JitsiTrack.js")},function(e,t,n){"use strict";function r(e){for(var t=0,n=e.length,r=0;r.2?t-.2:r<-.4?t+.4:e,parseFloat(n.toFixed(3))}function o(e,t,n){this.stream=e,this.intervalId=null,this.intervalMilis=t,this.audioLevel=0,this.callback=n}t.a=o;var a=n(1);window.AudioContext=window.AudioContext||window.webkitAudioContext;var s=null;window.AudioContext&&(s=new AudioContext,s.suspend&&s.suspend()),o.prototype.start=function(){if(o.isLocalStatsSupported()){s.resume();var e=s.createAnalyser();e.smoothingTimeConstant=.8,e.fftSize=2048,s.createMediaStreamSource(this.stream).connect(e);var t=this;this.intervalId=setInterval(function(){var n=new Uint8Array(e.frequencyBinCount);e.getByteTimeDomainData(n);var o=r(n);o!==t.audioLevel&&(t.audioLevel=i(o,t.audioLevel),t.callback(t.audioLevel))},this.intervalMilis)}},o.prototype.stop=function(){this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null)},o.isLocalStatsSupported=function(){return Boolean(s&&!a.a.isTemasysPluginUsed())}},function(e,t,n){function r(e){if(void 0===e.recorder)throw new Error("Passed an object to startRecorder which is not a TrackRecorder object");e.recorder.start(),e.startTime=new Date}function i(e){if(void 0===e.recorder)throw new Error("Passed an object to stopRecorder which is not a TrackRecorder object");e.recorder.stop()}function o(){if(MediaRecorder.isTypeSupported(u))return u;if(MediaRecorder.isTypeSupported(l))return l;throw new Error("unable to create a MediaRecorder with the right mimetype!")}function a(e){this.recorders=[],this.fileType=o(),this.isRecording=!1,this.jitsiConference=e}function s(){if("undefined"!=typeof MediaStream)return new MediaStream;if("undefined"!=typeof webkitMediaStream)return new webkitMediaStream;throw new Error("cannot create a clean mediaStream")}var c=n(108),u="audio/webm",l="audio/ogg",d=function(e){this.track=e,this.recorder=null,this.data=null,this.name=null,this.startTime=null};a.determineCorrectFileType=o,a.prototype.addTrack=function(e){if(e.isAudioTrack()){var t=this.instantiateTrackRecorder(e);this.recorders.push(t),this.updateNames(),this.isRecording&&r(t)}},a.prototype.instantiateTrackRecorder=function(e){var t=new d(e),n=t.track.getOriginalStream(),r=s();return n.getAudioTracks().forEach(function(e){return r.addTrack(e)}),t.recorder=new MediaRecorder(r,{mimeType:this.fileType}),t.data=[],t.recorder.ondataavailable=function(e){e.data.size>0&&t.data.push(e.data)},t},a.prototype.removeTrack=function(e){if(!e.isVideoTrack()){var t=this.recorders,n=void 0;for(n=0;n0)y.forEach(function(t){var n=t.indexOf(" "),r=t.substr(0,n).substr(7);r!==u&&(e.up(),u=r,e.c("source",{ssrc:u,xmlns:"urn:xmpp:jingle:apps:rtp:ssma:0"}));var o=t.substr(n+1);if(e.c("parameter"),-1===o.indexOf(":"))e.attrs({name:o});else{var a=o.split(":",2)[0];e.attrs({name:a});var s=o.split(":",2)[1];s=i.a.filterSpecialChars(s),e.attrs({value:s})}e.up()});else{e.up(),e.c("source",{ssrc:u,xmlns:"urn:xmpp:jingle:apps:rtp:ssma:0"}),e.c("parameter"),e.attrs({name:"cname",value:Math.random().toString(36).substring(7)}),e.up();var g=null,b=APP.RTC.getLocalTracks(s.media);b&&(g=b.getTrackId()),null!==g&&(g=i.a.filterSpecialChars(g),e.c("parameter"),e.attrs({name:"msid",value:g}),e.up(),e.c("parameter"),e.attrs({name:"mslabel",value:g}),e.up(),e.c("parameter"),e.attrs({name:"label",value:g}),e.up())}e.up();var S=i.a.findLines(this.media[n],"a=ssrc-group:");S.forEach(function(t){var n=t.indexOf(" "),r=t.substr(0,n).substr(13),i=t.substr(14+r.length).split(" ");i.length&&(e.c("ssrc-group",{semantics:r,xmlns:"urn:xmpp:jingle:apps:rtp:ssma:0"}),i.forEach(function(t){return e.c("source",{ssrc:t}).up()}),e.up())})}var E=i.a.findLines(this.media[n],"a=rid");if(E.length){var T=E.map(function(e){return e.split(":")[1]}).map(function(e){return e.split(" ")[0]});T.forEach(function(t){e.c("source",{rid:t,xmlns:"urn:xmpp:jingle:apps:rtp:ssma:0"}),e.up()});var _=i.a.findLine(this.media[n],"a=simulcast");_&&(e.c("rid-group",{semantics:"SIM",xmlns:"urn:xmpp:jingle:apps:rtp:ssma:0"}),T.forEach(function(t){e.c("source",{rid:t}).up()}),e.up())}if(i.a.findLine(this.media[n],"a=rtcp-mux")&&e.c("rtcp-mux").up(),this.rtcpFbToJingle(n,e,"*"),a=i.a.findLines(this.media[n],"a=extmap:"),a.length)for(r=0;r2&&t.attrs({streams:a[2]}),t.up()}if(i.a.findLines(this.media[e],"a=fingerprint:",this.session).forEach(function(o){n=i.a.parseFingerprint(o),n.xmlns="urn:xmpp:jingle:apps:dtls:0",t.c("fingerprint").t(n.fingerprint),delete n.fingerprint,o=i.a.findLine(r.media[e],"a=setup:",r.session),o&&(n.setup=o.substr(8)),t.attrs(n),t.up()}),n=i.a.iceparams(this.media[e],this.session)){n.xmlns="urn:xmpp:jingle:transports:ice-udp:1",t.attrs(n);var s=i.a.findLines(this.media[e],"a=candidate:",this.session);s.length&&s.forEach(function(e){var n=i.a.candidateToJingle(e);r.failICE&&(n.ip="1.1.1.1");var o=n&&"string"==typeof n.protocol?n.protocol.toLowerCase():"";r.removeTcpCandidates&&("tcp"===o||"ssltcp"===o)||r.removeUdpCandidates&&"udp"===o||t.c("candidate",n).up()})}t.up()},r.prototype.rtcpFbToJingle=function(e,t,n){i.a.findLines(this.media[e],"a=rtcp-fb:"+n).forEach(function(e){var n=i.a.parseRTCPFB(e);"trr-int"===n.type?(t.c("rtcp-fb-trr-int",{xmlns:"urn:xmpp:jingle:apps:rtp:rtcp-fb:0",value:n.params[0]}),t.up()):(t.c("rtcp-fb",{xmlns:"urn:xmpp:jingle:apps:rtp:rtcp-fb:0",type:n.type}),n.params.length>0&&t.attrs({subtype:n.params[0]}),t.up())})},r.prototype.rtcpFbFromJingle=function(e,t){var n="",r=e.find('>rtcp-fb-trr-int[xmlns="urn:xmpp:jingle:apps:rtp:rtcp-fb:0"]');return r.length&&(n+="a=rtcp-fb:* trr-int ",r.attr("value")?n+=r.attr("value"):n+="0",n+="\r\n"),r=e.find('>rtcp-fb[xmlns="urn:xmpp:jingle:apps:rtp:rtcp-fb:0"]'),r.each(function(){n+="a=rtcp-fb:"+t+" "+$(this).attr("type"),$(this).attr("subtype")&&(n+=" "+$(this).attr("subtype")),n+="\r\n"}),n},r.prototype.fromJingle=function(e){var t=this;this.raw="v=0\r\no=- 1923518516 2 IN IP4 0.0.0.0\r\ns=-\r\nt=0 0\r\n";var n=$(e).find('>group[xmlns="urn:xmpp:jingle:apps:grouping:0"]');n.length&&n.each(function(e,n){var r=$(n).find(">content").map(function(e,t){return t.getAttribute("name")}).get();r.length>0&&(t.raw+="a=group:"+(n.getAttribute("semantics")||n.getAttribute("type"))+" "+r.join(" ")+"\r\n")}),this.session=this.raw,e.find(">content").each(function(){var e=t.jingle2media($(this));t.media.push(e)}),this.raw=this.session+this.media.join("")},r.prototype.jingle2media=function(e){var t=e.find("description"),n="",r=this,o=e.find('>transport>sctpmap[xmlns="urn:xmpp:jingle:transports:dtls-sctp:1"]'),a={media:t.attr("media")};if(a.port="1","rejected"===e.attr("senders")&&(a.port="0"),e.find(">transport>fingerprint").length||t.find("encryption").length?a.proto=o.length?"DTLS/SCTP":"RTP/SAVPF":a.proto="RTP/AVPF",o.length){n+="m=application 1 DTLS/SCTP "+o.attr("number")+"\r\n",n+="a=sctpmap:"+o.attr("number")+" "+o.attr("protocol");var s=o.attr("streams");n+=s?" "+s+"\r\n":"\r\n"}else a.fmt=t.find("payload-type").map(function(){return this.getAttribute("id")}).get(),n+=i.a.buildMLine(a)+"\r\n";switch(n+="c=IN IP4 0.0.0.0\r\n",o.length||(n+="a=rtcp:1 IN IP4 0.0.0.0\r\n"),a=e.find('>transport[xmlns="urn:xmpp:jingle:transports:ice-udp:1"]'),a.length&&(a.attr("ufrag")&&(n+=i.a.buildICEUfrag(a.attr("ufrag"))+"\r\n"),a.attr("pwd")&&(n+=i.a.buildICEPwd(a.attr("pwd"))+"\r\n"),a.find(">fingerprint").each(function(){n+="a=fingerprint:"+this.getAttribute("hash"),n+=" "+$(this).text(),n+="\r\n",this.getAttribute("setup")&&(n+="a=setup:"+this.getAttribute("setup")+"\r\n")})),e.attr("senders")){case"initiator":n+="a=sendonly\r\n";break;case"responder":n+="a=recvonly\r\n";break;case"none":n+="a=inactive\r\n";break;case"both":n+="a=sendrecv\r\n"}return n+="a=mid:"+e.attr("name")+"\r\n",t.find("rtcp-mux").length&&(n+="a=rtcp-mux\r\n"),t.find("encryption").length&&t.find("encryption>crypto").each(function(){n+="a=crypto:"+this.getAttribute("tag"),n+=" "+this.getAttribute("crypto-suite"),n+=" "+this.getAttribute("key-params"),this.getAttribute("session-params")&&(n+=" "+this.getAttribute("session-params")),n+="\r\n"}),t.find("payload-type").each(function(){n+=i.a.buildRTPMap(this)+"\r\n",$(this).find(">parameter").length&&(n+="a=fmtp:"+this.getAttribute("id")+" ",n+=$(this).find("parameter").map(function(){return(this.getAttribute("name")?this.getAttribute("name")+"=":"")+this.getAttribute("value")}).get().join("; "),n+="\r\n"),n+=r.rtcpFbFromJingle($(this),this.getAttribute("id"))}),n+=r.rtcpFbFromJingle(t,"*"),a=t.find('>rtp-hdrext[xmlns="urn:xmpp:jingle:apps:rtp:rtp-hdrext:0"]'),a.each(function(){n+="a=extmap:"+this.getAttribute("id")+" "+this.getAttribute("uri")+"\r\n"}),e.find('>transport[xmlns="urn:xmpp:jingle:transports:ice-udp:1"]>candidate').each(function(){var e=this.getAttribute("protocol");e="string"==typeof e?e.toLowerCase():"",r.removeTcpCandidates&&("tcp"===e||"ssltcp"===e)||r.removeUdpCandidates&&"udp"===e||(r.failICE&&this.setAttribute("ip","1.1.1.1"),n+=i.a.candidateFromJingle(this))}),e.find('description>ssrc-group[xmlns="urn:xmpp:jingle:apps:rtp:ssma:0"]').each(function(){var e=this.getAttribute("semantics"),t=$(this).find(">source").map(function(){return this.getAttribute("ssrc")}).get();t.length&&(n+="a=ssrc-group:"+e+" "+t.join(" ")+"\r\n")}),a=e.find('description>source[xmlns="urn:xmpp:jingle:apps:rtp:ssma:0"]'),a.each(function(){var e=this.getAttribute("ssrc");$(this).find(">parameter").each(function(){var t=this.getAttribute("name"),r=this.getAttribute("value");r=i.a.filterSpecialChars(r),n+="a=ssrc:"+e+" "+t,r&&r.length&&(n+=":"+r),n+="\r\n"})}),n}},function(e,t){var n={ENVIRONMENT:"environment",USER:"user"};e.exports=n},function(e,t,n){"use strict";n.d(t,"b",function(){return r}),n.d(t,"a",function(){return i});var r="signaling.peerMuted",i="signaling.peerVideoType"},function(e,t){var n={IDENTITY_UPDATED:"authentication.identity_updated"};e.exports=n},function(e,t,n){"use strict";n.d(t,"a",function(){return r}),n.d(t,"b",function(){return i}),n.d(t,"d",function(){return o}),n.d(t,"c",function(){return a});var r="statistics.audioLevel",i="statistics.before_disposed",o="statistics.byte_sent_stats",a="statistics.connectionstats"},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(e){if(l===setTimeout)return setTimeout(e,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(e,0);try{return l(e,0)}catch(t){try{return l.call(null,e,0)}catch(t){return l.call(this,e,0)}}}function o(e){if(d===clearTimeout)return clearTimeout(e);if((d===r||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(e);try{return d(e)}catch(t){try{return d.call(null,e)}catch(t){return d.call(this,e)}}}function a(){m&&f&&(m=!1,f.length?h=f.concat(h):v=-1,h.length&&s())}function s(){if(!m){var e=i(a);m=!0;for(var t=h.length;t;){for(f=h,h=[];++v1)for(var n=1;n0);return t}function i(e){var t=0;for(d=0;d0&&!this.encoding){var e=this.packetBuffer.shift();this.packet(e)}},r.prototype.cleanup=function(){l("cleanup");for(var e;e=this.subs.shift();)e.destroy();this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()},r.prototype.close=r.prototype.disconnect=function(){l("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,"opening"==this.readyState&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},r.prototype.onclose=function(e){l("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",e),this._reconnection&&!this.skipReconnect&&this.reconnect()},r.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var e=this;if(this.backoff.attempts>=this._reconnectionAttempts)l("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var t=this.backoff.duration();l("will wait %dms before reconnect attempt",t),this.reconnecting=!0;var n=setTimeout(function(){e.skipReconnect||(l("attempting reconnect"),e.emitAll("reconnect_attempt",e.backoff.attempts),e.emitAll("reconnecting",e.backoff.attempts),e.skipReconnect||e.open(function(t){t?(l("reconnect attempt error"),e.reconnecting=!1,e.reconnect(),e.emitAll("reconnect_error",t.data)):(l("reconnect success"),e.onreconnect())}))},t);this.subs.push({destroy:function(){clearTimeout(n)}})}},r.prototype.onreconnect=function(){var e=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",e)}},function(e,t){function n(e,t,n){return e.on(t,n),{destroy:function(){e.removeListener(t,n)}}}e.exports=n},function(e,t,n){function r(e,t){this.io=e,this.nsp=t,this.json=this,this.ids=0,this.acks={},this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0,this.io.autoConnect&&this.open()}var i=n(39),o=n(60),a=n(148),s=n(65),c=n(40),u=n(9)("socket.io-client:socket"),l=n(74);e.exports=r;var d={connect:1,connect_error:1,connect_timeout:1,connecting:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1,ping:1,pong:1},p=o.prototype.emit;o(r.prototype),r.prototype.subEvents=function(){if(!this.subs){var e=this.io;this.subs=[s(e,"open",c(this,"onopen")),s(e,"packet",c(this,"onpacket")),s(e,"close",c(this,"onclose"))]}},r.prototype.open=r.prototype.connect=function(){return this.connected?this:(this.subEvents(),this.io.open(),"open"==this.io.readyState&&this.onopen(),this.emit("connecting"),this)},r.prototype.send=function(){var e=a(arguments);return e.unshift("message"),this.emit.apply(this,e),this},r.prototype.emit=function(e){if(d.hasOwnProperty(e))return p.apply(this,arguments),this;var t=a(arguments),n=i.EVENT;l(t)&&(n=i.BINARY_EVENT);var r={type:n,data:t};return r.options={},r.options.compress=!this.flags||!1!==this.flags.compress,"function"==typeof t[t.length-1]&&(u("emitting packet with ack id %d",this.ids),this.acks[this.ids]=t.pop(),r.id=this.ids++),this.connected?this.packet(r):this.sendBuffer.push(r),delete this.flags,this},r.prototype.packet=function(e){e.nsp=this.nsp,this.io.packet(e)},r.prototype.onopen=function(){u("transport is open - connecting"),"/"!=this.nsp&&this.packet({type:i.CONNECT})},r.prototype.onclose=function(e){u("close (%s)",e),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",e)},r.prototype.onpacket=function(e){if(e.nsp==this.nsp)switch(e.type){case i.CONNECT:this.onconnect();break;case i.EVENT:case i.BINARY_EVENT:this.onevent(e);break;case i.ACK:case i.BINARY_ACK:this.onack(e);break;case i.DISCONNECT:this.ondisconnect();break;case i.ERROR:this.emit("error",e.data)}},r.prototype.onevent=function(e){var t=e.data||[];u("emitting event %j",t),null!=e.id&&(u("attaching ack callback to event"),t.push(this.ack(e.id))),this.connected?p.apply(this,t):this.receiveBuffer.push(t)},r.prototype.ack=function(e){var t=this,n=!1;return function(){if(!n){n=!0;var r=a(arguments);u("sending ack %j",r);var o=l(r)?i.BINARY_ACK:i.ACK;t.packet({type:o,id:e,data:r})}}},r.prototype.onack=function(e){var t=this.acks[e.id];"function"==typeof t?(u("calling ack %s with %j",e.id,e.data),t.apply(this,e.data),delete this.acks[e.id]):u("bad ack %s",e.id)},r.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},r.prototype.emitBuffered=function(){var e;for(e=0;e0){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);n.id="deployment_info",M.a.sendLog(JSON.stringify(n))}if(this.version){var i={id:"component_version",component:"lib-jitsi-meet",version:this.version};M.a.sendLog(JSON.stringify(i))}return P.a.init(e||{})},isDesktopSharingEnabled:function(){return P.a.isDesktopSharingEnabled()},setLogLevel:function(e){C.a.setLogLevel(e)},setLogLevelById:function(e,t){C.a.setLogLevelById(e,t)},addGlobalLogTransport:function(e){C.a.addGlobalTransport(e)},removeGlobalLogTransport:function(e){C.a.removeGlobalTransport(e)},createLocalTracks:function(e,t){var n=this,o=!1;return!0===t&&window.setTimeout(function(){o||m.a.emitEvent(v.PERMISSION_PROMPT_IS_SHOWN,I.a.getBrowserName())},1e3),window.connectionTimes||(window.connectionTimes={}),window.connectionTimes["obtainPermissions.start"]=window.performance.now(),P.a.obtainAudioAndVideoPermissions(e||{}).then(function(t){if(o=!0,window.connectionTimes["obtainPermissions.end"]=window.performance.now(),M.a.analytics.sendEvent(i("getUserMedia.success",e),{value:e}),!P.a.options.disableAudioLevels)for(var n=0;nr&&(n=r),t>=r||t>=n||0===r)return new ArrayBuffer(0);for(var i=new Uint8Array(e),o=new Uint8Array(n-t),a=t,s=0;a=e.length&&n()}if(n=n||function(){},!e.length)return n();var i=0;p(e,function(e){t(e,a(r))})},u.forEach=u.each,u.eachSeries=function(e,t,n){if(n=n||function(){},!e.length)return n();var r=0;!function i(){t(e[r],function(t){t?(n(t),n=function(){}):(r+=1,r>=e.length?n():i())})}()},u.forEachSeries=u.eachSeries,u.eachLimit=function(e,t,n,r){v(t).apply(null,[e,n,r])},u.forEachLimit=u.eachLimit;var v=function(e){return function(t,n,r){if(r=r||function(){},!t.length||e<=0)return r();var i=0,o=0,a=0;!function s(){if(i>=t.length)return r();for(;a=t.length?r():s())})}()}},y=function(e){return function(){var t=Array.prototype.slice.call(arguments);return e.apply(null,[u.each].concat(t))}},g=function(e,t){return function(){var n=Array.prototype.slice.call(arguments);return t.apply(null,[v(e)].concat(n))}},b=function(e){return function(){var t=Array.prototype.slice.call(arguments);return e.apply(null,[u.eachSeries].concat(t))}},S=function(e,t,n,r){if(t=f(t,function(e,t){return{index:t,value:e}}),r){var i=[];e(t,function(e,t){n(e.value,function(n,r){i[e.index]=r,t(n)})},function(e){r(e,i)})}else e(t,function(e,t){n(e.value,function(e){t(e)})})};u.map=y(S),u.mapSeries=b(S),u.mapLimit=function(e,t,n,r){return E(t)(e,n,r)};var E=function(e){return g(e,S)};u.reduce=function(e,t,n,r){u.eachSeries(e,function(e,r){n(t,e,function(e,n){t=n,r(e)})},function(e){r(e,t)})},u.inject=u.reduce,u.foldl=u.reduce,u.reduceRight=function(e,t,n,r){var i=f(e,function(e){return e}).reverse();u.reduce(i,t,n,r)},u.foldr=u.reduceRight;var T=function(e,t,n,r){var i=[];t=f(t,function(e,t){return{index:t,value:e}}),e(t,function(e,t){n(e.value,function(n){n&&i.push(e),t()})},function(e){r(f(i.sort(function(e,t){return e.index-t.index}),function(e){return e.value}))})};u.filter=y(T),u.filterSeries=b(T),u.select=u.filter,u.selectSeries=u.filterSeries;var _=function(e,t,n,r){var i=[];t=f(t,function(e,t){return{index:t,value:e}}),e(t,function(e,t){n(e.value,function(n){n||i.push(e),t()})},function(e){r(f(i.sort(function(e,t){return e.index-t.index}),function(e){return e.value}))})};u.reject=y(_),u.rejectSeries=b(_);var C=function(e,t,n,r){e(t,function(e,t){n(e,function(n){n?(r(e),r=function(){}):t()})},function(e){r()})};u.detect=y(C),u.detectSeries=b(C),u.some=function(e,t,n){u.each(e,function(e,r){t(e,function(e){e&&(n(!0),n=function(){}),r()})},function(e){n(!1)})},u.any=u.some,u.every=function(e,t,n){u.each(e,function(e,r){t(e,function(e){e||(n(!1),n=function(){}),r()})},function(e){n(!0)})},u.all=u.every,u.sortBy=function(e,t,n){u.map(e,function(e,n){t(e,function(t,r){t?n(t):n(null,{value:e,criteria:r})})},function(e,t){if(e)return n(e);var r=function(e,t){var n=e.criteria,r=t.criteria;return nr?1:0};n(null,f(t.sort(r),function(e){return e.value}))})},u.auto=function(e,t){t=t||function(){};var n=m(e),r=n.length;if(!r)return t();var i={},o=[],a=function(e){o.unshift(e)},s=function(e){for(var t=0;t>>1);n(t,e[o])>=0?r=o:i=o-1}return r}function i(e,t,i,o){if(e.started||(e.started=!0),d(t)||(t=[t]),0==t.length)return u.setImmediate(function(){e.drain&&e.drain()});p(t,function(t){var a={data:t,priority:i,callback:"function"==typeof o?o:null};e.tasks.splice(r(e.tasks,a,n)+1,0,a),e.saturated&&e.tasks.length===e.concurrency&&e.saturated(),u.setImmediate(e.process)})}var o=u.queue(e,t);return o.push=function(e,t,n){i(o,e,t,n)},delete o.unshift,o},u.cargo=function(e,t){var n=!1,r=[],i={tasks:r,payload:t,saturated:null,empty:null,drain:null,drained:!0,push:function(e,n){d(e)||(e=[e]),p(e,function(e){r.push({data:e,callback:"function"==typeof n?n:null}),i.drained=!1,i.saturated&&r.length===t&&i.saturated()}),u.setImmediate(i.process)},process:function o(){if(!n){if(0===r.length)return i.drain&&!i.drained&&i.drain(),void(i.drained=!0);var a="number"==typeof t?r.splice(0,t):r.splice(0,r.length),s=f(a,function(e){return e.data});i.empty&&i.empty(),n=!0,e(s,function(){n=!1;var e=arguments;p(a,function(t){t.callback&&t.callback.apply(null,e)}),o()})}},length:function(){return r.length},running:function(){return n}};return i};var k=function(e){return function(t){var n=Array.prototype.slice.call(arguments,1);t.apply(null,n.concat([function(t){var n=Array.prototype.slice.call(arguments,1);"undefined"!=typeof console&&(t?console.error&&console.error(t):console[e]&&p(n,function(t){console[e](t)}))}]))}};u.log=k("log"),u.dir=k("dir"),u.memoize=function(e,t){var n={},r={};t=t||function(e){return e};var i=function(){ var i=Array.prototype.slice.call(arguments),o=i.pop(),a=t.apply(null,i);a in n?u.nextTick(function(){o.apply(null,n[a])}):a in r?r[a].push(o):(r[a]=[o],e.apply(null,i.concat([function(){n[a]=arguments;var e=r[a];delete r[a];for(var t=0,i=e.length;t2?n.apply(this,Array.prototype.slice.call(arguments,2)):n};u.applyEach=y(A),u.applyEachSeries=b(A),u.forever=function(e,t){function n(r){if(r){if(t)return t(r);throw r}e(n)}n()},void 0!==e&&e.exports?e.exports=u:(i=[],void 0!==(o=function(){return u}.apply(t,i))&&(e.exports=o))}()}).call(t,n(56),n(147).setImmediate)},function(e,t){function n(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}e.exports=n,n.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=0==(1&Math.floor(10*t))?e-n:e+n}return 0|Math.min(e,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(e){this.ms=e},n.prototype.setMax=function(e){this.max=e},n.prototype.setJitter=function(e){this.jitter=e}},function(e,t,n){(function(t){function n(e){for(var t=0;t0?(i=e.slice(e.indexOf(r[0])+r[0].length),o=n(i,t-1)):o=r[1])),o}function r(){return null}function i(){return null}function o(){if(0===u.length)return null;var r,i,s,m,v,y=[],g=o.skipStackDepth||1;for(r=0;r=this.maxEntryLength&&this._flush(!0,!0)},r.prototype.start=function(){this._reschedulePublishInterval()},r.prototype._reschedulePublishInterval=function(){this.storeLogsIntervalID&&(window.clearTimeout(this.storeLogsIntervalID),this.storeLogsIntervalID=null),this.storeLogsIntervalID=window.setTimeout(this._flush.bind(this,!1,!0),this.storeInterval)},r.prototype.flush=function(){this._flush(!1,!0)},r.prototype._flush=function(e,t){this.totalLen>0&&(this.logStorage.isReady()||e)&&(this.logStorage.isReady()?(this.outputCache.length&&(this.outputCache.forEach(function(e){this.logStorage.storeLogs(e)}.bind(this)),this.outputCache=[]),this.logStorage.storeLogs(this.queue)):this.outputCache.push(this.queue),this.queue=[],this.totalLen=0),t&&this._reschedulePublishInterval()},r.prototype.stop=function(){this._flush(!1,!1)},e.exports=r},function(e,t,n){(function(e,r){var i,o="function"==typeof Symbol&&"symbol"==typeof("function"==typeof Symbol?Symbol.iterator:"@@iterator")?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==("function"==typeof Symbol?Symbol.prototype:"@@prototype")?"symbol":typeof e};(function(){function a(e,t){function n(e){if(n[e]!==y)return n[e];var o;if("bug-string-char-index"==e)o="a"!="a"[0];else if("json"==e)o=n("json-stringify")&&n("json-parse");else{var a,s='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if("json-stringify"==e){var c=t.stringify,l="function"==typeof c&&S;if(l){(a=function(){return 1}).toJSON=a;try{l="0"===c(0)&&"0"===c(new r)&&'""'==c(new i)&&c(b)===y&&c(y)===y&&c()===y&&"1"===c(a)&&"[1]"==c([a])&&"[null]"==c([y])&&"null"==c(null)&&"[null,null,null]"==c([y,b,null])&&c({a:[a,!0,!1,null,"\0\b\n\f\r\t"]})==s&&"1"===c(null,a)&&"[\n 1,\n 2\n]"==c([1,2],null,1)&&'"-271821-04-20T00:00:00.000Z"'==c(new u(-864e13))&&'"+275760-09-13T00:00:00.000Z"'==c(new u(864e13))&&'"-000001-01-01T00:00:00.000Z"'==c(new u(-621987552e5))&&'"1969-12-31T23:59:59.999Z"'==c(new u(-1))}catch(e){l=!1}}o=l}if("json-parse"==e){var d=t.parse;if("function"==typeof d)try{if(0===d("0")&&!d(!1)){a=d(s);var p=5==a.a.length&&1===a.a[0];if(p){try{p=!d('"\t"')}catch(e){}if(p)try{p=1!==d("01")}catch(e){}if(p)try{p=1!==d("1.")}catch(e){}}}}catch(e){p=!1}o=p}}return n[e]=!!o}e||(e=l.Object()),t||(t=l.Object());var r=e.Number||l.Number,i=e.String||l.String,s=e.Object||l.Object,u=e.Date||l.Date,d=e.SyntaxError||l.SyntaxError,p=e.TypeError||l.TypeError,f=e.Math||l.Math,h=e.JSON||l.JSON;"object"==(void 0===h?"undefined":o(h))&&h&&(t.stringify=h.stringify,t.parse=h.parse);var m,v,y,g=s.prototype,b=g.toString,S=new u(-0xc782b5b800cec);try{S=-109252==S.getUTCFullYear()&&0===S.getUTCMonth()&&1===S.getUTCDate()&&10==S.getUTCHours()&&37==S.getUTCMinutes()&&6==S.getUTCSeconds()&&708==S.getUTCMilliseconds()}catch(e){}if(!n("json")){var E=n("bug-string-char-index");if(!S)var T=f.floor,_=[0,31,59,90,120,151,181,212,243,273,304,334],C=function(e,t){return _[t]+365*(e-1970)+T((e-1969+(t=+(t>1)))/4)-T((e-1901+t)/100)+T((e-1601+t)/400)};if((m=g.hasOwnProperty)||(m=function(e){var t,n={};return(n.__proto__=null,n.__proto__={toString:1},n).toString!=b?m=function(e){var t=this.__proto__,n=e in(this.__proto__=null,this);return this.__proto__=t,n}:(t=n.constructor,m=function(e){var n=(this.constructor||t).prototype;return e in this&&!(e in n&&this[e]===n[e])}),n=null,m.call(this,e)}),v=function(e,t){var n,r,i,a=0;(n=function(){this.valueOf=0}).prototype.valueOf=0,r=new n;for(i in r)m.call(r,i)&&a++;return n=r=null,a?v=2==a?function(e,t){var n,r={},i="[object Function]"==b.call(e);for(n in e)i&&"prototype"==n||m.call(r,n)||!(r[n]=1)||!m.call(e,n)||t(n)}:function(e,t){var n,r,i="[object Function]"==b.call(e);for(n in e)i&&"prototype"==n||!m.call(e,n)||(r="constructor"===n)||t(n);(r||m.call(e,n="constructor"))&&t(n)}:(r=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],v=function(e,t){var n,i,a="[object Function]"==b.call(e),s=!a&&"function"!=typeof e.constructor&&c[o(e.hasOwnProperty)]&&e.hasOwnProperty||m;for(n in e)a&&"prototype"==n||!s.call(e,n)||t(n);for(i=r.length;n=r[--i];s.call(e,n)&&t(n));}),v(e,t)},!n("json-stringify")){var w={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},R=function(e,t){return("000000"+(t||0)).slice(-e)},k=function(e){for(var t='"',n=0,r=e.length,i=!E||r>10,o=i&&(E?e.split(""):e);n-1/0&&u<1/0){if(C){for(h=T(u/864e5),d=T(h/365.2425)+1970-1;C(d+1,0)<=h;d++);for(f=T((h-C(d,0))/30.42);C(d,f+1)<=h;f++);h=1+h-C(d,f),g=(u%864e5+864e5)%864e5,S=T(g/36e5)%24,E=T(g/6e4)%60,_=T(g/1e3)%60,w=g%1e3}else d=u.getUTCFullYear(),f=u.getUTCMonth(),h=u.getUTCDate(),S=u.getUTCHours(),E=u.getUTCMinutes(),_=u.getUTCSeconds(),w=u.getUTCMilliseconds();u=(d<=0||d>=1e4?(d<0?"-":"+")+R(6,d<0?-d:d):R(4,d))+"-"+R(2,f+1)+"-"+R(2,h)+"T"+R(2,S)+":"+R(2,E)+":"+R(2,_)+"."+R(3,w)+"Z"}else u=null;if(r&&(u=r.call(n,t,u)),null===u)return"null";if("[object Boolean]"==(l=b.call(u)))return""+u;if("[object Number]"==l)return u>-1/0&&u<1/0?""+u:"null";if("[object String]"==l)return k(""+u);if("object"==(void 0===u?"undefined":o(u))){for(O=c.length;O--;)if(c[O]===u)throw p();if(c.push(u),A=[],D=s,s+=a,"[object Array]"==l){for(I=0,O=u.length;I0)for(r="",n>10&&(n=10);r.length=48&&i<=57||i>=97&&i<=102||i>=65&&i<=70||L();e+=O("0x"+o.slice(t,P));break;default:L()}else{if(34==i)break;for(i=o.charCodeAt(P),t=P;i>=32&&92!=i&&34!=i;)i=o.charCodeAt(++P);e+=o.slice(t,P)}if(34==o.charCodeAt(P))return P++,e;L();default:if(t=P,45==i&&(r=!0,i=o.charCodeAt(++P)),i>=48&&i<=57){for(48==i&&(i=o.charCodeAt(P+1))>=48&&i<=57&&L(),r=!1;P=48&&i<=57;P++);if(46==o.charCodeAt(P)){for(n=++P;n=48&&i<=57;n++);n==P&&L(),P=n}if(101==(i=o.charCodeAt(P))||69==i){for(i=o.charCodeAt(++P),43!=i&&45!=i||P++,n=P;n=48&&i<=57;n++);n==P&&L(),P=n}return+o.slice(t,P)}if(r&&L(),"true"==o.slice(P,P+4))return P+=4,!0;if("false"==o.slice(P,P+5))return P+=5,!1;if("null"==o.slice(P,P+4))return P+=4,null;L()}return"$"},M=function e(t){var n,r;if("$"==t&&L(),"string"==typeof t){if("@"==(E?t.charAt(0):t[0]))return t.slice(1);if("["==t){for(n=[];"]"!=(t=N());r||(r=!0))r&&(","==t?"]"==(t=N())&&L():L()),","==t&&L(),n.push(e(t));return n}if("{"==t){for(n={};"}"!=(t=N());r||(r=!0))r&&(","==t?"}"==(t=N())&&L():L()),","!=t&&"string"==typeof t&&"@"==(E?t.charAt(0):t[0])&&":"==N()||L(),n[t.slice(1)]=e(N());return n}L()}return t},x=function(e,t,n){var r=j(e,t,n);r===y?delete e[t]:e[t]=r},j=function(e,t,n){var r,i=e[t];if("object"==(void 0===i?"undefined":o(i))&&i)if("[object Array]"==b.call(i))for(r=i.length;r--;)x(i,r,n);else v(i,function(e){x(i,e,n)});return n.call(e,t,i)};t.parse=function(e,t){var n,r;return P=0,I=""+e,n=M(N()),"$"!=N()&&L(),P=I=null,t&&"[object Function]"==b.call(t)?j((r={},r[""]=n,r),"",t):n}}}return t.runInContext=a,t}var s=n(25),c={function:!0,object:!0},u=c[o(t)]&&t&&!t.nodeType&&t,l=c["undefined"==typeof window?"undefined":o(window)]&&window||this,d=u&&c[o(e)]&&e&&!e.nodeType&&"object"==(void 0===r?"undefined":o(r))&&r;if(!d||d.global!==d&&d.window!==d&&d.self!==d||(l=d),u&&!s)a(l,u);else{var p=l.JSON,f=l.JSON3,h=!1,m=a(l,l.JSON3={noConflict:function(){return h||(h=!0,l.JSON=p,l.JSON3=f,p=f=null),m}});l.JSON={parse:m.parse,stringify:m.stringify}}s&&void 0!==(i=function(){return m}.call(t,n,t,e))&&(e.exports=i)}).call(this)}).call(t,n(58)(e),n(2))},function(e,t,n){var r,i="function"==typeof Symbol&&"symbol"==typeof("function"==typeof Symbol?Symbol.iterator:"@@iterator")?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==("function"==typeof Symbol?Symbol.prototype:"@@prototype")?"symbol":typeof e};!function(o){function a(e,t,n){var r=0,i=[0],o="",a=null,o=n||"UTF8";if("UTF8"!==o&&"UTF16"!==o)throw"encoding must be UTF8 or UTF16";if("HEX"===t){if(0!=e.length%2)throw"srcString of HEX type must be in byte increments";a=u(e),r=a.binLen,i=a.value}else if("ASCII"===t||"TEXT"===t)a=c(e,o),r=a.binLen,i=a.value;else{if("B64"!==t)throw"inputFormat must be HEX, TEXT, ASCII, or B64";a=l(e),r=a.binLen,i=a.value}this.getHash=function(e,t,n,o){var a,s=null,c=i.slice(),u=r;if(3===arguments.length?"number"!=typeof n&&(o=n,n=1):2===arguments.length&&(n=1),n!==parseInt(n,10)||1>n)throw"numRounds must a integer >= 1";switch(t){case"HEX":s=d;break;case"B64":s=p;break;default:throw"format must be HEX or B64"}if("SHA-1"===e)for(a=0;av/8&&(h[t]&=4294967040),m=0;m<=t;m+=1)g[m]=909522486^h[m],b[m]=1549556828^h[m];return n="SHA-1"===n?j(b.concat(j(g.concat(i),e+r)),e+y):F(b.concat(F(g.concat(i),e+r,n)),e+y,n),a(n,f(s))}}function s(e,t){this.a=e,this.b=t}function c(e,t){var n,r,i=[],o=[],a=0;if("UTF8"===t)for(r=0;r>>12,o[1]=128|(4032&n)>>>6,o[2]=128|63&n):128>>6,o[1]=128|63&n):o[0]=n,n=0;n>>2]|=o[n]<<24-a%4*8,a+=1;else if("UTF16"===t)for(r=0;r>>2]|=e.charCodeAt(r)<<16-a%4*8,a+=2;return{value:i,binLen:8*a}}function u(e){var t,n,r=[],i=e.length;if(0!=i%2)throw"String of HEX type must be in byte increments";for(t=0;t>>3]|=n<<24-t%8*4}return{value:r,binLen:4*i}}function l(e){var t,n,r,i,o,a=[],s=0;if(-1===e.search(/^[a-zA-Z0-9=+\/]+$/))throw"Invalid character in base-64 string";if(t=e.indexOf("="),e=e.replace(/\=/g,""),-1!==t&&tcontent>transport>web-socket").first();1===r.length&&(n=r[0].getAttribute("url"));var i=void 0;switch(this.options.config.openBridgeChannel){case"datachannel":case!0:case void 0:i="datachannel";break;case"websocket":i="websocket"}"datachannel"!==i||R.a.supportsDataChannels()||(i="websocket"),"datachannel"===i?this.rtc.initializeBridgeChannel(t,null):"websocket"===i&&n&&this.rtc.initializeBridgeChannel(null,n)},r.prototype._rejectIncomingCallNonModerator=function(e){this._rejectIncomingCall(e,{reasonTag:"security-error",reasonMsg:"Only focus can start new sessions",errorMsg:"Rejecting session-initiate from non-focus andnon-moderator user: "+e.peerjid})},r.prototype._rejectIncomingCall=function(e,t){t&&t.errorMsg&&u.a.callErrorHandler(new Error(t.errorMsg)),e.terminate(null,function(e){j.warn("An error occurred while trying to terminate invalid Jingle session",e)},{reason:t&&t.reasonTag,reasonDescription:t&&t.reasonMsg,sendSessionTerminate:!0})},r.prototype.onCallEnded=function(e,t,n){j.info("Call ended: "+t+" - "+n+" P2P ?"+e.isP2P),e===this.jvbJingleSession?(this.wasStopped=!0,A.a.sendEventToAll("session.terminate"),this.statistics&&(this.statistics.stopRemoteStats(this.jvbJingleSession.peerconnection),j.info("Stopping JVB CallStats"),this.statistics.stopCallStats(this.jvbJingleSession.peerconnection)),this.jvbJingleSession=null,this.rtc.onCallEnded()):e===this.p2pJingleSession?("decline"===t&&"force JVB121"===n?(j.info("In forced JVB 121 mode..."),A.a.analytics.addPermanentProperties({forceJvb121:!0})):"connectivity-error"===t&&"ICE FAILED"===n&&A.a.analytics.addPermanentProperties({p2pFailed:!0}),this._stopP2PSession()):j.error("Received onCallEnded for invalid session",e.sid,e.peerjid,t,n)},r.prototype.onSuspendDetected=function(e){e.isP2P||(this.leave(),this.eventEmitter.emit(h.SUSPEND_DETECTED))},r.prototype.updateDTMFSupport=function(){for(var e=!1,t=this.getParticipants(),n=0;n "+i),!i&&this.deferredStartP2PTask&&this._maybeClearDeferredStartP2P(),r&&!this.p2pJingleSession&&i){var o=n&&t[0];if(r&&"moderator"===o.getRole()){var a=this.myUserId(),s=o.getId();if(a>s)return void j.debug("Everyone's a moderator - the other peer should start P2P",a,s);if(a===s)return void j.error("The same IDs ? ",a,s)}var c=o.getJid();if(e){if(this.deferredStartP2PTask)return void j.error("Deferred start P2P task's been set already!");j.info("Will start P2P with: "+c+" after "+this.backToP2PDelay+" seconds..."),this.deferredStartP2PTask=setTimeout(this._startP2PSession.bind(this,c),1e3*this.backToP2PDelay)}else j.info("Will start P2P with: "+c),this._startP2PSession(c)}else this.p2pJingleSession&&!i&&(j.info("Will stop P2P with: "+this.p2pJingleSession.peerjid),this.p2pJingleSession.isInitiator&&n>1&&A.a.sendEventToAll("p2p.switch_to_jvb"),this._stopP2PSession())},r.prototype._stopP2PSession=function(e,t){if(!this.p2pJingleSession)return void j.error("No P2P session to be stopped!");var n=this.isP2PActive();n&&(this.jvbJingleSession&&this._resumeMediaTransferForJvbConnection(),this._removeRemoteP2PTracks()),j.info("Stopping remote stats for P2P connection"),this.statistics.stopRemoteStats(this.p2pJingleSession.peerconnection),j.info("Stopping CallStats for P2P connection"),this.statistics.stopCallStats(this.p2pJingleSession.peerconnection),this.p2pJingleSession.terminate(function(){j.info("P2P session terminate RESULT")},function(t){e&&j.error("An error occurred while trying to terminate P2P Jingle session",t)},{reason:e||"success",reasonDescription:t||"Turing off P2P session",sendSessionTerminate:this.room&&this.getParticipantById(Strophe.getResourceFromJid(this.p2pJingleSession.peerjid))}),this.p2pJingleSession=null,this._setP2PStatus(!1),n&&(this.jvbJingleSession?this._addRemoteJVBTracks():j.info("Not adding remote JVB tracks - no session yet"))},r.prototype.isP2PActive=function(){return this.p2p},r.prototype.getP2PConnectionState=function(){return this.isP2PActive()?this.p2pJingleSession.peerconnection.getConnectionState():null},r.prototype.startP2PSession=function(){var e=this.getParticipants();if(1!==e.length)throw new Error("There must be exactly 1 participant to start the P2P session !");var t=e[0].getJid();this._startP2PSession(t)},r.prototype.stopP2PSession=function(){this._stopP2PSession()},r.prototype.getSpeakerStats=function(){return this.speakerStatsCollector.getStats()},r.prototype.setReceiverVideoConstraint=function(e){this.rtc.setReceiverVideoConstraint(e)},r.prototype._getVideoSIPGWHandle=function(){return this.videoSIPGWHandler||(this.videoSIPGWHandler=new N.a(this.room),j.info("Created VideoSIPGW")),this.videoSIPGWHandler},r.prototype.isVideoSIPGWAvailable=function(){return this._getVideoSIPGWHandle().isVideoSIPGWAvailable()},r.prototype.createVideoSIPGWSession=function(e,t){return this.room?this._getVideoSIPGWHandle().createVideoSIPGWSession(e,t):null}}).call(t,"JitsiConference.js")},function(e,t,n){"use strict";(function(e){function r(e){this.conference=e,e.on(l.TRACK_MUTE_CHANGED,function(t){if(t.isLocal()&&e.statistics){var n=t.isP2P?e.p2pJingleSession:e.jvbJingleSession,r=n&&n.peerconnection||null;e.statistics.sendMuteEvent(r,t.isMuted(),t.getType())}}),e.on(l.CONNECTION_INTERRUPTED,h.a.sendEventToAll.bind(h.a,"connection.interrupted")),e.on(l.CONNECTION_RESTORED,h.a.sendEventToAll.bind(h.a,"connection.restored"))}t.a=r;var i=n(54),o=n.n(i),a=n(114),s=n.n(a),c=n(0),u=(n.n(c),n(26)),l=n(5),d=n(4),p=n(8),f=n.n(p),h=n(6),m=n(7),v=n.n(m),y=n.i(c.getLogger)(e);r.prototype.setupChatRoomListeners=function(){var e=this,t=this.conference,n=t.room;this.chatRoomForwarder=new s.a(n,this.conference.eventEmitter),n.addListener(v.a.ICE_RESTARTING,function(e){e.isP2P||t.rtc.closeBridgeChannel()}),n.addListener(v.a.AUDIO_MUTED_BY_FOCUS,function(e){t.rtc.setAudioMute(e).then(function(){t.isMutedByFocus=!0},function(){return y.warn("Error while audio muting due to focus request")})}),this.chatRoomForwarder.forward(v.a.SUBJECT_CHANGED,l.SUBJECT_CHANGED),this.chatRoomForwarder.forward(v.a.MUC_JOINED,l.CONFERENCE_JOINED),n.addListener(v.a.MUC_JOINED,function(){e.conference.isJvbConnectionInterrupted=!1,Object.keys(n.connectionTimes).forEach(function(e){var t=n.connectionTimes[e];h.a.analytics.sendEvent("conference."+e,{value:t})}),Object.keys(n.xmpp.connectionTimes).forEach(function(e){var t=n.xmpp.connectionTimes[e];h.a.analytics.sendEvent("xmpp."+e,{value:t})})}),this.chatRoomForwarder.forward(v.a.ROOM_JOIN_ERROR,l.CONFERENCE_FAILED,u.CONNECTION_ERROR),this.chatRoomForwarder.forward(v.a.ROOM_CONNECT_ERROR,l.CONFERENCE_FAILED,u.CONNECTION_ERROR),this.chatRoomForwarder.forward(v.a.ROOM_CONNECT_NOT_ALLOWED_ERROR,l.CONFERENCE_FAILED,u.NOT_ALLOWED_ERROR),this.chatRoomForwarder.forward(v.a.ROOM_MAX_USERS_ERROR,l.CONFERENCE_FAILED,u.CONFERENCE_MAX_USERS),this.chatRoomForwarder.forward(v.a.PASSWORD_REQUIRED,l.CONFERENCE_FAILED,u.PASSWORD_REQUIRED),this.chatRoomForwarder.forward(v.a.AUTHENTICATION_REQUIRED,l.CONFERENCE_FAILED,u.AUTHENTICATION_REQUIRED),this.chatRoomForwarder.forward(v.a.BRIDGE_DOWN,l.CONFERENCE_FAILED,u.VIDEOBRIDGE_NOT_AVAILABLE),n.addListener(v.a.BRIDGE_DOWN,function(){return h.a.analytics.sendEvent("conference.bridgeDown")}),this.chatRoomForwarder.forward(v.a.RESERVATION_ERROR,l.CONFERENCE_FAILED,u.RESERVATION_ERROR),this.chatRoomForwarder.forward(v.a.GRACEFUL_SHUTDOWN,l.CONFERENCE_FAILED,u.GRACEFUL_SHUTDOWN),n.addListener(v.a.JINGLE_FATAL_ERROR,function(e,n){e.isP2P||t.eventEmitter.emit(l.CONFERENCE_FAILED,u.JINGLE_FATAL_ERROR,n)}),n.addListener(v.a.CONNECTION_ICE_FAILED,function(e){t._onIceConnectionFailed(e)}),this.chatRoomForwarder.forward(v.a.MUC_DESTROYED,l.CONFERENCE_FAILED,u.CONFERENCE_DESTROYED),this.chatRoomForwarder.forward(v.a.CHAT_ERROR_RECEIVED,l.CONFERENCE_ERROR,u.CHAT_ERROR),this.chatRoomForwarder.forward(v.a.FOCUS_DISCONNECTED,l.CONFERENCE_FAILED,u.FOCUS_DISCONNECTED),n.addListener(v.a.FOCUS_LEFT,function(){h.a.analytics.sendEvent("conference.focusLeft"),t.eventEmitter.emit(l.CONFERENCE_FAILED,u.FOCUS_LEFT)});var r=function(e){return h.a.sendEventToAll("conference.error."+e)};n.addListener(v.a.SESSION_ACCEPT_TIMEOUT,function(e){r(e.isP2P?"p2pSessionAcceptTimeout":"sessionAcceptTimeout")}), this.chatRoomForwarder.forward(v.a.RECORDER_STATE_CHANGED,l.RECORDER_STATE_CHANGED),this.chatRoomForwarder.forward(v.a.VIDEO_SIP_GW_AVAILABILITY_CHANGED,l.VIDEO_SIP_GW_AVAILABILITY_CHANGED),this.chatRoomForwarder.forward(v.a.PHONE_NUMBER_CHANGED,l.PHONE_NUMBER_CHANGED),n.addListener(v.a.CONFERENCE_SETUP_FAILED,function(e,n){e.isP2P||t.eventEmitter.emit(l.CONFERENCE_FAILED,u.SETUP_FAILED,n)}),n.setParticipantPropertyListener(function(e,n){var r=t.getParticipantById(n);r&&r.setProperty(e.tagName.substring("jitsi_participant_".length),e.value)}),this.chatRoomForwarder.forward(v.a.KICKED,l.KICKED),n.addListener(v.a.KICKED,function(){t.room=null,t.leave()}),n.addListener(v.a.SUSPEND_DETECTED,t.onSuspendDetected.bind(t)),this.chatRoomForwarder.forward(v.a.MUC_LOCK_CHANGED,l.LOCK_STATE_CHANGED),n.addListener(v.a.MUC_MEMBER_JOINED,t.onMemberJoined.bind(t)),n.addListener(v.a.MUC_MEMBER_LEFT,t.onMemberLeft.bind(t)),this.chatRoomForwarder.forward(v.a.MUC_LEFT,l.CONFERENCE_LEFT),n.addListener(v.a.DISPLAY_NAME_CHANGED,t.onDisplayNameChanged.bind(t)),n.addListener(v.a.LOCAL_ROLE_CHANGED,function(e){t.onLocalRoleChanged(e),t.statistics&&t.isModerator()&&t.on(l.RECORDER_STATE_CHANGED,function(e,t){var n={id:"recorder_status",status:e};t&&(n.error=t),h.a.sendLog(JSON.stringify(n))})}),n.addListener(v.a.MUC_ROLE_CHANGED,t.onUserRoleChanged.bind(t)),n.addListener(o.a.IDENTITY_UPDATED,function(e,n){t.authEnabled=e,t.authIdentity=n,t.eventEmitter.emit(l.AUTH_STATUS_CHANGED,e,n)}),n.addListener(v.a.MESSAGE_RECEIVED,function(e,n,r,i,o){var a=Strophe.getResourceFromJid(e);t.eventEmitter.emit(l.MESSAGE_RECEIVED,a,r,o)}),n.addListener(v.a.PRESENCE_STATUS,function(e,n){var r=Strophe.getResourceFromJid(e),i=t.getParticipantById(r);i&&i._status!==n&&(i._status=n,t.eventEmitter.emit(l.USER_STATUS_CHANGED,r,n))}),n.addPresenceListener("startmuted",function(e,n){var r=!1;if(t.myUserId()===n&&t.isModerator())r=!0;else{var i=t.getParticipantById(n);i&&i.isModerator()&&(r=!0)}if(r){var o="true"===e.attributes.audio,a="true"===e.attributes.video,s=!1;o!==t.startMutedPolicy.audio&&(t.startMutedPolicy.audio=o,s=!0),a!==t.startMutedPolicy.video&&(t.startMutedPolicy.video=a,s=!0),s&&t.eventEmitter.emit(l.START_MUTED_POLICY_CHANGED,t.startMutedPolicy)}}),n.addPresenceListener("devices",function(e,n){var r=!1,i=!1;e.children.forEach(function(e){"audio"===e.tagName&&(r="true"===e.value),"video"===e.tagName&&(i="true"===e.value)});var o=void 0;if(t.myUserId()===n)o=t.availableDevices;else{var a=t.getParticipantById(n);if(!a)return;o=a._availableDevices}var s=!1;o.audio!==r&&(s=!0,o.audio=r),o.video!==i&&(s=!0,o.video=i),s&&t.eventEmitter.emit(l.AVAILABLE_DEVICES_CHANGED,n,o)}),t.statistics&&(n.addListener(v.a.CONNECTION_ICE_FAILED,function(e){t.statistics.sendIceConnectionFailedEvent(e.peerconnection)}),n.addListener(v.a.ADD_ICE_CANDIDATE_FAILED,function(e,n){t.statistics.sendAddIceCandidateFailed(e,n)}))},r.prototype.setupRTCListeners=function(){var e=this.conference,t=e.rtc;t.addListener(f.a.REMOTE_TRACK_ADDED,e.onRemoteTrackAdded.bind(e)),t.addListener(f.a.REMOTE_TRACK_REMOVED,e.onRemoteTrackRemoved.bind(e)),t.addListener(f.a.DOMINANT_SPEAKER_CHANGED,function(t){e.lastDominantSpeaker!==t&&e.room&&(e.lastDominantSpeaker=t,e.eventEmitter.emit(l.DOMINANT_SPEAKER_CHANGED,t)),e.statistics&&e.myUserId()===t&&e.statistics.sendDominantSpeakerEvent()}),t.addListener(f.a.DATA_CHANNEL_OPEN,function(){var t=window.performance.now();y.log("(TIME) data channel opened ",t),e.room.connectionTimes["data.channel.opened"]=t,h.a.analytics.sendEvent("conference.dataChannel.open",{value:t}),e.eventEmitter.emit(l.DATA_CHANNEL_OPENED)}),t.addListener(f.a.AVAILABLE_DEVICES_CHANGED,function(t){return e.room.updateDeviceAvailability(t)}),t.addListener(f.a.ENDPOINT_MESSAGE_RECEIVED,function(t,n){var r=e.getParticipantById(t);r?e.eventEmitter.emit(l.ENDPOINT_MESSAGE_RECEIVED,r,n):y.warn("Ignored ENDPOINT_MESSAGE_RECEIVED for not existing participant: "+t,n)}),t.addListener(f.a.LOCAL_UFRAG_CHANGED,function(e,t){e.isP2P||h.a.sendLog(JSON.stringify({id:"local_ufrag",value:t}))}),t.addListener(f.a.REMOTE_UFRAG_CHANGED,function(e,t){e.isP2P||h.a.sendLog(JSON.stringify({id:"remote_ufrag",value:t}))}),e.statistics&&(t.addListener(f.a.CREATE_ANSWER_FAILED,function(t,n){e.statistics.sendCreateAnswerFailed(t,n)}),t.addListener(f.a.CREATE_OFFER_FAILED,function(t,n){e.statistics.sendCreateOfferFailed(t,n)}),t.addListener(f.a.SET_LOCAL_DESCRIPTION_FAILED,function(t,n){e.statistics.sendSetLocalDescFailed(t,n)}),t.addListener(f.a.SET_REMOTE_DESCRIPTION_FAILED,function(t,n){e.statistics.sendSetRemoteDescFailed(t,n)}))},r.prototype.setupXMPPListeners=function(){var e=this.conference;e.xmpp.caps.addListener(v.a.PARTCIPANT_FEATURES_CHANGED,function(t){var n=e.getParticipantId(Strophe.getResourceFromJid(t));n&&e.eventEmitter.emit(l.PARTCIPANT_FEATURES_CHANGED,n)}),e.xmpp.addListener(v.a.CALL_INCOMING,e.onIncomingCall.bind(e)),e.xmpp.addListener(v.a.CALL_ACCEPTED,e.onCallAccepted.bind(e)),e.xmpp.addListener(v.a.TRANSPORT_INFO,e.onTransportInfo.bind(e)),e.xmpp.addListener(v.a.CALL_ENDED,e.onCallEnded.bind(e)),e.xmpp.addListener(v.a.START_MUTED_FROM_FOCUS,function(t,n){e.options.config.ignoreStartMuted||(e.startAudioMuted=t,e.startVideoMuted=n,e.getLocalTracks().forEach(function(t){switch(t.getType()){case d.a:e.startAudioMuted&&t.mute();break;case d.b:e.startVideoMuted&&t.mute()}}),e.eventEmitter.emit(l.STARTED_MUTED))})},r.prototype.setupStatisticsListeners=function(){var e=this.conference;e.statistics&&(e.statistics.addAudioLevelListener(function(t,n,r,i){e.rtc.setAudioLevel(t,n,r,i)}),e.statistics.addBeforeDisposedListener(function(){e.eventEmitter.emit(l.BEFORE_STATISTICS_DISPOSED)}),e.statistics.addByteSentStatsListener(function(t,n){e.getLocalTracks(d.a).forEach(function(e){var r=t.getLocalSSRC(e);r&&n.hasOwnProperty(r)&&e._setByteSent(t,n[r])})}))}}).call(t,"JitsiConferenceEventManager.js")},function(e,t,n){"use strict";function r(e,t,n){this.appID=e,this.token=t,this.options=n,this.xmpp=new s.a(n,t),this.addEventListener(o.CONNECTION_FAILED,function(e,t){a.a.sendEventToAll("connection.failed."+e,{label:t})}),this.addEventListener(o.CONNECTION_DISCONNECTED,function(e){e&&a.a.analytics.sendEvent("connection.disconnected."+e),a.a.sendLog(JSON.stringify({id:"connection.disconnected",msg:e}))})}t.a=r;var i=n(80),o=n(27),a=n(6),s=n(135);r.prototype.connect=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.xmpp.connect(e.id,e.password)},r.prototype.attach=function(e){this.xmpp.attach(e)},r.prototype.disconnect=function(){var e;(e=this.xmpp).disconnect.apply(e,arguments)},r.prototype.setToken=function(e){this.token=e},r.prototype.initJitsiConference=function(e,t){return new i.a({name:e,config:t,connection:this})},r.prototype.addEventListener=function(e,t){this.xmpp.addListener(e,t)},r.prototype.removeEventListener=function(e,t){this.xmpp.removeListener(e,t)},r.prototype.getConnectionTimes=function(){return this.xmpp.connectionTimes},r.prototype.addFeature=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.xmpp.caps.addFeature(e,t)},r.prototype.removeFeature=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.xmpp.caps.removeFeature(e,t)}},function(e,t,n){"use strict";function r(e,t){var n=t.find(function(t){return"audiooutput"===t.kind&&t.deviceId===e});n&&p.a.sendActiveDeviceListEvent(c.a.getEventDataForActiveDevice(n))}var i=n(14),o=n.n(i),a=n(44),s=n(4),c=n(22),u=n(1),l=n(8),d=n.n(l),p=n(6),f=new o.a,h={enumerateDevices:function(e){c.a.enumerateDevices(e)},isDeviceListAvailable:function(){return c.a.isDeviceListAvailable()},isDeviceChangeAvailable:function(e){return c.a.isDeviceChangeAvailable(e)},isDevicePermissionGranted:function(e){var t=c.a.getDeviceAvailability();switch(e){case s.b:return!0===t.video;case s.a:return!0===t.audio;default:return!0===t.video&&!0===t.audio}},isMultipleAudioInputSupported:function(){return!u.a.isFirefox()},getAudioOutputDevice:function(){return c.a.getAudioOutputDevice()},setAudioOutputDevice:function(e){var t=c.a.getCurrentlyAvailableMediaDevices();return t&&t.length>0&&r(e,c.a.getCurrentlyAvailableMediaDevices()),c.a.setAudioOutputDevice(e)},addEventListener:function(e,t){f.addListener(e,t)},removeEventListener:function(e,t){f.removeListener(e,t)},emitEvent:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r0&&void 0!==arguments[0]?arguments[0]:5e3;return this._conference.xmpp.caps.getFeatures(this._jid,e)}}]),e}();t.a=c},function(e,t,n){e.exports=n(68).default},function(e,t,n){(function(e){function t(e,t){var n=e.getTrack();if(!n)throw new Error("Failed to initialize DTMFSender: no audio track.");this.dtmfSender=t.peerconnection.createDTMFSender(n),r.debug("Initialized DTMFSender")}var r=n(0).getLogger(e);t.prototype.sendTones=function(e,t,n){this.dtmfSender.insertDTMF(e,t||200,n||200)}}).call(t,"modules/DTMF/JitsiDTMFManager.js")},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=n(5),o=function(){function e(e,t){for(var n=0;n should fake sdp ? : "+h),h){var m=this.tpc.isSimulcastOn()?this.tpc.simulcast.ssrcCache:[this.tpc.sdpConsistency.cachedPrimarySsrc];if(m.length){r=!0,n.direction="sendrecv";var v=m[0],y="injected-"+v,g=!0,b=!1,S=void 0;try{for(var E,T=m["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(g=(E=T.next()).done);g=!0){var _=E.value;n.removeSSRC(_),c.debug(this.tpc+" injecting video SSRC: "+_+" for "+d),n.addSSRCAttribute({id:_,attribute:"cname",value:y}),n.addSSRCAttribute({id:_,attribute:"msid",value:d.storedMSID})}}catch(e){b=!0,S=e}finally{try{!g&&T.return&&T.return()}finally{if(b)throw S}}if(m.length>1){var C={ssrcs:m.join(" "),semantics:"SIM"};n.findGroup(C.semantics,C.ssrcs)||(c.debug(this.tpc+" injecting SIM group for "+d,C),n.addSSRCGroup(C))}this.tpc.options.disableRtx||this.tpc.rtxModifier.modifyRtxSsrcs2(n)}else c.error("No SSRCs stored for: "+d+" in "+this.tpc)}}}catch(e){a=!0,s=e}finally{try{!i&&l.return&&l.return()}finally{if(a)throw s}}return r}},{key:"maybeMungeLocalSdp",value:function(e){if(e&&e.sdp){var t=new a.a(e.sdp);this._addMutedLocalVideoTracksToSDP(t)&&(e.sdp=t.toRawSDP())}}}]),e}();t.a=u}).call(t,"modules/RTC/LocalSdpMunger.js")},function(e,t,n){"use strict";(function(e){var r=n(1),i=n(0).getLogger(e),o={getVideoElementName:function(){return r.a.isTemasysPluginUsed()?"object":"video"},findVideoElement:function(e){var t=o.getVideoElementName();if(!r.a.isTemasysPluginUsed())return $(e).find(t)[0];var n=$(e).find(" "+t+'>param[value="video"]');return n.length?(n.length>1&&i.warn("Container with more than one video elements: ",e),n.parent()[0]):void 0},isResizeEventSupported:function(){return!r.a.isTemasysPluginUsed()},setVolume:function(e,t){r.a.isIExplorer()||(e.volume=t)},setAutoPlay:function(e,t){r.a.isIExplorer()||(e.autoplay=t)}};t.a=o}).call(t,"modules/RTC/RTCUIHelper.js")},function(e,t,n){"use strict";(function(e){function r(e,t,n){T(["screen"],function(e){return t({stream:e})},n)}function i(e){return"https://chrome.google.com/webstore/detail/"+e.desktopSharingChromeExtId}function o(e,t){try{for(var n=e.split("."),r=t.split("."),i=Math.max(n.length,r.length),o=0;os}return!1}catch(e){return y.callErrorHandler(e),v.error("Failed to parse extension version",e),!0}}function a(e,t){if("undefined"==typeof chrome||!chrome||!chrome.runtime)return void e(!1,!1);chrome.runtime.sendMessage(t.desktopSharingChromeExtId,{getVersion:!0},function(n){if(!n||!n.version)return v.warn("Extension not installed?: ",chrome.runtime.lastError),void e(!1,!1);var r=n.version ;v.log("Extension version is: "+r);var i=o(t.desktopSharingChromeMinExtVersion,r);e(!i,i)})}function s(e,t,n){chrome.runtime.sendMessage(e.desktopSharingChromeExtId,{getStream:!0,sources:e.desktopSharingChromeSources},function(e){if(!e){var r=chrome.runtime.lastError;return void n(r instanceof Error?r:new f.a(h.CHROME_EXTENSION_GENERIC_ERROR,r))}v.log("Response from extension: ",e),d(e,t,n)})}function c(e){0===$("link[rel=chrome-webstore-item]").length&&$("head").append(''),$("link[rel=chrome-webstore-item]").attr("href",i(e))}function u(e){return c(e),new Promise(function(t){a(function(e,n){g=e,b=n,v.info("Chrome extension installed: "+g+" updateRequired: "+b),t()},e)})}function l(e,t,n){return 0===n?Promise.reject():new Promise(function(r,i){var o=n,s=window.setInterval(function(){a(function(e){e?(window.clearInterval(s),r()):0==--o&&(i(),window.clearInterval(s))},e)},t)})}function d(e,t,n){var r=e.streamId,i=e.streamType,o=e.error;if(r)T(["desktop"],function(e){return t({stream:e,sourceId:r,sourceType:i})},n,{desktopStream:r});else{if(""===r)return void n(new f.a(h.CHROME_EXTENSION_USER_CANCELED));n(new f.a(h.CHROME_EXTENSION_GENERIC_ERROR,o))}}function p(e){if(!e.desktopSharingFirefoxDisabled&&!1!==S&&!0!==S){if(!e.desktopSharingFirefoxExtId)return void(S=!1);var t=document.createElement("img");t.onload=function(){v.log("Detected firefox screen sharing extension."),S=!0},t.onerror=function(){v.log("Detected lack of firefox screen sharing extension."),S=!1};var n="chrome://"+e.desktopSharingFirefoxExtId.replace("@",".")+"/content/"+document.location.hostname+".png";t.setAttribute("src",n)}}var f=n(11),h=n(15),m=n(1),v=n(0).getLogger(e),y=n(3),g=!1,b=!1,S=null,E=!1,T=null,_={intChromeExtPromise:null,obtainStream:null,init:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{disableDesktopSharing:!1,desktopSharingChromeDisabled:!1,desktopSharingChromeExtId:null,desktopSharingFirefoxDisabled:!1,desktopSharingFirefoxExtId:null},t=arguments[1];this.options=e=e||{},T=t,this.obtainStream=this.options.disableDesktopSharing?null:this._createObtainStreamMethod(e),this.obtainStream||v.info("Desktop sharing disabled")},_createObtainStreamMethod:function(e){var t=this;if(m.a.isNWJS())return function(e,t,n){window.JitsiMeetNW.obtainDesktopStream(t,function(e,t){var r=void 0;r=e&&"InvalidStateError"===e.name?new f.a(h.CHROME_EXTENSION_USER_CANCELED):new f.a(e,t,["desktop"]),"function"==typeof n&&n(r)})};if(m.a.isElectron())return this.obtainScreenOnElectron;if(m.a.isTemasysPluginUsed()){var i=n(33).WebRTCPlugin.plugin;return i.HasScreensharingFeature?i.isScreensharingAvailable?(v.info("Using Temasys plugin for desktop sharing"),r):(v.warn("Screensharing not available with Temasys plugin on this site"),null):(v.warn("Screensharing not supported by this plugin version"),null)}return m.a.isChrome()?m.a.getChromeVersion()<34?(v.info("Chrome extension not supported until ver 34"),null):e.desktopSharingChromeDisabled||!1===e.desktopSharingChromeMethod||!e.desktopSharingChromeExtId?null:(v.info("Using Chrome extension for desktop sharing"),this.intChromeExtPromise=u(e).then(function(){t.intChromeExtPromise=null}),this.obtainScreenFromExtension):m.a.isFirefox()?e.desktopSharingFirefoxDisabled?null:"http:"===window.location.protocol?(v.log("Screen sharing is not supported over HTTP. Use of HTTPS is required."),null):(p(e),this.obtainScreenOnFirefox):(v.log("Screen sharing not supported by the current browser: ",m.a.getBrowserType(),m.a.getBrowserName()),null)},isSupported:function(){return null!==this.obtainStream},obtainScreenOnFirefox:function(e,t,n){var i=this,o=!1,a=this.options.desktopSharingFirefoxMaxVersionExtRequired;return(-1===a||a>=0&&m.a.getFirefoxVersion()<=a)&&(o=!0,v.log("Jidesha extension required on firefox version "+m.a.getFirefoxVersion())),o&&!0!==S?(E&&(E=!1,p(this.options)),null===S?(window.setTimeout(function(){null===S&&(S=!1),i.obtainScreenOnFirefox(t,n)},300),void v.log("Waiting for detection of jidesha on firefox to finish.")):(S=null,E=!0,void n(new f.a(h.FIREFOX_EXTENSION_NEEDED)))):void r(e,t,n)},obtainScreenOnElectron:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1],n=arguments[2];window.JitsiMeetScreenObtainer&&window.JitsiMeetScreenObtainer.openDesktopPicker?window.JitsiMeetScreenObtainer.openDesktopPicker({desktopSharingSources:e.desktopSharingSources||this.options.desktopSharingChromeSources},function(e,r){return d({streamId:e,streamType:r},t,n)},function(e){return n(new f.a(h.ELECTRON_DESKTOP_PICKER_ERROR,e))}):n(new f.a(h.ELECTRON_DESKTOP_PICKER_NOT_FOUND))},obtainScreenFromExtension:function(e,t,n){var r=this;if(null!==this.intChromeExtPromise)return void this.intChromeExtPromise.then(function(){r.obtainScreenFromExtension(e,t,n)});var o=this.options,a=o.desktopSharingChromeExtId,c=o.desktopSharingChromeSources,u={desktopSharingChromeExtId:a,desktopSharingChromeSources:e.desktopSharingSources||c};if(g)s(u,t,n);else{b&&alert("Jitsi Desktop Streamer requires update. Changes will take effect after next Chrome restart.");try{chrome.webstore.install(i(this.options),function(i){v.log("Extension installed successfully",i),g=!0,l(r.options,200,10).then(function(){s(u,t,n)}).catch(function(){r.handleExtensionInstallationError(e,t,n)})},this.handleExtensionInstallationError.bind(this,e,t,n))}catch(r){this.handleExtensionInstallationError(e,t,n,r)}}},handleExtensionInstallationError:function(e,t,n,r){var o=i(this.options);if(("Inline installs can not be initiated from pop-up windows."===r||"Chrome Web Store installations can only be started by the top frame."===r||"Installs can only be initiated by one of the Chrome Web Store item's verified sites."===r)&&e.interval>0&&"function"==typeof e.checkAgain&&"function"==typeof e.listener)return e.listener("waitingForExtension",o),void this.checkForChromeExtensionOnInterval(e,t,n,r);var a="Failed to install the extension from "+o;v.log(a,r);var s="Chrome Web Store installations can only be initated by a user gesture."===r?h.CHROME_EXTENSION_USER_GESTURE_REQUIRED:h.CHROME_EXTENSION_INSTALLATION_ERROR;n(new f.a(s,a))},checkForChromeExtensionOnInterval:function(e,t,n){var r=this;if(!1===e.checkAgain())return void n(new f.a(h.CHROME_EXTENSION_INSTALLATION_ERROR));l(this.options,e.interval,1).then(function(){g=!0,e.listener("extensionFound"),r.obtainScreenFromExtension(e,t,n)}).catch(function(){r.checkForChromeExtensionOnInterval(e,t,n)})}};t.a=_}).call(t,"modules/RTC/ScreenObtainer.js")},function(e,t,n){"use strict";(function(e){function r(e,t,r,i,o,a,s){var c=this;this.audioTransferActive=!0,this.videoTransferActive=!0,this.rtc=e,this.id=t,this.isP2P=a,this.remoteTracks=new Map,this.localTracks=new Map,this.localSSRCs=new Map,this.localUfrag=null,this.remoteUfrag=null,this.signalingLayer=r,this._peerVideoTypeChanged=this._peerVideoTypeChanged.bind(this),this.signalingLayer.on(_.a,this._peerVideoTypeChanged),this._peerMutedChanged=this._peerMutedChanged.bind(this),this.signalingLayer.on(_.b,this._peerMutedChanged),this.options=s,this.peerconnection=new h.a.RTCPeerConnectionType(i,o),this.updateLog=[],this.stats={},this.statsinterval=null,this.maxstats=0;var u=n(139).Interop;this.interop=new u;var l=n(142);this.simulcast=new l({numOfLayers:R,explodeRemoteSimulcast:!1}),this.sdpConsistency=new S.a(this.toString()),this.localSdpMunger=new p.a(this),this.eventEmitter=e.eventEmitter,this.rtxModifier=new g.a,this.trace=function(e,t){c.updateLog.push({time:new Date,type:e,value:t||""})},this.onicecandidate=null,this.peerconnection.onicecandidate=function(e){m.a.isTemasysPluginUsed()||c.trace("onicecandidate",JSON.stringify(e.candidate,null," ")),null!==c.onicecandidate&&c.onicecandidate(e)},this.peerconnection.onaddstream=function(e){return c._remoteStreamAdded(e.stream)},this.peerconnection.onremovestream=function(e){return c._remoteStreamRemoved(e.stream)},this.onsignalingstatechange=null,this.peerconnection.onsignalingstatechange=function(e){c.trace("onsignalingstatechange",c.signalingState),null!==c.onsignalingstatechange&&c.onsignalingstatechange(e)},this.oniceconnectionstatechange=null,this.peerconnection.oniceconnectionstatechange=function(e){c.trace("oniceconnectionstatechange",c.iceConnectionState),null!==c.oniceconnectionstatechange&&c.oniceconnectionstatechange(e)},this.onnegotiationneeded=null,this.peerconnection.onnegotiationneeded=function(e){c.trace("onnegotiationneeded"),null!==c.onnegotiationneeded&&c.onnegotiationneeded(e)},this.ondatachannel=null,this.peerconnection.ondatachannel=function(e){c.trace("ondatachannel",e),null!==c.ondatachannel&&c.ondatachannel(e)},!m.a.isFirefox()&&this.maxstats&&(this.statsinterval=window.setInterval(function(){c.peerconnection.getStats(function(e){for(var t=e.result(),n=new Date,r=0;rc.maxstats&&(o.values.shift(),o.times.shift()),o.endTime=n})}(r)})},1e3)),w.info("Create new "+this)}function i(e){var t=new Map,n=new Map;if("object"!==(void 0===e?"undefined":C(e))||null===e||"string"!=typeof e.sdp)return w.warn("An empty description was passed as an argument."),t;var r=c.a.parse(e.sdp);if(!Array.isArray(r.media))return t;var i=!0,o=!1,a=void 0;try{for(var s,u=r.media["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(i=(s=u.next()).done);i=!0){var l=s.value;if(Array.isArray(l.ssrcs)){if(Array.isArray(l.ssrcGroups)){var d=!0,p=!1,f=void 0;try{for(var h,m=l.ssrcGroups["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(d=(h=m.next()).done);d=!0){var v=h.value;if(void 0!==v.semantics&&void 0!==v.ssrcs){var y=v.ssrcs.split(" ").map(function(e){return parseInt(e,10)}),g=y[0];v.ssrcs=y,n.has(g)||n.set(g,[]),n.get(g).push(v)}}}catch(e){p=!0,f=e}finally{try{!d&&m.return&&m.return()}finally{if(p)throw f}}}var b=!0,S=!1,E=void 0;try{for(var T,_=l.ssrcs["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(b=(T=_.next()).done);b=!0){var R=T.value;if("msid"===R.attribute){var k=R.value,A=t.get(k);A||(A={ssrcs:[],groups:[],msid:k},t.set(k,A));var P=R.id;if(A.ssrcs.push(P),n.has(P)){var I=n.get(P),O=!0,D=!1,L=void 0;try{for(var N,M=I["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(O=(N=M.next()).done);O=!0){var x=N.value;A.groups.push(x)}}catch(e){D=!0,L=e}finally{try{!O&&M.return&&M.return()}finally{if(D)throw L}}}}}}catch(e){S=!0,E=e}finally{try{!b&&_.return&&_.return()}finally{if(S)throw E}}}}}catch(e){o=!0,a=e}finally{try{!i&&u.return&&u.return()}finally{if(o)throw a}}return t}function o(e){return e&&e.groups&&e.groups.length?e.groups[0].ssrcs[0]:e&&e.ssrcs&&e.ssrcs.length?e.ssrcs[0]:null}t.a=r;var a=n(0),s=(n.n(a),n(13)),c=n.n(s),u=n(3),l=(n.n(u),n(90)),d=n(4),p=n(91),f=n(22),h=n(23),m=n(1),v=n(8),y=n.n(v),g=n(123),b=n(51),S=n(125),E=n(24),T=n(12),_=n(53),C="function"==typeof Symbol&&"symbol"==typeof("function"==typeof Symbol?Symbol.iterator:"@@iterator")?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==("function"==typeof Symbol?Symbol.prototype:"@@prototype")?"symbol":typeof e},w=n.i(a.getLogger)(e),R=3,k=["1","2","3"],A=function(e){return void 0===e||null===e?"":"type: "+e.type+"\r\n"+e.sdp};r.prototype.getConnectionState=function(){var e=this.peerconnection.iceConnectionState;return"completed"===e?"connected":e},r.prototype._getDesiredMediaDirection=function(e){var t=!0;return e===d.a?t=this.audioTransferActive:e===d.b&&(t=this.videoTransferActive),t?this.hasAnyTracksOfType(e)?"sendrecv":"recvonly":"inactive"},r.prototype.isSimulcastOn=function(){return!this.options.disableSimulcast&&m.a.supportsSimulcast()&&(!m.a.isFirefox()||this.options.enableFirefoxSimulcast)},r.prototype._peerVideoTypeChanged=function(e,t){if(!e)return void w.error("No endpointID on peerVideoTypeChanged "+this);var n=this.getRemoteTracks(e,d.b);n.length&&n[0]._setVideoType(t)},r.prototype._peerMutedChanged=function(e,t,n){if(!e)return void w.error("On peerMuteChanged - no endpoint ID");var r=this.getRemoteTracks(e,t);r.length&&r[0].setMute(n)},r.prototype.getLocalTracks=function(e){var t=Array.from(this.localTracks.values());return void 0!==e&&(t=t.filter(function(t){return t.getType()===e})),t},r.prototype.hasAnyTracksOfType=function(e){if(!e)throw new Error('"mediaType" is required');return this.getLocalTracks(e).length>0},r.prototype.getRemoteTracks=function(e,t){var n=[],r=e?[e]:this.remoteTracks.keys(),i=!0,o=!1,a=void 0;try{for(var s,c=r["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(i=(s=c.next()).done);i=!0){var u=s.value,l=this.remoteTracks.get(u);if(l){var d=!0,p=!1,f=void 0;try{for(var h,m=l.keys()["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(d=(h=m.next()).done);d=!0){var v=h.value;if(!t||t===v){var y=l.get(v);y&&n.push(y)}}}catch(e){p=!0,f=e}finally{try{!d&&m.return&&m.return()}finally{if(p)throw f}}}}}catch(e){o=!0,a=e}finally{try{!i&&c.return&&c.return()}finally{if(o)throw a}}return n},r.prototype.getTrackBySSRC=function(e){if("number"!=typeof e)throw new Error("SSRC "+e+" is not a number");var t=!0,n=!1,r=void 0;try{for(var i,o=this.localTracks.values()["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(t=(i=o.next()).done);t=!0){var a=i.value;if(this.getLocalSSRC(a)===e)return a}}catch(e){n=!0,r=e}finally{try{!t&&o.return&&o.return()}finally{if(n)throw r}}var s=!0,c=!1,u=void 0;try{for(var l,d=this.getRemoteTracks()["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(s=(l=d.next()).done);s=!0){var p=l.value;if(p.getSSRC()===e)return p}}catch(e){c=!0,u=e}finally{try{!s&&d.return&&d.return()}finally{if(c)throw u}}return null},r.prototype._remoteStreamAdded=function(e){var t=this,n=f.a.getStreamID(e);if(!f.a.isUserStreamById(n))return void w.info(this+" ignored remote 'stream added' event for non-user streamid: "+n);(m.a.isChrome()||m.a.isNWJS()||m.a.isElectron()||m.a.isEdge())&&(e.onaddtrack=function(n){t._remoteTrackAdded(e,n.track)},e.onremovetrack=function(n){t._remoteTrackRemoved(e,n.track)});var r=e.getAudioTracks(),i=!0,o=!1,a=void 0;try{for(var s,c=r["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(i=(s=c.next()).done);i=!0){var u=s.value;this._remoteTrackAdded(e,u)}}catch(e){o=!0,a=e}finally{try{!i&&c.return&&c.return()}finally{if(o)throw a}}var l=e.getVideoTracks(),d=!0,p=!1,h=void 0;try{for(var v,y=l["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(d=(v=y.next()).done);d=!0){var g=v.value;this._remoteTrackAdded(e,g)}}catch(e){p=!0,h=e}finally{try{!d&&y.return&&y.return()}finally{if(p)throw h}}},r.prototype._remoteTrackAdded=function(e,t){var n=f.a.getStreamID(e),r=t.kind;if(w.info(this+" remote track added:",n,r),!r)return void u.callErrorHandler(new Error("MediaType undefined for remote track, stream id: "+n));var i=new b.a(this.remoteDescription.sdp),o=i.media.filter(function(e){return e.startsWith("m="+r)});if(!o.length)return void u.callErrorHandler(new Error("No media lines for type "+r+" found in remote SDP for remote track: "+n));var a=T.a.findLines(o[0],"a=ssrc:");if(a=a.filter(function(e){var t=m.a.isTemasysPluginUsed()?"mslabel":"msid";return-1!==e.indexOf(t+":"+n)}),!a.length)return void u.callErrorHandler(new Error("No SSRC lines for streamId "+n+" for remote track, media type: "+r));var s=a[0].substring(7).split(" ")[0],c=Number(s),l=this.signalingLayer.getSSRCOwner(c);if(isNaN(c)||c<0)return void u.callErrorHandler(new Error("Invalid SSRC: "+s+" for remote track, msid: "+n+" media type: "+r));if(!l)return void u.callErrorHandler(new Error("No SSRC owner known for: "+c+" for remote track, msid: "+n+" media type: "+r));w.log(this+" associated ssrc",l,c);var d=this.signalingLayer.getPeerMediaInfo(l,r);if(!d)return void u.callErrorHandler(new Error(this+": no peer media info available for "+l));var p=d.muted,h=d.videoType;this._createRemoteTrack(l,e,t,r,h,c,p)},r.prototype._createRemoteTrack=function(e,t,n,r,i,o,a){var s=new l.a(this.rtc,this.rtc.conference,e,t,n,r,i,o,a,this.isP2P),c=this.remoteTracks.get(e);c||(c=new Map,this.remoteTracks.set(e,c)),c.has(r)&&w.error(this+" overwriting remote track! "+s,e,r),c.set(r,s),this.eventEmitter.emit(y.a.REMOTE_TRACK_ADDED,s)},r.prototype._remoteStreamRemoved=function(e){if(!f.a.isUserStream(e)){var t=f.a.getStreamID(e);return void w.info("Ignored remote 'stream removed' event for non-user stream "+t)}var n=e.getVideoTracks(),r=!0,i=!1,o=void 0;try{for(var a,s=n["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(r=(a=s.next()).done);r=!0){var c=a.value;this._remoteTrackRemoved(e,c)}}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}var u=e.getAudioTracks(),l=!0,d=!1,p=void 0;try{for(var h,m=u["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(l=(h=m.next()).done);l=!0){var v=h.value;this._remoteTrackRemoved(e,v)}}catch(e){d=!0,p=e}finally{try{!l&&m.return&&m.return()}finally{if(d)throw p}}},r.prototype._remoteTrackRemoved=function(e,t){var n=f.a.getStreamID(e),r=t&&f.a.getTrackID(t);return w.info(this+" - remote track removed: "+n+", "+r),n?r?void(this._removeRemoteTrackById(n,r)||w.warn(this+" Removed track not found for msid: "+n+",\n track id: "+r)):void u.callErrorHandler(new Error(this+" remote track removal failed - no track ID")):void u.callErrorHandler(new Error(this+" remote track removal failed - no stream ID"))},r.prototype._getRemoteTrackById=function(e,t){var n=!0,r=!1,i=void 0;try{for(var o,a=this.remoteTracks.values()["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(n=(o=a.next()).done);n=!0){var s=o.value,c=!0,u=!1,l=void 0;try{for(var d,p=s.values()["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(c=(d=p.next()).done);c=!0){var f=d.value;if(f.getStreamId()==e&&f.getTrackId()==t)return f}}catch(e){u=!0,l=e}finally{try{!c&&p.return&&p.return()}finally{if(u)throw l}}}}catch(e){r=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}},r.prototype.removeRemoteTracks=function(e){var t=[],n=this.remoteTracks.get(e);if(n){var r=n.get(d.a),i=n.get(d.b);r&&t.push(r),i&&t.push(i),this.remoteTracks.delete(e)}return w.debug(this+" removed remote tracks for "+e+" count: "+t.length),t},r.prototype._removeRemoteTrack=function(e){e.dispose();var t=e.getParticipantId(),n=this.remoteTracks.get(t);n?n.delete(e.getType())||w.error("Failed to remove "+e+" - type mapping messed up ?"):w.error("removeRemoteTrack: no remote tracks map for "+t),this.eventEmitter.emit(y.a.REMOTE_TRACK_REMOVED,e)},r.prototype._removeRemoteTrackById=function(e,t){var n=this._getRemoteTrackById(e,t);return n&&this._removeRemoteTrack(n),n};var P=function(e){if("object"!==(void 0===e?"undefined":C(e))||null===e||"string"!=typeof e.sdp)return w.warn("An empty description was passed as an argument."),e;var t=n(13),r=t.parse(e.sdp);void 0!==r&&void 0!==r.media&&Array.isArray(r.media)&&r.media.forEach(function(e){var t=[],n=[];if(void 0!==e.ssrcGroups&&Array.isArray(e.ssrcGroups)&&e.ssrcGroups.forEach(function(e){void 0!==e.semantics&&"FID"===e.semantics&&void 0!==e.ssrcs&&t.push(Number(e.ssrcs.split(" ")[0]))}),Array.isArray(e.ssrcs)){var r=void 0;for(r=0;r=0&&(n.push(e.ssrcs[r]),delete e.ssrcs[r]);for(r=0;r1&&(k.encoding=R.numChannels),u.rtp.push(k),R.parameters){var A={config:"",payload:R.preferredPayloadType},P=!0,I=!1,O=void 0;try{for(var D,L=Object.keys(R.parameters)["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(P=(D=L.next()).done);P=!0){var N=D.value;A.config&&(A.config+=";"),A.config+=N+"="+R.parameters[N]}}catch(e){I=!0,O=e}finally{try{!P&&L.return&&L.return()}finally{if(I)throw O}}A.config&&u.fmtp.push(A)}var M=!0,x=!1,j=void 0;try{for(var F,U=(R.rtcpFeedback||[])["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(M=(F=U.next()).done);M=!0){var B=F.value;u.rtcpFb.push({payload:R.preferredPayloadType,subtype:B.parameter||void 0,type:B.type})}}catch(e){x=!0,j=e}finally{try{!M&&U.return&&U.return()}finally{if(x)throw j}}}}}catch(e){T=!0,_=e}finally{try{!E&&w.return&&w.return()}finally{if(T)throw _}}0===b.length?(u.payloads="9",u.port=0,u.direction="inactive"):u.payloads=b.join(" "),u.ssrcs=[],u.ssrcGroups=[];var J=!0,G=!1,H=void 0;try{for(var V,W=c.values()["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(J=(V=W.next()).done);J=!0){var K=V.value,q=K.rtpSender,z=K.stream.id,$=q.track;if("ended"!==$.readyState&&$.kind===o){K.ssrc||(K.ssrc=h.a.generateSsrc());var X=l&&"video"===$.kind;X&&!K.rtxSsrc&&(K.rtxSsrc=K.ssrc+1),u.ssrcs.push({attribute:"cname",id:K.ssrc,value:S}),u.ssrcs.push({attribute:"msid",id:K.ssrc,value:z+" "+$.id}),u.ssrcs.push({attribute:"mslabel",id:K.ssrc,value:z}),u.ssrcs.push({attribute:"label",id:K.ssrc,value:$.id}),X&&(u.ssrcs.push({attribute:"cname",id:K.rtxSsrc,value:S}),u.ssrcs.push({attribute:"msid",id:K.rtxSsrc,value:z+" "+$.id}),u.ssrcs.push({attribute:"mslabel",id:K.rtxSsrc,value:z}),u.ssrcs.push({attribute:"label",id:K.rtxSsrc,value:$.id}),u.ssrcGroups.push({semantics:"FID",ssrcs:K.ssrc+" "+K.rtxSsrc}))}}}catch(e){G=!0,H=e}finally{try{!J&&W.return&&W.return()}finally{if(G)throw H}}u.ext=[];var Q=!0,Y=!1,Z=void 0;try{for(var ee,te=s.headerExtensions["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(Q=(ee=te.next()).done);Q=!0){var ne=ee.value;ne.kind&&ne.kind!==o||u.ext.push({value:ne.preferredId,uri:ne.uri})}}catch(e){Y=!0,Z=e}finally{try{!Q&&te.return&&te.return()}finally{if(Y)throw Z}}u.rtcpMux="rtcp-mux",u.rtcpRsize="rtcp-rsize"}n.media.push(u)}var n={},r=this._iceGatherer.getLocalParameters(),i=this._iceGatherer.getLocalCandidates(),o=this._dtlsTransport.getLocalParameters(),a=this._dtlsTransport.getRemoteParameters(),s=this._localCapabilities,c=this._localTrackInfos;"offer"===e&&this._sdpGlobalFields.version++,n.version=0,n.origin={address:"127.0.0.1",ipVer:4,netType:"IN",sessionId:this._sdpGlobalFields.id,sessionVersion:this._sdpGlobalFields.version,username:"jitsi-ortc-webrtc-shim"},n.name="-",n.timing={start:0,stop:0},n.msidSemantic={semantic:"WMS",token:"*"},n.groups=[{mids:Array.from(this._mids.keys()).join(" "),type:"BUNDLE"}],n.media=[],n.fingerprint={hash:o.fingerprints[0].value,type:o.fingerprints[0].algorithm};var l=!1,d=!0,p=!1,f=void 0;try{for(var v,g=s.codecs["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(d=(v=g.next()).done);d=!0){var b=v.value;if("video"===b.kind&&"rtx"===b.name){l=!0;break}}}catch(e){p=!0,f=e}finally{try{!d&&g.return&&g.return()}finally{if(p)throw f}}var E=!0,T=!1,_=void 0;try{for(var C,w=this._mids["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(E=(C=w.next()).done);E=!0){var R=m(C.value,2),k=R[0],A=R[1];t.call(this,k,A)}}catch(e){T=!0,_=e}finally{try{!E&&w.return&&w.return()}finally{if(T)throw _}}var P=new u.a({type:e,_sdpObject:n});return y.debug("_createLocalDescription():",P),P}},{key:"_createOffer",value:function(e){return this._closed?Promise.reject(new d.a("RTCPeerConnection closed")):this.signalingState!==g.stable?Promise.reject(new d.a('invalid signalingState "'+this.signalingState+'"')):Promise.reject(new Error("createoOffer() not yet supported"))}},{key:"_emitAddStream",value:function(e){if(!this._closed){y.debug('emitting "addstream"');var t=new c.a.Event("addstream");t.stream=e,this.dispatchEvent(t)}}},{key:"_emitBufferedIceCandidates",value:function(){if(!this._closed){var e=!0,t=!1,n=void 0;try{for(var r,i=this._bufferedIceCandidates["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(e=(r=i.next()).done);e=!0){var o=r.value;if(o){o.sdpMIndex=this._mids.keys().next().value,y.debug('emitting buffered "icecandidate", candidate:',o);var a=new c.a.Event("icecandidate");a.candidate=o,this.dispatchEvent(a)}}}catch(e){t=!0,n=e}finally{try{!e&&i.return&&i.return()}finally{if(t)throw n}}this._bufferedIceCandidates=[]}}},{key:"_emitConnectionStateChange",value:function(){if(!this._closed||"closed"===this.connectionState){y.debug('emitting "connectionstatechange", connectionState:',this.connectionState);var e=new c.a.Event("connectionstatechange");this.dispatchEvent(e)}}},{key:"_emitIceCandidate",value:function(e){if(!this._closed){var t=null;if(e){var n=this._mids.keys().next().value,r="candidate:"+e.foundation+" 1 "+e.protocol+" "+e.priority+" "+e.ip+" "+e.port+" typ "+e.type;e.relatedAddress&&(r+=" raddr "+e.relatedAddress),e.relatedPort&&(r+=" rport "+e.relatedPort),"tcp"===e.protocol&&(r+=" tcptype "+e.tcpType),t={candidate:r,component:1,foundation:e.foundation,ip:e.ip,port:e.port,priority:e.priority,protocol:e.protocol,type:e.type,sdpMIndex:n,sdpMLineIndex:0},"tcp"===e.protocol&&(t.tcptype=e.tcpType),e.relatedAddress&&(t.relatedAddress=e.relatedAddress),e.relatedPort&&(t.relatedPort=e.relatedPort)}if(this._localDescription){y.debug('emitting "icecandidate", candidate:',t);var i=new c.a.Event("icecandidate");i.candidate=t,this.dispatchEvent(i)}else y.debug("buffering gathered ICE candidate:",t),this._bufferedIceCandidates.push(t)}}},{key:"_emitIceConnectionStateChange",value:function(){if(!this._closed||"closed"===this.iceConnectionState){y.debug('emitting "iceconnectionstatechange", iceConnectionState:',this.iceConnectionState);var e=new c.a.Event("iceconnectionstatechange");this.dispatchEvent(e)}}},{key:"_emitNegotiationNeeded",value:function(){if(this.signalingState===g.stable){y.debug('emitting "negotiationneeded"');var e=new c.a.Event("negotiationneeded");this.dispatchEvent(e)}}},{key:"_emitRemoveStream",value:function(e){if(!this._closed){y.debug('emitting "removestream"');var t=new c.a.Event("removestream");t.stream=e,this.dispatchEvent(t)}}},{key:"_getParametersForRtpReceiver",value:function(e,t){var n=t.ssrc,r=t.rtxSsrc,i=t.cname,o=this._localCapabilities,a={codecs:[],degradationPreference:"balanced",encodings:[],headerExtensions:[],muxId:"",rtcp:{cname:i,compound:!0,mux:!0,reducedSize:!0}},s=[],c=void 0,u=!0,l=!1,d=void 0;try{for(var p,f=o.codecs["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(u=(p=f.next()).done);u=!0){var h=p.value;if(h.kind===e&&"rtx"!==h.name){c=h.preferredPayloadType,s.push({clockRate:h.clockRate,maxptime:h.maxptime,mimeType:h.mimeType,name:h.name,numChannels:h.numChannels,parameters:h.parameters,payloadType:h.preferredPayloadType,ptime:h.ptime,rtcpFeedback:h.rtcpFeedback});break}}}catch(e){l=!0,d=e}finally{try{!u&&f.return&&f.return()}finally{if(l)throw d}}if(r){var m=!0,v=!1,y=void 0;try{for(var g,b=o.codecs["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(m=(g=b.next()).done);m=!0){var S=g.value;if(S.kind===e&&"rtx"===S.name){s.push({clockRate:S.clockRate,mimeType:S.mimeType,name:"rtx",parameters:S.parameters,payloadType:S.preferredPayloadType,rtcpFeedback:S.rtcpFeedback});break}}}catch(e){v=!0,y=e}finally{try{!m&&b.return&&b.return()}finally{if(v)throw y}}}a.codecs=s;var E={active:!0,codecPayloadType:c,ssrc:n};r&&(E.rtx={ssrc:r}),a.encodings.push(E);var T=!0,_=!1,C=void 0;try{for(var w,R=o.headerExtensions["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(T=(w=R.next()).done);T=!0){var k=w.value;k.kind===e&&a.headerExtensions.push({encrypt:k.preferredEncrypt,id:k.preferredId,uri:k.uri})}}catch(e){_=!0,C=e}finally{try{!T&&R.return&&R.return()}finally{if(_)throw C}}return a}},{key:"_getParametersForRtpSender",value:function(e,t){var n=t.ssrc,r=t.rtxSsrc,i=S,o=this._localCapabilities,a={codecs:[],degradationPreference:"balanced",encodings:[],headerExtensions:[],muxId:"",rtcp:{cname:i,compound:!0,mux:!0,reducedSize:!0}},s=[],c=void 0,u=!0,l=!1,d=void 0;try{for(var p,f=o.codecs["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(u=(p=f.next()).done);u=!0){var h=p.value;if(h.kind===e&&"rtx"!==h.name){c=h.preferredPayloadType,s.push({clockRate:h.clockRate,maxptime:h.maxptime,mimeType:h.mimeType,name:h.name,numChannels:h.numChannels,parameters:h.parameters,payloadType:h.preferredPayloadType,ptime:h.ptime,rtcpFeedback:h.rtcpFeedback});break}}}catch(e){l=!0,d=e}finally{try{!u&&f.return&&f.return()}finally{if(l)throw d}}if(r){var m=!0,v=!1,y=void 0;try{for(var g,b=o.codecs["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(m=(g=b.next()).done);m=!0){var E=g.value;if(E.kind===e&&"rtx"===E.name){s.push({clockRate:E.clockRate,mimeType:E.mimeType,name:"rtx",parameters:E.parameters,payloadType:E.preferredPayloadType,rtcpFeedback:E.rtcpFeedback});break}}}catch(e){v=!0,y=e}finally{try{!m&&b.return&&b.return()}finally{if(v)throw y}}}a.codecs=s;var T={active:!0,codecPayloadType:c,ssrc:n};r&&(T.rtx={ssrc:r}),a.encodings.push(T);var _=!0,C=!1,w=void 0;try{for(var R,k=o.headerExtensions["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(_=(R=k.next()).done);_=!0){var A=R.value;A.kind===e&&a.headerExtensions.push({encrypt:A.preferredEncrypt,id:A.preferredId,uri:A.uri})}}catch(e){C=!0,w=e}finally{try{!_&&k.return&&k.return()}finally{if(C)throw w}}return a}},{key:"_getStats",value:function(e){if(this._closed)return Promise.reject(new d.a("RTCPeerConnection closed"));var t=this._iceGatherer,n=this._iceTransport,r=[],i=[],o=[],a=!0,s=!1,c=void 0;try{for(var u,l=this._localTrackInfos.values()["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(a=(u=l.next()).done);a=!0){var p=u.value,f=p.rtpSender;p.sending&&r.push(f)}}catch(e){s=!0,c=e}finally{try{!a&&l.return&&l.return()}finally{if(s)throw c}}var h=!0,m=!1,v=void 0;try{for(var y,g=this._remoteTrackInfos.values()["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(h=(y=g.next()).done);h=!0){var b=y.value,S=b.rtpReceiver;i.push(S)}}catch(e){m=!0,v=e}finally{try{!h&&g.return&&g.return()}finally{if(m)throw v}}t&&o.push(t.getStats().catch(function(){return null})),n&&(o.push(n.getStats().catch(function(){return null})),"function"==typeof n.msGetStats&&o.push(n.msGetStats().catch(function(){return null})));var E=!0,T=!1,_=void 0;try{for(var C,w=r["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(E=(C=w.next()).done);E=!0)!function(){var e=C.value,t="audio"===e.track.kind;o.push(e.getStats().then(function(e){if(!t){var n=!0,r=!1,i=void 0;try{for(var o,a=Object.keys(e)["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(n=(o=a.next()).done);n=!0){var s=o.value,c=e[s];"track"===c.type&&delete c.audioLevel}}catch(e){r=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}}return e}).catch(function(){return null}))}()}catch(e){T=!0,_=e}finally{try{!E&&w.return&&w.return()}finally{if(T)throw _}}var R=!0,k=!1,A=void 0;try{for(var P,I=i["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(R=(P=I.next()).done);R=!0)!function(){var e=P.value,t="audio"===e.track.kind;o.push(e.getStats().then(function(e){if(!t){var n=!0,r=!1,i=void 0;try{for(var o,a=Object.keys(e)["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(n=(o=a.next()).done);n=!0){var s=o.value,c=e[s];"track"===c.type&&delete c.audioLevel}}catch(e){r=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}}return e}).catch(function(){return null}))}()}catch(e){k=!0,A=e}finally{try{!R&&I.return&&I.return()}finally{if(k)throw A}}return Promise.all(o).then(function(e){var t={},n=!0,r=!1,i=void 0;try{for(var o,a=e["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(n=(o=a.next()).done);n=!0){var s=o.value;if(s){var c=!0,u=!1,l=void 0;try{for(var d,p=Object.keys(s)["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(c=(d=p.next()).done);c=!0){var f=d.value;t[f]=s[f]}}catch(e){u=!0,l=e}finally{try{!c&&p.return&&p.return()}finally{if(u)throw l}}}}}catch(e){r=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}return t})}},{key:"_handleLocalInitialAnswer",value:function(e){y.debug("_handleLocalInitialAnswer(), desc:",e);var t=e.sdpObject;this._localCapabilities=l.a(t),y.debug("local capabilities:",this._localCapabilities)}},{key:"_handleLocalReAnswer",value:function(e){y.debug("_handleLocalReAnswer(), desc:",e);var t=e.sdpObject;this._localCapabilities=l.a(t),y.debug("local capabilities:",this._localCapabilities)}},{key:"_handleRemoteInitialOffer",value:function(e){y.debug("_handleRemoteInitialOffer(), desc:",e);var t=e.sdpObject;this._mids=l.b(t);var n=l.a(t);y.debug("remote capabilities:",n),this._localCapabilities=l.c(n),this._startIceAndDtls(e)}},{key:"_handleRemoteReOffer",value:function(e){y.debug("_handleRemoteReOffer(), desc:",e);var t=e.sdpObject;this._mids=l.b(t);var n=l.a(t);y.debug("remote capabilities:",n),this._localCapabilities=l.c(n)}},{key:"_receiveMedia",value:function(){y.debug("_receiveMedia()");var e=new Set(this._remoteTrackInfos.keys()),t=l.d(this._remoteDescription.sdpObject),n=new Map,r=new Map,i=new Map;y.debug("_receiveMedia() remote track infos:",t);var o=!0,a=!1,s=void 0;try{for(var c,u=t["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(o=(c=u.next()).done);o=!0){var d=m(c.value,2),p=d[0],f=d[1];if(!e.has(p)){y.debug("_receiveMedia() new remote track, ssrc:"+p),this._remoteTrackInfos.set(p,f);var h=f.kind,v=f.rtxSsrc,g=f.streamId,b=f.trackId,S=f.cname,E=!this._remoteStreams.has(g),T=void 0;E?(y.debug("_receiveMedia() new remote stream, id:"+g),T=new MediaStream,T.jitsiRemoteId=g,n.set(g,T),this._remoteStreams.set(g,T)):T=this._remoteStreams.get(g);var _=new RTCRtpReceiver(this._dtlsTransport,h),C=this._getParametersForRtpReceiver(h,{ssrc:p,rtxSsrc:v,cname:S});f.track=_.track,_.onerror=function(e){y.error('rtpReceiver "error" event, event:'),y.error(e)},f.stream=T,f.rtpReceiver=_,y.debug("calling rtpReceiver.receive(), parameters:",C);try{_.receive(C);var w=f.track;w.jitsiRemoteId=b,T.addTrack(w),n.has(g)||r.set(w,T)}catch(e){y.error("rtpReceiver.receive() failed:"+e.message),y.error(e)}}}}catch(e){a=!0,s=e}finally{try{!o&&u.return&&u.return()}finally{if(a)throw s}}var R=!0,k=!1,A=void 0;try{for(var P,I=e["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(R=(P=I.next()).done);R=!0){var p=P.value;if(!t.has(p)){y.debug("_receiveMedia() remote track removed, ssrc:"+p);var f=this._remoteTrackInfos.get(p),O=f.stream,D=f.track,L=f.rtpReceiver;try{L.stop()}catch(e){y.warn("rtpReceiver.stop() failed:"+e)}i.set(D,O),O.removeTrack(D),this._remoteTrackInfos.delete(p)}}}catch(e){k=!0,A=e}finally{try{!R&&I.return&&I.return()}finally{if(k)throw A}}var N=!0,M=!1,x=void 0;try{for(var j,F=r["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(N=(j=F.next()).done);N=!0){var U=m(j.value,2),B=U[0],J=U[1],G=new Event("addtrack");G.track=B,J.dispatchEvent(G)}}catch(e){M=!0,x=e}finally{try{!N&&F.return&&F.return()}finally{if(M)throw x}}var H=!0,V=!1,W=void 0;try{for(var K,q=i["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(H=(K=q.next()).done);H=!0){var z=m(K.value,2),$=z[0],X=z[1],Q=new Event("removetrack");Q.track=$,X.dispatchEvent(Q)}}catch(e){V=!0,W=e}finally{try{!H&&q.return&&q.return()}finally{if(V)throw W}}var Y=!0,Z=!1,ee=void 0;try{for(var te,ne=n.values()["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(Y=(te=ne.next()).done);Y=!0){var re=te.value;0===re.getTracks().length?(y.warn("ignoring new stream for which no track could be added"),n.delete(re.jitsiRemoteId),this._remoteStreams.delete(re.jitsiRemoteId)):this._emitAddStream(re)}}catch(e){Z=!0,ee=e}finally{try{!Y&&ne.return&&ne.return()}finally{if(Z)throw ee}}var ie=!0,oe=!1,ae=void 0;try{for(var se,ce=this._remoteStreams["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(ie=(se=ce.next()).done);ie=!0){var ue=m(se.value,2),le=ue[0],de=ue[1];de.getTracks().length>0||(this._remoteStreams.delete(le),this._emitRemoveStream(de))}}catch(e){oe=!0,ae=e}finally{try{!ie&&ce.return&&ce.return()}finally{if(oe)throw ae}}}},{key:"_removeStream",value:function(e){if(this._closed)throw new d.a("RTCPeerConnection closed");var t=!0,n=!1,r=void 0;try{for(var i,o=e.getTracks()["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(t=(i=o.next()).done);t=!0){var a=i.value;if(this._localTrackInfos.has(a.id)){var s=this._localTrackInfos.get(a.id).rtpSender;try{s.stop()}catch(e){y.warn("rtpSender.stop() failed:"+e)}this._localTrackInfos.delete(a.id)}}}catch(e){n=!0,r=e}finally{try{!t&&o.return&&o.return()}finally{if(n)throw r}}this._emitNegotiationNeeded()}},{key:"_sendMedia",value:function(){y.debug("_sendMedia()");var e=!0,t=!1,n=void 0;try{for(var r,i=this._localTrackInfos.values()["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(e=(r=i.next()).done);e=!0){var o=r.value;if(!o.sending){var a=o.rtpSender,s=o.ssrc,c=o.rtxSsrc,u=a.track,l=u.kind,d=this._getParametersForRtpSender(l,{ssrc:s,rtxSsrc:c});y.debug("calling rtpSender.send(), parameters:",d);try{a.send(d),o.sending=!0}catch(e){y.error("rtpSender.send() failed:"+e.message),y.error(e)}}}}catch(e){t=!0,n=e}finally{try{!e&&i.return&&i.return()}finally{if(t)throw n}}}},{key:"_setDtlsTransport",value:function(e){var t=this,n=new RTCDtlsTransport(e);n.onstatechange=function(){y.debug('dtlsTransport "statechange" event, state:'+n.state),t._emitConnectionStateChange()},n.ondtlsstatechange=function(){y.debug('dtlsTransport "dtlsstatechange" event, state:'+n.state),t._emitConnectionStateChange()},n.onerror=function(e){var n=void 0;e.message?n=e.message:e.error&&(n=e.error.message),y.error('dtlsTransport "error" event, message:'+n),t._emitConnectionStateChange()},this._dtlsTransport=n}},{key:"_setIceGatherer",value:function(e){var t=this,n={gatherPolicy:e.iceTransportPolicy||"all",iceServers:e.iceServers||[]},r=new RTCIceGatherer(n);r.onstatechange=function(){y.debug('iceGatherer "statechange" event, state:'+r.state),t._updateAndEmitIceGatheringStateChange(r.state)},r.onlocalcandidate=function(e){var n=e.candidate,r=e.complete;y.debug('iceGatherer "localcandidate" event, candidate:',n),r||!n||0===Object.keys(n).length?(n=null,t._updateAndEmitIceGatheringStateChange(b.complete),t._emitIceCandidate(null)):t._emitIceCandidate(n)},r.onerror=function(e){var t=e.errorCode,n=e.errorText;y.error('iceGatherer "error" event, errorCode:'+t+", errorText:"+n)};try{r.gather()}catch(e){y.warn("iceGatherer.gather() failed:"+e)}this._iceGatherer=r}},{key:"_setIceTransport",value:function(e){var t=this,n=new RTCIceTransport(e);n.onstatechange=function(){y.debug('iceTransport "statechange" event, state:'+n.state),t._emitIceConnectionStateChange()},n.onicestatechange=function(){y.debug('iceTransport "icestatechange" event, state:'+n.state),"completed"===n.state&&y.debug("nominated candidate pair:",n.getNominatedCandidatePair()),t._emitIceConnectionStateChange()},n.oncandidatepairchange=function(e){y.debug('iceTransport "candidatepairchange" event, pair:'+e.pair)},this._iceTransport=n}},{key:"_setLocalDescription",value:function(e){var t=this;if(this._closed)return Promise.reject(new d.a("RTCPeerConnection closed"));var n=void 0;try{n=new u.a(e)}catch(e){return Promise.reject(new TypeError("invalid RTCSessionDescriptionInit: "+e))}switch(e.type){case"offer":return this.signalingState!==g.stable?Promise.reject(new d.a('invalid signalingState "'+this.signalingState+'"')):Promise.reject(new TypeError('setLocalDescription() with type "offer" not supported'));case"answer":if(this.signalingState!==g.haveRemoteOffer)return Promise.reject(new d.a('invalid signalingState "'+this.signalingState+'"'));var r=Boolean(!this._localDescription);return Promise.resolve().then(function(){return r?t._handleLocalInitialAnswer(n):t._handleLocalReAnswer(n)}).then(function(){y.debug("setLocalDescription() succeed"),t._localDescription=n,t._updateAndEmitSignalingStateChange(g.stable),r&&t._emitBufferedIceCandidates(),t._sendMedia(),t._receiveMedia()}).catch(function(e){throw y.error("setLocalDescription() failed: "+e.message),y.error(e),e});default:return Promise.reject(new TypeError('unsupported description.type "'+e.type+'"'))}}},{key:"_setRemoteDescription",value:function(e){var t=this;if(this._closed)return Promise.reject(new d.a("RTCPeerConnection closed"));var n=void 0;try{n=new u.a(e)}catch(e){return Promise.reject(new TypeError("invalid RTCSessionDescriptionInit: "+e))}switch(e.type){case"offer":if(this.signalingState!==g.stable)return Promise.reject(new d.a('invalid signalingState "'+this.signalingState+'"'));var r=Boolean(!this._remoteDescription);return Promise.resolve().then(function(){return r?t._handleRemoteInitialOffer(n):t._handleRemoteReOffer(n)}).then(function(){y.debug("setRemoteDescription() succeed"), t._remoteDescription=n,t._updateAndEmitSignalingStateChange(g.haveRemoteOffer)}).catch(function(e){throw y.error("setRemoteDescription() failed: "+e),e});case"answer":return this.signalingState!==g.haveLocalOffer?Promise.reject(new d.a('invalid signalingState "'+this.signalingState+'"')):Promise.reject(new TypeError('setRemoteDescription() with type "answer" not supported'));default:return Promise.reject(new TypeError('unsupported description.type "'+e.type+'"'))}}},{key:"_startIceAndDtls",value:function(e){var t=e.sdpObject,n=l.e(t),r=l.f(t),i=l.g(t);switch(e.type){case"offer":this._iceTransport.start(this._iceGatherer,n,"controlled");break;case"answer":this._iceTransport.start(this._iceGatherer,n,"controlling")}var o=!0,a=!1,s=void 0;try{for(var c,u=r["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(o=(c=u.next()).done);o=!0){var d=c.value;0!==d.port&&9!==d.port&&this._iceTransport.addRemoteCandidate(d)}}catch(e){a=!0,s=e}finally{try{!o&&u.return&&u.return()}finally{if(a)throw s}}switch(this._iceTransport.addRemoteCandidate({}),e.type){case"offer":i.role="server";break;case"answer":i.role="client"}this._dtlsTransport.start(i)}},{key:"_updateAndEmitIceGatheringStateChange",value:function(e){if(!this._closed&&e!==this.iceGatheringState){this._iceGatheringState=e,y.debug('emitting "icegatheringstatechange", iceGatheringState:',this.iceGatheringState);var t=new c.a.Event("icegatheringstatechange");this.dispatchEvent(t)}}},{key:"_updateAndEmitSignalingStateChange",value:function(e){if(e!==this.signalingState){this._signalingState=e,y.debug('emitting "signalingstatechange", signalingState:',this.signalingState);var t=new c.a.Event("signalingstatechange");this.dispatchEvent(t)}}},{key:"connectionState",get:function(){return this._dtlsTransport.state}},{key:"iceConnectionState",get:function(){return this._iceTransport.state}},{key:"iceGatheringState",get:function(){return this._iceGatheringState}},{key:"localDescription",get:function(){return this._localDescription}},{key:"remoteDescription",get:function(){return this._remoteDescription}},{key:"signalingState",get:function(){return this._signalingState}}]),t}(c.a.EventTarget);t.a=E}).call(t,"modules/RTC/ortc/RTCPeerConnection.js")},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=n(13),o=n.n(i),a="function"==typeof Symbol&&"symbol"==typeof("function"==typeof Symbol?Symbol.iterator:"@@iterator")?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==("function"==typeof Symbol?Symbol.prototype:"@@prototype")?"symbol":typeof e},s=function(){function e(e,t){for(var n=0;n.6&&(this._eventFired=!0,this._callback())}},{key:"_isLocalAudioTrack",value:function(e){return e.isAudioTrack()&&e.isLocal()}},{key:"_trackAdded",value:function(e){this._isLocalAudioTrack(e)&&(this.audioTrack=e)}},{key:"_trackMuteChanged",value:function(e){this._isLocalAudioTrack(e)&&e.isMuted()&&(this._eventFired=!1)}}]),e}();t.a=a},function(e,t,n){"use strict";(function(e){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t,n){if(n<5e3)return 1;var r=0,i=Math.min(t.height,t.width);if(e){var a=m.find(function(e){return e.height<=i});if(a)for(i=a.height;i>=180&&"break"!==function(){var e=i;if(!(a=m.find(function(t){return t.height===e})))return"break";r+=a.target}();i/=2);}else{var s=t.width*t.height;r=s<=76800?600:s<=307200?1700:s<=518400?2e3:2500}return Math.min(r,o(Math.max(0,n-1e3)))}function o(e){return e>6e4?Number.MAX_SAFE_INTEGER:v*Math.pow(1.08,e/1e3)}var a=n(32),s=n(5),c=n(0),u=(n.n(c),function(){function e(e,t){for(var n=0;n0&&(v=i.startBitrate),t.on(s.CONNECTION_INTERRUPTED,function(){o._updateLocalConnectionQuality(0),o.eventEmitter.emit(a.LOCAL_STATS_UPDATED,o._localStats),o._broadcastLocalStats()}),t.room.addListener(l.ICE_CONNECTION_STATE_CHANGED,function(e,t){e.isP2P||"connected"!==t||(o._timeIceConnected=window.performance.now())}),t.on(s.ENDPOINT_MESSAGE_RECEIVED,function(e,t){t.type===h&&o._updateRemoteStats(e.getId(),t.values)}),t.statistics.addConnectionStatsListener(this._updateLocalStats.bind(this)),t.on(s.TRACK_MUTE_CHANGED,function(e){e.isVideoTrack()&&(e.isMuted()?o._timeVideoUnmuted=-1:o._maybeUpdateUnmuteTime())}),t.on(s.TRACK_ADDED,function(e){e.isVideoTrack()&&!e.isMuted()&&o._maybeUpdateUnmuteTime()})}return u(e,[{key:"_maybeUpdateUnmuteTime",value:function(){this._timeVideoUnmuted<0&&(this._timeVideoUnmuted=window.performance.now())}},{key:"_calculateConnectionQuality",value:function(e,t,n){var r=p[n],o=100,a=void 0;if(this._localStats.packetLoss&&(a=this._localStats.packetLoss.upload,t&&(a*=.5)),t||!r||e===d.DESKTOP||this._timeIceConnected<0||this._timeVideoUnmuted<0)void 0===a?(f.error("Cannot calculate connection quality, unknown packet loss."),o=100):o=a<=2?100:a<=4?70:a<=6?50:a<=8?30:a<=12?10:0;else{var s=window.performance.now()-Math.max(this._timeVideoUnmuted,this._timeIceConnected),c=this._conference.getActivePeerConnection(),u=Boolean(c&&c.isSimulcastOn()),l=i(u,r,s);l*=.9,o=100*this._localStats.bitrate.upload/l,a&&a>=10&&(o=Math.min(o,30))}if(this._lastConnectionQualityUpdate>0){var h=this._localStats.connectionQuality,m=(window.performance.now()-this._lastConnectionQualityUpdate)/1e3;o=Math.min(o,h+2*m)}return Math.min(100,o)}},{key:"_updateLocalConnectionQuality",value:function(e){this._localStats.connectionQuality=e,this._lastConnectionQualityUpdate=window.performance.now()}},{key:"_broadcastLocalStats",value:function(){var e={bitrate:this._localStats.bitrate,packetLoss:this._localStats.packetLoss,connectionQuality:this._localStats.connectionQuality,jvbRTT:this._localStats.jvbRTT},t=this._conference.getLocalVideoTrack();t&&t.resolution&&(e.resolution=t.resolution);try{this._conference.broadcastEndpointMessage({type:h,values:e})}catch(e){}}},{key:"_updateLocalStats",value:function(e,t){if(!e.isP2P){var n=t.transport&&t.transport.length&&t.transport[0].rtt;this._localStats.jvbRTT=n||void 0}if(e===this._conference.getActivePeerConnection()){var r=void 0,i=!this._conference.isConnectionInterrupted(),o=this._conference.getLocalVideoTrack(),s=o?o.videoType:void 0,c=!o||o.isMuted(),u=o?o.resolution:null;c||this._maybeUpdateUnmuteTime();for(r in t)t.hasOwnProperty(r)&&(this._localStats[r]=t[r]);i&&this._updateLocalConnectionQuality(this._calculateConnectionQuality(s,c,u)),this.eventEmitter.emit(a.LOCAL_STATS_UPDATED,this._localStats),this._broadcastLocalStats()}}},{key:"_updateRemoteStats",value:function(e,t){this._remoteStats[e]={bitrate:t.bitrate,packetLoss:t.packetLoss,connectionQuality:t.connectionQuality,jvbRTT:t.jvbRTT},this.eventEmitter.emit(a.REMOTE_STATS_UPDATED,e,this._remoteStats[e])}},{key:"getStats",value:function(){return this._localStats}}]),e}();t.a=y}).call(t,"modules/connectivity/ConnectionQuality.js")},function(e,t,n){"use strict";(function(e){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=n(0),o=(n.n(i),n(5)),a=function(){function e(e,t){for(var n=0;n "+t),this._conference.eventEmitter.emit(o.JVB121_STATUS,e,t))}}]),e}();t.a=c}).call(t,"modules/event/Jvb121EventGenerator.js")},function(e,t,n){"use strict";function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};this.eventCache.push({action:e,data:t})}},{key:"drainCachedEvents",value:function(){var e=this.eventCache.slice();return this.eventCache=[],e}}]),t}(s),u=new c,l=function(){function e(){o(this,e),this.analyticsHandlers=new Set,this.permanentProperties=Object.create(null)}return a(e,[{key:"init",value:function(e){this.browserName=e,this.analyticsHandlers.add(u)}},{key:"sendEvent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=babelHelpers.extends({browserName:this.browserName},this.permanentProperties,t);this.analyticsHandlers.forEach(function(t){return t.sendEvent(e,n)})}},{key:"dispose",value:function(){u.drainCachedEvents(),this.analyticsHandlers.clear()}},{key:"setAnalyticsHandlers",value:function(e){var t=this;this.analyticsHandlers=new Set(e),u.drainCachedEvents().forEach(function(e){return t.sendEvent(e.action,e.data)})}},{key:"addPermanentProperties",value:function(e){this.permanentProperties=babelHelpers.extends(this.permanentProperties,e)}}]),e}();t.a=new l},function(e,t,n){"use strict";(function(e){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=n(0),o=(n.n(i),n(32)),a=n(5),s=n(4),c=n(1),u=n(6),l=n(17),d=(n.n(l),function(){function e(e,t){for(var n=0;n=this._n){if(c.a.supportsRTTStatistics()){var t=this._avgRtpStatsReporter._conference,n={p2p:this.isP2P,size:t.getParticipantCount()};if(e.transport&&e.transport.length&&babelHelpers.extends(n,{localCandidateType:e.transport[0].localCandidateType,remoteCandidateType:e.transport[0].remoteCandidateType,transportType:e.transport[0].type}),this._avgRTT.appendReport(n),this.isP2P){var r=this._avgRtpStatsReporter.jvbStatsMonitor._avgEnd2EndRTT;if(!isNaN(r)){var i=this._avgRTT.calculate()-r;n.stat_avg_rtt_diff={value:i}}}else{var o=this._calculateAvgRemoteRTT(),a=this._avgRTT.calculate();this._avgEnd2EndRTT=a+o,isNaN(a)||isNaN(o)||(n.stat_avg_end2endrtt={value:this._avgEnd2EndRTT})}u.a.analytics.sendEvent("avg.rtp.stats",n)}this._resetAvgStats()}}},{key:"_calculateAvgRemoteRTT",value:function(){var e=0,t=0,n=!0,r=!1,i=void 0;try{for(var o,a=this._avgRemoteRTTMap.values()["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(n=(o=a.next()).done);n=!0){var s=o.value,c=s.calculate();isNaN(c)||(t+=c,e+=1,s.reset())}}catch(e){r=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}return t/e}},{key:"_processRemoteStats",value:function(e,t){var n="number"==typeof t.jvbRTT,r=this._avgRemoteRTTMap.get(e);!r&&n&&(r=new f(e+"_stat_rtt"),this._avgRemoteRTTMap.set(e,r)),n?r.addNext(t.jvbRTT):r&&this._avgRemoteRTTMap.delete(e)}},{key:"_resetAvgStats",value:function(){this._avgRTT.reset(),this._avgRemoteRTTMap&&this._avgRemoteRTTMap.clear(),this._sampleIdx=0}},{key:"dispose",value:function(){var e=this._avgRtpStatsReporter._conference;e.statistics.removeConnectionStatsListener(this._onConnectionStats),this.isP2P||(e.off(o.REMOTE_STATS_UPDATED,this._onRemoteStatsUpdated),e.off(a.USER_LEFT,this._onUserLeft))}}]),e}(),m=function(){function e(t,n){var i=this;if(r(this,e),this._n=n,!(n>0))return void p.info("Avg RTP stats reports are disabled.");p.info("Avg RTP stats will be calculated every "+n+" samples"),this._sampleIdx=0,this._conference=t,this._avgAudioBitrateUp=new f("stat_avg_bitrate_audio_upload"),this._avgAudioBitrateDown=new f("stat_avg_bitrate_audio_download"),this._avgVideoBitrateUp=new f("stat_avg_bitrate_video_upload"),this._avgVideoBitrateDown=new f("stat_avg_bitrate_video_download"),this._avgBandwidthUp=new f("stat_avg_bandwidth_upload"),this._avgBandwidthDown=new f("stat_avg_bandwidth_download"),this._avgPacketLossTotal=new f("stat_avg_packetloss_total"),this._avgPacketLossUp=new f("stat_avg_packetloss_upload"),this._avgPacketLossDown=new f("stat_avg_packetloss_download"),this._avgRemoteFPS=new f("stat_avg_framerate_remote"),this._avgRemoteScreenFPS=new f("stat_avg_framerate_screen_remote"),this._avgLocalFPS=new f("stat_avg_framerate_local"),this._avgLocalScreenFPS=new f("stat_avg_framerate_screen_local"),this._avgRemoteCameraPixels=new f("stat_avg_pixels_remote"),this._avgRemoteScreenPixels=new f("stat_avg_pixels_screen_remote"),this._avgLocalCameraPixels=new f("stat_avg_pixels_local"),this._avgLocalScreenPixels=new f("stat_avg_pixels_screen_local"),this._avgCQ=new f("stat_avg_cq"),this._onLocalStatsUpdated=function(e){return i._calculateAvgStats(e)},t.on(o.LOCAL_STATS_UPDATED,this._onLocalStatsUpdated),this._onP2PStatusChanged=function(){p.debug("Resetting average stats calculation"),i._resetAvgStats(),i.jvbStatsMonitor._resetAvgStats(),i.p2pStatsMonitor._resetAvgStats()},t.on(a.P2P_STATUS,this._onP2PStatusChanged),this._onJvb121StatusChanged=function(e,t){!0===t&&(p.info("Resetting JVB avg RTP stats"),i._resetAvgJvbStats())},t.on(a.JVB121_STATUS,this._onJvb121StatusChanged),this.jvbStatsMonitor=new h(this,!1,n),this.p2pStatsMonitor=new h(this,!0,n)}return d(e,[{key:"_calculateAvgStats",value:function(e){if(!e)return void p.error("No stats");var t=this._conference.isP2PActive(),n=this._conference.getParticipantCount();if(t||!(n<2)){var r=e.bitrate,i=e.bandwidth,o=e.packetLoss,a=e.framerate,s=e.resolution;if(!r)return void p.error('No "bitrate"');if(!i)return void p.error('No "bandwidth"');if(!o)return void p.error('No "packetloss"');if(!a)return void p.error('No "framerate"');if(!s)return void p.error("No resolution");if(this._avgAudioBitrateUp.addNext(r.audio.upload),this._avgAudioBitrateDown.addNext(r.audio.download),this._avgVideoBitrateUp.addNext(r.video.upload),this._avgVideoBitrateDown.addNext(r.video.download),c.a.supportsBandwidthStatistics()&&(this._avgBandwidthUp.addNext(i.upload),this._avgBandwidthDown.addNext(i.download)),this._avgPacketLossUp.addNext(o.upload),this._avgPacketLossDown.addNext(o.download),this._avgPacketLossTotal.addNext(o.total),this._avgCQ.addNext(e.connectionQuality),a&&(this._avgRemoteFPS.addNext(this._calculateAvgVideoFps(a,!1,l.CAMERA)),this._avgRemoteScreenFPS.addNext(this._calculateAvgVideoFps(a,!1,l.DESKTOP)),this._avgLocalFPS.addNext(this._calculateAvgVideoFps(a,!0,l.CAMERA)),this._avgLocalScreenFPS.addNext(this._calculateAvgVideoFps(a,!0,l.DESKTOP))),s&&(this._avgRemoteCameraPixels.addNext(this._calculateAvgVideoPixels(s,!1,l.CAMERA)),this._avgRemoteScreenPixels.addNext(this._calculateAvgVideoPixels(s,!1,l.DESKTOP)),this._avgLocalCameraPixels.addNext(this._calculateAvgVideoPixels(s,!0,l.CAMERA)),this._avgLocalScreenPixels.addNext(this._calculateAvgVideoPixels(s,!0,l.DESKTOP))),this._sampleIdx+=1,this._sampleIdx>=this._n){var d={p2p:t,size:n};e.transport&&e.transport.length&&babelHelpers.extends(d,{localCandidateType:e.transport[0].localCandidateType,remoteCandidateType:e.transport[0].remoteCandidateType,transportType:e.transport[0].type}),this._avgAudioBitrateUp.appendReport(d),this._avgAudioBitrateDown.appendReport(d),this._avgVideoBitrateUp.appendReport(d),this._avgVideoBitrateDown.appendReport(d),c.a.supportsBandwidthStatistics()&&(this._avgBandwidthUp.appendReport(d),this._avgBandwidthDown.appendReport(d)),this._avgPacketLossUp.appendReport(d),this._avgPacketLossDown.appendReport(d),this._avgPacketLossTotal.appendReport(d),this._avgRemoteFPS.appendReport(d),isNaN(this._avgRemoteScreenFPS.calculate())||this._avgRemoteScreenFPS.appendReport(d),this._avgLocalFPS.appendReport(d),isNaN(this._avgLocalScreenFPS.calculate())||this._avgLocalScreenFPS.appendReport(d),this._avgRemoteCameraPixels.appendReport(d),isNaN(this._avgRemoteScreenPixels.calculate())||this._avgRemoteScreenPixels.appendReport(d),this._avgLocalCameraPixels.appendReport(d),isNaN(this._avgLocalScreenPixels.calculate())||this._avgLocalScreenPixels.appendReport(d),this._avgCQ.appendReport(d),u.a.analytics.sendEvent("avg.rtp.stats",d),this._resetAvgStats()}}}},{key:"_calculateAvgVideoPixels",value:function(e,t,n){var r=0,i=0,o=this._conference.myUserId(),a=!0,s=!1,c=void 0;try{for(var u,l=Object.keys(e)["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(a=(u=l.next()).done);a=!0){var d=u.value;if(t?d===o:d!==o){var p=t?null:this._conference.getParticipantById(d),f=e[d];if((t||p)&&f){var h=this._calculatePeerAvgVideoPixels(f,p,n);isNaN(h)||(r+=h,i+=1)}}}}catch(e){s=!0,c=e}finally{try{!a&&l.return&&l.return()}finally{if(s)throw c}}return r/i}},{key:"_calculatePeerAvgVideoPixels",value:function(e,t,n){var r=Object.keys(e).map(function(e){return Number(e)}),i=null,o=this._conference.getActivePeerConnection();t?(i=t.getTracksByMediaType(s.b))&&(r=r.filter(function(e){return i.find(function(t){return!t.isMuted()&&t.getSSRC()===e&&t.videoType===n})})):(i=this._conference.getLocalTracks(s.b),r=r.filter(function(e){return i.find(function(t){return!t.isMuted()&&o.getLocalSSRC(t)===e&&t.videoType===n})}));var a=0,c=0,u=!0,l=!1,d=void 0;try{for(var p,f=r["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(u=(p=f.next()).done);u=!0){var h=p.value,m=Number(e[h].height)*Number(e[h].width);!isNaN(m)&&m>0&&(a+=m,c+=1)}}catch(e){l=!0,d=e}finally{try{!u&&f.return&&f.return()}finally{if(l)throw d}}return a/c}},{key:"_calculateAvgVideoFps",value:function(e,t,n){var r=0,i=0,o=this._conference.myUserId(),a=!0,s=!1,c=void 0;try{for(var u,l=Object.keys(e)["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(a=(u=l.next()).done);a=!0){var d=u.value;if(t?d===o:d!==o){var p=t?null:this._conference.getParticipantById(d),f=e[d];if((t||p)&&f){var h=this._calculatePeerAvgVideoFps(f,p,n);isNaN(h)||(r+=h,i+=1)}}}}catch(e){s=!0,c=e}finally{try{!a&&l.return&&l.return()}finally{if(s)throw c}}return r/i}},{key:"_calculatePeerAvgVideoFps",value:function(e,t,n){var r=Object.keys(e).map(function(e){return Number(e)}),i=null,o=this._conference.getActivePeerConnection();t?(i=t.getTracksByMediaType(s.b))&&(r=r.filter(function(e){return i.find(function(t){return!t.isMuted()&&t.getSSRC()===e&&t.videoType===n})})):(i=this._conference.getLocalTracks(s.b),r=r.filter(function(e){return i.find(function(t){return!t.isMuted()&&o.getLocalSSRC(t)===e&&t.videoType===n})}));var a=0,c=0,u=!0,l=!1,d=void 0;try{for(var p,f=r["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(u=(p=f.next()).done);u=!0){var h=p.value,m=Number(e[h]);!isNaN(m)&&m>0&&(a+=m,c+=1)}}catch(e){l=!0,d=e}finally{try{!u&&f.return&&f.return()}finally{if(l)throw d}}return a/c}},{key:"_resetAvgJvbStats",value:function(){this._resetAvgStats(),this.jvbStatsMonitor._resetAvgStats()}},{key:"_resetAvgStats",value:function(){this._avgAudioBitrateUp.reset(),this._avgAudioBitrateDown.reset(), this._avgVideoBitrateUp.reset(),this._avgVideoBitrateDown.reset(),this._avgBandwidthUp.reset(),this._avgBandwidthDown.reset(),this._avgPacketLossUp.reset(),this._avgPacketLossDown.reset(),this._avgPacketLossTotal.reset(),this._avgRemoteFPS.reset(),this._avgRemoteScreenFPS.reset(),this._avgLocalFPS.reset(),this._avgLocalScreenFPS.reset(),this._avgRemoteCameraPixels.reset(),this._avgRemoteScreenPixels.reset(),this._avgLocalCameraPixels.reset(),this._avgLocalScreenPixels.reset(),this._avgCQ.reset(),this._sampleIdx=0}},{key:"dispose",value:function(){this._conference.off(a.P2P_STATUS,this._onP2PStatusChanged),this._conference.off(o.LOCAL_STATS_UPDATED,this._onLocalStatsUpdated),this._conference.off(a.JVB121_STATUS,this._onJvb121StatusChanged),this.jvbStatsMonitor.dispose(),this.p2pStatsMonitor.dispose()}}]),e}();t.a=m}).call(t,"modules/statistics/AvgRTPStatsReporter.js")},function(e,t,n){"use strict";(function(e){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;n3?i-3:0),c=3;c0&&(I=O-t(v,"bytesSent")))),I=Math.max(0,I);var D=a.timestamp-v.timestamp,L=0,N=0;D>0&&(L=Math.round(8*P/D),N=Math.round(8*I/D)),g.addBitrate({download:L,upload:N});var M={height:null,width:null};try{var x=void 0,j=void 0;(x=t(a,"googFrameHeightReceived"))&&(j=t(a,"googFrameWidthReceived"))?(M.height=x,M.width=j):(x=t(a,"googFrameHeightSent"))&&(j=t(a,"googFrameWidthSent"))&&(M.height=x,M.width=j)}catch(e){}var F=void 0;try{F=t(a,"googFrameRateReceived")||t(a,"googFrameRateSent")||0}catch(e){try{F=this.getNonNegativeStat(a,"framerateMean")}catch(e){}}g.setFramerate(Math.round(F||0)),M.height&&M.width?g.setResolution(M):g.setResolution(null)}}}}var U={download:0,upload:0},B={download:0,upload:0},J=0,G=0,H={},V={},W=0,K=0,q=0,z=0,$=!0,X=!1,Q=void 0;try{for(var Y,Z=this.ssrc2stats["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!($=(Y=Z.next()).done);$=!0){var ee=u(Y.value,2),te=ee[0],ne=ee[1],re=ne.loss,ie=re.isDownloadStream?"download":"upload";U[ie]+=re.packetsTotal,B[ie]+=re.packetsLost,J+=ne.bitrate.download,G+=ne.bitrate.upload;var oe=this.peerconnection.getTrackBySSRC(te);if(oe){oe.isAudioTrack()?(W+=ne.bitrate.download,K+=ne.bitrate.upload):(q+=ne.bitrate.download,z+=ne.bitrate.upload);var ae=oe.getParticipantId();if(ae){var se=ne.resolution;if(se.width&&se.height&&-1!==se.width&&-1!==se.height){var ce=H[ae]||{};ce[te]=se,H[ae]=ce}if(0!==ne.framerate){var ue=V[ae]||{};ue[te]=ne.framerate,V[ae]=ue}}else d.error("No participant ID returned by "+oe)}else this.peerconnection.isP2P&&d.error("JitsiTrack not found for SSRC "+te+" in "+this.peerconnection);ne.resetBitrate()}}catch(e){X=!0,Q=e}finally{try{!$&&Z.return&&Z.return()}finally{if(X)throw Q}}this.eventEmitter.emit(c.d,this.peerconnection,n),this.conferenceStats.bitrate={upload:G,download:J},this.conferenceStats.bitrate.audio={upload:K,download:W},this.conferenceStats.bitrate.video={upload:z,download:q},this.conferenceStats.packetLoss={total:r(B.download+B.upload,U.download+U.upload),download:r(B.download,U.download),upload:r(B.upload,U.upload)},this.eventEmitter.emit(c.c,this.peerconnection,{bandwidth:this.conferenceStats.bandwidth,bitrate:this.conferenceStats.bitrate,packetLoss:this.conferenceStats.packetLoss,resolution:H,framerate:V,transport:this.conferenceStats.transport}),this.conferenceStats.transport=[]}},a.prototype.processAudioLevelReport=function(){if(this.baselineAudioLevelsReport){var e=this._getStatValue;for(var t in this.currentAudioLevelsReport)if(this.currentAudioLevelsReport.hasOwnProperty(t)){var n=this.currentAudioLevelsReport[t];if("ssrc"===n.type||"track"===n.type){var r=this.baselineAudioLevelsReport[t],i=this.getNonNegativeStat(n,"ssrc");if(!i&&Array.isArray(n.ssrcIds)&&(i=Number(n.ssrcIds[0])),r)if(i){var o=void 0;try{o=e(n,"audioInputLevel")||e(n,"audioOutputLevel")}catch(e){return d.warn("Audio Levels are not available in the statistics."),void clearInterval(this.audioLevelsIntervalId)}if(o){var a=void 0;a="ssrc"===n.type?!e(n,"packetsReceived"):!n.remoteSource,s.a.isEdge()?o=o<0?Math.pow(10,o/20):0:o/=32767,this.eventEmitter.emit(c.a,this.peerconnection,i,o,a)}}else Date.now()-n.timestamp<3e3&&d.warn("No ssrc: ");else d.warn(i+" not enough data")}}}}}).call(t,"modules/statistics/RTPStatsCollector.js")},function(e,t){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=function(){function e(e,t){for(var n=0;n0){var n=t.startTime.getUTCMilliseconds()-e.startTime.getUTCMilliseconds();n<0&&(n=0);var r="[";t.wordArray.forEach(function(e){e.begin+=n,e.end+=n,r+=e.word+","}),r+="]",console.log(r),t.wordArray.name=t.name}e.results.push(t.wordArray),e.counter--,console.log("current counter: "+e.counter),e.maybeMerge()}function o(e){for(var t=0;t0}function a(e,t){if(0===e.length)e.push(t);else{if(e[e.length-1].begin<=t.begin)return void e.push(t);for(var n=0;n0&&"break"!==function(){var i=!1,o=n[0].begin;if(t.forEach(function(e){e[0].begin80&&(this.transcription+="\n ",this.lineLength=4),this.transcription+=" "+e.word,this.lineLength+=e.word.length+1},r.prototype.addTrack=function(e){this.audioRecorder.addTrack(e)},r.prototype.removeTrack=function(e){this.audioRecorder.removeTrack(e)},r.prototype.getTranscription=function(){if("finished"!==this.state)throw new Error('The transcription can only be retrieved when it\'s in the "finished" state. It\'s currently in the "'+this.state+'" state');return this.transcription},r.prototype.getState=function(){return this.state},r.prototype.reset=function(){this.state=u,this.counter=null,this.transcription=null,this.startTime=null,this.callback=null,this.results=[],this.lineLength=0},e.exports=r},function(e,t){var n=function(){throw new Error("TranscriptionService is abstract and cannot becreated")};n.prototype.send=function(e,t){var n=this;this.sendRequest(e.blob,function(r){n.verify(r)?e.wordArray=n.formatResponse(r):(console.log("the retrieved response from the server is not valid!"),e.wordArray=[]),t(e)})},n.prototype.sendRequest=function(e,t){throw new Error("TranscriptionService.sendRequest is abstract")},n.prototype.formatResponse=function(e){throw new Error("TranscriptionService.format is abstract")},n.prototype.verify=function(e){throw new Error("TranscriptionService.verify is abstract")},e.exports=n},function(e,t,n){function r(){var e="config does not contain an url to a Sphinx4 https server";if(void 0===config.sphinxURL)console.log(e);else{var t=config.sphinxURL;if(void 0!==t.includes&&t.includes("https://"))return t;console.log(e)}}var i=n(110),o=n(112),a=n(48),s=function(){this.url=r()};s.prototype=Object.create(i.prototype),s.constructor=s,s.prototype.sendRequest=function(e,t){console.log("sending an audio file to "+this.url),console.log("the audio file being sent: "+e);var n=new XMLHttpRequest;n.onreadystatechange=function(){if(n.readyState===XMLHttpRequest.DONE&&200===n.status)t(n.responseText);else if(n.readyState===XMLHttpRequest.DONE)throw new Error("unable to accept response from sphinx server. status: "+n.status)},n.open("POST",this.url),n.setRequestHeader("Content-Type",a.determineCorrectFileType()),n.send(e),console.log("send "+e)},s.prototype.formatResponse=function(e){var t=JSON.parse(e).objects;t.shift();var n=[];return t.forEach(function(e){return e.filler||n.push(new o(e.word,e.start,e.end))}),n},s.prototype.verify=function(e){if(console.log("response from server:"+e.toString()),"string"!=typeof e)return!1;var t=void 0;try{t=JSON.parse(e)}catch(e){return console.log(e),!1}if(void 0===t.objects)return!1;var n=t.objects;return!(!n[0]||!n[0]["session-id"])},e.exports=s},function(e,t){var n=function(e,t,n){this.word=e,this.begin=t,this.end=n};n.prototype.getWord=function(){return this.word},n.prototype.getBeginTime=function(){return this.begin},n.prototype.getEndTime=function(){return this.end},e.exports=n},function(e,t){var n={getTokenAuthUrl:function(e,t,n){var r=e;return"string"!=typeof r?null:r.replace("{room}",t).replace("{roleUpgrade}",!0===n)}};e.exports=n},function(e,t){function n(e,t){if(!e||!t||"function"!=typeof e.addListener||"function"!=typeof t.emit)throw new Error("Invalid arguments passed to EventEmitterForwarder");this.src=e,this.dest=t}n.prototype.forward=function(){for(var e=arguments.length,t=Array(e),n=0;n0&&i.a.sendLog(JSON.stringify(s))},r.prototype.getComponentVersion=function(e){return this.versions[e]}}).call(t,"modules/version/ComponentsVersions.js")},function(e,t,n){"use strict";(function(e){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(0),s=(n.n(a),n(10)),c=n(30),u=function(){function e(e,t){for(var n=0;nt[r]&&1||e[r]0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"http://jitsi.org/jitsimeet";r(this,t);var o=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));if(o.node=n,o.disco=e.disco,!o.disco)throw new Error("Missing strophe-plugins (disco and caps plugins are required)!");o.versionToCapabilities=Object.create(null),o.jidToVersion=Object.create(null),o.version="",o.rooms=new Set;var a=e.emuc;return a.addListener(c.a.EMUC_ROOM_ADDED,function(e){return o._addChatRoom(e)}),a.addListener(c.a.EMUC_ROOM_REMOVED,function(e){return o._removeChatRoom(e)}),Object.keys(a.rooms).forEach(function(e){o._addChatRoom(a.rooms[e])}),Strophe.addNamespace("CAPS","http://jabber.org/protocol/caps"),o.disco.addFeature(Strophe.NS.CAPS),e.addHandler(o._handleCaps.bind(o),Strophe.NS.CAPS),o._onMucMemberLeft=o._removeJidToVersionEntry.bind(o),o}return o(t,e),l(t,[{key:"addFeature",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.disco.addFeature(e),this._generateVersion(),t&&this.submit()}},{key:"removeFeature",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.disco.removeFeature(e),this._generateVersion(),t&&this.submit()}},{key:"submit",value:function(){this.rooms.forEach(function(e){return e.sendPresence()})}},{key:"getFeatures",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5e3,r=e in this.jidToVersion?this.jidToVersion[e]:null;if(!(r&&r.version in this.versionToCapabilities)){var i=r?r.node+"#"+r.version:null;return new Promise(function(o,a){return t.disco.info(e,i,function(e){var n=new Set;$(e).find(">query>feature").each(function(e,t){return n.add(t.getAttribute("var"))}),r&&(t.versionToCapabilities[r.version]=n),o(n)},a,n)})}return Promise.resolve(this.versionToCapabilities[r.version])}},{key:"_addChatRoom",value:function(e){this.rooms.add(e),e.addListener(c.a.MUC_MEMBER_LEFT,this._onMucMemberLeft),this._fixChatRoomPresenceMap(e)}},{key:"_removeChatRoom",value:function(e){this.rooms.delete(e),e.removeListener(c.a.MUC_MEMBER_LEFT,this._onMucMemberLeft)}},{key:"_fixChatRoomPresenceMap",value:function(e){e.addToPresence("c",{attributes:{xmlns:Strophe.NS.CAPS,hash:"sha-1",node:this.node,ver:this.version}})}},{key:"_notifyVersionChanged",value:function(){var e=this;this.rooms.forEach(function(t){return e._fixChatRoomPresenceMap(t)}),this.submit()}},{key:"_generateVersion",value:function(){var e=this.disco._identities.sort(a),t=this.disco._features.sort();this.version=b64_sha1(e.reduce(function(e,t){return d.reduce(function(e,n,r){return e+(0===r?"":"/")+t[n]},"")+"<"},"")+t.reduce(function(e,t){return e+t+"<"},"")),this._notifyVersionChanged()}},{key:"_handleCaps",value:function(e){var t=e.getAttribute("from"),n=e.querySelector("c"),r=n.getAttribute("ver"),i=n.getAttribute("node"),o=this.jidToVersion[t];return this.jidToVersion[t]={version:r,node:i},o&&o.version!==r&&this.eventEmitter.emit(c.a.PARTCIPANT_FEATURES_CHANGED,t),!0}},{key:"_removeJidToVersionEntry",value:function(e){e in this.jidToVersion&&delete this.jidToVersion[e]}}]),t}(u.a);t.a=f},function(e,t,n){"use strict";(function(e){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e,t){for(var n=[],r=0;r0&&void 0!==arguments[0]?arguments[0]:{};this.presMap.to=this.myroomjid,this.presMap.xns="http://jabber.org/protocol/muc",this.presMap.nodes=[],this.presMap.nodes.push({tagName:"user-agent",value:navigator.userAgent,attributes:{xmlns:"http://jitsi.org/jitmeet/user-agent"}}),this.addVideoInfoToPresence(!1),e.deploymentInfo&&e.deploymentInfo.userRegion&&this.presMap.nodes.push({tagName:"region",attributes:{id:e.deploymentInfo.userRegion,xmlns:"http://jitsi.org/jitsi-meet"}})}},{key:"updateDeviceAvailability",value:function(e){this.presMap.nodes.push({tagName:"devices",children:[{tagName:"audio",value:e.audio},{tagName:"video",value:e.video}]})}},{key:"join",value:function(e){var t=this;this.password=e,this.moderator.allocateConferenceFocus(function(){return t.sendPresence(!0)})}},{key:"sendPresence",value:function(e){var t=this.presMap.to;if(t&&(this.joined||e)){var n=$pres({to:t});e&&(n.c("x",{xmlns:this.presMap.xns}),this.password&&n.c("password").t(this.password).up(),n.up()),g.json2packet(this.presMap.nodes,n),this.connection.send(n),e&&this.connection.flush()}}},{key:"doLeave",value:function(){y.log("do leave",this.myroomjid);var e=$pres({to:this.myroomjid,type:"unavailable"});this.presMap.length=0,this.connection.flush(),this.connection.send(e),this.connection.flush()}},{key:"discoRoomInfo",value:function(){var e=this,t=$iq({type:"get",to:this.roomjid}).c("query",{xmlns:Strophe.NS.DISCO_INFO});this.connection.sendIQ(t,function(t){var n=1===$(t).find('>query>feature[var="muc_passwordprotected"]').length;n!==e.locked&&(e.eventEmitter.emit(m.a.MUC_LOCK_CHANGED,n),e.locked=n)},function(e){u.a.callErrorHandler(e),y.error("Error getting room info: ",e)})}},{key:"createNonAnonymousRoom",value:function(){var e=$iq({type:"get",to:this.roomjid}).c("query",{xmlns:"http://jabber.org/protocol/muc#owner"}).c("x",{xmlns:"jabber:x:data",type:"submit"}),t=this;this.connection.sendIQ(e,function(e){if(!$(e).find('>query>x[xmlns="jabber:x:data"]>field[var="muc#roomconfig_whois"]').length){var n="non-anonymous rooms not supported";return u.a.callErrorHandler(new Error(n)),void y.error(n)}var r=$iq({to:t.roomjid,type:"set"}).c("query",{xmlns:"http://jabber.org/protocol/muc#owner"});r.c("x",{xmlns:"jabber:x:data",type:"submit"}),r.c("field",{var:"FORM_TYPE"}).c("value").t("http://jabber.org/protocol/muc#roomconfig").up().up(),r.c("field",{var:"muc#roomconfig_whois"}).c("value").t("anyone").up().up(),t.connection.sendIQ(r)},function(e){u.a.callErrorHandler(e),y.error("Error getting room configuration form: ",e)})}},{key:"onPresence",value:function(e){var t=e.getAttribute("from"),n={};n.show=$(e).find(">show").text(),n.status=$(e).find(">status").text();var r=$(e).find('>x[xmlns="http://jabber.org/protocol/muc#user"]>item');n.affiliation=r.attr("affiliation"),n.role=r.attr("role");var i=r.attr("jid");n.jid=i,n.isFocus=i&&0===i.indexOf(this.moderator.getFocusUserJid()+"/"),n.isHiddenDomain=i&&i.indexOf("@")>0&&this.options.hiddenDomain===i.substring(i.indexOf("@")+1,i.indexOf("/")),$(e).find(">x").remove();var o=[];g.packet2JSON(e,o),this.lastPresences[t]=o;for(var a=null,s=0;s0&&this.eventEmitter.emit(m.a.DISPLAY_NAME_CHANGED,t,h)}break;case"bridgeNotAvailable":n.isFocus&&!this.noBridgeAvailable&&(this.noBridgeAvailable=!0,this.eventEmitter.emit(m.a.BRIDGE_DOWN));break;case"jibri-recording-status":a=f;break;case"call-control":var v=f.attributes;if(!v)break;this.phoneNumber=v.phone||null,this.phonePin=v.pin||null,this.eventEmitter.emit(m.a.PHONE_NUMBER_CHANGED);break;default:this.processNode(f,t)}}n.status&&this.eventEmitter.emit(m.a.PRESENCE_STATUS,t,n.status),a&&(this.lastJibri=a,this.recording&&this.recording.handleJibriPresence(a))}},{key:"_initFocus",value:function(e,t){this.focusMucJid=e,this.recording||(this.recording=new f.a(this.options.recordingType,this.eventEmitter,this.connection,this.focusMucJid,this.options.jirecon,this.roomjid),this.lastJibri&&this.recording.handleJibriPresence(this.lastJibri)),y.info("Ignore focus: "+e+", real JID: "+t)}},{key:"setParticipantPropertyListener",value:function(e){this.participantPropertyListener=e}},{key:"processNode",value:function(e,t){try{var n=this.presHandlers[e.tagName];e.tagName.startsWith("jitsi_participant_")&&(n=[this.participantPropertyListener]),n&&n.forEach(function(n){n(e,Strophe.getResourceFromJid(t),t)})}catch(t){u.a.callErrorHandler(t),y.error("Error processing:"+e.tagName+" node.",t)}}},{key:"sendMessage",value:function(e,t){var n=$msg({to:this.roomjid,type:"groupchat"});n.c("body",e).up(),t&&n.c("nick",{xmlns:"http://jabber.org/protocol/nick"}).t(t).up().up(),this.connection.send(n),this.eventEmitter.emit(m.a.SENDING_CHAT_MESSAGE,e)}},{key:"setSubject",value:function(e){var t=$msg({to:this.roomjid,type:"groupchat"});t.c("subject",e),this.connection.send(t)}},{key:"onParticipantLeft",value:function(e,t){delete this.lastPresences[e],t||(this.eventEmitter.emit(m.a.MUC_MEMBER_LEFT,e),this.moderator.onMucMemberLeft(e))}},{key:"onPresenceUnavailable",value:function(e,t){var n=this;if($(e).find('>ignore[xmlns="http://jitsi.org/jitmeet/"]').length)return!0;if($(e).find('>x[xmlns="http://jabber.org/protocol/muc#user"]>destroy').length){var r=void 0,i=$(e).find('>x[xmlns="http://jabber.org/protocol/muc#user"]>destroy>reason');return i.length&&(r=i.text()),this.eventEmitter.emit(m.a.MUC_DESTROYED,r),this.connection.emuc.doLeave(this.roomjid),!0}var o=0!==$(e).find('>x[xmlns="http://jabber.org/protocol/muc#user"]>status[code="110"]').length,a=0!==$(e).find('>x[xmlns="http://jabber.org/protocol/muc#user"]>status[code="307"]').length,s=Object.keys(this.members);o?s.length>0&&(s.forEach(function(e){var t=n.members[e];delete n.members[e],n.onParticipantLeft(e,t.isFocus)}),this.connection.emuc.doLeave(this.roomjid),a||this.eventEmitter.emit(m.a.MUC_LEFT)):(delete this.members[t],this.onParticipantLeft(t,!1)),a&&this.myroomjid===t&&this.eventEmitter.emit(m.a.KICKED)}},{key:"onMessage",value:function(e,t){var n=$(e).find('>nick[xmlns="http://jabber.org/protocol/nick"]').text()||Strophe.getResourceFromJid(t),r=$(e).find(">body").text();if("error"===e.getAttribute("type"))return this.eventEmitter.emit(m.a.CHAT_ERROR_RECEIVED,$(e).find(">text").text(),r),!0;var i=$(e).find(">subject");if(i.length){var o=i.text();(o||""===o)&&(this.eventEmitter.emit(m.a.SUBJECT_CHANGED,o),y.log("Subject is changed to "+o))}var a=$(e).find(">delay").attr("stamp");if(!a&&(a=$(e).find('>[xmlns="jabber:x:delay"]').attr("stamp"))){var s=a.match(/(\d{4})(\d{2})(\d{2}T\d{2}:\d{2}:\d{2})/);a=s[1]+"-"+s[2]+"-"+s[3]+"Z"}t===this.roomjid&&$(e).find('>x[xmlns="http://jabber.org/protocol/muc#user"]>status[code="104"]').length&&this.discoRoomInfo(),r&&(y.log("chat",n,r),this.eventEmitter.emit(m.a.MESSAGE_RECEIVED,t,n,r,this.myroomjid,a))}},{key:"onPresenceError",value:function(e,t){if($(e).find('>error[type="auth"]>not-authorized[xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"]').length)y.log("on password required",t),this.eventEmitter.emit(m.a.PASSWORD_REQUIRED);else if($(e).find('>error[type="cancel"]>not-allowed[xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"]').length){var n=Strophe.getDomainFromJid(e.getAttribute("to"));n===this.xmpp.options.hosts.anonymousdomain?this.eventEmitter.emit(m.a.ROOM_JOIN_ERROR):(y.warn("onPresError ",e),this.eventEmitter.emit(m.a.ROOM_CONNECT_NOT_ALLOWED_ERROR))}else $(e).find(">error>service-unavailable").length?(y.warn("Maximum users limit for the room has been reached",e),this.eventEmitter.emit(m.a.ROOM_MAX_USERS_ERROR)):(y.warn("onPresError ",e),this.eventEmitter.emit(m.a.ROOM_CONNECT_ERROR))}},{key:"kick",value:function(e){var t=$iq({to:this.roomjid,type:"set"}).c("query",{xmlns:"http://jabber.org/protocol/muc#admin"}).c("item",{nick:Strophe.getResourceFromJid(e),role:"none"}).c("reason").t("You have been kicked.").up().up().up();this.connection.sendIQ(t,function(t){return y.log("Kick participant with jid: ",e,t)},function(e){return y.log("Kick participant error: ",e)})}},{key:"lockRoom",value:function(e,t,n,r){var i=this;this.connection.sendIQ($iq({to:this.roomjid,type:"get"}).c("query",{xmlns:"http://jabber.org/protocol/muc#owner"}),function(o){if($(o).find('>query>x[xmlns="jabber:x:data"]>field[var="muc#roomconfig_roomsecret"]').length){var a=$iq({to:i.roomjid,type:"set"}).c("query",{xmlns:"http://jabber.org/protocol/muc#owner"});a.c("x",{xmlns:"jabber:x:data",type:"submit"}),a.c("field",{var:"FORM_TYPE"}).c("value").t("http://jabber.org/protocol/muc#roomconfig").up().up(),a.c("field",{var:"muc#roomconfig_roomsecret"}).c("value").t(e).up().up(),a.c("field",{var:"muc#roomconfig_whois"}).c("value").t("anyone").up().up(),i.connection.sendIQ(a,t,n)}else r()},n)}},{key:"addToPresence",value:function(e,t){t.tagName=e,this.removeFromPresence(e),this.presMap.nodes.push(t)}},{key:"removeFromPresence",value:function(e){var t=this.presMap.nodes.filter(function(t){return e!==t.tagName});this.presMap.nodes=t}},{key:"addPresenceListener",value:function(e,t){if("function"!=typeof t)throw new Error('"handler" is not a function');var n=this.presHandlers[e];n||(this.presHandlers[e]=n=[]),-1===n.indexOf(t)?n.push(t):y.warn("Trying to add the same handler more than once for: "+e)}},{key:"removePresenceListener",value:function(e,t){var n=this.presHandlers[e],r=n?n.indexOf(t):-1;-1!==r?n.splice(r,1):y.warn("Handler for: "+e+" was not registered")}},{key:"isFocus",value:function(e){var t=this.members[e];return t?t.isFocus:null}},{key:"isModerator",value:function(){return"moderator"===this.role}},{key:"getMemberRole",value:function(e){return this.members[e]?this.members[e].role:null}},{key:"setVideoMute",value:function(e,t){this.sendVideoInfoPresence(e),t&&t(e)}},{key:"setAudioMute",value:function(e,t){return this.sendAudioInfoPresence(e,t)}},{key:"addAudioInfoToPresence",value:function(e){this.removeFromPresence("audiomuted"),this.addToPresence("audiomuted",{attributes:{xmlns:"http://jitsi.org/jitmeet/audio"},value:e.toString()})}},{key:"sendAudioInfoPresence",value:function(e,t){this.addAudioInfoToPresence(e),this.connection&&this.sendPresence(),t&&t()}},{key:"addVideoInfoToPresence",value:function(e){this.removeFromPresence("videomuted"),this.addToPresence("videomuted",{attributes:{xmlns:"http://jitsi.org/jitmeet/video"},value:e.toString()})}},{key:"sendVideoInfoPresence",value:function(e){this.addVideoInfoToPresence(e),this.connection&&this.sendPresence()}},{key:"getMediaPresenceInfo",value:function(e,t){var n=this.lastPresences[this.roomjid+"/"+e];if(!n)return null;var r={muted:!1,videoType:void 0},i=null;if(t===d.a)i=a(n,"audiomuted");else{if(t!==d.b)return y.error("Unsupported media type: "+t),null;i=a(n,"videomuted");var o=a(n,"videoType");o.length>0&&(r.videoType=o[0].value)}return r.muted=i.length>0&&"true"===i[0].value,r}},{key:"isRecordingSupported",value:function(){return!!this.recording&&this.recording.isSupported()}},{key:"getRecordingState",value:function(){return this.recording?this.recording.getState():void 0}},{key:"getRecordingURL",value:function(){return this.recording?this.recording.getURL():null}},{key:"toggleRecording",value:function(e,t){return this.recording?this.recording.toggleRecording(e,t):t("error",new Error("The conference is not created yet!"))}},{key:"isSIPCallingSupported",value:function(){return!!this.moderator&&this.moderator.isSipGatewayEnabled()}},{key:"dial",value:function(e){return this.connection.rayo.dial(e,"fromnumber",Strophe.getBareJidFromJid(this.myroomjid),this.password,this.focusMucJid)}},{key:"hangup",value:function(){return this.connection.rayo.hangup()}},{key:"getPhoneNumber",value:function(){return this.phoneNumber}},{key:"getPhonePin",value:function(){return this.phonePin}},{key:"muteParticipant",value:function(e,t){y.info("set mute",t);var n=$iq({to:this.focusMucJid,type:"set"}).c("mute",{xmlns:"http://jitsi.org/jitmeet/audio",jid:e}).t(t.toString()).up();this.connection.sendIQ(n,function(e){return y.log("set mute",e)},function(e){return y.log("set mute error",e)})}},{key:"onMute",value:function(e){if(e.getAttribute("from")!==this.focusMucJid)return y.warn("Ignored mute from non focus peer"),!1;var t=$(e).find("mute");if(t.length){var n="true"===t.text();this.eventEmitter.emit(m.a.AUDIO_MUTED_BY_FOCUS,n)}return!0}},{key:"leave",value:function(){var e=this;return new Promise(function(t,n){function r(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];o.removeListener(m.a.MUC_LEFT,r),clearTimeout(i),e?n(new Error("The timeout for the confirmation about leaving the room expired.")):t()}var i=setTimeout(function(){return r(!0)},5e3),o=e.eventEmitter;o.on(m.a.MUC_LEFT,r),e.doLeave()})}}]),t}(l.a);t.a=b}).call(t,"modules/xmpp/ChatRoom.js")},function(e,t,n){"use strict";(function(e){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=n(0),o=(n.n(i),n(50)),a=function(){function e(e,t){for(var n=0;ncontent[name="video"]');if(t.length){var n=t[0].getAttribute("senders");if("both"===n||"initiator"===n||"responder"===n||"none"===n)return n}return null}}]),S(t,[{key:"_assertNotEnded",value:function(e){return this.state!==b.a||(E.log("The session has ended - cancelling action: "+e),!1)}},{key:"doInitialize",value:function(){var e=this;this.lasticecandidate=!1,this.isreconnect=!1,this.wasstable=!1,this.isP2P?this.peerconnection=this.rtc.createPeerConnection(this.signalingLayer,this.iceConfig,this.isP2P,{disableSimulcast:!0,disableRtx:this.room.options.disableRtx,preferH264:this.room.options.p2p&&this.room.options.p2p.preferH264}):this.peerconnection=this.rtc.createPeerConnection(this.signalingLayer,this.iceConfig,this.isP2P,{disableSimulcast:this.room.options.disableSimulcast||this.room.options.preferH264,disableRtx:this.room.options.disableRtx,preferH264:this.room.options.preferH264,enableFirefoxSimulcast:this.room.options.testing&&this.room.options.testing.enableFirefoxSimulcast}),this.peerconnection.onicecandidate=function(t){if(t){var n=t.candidate,r=window.performance.now();if(n){null===e._gatheringStartedTimestamp&&(e._gatheringStartedTimestamp=r);var i=n.protocol;if("string"==typeof i)if("tcp"===(i=i.toLowerCase())||"ssltcp"===i){if(e.webrtcIceTcpDisable)return}else if("udp"===i&&e.webrtcIceUdpDisable)return}else if(!e._gatheringReported){var o=e.isP2P?"p2p.ice.":"ice.";o+=e.isInitiator?"initiator":"responder",o+=".gatheringDuration",v.a.analytics.sendEvent(o,{value:r-e._gatheringStartedTimestamp}),e._gatheringReported=!0}e.sendIceCandidate(n)}},this.peerconnection.onsignalingstatechange=function(){e.peerconnection&&("stable"===e.peerconnection.signalingState?e.wasstable=!0:"closed"!==e.peerconnection.signalingState&&"closed"!==e.peerconnection.connectionState||e.closed||e.room.eventEmitter.emit(g.a.SUSPEND_DETECTED,e))},this.peerconnection.oniceconnectionstatechange=function(){if(e.peerconnection&&e._assertNotEnded("oniceconnectionstatechange")){var t=window.performance.now();switch(e.isP2P||(e.room.connectionTimes["ice.state."+e.peerconnection.iceConnectionState]=t),E.log("(TIME) ICE "+e.peerconnection.iceConnectionState+" P2P? "+e.isP2P+":\t",t),v.a.analytics.sendEvent((e.isP2P?"p2p.ice.":"ice.")+e.peerconnection.iceConnectionState,{value:t}),e.room.eventEmitter.emit(g.a.ICE_CONNECTION_STATE_CHANGED,e,e.peerconnection.iceConnectionState),e.peerconnection.iceConnectionState){case"checking":e._iceCheckingStartedTimestamp=t;break;case"connected":if("stable"===e.peerconnection.signalingState&&e.isreconnect&&e.room.eventEmitter.emit(g.a.CONNECTION_RESTORED,e),!e.wasConnected&&e.wasstable){var n=e.isP2P?"p2p.ice.":"ice.";n+=e.isInitiator?"initiator.":"responder.",v.a.analytics.sendEvent(n+"checksDuration",{value:t-e._iceCheckingStartedTimestamp});var r=Math.min(e._iceCheckingStartedTimestamp,e._gatheringStartedTimestamp);e.establishmentDuration=t-r,v.a.analytics.sendEvent(n+"establishmentDuration",{value:e.establishmentDuration}),e.wasConnected=!0,e.room.eventEmitter.emit(g.a.CONNECTION_ESTABLISHED,e)}e.isreconnect=!1;break;case"disconnected":if(e.closed)break;e.isreconnect=!0,e.wasstable&&e.room.eventEmitter.emit(g.a.CONNECTION_INTERRUPTED,e);break;case"failed":e.room.eventEmitter.emit(g.a.CONNECTION_ICE_FAILED,e),e.room.eventEmitter.emit(g.a.CONFERENCE_SETUP_FAILED,e,new Error("ICE fail"))}}},this.peerconnection.onnegotiationneeded=function(){e.room.eventEmitter.emit(g.a.PEERCONNECTION_READY,e)},this.signalingLayer.setChatRoom(this.room)}},{key:"sendIceCandidate",value:function(e){var t=this,n=new p.a(this.peerconnection.localDescription.sdp);if(e&&!this.lasticecandidate){var r=h.a.iceparams(n.media[e.sdpMLineIndex],n.session),i=h.a.candidateToJingle(e.candidate);if(!r||!i)return l.a.callErrorHandler(new Error("failed to get ice && jcand")),void E.error("failed to get ice && jcand");r.xmlns="urn:xmpp:jingle:transports:ice-udp:1",this.usedrip?(0===this.dripContainer.length&&setTimeout(function(){0!==t.dripContainer.length&&(t.sendIceCandidates(t.dripContainer),t.dripContainer=[])},20),this.dripContainer.push(e)):this.sendIceCandidates([e])}else E.log("sendIceCandidate: last candidate."),this.lasticecandidate=!0}},{key:"sendIceCandidates",value:function(e){var t=this;if(this._assertNotEnded("sendIceCandidates")){E.log("sendIceCandidates",e);for(var n=$iq({to:this.peerjid,type:"set"}).c("jingle",{xmlns:"urn:xmpp:jingle:1",action:"transport-info",initiator:this.initiator,sid:this.sid}),r=new p.a(this.peerconnection.localDescription.sdp),i=0;i0){var s=h.a.iceparams(r.media[i],r.session);s.xmlns="urn:xmpp:jingle:transports:ice-udp:1",n.c("content",{creator:t.initiator===t.localJid?"initiator":"responder",name:o[0].sdpMid?o[0].sdpMid:a.media}).c("transport",s);for(var c=0;ccontent>transport>candidate").each(function(e,t){var r=h.a.candidateFromJingle(t);r=r.replace("\r\n","").replace("a=","");var i=new RTCIceCandidate({sdpMLineIndex:0,sdpMid:"",candidate:r});n.push(i)}),!n.length)return void E.error("No ICE candidates to add ?",e[0]&&e[0].outerHTML);var r=function(e){var r=!0,i=!1,o=void 0;try{for(var a,s=n["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(r=(a=s.next()).done);r=!0){var c=a.value;t.peerconnection.addIceCandidate(c,function(){E.debug("addIceCandidate ok!")},function(e){E.error("addIceCandidate failed!",e)})}}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}e()};E.debug("Queued add ("+n.length+") ICE candidates task..."),this.modificationQueue.push(r)}},{key:"readSsrcInfo",value:function(e){var t=this;$(e).find('>description>source[xmlns="urn:xmpp:jingle:apps:rtp:ssma:0"]').each(function(e,n){var r=Number(n.getAttribute("ssrc"));t.isP2P?t.signalingLayer.setSSRCOwner(r,Strophe.getResourceFromJid(t.peerjid)):$(n).find('>ssrc-info[xmlns="http://jitsi.org/jitmeet"]').each(function(e,n){var i=n.getAttribute("owner");i&&i.length&&(isNaN(r)||r<0?E.warn("Invalid SSRC "+r+" value received for "+i):t.signalingLayer.setSSRCOwner(r,Strophe.getResourceFromJid(i)))})})}},{key:"generateRecvonlySsrc",value:function(){this.peerconnection?this.peerconnection.generateRecvonlySsrc():E.error("Unable to generate recvonly SSRC - no peerconnection")}},{key:"acceptOffer",value:function(e,t,n,r){var i=this;this.setOfferAnswerCycle(e,function(){i.sendSessionAccept(t,n)},n,r)}},{key:"invite",value:function(e){var t=this;if(!this.isInitiator)throw new Error("Trying to invite from the responder session");var n=function(n){var r=!0,i=!1,o=void 0;try{for(var a,s=e["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(r=(a=s.next()).done);r=!0){var c=a.value;t.peerconnection.addTrack(c)}}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}t.peerconnection.createOffer(function(e){t.peerconnection.setLocalDescription(e,function(){t.sendSessionInitiate(t.peerconnection.localDescription.sdp),n()},function(t){E.error("Failed to set local SDP",t,e),n(t)})},function(e){E.error("Failed to create an offer",e,t.mediaConstraints),n(e)},t.mediaConstraints)};this.modificationQueue.push(n,function(e){e?E.error("invite error",e):E.debug("invite executed - OK")})}},{key:"sendSessionInitiate",value:function(e){var t=$iq({to:this.peerjid,type:"set"}).c("jingle",{xmlns:"urn:xmpp:jingle:1", action:"session-initiate",initiator:this.initiator,sid:this.sid});new p.a(e).toJingle(t,this.initiator===this.me?"initiator":"responder"),t=t.tree(),E.info("Session-initiate: ",t),this.connection.sendIQ(t,function(){E.info('Got RESULT for "session-initiate"')},function(e){E.error('"session-initiate" error',e)},1e4)}},{key:"setAnswer",value:function(e){if(!this.isInitiator)throw new Error("Trying to set an answer on the responder session");this.setOfferAnswerCycle(e,function(){E.info("setAnswer - succeeded")},function(e){E.error("setAnswer failed: ",e)})}},{key:"setOfferAnswerCycle",value:function(e,n,r,i){var o=this,a=function(n){if(i){var r=!0,a=!1,s=void 0;try{for(var c,u=i["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(r=(c=u.next()).done);r=!0){var l=c.value;o.peerconnection.addTrack(l)}}catch(e){a=!0,s=e}finally{try{!r&&u.return&&u.return()}finally{if(a)throw s}}}var d=o._processNewJingleOfferIq(e),f=o.peerconnection.localDescription.sdp;o._renegotiate(d.raw).then(function(){if(o.state===b.b&&(o.state=b.c,o.isP2P&&!o._localVideoActive&&o.sendContentModify(o._localVideoActive)),f){var e=new p.a(o.peerconnection.localDescription.sdp);o.notifyMySSRCUpdate(new p.a(f),e)}n()},function(e){E.error("Error renegotiating after setting new remote "+(o.isInitiator?"answer: ":"offer: ")+e,d),t.onJingleFatalError(o,e),n(e)})};this.modificationQueue.push(a,function(e){e?r(e):n()})}},{key:"replaceTransport",value:function(e,t,n){var r=this;this.room.eventEmitter.emit(g.a.ICE_RESTARTING,this);var i=e.clone();e.find(">content[name='data']").remove(),this.setOfferAnswerCycle(e,function(){r.setOfferAnswerCycle(i,function(){var e=new p.a(r.peerconnection.localDescription.sdp);r.sendTransportAccept(e,t,n)},n)},n)}},{key:"sendSessionAccept",value:function(e,t){var n=this,r=new p.a(this.peerconnection.localDescription.sdp),i=$iq({to:this.peerjid,type:"set"}).c("jingle",{xmlns:"urn:xmpp:jingle:1",action:"session-accept",initiator:this.initiator,responder:this.responder,sid:this.sid});this.webrtcIceTcpDisable&&(r.removeTcpCandidates=!0),this.webrtcIceUdpDisable&&(r.removeUdpCandidates=!0),this.failICE&&(r.failICE=!0),r.toJingle(i,this.initiator===this.localJid?"initiator":"responder",null),i=i.tree(),E.info("Sending session-accept",i),this.connection.sendIQ(i,e,this.newJingleErrorHandler(i,function(e){t(e),n.room.eventEmitter.emit(g.a.SESSION_ACCEPT_TIMEOUT,n)}),1e4)}},{key:"sendContentModify",value:function(e){var t=e?"both":"none",n=$iq({to:this.peerjid,type:"set"}).c("jingle",{xmlns:"urn:xmpp:jingle:1",action:"content-modify",initiator:this.initiator,sid:this.sid}).c("content",{name:"video",senders:t});E.info("Sending content-modify, video senders: "+t),this.connection.sendIQ(n,null,this.newJingleErrorHandler(n),1e4)}},{key:"sendTransportAccept",value:function(e,t,n){var r=this,i=$iq({to:this.peerjid,type:"set"}).c("jingle",{xmlns:"urn:xmpp:jingle:1",action:"transport-accept",initiator:this.initiator,sid:this.sid});e.media.forEach(function(t,n){var o=h.a.parseMLine(t.split("\r\n")[0]);i.c("content",{creator:r.initiator===r.localJid?"initiator":"responder",name:o.media}),e.transportToJingle(n,i),i.up()}),i=i.tree(),E.info("Sending transport-accept: ",i),this.connection.sendIQ(i,t,this.newJingleErrorHandler(i,n),1e4)}},{key:"sendTransportReject",value:function(e,t){var n=$iq({to:this.peerjid,type:"set"}).c("jingle",{xmlns:"urn:xmpp:jingle:1",action:"transport-reject",initiator:this.initiator,sid:this.sid});n=n.tree(),E.info("Sending 'transport-reject",n),this.connection.sendIQ(n,e,this.newJingleErrorHandler(n,t),1e4)}},{key:"terminate",value:function(e,t,n){if(this.state!==b.a){if(!n||Boolean(n.sendSessionTerminate)){var r=$iq({to:this.peerjid,type:"set"}).c("jingle",{xmlns:"urn:xmpp:jingle:1",action:"session-terminate",initiator:this.initiator,sid:this.sid}).c("reason").c(n&&n.reason||"success");n&&n.reasonDescription&&r.up().c("text").t(n.reasonDescription),r=r.tree(),E.info("Sending session-terminate",r),this.connection.sendIQ(r,e,this.newJingleErrorHandler(r,t),1e4)}else E.info("Skipped sending session-terminate for "+this);this.connection.jingle.terminate(this.sid)}}},{key:"onTerminated",value:function(e,t){this.state=b.a,this.establishmentDuration=void 0,E.info("Session terminated "+this,e,t),this.close()}},{key:"_parseSsrcInfoFromSourceAdd",value:function(e,t){var n=[];return $(e).each(function(e,r){var i=$(r).attr("name"),o="";$(r).find('ssrc-group[xmlns="urn:xmpp:jingle:apps:rtp:ssma:0"]').each(function(){var e=this.getAttribute("semantics"),t=$(this).find(">source").map(function(){return this.getAttribute("ssrc")}).get();t.length&&(o+="a=ssrc-group:"+e+" "+t.join(" ")+"\r\n")}),$(r).find('source[xmlns="urn:xmpp:jingle:apps:rtp:ssma:0"]').each(function(){var e=$(this).attr("ssrc");if(t.containsSSRC(e))return void E.warn("Source-add request for existing SSRC: "+e);$(this).find(">parameter").each(function(){o+="a=ssrc:"+e+" "+$(this).attr("name"),$(this).attr("value")&&$(this).attr("value").length&&(o+=":"+$(this).attr("value")),o+="\r\n"})}),t.media.forEach(function(e,t){h.a.findLine(e,"a=mid:"+i)&&(n[t]||(n[t]=""),n[t]+=o)})}),n}},{key:"addRemoteStream",value:function(e){this._addOrRemoveRemoteStream(!0,e)}},{key:"removeRemoteStream",value:function(e){this._addOrRemoveRemoteStream(!1,e)}},{key:"_addOrRemoveRemoteStream",value:function(e,t){var n=this,r=e?"addRemoteStream":"removeRemoteStream";e&&this.readSsrcInfo(t);var i=function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(i){if(!n.peerconnection.localDescription||!n.peerconnection.localDescription.sdp){var o=r+" - localDescription not ready yet";return E.error(o),void i(o)}E.log("Processing "+r),E.log("ICE connection state: ",n.peerconnection.iceConnectionState);var a=new p.a(n.peerconnection.localDescription.sdp),s=new p.a(n.peerconnection.remoteDescription.sdp),c=e?n._parseSsrcInfoFromSourceAdd(t,s):n._parseSsrcInfoFromSourceRemove(t,s),u=e?n._processRemoteAddSource(c):n._processRemoteRemoveSource(c);n._renegotiate(u.raw).then(function(){var e=new p.a(n.peerconnection.localDescription.sdp);E.log(r+" - OK, SDPs: ",a,e),n.notifyMySSRCUpdate(a,e),i()},function(e){E.error(r+" failed:",e),i(e)})});this.modificationQueue.push(i)}},{key:"_processQueueTasks",value:function(e,t){e(t)}},{key:"_processNewJingleOfferIq",value:function(e){var t=new p.a("");return this.webrtcIceTcpDisable&&(t.removeTcpCandidates=!0),this.webrtcIceUdpDisable&&(t.removeUdpCandidates=!0),this.failICE&&(t.failICE=!0),t.fromJingle(e),this.readSsrcInfo($(e).find(">content")),t}},{key:"_processRemoteRemoveSource",value:function(e){var t=new p.a(this.peerconnection.remoteDescription.sdp);return e.forEach(function(e,n){e=e.split("\r\n"),e.pop(),e.forEach(function(e){t.media[n]=t.media[n].replace(e+"\r\n","")})}),t.raw=t.session+t.media.join(""),t}},{key:"_processRemoteAddSource",value:function(e){var t=new p.a(this.peerconnection.remoteDescription.sdp);return e.forEach(function(e,n){t.media[n]+=e}),t.raw=t.session+t.media.join(""),t}},{key:"_renegotiate",value:function(e){var t=this,n=e||this.peerconnection.remoteDescription.sdp;if(!n)return Promise.reject("Can not renegotiate without remote description,- current state: "+this.state);var r=new RTCSessionDescription({type:this.isInitiator?"answer":"offer",sdp:n});return new Promise(function(e,n){if("closed"===t.peerconnection.signalingState)return void n("Attempted to renegotiate in state closed");t.isInitiator?t._initiatorRenegotiate(r,e,n):t._responderRenegotiate(r,e,n)})}},{key:"_responderRenegotiate",value:function(e,t,n){var r=this;E.debug("Renegotiate: setting remote description"),this.peerconnection.setRemoteDescription(e,function(){E.debug("Renegotiate: creating answer"),r.peerconnection.createAnswer(function(e){E.debug("Renegotiate: setting local description"),r.peerconnection.setLocalDescription(e,function(){t()},function(e){n("setLocalDescription failed: "+e)})},function(e){return n("createAnswer failed: "+e)},r.mediaConstraints)},function(e){return n("setRemoteDescription failed: "+e)})}},{key:"_initiatorRenegotiate",value:function(e,t,n){var r=this;"have-local-offer"===this.peerconnection.signalingState?(E.debug("Renegotiate: setting remote description"),this.peerconnection.setRemoteDescription(e,function(){r._initiatorRenegotiate(e,t,n)},function(e){return n("setRemoteDescription failed: "+e)})):(E.debug("Renegotiate: creating offer"),this.peerconnection.createOffer(function(i){E.debug("Renegotiate: setting local description"),r.peerconnection.setLocalDescription(i,function(){E.debug("Renegotiate: setting remote description"),r.peerconnection.setRemoteDescription(e,function(){t()},function(e){return n("setRemoteDescription failed: "+e)})},function(e){n("setLocalDescription failed: ",e)})},function(e){return n("createOffer failed: "+e)},this.mediaConstraints))}},{key:"replaceTrack",value:function(e,t){var n=this,r=function(r){if("closed"===n.peerconnection.signalingState||"closed"===n.peerconnection.connectionState||n.closed)return void r();var i=n.peerconnection.localDescription.sdp;!e&&t&&t.isVideoTrack()?n.peerconnection.clearRecvonlySsrc():e&&e.isVideoTrack()&&!t&&(n.peerconnection.clearRecvonlySsrc(),n.peerconnection.generateRecvonlySsrc()),e&&n.peerconnection.removeTrack(e),t&&n.peerconnection.addTrack(t),(e||t)&&n.state===b.c?n._renegotiate().then(function(){var e=new p.a(n.peerconnection.localDescription.sdp);n.notifyMySSRCUpdate(new p.a(i),e),r()},r):r()};this.modificationQueue.push(r,function(e){e?E.error("Replace track error:",e):E.info("Replace track done!")})}},{key:"_parseSsrcInfoFromSourceRemove",value:function(e,t){var n=[];return $(e).each(function(e,r){var i=$(r).attr("name"),o="";$(r).find('ssrc-group[xmlns="urn:xmpp:jingle:apps:rtp:ssma:0"]').each(function(){var e=this.getAttribute("semantics"),t=$(this).find(">source").map(function(){return this.getAttribute("ssrc")}).get();t.length&&(o+="a=ssrc-group:"+e+" "+t.join(" ")+"\r\n")});var a=[];$(r).find('source[xmlns="urn:xmpp:jingle:apps:rtp:ssma:0"]').each(function(){var e=$(this).attr("ssrc");a.push(e)}),t.media.forEach(function(e,t){h.a.findLine(e,"a=mid:"+i)&&(n[t]||(n[t]=""),a.forEach(function(r){var i=h.a.findLines(e,"a=ssrc:"+r);i.length&&(n[t]+=i.join("\r\n")+"\r\n")}),n[t]+=o)})}),n}},{key:"_verifyNoSSRCChanged",value:function(e,t){var n=new p.a(this.peerconnection.localDescription.sdp),r=new f.a(t,n),i=r.getNewMedia();if(Object.keys(i).length)return E.error("Some SSRC were added on "+e,i),!1;r=new f.a(n,t);var o=r.getNewMedia();return!Object.keys(o).length||(E.error("Some SSRCs were removed on "+e,o),!1)}},{key:"addTrackAsUnmute",value:function(e){return this._addRemoveTrackAsMuteUnmute(!1,e)}},{key:"removeTrackAsMute",value:function(e){return this._addRemoveTrackAsMuteUnmute(!0,e)}},{key:"_addRemoveTrackAsMuteUnmute",value:function(e,t){var n=this;if(!t)return Promise.reject('invalid "track" argument value');var r=e?"removeTrackMute":"addTrackUnmute",i=function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(i){var o=n.peerconnection;if(!o)return void i("Error: tried "+r+" track with no active peerconnection");var a=o.localDescription.sdp;(e?o.removeTrackMute.bind(o,t):o.addTrackUnmute.bind(o,t))()?a&&o.remoteDescription.sdp?n._renegotiate().then(function(){n._verifyNoSSRCChanged(r,new p.a(a)),i()},i):i():i(r+" failed!")});return new Promise(function(e,t){n.modificationQueue.push(i,function(n){n?t(n):e()})})}},{key:"setMediaTransferActive",value:function(e,t){var n=this;if(!this.peerconnection)return Promise.reject('Can not modify transfer active state, before "initialize" is called');var r=e?"audio active":"audio inactive",i=t?"video active":"video inactive";E.info("Queued make "+i+", "+r+" task...");var o=function(r){var i=n.state===b.c,o=n.peerconnection.setAudioTransferActive(e);n._localVideoActive!==t&&(n._localVideoActive=t,n.isP2P&&i&&n.sendContentModify(t));var a=n.peerconnection.setVideoTransferActive(n._localVideoActive&&n._remoteVideoActive);i&&(o||a)?n._renegotiate().then(r,r):r()};return new Promise(function(e,t){n.modificationQueue.push(o,function(n){n?t(n):e()})})}},{key:"modifyContents",value:function(e){var n=this,r=t.parseVideoSenders(e);if(null===r)return void E.error(this+' - failed to parse video "senders" attribute in"content-modify" action');var i=function(e){n._assertNotEnded("content-modify")&&n._modifyRemoteVideoActive(r)?n._renegotiate().then(e,e):e()};E.debug(this+' queued "content-modify" task(video senders="'+r+'")'),this.modificationQueue.push(i,function(e){e&&E.error('"content-modify" failed',e)})}},{key:"_modifyRemoteVideoActive",value:function(e){var t="both"===e||"initiator"===e&&this.isInitiator||"responder"===e&&!this.isInitiator;return t!==this._remoteVideoActive&&(E.debug(this+" new remote video active: "+t),this._remoteVideoActive=t),this.peerconnection.setVideoTransferActive(this._localVideoActive&&this._remoteVideoActive)}},{key:"notifyMySSRCUpdate",value:function(e,t){if(this.state!==b.c)return void E.warn("Skipping SSRC update in '"+this.state+" ' state.");var n=new f.a(t,e),r=$iq({to:this.peerjid,type:"set"}).c("jingle",{xmlns:"urn:xmpp:jingle:1",action:"source-remove",initiator:this.initiator,sid:this.sid});n.toJingle(r)?(E.info("Sending source-remove",r.tree()),this.connection.sendIQ(r,null,this.newJingleErrorHandler(r,function(e){l.a.callErrorHandler(new Error("Jingle error: "+JSON.stringify(e)))}),1e4)):E.log("removal not necessary"),n=new f.a(e,t);var i=$iq({to:this.peerjid,type:"set"}).c("jingle",{xmlns:"urn:xmpp:jingle:1",action:"source-add",initiator:this.initiator,sid:this.sid});n.toJingle(i)?(E.info("Sending source-add",i.tree()),this.connection.sendIQ(i,null,this.newJingleErrorHandler(i,function(e){l.a.callErrorHandler(new Error("Jingle error: "+JSON.stringify(e)))}),1e4)):E.log("addition not necessary")}},{key:"newJingleErrorHandler",value:function(e,t){var n=this;return function(r){var i={},o=$(r).find("error");if(o.length){i.code=o.attr("code");var a=$(r).find("error :first");a.length&&(i.reason=a[0].tagName)}r||(i.reason="timeout"),i.source=e,e&&"function"==typeof e.tree&&(i.source=e.tree()),i.source&&i.source.outerHTML&&(i.source=i.source.outerHTML),i.session=n.toString(),t?t(i):n.state===b.a&&"item-not-found"===i.reason?E.debug("Jingle error",i):l.a.callErrorHandler(new Error("Jingle error: "+JSON.stringify(i)))}}},{key:"getIceConnectionState",value:function(){return this.peerconnection.iceConnectionState}},{key:"close",value:function(){this.closed=!0,this.signalingLayer.setChatRoom(null),this.peerconnection&&(this.peerconnection.signalingState&&"closed"!==this.peerconnection.signalingState||this.peerconnection.connectionState&&"closed"!==this.peerconnection.connectionState)&&this.peerconnection.close()}},{key:"toString",value:function(){return"JingleSessionPC[p2p="+this.isP2P+",initiator="+this.isInitiator+",sid="+this.sid+"]"}}],[{key:"onJingleFatalError",value:function(e,t){this.room&&(this.room.eventEmitter.emit(g.a.CONFERENCE_SETUP_FAILED,e,t),this.room.eventEmitter.emit(g.a.JINGLE_FATAL_ERROR,e,t))}}]),t}(d.a);t.a=T}).call(t,"modules/xmpp/JingleSessionPC.js")},function(e,t,n){"use strict";(function(e){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t,n){u.debug("Updating mline to associate "+n+"rtx ssrc with primary stream, "+t.id);var r=t.id,i=t.msid,o=t.cname,a=e.getRtxSSRC(r);if(a===n)return void u.debug(n+" was already associated with "+r);a&&(u.debug(r+" was previously associated with rtx"+a+", removing all references to it"),e.removeSSRC(a),u.debug("groups before filtering for "+a),u.debug(e.dumpSSRCGroups()),e.removeGroupsWithSSRC(a)),e.addSSRCAttribute({id:n,attribute:"cname",value:o}),e.addSSRCAttribute({id:n,attribute:"msid",value:i}),e.addSSRCGroup({semantics:"FID",ssrcs:r+" "+n})}var o=n(0),a=(n.n(o),n(24)),s=n(12),c=function(){function e(e,t){for(var n=0;nconference>property[name='authentication'][value='true']").length>0;s.info("Authentication enabled: "+t),this.externalAuthEnabled=$(e).find(">conference>property[name='externalAuth'][value='true']").length>0,s.info("External authentication enabled: "+this.externalAuthEnabled),this.externalAuthEnabled||this.parseSessionId(e);var n=$(e).find(">conference").attr("identity");this.eventEmitter.emit(u.IDENTITY_UPDATED,t,n),$(e).find(">conference>property[name='sipGatewayEnabled'][value='true']").length&&(this.sipGatewayEnabled=!0),s.info("Sip gateway enabled: "+this.sipGatewayEnabled)},i.prototype.allocateConferenceFocus=function(e){var t=this;this.setFocusUserJid(this.options.connection.focusUserJid),this.connection.sendIQ(this.createConferenceIq(),function(n){return t._allocateConferenceFocusSuccess(n,e)},function(n){return t._allocateConferenceFocusError(n,e)}),this.connection.flush()},i.prototype._allocateConferenceFocusError=function(e,t){var n=this,r=$(e).find(">error>session-invalid").length;if(r&&(s.info("Session expired! - removing"),a.a.clearSessionId()),$(e).find(">error>graceful-shutdown").length)return void this.eventEmitter.emit(c.GRACEFUL_SHUTDOWN);var i=$(e).find(">error>reservation-error");if(i.length){var o=i.attr("error-code"),u=$(e).find(">error>text"),d=void 0;return u&&(d=u.text()),void this.eventEmitter.emit(c.RESERVATION_ERROR,o,d)}if($(e).find(">error>not-authorized").length)return s.warn("Unauthorized to start the conference",e),Strophe.getDomainFromJid(e.getAttribute("to"))!==this.options.connection.hosts.anonymousdomain&&(this.externalAuthEnabled=!0),void this.eventEmitter.emit(c.AUTHENTICATION_REQUIRED);var p=this.getNextErrorTimeout(),f="Focus error, retry after "+p;l.callErrorHandler(new Error(f)),s.error(f,e);var h=this.getFocusComponent(),m=p/1e3;r||this.eventEmitter.emit(c.FOCUS_DISCONNECTED,h,m),this.getNextTimeout(!0),window.setTimeout(function(){return n.allocateConferenceFocus(t)},p)},i.prototype._allocateConferenceFocusSuccess=function(e,t){var n=this;if(this.parseConfigOptions(e),this.getNextErrorTimeout(!0),"true"===$(e).find("conference").attr("ready"))this.getNextTimeout(!0),t();else{var r=this.getNextTimeout();s.info("Waiting for the focus... "+r),window.setTimeout(function(){return n.allocateConferenceFocus(t)},r)}},i.prototype.authenticate=function(){var e=this;return new Promise(function(t,n){e.connection.sendIQ(e.createConferenceIq(),function(n){e.parseSessionId(n),t()},function(e){var t=$(e).find(">error").attr("code");n(e,t)})})},i.prototype.getLoginUrl=function(e,t){this._getLoginUrl(!1,e,t)},i.prototype._getLoginUrl=function(e,t,n){function r(e,t){l.callErrorHandler(new Error(e)),s.error(e,t),n(t)}var i=$iq({to:this.getFocusComponent(),type:"get"}),o={xmlns:"http://jitsi.org/protocol/focus",room:this.roomName,"machine-uid":a.a.getMachineId()},c="auth url";e&&(o.popup=!0,c="POPUP "+c),i.c("login-url",o),this.connection.sendIQ(i,function(e){var n=$(e).find("login-url").attr("url");n=decodeURIComponent(n),n?(s.info("Got "+c+": "+n),t(n)):r("Failed to get "+c+" from the focus",e)},r.bind(void 0,"Get "+c+" error"))},i.prototype.getPopupLoginUrl=function(e,t){ this._getLoginUrl(!0,e,t)},i.prototype.logout=function(e){var t=$iq({to:this.getFocusComponent(),type:"set"}),n=a.a.getSessionId();if(!n)return void e();t.c("logout",{xmlns:"http://jitsi.org/protocol/focus","session-id":n}),this.connection.sendIQ(t,function(t){var n=$(t).find("logout").attr("logout-url");n&&(n=decodeURIComponent(n)),s.info("Log out OK, url: "+n,t),a.a.clearSessionId(),e(n)},function(e){l.callErrorHandler(new Error("Logout error")),s.error("Logout error",e)})}}).call(t,"modules/xmpp/moderator.js")},function(e,t,n){"use strict";(function(e){function r(e,t,n,i,o,a){this.eventEmitter=t,this.connection=n,this.state=null,this.focusMucJid=i,this.jirecon=o,this.url=null,this.type=e,this._isSupported=!(e===r.types.JIRECON&&!this.jirecon||e!==r.types.JIBRI&&e!==r.types.COLIBRI),this.jireconRid=null,this.roomjid=a}t.a=r;var i=n(0),o=(n.n(i),n.i(i.getLogger)(e)),a=n(7),s=n(45),c=n(3);r.types={COLIBRI:"colibri",JIRECON:"jirecon",JIBRI:"jibri"},r.status={ON:"on",OFF:"off",AVAILABLE:"available",UNAVAILABLE:"unavailable",PENDING:"pending",RETRYING:"retrying",BUSY:"busy",FAILED:"failed"},r.action={START:"start",STOP:"stop"},r.prototype.handleJibriPresence=function(e){var t=e.attributes;if(t){var n=t.status;o.log("Handle jibri presence : ",n),n!==this.state&&("undefined"===n?this.state=r.status.UNAVAILABLE:n===r.status.OFF?this.state&&"undefined"!==this.state&&this.state!==r.status.UNAVAILABLE?this.state=r.status.OFF:this.state=r.status.AVAILABLE:this.state=n,this.eventEmitter.emit(a.RECORDER_STATE_CHANGED,this.state))}},r.prototype.setRecordingJibri=function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};e===this.state&&n(s.INVALID_STATE);var a=$iq({to:this.focusMucJid,type:"set"}).c("jibri",{xmlns:"http://jitsi.org/protocol/jibri",action:e===r.status.ON?r.action.START:r.action.STOP,streamid:i.streamId}).up();o.log("Set jibri recording: "+e,a.nodeTree),o.log(a.nodeTree),this.connection.sendIQ(a,function(e){o.log("Result",e);var n=$(e).find("jibri");t(n.attr("state"),n.attr("url"))},function(e){o.log("Failed to start recording, error: ",e),n(e)})},r.prototype.setRecordingJirecon=function(e,t,n){e===this.state&&n(new Error("Invalid state!"));var i=$iq({to:this.jirecon,type:"set"}).c("recording",{xmlns:"http://jitsi.org/protocol/jirecon",action:e===r.status.ON?r.action.START:r.action.STOP,mucjid:this.roomjid});e===r.status.OFF&&i.attrs({rid:this.jireconRid}),o.log("Start recording");var a=this;this.connection.sendIQ(i,function(n){a.jireconRid=$(n).find("recording").attr("rid"),o.log("Recording "+(e===r.status.ON?"started":"stopped")+"(jirecon)"+n),a.state=e,e===r.status.OFF&&(a.jireconRid=null),t(e)},function(e){o.log("Failed to start recording, error: ",e),n(e)})},r.prototype.setRecordingColibri=function(e,t,n,r){var i=$iq({to:this.focusMucJid,type:"set"});i.c("conference",{xmlns:"http://jitsi.org/protocol/colibri"}),i.c("recording",{state:e,token:r.token});var a=this;this.connection.sendIQ(i,function(n){o.log('Set recording "',e,'". Result:',n);var r=$(n).find(">conference>recording"),i=r.attr("state");a.state=i,t(i),"pending"===i&&a.connection.addHandler(function(e){var n=$(e).find("recording").attr("state");n&&(a.state=i,t(n))},"http://jitsi.org/protocol/colibri","iq",null,null,null)},function(e){o.warn(e),n(e)})},r.prototype.setRecording=function(){switch(this.type){case r.types.JIRECON:this.setRecordingJirecon.apply(this,arguments);break;case r.types.COLIBRI:this.setRecordingColibri.apply(this,arguments);break;case r.types.JIBRI:this.setRecordingJibri.apply(this,arguments);break;default:var e="Unknown recording type!";c.callErrorHandler(new Error(e)),o.error(e)}},r.prototype.toggleRecording=function(e,t){var n=this.state;if(n===r.status.UNAVAILABLE||n===r.status.FAILED?t(r.status.FAILED,s.RECORDER_UNAVAILABLE):n===r.status.BUSY&&t(r.status.BUSY,s.RECORDER_BUSY),(n===r.status.OFF||n===r.status.AVAILABLE)&&(!e.token&&this.type===r.types.COLIBRI||!e.streamId&&this.type===r.types.JIBRI))return t(r.status.FAILED,s.NO_TOKEN),void o.error("No token passed!");var i=n===r.status.AVAILABLE||n===r.status.OFF?r.status.ON:r.status.OFF,a=this;o.log("Toggle recording (old state, new state): ",n,i),this.setRecording(i,function(e,r){e&&e!==n&&(a.state=e,a.url=r,t(e))},function(e){return t(r.status.FAILED,e)},e)},r.prototype.isSupported=function(){return this._isSupported},r.prototype.getState=function(){return this.state},r.prototype.getURL=function(){return this.url}}).call(t,"modules/xmpp/recording.js")},function(e,t,n){"use strict";(function(e){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(0),s=(n.n(a),n(120)),c=n(20),u=n(7),l=n.n(u),d=function(){function e(e,t){for(var n=0;nx[xmlns="http://jabber.org/protocol/muc#user"]>status[code="201"]').length&&n.createNonAnonymousRoom(),n.onPresence(e),!0):void 0}},{key:"onPresenceUnavailable",value:function(e){var t=e.getAttribute("from"),n=this.rooms[Strophe.getBareJidFromJid(t)];if(n)return n.onPresenceUnavailable(e,t),!0}},{key:"onPresenceError",value:function(e){var t=e.getAttribute("from"),n=this.rooms[Strophe.getBareJidFromJid(t)];if(n)return n.onPresenceError(e,t),!0}},{key:"onMessage",value:function(e){var t=e.getAttribute("from"),n=this.rooms[Strophe.getBareJidFromJid(t)];if(n)return n.onMessage(e,t),!0}},{key:"onMute",value:function(e){var t=e.getAttribute("from"),n=this.rooms[Strophe.getBareJidFromJid(t)];if(n)return n.onMute(e),!0}}]),t}(c.b);t.a=function(e){Strophe.addConnectionPlugin("emuc",new h(e))}}).call(t,"modules/xmpp/strophe.emuc.js")},function(e,t,n){"use strict";(function(e){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e,t,n){Strophe.addConnectionPlugin("jingle",new S(e,t,n))}t.a=a;var s=n(0),c=(n.n(s),n(122)),u=n(7),l=n.n(u),d=n(3),p=n.n(d),f=n(19),h=n.n(f),m=n(6),v=n(20),y=function(){function e(e,t){for(var n=0;nstartmuted");if(s&&s.length>0){var u=s.attr("audio"),d=s.attr("video");this.eventEmitter.emit(l.a.START_MUTED_FROM_FOCUS,"true"===u,"true"===d)}var f="focus"!==Strophe.getResourceFromJid(r);b.info("Marking session from "+r+" as "+(f?"":"*not*")+" P2P"),o=new c.a($(e).find("jingle").attr("sid"),$(e).attr("to"),r,this.connection,this.mediaConstraints,f?this.p2pIceConfig:this.jvbIceConfig,f,!1,this.xmpp.options),this.sessions[o.sid]=o,this.eventEmitter.emit(l.a.CALL_INCOMING,o,$(e).find(">jingle"),a),m.a.analytics.sendEvent("xmpp.session-initiate",{value:a});break;case"session-accept":this.eventEmitter.emit(l.a.CALL_ACCEPTED,o,$(e).find(">jingle"));break;case"content-modify":o.modifyContents($(e).find(">jingle"));break;case"transport-info":this.eventEmitter.emit(l.a.TRANSPORT_INFO,o,$(e).find(">jingle"));break;case"session-terminate":b.log("terminating...",o.sid);var h=null,v=null;$(e).find(">jingle>reason").length&&(h=$(e).find(">jingle>reason>:first")[0].tagName,v=$(e).find(">jingle>reason>text").text()),this.terminate(o.sid,h,v),this.eventEmitter.emit(l.a.CALL_ENDED,o,h,v);break;case"transport-replace":b.info("(TIME) Start transport replace",a),m.a.analytics.sendEvent("xmpp.transport-replace.start",{value:a}),o.replaceTransport($(e).find(">jingle"),function(){var e=window.performance.now();b.info("(TIME) Transport replace success!",e),m.a.analytics.sendEvent("xmpp.transport-replace.success",{value:e})},function(e){p.a.callErrorHandler(e),b.error("Transport replace failed",e),o.sendTransportReject()});break;case"addsource":case"source-add":o.addRemoteStream($(e).find(">jingle>content"));break;case"removesource":case"source-remove":o.removeRemoteStream($(e).find(">jingle>content"));break;default:b.warn("jingle action not implemented",n),i.attrs({type:"error"}),i.c("error",{type:"cancel"}).c("bad-request",{xmlns:"urn:ietf:params:xml:ns:xmpp-stanzas"}).up()}return this.connection.send(i),!0}},{key:"newP2PJingleSession",value:function(e,t){var n=new c.a(h.a.randomHexString(12),e,t,this.connection,this.mediaConstraints,this.p2pIceConfig,!0,!0,this.xmpp.options);return this.sessions[n.sid]=n,n}},{key:"terminate",value:function(e,t,n){this.sessions.hasOwnProperty(e)&&("ended"!==this.sessions[e].state&&this.sessions[e].onTerminated(t,n),delete this.sessions[e])}},{key:"getStunAndTurnCredentials",value:function(){var e=this;this.connection.sendIQ($iq({type:"get",to:this.connection.domain}).c("services",{xmlns:"urn:xmpp:extdisco:1"}).c("service",{host:"turn."+this.connection.domain}),function(t){var n=[];$(t).find(">services>service").each(function(e,t){t=$(t);var r={},i=t.attr("type");switch(i){case"stun":r.url="stun:"+t.attr("host"),t.attr("port")&&(r.url+=":"+t.attr("port")),n.push(r);break;case"turn":case"turns":r.url=i+":";var o=t.attr("username");o&&(navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./)&&parseInt(navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./)[2],10)<28?r.url+=o+"@":r.username=o),r.url+=t.attr("host");var a=t.attr("port");a&&"3478"!==a&&(r.url+=":"+t.attr("port"));var s=t.attr("transport");s&&"udp"!==s&&(r.url+="?transport="+s),r.credential=t.attr("password")||r.credential,n.push(r)}});var r=e.xmpp.options;r.useStunTurn&&(e.jvbIceConfig.iceServers=n),r.p2p&&r.p2p.useStunTurn&&(e.p2pIceConfig.iceServers=n)},function(e){b.warn("getting turn credentials failed",e),b.warn("is mod_turncredentials or similar installed?")})}},{key:"getLog",value:function(){var e=this,t={};return Object.keys(this.sessions).forEach(function(n){var r=e.sessions[n],i=r.peerconnection;i&&i.updateLog&&(t["jingle_"+n]={updateLog:i.updateLog,stats:i.stats,url:window.location.href})}),t}}]),t}(v.a)}).call(t,"modules/xmpp/strophe.jingle.js")},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(20),s=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:1e4;if(this.intervalId){var r="Ping task scheduled already";return u.a.callErrorHandler(new Error(r)),void p.error(r)}this.intervalId=window.setInterval(function(){t.ping(e,function(){t.failedPings=0},function(e){t.failedPings+=1;var n="Ping "+(e?"error":"timeout");t.failedPings>=3?(u.a.callErrorHandler(new Error(n)),p.error(n,e)):p.warn(n,e)},15e3)},n),p.info("XMPP pings will be sent every "+n+" ms")}},{key:"stopInterval",value:function(){this.intervalId&&(window.clearInterval(this.intervalId),this.intervalId=null,this.failedPings=0,p.info("Ping interval cleared"))}}]),t}(s.a);t.a=function(e){Strophe.addConnectionPlugin("ping",new f(e))}}).call(t,"modules/xmpp/strophe.ping.js")},function(e,t,n){"use strict";(function(e){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(0),s=(n.n(a),n(20)),c=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"/http-bind";return e&&(t+=(-1===t.indexOf("?")?"?":"&")+"token="+e),new Strophe.Connection(t)}var s=n(0),c=(n.n(s),n(19)),u=n.n(c),l=n(43),d=n(27),p=n(1),f=n(129),h=n(130),m=n(134),v=n(132),y=n(133),g=n(131),b=n(10),S=n(119),E=function(){function e(e,t){for(var n=0;n=500&&u<600?this.eventEmitter.emit(d.CONNECTION_FAILED,l.SERVER_ERROR,c||"server-error"):this.eventEmitter.emit(d.CONNECTION_FAILED,l.CONNECTION_DROPPED_ERROR,c||"connection-dropped-error")}}else t===Strophe.Status.AUTHFAIL&&this.eventEmitter.emit(d.CONNECTION_FAILED,l.PASSWORD_REQUIRED)}},{key:"_connect",value:function(e,t){this.anonymousConnectionFailed=!1,this.connectionFailed=!1,this.lastErrorMsg=void 0,this.connection.connect(e,t,this.connectionHandler.bind(this,t))}},{key:"attach",value:function(e){var t=this.connectionTimes.attaching=window.performance.now();T.log("(TIME) Strophe Attaching\t:"+t),this.connection.attach(e.jid,e.sid,parseInt(e.rid,10)+1,this.connectionHandler.bind(this,e.password))}},{key:"connect",value:function(e,t){if(this.connectParams={jid:e,password:t},!e){var n=this.options.hosts,r=n.anonymousdomain,i=n.domain,o=r||i,a=window,s=a.location;if(r){var c=s&&s.search;(c&&-1!==c.indexOf("login=true")||this.token)&&(o=i)}e=o||s&&s.hostname}return this._connect(e,t)}},{key:"createRoom",value:function(e,t){var n=Strophe.getNodeFromJid(this.connection.jid),r=e+"@"+this.options.hosts.muc+"/",i=t.useNicks&&t.nick?t.nick:null;return i?n=t.nick:this.authenticatedUser||(n=n.substr(0,8)),(this.authenticatedUser||null!==i)&&(n+="-"+u.a.randomHexString(6)),r+=n,this.connection.emuc.createRoom(r,null,t)}},{key:"getJingleLog",value:function(){var e=this.connection.jingle;return e?e.getLog():{}}},{key:"getXmppLog",value:function(){return(this.connection.logger||{}).log||null}},{key:"dial",value:function(){var e;(e=this.connection.rayo).dial.apply(e,arguments)}},{key:"setMute",value:function(e,t){this.connection.moderate.setMute(e,t)}},{key:"eject",value:function(e){this.connection.moderate.eject(e)}},{key:"getSessions",value:function(){return this.connection.jingle.sessions}},{key:"disconnect",value:function(e){if(this.disconnectInProgress||!this.connection||!this.connection.connected)return void this.eventEmitter.emit(d.WRONG_STATE);if(this.disconnectInProgress=!0,this.connection.flush(),null!==e&&void 0!==e){var t=e.type;"beforeunload"!==t&&"unload"!==t||(this.connection.options.sync=!0)}this.connection.disconnect(),!0!==this.connection.options.sync&&this.connection.flush()}},{key:"_initStrophePlugins",value:function(){var e=[{urls:"stun:stun.l.google.com:19302"},{urls:"stun:stun1.l.google.com:19302"},{urls:"stun:stun2.l.google.com:19302"}],t=this.options.p2p&&this.options.p2p.stunServers||e;n.i(f.a)(this),n.i(h.a)(this,this.eventEmitter,t),n.i(m.a)(),n.i(v.a)(this),n.i(y.a)(),n.i(g.a)()}}]),t}(b.a);t.a=_}).call(t,"modules/xmpp/xmpp.js")},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(10),s=function(){function e(e,t){for(var n=0;n3||!n.media.every(function(e){return-1!==["video","audio","data"].indexOf(e.mid)}))return console.warn("This description does not look like Plan B."),e;var r=[];n.media.forEach(function(e){r.push(e.mid)});var s=!1;if(void 0!==n.groups&&Array.isArray(n.groups)&&(s=n.groups.every(function(e){return"BUNDLE"!==e.type||a.apply(e.mids.sort(),[r.sort()])})),!s)throw new Error("Cannot convert to Unified Plan because m-lines that are not bundled were found.");var c;void 0!==this.cache[e.type]&&(c=o.parse(this.cache[e.type]));var u={audio:{},video:{}},l={},d=0,p=0;if(n.media.forEach(function(n){if(("string"!=typeof n.rtcpMux||"rtcp-mux"!==n.rtcpMux)&&"inactive"!==n.direction)throw new Error("Cannot convert to Unified Plan because m-lines without the rtcp-mux attribute were found.");if("application"===n.type)return void(l[n.mid]=n);var r=n.sources,o=n.ssrcGroups,a=n.candidates,s=n.iceUfrag,f=n.icePwd,h=n.fingerprint,m=n.port;delete n.sources,delete n.ssrcGroups,delete n.candidates,delete n.iceUfrag,delete n.icePwd,delete n.fingerprint,delete n.port,delete n.mid;var v={};void 0!==o&&Array.isArray(o)&&o.forEach(function(e){"SIM"!==e.semantics&&void 0!==e.ssrcs&&Array.isArray(e.ssrcs)&&e.ssrcs.forEach(function(t){void 0===v[t]&&(v[t]=[]),v[t].push(e)})});var y={};"object"===(void 0===r?"undefined":i(r))&&Object.keys(r).forEach(function(o){var g;if("offer"===e.type&&!r[o].msid)return void(u[n.type][o]=r[o]);if(void 0!==v[o]&&Array.isArray(v[o])&&v[o].some(function(e){return e.ssrcs.some(function(e){if("object"===i(y[e]))return g=y[e],!0})}),"object"===(void 0===g?"undefined":i(g)))g.sources[o]=r[o],delete r[o].msid;else{if(g=Object.create(n),y[o]=g,void 0!==r[o].msid&&(g.msid=r[o].msid,delete r[o].msid),g.sources={},g.sources[o]=r[o],g.ssrcGroups=v[o],void 0!==c&&void 0!==c.media&&Array.isArray(c.media)&&c.media.forEach(function(e){"object"===i(e.sources)&&Object.keys(e.sources).forEach(function(t){t===o&&(g.mid=e.mid)})}),void 0===g.mid){if("answer"===e.type)throw new Error("An unmapped SSRC was found.");g.mid=[n.type,"-",o].join("")}g.candidates=a,g.iceUfrag=s,g.icePwd=f,g.fingerprint=h,g.port=m,l[g.mid]=g,t.cache.mlU2BMap[p]=d,void 0===t.cache.mlB2UMap[d]&&(t.cache.mlB2UMap[d]=p),p++}}),d++}),n.media=[],r=[],"answer"===e.type)for(var f=0;f0&&null===(r=t.getFirstSendingIndexFromAnswer(e)))for(var i=0;ir){var o=n.media[r];Object.keys(u[e]).forEach(function(t){o.sources&&o.sources[t]&&console.warn("Replacing an existing SSRC."),o.sources||(o.sources={}),o.sources[t]=u[e][t]})}}}),n.groups.some(function(e){if("BUNDLE"===e.type)return e.mids=r.join(" "),!0}),n.msidSemantic={semantic:"WMS",token:"*"};var m=o.write(n);return this.cache[e.type]=m,new RTCSessionDescription({type:e.type,sdp:m})}},function(e,t,n){var r=n(13);t.write=function(e,t){return void 0!==e&&void 0!==e.media&&Array.isArray(e.media)&&e.media.forEach(function(e){void 0!==e.sources&&0!==Object.keys(e.sources).length&&(e.ssrcs=[],Object.keys(e.sources).forEach(function(t){var n=e.sources[t];Object.keys(n).forEach(function(r){e.ssrcs.push({id:t,attribute:r,value:n[r]})})}),delete e.sources),void 0!==e.ssrcGroups&&Array.isArray(e.ssrcGroups)&&e.ssrcGroups.forEach(function(e){void 0!==e.ssrcs&&Array.isArray(e.ssrcs)&&(e.ssrcs=e.ssrcs.join(" "))})}),void 0!==e&&void 0!==e.groups&&Array.isArray(e.groups)&&e.groups.forEach(function(e){void 0!==e.mids&&Array.isArray(e.mids)&&(e.mids=e.mids.join(" "))}),r.write(e,t)},t.parse=function(e){var t=r.parse(e);return void 0!==t&&void 0!==t.media&&Array.isArray(t.media)&&t.media.forEach(function(e){void 0!==e.ssrcs&&Array.isArray(e.ssrcs)&&(e.sources={},e.ssrcs.forEach(function(t){e.sources[t.id]||(e.sources[t.id]={}),e.sources[t.id][t.attribute]=t.value}),delete e.ssrcs),void 0!==e.ssrcGroups&&Array.isArray(e.ssrcGroups)&&e.ssrcGroups.forEach(function(e){"string"==typeof e.ssrcs&&(e.ssrcs=e.ssrcs.split(" "))})}),void 0!==t&&void 0!==t.groups&&Array.isArray(t.groups)&&t.groups.forEach(function(e){"string"==typeof e.mids&&(e.mids=e.mids.split(" "))}),t}},function(e,t,n){function r(e,t,n){return e.ssrcs.filter(function(e){return e.id===t}).filter(function(e){return e.attribute===n}).map(function(e){return e.value})[0]}function i(e){this.options=e||{},this.options.numOfLayers||(this.options.numOfLayers=v),console.log("SdpSimulcast: using "+this.options.numOfLayers+" layers"),this.ssrcCache=[]}function o(){return Math.floor(4294967295*Math.random())+0}function a(e,t){null!=e&&Array.isArray(e.media)&&e.media.forEach(function(e){"video"===e.type&&t(e)})}function s(e){return e&&null!=e&&e.type&&""!=e.type&&e.sdp&&""!=e.sdp}function c(e){if(e&&Array.isArray(e.ssrcGroups))for(var t=h(e),n=[],r=e.ssrcGroups.length;r--;)if("SIM"===e.ssrcGroups[r].semantics){for(var i=e.ssrcGroups[r].ssrcs.split(" "),o=0;o2)return e;if(2==n&&0===r)return e;if(1===n)t=e.ssrcs[0].id;else{var i=e.ssrcGroups.filter(function(e){return"FID"===e.semantics})[0];if(!i)return e;t=parseInt(i.ssrcs.split(" ")[0])}return console.log("SdpSimulcast: current ssrc cache: ",this.ssrcCache),console.log("SdpSimulcast: parsed primary ssrc "+t),-1!==this.ssrcCache.indexOf(t)?(console.log("SdpSimulcast: Have seen primary ssrc before, filling in data from cache"),e=this._fillInSourceDataFromCache(e)):(console.log("SdpSimulcast: Have not seen primary ssrc before, generating source data"),e=this._generateSourceData(e,t)),this.ssrcCache=this._parseSimLayers(e),e},i.prototype.mungeRemoteDescription=function(e){if(!s(e))return e;var t=p.parse(e.sdp),n=this;return a(t,function(e){n.options.explodeRemoteSimulcast?c(e):u(e),n.ssrcCache.length<1?l(e):d(e)}),new RTCSessionDescription({type:e.type,sdp:p.write(t)})},i.prototype.mungeLocalDescription=function(e){if(!s(e))return e;var t=p.parse(e.sdp),n=this;return a(t,function(e){"recvonly"!=e.direction&&"inactive"!=e.direction&&n._restoreSimulcast(e)}),new RTCSessionDescription({type:e.type,sdp:p.write(t)})},e.exports=i},function(e,t){t.writeSsrcs=function(e,t){var n=[];if(void 0!==e&&0!==Object.keys(e).length){Array.isArray(t)||(t=[]);for(var r=0;r=0)){var i=e[r];Object.keys(i).forEach(function(e){n.push({id:r,attribute:e,value:i[e]})})}})}return n},t.parseSsrcs=function(e){var t={};return void 0!==e.ssrcs&&Array.isArray(e.ssrcs)&&e.ssrcs.forEach(function(e){t[e.id]||(t[e.id]={}),t[e.id][e.attribute]=e.value}),t}},function(e,t,n){var r=function(e){return String(Number(e))===e?Number(e):e},i=function(e){function t(t,n,r,i){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(e,t,n,i){if(i&&!n)t[i]=r(e[1]);else for(var o=0;o=r)return e;var i=n[t];switch(t+=1,e){case"%%":return"%";case"%s":return String(i);case"%d":return Number(i);case"%v":return""}})},a=function(e,t,n){var r=t.format instanceof Function?t.format(t.push?n:n[t.name]):t.format,i=[e+"="+r];if(t.names)for(var a=0;a=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(146),t.setImmediate=setImmediate,t.clearImmediate=clearImmediate},function(e,t){function n(e,t){var n=[];t=t||0;for(var r=t||0;r=55296&&t<=56319&&i65535&&(t-=65536,i+=T(t>>>10&1023|55296),t=56320|1023&t),i+=T(t);return i}function u(e){if(e>=55296&&e<=57343)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value")}function l(e,t){return T(e>>t&63|128)}function d(e){if(0==(4294967168&e))return T(e);var t="";return 0==(4294965248&e)?t=T(e>>6&31|192):0==(4294901760&e)?(u(e),t=T(e>>12&15|224),t+=l(e,6)):0==(4292870144&e)&&(t=T(e>>18&7|240),t+=l(e,12),t+=l(e,6)),t+=T(63&e|128)}function p(e){for(var t,n=s(e),r=n.length,i=-1,o="";++i=S)throw Error("Invalid byte index");var e=255&b[E];if(E++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function h(){var e,t,n,r,i;if(E>S)throw Error("Invalid byte index");if(E==S)return!1;if(e=255&b[E],E++,0==(128&e))return e;if(192==(224&e)){var t=f();if((i=(31&e)<<6|t)>=128)return i;throw Error("Invalid continuation byte")}if(224==(240&e)){if(t=f(),n=f(),(i=(15&e)<<12|t<<6|n)>=2048)return u(i),i;throw Error("Invalid continuation byte")}if(240==(248&e)&&(t=f(),n=f(),r=f(),(i=(15&e)<<18|t<<12|n<<6|r)>=65536&&i<=1114111))return i;throw Error("Invalid UTF-8 detected")}function m(e){b=s(e),S=b.length,E=0;for(var t,n=[];!1!==(t=h());)n.push(t);return c(n)}var v="object"==o(t)&&t,y="object"==o(e)&&e&&e.exports==v&&e,g="object"==(void 0===r?"undefined":o(r))&&r;g.global!==g&&g.window!==g||(a=g);var b,S,E,T=String.fromCharCode,_={version:"2.0.0",encode:p,decode:m};if("object"==o(n(25))&&n(25))void 0!==(i=function(){return _}.call(t,n,t,e))&&(e.exports=i);else if(v&&!v.nodeType)if(y)y.exports=_;else{var C={},w=C.hasOwnProperty;for(var R in _)w.call(_,R)&&(v[R]=_[R])}else a.utf8=_}(this)}).call(t,n(58)(e),n(2))},function(e,t,n){e.exports={EventTarget:n(152),Event:n(151)}},function(e,t,n){(function(t){e.exports=t.Event}).call(t,n(2))},function(e,t){function n(){this._listeners={}}Object.defineProperties(n.prototype,{listeners:{get:function(){return this._listeners}}}),n.prototype.addEventListener=function(e,t){var n,r,i;if(e&&t){for(n=this._listeners[e],void 0===n&&(this._listeners[e]=n=[]),r=0;i=n[r];r++)if(i===t)return;n.push(t)}},n.prototype.removeEventListener=function(e,t){var n,r,i;if(e&&t&&void 0!==(n=this._listeners[e])){for(r=0;i=n[r];r++)if(i===t){n.splice(r,1);break}0===n.length&&delete this._listeners[e]}},n.prototype.dispatchEvent=function(e){var t,n,r,i,o,a=!1;if(!e||"string"!=typeof e.type)throw new Error("`event` must have a valid `type` property");e._yaeti&&(e.target=this,e.cancelable=!0);try{e.stopImmediatePropagation=function(){a=!0}}catch(e){}if(t=e.type,n=this._listeners[t]||[],"function"==typeof(r=this["on"+t]))try{r.call(this,e)}catch(e){console.error(e)}for(i=0;(o=n[i])&&!a;i++)try{o.call(this,e)}catch(e){console.error(e)}return!e.defaultPrevented},e.exports=n},function(e,t){function n(e,t,n){function i(e,r){if(i.count<=0)throw new Error("after called too many times");--i.count,e?(o=!0,t(e),t=n):0!==i.count||o||t(null,r)}var o=!1;return n=n||r,i.count=e,0===e?t():i}function r(){}e.exports=n},function(e,t){!function(e){"use strict";t.encode=function(t){var n,r=new Uint8Array(t),i=r.length,o="";for(n=0;n>2],o+=e[(3&r[n])<<4|r[n+1]>>4],o+=e[(15&r[n+1])<<2|r[n+2]>>6],o+=e[63&r[n+2]];return i%3==2?o=o.substring(0,o.length-1)+"=":i%3==1&&(o=o.substring(0,o.length-2)+"=="),o},t.decode=function(t){var n,r,i,o,a,s=.75*t.length,c=t.length,u=0;"="===t[t.length-1]&&(s--,"="===t[t.length-2]&&s--);var l=new ArrayBuffer(s),d=new Uint8Array(l);for(n=0;n>4,d[u++]=(15&i)<<4|o>>2,d[u++]=(3&o)<<6|63&a;return l}}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")},function(e,t,n){function r(){return t.colors[l++%t.colors.length]}function i(e){function n(){}function i(){var e=i,n=+new Date,o=n-(u||n);e.diff=o,e.prev=u,e.curr=n,u=n,null==e.useColors&&(e.useColors=t.useColors()),null==e.color&&e.useColors&&(e.color=r());var a=Array.prototype.slice.call(arguments);a[0]=t.coerce(a[0]),"string"!=typeof a[0]&&(a=["%o"].concat(a));var s=0;a[0]=a[0].replace(/%([a-z%])/g,function(n,r){if("%%"===n)return n;s++;var i=t.formatters[r];if("function"==typeof i){var o=a[s];n=i.call(e,o),a.splice(s,1),s--}return n}),"function"==typeof t.formatArgs&&(a=t.formatArgs.apply(e,a)),(i.log||t.log||console.log.bind(console)).apply(e,a)}n.enabled=!1,i.enabled=!0;var o=t.enabled(e)?i:n;return o.namespace=e,o}function o(e){t.save(e);for(var n=(e||"").split(/[\s,]+/),r=n.length,i=0;i0&&(this.extraHeaders=n.extraHeaders),this.open()}function i(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}var o=n(61),a=n(36),s=n(9)("engine.io-client:socket"),c=n(41),u=n(18),l=n(63),d=n(165),p=n(38);e.exports=r,r.priorWebsocketSuccess=!1,a(r.prototype),r.protocol=u.protocol,r.Socket=r,r.Transport=n(34),r.transports=n(61),r.parser=n(18),r.prototype.createTransport=function(e){s('creating transport "%s"',e);var t=i(this.query);return t.EIO=u.protocol,t.transport=e,this.id&&(t.sid=this.id),new o[e]({agent:this.agent,hostname:this.hostname,port:this.port,secure:this.secure,path:this.path,query:t,forceJSONP:this.forceJSONP,jsonp:this.jsonp,forceBase64:this.forceBase64,enablesXDR:this.enablesXDR,timestampRequests:this.timestampRequests,timestampParam:this.timestampParam,policyPort:this.policyPort,socket:this,pfx:this.pfx,key:this.key,passphrase:this.passphrase,cert:this.cert,ca:this.ca,ciphers:this.ciphers,rejectUnauthorized:this.rejectUnauthorized,perMessageDeflate:this.perMessageDeflate,extraHeaders:this.extraHeaders})},r.prototype.open=function(){var e;if(this.rememberUpgrade&&r.priorWebsocketSuccess&&-1!=this.transports.indexOf("websocket"))e="websocket";else{if(0===this.transports.length){var t=this;return void setTimeout(function(){t.emit("error","No transports available")},0)}e=this.transports[0]}this.readyState="opening";try{e=this.createTransport(e)}catch(e){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)},r.prototype.setTransport=function(e){s("setting transport %s",e.name);var t=this;this.transport&&(s("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=e,e.on("drain",function(){t.onDrain()}).on("packet",function(e){t.onPacket(e)}).on("error",function(e){t.onError(e)}).on("close",function(){t.onClose("transport close")})},r.prototype.probe=function(e){function t(){if(p.onlyBinaryUpgrades){var t=!this.supportsBinary&&p.transport.supportsBinary;d=d||t}d||(s('probe transport "%s" opened',e),l.send([{type:"ping",data:"probe"}]),l.once("packet",function(t){if(!d)if("pong"==t.type&&"probe"==t.data){if(s('probe transport "%s" pong',e),p.upgrading=!0,p.emit("upgrading",l),!l)return;r.priorWebsocketSuccess="websocket"==l.name,s('pausing current transport "%s"',p.transport.name),p.transport.pause(function(){d||"closed"!=p.readyState&&(s("changing transport and sending upgrade packet"),u(),p.setTransport(l),l.send([{type:"upgrade"}]),p.emit("upgrade",l),l=null,p.upgrading=!1,p.flush())})}else{s('probe transport "%s" failed',e);var n=new Error("probe error");n.transport=l.name,p.emit("upgradeError",n)}}))}function n(){d||(d=!0,u(),l.close(),l=null)}function i(t){var r=new Error("probe error: "+t);r.transport=l.name,n(),s('probe transport "%s" failed because of error: %s',e,t),p.emit("upgradeError",r)}function o(){i("transport closed")}function a(){i("socket closed")}function c(e){l&&e.name!=l.name&&(s('"%s" works - aborting "%s"',e.name,l.name),n())}function u(){l.removeListener("open",t),l.removeListener("error",i),l.removeListener("close",o),p.removeListener("close",a),p.removeListener("upgrading",c)}s('probing transport "%s"',e);var l=this.createTransport(e,{probe:1}),d=!1,p=this;r.priorWebsocketSuccess=!1,l.once("open",t),l.once("error",i),l.once("close",o),this.once("close",a),this.once("upgrading",c),l.open()},r.prototype.onOpen=function(){if(s("socket open"),this.readyState="open",r.priorWebsocketSuccess="websocket"==this.transport.name,this.emit("open"),this.flush(),"open"==this.readyState&&this.upgrade&&this.transport.pause){s("starting upgrade probes");for(var e=0,t=this.upgrades.length;e';o=document.createElement(e)}catch(e){o=document.createElement("iframe"),o.name=i.iframeId,o.src="javascript:0"}o.id=i.iframeId,i.form.appendChild(o),i.iframe=o}var i=this;if(!this.form){var o,a=document.createElement("form"),s=document.createElement("textarea"),l=this.iframeId="eio_iframe_"+this.index;a.className="socketio",a.style.position="absolute",a.style.top="-1000px",a.style.left="-1000px",a.target=l,a.method="POST",a.setAttribute("accept-charset","utf-8"),s.name="d",a.appendChild(s),document.body.appendChild(a),this.form=a,this.area=s}this.form.action=this.uri(),r(),e=e.replace(u,"\\\n"),this.area.value=e.replace(c,"\\n");try{this.form.submit()}catch(e){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"==i.iframe.readyState&&n()}:this.iframe.onload=n}}).call(t,n(2))},function(e,t,n){(function(t){function r(){}function i(e){if(c.call(this,e),t.location){var n="https:"==location.protocol,r=location.port;r||(r=n?443:80),this.xd=e.hostname!=t.location.hostname||r!=e.port,this.xs=e.secure!=n}else this.extraHeaders=e.extraHeaders}function o(e){this.method=e.method||"GET",this.uri=e.uri,this.xd=!!e.xd,this.xs=!!e.xs,this.async=!1!==e.async,this.data=void 0!=e.data?e.data:null,this.agent=e.agent,this.isBinary=e.isBinary,this.supportsBinary=e.supportsBinary,this.enablesXDR=e.enablesXDR,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.extraHeaders=e.extraHeaders,this.create()}function a(){for(var e in o.requests)o.requests.hasOwnProperty(e)&&o.requests[e].abort()}var s=n(35),c=n(62),u=n(36),l=n(21),d=n(9)("engine.io-client:polling-xhr");e.exports=i,e.exports.Request=o,l(i,c),i.prototype.supportsBinary=!0,i.prototype.request=function(e){return e=e||{},e.uri=this.uri(),e.xd=this.xd,e.xs=this.xs,e.agent=this.agent||!1,e.supportsBinary=this.supportsBinary,e.enablesXDR=this.enablesXDR,e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized,e.extraHeaders=this.extraHeaders,new o(e)},i.prototype.doWrite=function(e,t){var n="string"!=typeof e&&void 0!==e,r=this.request({method:"POST",data:e,isBinary:n}),i=this;r.on("success",t),r.on("error",function(e){i.onError("xhr post error",e)}),this.sendXhr=r},i.prototype.doPoll=function(){d("xhr poll");var e=this.request(),t=this;e.on("data",function(e){t.onData(e)}),e.on("error",function(e){t.onError("xhr poll error",e)}),this.pollXhr=e},u(o.prototype),o.prototype.create=function(){var e={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized;var n=this.xhr=new s(e),r=this;try{d("xhr open %s: %s",this.method,this.uri),n.open(this.method,this.uri,this.async);try{if(this.extraHeaders){n.setDisableHeaderCheck(!0);for(var i in this.extraHeaders)this.extraHeaders.hasOwnProperty(i)&&n.setRequestHeader(i,this.extraHeaders[i])}}catch(e){}if(this.supportsBinary&&(n.responseType="arraybuffer"),"POST"==this.method)try{this.isBinary?n.setRequestHeader("Content-type","application/octet-stream"):n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(e){}"withCredentials"in n&&(n.withCredentials=!0),this.hasXDR()?(n.onload=function(){r.onLoad()},n.onerror=function(){r.onError(n.responseText)}):n.onreadystatechange=function(){4==n.readyState&&(200==n.status||1223==n.status?r.onLoad():setTimeout(function(){r.onError(n.status)},0))},d("xhr data %s",this.data),n.send(this.data)}catch(e){return void setTimeout(function(){r.onError(e)},0)}t.document&&(this.index=o.requestsCount++,o.requests[this.index]=this)},o.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},o.prototype.onData=function(e){this.emit("data",e),this.onSuccess()},o.prototype.onError=function(e){this.emit("error",e),this.cleanup(!0)},o.prototype.cleanup=function(e){if(void 0!==this.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=r:this.xhr.onreadystatechange=r,e)try{this.xhr.abort()}catch(e){}t.document&&delete o.requests[this.index],this.xhr=null}},o.prototype.onLoad=function(){var e;try{var t;try{t=this.xhr.getResponseHeader("Content-Type").split(";")[0]}catch(e){}if("application/octet-stream"===t)e=this.xhr.response;else if(this.supportsBinary)try{e=String.fromCharCode.apply(null,new Uint8Array(this.xhr.response))}catch(t){for(var n=new Uint8Array(this.xhr.response),r=[],i=0,o=n.length;i1e4)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return n*l;case"days":case"day":case"d":return n*u;case"hours":case"hour":case"hrs":case"hr":case"h":return n*c;case"minutes":case"minute":case"mins":case"min":case"m":return n*s;case"seconds":case"second":case"secs":case"sec":case"s":return n*a;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n}}}}function r(e){return e>=u?Math.round(e/u)+"d":e>=c?Math.round(e/c)+"h":e>=s?Math.round(e/s)+"m":e>=a?Math.round(e/a)+"s":e+"ms"}function i(e){return o(e,u,"day")||o(e,c,"hour")||o(e,s,"minute")||o(e,a,"second")||e+" ms"}function o(e,t,n){if(!(e0&&t-1 in e))}function r(e,t,n){if(K.isFunction(t))return K.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return K.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(se.test(t))return K.filter(t,e,n);t=K.filter(t,e)}return K.grep(e,function(e){return U.call(t,e)>=0!==n})}function i(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function o(e){var t=pe[e]={};return K.each(e.match(fe)||[],function(e,n){t[n]=!0}),t}function s(){J.removeEventListener("DOMContentLoaded",s,!1),e.removeEventListener("load",s,!1),K.ready()}function a(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=K.expando+a.uid++}function u(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(ye,"-$1").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:ve.test(n)?K.parseJSON(n):n)}catch(e){}me.set(e,t,n)}else n=void 0;return n}function l(){return!0}function c(){return!1}function f(){try{return J.activeElement}catch(e){}}function p(e,t){return K.nodeName(e,"table")&&K.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function d(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function h(e){var t=He.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function g(e,t){for(var n=0,r=e.length;n")).appendTo(t.documentElement),t=Pe[0].contentDocument,t.write(),t.close(),n=x(e,t),Pe.detach()),Re[e]=n),n}function w(e,t,n){var r,i,o,s,a=e.style;return n=n||$e(e),n&&(s=n.getPropertyValue(t)||n[t]),n&&(""!==s||K.contains(e.ownerDocument,e)||(s=K.style(e,t)),We.test(s)&&Me.test(t)&&(r=a.width,i=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=r,a.minWidth=i,a.maxWidth=o)),void 0!==s?s+"":s}function T(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function C(e,t){if(t in e)return t;for(var n=t[0].toUpperCase()+t.slice(1),r=t,i=Ue.length;i--;)if((t=Ue[i]+n)in e)return t;return r}function N(e,t,n){var r=Be.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function k(e,t,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===t?1:0,s=0;o<4;o+=2)"margin"===n&&(s+=K.css(e,n+be[o],!0,i)),r?("content"===n&&(s-=K.css(e,"padding"+be[o],!0,i)),"margin"!==n&&(s-=K.css(e,"border"+be[o]+"Width",!0,i))):(s+=K.css(e,"padding"+be[o],!0,i),"padding"!==n&&(s+=K.css(e,"border"+be[o]+"Width",!0,i)));return s}function E(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=$e(e),s="border-box"===K.css(e,"boxSizing",!1,o);if(i<=0||null==i){if(i=w(e,t,o),(i<0||null==i)&&(i=e.style[t]),We.test(i))return i;r=s&&(Q.boxSizingReliable()||i===e.style[t]),i=parseFloat(i)||0}return i+k(e,t,n||(s?"border":"content"),r,o)+"px"}function S(e,t){for(var n,r,i,o=[],s=0,a=e.length;s=0&&n=0},isPlainObject:function(e){return"object"===K.type(e)&&!e.nodeType&&!K.isWindow(e)&&!(e.constructor&&!G.call(e.constructor.prototype,"isPrototypeOf"))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?V[Y.call(e)]||"object":typeof e},globalEval:function(e){var t,n=eval;(e=K.trim(e))&&(1===e.indexOf("use strict")?(t=J.createElement("script"),t.text=e,J.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(ee,"ms-").replace(te,ne)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,r){var i=0,o=e.length,s=n(e);if(r){if(s)for(;ib.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[R]=!0,e}function i(e){var t=A.createElement("div");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=e.length;r--;)b.attrHandle[n[r]]=t}function s(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||X)-(~e.sourceIndex||X);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function a(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),s=o.length;s--;)n[i=o[s]]&&(n[i]=!(r[i]=n[i]))})})}function u(e){return e&&void 0!==e.getElementsByTagName&&e}function l(){}function c(e){for(var t=0,n=e.length,r="";t1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function d(e,n,r){for(var i=0,o=n.length;i-1&&(r[l]=!(s[l]=f))}}else x=h(x===s?x.splice(m,x.length):x),o?o(null,s,x,u):Q.apply(s,x)})}function m(e){for(var t,n,r,i=e.length,o=b.relative[e[0].type],s=o||b.relative[" "],a=o?1:0,u=f(function(e){return e===t},s,!0),l=f(function(e){return K(t,e)>-1},s,!0),d=[function(e,n,r){var i=!o&&(r||n!==E)||((t=n).nodeType?u(e,n,r):l(e,n,r));return t=null,i}];a1&&p(d),a>1&&c(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(se,"$1"),n,a0,o=e.length>0,s=function(r,s,a,u,l){var c,f,p,d=0,g="0",m=r&&[],v=[],y=E,x=r||o&&b.find.TAG("*",l),w=W+=null==y?1:Math.random()||.1,T=x.length;for(l&&(E=s!==A&&s);g!==T&&null!=(c=x[g]);g++){if(o&&c){for(f=0;p=e[f++];)if(p(c,s,a)){u.push(c);break}l&&(W=w)}i&&((c=!p&&c)&&d--,r&&m.push(c))}if(d+=g,i&&g!==d){for(f=0;p=n[f++];)p(m,v,s,a);if(r){if(d>0)for(;g--;)m[g]||v[g]||(v[g]=Y.call(u));v=h(v)}Q.apply(u,v),l&&!r&&v.length>0&&d+n.length>1&&t.uniqueSort(u)}return l&&(W=w,E=y),m};return i?r(s):s}var y,x,b,w,T,C,N,k,E,S,D,j,A,L,q,H,O,F,P,R="sizzle"+1*new Date,M=e.document,W=0,$=0,I=n(),B=n(),_=n(),z=function(e,t){return e===t&&(D=!0),0},X=-2147483648,U={}.hasOwnProperty,V=[],Y=V.pop,G=V.push,Q=V.push,J=V.slice,K=function(e,t){for(var n=0,r=e.length;n+~]|"+ee+")"+ee+"*"),le=new RegExp("="+ee+"*([^\\]'\"]*?)"+ee+"*\\]","g"),ce=new RegExp(ie),fe=new RegExp("^"+ne+"$"),pe={ID:new RegExp("^#("+te+")"),CLASS:new RegExp("^\\.("+te+")"),TAG:new RegExp("^("+te.replace("w","w*")+")"),ATTR:new RegExp("^"+re),PSEUDO:new RegExp("^"+ie),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ee+"*(even|odd|(([+-]|)(\\d*)n|)"+ee+"*(?:([+-]|)"+ee+"*(\\d+)|))"+ee+"*\\)|)","i"),bool:new RegExp("^(?:"+Z+")$","i"),needsContext:new RegExp("^"+ee+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ee+"*((?:-\\d)?\\d*)"+ee+"*\\)|)(?=[^-]|$)","i")},de=/^(?:input|select|textarea|button)$/i,he=/^h\d$/i,ge=/^[^{]+\{\s*\[native \w/,me=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ve=/[+~]/,ye=/'|\\/g,xe=new RegExp("\\\\([\\da-f]{1,6}"+ee+"?|("+ee+")|.)","ig"),be=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},we=function(){j()};try{Q.apply(V=J.call(M.childNodes),M.childNodes),V[M.childNodes.length].nodeType}catch(e){Q={apply:V.length?function(e,t){G.apply(e,J.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}x=t.support={},T=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},j=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:M;return r!==A&&9===r.nodeType&&r.documentElement?(A=r,L=r.documentElement,n=r.defaultView,n&&n!==n.top&&(n.addEventListener?n.addEventListener("unload",we,!1):n.attachEvent&&n.attachEvent("onunload",we)),q=!T(r),x.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),x.getElementsByTagName=i(function(e){return e.appendChild(r.createComment("")),!e.getElementsByTagName("*").length}),x.getElementsByClassName=ge.test(r.getElementsByClassName),x.getById=i(function(e){return L.appendChild(e).id=R,!r.getElementsByName||!r.getElementsByName(R).length}),x.getById?(b.find.ID=function(e,t){if(void 0!==t.getElementById&&q){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},b.filter.ID=function(e){var t=e.replace(xe,be);return function(e){return e.getAttribute("id")===t}}):(delete b.find.ID,b.filter.ID=function(e){var t=e.replace(xe,be);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),b.find.TAG=x.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):x.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=x.getElementsByClassName&&function(e,t){if(q)return t.getElementsByClassName(e)},O=[],H=[],(x.qsa=ge.test(r.querySelectorAll))&&(i(function(e){L.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&H.push("[*^$]="+ee+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||H.push("\\["+ee+"*(?:value|"+Z+")"),e.querySelectorAll("[id~="+R+"-]").length||H.push("~="),e.querySelectorAll(":checked").length||H.push(":checked"),e.querySelectorAll("a#"+R+"+*").length||H.push(".#.+[+~]")}),i(function(e){var t=r.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&H.push("name"+ee+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||H.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),H.push(",.*:")})),(x.matchesSelector=ge.test(F=L.matches||L.webkitMatchesSelector||L.mozMatchesSelector||L.oMatchesSelector||L.msMatchesSelector))&&i(function(e){x.disconnectedMatch=F.call(e,"div"),F.call(e,"[s!='']:x"),O.push("!=",ie)}),H=H.length&&new RegExp(H.join("|")),O=O.length&&new RegExp(O.join("|")),t=ge.test(L.compareDocumentPosition),P=t||ge.test(L.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},z=t?function(e,t){if(e===t)return D=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!x.sortDetached&&t.compareDocumentPosition(e)===n?e===r||e.ownerDocument===M&&P(M,e)?-1:t===r||t.ownerDocument===M&&P(M,t)?1:S?K(S,e)-K(S,t):0:4&n?-1:1)}:function(e,t){if(e===t)return D=!0,0;var n,i=0,o=e.parentNode,a=t.parentNode,u=[e],l=[t];if(!o||!a)return e===r?-1:t===r?1:o?-1:a?1:S?K(S,e)-K(S,t):0;if(o===a)return s(e,t);for(n=e;n=n.parentNode;)u.unshift(n);for(n=t;n=n.parentNode;)l.unshift(n);for(;u[i]===l[i];)i++;return i?s(u[i],l[i]):u[i]===M?-1:l[i]===M?1:0},r):A},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==A&&j(e),n=n.replace(le,"='$1']"),x.matchesSelector&&q&&(!O||!O.test(n))&&(!H||!H.test(n)))try{var r=F.call(e,n);if(r||x.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return t(n,A,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==A&&j(e),P(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==A&&j(e);var n=b.attrHandle[t.toLowerCase()],r=n&&U.call(b.attrHandle,t.toLowerCase())?n(e,t,!q):void 0;return void 0!==r?r:x.attributes||!q?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(D=!x.detectDuplicates,S=!x.sortStable&&e.slice(0),e.sort(z),D){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return S=null,e},w=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=w(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=w(t);return n},b=t.selectors={cacheLength:50,createPseudo:r,match:pe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(xe,be),e[3]=(e[3]||e[4]||e[5]||"").replace(xe,be),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return pe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&ce.test(n)&&(t=C(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(xe,be).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=I[e+" "];return t||(t=new RegExp("(^|"+ee+")"+e+"("+ee+"|$)"))&&I(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(oe," ")+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,p,d,h,g=o!==s?"nextSibling":"previousSibling",m=t.parentNode,v=a&&t.nodeName.toLowerCase(),y=!u&&!a;if(m){if(o){for(;g;){for(f=t;f=f[g];)if(a?f.nodeName.toLowerCase()===v:1===f.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[s?m.firstChild:m.lastChild],s&&y){for(c=m[R]||(m[R]={}),l=c[e]||[],d=l[0]===W&&l[1],p=l[0]===W&&l[2],f=d&&m.childNodes[d];f=++d&&f&&f[g]||(p=d=0)||h.pop();)if(1===f.nodeType&&++p&&f===t){c[e]=[W,d,p];break}}else if(y&&(l=(t[R]||(t[R]={}))[e])&&l[0]===W)p=l[1];else for(;(f=++d&&f&&f[g]||(p=d=0)||h.pop())&&((a?f.nodeName.toLowerCase()!==v:1!==f.nodeType)||!++p||(y&&((f[R]||(f[R]={}))[e]=[W,p]),f!==t)););return(p-=i)===r||p%r==0&&p/r>=0}}},PSEUDO:function(e,n){var i,o=b.pseudos[e]||b.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[R]?o(n):o.length>1?(i=[e,e,"",n],b.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),s=i.length;s--;)r=K(e,i[s]),e[r]=!(t[r]=i[s])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=N(e.replace(se,"$1"));return i[R]?r(function(e,t,n,r){for(var o,s=i(e,null,r,[]),a=e.length;a--;)(o=s[a])&&(e[a]=!(t[a]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(xe,be),function(t){return(t.textContent||t.innerText||w(t)).indexOf(e)>-1}}),lang:r(function(e){return fe.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(xe,be).toLowerCase(),function(t){var n;do{if(n=q?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===L},focus:function(e){return e===A.activeElement&&(!A.hasFocus||A.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return he.test(e.nodeName)},input:function(e){return de.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:a(function(){return[0]}),last:a(function(e,t){return[t-1]}),eq:a(function(e,t,n){return[n<0?n+t:n]}),even:a(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:a(function(e,t,n){for(var r=n<0?n+t:n;++r2&&"ID"===(s=o[0]).type&&x.getById&&9===t.nodeType&&q&&b.relative[o[1].type]){if(!(t=(b.find.ID(s.matches[0].replace(xe,be),t)||[])[0]))return n;f&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=pe.needsContext.test(e)?0:o.length;i--&&(s=o[i],!b.relative[a=s.type]);)if((l=b.find[a])&&(r=l(s.matches[0].replace(xe,be),ve.test(o[0].type)&&u(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&c(o)))return Q.apply(n,r),n;break}}return(f||N(e,p))(r,t,!q,n,ve.test(e)&&u(t.parentNode)||t),n},x.sortStable=R.split("").sort(z).join("")===R,x.detectDuplicates=!!D,j(),x.sortDetached=i(function(e){return 1&e.compareDocumentPosition(A.createElement("div"))}),i(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),x.attributes&&i(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(Z,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);K.find=re,K.expr=re.selectors,K.expr[":"]=K.expr.pseudos,K.unique=re.uniqueSort,K.text=re.getText,K.isXMLDoc=re.isXML,K.contains=re.contains;var ie=K.expr.match.needsContext,oe=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,se=/^.[^:#\[\.,]*$/;K.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?K.find.matchesSelector(r,e)?[r]:[]:K.find.matches(e,K.grep(t,function(e){return 1===e.nodeType}))},K.fn.extend({find:function(e){var t,n=this.length,r=[],i=this;if("string"!=typeof e)return this.pushStack(K(e).filter(function(){for(t=0;t1?K.unique(r):r),r.selector=this.selector?this.selector+" "+e:e,r},filter:function(e){return this.pushStack(r(this,e||[],!1))},not:function(e){return this.pushStack(r(this,e||[],!0))},is:function(e){return!!r(this,"string"==typeof e&&ie.test(e)?K(e):e||[],!1).length}});var ae,ue=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(K.fn.init=function(e,t){var n,r;if(!e)return this;if("string"==typeof e){if(!(n="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:ue.exec(e))||!n[1]&&t)return!t||t.jquery?(t||ae).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof K?t[0]:t,K.merge(this,K.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:J,!0)),oe.test(n[1])&&K.isPlainObject(t))for(n in t)K.isFunction(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}return r=J.getElementById(n[2]),r&&r.parentNode&&(this.length=1,this[0]=r),this.context=J,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):K.isFunction(e)?void 0!==ae.ready?ae.ready(e):e(K):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),K.makeArray(e,this))}).prototype=K.fn,ae=K(J);var le=/^(?:parents|prev(?:Until|All))/,ce={children:!0,contents:!0,next:!0,prev:!0};K.extend({dir:function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&K(e).is(n))break;r.push(e)}return r},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}}),K.fn.extend({has:function(e){var t=K(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&K.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?K.unique(o):o)},index:function(e){return e?"string"==typeof e?U.call(K(e),this[0]):U.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(K.unique(K.merge(this.get(),K(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),K.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return K.dir(e,"parentNode")},parentsUntil:function(e,t,n){return K.dir(e,"parentNode",n)},next:function(e){return i(e,"nextSibling")},prev:function(e){return i(e,"previousSibling")},nextAll:function(e){return K.dir(e,"nextSibling")},prevAll:function(e){return K.dir(e,"previousSibling")},nextUntil:function(e,t,n){return K.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return K.dir(e,"previousSibling",n)},siblings:function(e){return K.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return K.sibling(e.firstChild)},contents:function(e){return e.contentDocument||K.merge([],e.childNodes)}},function(e,t){K.fn[e]=function(n,r){var i=K.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=K.filter(r,i)),this.length>1&&(ce[e]||K.unique(i),le.test(e)&&i.reverse()),this.pushStack(i)}});var fe=/\S+/g,pe={};K.Callbacks=function(e){e="string"==typeof e?pe[e]||o(e):K.extend({},e);var t,n,r,i,s,a,u=[],l=!e.once&&[],c=function o(c){for(t=e.memory&&c,n=!0,a=i||0,i=0,s=u.length,r=!0;u&&a-1;)u.splice(n,1),r&&(n<=s&&s--,n<=a&&a--)}),this},has:function(e){return e?K.inArray(e,u)>-1:!(!u||!u.length)},empty:function(){return u=[],s=0,this},disable:function(){return u=l=t=void 0,this},disabled:function(){return!u},lock:function(){return l=void 0,t||f.disable(),this},locked:function(){return!l},fireWith:function(e,t){return!u||n&&!l||(t=t||[],t=[e,t.slice?t.slice():t],r?l.push(t):c(t)),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!n}};return f},K.extend({Deferred:function(e){var t=[["resolve","done",K.Callbacks("once memory"),"resolved"],["reject","fail",K.Callbacks("once memory"),"rejected"],["notify","progress",K.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return K.Deferred(function(n){K.each(t,function(t,o){var s=K.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&K.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[o[0]+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?K.extend(e,r):r}},i={};return r.pipe=r.then,K.each(t,function(e,o){var s=o[2],a=o[3];r[o[1]]=s.add,a&&s.add(function(){n=a},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=s.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,o=_.call(arguments),s=o.length,a=1!==s||e&&K.isFunction(e.promise)?s:0,u=1===a?e:K.Deferred(),l=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?_.call(arguments):i,r===t?u.notifyWith(n,r):--a||u.resolveWith(n,r)}};if(s>1)for(t=new Array(s),n=new Array(s),r=new Array(s);i0||(de.resolveWith(J,[K]),K.fn.triggerHandler&&(K(J).triggerHandler("ready"),K(J).off("ready"))))}}),K.ready.promise=function(t){return de||(de=K.Deferred(),"complete"===J.readyState?setTimeout(K.ready):(J.addEventListener("DOMContentLoaded",s,!1),e.addEventListener("load",s,!1))),de.promise(t)},K.ready.promise();var he=K.access=function(e,t,n,r,i,o,s){var a=0,u=e.length,l=null==n;if("object"===K.type(n)){i=!0;for(a in n)K.access(e,t,a,n[a],!0,o,s)}else if(void 0!==r&&(i=!0,K.isFunction(r)||(s=!0),l&&(s?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(K(e),n)})),t))for(;a1,null,!0)},removeData:function(e){return this.each(function(){me.remove(this,e)})}}),K.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=ge.get(e,t),n&&(!r||K.isArray(n)?r=ge.access(e,t,K.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=K.queue(e,t),r=n.length,i=n.shift(),o=K._queueHooks(e,t),s=function(){K.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,s,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return ge.get(e,n)||ge.access(e,n,{empty:K.Callbacks("once memory").add(function(){ge.remove(e,[t+"queue",n])})})}}),K.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.lengthx",Q.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();Q.focusinBubbles="onfocusin"in e;var Ce=/^key/,Ne=/^(?:mouse|pointer|contextmenu)|click/,ke=/^(?:focusinfocus|focusoutblur)$/,Ee=/^([^.]*)(?:\.(.+)|)$/;K.event={global:{},add:function(e,t,n,r,i){var o,s,a,u,l,c,f,p,d,h,g,m=ge.get(e);if(m)for(n.handler&&(o=n,n=o.handler,i=o.selector),n.guid||(n.guid=K.guid++),(u=m.events)||(u=m.events={}),(s=m.handle)||(s=m.handle=function(t){return void 0!==K&&K.event.triggered!==t.type?K.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(fe)||[""],l=t.length;l--;)a=Ee.exec(t[l])||[],d=g=a[1],h=(a[2]||"").split(".").sort(),d&&(f=K.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=K.event.special[d]||{},c=K.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&K.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||(p=u[d]=[],p.delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,s)||e.addEventListener&&e.addEventListener(d,s,!1)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),K.event.global[d]=!0)},remove:function(e,t,n,r,i){var o,s,a,u,l,c,f,p,d,h,g,m=ge.hasData(e)&&ge.get(e);if(m&&(u=m.events)){for(t=(t||"").match(fe)||[""],l=t.length;l--;)if(a=Ee.exec(t[l])||[],d=g=a[1],h=(a[2]||"").split(".").sort(),d){for(f=K.event.special[d]||{},d=(r?f.delegateType:f.bindType)||d,p=u[d]||[],a=a[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=p.length;o--;)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));s&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,m.handle)||K.removeEvent(e,d,m.handle),delete u[d])}else for(d in u)K.event.remove(e,d+t[l],n,r,!0);K.isEmptyObject(u)&&(delete m.handle,ge.remove(e,"events"))}},trigger:function(t,n,r,i){var o,s,a,u,l,c,f,p=[r||J],d=G.call(t,"type")?t.type:t,h=G.call(t,"namespace")?t.namespace.split("."):[];if(s=a=r=r||J,3!==r.nodeType&&8!==r.nodeType&&!ke.test(d+K.event.triggered)&&(d.indexOf(".")>=0&&(h=d.split("."),d=h.shift(),h.sort()),l=d.indexOf(":")<0&&"on"+d,t=t[K.expando]?t:new K.Event(d,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=h.join("."),t.namespace_re=t.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:K.makeArray(n,[t]),f=K.event.special[d]||{},i||!f.trigger||!1!==f.trigger.apply(r,n))){if(!i&&!f.noBubble&&!K.isWindow(r)){for(u=f.delegateType||d,ke.test(u+d)||(s=s.parentNode);s;s=s.parentNode)p.push(s),a=s;a===(r.ownerDocument||J)&&p.push(a.defaultView||a.parentWindow||e)}for(o=0;(s=p[o++])&&!t.isPropagationStopped();)t.type=o>1?u:f.bindType||d,c=(ge.get(s,"events")||{})[t.type]&&ge.get(s,"handle"),c&&c.apply(s,n),(c=l&&s[l])&&c.apply&&K.acceptData(s)&&(t.result=c.apply(s,n),!1===t.result&&t.preventDefault());return t.type=d,i||t.isDefaultPrevented()||f._default&&!1!==f._default.apply(p.pop(),n)||!K.acceptData(r)||l&&K.isFunction(r[d])&&!K.isWindow(r)&&(a=r[l],a&&(r[l]=null),K.event.triggered=d,r[d](),K.event.triggered=void 0,a&&(r[l]=a)),t.result}},dispatch:function(e){e=K.event.fix(e);var t,n,r,i,o,s=[],a=_.call(arguments),u=(ge.get(this,"events")||{})[e.type]||[],l=K.event.special[e.type]||{};if(a[0]=e,e.delegateTarget=this,!l.preDispatch||!1!==l.preDispatch.call(this,e)){for(s=K.event.handlers.call(this,e,u),t=0;(i=s[t++])&&!e.isPropagationStopped();)for(e.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!e.isImmediatePropagationStopped();)e.namespace_re&&!e.namespace_re.test(o.namespace)||(e.handleObj=o,e.data=o.data,void 0!==(r=((K.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,a))&&!1===(e.result=r)&&(e.preventDefault(),e.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,s=[],a=t.delegateCount,u=e.target;if(a&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!==this;u=u.parentNode||this)if(!0!==u.disabled||"click"!==e.type){for(r=[],n=0;n=0:K.find(i,this,null,[u]).length),r[i]&&r.push(o);r.length&&s.push({elem:u,handlers:r})}return a]*)\/>/gi,De=/<([\w:]+)/,je=/<|&#?\w+;/,Ae=/<(?:script|style|link)/i,Le=/checked\s*(?:[^=]|=\s*.checked.)/i,qe=/^$|\/(?:java|ecma)script/i,He=/^true\/(.*)/,Oe=/^\s*\s*$/g,Fe={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};Fe.optgroup=Fe.option,Fe.tbody=Fe.tfoot=Fe.colgroup=Fe.caption=Fe.thead,Fe.th=Fe.td,K.extend({clone:function(e,t,n){var r,i,o,s,a=e.cloneNode(!0),u=K.contains(e.ownerDocument,e);if(!(Q.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||K.isXMLDoc(e)))for(s=v(a),o=v(e),r=0,i=o.length;r0&&g(s,!u&&v(e,"script")),a},buildFragment:function(e,t,n,r){for(var i,o,s,a,u,l,c=t.createDocumentFragment(),f=[],p=0,d=e.length;p")+a[2],l=a[0];l--;)o=o.lastChild;K.merge(f,o.childNodes),o=c.firstChild,o.textContent=""}else f.push(t.createTextNode(i));for(c.textContent="",p=0;i=f[p++];)if((!r||-1===K.inArray(i,r))&&(u=K.contains(i.ownerDocument,i),o=v(c.appendChild(i),"script"),u&&g(o),n))for(l=0;i=o[l++];)qe.test(i.type||"")&&n.push(i);return c},cleanData:function(e){for(var t,n,r,i,o=K.event.special,s=0;void 0!==(n=e[s]);s++){if(K.acceptData(n)&&(i=n[ge.expando])&&(t=ge.cache[i])){if(t.events)for(r in t.events)o[r]?K.event.remove(n,r):K.removeEvent(n,r,t.handle);ge.cache[i]&&delete ge.cache[i]}delete me.cache[n[me.expando]]}}}),K.fn.extend({text:function(e){return he(this,function(e){return void 0===e?K.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){p(this,e).appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=p(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var n,r=e?K.filter(e,this):this,i=0;null!=(n=r[i]);i++)t||1!==n.nodeType||K.cleanData(v(n)),n.parentNode&&(t&&K.contains(n.ownerDocument,n)&&g(v(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(K.cleanData(v(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return K.clone(this,e,t)})},html:function(e){return he(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ae.test(e)&&!Fe[(De.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(Se,"<$1>");try{for(;n1&&"string"==typeof p&&!Q.checkClone&&Le.test(p))return this.each(function(n){var r=c.eq(n);g&&(e[0]=p.call(this,n,r.html())),r.domManip(e,t)});if(l&&(n=K.buildFragment(e,this[0].ownerDocument,!1,this),r=n.firstChild,1===n.childNodes.length&&(n=r),r)){for(i=K.map(v(n,"script"),d),o=i.length;u1)},show:function(){return S(this,!0)},hide:function(){return S(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){we(this)?K(this).show():K(this).hide()})}}),K.Tween=D,D.prototype={constructor:D,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(K.cssNumber[n]?"":"px")},cur:function(){var e=D.propHooks[this.prop];return e&&e.get?e.get(this):D.propHooks._default.get(this)},run:function(e){var t,n=D.propHooks[this.prop];return this.options.duration?this.pos=t=K.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):D.propHooks._default.set(this),this}},D.prototype.init.prototype=D.prototype,D.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=K.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){K.fx.step[e.prop]?K.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[K.cssProps[e.prop]]||K.cssHooks[e.prop])?K.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},D.propHooks.scrollTop=D.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},K.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},K.fx=D.prototype.init,K.fx.step={};var Ve,Ye,Ge=/^(?:toggle|show|hide)$/,Qe=new RegExp("^(?:([+-])=|)("+xe+")([a-z%]*)$","i"),Je=/queueHooks$/,Ke=[q],Ze={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Qe.exec(t),o=i&&i[3]||(K.cssNumber[e]?"":"px"),s=(K.cssNumber[e]||"px"!==o&&+r)&&Qe.exec(K.css(n.elem,e)),a=1,u=20;if(s&&s[3]!==o){o=o||s[3],i=i||[],s=+r||1;do{a=a||".5",s/=a,K.style(n.elem,e,s+o)}while(a!==(a=n.cur()/r)&&1!==a&&--u)}return i&&(s=n.start=+s||+r||0,n.unit=o,n.end=i[1]?s+(i[1]+1)*i[2]:+i[2]),n}]};K.Animation=K.extend(O,{tweener:function(e,t){K.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,r=0,i=e.length;r1)},removeAttr:function(e){return this.each(function(){K.removeAttr(this,e)})}}),K.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(e&&3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?K.prop(e,t,n):(1===o&&K.isXMLDoc(e)||(t=t.toLowerCase(),r=K.attrHooks[t]||(K.expr.match.bool.test(t)?et:void 0)),void 0===n?r&&"get"in r&&null!==(i=r.get(e,t))?i:(i=K.find.attr(e,t),null==i?void 0:i):null!==n?r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:(e.setAttribute(t,n+""),n):void K.removeAttr(e,t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(fe);if(o&&1===e.nodeType)for(;n=o[i++];)r=K.propFix[n]||n,K.expr.match.bool.test(n)&&(e[r]=!1),e.removeAttribute(n)},attrHooks:{type:{set:function(e,t){if(!Q.radioValue&&"radio"===t&&K.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}}}),et={set:function(e,t,n){return!1===t?K.removeAttr(e,n):e.setAttribute(n,n),n}},K.each(K.expr.match.bool.source.match(/\w+/g),function(e,t){var n=tt[t]||K.find.attr;tt[t]=function(e,t,r){var i,o;return r||(o=tt[t],tt[t]=i,i=null!=n(e,t,r)?t.toLowerCase():null,tt[t]=o),i}});var nt=/^(?:input|select|textarea|button)$/i;K.fn.extend({prop:function(e,t){return he(this,K.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[K.propFix[e]||e]})}}),K.extend({propFix:{for:"htmlFor",class:"className"},prop:function(e,t,n){var r,i,o,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return o=1!==s||!K.isXMLDoc(e),o&&(t=K.propFix[t]||t,i=K.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){return e.hasAttribute("tabindex")||nt.test(e.nodeName)||e.href?e.tabIndex:-1}}}}),Q.optSelected||(K.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null}}),K.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){K.propFix[this.toLowerCase()]=this});var rt=/[\t\r\n\f]/g;K.fn.extend({addClass:function(e){var t,n,r,i,o,s,a="string"==typeof e&&e,u=0,l=this.length;if(K.isFunction(e))return this.each(function(t){K(this).addClass(e.call(this,t,this.className))});if(a)for(t=(e||"").match(fe)||[];u=0;)r=r.replace(" "+i+" "," ");s=e?K.trim(r):"",n.className!==s&&(n.className=s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):K.isFunction(e)?this.each(function(n){K(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n)for(var t,r=0,i=K(this),o=e.match(fe)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else"undefined"!==n&&"boolean"!==n||(this.className&&ge.set(this,"__className__",this.className),this.className=this.className||!1===e?"":ge.get(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,r=this.length;n=0)return!0;return!1}});var it=/\r/g;K.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=K.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,K(this).val()):e,null==i?i="":"number"==typeof i?i+="":K.isArray(i)&&(i=K.map(i,function(e){return null==e?"":e+""})),(t=K.valHooks[this.type]||K.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return(t=K.valHooks[i.type]||K.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(it,""):null==n?"":n)}}}),K.extend({valHooks:{option:{get:function(e){var t=K.find.attr(e,"value");return null!=t?t:K.trim(K.text(e))}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||i<0,s=o?null:[],a=o?i+1:r.length,u=i<0?a:o?i:0;u=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),K.each(["radio","checkbox"],function(){K.valHooks[this]={set:function(e,t){if(K.isArray(t))return e.checked=K.inArray(K(e).val(),t)>=0}},Q.checkOn||(K.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),K.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){K.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),K.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var ot=K.now(),st=/\?/;K.parseJSON=function(e){return JSON.parse(e+"")},K.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{n=new DOMParser,t=n.parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||K.error("Invalid XML: "+e),t};var at=/#.*$/,ut=/([?&])_=[^&]*/,lt=/^(.*?):[ \t]*([^\r\n]*)$/gm,ct=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,ft=/^(?:GET|HEAD)$/,pt=/^\/\//,dt=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,ht={},gt={},mt="*/".concat("*"),vt=e.location.href,yt=dt.exec(vt.toLowerCase())||[];K.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:vt,type:"GET",isLocal:ct.test(yt[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":mt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":K.parseJSON,"text xml":K.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?R(R(e,K.ajaxSettings),t):R(K.ajaxSettings,e)},ajaxPrefilter:F(ht),ajaxTransport:F(gt),ajax:function(e,t){function n(e,t,n,s){var u,c,v,y,b,T=t;2!==x&&(x=2,a&&clearTimeout(a),r=void 0,o=s||"",w.readyState=e>0?4:0,u=e>=200&&e<300||304===e,n&&(y=M(f,w,n)),y=W(f,y,w,u),u?(f.ifModified&&(b=w.getResponseHeader("Last-Modified"),b&&(K.lastModified[i]=b),(b=w.getResponseHeader("etag"))&&(K.etag[i]=b)),204===e||"HEAD"===f.type?T="nocontent":304===e?T="notmodified":(T=y.state,c=y.data,v=y.error,u=!v)):(v=T,!e&&T||(T="error",e<0&&(e=0))),w.status=e,w.statusText=(t||T)+"",u?h.resolveWith(p,[c,T,w]):h.rejectWith(p,[w,T,v]),w.statusCode(m),m=void 0,l&&d.trigger(u?"ajaxSuccess":"ajaxError",[w,f,u?c:v]),g.fireWith(p,[w,T]),l&&(d.trigger("ajaxComplete",[w,f]),--K.active||K.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var r,i,o,s,a,u,l,c,f=K.ajaxSetup({},t),p=f.context||f,d=f.context&&(p.nodeType||p.jquery)?K(p):K.event,h=K.Deferred(),g=K.Callbacks("once memory"),m=f.statusCode||{},v={},y={},x=0,b="canceled",w={readyState:0,getResponseHeader:function(e){var t;if(2===x){if(!s)for(s={};t=lt.exec(o);)s[t[1].toLowerCase()]=t[2];t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===x?o:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return x||(e=y[n]=y[n]||e,v[e]=t),this},overrideMimeType:function(e){return x||(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(x<2)for(t in e)m[t]=[m[t],e[t]];else w.always(e[w.status]);return this},abort:function(e){var t=e||b;return r&&r.abort(t),n(0,t),this}};if(h.promise(w).complete=g.add,w.success=w.done,w.error=w.fail,f.url=((e||f.url||vt)+"").replace(at,"").replace(pt,yt[1]+"//"),f.type=t.method||t.type||f.method||f.type,f.dataTypes=K.trim(f.dataType||"*").toLowerCase().match(fe)||[""],null==f.crossDomain&&(u=dt.exec(f.url.toLowerCase()),f.crossDomain=!(!u||u[1]===yt[1]&&u[2]===yt[2]&&(u[3]||("http:"===u[1]?"80":"443"))===(yt[3]||("http:"===yt[1]?"80":"443")))),f.data&&f.processData&&"string"!=typeof f.data&&(f.data=K.param(f.data,f.traditional)),P(ht,f,t,w),2===x)return w;l=K.event&&f.global,l&&0==K.active++&&K.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!ft.test(f.type),i=f.url,f.hasContent||(f.data&&(i=f.url+=(st.test(i)?"&":"?")+f.data,delete f.data),!1===f.cache&&(f.url=ut.test(i)?i.replace(ut,"$1_="+ot++):i+(st.test(i)?"&":"?")+"_="+ot++)),f.ifModified&&(K.lastModified[i]&&w.setRequestHeader("If-Modified-Since",K.lastModified[i]),K.etag[i]&&w.setRequestHeader("If-None-Match",K.etag[i])),(f.data&&f.hasContent&&!1!==f.contentType||t.contentType)&&w.setRequestHeader("Content-Type",f.contentType),w.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+mt+"; q=0.01":""):f.accepts["*"]);for(c in f.headers)w.setRequestHeader(c,f.headers[c]);if(f.beforeSend&&(!1===f.beforeSend.call(p,w,f)||2===x))return w.abort();b="abort";for(c in{success:1,error:1,complete:1})w[c](f[c]);if(r=P(gt,f,t,w)){w.readyState=1,l&&d.trigger("ajaxSend",[w,f]),f.async&&f.timeout>0&&(a=setTimeout(function(){w.abort("timeout")},f.timeout));try{x=1,r.send(v,n)}catch(e){if(!(x<2))throw e;n(-1,e)}}else n(-1,"No Transport");return w},getJSON:function(e,t,n){return K.get(e,t,n,"json")},getScript:function(e,t){return K.get(e,void 0,t,"script")}}),K.each(["get","post"],function(e,t){K[t]=function(e,n,r,i){return K.isFunction(n)&&(i=i||r,r=n,n=void 0),K.ajax({url:e,type:t,dataType:i,data:n,success:r})}}),K._evalUrl=function(e){return K.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})},K.fn.extend({wrapAll:function(e){var t;return K.isFunction(e)?this.each(function(t){K(this).wrapAll(e.call(this,t))}):(this[0]&&(t=K(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return K.isFunction(e)?this.each(function(t){K(this).wrapInner(e.call(this,t))}):this.each(function(){var t=K(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=K.isFunction(e);return this.each(function(n){K(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){K.nodeName(this,"body")||K(this).replaceWith(this.childNodes)}).end()}}),K.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0},K.expr.filters.visible=function(e){return!K.expr.filters.hidden(e)};var xt=/%20/g,bt=/\[\]$/,wt=/\r?\n/g,Tt=/^(?:submit|button|image|reset|file)$/i,Ct=/^(?:input|select|textarea|keygen)/i;K.param=function(e,t){var n,r=[],i=function(e,t){t=K.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=K.ajaxSettings&&K.ajaxSettings.traditional),K.isArray(e)||e.jquery&&!K.isPlainObject(e))K.each(e,function(){i(this.name,this.value)});else for(n in e)$(n,e[n],t,i);return r.join("&").replace(xt,"+")},K.fn.extend({serialize:function(){return K.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=K.prop(this,"elements");return e?K.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!K(this).is(":disabled")&&Ct.test(this.nodeName)&&!Tt.test(e)&&(this.checked||!Te.test(e))}).map(function(e,t){var n=K(this).val();return null==n?null:K.isArray(n)?K.map(n,function(e){return{name:t.name,value:e.replace(wt,"\r\n")}}):{name:t.name,value:n.replace(wt,"\r\n")}}).get()}}),K.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(e){}};var Nt=0,kt={},Et={0:200,1223:204},St=K.ajaxSettings.xhr();e.attachEvent&&e.attachEvent("onunload",function(){for(var e in kt)kt[e]()}),Q.cors=!!St&&"withCredentials"in St,Q.ajax=St=!!St,K.ajaxTransport(function(e){var t;if(Q.cors||St&&!e.crossDomain)return{send:function(n,r){var i,o=e.xhr(),s=++Nt;if(o.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(i in e.xhrFields)o[i]=e.xhrFields[i];e.mimeType&&o.overrideMimeType&&o.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(i in n)o.setRequestHeader(i,n[i]);t=function(e){return function(){t&&(delete kt[s],t=o.onload=o.onerror=null,"abort"===e?o.abort():"error"===e?r(o.status,o.statusText):r(Et[o.status]||o.status,o.statusText,"string"==typeof o.responseText?{text:o.responseText}:void 0,o.getAllResponseHeaders()))}},o.onload=t(),o.onerror=t("error"),t=kt[s]=t("abort");try{o.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}}),K.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return K.globalEval(e),e}}}),K.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),K.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,i){t=K("