diff --git a/build/design-tools.js b/build/design-tools.js index 320882b10..b03035ecc 100644 --- a/build/design-tools.js +++ b/build/design-tools.js @@ -1,10 +1,10 @@ (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= 0) continue; - if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; - target[i] = obj[i]; - } - - return target; -}; - -exports.__esModule = true; -},{}],43:[function(require,module,exports){ -"use strict"; - -var _getIterator = require("babel-runtime/core-js/get-iterator")["default"]; - -var _isIterable = require("babel-runtime/core-js/is-iterable")["default"]; - -exports["default"] = (function () { - function sliceIterator(arr, i) { - var _arr = []; - var _n = true; - var _d = false; - var _e = undefined; - - try { - for (var _i = _getIterator(arr), _s; !(_n = (_s = _i.next()).done); _n = true) { - _arr.push(_s.value); - - if (i && _arr.length === i) break; - } - } catch (err) { - _d = true; - _e = err; - } finally { - try { - if (!_n && _i["return"]) _i["return"](); - } finally { - if (_d) throw _e; - } - } - - return _arr; - } - - return function (arr, i) { - if (Array.isArray(arr)) { - return arr; - } else if (_isIterable(Object(arr))) { - return sliceIterator(arr, i); - } else { - throw new TypeError("Invalid attempt to destructure non-iterable instance"); - } - }; -})(); - -exports.__esModule = true; -},{"babel-runtime/core-js/get-iterator":27,"babel-runtime/core-js/is-iterable":28}],44:[function(require,module,exports){ -require('../modules/web.dom.iterable'); -require('../modules/es6.string.iterator'); -module.exports = require('../modules/core.get-iterator'); -},{"../modules/core.get-iterator":90,"../modules/es6.string.iterator":97,"../modules/web.dom.iterable":98}],45:[function(require,module,exports){ -require('../modules/web.dom.iterable'); -require('../modules/es6.string.iterator'); -module.exports = require('../modules/core.is-iterable'); -},{"../modules/core.is-iterable":91,"../modules/es6.string.iterator":97,"../modules/web.dom.iterable":98}],46:[function(require,module,exports){ -require('../../modules/es6.object.assign'); -module.exports = require('../../modules/$.core').Object.assign; -},{"../../modules/$.core":57,"../../modules/es6.object.assign":93}],47:[function(require,module,exports){ -var $ = require('../../modules/$'); -module.exports = function create(P, D){ - return $.create(P, D); -}; -},{"../../modules/$":73}],48:[function(require,module,exports){ -var $ = require('../../modules/$'); -module.exports = function defineProperty(it, key, desc){ - return $.setDesc(it, key, desc); -}; -},{"../../modules/$":73}],49:[function(require,module,exports){ -var $ = require('../../modules/$'); -require('../../modules/es6.object.get-own-property-descriptor'); -module.exports = function getOwnPropertyDescriptor(it, key){ - return $.getDesc(it, key); -}; -},{"../../modules/$":73,"../../modules/es6.object.get-own-property-descriptor":94}],50:[function(require,module,exports){ -require('../../modules/es6.object.keys'); -module.exports = require('../../modules/$.core').Object.keys; -},{"../../modules/$.core":57,"../../modules/es6.object.keys":95}],51:[function(require,module,exports){ -require('../../modules/es6.object.set-prototype-of'); -module.exports = require('../../modules/$.core').Object.setPrototypeOf; -},{"../../modules/$.core":57,"../../modules/es6.object.set-prototype-of":96}],52:[function(require,module,exports){ -module.exports = function(it){ - if(typeof it != 'function')throw TypeError(it + ' is not a function!'); - return it; -}; -},{}],53:[function(require,module,exports){ -var isObject = require('./$.is-object'); -module.exports = function(it){ - if(!isObject(it))throw TypeError(it + ' is not an object!'); - return it; -}; -},{"./$.is-object":67}],54:[function(require,module,exports){ -// 19.1.2.1 Object.assign(target, source, ...) -var toObject = require('./$.to-object') - , IObject = require('./$.iobject') - , enumKeys = require('./$.enum-keys'); -/* eslint-disable no-unused-vars */ -module.exports = Object.assign || function assign(target, source){ -/* eslint-enable no-unused-vars */ - var T = toObject(target) - , l = arguments.length - , i = 1; - while(l > i){ - var S = IObject(arguments[i++]) - , keys = enumKeys(S) - , length = keys.length - , j = 0 - , key; - while(length > j)T[key = keys[j++]] = S[key]; - } - return T; -}; -},{"./$.enum-keys":61,"./$.iobject":66,"./$.to-object":85}],55:[function(require,module,exports){ -// getting tag from 19.1.3.6 Object.prototype.toString() -var cof = require('./$.cof') - , TAG = require('./$.wks')('toStringTag') - // ES3 wrong here - , ARG = cof(function(){ return arguments; }()) == 'Arguments'; - -module.exports = function(it){ - var O, T, B; - return it === undefined ? 'Undefined' : it === null ? 'Null' - // @@toStringTag case - : typeof (T = (O = Object(it))[TAG]) == 'string' ? T - // builtinTag case - : ARG ? cof(O) - // ES3 arguments fallback - : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; -}; -},{"./$.cof":56,"./$.wks":88}],56:[function(require,module,exports){ -var toString = {}.toString; - -module.exports = function(it){ - return toString.call(it).slice(8, -1); -}; -},{}],57:[function(require,module,exports){ -var core = module.exports = {}; -if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef -},{}],58:[function(require,module,exports){ -// optional / simple context binding -var aFunction = require('./$.a-function'); -module.exports = function(fn, that, length){ - aFunction(fn); - if(that === undefined)return fn; - switch(length){ - case 1: return function(a){ - return fn.call(that, a); - }; - case 2: return function(a, b){ - return fn.call(that, a, b); - }; - case 3: return function(a, b, c){ - return fn.call(that, a, b, c); - }; - } return function(/* ...args */){ - return fn.apply(that, arguments); - }; -}; -},{"./$.a-function":52}],59:[function(require,module,exports){ -var global = require('./$.global') - , core = require('./$.core') - , PROTOTYPE = 'prototype'; -var ctx = function(fn, that){ - return function(){ - return fn.apply(that, arguments); - }; -}; -var $def = function(type, name, source){ - var key, own, out, exp - , isGlobal = type & $def.G - , isProto = type & $def.P - , target = isGlobal ? global : type & $def.S - ? global[name] : (global[name] || {})[PROTOTYPE] - , exports = isGlobal ? core : core[name] || (core[name] = {}); - if(isGlobal)source = name; - for(key in source){ - // contains in native - own = !(type & $def.F) && target && key in target; - if(own && key in exports)continue; - // export native or passed - out = own ? target[key] : source[key]; - // prevent global pollution for namespaces - if(isGlobal && typeof target[key] != 'function')exp = source[key]; - // bind timers to global for call from export context - else if(type & $def.B && own)exp = ctx(out, global); - // wrap global constructors for prevent change them in library - else if(type & $def.W && target[key] == out)!function(C){ - exp = function(param){ - return this instanceof C ? new C(param) : C(param); - }; - exp[PROTOTYPE] = C[PROTOTYPE]; - }(out); - else exp = isProto && typeof out == 'function' ? ctx(Function.call, out) : out; - // export - exports[key] = exp; - if(isProto)(exports[PROTOTYPE] || (exports[PROTOTYPE] = {}))[key] = out; - } -}; -// type bitmap -$def.F = 1; // forced -$def.G = 2; // global -$def.S = 4; // static -$def.P = 8; // proto -$def.B = 16; // bind -$def.W = 32; // wrap -module.exports = $def; -},{"./$.core":57,"./$.global":63}],60:[function(require,module,exports){ -// 7.2.1 RequireObjectCoercible(argument) -module.exports = function(it){ - if(it == undefined)throw TypeError("Can't call method on " + it); - return it; -}; -},{}],61:[function(require,module,exports){ -// all enumerable object keys, includes symbols -var $ = require('./$'); -module.exports = function(it){ - var keys = $.getKeys(it) - , getSymbols = $.getSymbols; - if(getSymbols){ - var symbols = getSymbols(it) - , isEnum = $.isEnum - , i = 0 - , key; - while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))keys.push(key); - } - return keys; -}; -},{"./$":73}],62:[function(require,module,exports){ -module.exports = function(exec){ - try { - return !!exec(); - } catch(e){ - return true; - } -}; -},{}],63:[function(require,module,exports){ -var global = typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); -module.exports = global; -if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef -},{}],64:[function(require,module,exports){ -var hasOwnProperty = {}.hasOwnProperty; -module.exports = function(it, key){ - return hasOwnProperty.call(it, key); -}; -},{}],65:[function(require,module,exports){ -var $ = require('./$') - , createDesc = require('./$.property-desc'); -module.exports = require('./$.support-desc') ? function(object, key, value){ - return $.setDesc(object, key, createDesc(1, value)); -} : function(object, key, value){ - object[key] = value; - return object; -}; -},{"./$":73,"./$.property-desc":76,"./$.support-desc":81}],66:[function(require,module,exports){ -// indexed object, fallback for non-array-like ES3 strings -var cof = require('./$.cof'); -module.exports = 0 in Object('z') ? Object : function(it){ - return cof(it) == 'String' ? it.split('') : Object(it); -}; -},{"./$.cof":56}],67:[function(require,module,exports){ -// http://jsperf.com/core-js-isobject -module.exports = function(it){ - return it !== null && (typeof it == 'object' || typeof it == 'function'); -}; -},{}],68:[function(require,module,exports){ -// Safari has buggy iterators w/o `next` -module.exports = 'keys' in [] && !('next' in [].keys()); -},{}],69:[function(require,module,exports){ -'use strict'; -var $ = require('./$') - , IteratorPrototype = {}; - -// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() -require('./$.hide')(IteratorPrototype, require('./$.wks')('iterator'), function(){ return this; }); - -module.exports = function(Constructor, NAME, next){ - Constructor.prototype = $.create(IteratorPrototype, {next: require('./$.property-desc')(1,next)}); - require('./$.tag')(Constructor, NAME + ' Iterator'); -}; -},{"./$":73,"./$.hide":65,"./$.property-desc":76,"./$.tag":82,"./$.wks":88}],70:[function(require,module,exports){ -'use strict'; -var LIBRARY = require('./$.library') - , $def = require('./$.def') - , $redef = require('./$.redef') - , hide = require('./$.hide') - , has = require('./$.has') - , SYMBOL_ITERATOR = require('./$.wks')('iterator') - , Iterators = require('./$.iterators') - , FF_ITERATOR = '@@iterator' - , KEYS = 'keys' - , VALUES = 'values'; -var returnThis = function(){ return this; }; -module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCE){ - require('./$.iter-create')(Constructor, NAME, next); - var createMethod = function(kind){ - switch(kind){ - case KEYS: return function keys(){ return new Constructor(this, kind); }; - case VALUES: return function values(){ return new Constructor(this, kind); }; - } return function entries(){ return new Constructor(this, kind); }; - }; - var TAG = NAME + ' Iterator' - , proto = Base.prototype - , _native = proto[SYMBOL_ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT] - , _default = _native || createMethod(DEFAULT) - , methods, key; - // Fix native - if(_native){ - var IteratorPrototype = require('./$').getProto(_default.call(new Base)); - // Set @@toStringTag to native iterators - require('./$.tag')(IteratorPrototype, TAG, true); - // FF fix - if(!LIBRARY && has(proto, FF_ITERATOR))hide(IteratorPrototype, SYMBOL_ITERATOR, returnThis); - } - // Define iterator - if(!LIBRARY || FORCE)hide(proto, SYMBOL_ITERATOR, _default); - // Plug for library - Iterators[NAME] = _default; - Iterators[TAG] = returnThis; - if(DEFAULT){ - methods = { - keys: IS_SET ? _default : createMethod(KEYS), - values: DEFAULT == VALUES ? _default : createMethod(VALUES), - entries: DEFAULT != VALUES ? _default : createMethod('entries') - }; - if(FORCE)for(key in methods){ - if(!(key in proto))$redef(proto, key, methods[key]); - } else $def($def.P + $def.F * require('./$.iter-buggy'), NAME, methods); - } -}; -},{"./$":73,"./$.def":59,"./$.has":64,"./$.hide":65,"./$.iter-buggy":68,"./$.iter-create":69,"./$.iterators":72,"./$.library":74,"./$.redef":77,"./$.tag":82,"./$.wks":88}],71:[function(require,module,exports){ -module.exports = function(done, value){ - return {value: value, done: !!done}; -}; -},{}],72:[function(require,module,exports){ -module.exports = {}; -},{}],73:[function(require,module,exports){ -var $Object = Object; -module.exports = { - create: $Object.create, - getProto: $Object.getPrototypeOf, - isEnum: {}.propertyIsEnumerable, - getDesc: $Object.getOwnPropertyDescriptor, - setDesc: $Object.defineProperty, - setDescs: $Object.defineProperties, - getKeys: $Object.keys, - getNames: $Object.getOwnPropertyNames, - getSymbols: $Object.getOwnPropertySymbols, - each: [].forEach -}; -},{}],74:[function(require,module,exports){ -module.exports = true; -},{}],75:[function(require,module,exports){ -// most Object methods by ES6 should accept primitives -module.exports = function(KEY, exec){ - var $def = require('./$.def') - , fn = (require('./$.core').Object || {})[KEY] || Object[KEY] - , exp = {}; - exp[KEY] = exec(fn); - $def($def.S + $def.F * require('./$.fails')(function(){ fn(1); }), 'Object', exp); -}; -},{"./$.core":57,"./$.def":59,"./$.fails":62}],76:[function(require,module,exports){ -module.exports = function(bitmap, value){ - return { - enumerable : !(bitmap & 1), - configurable: !(bitmap & 2), - writable : !(bitmap & 4), - value : value - }; -}; -},{}],77:[function(require,module,exports){ -module.exports = require('./$.hide'); -},{"./$.hide":65}],78:[function(require,module,exports){ -// Works with __proto__ only. Old v8 can't work with null proto objects. -/* eslint-disable no-proto */ -var getDesc = require('./$').getDesc - , isObject = require('./$.is-object') - , anObject = require('./$.an-object'); -var check = function(O, proto){ - anObject(O); - if(!isObject(proto) && proto !== null)throw TypeError(proto + ": can't set as prototype!"); -}; -module.exports = { - set: Object.setPrototypeOf || ('__proto__' in {} // eslint-disable-line - ? function(buggy, set){ - try { - set = require('./$.ctx')(Function.call, getDesc(Object.prototype, '__proto__').set, 2); - set({}, []); - } catch(e){ buggy = true; } - return function setPrototypeOf(O, proto){ - check(O, proto); - if(buggy)O.__proto__ = proto; - else set(O, proto); - return O; - }; - }() - : undefined), - check: check -}; -},{"./$":73,"./$.an-object":53,"./$.ctx":58,"./$.is-object":67}],79:[function(require,module,exports){ -var global = require('./$.global') - , SHARED = '__core-js_shared__' - , store = global[SHARED] || (global[SHARED] = {}); -module.exports = function(key){ - return store[key] || (store[key] = {}); -}; -},{"./$.global":63}],80:[function(require,module,exports){ -// true -> String#at -// false -> String#codePointAt -var toInteger = require('./$.to-integer') - , defined = require('./$.defined'); -module.exports = function(TO_STRING){ - return function(that, pos){ - var s = String(defined(that)) - , i = toInteger(pos) - , l = s.length - , a, b; - if(i < 0 || i >= l)return TO_STRING ? '' : undefined; - a = s.charCodeAt(i); - return a < 0xd800 || a > 0xdbff || i + 1 === l - || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff - ? TO_STRING ? s.charAt(i) : a - : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; - }; -}; -},{"./$.defined":60,"./$.to-integer":83}],81:[function(require,module,exports){ -// Thank's IE8 for his funny defineProperty -module.exports = !require('./$.fails')(function(){ - return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7; -}); -},{"./$.fails":62}],82:[function(require,module,exports){ -var has = require('./$.has') - , hide = require('./$.hide') - , TAG = require('./$.wks')('toStringTag'); - -module.exports = function(it, tag, stat){ - if(it && !has(it = stat ? it : it.prototype, TAG))hide(it, TAG, tag); -}; -},{"./$.has":64,"./$.hide":65,"./$.wks":88}],83:[function(require,module,exports){ -// 7.1.4 ToInteger -var ceil = Math.ceil - , floor = Math.floor; -module.exports = function(it){ - return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); -}; -},{}],84:[function(require,module,exports){ -// to indexed object, toObject with fallback for non-array-like ES3 strings -var IObject = require('./$.iobject') - , defined = require('./$.defined'); -module.exports = function(it){ - return IObject(defined(it)); -}; -},{"./$.defined":60,"./$.iobject":66}],85:[function(require,module,exports){ -// 7.1.13 ToObject(argument) -var defined = require('./$.defined'); -module.exports = function(it){ - return Object(defined(it)); -}; -},{"./$.defined":60}],86:[function(require,module,exports){ -var id = 0 - , px = Math.random(); -module.exports = function(key){ - return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); -}; -},{}],87:[function(require,module,exports){ -module.exports = function(){ /* empty */ }; -},{}],88:[function(require,module,exports){ -var store = require('./$.shared')('wks') - , Symbol = require('./$.global').Symbol; -module.exports = function(name){ - return store[name] || (store[name] = - Symbol && Symbol[name] || (Symbol || require('./$.uid'))('Symbol.' + name)); -}; -},{"./$.global":63,"./$.shared":79,"./$.uid":86}],89:[function(require,module,exports){ -var classof = require('./$.classof') - , ITERATOR = require('./$.wks')('iterator') - , Iterators = require('./$.iterators'); -module.exports = require('./$.core').getIteratorMethod = function(it){ - if(it != undefined)return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)]; -}; -},{"./$.classof":55,"./$.core":57,"./$.iterators":72,"./$.wks":88}],90:[function(require,module,exports){ -var anObject = require('./$.an-object') - , get = require('./core.get-iterator-method'); -module.exports = require('./$.core').getIterator = function(it){ - var iterFn = get(it); - if(typeof iterFn != 'function')throw TypeError(it + ' is not iterable!'); - return anObject(iterFn.call(it)); -}; -},{"./$.an-object":53,"./$.core":57,"./core.get-iterator-method":89}],91:[function(require,module,exports){ -var classof = require('./$.classof') - , ITERATOR = require('./$.wks')('iterator') - , Iterators = require('./$.iterators'); -module.exports = require('./$.core').isIterable = function(it){ - var O = Object(it); - return ITERATOR in O || '@@iterator' in O || Iterators.hasOwnProperty(classof(O)); -}; -},{"./$.classof":55,"./$.core":57,"./$.iterators":72,"./$.wks":88}],92:[function(require,module,exports){ -'use strict'; -var setUnscope = require('./$.unscope') - , step = require('./$.iter-step') - , Iterators = require('./$.iterators') - , toIObject = require('./$.to-iobject'); - -// 22.1.3.4 Array.prototype.entries() -// 22.1.3.13 Array.prototype.keys() -// 22.1.3.29 Array.prototype.values() -// 22.1.3.30 Array.prototype[@@iterator]() -require('./$.iter-define')(Array, 'Array', function(iterated, kind){ - this._t = toIObject(iterated); // target - this._i = 0; // next index - this._k = kind; // kind -// 22.1.5.2.1 %ArrayIteratorPrototype%.next() -}, function(){ - var O = this._t - , kind = this._k - , index = this._i++; - if(!O || index >= O.length){ - this._t = undefined; - return step(1); - } - if(kind == 'keys' )return step(0, index); - if(kind == 'values')return step(0, O[index]); - return step(0, [index, O[index]]); -}, 'values'); - -// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) -Iterators.Arguments = Iterators.Array; - -setUnscope('keys'); -setUnscope('values'); -setUnscope('entries'); -},{"./$.iter-define":70,"./$.iter-step":71,"./$.iterators":72,"./$.to-iobject":84,"./$.unscope":87}],93:[function(require,module,exports){ -// 19.1.3.1 Object.assign(target, source) -var $def = require('./$.def'); -$def($def.S, 'Object', {assign: require('./$.assign')}); -},{"./$.assign":54,"./$.def":59}],94:[function(require,module,exports){ -// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) -var toIObject = require('./$.to-iobject'); - -require('./$.object-sap')('getOwnPropertyDescriptor', function($getOwnPropertyDescriptor){ - return function getOwnPropertyDescriptor(it, key){ - return $getOwnPropertyDescriptor(toIObject(it), key); - }; -}); -},{"./$.object-sap":75,"./$.to-iobject":84}],95:[function(require,module,exports){ -// 19.1.2.14 Object.keys(O) -var toObject = require('./$.to-object'); - -require('./$.object-sap')('keys', function($keys){ - return function keys(it){ - return $keys(toObject(it)); - }; -}); -},{"./$.object-sap":75,"./$.to-object":85}],96:[function(require,module,exports){ -// 19.1.3.19 Object.setPrototypeOf(O, proto) -var $def = require('./$.def'); -$def($def.S, 'Object', {setPrototypeOf: require('./$.set-proto').set}); -},{"./$.def":59,"./$.set-proto":78}],97:[function(require,module,exports){ -'use strict'; -var $at = require('./$.string-at')(true); - -// 21.1.3.27 String.prototype[@@iterator]() -require('./$.iter-define')(String, 'String', function(iterated){ - this._t = String(iterated); // target - this._i = 0; // next index -// 21.1.5.2.1 %StringIteratorPrototype%.next() -}, function(){ - var O = this._t - , index = this._i - , point; - if(index >= O.length)return {value: undefined, done: true}; - point = $at(O, index); - this._i += point.length; - return {value: point, done: false}; -}); -},{"./$.iter-define":70,"./$.string-at":80}],98:[function(require,module,exports){ -require('./es6.array.iterator'); -var Iterators = require('./$.iterators'); -Iterators.NodeList = Iterators.HTMLCollection = Iterators.Array; -},{"./$.iterators":72,"./es6.array.iterator":92}],99:[function(require,module,exports){ /* * JavaScript MD5 1.0.1 * https://github.com/blueimp/JavaScript-MD5 @@ -5520,7 +4756,7 @@ Iterators.NodeList = Iterators.HTMLCollection = Iterators.Array; } }(this)); -},{}],100:[function(require,module,exports){ +},{}],28:[function(require,module,exports){ 'use strict'; // For more information about browser field, check out the browser field at https://github.com/substack/browserify-handbook#browser-field. @@ -5572,7 +4808,7 @@ module.exports = { } }; -},{}],101:[function(require,module,exports){ +},{}],29:[function(require,module,exports){ /** * Copyright (c) 2014-2015, Facebook, Inc. * All rights reserved. @@ -10500,7 +9736,7 @@ module.exports = { return Immutable; })); -},{}],102:[function(require,module,exports){ +},{}],30:[function(require,module,exports){ /** * Module dependencies */ @@ -10599,7 +9835,7 @@ function jsonp(url, opts, fn){ return cancel; } -},{"debug":103}],103:[function(require,module,exports){ +},{"debug":31}],31:[function(require,module,exports){ /** * This is the web browser implementation of `debug()`. @@ -10776,9 +10012,9 @@ function localstorage(){ } catch (e) {} } -},{"./debug":104}],104:[function(require,module,exports){ +},{"./debug":32}],32:[function(require,module,exports){ arguments[4][14][0].apply(exports,arguments) -},{"dup":14,"ms":105}],105:[function(require,module,exports){ +},{"dup":14,"ms":33}],33:[function(require,module,exports){ /** * Helpers. */ @@ -10903,10 +10139,10 @@ function plural(ms, n, name) { return Math.ceil(ms / n) + ' ' + name + 's'; } -},{}],106:[function(require,module,exports){ +},{}],34:[function(require,module,exports){ module.exports = require('./lib/ReactWithAddons'); -},{"./lib/ReactWithAddons":206}],107:[function(require,module,exports){ +},{"./lib/ReactWithAddons":134}],35:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -10933,7 +10169,7 @@ var AutoFocusMixin = { module.exports = AutoFocusMixin; -},{"./focusNode":240}],108:[function(require,module,exports){ +},{"./focusNode":168}],36:[function(require,module,exports){ /** * Copyright 2013-2015 Facebook, Inc. * All rights reserved. @@ -11428,7 +10664,7 @@ var BeforeInputEventPlugin = { module.exports = BeforeInputEventPlugin; -},{"./EventConstants":121,"./EventPropagators":126,"./ExecutionEnvironment":127,"./FallbackCompositionState":128,"./SyntheticCompositionEvent":212,"./SyntheticInputEvent":216,"./keyOf":263}],109:[function(require,module,exports){ +},{"./EventConstants":49,"./EventPropagators":54,"./ExecutionEnvironment":55,"./FallbackCompositionState":56,"./SyntheticCompositionEvent":140,"./SyntheticInputEvent":144,"./keyOf":191}],37:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -11541,7 +10777,7 @@ module.exports = CSSCore; }).call(this,require('_process')) -},{"./invariant":256,"_process":280}],110:[function(require,module,exports){ +},{"./invariant":184,"_process":208}],38:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -11666,7 +10902,7 @@ var CSSProperty = { module.exports = CSSProperty; -},{}],111:[function(require,module,exports){ +},{}],39:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -11849,7 +11085,7 @@ module.exports = CSSPropertyOperations; }).call(this,require('_process')) -},{"./CSSProperty":110,"./ExecutionEnvironment":127,"./camelizeStyleName":227,"./dangerousStyleValue":234,"./hyphenateStyleName":254,"./memoizeStringOnly":265,"./warning":277,"_process":280}],112:[function(require,module,exports){ +},{"./CSSProperty":38,"./ExecutionEnvironment":55,"./camelizeStyleName":155,"./dangerousStyleValue":162,"./hyphenateStyleName":182,"./memoizeStringOnly":193,"./warning":205,"_process":208}],40:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -11950,7 +11186,7 @@ module.exports = CallbackQueue; }).call(this,require('_process')) -},{"./Object.assign":134,"./PooledClass":135,"./invariant":256,"_process":280}],113:[function(require,module,exports){ +},{"./Object.assign":62,"./PooledClass":63,"./invariant":184,"_process":208}],41:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -12332,7 +11568,7 @@ var ChangeEventPlugin = { module.exports = ChangeEventPlugin; -},{"./EventConstants":121,"./EventPluginHub":123,"./EventPropagators":126,"./ExecutionEnvironment":127,"./ReactUpdates":205,"./SyntheticEvent":214,"./isEventSupported":257,"./isTextInputElement":259,"./keyOf":263}],114:[function(require,module,exports){ +},{"./EventConstants":49,"./EventPluginHub":51,"./EventPropagators":54,"./ExecutionEnvironment":55,"./ReactUpdates":133,"./SyntheticEvent":142,"./isEventSupported":185,"./isTextInputElement":187,"./keyOf":191}],42:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -12357,7 +11593,7 @@ var ClientReactRootIndex = { module.exports = ClientReactRootIndex; -},{}],115:[function(require,module,exports){ +},{}],43:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -12496,7 +11732,7 @@ module.exports = DOMChildrenOperations; }).call(this,require('_process')) -},{"./Danger":118,"./ReactMultiChildUpdateTypes":184,"./invariant":256,"./setTextContent":271,"_process":280}],116:[function(require,module,exports){ +},{"./Danger":46,"./ReactMultiChildUpdateTypes":112,"./invariant":184,"./setTextContent":199,"_process":208}],44:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -12796,7 +12032,7 @@ module.exports = DOMProperty; }).call(this,require('_process')) -},{"./invariant":256,"_process":280}],117:[function(require,module,exports){ +},{"./invariant":184,"_process":208}],45:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -12989,7 +12225,7 @@ module.exports = DOMPropertyOperations; }).call(this,require('_process')) -},{"./DOMProperty":116,"./quoteAttributeValueForBrowser":269,"./warning":277,"_process":280}],118:[function(require,module,exports){ +},{"./DOMProperty":44,"./quoteAttributeValueForBrowser":197,"./warning":205,"_process":208}],46:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -13177,7 +12413,7 @@ module.exports = Danger; }).call(this,require('_process')) -},{"./ExecutionEnvironment":127,"./createNodesFromMarkup":232,"./emptyFunction":235,"./getMarkupWrap":248,"./invariant":256,"_process":280}],119:[function(require,module,exports){ +},{"./ExecutionEnvironment":55,"./createNodesFromMarkup":160,"./emptyFunction":163,"./getMarkupWrap":176,"./invariant":184,"_process":208}],47:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -13216,7 +12452,7 @@ var DefaultEventPluginOrder = [ module.exports = DefaultEventPluginOrder; -},{"./keyOf":263}],120:[function(require,module,exports){ +},{"./keyOf":191}],48:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -13356,7 +12592,7 @@ var EnterLeaveEventPlugin = { module.exports = EnterLeaveEventPlugin; -},{"./EventConstants":121,"./EventPropagators":126,"./ReactMount":182,"./SyntheticMouseEvent":218,"./keyOf":263}],121:[function(require,module,exports){ +},{"./EventConstants":49,"./EventPropagators":54,"./ReactMount":110,"./SyntheticMouseEvent":146,"./keyOf":191}],49:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -13428,7 +12664,7 @@ var EventConstants = { module.exports = EventConstants; -},{"./keyMirror":262}],122:[function(require,module,exports){ +},{"./keyMirror":190}],50:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -13519,7 +12755,7 @@ module.exports = EventListener; }).call(this,require('_process')) -},{"./emptyFunction":235,"_process":280}],123:[function(require,module,exports){ +},{"./emptyFunction":163,"_process":208}],51:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -13798,7 +13034,7 @@ module.exports = EventPluginHub; }).call(this,require('_process')) -},{"./EventPluginRegistry":124,"./EventPluginUtils":125,"./accumulateInto":224,"./forEachAccumulated":241,"./invariant":256,"_process":280}],124:[function(require,module,exports){ +},{"./EventPluginRegistry":52,"./EventPluginUtils":53,"./accumulateInto":152,"./forEachAccumulated":169,"./invariant":184,"_process":208}],52:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -14079,7 +13315,7 @@ module.exports = EventPluginRegistry; }).call(this,require('_process')) -},{"./invariant":256,"_process":280}],125:[function(require,module,exports){ +},{"./invariant":184,"_process":208}],53:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -14301,7 +13537,7 @@ module.exports = EventPluginUtils; }).call(this,require('_process')) -},{"./EventConstants":121,"./invariant":256,"_process":280}],126:[function(require,module,exports){ +},{"./EventConstants":49,"./invariant":184,"_process":208}],54:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -14444,7 +13680,7 @@ module.exports = EventPropagators; }).call(this,require('_process')) -},{"./EventConstants":121,"./EventPluginHub":123,"./accumulateInto":224,"./forEachAccumulated":241,"_process":280}],127:[function(require,module,exports){ +},{"./EventConstants":49,"./EventPluginHub":51,"./accumulateInto":152,"./forEachAccumulated":169,"_process":208}],55:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -14488,7 +13724,7 @@ var ExecutionEnvironment = { module.exports = ExecutionEnvironment; -},{}],128:[function(require,module,exports){ +},{}],56:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -14579,7 +13815,7 @@ PooledClass.addPoolingTo(FallbackCompositionState); module.exports = FallbackCompositionState; -},{"./Object.assign":134,"./PooledClass":135,"./getTextContentAccessor":251}],129:[function(require,module,exports){ +},{"./Object.assign":62,"./PooledClass":63,"./getTextContentAccessor":179}],57:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -14790,7 +14026,7 @@ var HTMLDOMPropertyConfig = { module.exports = HTMLDOMPropertyConfig; -},{"./DOMProperty":116,"./ExecutionEnvironment":127}],130:[function(require,module,exports){ +},{"./DOMProperty":44,"./ExecutionEnvironment":55}],58:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -14831,7 +14067,7 @@ var LinkedStateMixin = { module.exports = LinkedStateMixin; -},{"./ReactLink":180,"./ReactStateSetters":199}],131:[function(require,module,exports){ +},{"./ReactLink":108,"./ReactStateSetters":127}],59:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -14988,7 +14224,7 @@ module.exports = LinkedValueUtils; }).call(this,require('_process')) -},{"./ReactPropTypes":191,"./invariant":256,"_process":280}],132:[function(require,module,exports){ +},{"./ReactPropTypes":119,"./invariant":184,"_process":208}],60:[function(require,module,exports){ (function (process){ /** * Copyright 2014-2015, Facebook, Inc. @@ -15046,7 +14282,7 @@ module.exports = LocalEventTrapMixin; }).call(this,require('_process')) -},{"./ReactBrowserEventEmitter":138,"./accumulateInto":224,"./forEachAccumulated":241,"./invariant":256,"_process":280}],133:[function(require,module,exports){ +},{"./ReactBrowserEventEmitter":66,"./accumulateInto":152,"./forEachAccumulated":169,"./invariant":184,"_process":208}],61:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -15104,7 +14340,7 @@ var MobileSafariClickEventPlugin = { module.exports = MobileSafariClickEventPlugin; -},{"./EventConstants":121,"./emptyFunction":235}],134:[function(require,module,exports){ +},{"./EventConstants":49,"./emptyFunction":163}],62:[function(require,module,exports){ /** * Copyright 2014-2015, Facebook, Inc. * All rights reserved. @@ -15153,7 +14389,7 @@ function assign(target, sources) { module.exports = assign; -},{}],135:[function(require,module,exports){ +},{}],63:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -15270,7 +14506,7 @@ module.exports = PooledClass; }).call(this,require('_process')) -},{"./invariant":256,"_process":280}],136:[function(require,module,exports){ +},{"./invariant":184,"_process":208}],64:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -15423,7 +14659,7 @@ module.exports = React; }).call(this,require('_process')) -},{"./EventPluginUtils":125,"./ExecutionEnvironment":127,"./Object.assign":134,"./ReactChildren":142,"./ReactClass":143,"./ReactComponent":144,"./ReactContext":149,"./ReactCurrentOwner":150,"./ReactDOM":151,"./ReactDOMTextComponent":162,"./ReactDefaultInjection":165,"./ReactElement":168,"./ReactElementValidator":169,"./ReactInstanceHandles":177,"./ReactMount":182,"./ReactPerf":187,"./ReactPropTypes":191,"./ReactReconciler":194,"./ReactServerRendering":197,"./findDOMNode":238,"./onlyChild":266,"_process":280}],137:[function(require,module,exports){ +},{"./EventPluginUtils":53,"./ExecutionEnvironment":55,"./Object.assign":62,"./ReactChildren":70,"./ReactClass":71,"./ReactComponent":72,"./ReactContext":77,"./ReactCurrentOwner":78,"./ReactDOM":79,"./ReactDOMTextComponent":90,"./ReactDefaultInjection":93,"./ReactElement":96,"./ReactElementValidator":97,"./ReactInstanceHandles":105,"./ReactMount":110,"./ReactPerf":115,"./ReactPropTypes":119,"./ReactReconciler":122,"./ReactServerRendering":125,"./findDOMNode":166,"./onlyChild":194,"_process":208}],65:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -15454,7 +14690,7 @@ var ReactBrowserComponentMixin = { module.exports = ReactBrowserComponentMixin; -},{"./findDOMNode":238}],138:[function(require,module,exports){ +},{"./findDOMNode":166}],66:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -15807,7 +15043,7 @@ var ReactBrowserEventEmitter = assign({}, ReactEventEmitterMixin, { module.exports = ReactBrowserEventEmitter; -},{"./EventConstants":121,"./EventPluginHub":123,"./EventPluginRegistry":124,"./Object.assign":134,"./ReactEventEmitterMixin":172,"./ViewportMetrics":223,"./isEventSupported":257}],139:[function(require,module,exports){ +},{"./EventConstants":49,"./EventPluginHub":51,"./EventPluginRegistry":52,"./Object.assign":62,"./ReactEventEmitterMixin":100,"./ViewportMetrics":151,"./isEventSupported":185}],67:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -15877,7 +15113,7 @@ var ReactCSSTransitionGroup = React.createClass({ module.exports = ReactCSSTransitionGroup; -},{"./Object.assign":134,"./React":136,"./ReactCSSTransitionGroupChild":140,"./ReactTransitionGroup":203}],140:[function(require,module,exports){ +},{"./Object.assign":62,"./React":64,"./ReactCSSTransitionGroupChild":68,"./ReactTransitionGroup":131}],68:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -16026,7 +15262,7 @@ module.exports = ReactCSSTransitionGroupChild; }).call(this,require('_process')) -},{"./CSSCore":109,"./React":136,"./ReactTransitionEvents":202,"./onlyChild":266,"./warning":277,"_process":280}],141:[function(require,module,exports){ +},{"./CSSCore":37,"./React":64,"./ReactTransitionEvents":130,"./onlyChild":194,"./warning":205,"_process":208}],69:[function(require,module,exports){ /** * Copyright 2014-2015, Facebook, Inc. * All rights reserved. @@ -16153,7 +15389,7 @@ var ReactChildReconciler = { module.exports = ReactChildReconciler; -},{"./ReactReconciler":194,"./flattenChildren":239,"./instantiateReactComponent":255,"./shouldUpdateReactComponent":273}],142:[function(require,module,exports){ +},{"./ReactReconciler":122,"./flattenChildren":167,"./instantiateReactComponent":183,"./shouldUpdateReactComponent":201}],70:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -16307,7 +15543,7 @@ module.exports = ReactChildren; }).call(this,require('_process')) -},{"./PooledClass":135,"./ReactFragment":174,"./traverseAllChildren":275,"./warning":277,"_process":280}],143:[function(require,module,exports){ +},{"./PooledClass":63,"./ReactFragment":102,"./traverseAllChildren":203,"./warning":205,"_process":208}],71:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -17254,7 +16490,7 @@ module.exports = ReactClass; }).call(this,require('_process')) -},{"./Object.assign":134,"./ReactComponent":144,"./ReactCurrentOwner":150,"./ReactElement":168,"./ReactErrorUtils":171,"./ReactInstanceMap":178,"./ReactLifeCycle":179,"./ReactPropTypeLocationNames":189,"./ReactPropTypeLocations":190,"./ReactUpdateQueue":204,"./invariant":256,"./keyMirror":262,"./keyOf":263,"./warning":277,"_process":280}],144:[function(require,module,exports){ +},{"./Object.assign":62,"./ReactComponent":72,"./ReactCurrentOwner":78,"./ReactElement":96,"./ReactErrorUtils":99,"./ReactInstanceMap":106,"./ReactLifeCycle":107,"./ReactPropTypeLocationNames":117,"./ReactPropTypeLocations":118,"./ReactUpdateQueue":132,"./invariant":184,"./keyMirror":190,"./keyOf":191,"./warning":205,"_process":208}],72:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -17409,7 +16645,7 @@ module.exports = ReactComponent; }).call(this,require('_process')) -},{"./ReactUpdateQueue":204,"./invariant":256,"./warning":277,"_process":280}],145:[function(require,module,exports){ +},{"./ReactUpdateQueue":132,"./invariant":184,"./warning":205,"_process":208}],73:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -17456,7 +16692,7 @@ var ReactComponentBrowserEnvironment = { module.exports = ReactComponentBrowserEnvironment; -},{"./ReactDOMIDOperations":155,"./ReactMount":182}],146:[function(require,module,exports){ +},{"./ReactDOMIDOperations":83,"./ReactMount":110}],74:[function(require,module,exports){ (function (process){ /** * Copyright 2014-2015, Facebook, Inc. @@ -17518,7 +16754,7 @@ module.exports = ReactComponentEnvironment; }).call(this,require('_process')) -},{"./invariant":256,"_process":280}],147:[function(require,module,exports){ +},{"./invariant":184,"_process":208}],75:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -17567,7 +16803,7 @@ var ReactComponentWithPureRenderMixin = { module.exports = ReactComponentWithPureRenderMixin; -},{"./shallowEqual":272}],148:[function(require,module,exports){ +},{"./shallowEqual":200}],76:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -18481,7 +17717,7 @@ module.exports = ReactCompositeComponent; }).call(this,require('_process')) -},{"./Object.assign":134,"./ReactComponentEnvironment":146,"./ReactContext":149,"./ReactCurrentOwner":150,"./ReactElement":168,"./ReactElementValidator":169,"./ReactInstanceMap":178,"./ReactLifeCycle":179,"./ReactNativeComponent":185,"./ReactPerf":187,"./ReactPropTypeLocationNames":189,"./ReactPropTypeLocations":190,"./ReactReconciler":194,"./ReactUpdates":205,"./emptyObject":236,"./invariant":256,"./shouldUpdateReactComponent":273,"./warning":277,"_process":280}],149:[function(require,module,exports){ +},{"./Object.assign":62,"./ReactComponentEnvironment":74,"./ReactContext":77,"./ReactCurrentOwner":78,"./ReactElement":96,"./ReactElementValidator":97,"./ReactInstanceMap":106,"./ReactLifeCycle":107,"./ReactNativeComponent":113,"./ReactPerf":115,"./ReactPropTypeLocationNames":117,"./ReactPropTypeLocations":118,"./ReactReconciler":122,"./ReactUpdates":133,"./emptyObject":164,"./invariant":184,"./shouldUpdateReactComponent":201,"./warning":205,"_process":208}],77:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -18560,7 +17796,7 @@ module.exports = ReactContext; }).call(this,require('_process')) -},{"./Object.assign":134,"./emptyObject":236,"./warning":277,"_process":280}],150:[function(require,module,exports){ +},{"./Object.assign":62,"./emptyObject":164,"./warning":205,"_process":208}],78:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -18594,7 +17830,7 @@ var ReactCurrentOwner = { module.exports = ReactCurrentOwner; -},{}],151:[function(require,module,exports){ +},{}],79:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -18774,7 +18010,7 @@ module.exports = ReactDOM; }).call(this,require('_process')) -},{"./ReactElement":168,"./ReactElementValidator":169,"./mapObject":264,"_process":280}],152:[function(require,module,exports){ +},{"./ReactElement":96,"./ReactElementValidator":97,"./mapObject":192,"_process":208}],80:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -18838,7 +18074,7 @@ var ReactDOMButton = ReactClass.createClass({ module.exports = ReactDOMButton; -},{"./AutoFocusMixin":107,"./ReactBrowserComponentMixin":137,"./ReactClass":143,"./ReactElement":168,"./keyMirror":262}],153:[function(require,module,exports){ +},{"./AutoFocusMixin":35,"./ReactBrowserComponentMixin":65,"./ReactClass":71,"./ReactElement":96,"./keyMirror":190}],81:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -19349,7 +18585,7 @@ module.exports = ReactDOMComponent; }).call(this,require('_process')) -},{"./CSSPropertyOperations":111,"./DOMProperty":116,"./DOMPropertyOperations":117,"./Object.assign":134,"./ReactBrowserEventEmitter":138,"./ReactComponentBrowserEnvironment":145,"./ReactMount":182,"./ReactMultiChild":183,"./ReactPerf":187,"./escapeTextContentForBrowser":237,"./invariant":256,"./isEventSupported":257,"./keyOf":263,"./warning":277,"_process":280}],154:[function(require,module,exports){ +},{"./CSSPropertyOperations":39,"./DOMProperty":44,"./DOMPropertyOperations":45,"./Object.assign":62,"./ReactBrowserEventEmitter":66,"./ReactComponentBrowserEnvironment":73,"./ReactMount":110,"./ReactMultiChild":111,"./ReactPerf":115,"./escapeTextContentForBrowser":165,"./invariant":184,"./isEventSupported":185,"./keyOf":191,"./warning":205,"_process":208}],82:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -19398,7 +18634,7 @@ var ReactDOMForm = ReactClass.createClass({ module.exports = ReactDOMForm; -},{"./EventConstants":121,"./LocalEventTrapMixin":132,"./ReactBrowserComponentMixin":137,"./ReactClass":143,"./ReactElement":168}],155:[function(require,module,exports){ +},{"./EventConstants":49,"./LocalEventTrapMixin":60,"./ReactBrowserComponentMixin":65,"./ReactClass":71,"./ReactElement":96}],83:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -19567,7 +18803,7 @@ module.exports = ReactDOMIDOperations; }).call(this,require('_process')) -},{"./CSSPropertyOperations":111,"./DOMChildrenOperations":115,"./DOMPropertyOperations":117,"./ReactMount":182,"./ReactPerf":187,"./invariant":256,"./setInnerHTML":270,"_process":280}],156:[function(require,module,exports){ +},{"./CSSPropertyOperations":39,"./DOMChildrenOperations":43,"./DOMPropertyOperations":45,"./ReactMount":110,"./ReactPerf":115,"./invariant":184,"./setInnerHTML":198,"_process":208}],84:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -19612,7 +18848,7 @@ var ReactDOMIframe = ReactClass.createClass({ module.exports = ReactDOMIframe; -},{"./EventConstants":121,"./LocalEventTrapMixin":132,"./ReactBrowserComponentMixin":137,"./ReactClass":143,"./ReactElement":168}],157:[function(require,module,exports){ +},{"./EventConstants":49,"./LocalEventTrapMixin":60,"./ReactBrowserComponentMixin":65,"./ReactClass":71,"./ReactElement":96}],85:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -19658,7 +18894,7 @@ var ReactDOMImg = ReactClass.createClass({ module.exports = ReactDOMImg; -},{"./EventConstants":121,"./LocalEventTrapMixin":132,"./ReactBrowserComponentMixin":137,"./ReactClass":143,"./ReactElement":168}],158:[function(require,module,exports){ +},{"./EventConstants":49,"./LocalEventTrapMixin":60,"./ReactBrowserComponentMixin":65,"./ReactClass":71,"./ReactElement":96}],86:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -19836,7 +19072,7 @@ module.exports = ReactDOMInput; }).call(this,require('_process')) -},{"./AutoFocusMixin":107,"./DOMPropertyOperations":117,"./LinkedValueUtils":131,"./Object.assign":134,"./ReactBrowserComponentMixin":137,"./ReactClass":143,"./ReactElement":168,"./ReactMount":182,"./ReactUpdates":205,"./invariant":256,"_process":280}],159:[function(require,module,exports){ +},{"./AutoFocusMixin":35,"./DOMPropertyOperations":45,"./LinkedValueUtils":59,"./Object.assign":62,"./ReactBrowserComponentMixin":65,"./ReactClass":71,"./ReactElement":96,"./ReactMount":110,"./ReactUpdates":133,"./invariant":184,"_process":208}],87:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -19889,7 +19125,7 @@ module.exports = ReactDOMOption; }).call(this,require('_process')) -},{"./ReactBrowserComponentMixin":137,"./ReactClass":143,"./ReactElement":168,"./warning":277,"_process":280}],160:[function(require,module,exports){ +},{"./ReactBrowserComponentMixin":65,"./ReactClass":71,"./ReactElement":96,"./warning":205,"_process":208}],88:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -20067,7 +19303,7 @@ var ReactDOMSelect = ReactClass.createClass({ module.exports = ReactDOMSelect; -},{"./AutoFocusMixin":107,"./LinkedValueUtils":131,"./Object.assign":134,"./ReactBrowserComponentMixin":137,"./ReactClass":143,"./ReactElement":168,"./ReactUpdates":205}],161:[function(require,module,exports){ +},{"./AutoFocusMixin":35,"./LinkedValueUtils":59,"./Object.assign":62,"./ReactBrowserComponentMixin":65,"./ReactClass":71,"./ReactElement":96,"./ReactUpdates":133}],89:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -20280,7 +19516,7 @@ var ReactDOMSelection = { module.exports = ReactDOMSelection; -},{"./ExecutionEnvironment":127,"./getNodeForCharacterOffset":249,"./getTextContentAccessor":251}],162:[function(require,module,exports){ +},{"./ExecutionEnvironment":55,"./getNodeForCharacterOffset":177,"./getTextContentAccessor":179}],90:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -20397,7 +19633,7 @@ assign(ReactDOMTextComponent.prototype, { module.exports = ReactDOMTextComponent; -},{"./DOMPropertyOperations":117,"./Object.assign":134,"./ReactComponentBrowserEnvironment":145,"./ReactDOMComponent":153,"./escapeTextContentForBrowser":237}],163:[function(require,module,exports){ +},{"./DOMPropertyOperations":45,"./Object.assign":62,"./ReactComponentBrowserEnvironment":73,"./ReactDOMComponent":81,"./escapeTextContentForBrowser":165}],91:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -20538,7 +19774,7 @@ module.exports = ReactDOMTextarea; }).call(this,require('_process')) -},{"./AutoFocusMixin":107,"./DOMPropertyOperations":117,"./LinkedValueUtils":131,"./Object.assign":134,"./ReactBrowserComponentMixin":137,"./ReactClass":143,"./ReactElement":168,"./ReactUpdates":205,"./invariant":256,"./warning":277,"_process":280}],164:[function(require,module,exports){ +},{"./AutoFocusMixin":35,"./DOMPropertyOperations":45,"./LinkedValueUtils":59,"./Object.assign":62,"./ReactBrowserComponentMixin":65,"./ReactClass":71,"./ReactElement":96,"./ReactUpdates":133,"./invariant":184,"./warning":205,"_process":208}],92:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -20611,7 +19847,7 @@ var ReactDefaultBatchingStrategy = { module.exports = ReactDefaultBatchingStrategy; -},{"./Object.assign":134,"./ReactUpdates":205,"./Transaction":222,"./emptyFunction":235}],165:[function(require,module,exports){ +},{"./Object.assign":62,"./ReactUpdates":133,"./Transaction":150,"./emptyFunction":163}],93:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -20771,7 +20007,7 @@ module.exports = { }).call(this,require('_process')) -},{"./BeforeInputEventPlugin":108,"./ChangeEventPlugin":113,"./ClientReactRootIndex":114,"./DefaultEventPluginOrder":119,"./EnterLeaveEventPlugin":120,"./ExecutionEnvironment":127,"./HTMLDOMPropertyConfig":129,"./MobileSafariClickEventPlugin":133,"./ReactBrowserComponentMixin":137,"./ReactClass":143,"./ReactComponentBrowserEnvironment":145,"./ReactDOMButton":152,"./ReactDOMComponent":153,"./ReactDOMForm":154,"./ReactDOMIDOperations":155,"./ReactDOMIframe":156,"./ReactDOMImg":157,"./ReactDOMInput":158,"./ReactDOMOption":159,"./ReactDOMSelect":160,"./ReactDOMTextComponent":162,"./ReactDOMTextarea":163,"./ReactDefaultBatchingStrategy":164,"./ReactDefaultPerf":166,"./ReactElement":168,"./ReactEventListener":173,"./ReactInjection":175,"./ReactInstanceHandles":177,"./ReactMount":182,"./ReactReconcileTransaction":193,"./SVGDOMPropertyConfig":207,"./SelectEventPlugin":208,"./ServerReactRootIndex":209,"./SimpleEventPlugin":210,"./createFullPageComponent":231,"_process":280}],166:[function(require,module,exports){ +},{"./BeforeInputEventPlugin":36,"./ChangeEventPlugin":41,"./ClientReactRootIndex":42,"./DefaultEventPluginOrder":47,"./EnterLeaveEventPlugin":48,"./ExecutionEnvironment":55,"./HTMLDOMPropertyConfig":57,"./MobileSafariClickEventPlugin":61,"./ReactBrowserComponentMixin":65,"./ReactClass":71,"./ReactComponentBrowserEnvironment":73,"./ReactDOMButton":80,"./ReactDOMComponent":81,"./ReactDOMForm":82,"./ReactDOMIDOperations":83,"./ReactDOMIframe":84,"./ReactDOMImg":85,"./ReactDOMInput":86,"./ReactDOMOption":87,"./ReactDOMSelect":88,"./ReactDOMTextComponent":90,"./ReactDOMTextarea":91,"./ReactDefaultBatchingStrategy":92,"./ReactDefaultPerf":94,"./ReactElement":96,"./ReactEventListener":101,"./ReactInjection":103,"./ReactInstanceHandles":105,"./ReactMount":110,"./ReactReconcileTransaction":121,"./SVGDOMPropertyConfig":135,"./SelectEventPlugin":136,"./ServerReactRootIndex":137,"./SimpleEventPlugin":138,"./createFullPageComponent":159,"_process":208}],94:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -21037,7 +20273,7 @@ var ReactDefaultPerf = { module.exports = ReactDefaultPerf; -},{"./DOMProperty":116,"./ReactDefaultPerfAnalysis":167,"./ReactMount":182,"./ReactPerf":187,"./performanceNow":268}],167:[function(require,module,exports){ +},{"./DOMProperty":44,"./ReactDefaultPerfAnalysis":95,"./ReactMount":110,"./ReactPerf":115,"./performanceNow":196}],95:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -21243,7 +20479,7 @@ var ReactDefaultPerfAnalysis = { module.exports = ReactDefaultPerfAnalysis; -},{"./Object.assign":134}],168:[function(require,module,exports){ +},{"./Object.assign":62}],96:[function(require,module,exports){ (function (process){ /** * Copyright 2014-2015, Facebook, Inc. @@ -21552,7 +20788,7 @@ module.exports = ReactElement; }).call(this,require('_process')) -},{"./Object.assign":134,"./ReactContext":149,"./ReactCurrentOwner":150,"./warning":277,"_process":280}],169:[function(require,module,exports){ +},{"./Object.assign":62,"./ReactContext":77,"./ReactCurrentOwner":78,"./warning":205,"_process":208}],97:[function(require,module,exports){ (function (process){ /** * Copyright 2014-2015, Facebook, Inc. @@ -22018,7 +21254,7 @@ module.exports = ReactElementValidator; }).call(this,require('_process')) -},{"./ReactCurrentOwner":150,"./ReactElement":168,"./ReactFragment":174,"./ReactNativeComponent":185,"./ReactPropTypeLocationNames":189,"./ReactPropTypeLocations":190,"./getIteratorFn":247,"./invariant":256,"./warning":277,"_process":280}],170:[function(require,module,exports){ +},{"./ReactCurrentOwner":78,"./ReactElement":96,"./ReactFragment":102,"./ReactNativeComponent":113,"./ReactPropTypeLocationNames":117,"./ReactPropTypeLocations":118,"./getIteratorFn":175,"./invariant":184,"./warning":205,"_process":208}],98:[function(require,module,exports){ (function (process){ /** * Copyright 2014-2015, Facebook, Inc. @@ -22114,7 +21350,7 @@ module.exports = ReactEmptyComponent; }).call(this,require('_process')) -},{"./ReactElement":168,"./ReactInstanceMap":178,"./invariant":256,"_process":280}],171:[function(require,module,exports){ +},{"./ReactElement":96,"./ReactInstanceMap":106,"./invariant":184,"_process":208}],99:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -22146,7 +21382,7 @@ var ReactErrorUtils = { module.exports = ReactErrorUtils; -},{}],172:[function(require,module,exports){ +},{}],100:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -22196,7 +21432,7 @@ var ReactEventEmitterMixin = { module.exports = ReactEventEmitterMixin; -},{"./EventPluginHub":123}],173:[function(require,module,exports){ +},{"./EventPluginHub":51}],101:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -22379,7 +21615,7 @@ var ReactEventListener = { module.exports = ReactEventListener; -},{"./EventListener":122,"./ExecutionEnvironment":127,"./Object.assign":134,"./PooledClass":135,"./ReactInstanceHandles":177,"./ReactMount":182,"./ReactUpdates":205,"./getEventTarget":246,"./getUnboundedScrollPosition":252}],174:[function(require,module,exports){ +},{"./EventListener":50,"./ExecutionEnvironment":55,"./Object.assign":62,"./PooledClass":63,"./ReactInstanceHandles":105,"./ReactMount":110,"./ReactUpdates":133,"./getEventTarget":174,"./getUnboundedScrollPosition":180}],102:[function(require,module,exports){ (function (process){ /** * Copyright 2015, Facebook, Inc. @@ -22565,7 +21801,7 @@ module.exports = ReactFragment; }).call(this,require('_process')) -},{"./ReactElement":168,"./warning":277,"_process":280}],175:[function(require,module,exports){ +},{"./ReactElement":96,"./warning":205,"_process":208}],103:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -22607,7 +21843,7 @@ var ReactInjection = { module.exports = ReactInjection; -},{"./DOMProperty":116,"./EventPluginHub":123,"./ReactBrowserEventEmitter":138,"./ReactClass":143,"./ReactComponentEnvironment":146,"./ReactDOMComponent":153,"./ReactEmptyComponent":170,"./ReactNativeComponent":185,"./ReactPerf":187,"./ReactRootIndex":196,"./ReactUpdates":205}],176:[function(require,module,exports){ +},{"./DOMProperty":44,"./EventPluginHub":51,"./ReactBrowserEventEmitter":66,"./ReactClass":71,"./ReactComponentEnvironment":74,"./ReactDOMComponent":81,"./ReactEmptyComponent":98,"./ReactNativeComponent":113,"./ReactPerf":115,"./ReactRootIndex":124,"./ReactUpdates":133}],104:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -22742,7 +21978,7 @@ var ReactInputSelection = { module.exports = ReactInputSelection; -},{"./ReactDOMSelection":161,"./containsNode":229,"./focusNode":240,"./getActiveElement":242}],177:[function(require,module,exports){ +},{"./ReactDOMSelection":89,"./containsNode":157,"./focusNode":168,"./getActiveElement":170}],105:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -23079,7 +22315,7 @@ module.exports = ReactInstanceHandles; }).call(this,require('_process')) -},{"./ReactRootIndex":196,"./invariant":256,"_process":280}],178:[function(require,module,exports){ +},{"./ReactRootIndex":124,"./invariant":184,"_process":208}],106:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -23128,7 +22364,7 @@ var ReactInstanceMap = { module.exports = ReactInstanceMap; -},{}],179:[function(require,module,exports){ +},{}],107:[function(require,module,exports){ /** * Copyright 2015, Facebook, Inc. * All rights reserved. @@ -23165,7 +22401,7 @@ var ReactLifeCycle = { module.exports = ReactLifeCycle; -},{}],180:[function(require,module,exports){ +},{}],108:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -23238,7 +22474,7 @@ ReactLink.PropTypes = { module.exports = ReactLink; -},{"./React":136}],181:[function(require,module,exports){ +},{"./React":64}],109:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -23286,7 +22522,7 @@ var ReactMarkupChecksum = { module.exports = ReactMarkupChecksum; -},{"./adler32":225}],182:[function(require,module,exports){ +},{"./adler32":153}],110:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -24178,7 +23414,7 @@ module.exports = ReactMount; }).call(this,require('_process')) -},{"./DOMProperty":116,"./ReactBrowserEventEmitter":138,"./ReactCurrentOwner":150,"./ReactElement":168,"./ReactElementValidator":169,"./ReactEmptyComponent":170,"./ReactInstanceHandles":177,"./ReactInstanceMap":178,"./ReactMarkupChecksum":181,"./ReactPerf":187,"./ReactReconciler":194,"./ReactUpdateQueue":204,"./ReactUpdates":205,"./containsNode":229,"./emptyObject":236,"./getReactRootElementInContainer":250,"./instantiateReactComponent":255,"./invariant":256,"./setInnerHTML":270,"./shouldUpdateReactComponent":273,"./warning":277,"_process":280}],183:[function(require,module,exports){ +},{"./DOMProperty":44,"./ReactBrowserEventEmitter":66,"./ReactCurrentOwner":78,"./ReactElement":96,"./ReactElementValidator":97,"./ReactEmptyComponent":98,"./ReactInstanceHandles":105,"./ReactInstanceMap":106,"./ReactMarkupChecksum":109,"./ReactPerf":115,"./ReactReconciler":122,"./ReactUpdateQueue":132,"./ReactUpdates":133,"./containsNode":157,"./emptyObject":164,"./getReactRootElementInContainer":178,"./instantiateReactComponent":183,"./invariant":184,"./setInnerHTML":198,"./shouldUpdateReactComponent":201,"./warning":205,"_process":208}],111:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -24608,7 +23844,7 @@ var ReactMultiChild = { module.exports = ReactMultiChild; -},{"./ReactChildReconciler":141,"./ReactComponentEnvironment":146,"./ReactMultiChildUpdateTypes":184,"./ReactReconciler":194}],184:[function(require,module,exports){ +},{"./ReactChildReconciler":69,"./ReactComponentEnvironment":74,"./ReactMultiChildUpdateTypes":112,"./ReactReconciler":122}],112:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -24641,7 +23877,7 @@ var ReactMultiChildUpdateTypes = keyMirror({ module.exports = ReactMultiChildUpdateTypes; -},{"./keyMirror":262}],185:[function(require,module,exports){ +},{"./keyMirror":190}],113:[function(require,module,exports){ (function (process){ /** * Copyright 2014-2015, Facebook, Inc. @@ -24749,7 +23985,7 @@ module.exports = ReactNativeComponent; }).call(this,require('_process')) -},{"./Object.assign":134,"./invariant":256,"_process":280}],186:[function(require,module,exports){ +},{"./Object.assign":62,"./invariant":184,"_process":208}],114:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -24862,7 +24098,7 @@ module.exports = ReactOwner; }).call(this,require('_process')) -},{"./invariant":256,"_process":280}],187:[function(require,module,exports){ +},{"./invariant":184,"_process":208}],115:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -24967,7 +24203,7 @@ module.exports = ReactPerf; }).call(this,require('_process')) -},{"_process":280}],188:[function(require,module,exports){ +},{"_process":208}],116:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -25077,7 +24313,7 @@ var ReactPropTransferer = { module.exports = ReactPropTransferer; -},{"./Object.assign":134,"./emptyFunction":235,"./joinClasses":261}],189:[function(require,module,exports){ +},{"./Object.assign":62,"./emptyFunction":163,"./joinClasses":189}],117:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -25106,7 +24342,7 @@ module.exports = ReactPropTypeLocationNames; }).call(this,require('_process')) -},{"_process":280}],190:[function(require,module,exports){ +},{"_process":208}],118:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -25130,7 +24366,7 @@ var ReactPropTypeLocations = keyMirror({ module.exports = ReactPropTypeLocations; -},{"./keyMirror":262}],191:[function(require,module,exports){ +},{"./keyMirror":190}],119:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -25479,7 +24715,7 @@ function getPreciseType(propValue) { module.exports = ReactPropTypes; -},{"./ReactElement":168,"./ReactFragment":174,"./ReactPropTypeLocationNames":189,"./emptyFunction":235}],192:[function(require,module,exports){ +},{"./ReactElement":96,"./ReactFragment":102,"./ReactPropTypeLocationNames":117,"./emptyFunction":163}],120:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -25535,7 +24771,7 @@ PooledClass.addPoolingTo(ReactPutListenerQueue); module.exports = ReactPutListenerQueue; -},{"./Object.assign":134,"./PooledClass":135,"./ReactBrowserEventEmitter":138}],193:[function(require,module,exports){ +},{"./Object.assign":62,"./PooledClass":63,"./ReactBrowserEventEmitter":66}],121:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -25711,7 +24947,7 @@ PooledClass.addPoolingTo(ReactReconcileTransaction); module.exports = ReactReconcileTransaction; -},{"./CallbackQueue":112,"./Object.assign":134,"./PooledClass":135,"./ReactBrowserEventEmitter":138,"./ReactInputSelection":176,"./ReactPutListenerQueue":192,"./Transaction":222}],194:[function(require,module,exports){ +},{"./CallbackQueue":40,"./Object.assign":62,"./PooledClass":63,"./ReactBrowserEventEmitter":66,"./ReactInputSelection":104,"./ReactPutListenerQueue":120,"./Transaction":150}],122:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -25836,7 +25072,7 @@ module.exports = ReactReconciler; }).call(this,require('_process')) -},{"./ReactElementValidator":169,"./ReactRef":195,"_process":280}],195:[function(require,module,exports){ +},{"./ReactElementValidator":97,"./ReactRef":123,"_process":208}],123:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -25907,7 +25143,7 @@ ReactRef.detachRefs = function(instance, element) { module.exports = ReactRef; -},{"./ReactOwner":186}],196:[function(require,module,exports){ +},{"./ReactOwner":114}],124:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -25938,7 +25174,7 @@ var ReactRootIndex = { module.exports = ReactRootIndex; -},{}],197:[function(require,module,exports){ +},{}],125:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -26021,7 +25257,7 @@ module.exports = { }).call(this,require('_process')) -},{"./ReactElement":168,"./ReactInstanceHandles":177,"./ReactMarkupChecksum":181,"./ReactServerRenderingTransaction":198,"./emptyObject":236,"./instantiateReactComponent":255,"./invariant":256,"_process":280}],198:[function(require,module,exports){ +},{"./ReactElement":96,"./ReactInstanceHandles":105,"./ReactMarkupChecksum":109,"./ReactServerRenderingTransaction":126,"./emptyObject":164,"./instantiateReactComponent":183,"./invariant":184,"_process":208}],126:[function(require,module,exports){ /** * Copyright 2014-2015, Facebook, Inc. * All rights reserved. @@ -26134,7 +25370,7 @@ PooledClass.addPoolingTo(ReactServerRenderingTransaction); module.exports = ReactServerRenderingTransaction; -},{"./CallbackQueue":112,"./Object.assign":134,"./PooledClass":135,"./ReactPutListenerQueue":192,"./Transaction":222,"./emptyFunction":235}],199:[function(require,module,exports){ +},{"./CallbackQueue":40,"./Object.assign":62,"./PooledClass":63,"./ReactPutListenerQueue":120,"./Transaction":150,"./emptyFunction":163}],127:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -26240,7 +25476,7 @@ ReactStateSetters.Mixin = { module.exports = ReactStateSetters; -},{}],200:[function(require,module,exports){ +},{}],128:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -26754,7 +25990,7 @@ for (eventType in topLevelTypes) { module.exports = ReactTestUtils; -},{"./EventConstants":121,"./EventPluginHub":123,"./EventPropagators":126,"./Object.assign":134,"./React":136,"./ReactBrowserEventEmitter":138,"./ReactCompositeComponent":148,"./ReactElement":168,"./ReactEmptyComponent":170,"./ReactInstanceHandles":177,"./ReactInstanceMap":178,"./ReactMount":182,"./ReactUpdates":205,"./SyntheticEvent":214,"./emptyObject":236}],201:[function(require,module,exports){ +},{"./EventConstants":49,"./EventPluginHub":51,"./EventPropagators":54,"./Object.assign":62,"./React":64,"./ReactBrowserEventEmitter":66,"./ReactCompositeComponent":76,"./ReactElement":96,"./ReactEmptyComponent":98,"./ReactInstanceHandles":105,"./ReactInstanceMap":106,"./ReactMount":110,"./ReactUpdates":133,"./SyntheticEvent":142,"./emptyObject":164}],129:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -26859,7 +26095,7 @@ var ReactTransitionChildMapping = { module.exports = ReactTransitionChildMapping; -},{"./ReactChildren":142,"./ReactFragment":174}],202:[function(require,module,exports){ +},{"./ReactChildren":70,"./ReactFragment":102}],130:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -26970,7 +26206,7 @@ var ReactTransitionEvents = { module.exports = ReactTransitionEvents; -},{"./ExecutionEnvironment":127}],203:[function(require,module,exports){ +},{"./ExecutionEnvironment":55}],131:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -27200,7 +26436,7 @@ var ReactTransitionGroup = React.createClass({ module.exports = ReactTransitionGroup; -},{"./Object.assign":134,"./React":136,"./ReactTransitionChildMapping":201,"./cloneWithProps":228,"./emptyFunction":235}],204:[function(require,module,exports){ +},{"./Object.assign":62,"./React":64,"./ReactTransitionChildMapping":129,"./cloneWithProps":156,"./emptyFunction":163}],132:[function(require,module,exports){ (function (process){ /** * Copyright 2015, Facebook, Inc. @@ -27500,7 +26736,7 @@ module.exports = ReactUpdateQueue; }).call(this,require('_process')) -},{"./Object.assign":134,"./ReactCurrentOwner":150,"./ReactElement":168,"./ReactInstanceMap":178,"./ReactLifeCycle":179,"./ReactUpdates":205,"./invariant":256,"./warning":277,"_process":280}],205:[function(require,module,exports){ +},{"./Object.assign":62,"./ReactCurrentOwner":78,"./ReactElement":96,"./ReactInstanceMap":106,"./ReactLifeCycle":107,"./ReactUpdates":133,"./invariant":184,"./warning":205,"_process":208}],133:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -27783,7 +27019,7 @@ module.exports = ReactUpdates; }).call(this,require('_process')) -},{"./CallbackQueue":112,"./Object.assign":134,"./PooledClass":135,"./ReactCurrentOwner":150,"./ReactPerf":187,"./ReactReconciler":194,"./Transaction":222,"./invariant":256,"./warning":277,"_process":280}],206:[function(require,module,exports){ +},{"./CallbackQueue":40,"./Object.assign":62,"./PooledClass":63,"./ReactCurrentOwner":78,"./ReactPerf":115,"./ReactReconciler":122,"./Transaction":150,"./invariant":184,"./warning":205,"_process":208}],134:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -27840,7 +27076,7 @@ module.exports = React; }).call(this,require('_process')) -},{"./LinkedStateMixin":130,"./React":136,"./ReactCSSTransitionGroup":139,"./ReactComponentWithPureRenderMixin":147,"./ReactDefaultPerf":166,"./ReactFragment":174,"./ReactTestUtils":200,"./ReactTransitionGroup":203,"./ReactUpdates":205,"./cloneWithProps":228,"./cx":233,"./update":276,"_process":280}],207:[function(require,module,exports){ +},{"./LinkedStateMixin":58,"./React":64,"./ReactCSSTransitionGroup":67,"./ReactComponentWithPureRenderMixin":75,"./ReactDefaultPerf":94,"./ReactFragment":102,"./ReactTestUtils":128,"./ReactTransitionGroup":131,"./ReactUpdates":133,"./cloneWithProps":156,"./cx":161,"./update":204,"_process":208}],135:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -27934,7 +27170,7 @@ var SVGDOMPropertyConfig = { module.exports = SVGDOMPropertyConfig; -},{"./DOMProperty":116}],208:[function(require,module,exports){ +},{"./DOMProperty":44}],136:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -28129,7 +27365,7 @@ var SelectEventPlugin = { module.exports = SelectEventPlugin; -},{"./EventConstants":121,"./EventPropagators":126,"./ReactInputSelection":176,"./SyntheticEvent":214,"./getActiveElement":242,"./isTextInputElement":259,"./keyOf":263,"./shallowEqual":272}],209:[function(require,module,exports){ +},{"./EventConstants":49,"./EventPropagators":54,"./ReactInputSelection":104,"./SyntheticEvent":142,"./getActiveElement":170,"./isTextInputElement":187,"./keyOf":191,"./shallowEqual":200}],137:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -28160,7 +27396,7 @@ var ServerReactRootIndex = { module.exports = ServerReactRootIndex; -},{}],210:[function(require,module,exports){ +},{}],138:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -28589,7 +27825,7 @@ module.exports = SimpleEventPlugin; }).call(this,require('_process')) -},{"./EventConstants":121,"./EventPluginUtils":125,"./EventPropagators":126,"./SyntheticClipboardEvent":211,"./SyntheticDragEvent":213,"./SyntheticEvent":214,"./SyntheticFocusEvent":215,"./SyntheticKeyboardEvent":217,"./SyntheticMouseEvent":218,"./SyntheticTouchEvent":219,"./SyntheticUIEvent":220,"./SyntheticWheelEvent":221,"./getEventCharCode":243,"./invariant":256,"./keyOf":263,"./warning":277,"_process":280}],211:[function(require,module,exports){ +},{"./EventConstants":49,"./EventPluginUtils":53,"./EventPropagators":54,"./SyntheticClipboardEvent":139,"./SyntheticDragEvent":141,"./SyntheticEvent":142,"./SyntheticFocusEvent":143,"./SyntheticKeyboardEvent":145,"./SyntheticMouseEvent":146,"./SyntheticTouchEvent":147,"./SyntheticUIEvent":148,"./SyntheticWheelEvent":149,"./getEventCharCode":171,"./invariant":184,"./keyOf":191,"./warning":205,"_process":208}],139:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -28634,7 +27870,7 @@ SyntheticEvent.augmentClass(SyntheticClipboardEvent, ClipboardEventInterface); module.exports = SyntheticClipboardEvent; -},{"./SyntheticEvent":214}],212:[function(require,module,exports){ +},{"./SyntheticEvent":142}],140:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -28679,7 +27915,7 @@ SyntheticEvent.augmentClass( module.exports = SyntheticCompositionEvent; -},{"./SyntheticEvent":214}],213:[function(require,module,exports){ +},{"./SyntheticEvent":142}],141:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -28718,7 +27954,7 @@ SyntheticMouseEvent.augmentClass(SyntheticDragEvent, DragEventInterface); module.exports = SyntheticDragEvent; -},{"./SyntheticMouseEvent":218}],214:[function(require,module,exports){ +},{"./SyntheticMouseEvent":146}],142:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -28884,7 +28120,7 @@ PooledClass.addPoolingTo(SyntheticEvent, PooledClass.threeArgumentPooler); module.exports = SyntheticEvent; -},{"./Object.assign":134,"./PooledClass":135,"./emptyFunction":235,"./getEventTarget":246}],215:[function(require,module,exports){ +},{"./Object.assign":62,"./PooledClass":63,"./emptyFunction":163,"./getEventTarget":174}],143:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -28923,7 +28159,7 @@ SyntheticUIEvent.augmentClass(SyntheticFocusEvent, FocusEventInterface); module.exports = SyntheticFocusEvent; -},{"./SyntheticUIEvent":220}],216:[function(require,module,exports){ +},{"./SyntheticUIEvent":148}],144:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -28969,7 +28205,7 @@ SyntheticEvent.augmentClass( module.exports = SyntheticInputEvent; -},{"./SyntheticEvent":214}],217:[function(require,module,exports){ +},{"./SyntheticEvent":142}],145:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -29056,7 +28292,7 @@ SyntheticUIEvent.augmentClass(SyntheticKeyboardEvent, KeyboardEventInterface); module.exports = SyntheticKeyboardEvent; -},{"./SyntheticUIEvent":220,"./getEventCharCode":243,"./getEventKey":244,"./getEventModifierState":245}],218:[function(require,module,exports){ +},{"./SyntheticUIEvent":148,"./getEventCharCode":171,"./getEventKey":172,"./getEventModifierState":173}],146:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -29137,7 +28373,7 @@ SyntheticUIEvent.augmentClass(SyntheticMouseEvent, MouseEventInterface); module.exports = SyntheticMouseEvent; -},{"./SyntheticUIEvent":220,"./ViewportMetrics":223,"./getEventModifierState":245}],219:[function(require,module,exports){ +},{"./SyntheticUIEvent":148,"./ViewportMetrics":151,"./getEventModifierState":173}],147:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -29185,7 +28421,7 @@ SyntheticUIEvent.augmentClass(SyntheticTouchEvent, TouchEventInterface); module.exports = SyntheticTouchEvent; -},{"./SyntheticUIEvent":220,"./getEventModifierState":245}],220:[function(require,module,exports){ +},{"./SyntheticUIEvent":148,"./getEventModifierState":173}],148:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -29247,7 +28483,7 @@ SyntheticEvent.augmentClass(SyntheticUIEvent, UIEventInterface); module.exports = SyntheticUIEvent; -},{"./SyntheticEvent":214,"./getEventTarget":246}],221:[function(require,module,exports){ +},{"./SyntheticEvent":142,"./getEventTarget":174}],149:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -29308,7 +28544,7 @@ SyntheticMouseEvent.augmentClass(SyntheticWheelEvent, WheelEventInterface); module.exports = SyntheticWheelEvent; -},{"./SyntheticMouseEvent":218}],222:[function(require,module,exports){ +},{"./SyntheticMouseEvent":146}],150:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -29550,7 +28786,7 @@ module.exports = Transaction; }).call(this,require('_process')) -},{"./invariant":256,"_process":280}],223:[function(require,module,exports){ +},{"./invariant":184,"_process":208}],151:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -29579,7 +28815,7 @@ var ViewportMetrics = { module.exports = ViewportMetrics; -},{}],224:[function(require,module,exports){ +},{}],152:[function(require,module,exports){ (function (process){ /** * Copyright 2014-2015, Facebook, Inc. @@ -29646,7 +28882,7 @@ module.exports = accumulateInto; }).call(this,require('_process')) -},{"./invariant":256,"_process":280}],225:[function(require,module,exports){ +},{"./invariant":184,"_process":208}],153:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -29680,7 +28916,7 @@ function adler32(data) { module.exports = adler32; -},{}],226:[function(require,module,exports){ +},{}],154:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -29712,7 +28948,7 @@ function camelize(string) { module.exports = camelize; -},{}],227:[function(require,module,exports){ +},{}],155:[function(require,module,exports){ /** * Copyright 2014-2015, Facebook, Inc. * All rights reserved. @@ -29754,7 +28990,7 @@ function camelizeStyleName(string) { module.exports = camelizeStyleName; -},{"./camelize":226}],228:[function(require,module,exports){ +},{"./camelize":154}],156:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -29814,7 +29050,7 @@ module.exports = cloneWithProps; }).call(this,require('_process')) -},{"./ReactElement":168,"./ReactPropTransferer":188,"./keyOf":263,"./warning":277,"_process":280}],229:[function(require,module,exports){ +},{"./ReactElement":96,"./ReactPropTransferer":116,"./keyOf":191,"./warning":205,"_process":208}],157:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -29858,7 +29094,7 @@ function containsNode(outerNode, innerNode) { module.exports = containsNode; -},{"./isTextNode":260}],230:[function(require,module,exports){ +},{"./isTextNode":188}],158:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -29944,7 +29180,7 @@ function createArrayFromMixed(obj) { module.exports = createArrayFromMixed; -},{"./toArray":274}],231:[function(require,module,exports){ +},{"./toArray":202}],159:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -30007,7 +29243,7 @@ module.exports = createFullPageComponent; }).call(this,require('_process')) -},{"./ReactClass":143,"./ReactElement":168,"./invariant":256,"_process":280}],232:[function(require,module,exports){ +},{"./ReactClass":71,"./ReactElement":96,"./invariant":184,"_process":208}],160:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -30098,7 +29334,7 @@ module.exports = createNodesFromMarkup; }).call(this,require('_process')) -},{"./ExecutionEnvironment":127,"./createArrayFromMixed":230,"./getMarkupWrap":248,"./invariant":256,"_process":280}],233:[function(require,module,exports){ +},{"./ExecutionEnvironment":55,"./createArrayFromMixed":158,"./getMarkupWrap":176,"./invariant":184,"_process":208}],161:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -30155,7 +29391,7 @@ module.exports = cx; }).call(this,require('_process')) -},{"./warning":277,"_process":280}],234:[function(require,module,exports){ +},{"./warning":205,"_process":208}],162:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -30213,7 +29449,7 @@ function dangerousStyleValue(name, value) { module.exports = dangerousStyleValue; -},{"./CSSProperty":110}],235:[function(require,module,exports){ +},{"./CSSProperty":38}],163:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -30247,7 +29483,7 @@ emptyFunction.thatReturnsArgument = function(arg) { return arg; }; module.exports = emptyFunction; -},{}],236:[function(require,module,exports){ +},{}],164:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -30272,7 +29508,7 @@ module.exports = emptyObject; }).call(this,require('_process')) -},{"_process":280}],237:[function(require,module,exports){ +},{"_process":208}],165:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -30312,7 +29548,7 @@ function escapeTextContentForBrowser(text) { module.exports = escapeTextContentForBrowser; -},{}],238:[function(require,module,exports){ +},{}],166:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -30386,7 +29622,7 @@ module.exports = findDOMNode; }).call(this,require('_process')) -},{"./ReactCurrentOwner":150,"./ReactInstanceMap":178,"./ReactMount":182,"./invariant":256,"./isNode":258,"./warning":277,"_process":280}],239:[function(require,module,exports){ +},{"./ReactCurrentOwner":78,"./ReactInstanceMap":106,"./ReactMount":110,"./invariant":184,"./isNode":186,"./warning":205,"_process":208}],167:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -30445,7 +29681,7 @@ module.exports = flattenChildren; }).call(this,require('_process')) -},{"./traverseAllChildren":275,"./warning":277,"_process":280}],240:[function(require,module,exports){ +},{"./traverseAllChildren":203,"./warning":205,"_process":208}],168:[function(require,module,exports){ /** * Copyright 2014-2015, Facebook, Inc. * All rights reserved. @@ -30474,7 +29710,7 @@ function focusNode(node) { module.exports = focusNode; -},{}],241:[function(require,module,exports){ +},{}],169:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -30505,7 +29741,7 @@ var forEachAccumulated = function(arr, cb, scope) { module.exports = forEachAccumulated; -},{}],242:[function(require,module,exports){ +},{}],170:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -30534,7 +29770,7 @@ function getActiveElement() /*?DOMElement*/ { module.exports = getActiveElement; -},{}],243:[function(require,module,exports){ +},{}],171:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -30586,7 +29822,7 @@ function getEventCharCode(nativeEvent) { module.exports = getEventCharCode; -},{}],244:[function(require,module,exports){ +},{}],172:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -30691,7 +29927,7 @@ function getEventKey(nativeEvent) { module.exports = getEventKey; -},{"./getEventCharCode":243}],245:[function(require,module,exports){ +},{"./getEventCharCode":171}],173:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -30738,7 +29974,7 @@ function getEventModifierState(nativeEvent) { module.exports = getEventModifierState; -},{}],246:[function(require,module,exports){ +},{}],174:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -30769,7 +30005,7 @@ function getEventTarget(nativeEvent) { module.exports = getEventTarget; -},{}],247:[function(require,module,exports){ +},{}],175:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -30813,7 +30049,7 @@ function getIteratorFn(maybeIterable) { module.exports = getIteratorFn; -},{}],248:[function(require,module,exports){ +},{}],176:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -30933,7 +30169,7 @@ module.exports = getMarkupWrap; }).call(this,require('_process')) -},{"./ExecutionEnvironment":127,"./invariant":256,"_process":280}],249:[function(require,module,exports){ +},{"./ExecutionEnvironment":55,"./invariant":184,"_process":208}],177:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -31008,7 +30244,7 @@ function getNodeForCharacterOffset(root, offset) { module.exports = getNodeForCharacterOffset; -},{}],250:[function(require,module,exports){ +},{}],178:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -31043,7 +30279,7 @@ function getReactRootElementInContainer(container) { module.exports = getReactRootElementInContainer; -},{}],251:[function(require,module,exports){ +},{}],179:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -31080,7 +30316,7 @@ function getTextContentAccessor() { module.exports = getTextContentAccessor; -},{"./ExecutionEnvironment":127}],252:[function(require,module,exports){ +},{"./ExecutionEnvironment":55}],180:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -31120,7 +30356,7 @@ function getUnboundedScrollPosition(scrollable) { module.exports = getUnboundedScrollPosition; -},{}],253:[function(require,module,exports){ +},{}],181:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -31153,7 +30389,7 @@ function hyphenate(string) { module.exports = hyphenate; -},{}],254:[function(require,module,exports){ +},{}],182:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -31194,7 +30430,7 @@ function hyphenateStyleName(string) { module.exports = hyphenateStyleName; -},{"./hyphenate":253}],255:[function(require,module,exports){ +},{"./hyphenate":181}],183:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -31333,7 +30569,7 @@ module.exports = instantiateReactComponent; }).call(this,require('_process')) -},{"./Object.assign":134,"./ReactCompositeComponent":148,"./ReactEmptyComponent":170,"./ReactNativeComponent":185,"./invariant":256,"./warning":277,"_process":280}],256:[function(require,module,exports){ +},{"./Object.assign":62,"./ReactCompositeComponent":76,"./ReactEmptyComponent":98,"./ReactNativeComponent":113,"./invariant":184,"./warning":205,"_process":208}],184:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -31391,7 +30627,7 @@ module.exports = invariant; }).call(this,require('_process')) -},{"_process":280}],257:[function(require,module,exports){ +},{"_process":208}],185:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -31456,7 +30692,7 @@ function isEventSupported(eventNameSuffix, capture) { module.exports = isEventSupported; -},{"./ExecutionEnvironment":127}],258:[function(require,module,exports){ +},{"./ExecutionEnvironment":55}],186:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -31483,7 +30719,7 @@ function isNode(object) { module.exports = isNode; -},{}],259:[function(require,module,exports){ +},{}],187:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -31526,7 +30762,7 @@ function isTextInputElement(elem) { module.exports = isTextInputElement; -},{}],260:[function(require,module,exports){ +},{}],188:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -31551,7 +30787,7 @@ function isTextNode(object) { module.exports = isTextNode; -},{"./isNode":258}],261:[function(require,module,exports){ +},{"./isNode":186}],189:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -31592,7 +30828,7 @@ function joinClasses(className/*, ... */) { module.exports = joinClasses; -},{}],262:[function(require,module,exports){ +},{}],190:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -31648,7 +30884,7 @@ module.exports = keyMirror; }).call(this,require('_process')) -},{"./invariant":256,"_process":280}],263:[function(require,module,exports){ +},{"./invariant":184,"_process":208}],191:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -31684,7 +30920,7 @@ var keyOf = function(oneKeyObj) { module.exports = keyOf; -},{}],264:[function(require,module,exports){ +},{}],192:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -31737,7 +30973,7 @@ function mapObject(object, callback, context) { module.exports = mapObject; -},{}],265:[function(require,module,exports){ +},{}],193:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -31770,7 +31006,7 @@ function memoizeStringOnly(callback) { module.exports = memoizeStringOnly; -},{}],266:[function(require,module,exports){ +},{}],194:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -31811,7 +31047,7 @@ module.exports = onlyChild; }).call(this,require('_process')) -},{"./ReactElement":168,"./invariant":256,"_process":280}],267:[function(require,module,exports){ +},{"./ReactElement":96,"./invariant":184,"_process":208}],195:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -31839,7 +31075,7 @@ if (ExecutionEnvironment.canUseDOM) { module.exports = performance || {}; -},{"./ExecutionEnvironment":127}],268:[function(require,module,exports){ +},{"./ExecutionEnvironment":55}],196:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -31867,7 +31103,7 @@ var performanceNow = performance.now.bind(performance); module.exports = performanceNow; -},{"./performance":267}],269:[function(require,module,exports){ +},{"./performance":195}],197:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -31895,7 +31131,7 @@ function quoteAttributeValueForBrowser(value) { module.exports = quoteAttributeValueForBrowser; -},{"./escapeTextContentForBrowser":237}],270:[function(require,module,exports){ +},{"./escapeTextContentForBrowser":165}],198:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -31984,7 +31220,7 @@ if (ExecutionEnvironment.canUseDOM) { module.exports = setInnerHTML; -},{"./ExecutionEnvironment":127}],271:[function(require,module,exports){ +},{"./ExecutionEnvironment":55}],199:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -32026,7 +31262,7 @@ if (ExecutionEnvironment.canUseDOM) { module.exports = setTextContent; -},{"./ExecutionEnvironment":127,"./escapeTextContentForBrowser":237,"./setInnerHTML":270}],272:[function(require,module,exports){ +},{"./ExecutionEnvironment":55,"./escapeTextContentForBrowser":165,"./setInnerHTML":198}],200:[function(require,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -32070,7 +31306,7 @@ function shallowEqual(objA, objB) { module.exports = shallowEqual; -},{}],273:[function(require,module,exports){ +},{}],201:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -32175,7 +31411,7 @@ module.exports = shouldUpdateReactComponent; }).call(this,require('_process')) -},{"./warning":277,"_process":280}],274:[function(require,module,exports){ +},{"./warning":205,"_process":208}],202:[function(require,module,exports){ (function (process){ /** * Copyright 2014-2015, Facebook, Inc. @@ -32248,7 +31484,7 @@ module.exports = toArray; }).call(this,require('_process')) -},{"./invariant":256,"_process":280}],275:[function(require,module,exports){ +},{"./invariant":184,"_process":208}],203:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -32502,7 +31738,7 @@ module.exports = traverseAllChildren; }).call(this,require('_process')) -},{"./ReactElement":168,"./ReactFragment":174,"./ReactInstanceHandles":177,"./getIteratorFn":247,"./invariant":256,"./warning":277,"_process":280}],276:[function(require,module,exports){ +},{"./ReactElement":96,"./ReactFragment":102,"./ReactInstanceHandles":105,"./getIteratorFn":175,"./invariant":184,"./warning":205,"_process":208}],204:[function(require,module,exports){ (function (process){ /** * Copyright 2013-2015, Facebook, Inc. @@ -32674,7 +31910,7 @@ module.exports = update; }).call(this,require('_process')) -},{"./Object.assign":134,"./invariant":256,"./keyOf":263,"_process":280}],277:[function(require,module,exports){ +},{"./Object.assign":62,"./invariant":184,"./keyOf":191,"_process":208}],205:[function(require,module,exports){ (function (process){ /** * Copyright 2014-2015, Facebook, Inc. @@ -32738,10 +31974,10 @@ module.exports = warning; }).call(this,require('_process')) -},{"./emptyFunction":235,"_process":280}],278:[function(require,module,exports){ +},{"./emptyFunction":163,"_process":208}],206:[function(require,module,exports){ module.exports = require('./lib/React'); -},{"./lib/React":136}],279:[function(require,module,exports){ +},{"./lib/React":64}],207:[function(require,module,exports){ exports = module.exports = trim; @@ -32757,7 +31993,7 @@ exports.right = function(str){ return str.replace(/\s*$/, ''); }; -},{}],280:[function(require,module,exports){ +},{}],208:[function(require,module,exports){ // shim for using process in browser var process = module.exports = {}; @@ -32849,20 +32085,19 @@ process.chdir = function (dir) { }; process.umask = function() { return 0; }; -},{}],281:[function(require,module,exports){ +},{}],209:[function(require,module,exports){ "use strict"; -var _createClass = require("babel-runtime/helpers/create-class")["default"]; - -var _classCallCheck = require("babel-runtime/helpers/class-call-check")["default"]; - -var _Object$keys = require("babel-runtime/core-js/object/keys")["default"]; - Object.defineProperty(exports, "__esModule", { value: true }); + +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + exports["default"] = atom; +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + var Atom = (function () { function Atom(state) { _classCallCheck(this, Atom); @@ -32915,7 +32150,7 @@ var Atom = (function () { var watches = this.watches; this.state = newState; - _Object$keys(watches).forEach(function (k) { + Object.keys(watches).forEach(function (k) { return watches[k](k, state, newState); }); return this.state; @@ -32931,7 +32166,7 @@ function atom(state) { module.exports = exports["default"]; -},{"babel-runtime/core-js/object/keys":33,"babel-runtime/helpers/class-call-check":35,"babel-runtime/helpers/create-class":36}],282:[function(require,module,exports){ +},{}],210:[function(require,module,exports){ (function (global){ /* * @@ -32943,7 +32178,7 @@ module.exports = exports["default"]; */ 'use strict'; -var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _cssIndexCss = require('../css/index.css'); @@ -32970,55 +32205,9 @@ if (typeof global.window.define == 'function' && global.window.define.amd) { }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"../css/index.css":1,"../css/overwrites.css":2,"../css/transitions.css":3,"./index":308,"babel-runtime/helpers/interop-require-default":40}],283:[function(require,module,exports){ -'use strict'; - -var _get = require('babel-runtime/helpers/get')['default']; - -var _inherits = require('babel-runtime/helpers/inherits')['default']; - -var _createClass = require('babel-runtime/helpers/create-class')['default']; - -var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; - -var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; - -Object.defineProperty(exports, '__esModule', { - value: true -}); - -var _react = require('react'); - -var _react2 = _interopRequireDefault(_react); - -var PhoneNumberIcon = (function (_React$Component) { - _inherits(PhoneNumberIcon, _React$Component); - - function PhoneNumberIcon() { - _classCallCheck(this, PhoneNumberIcon); - - _get(Object.getPrototypeOf(PhoneNumberIcon.prototype), 'constructor', this).apply(this, arguments); - } - - _createClass(PhoneNumberIcon, [{ - key: 'render', - value: function render() { - var svgTag = ''; - return _react2['default'].createElement('span', { dangerouslySetInnerHTML: { __html: svgTag } }); - } - }]); - - return PhoneNumberIcon; -})(_react2['default'].Component); - -exports['default'] = PhoneNumberIcon; -module.exports = exports['default']; - -},{"babel-runtime/helpers/class-call-check":35,"babel-runtime/helpers/create-class":36,"babel-runtime/helpers/get":38,"babel-runtime/helpers/inherits":39,"babel-runtime/helpers/interop-require-default":40,"react":278}],284:[function(require,module,exports){ +},{"../css/index.css":1,"../css/overwrites.css":2,"../css/transitions.css":3,"./index":232}],211:[function(require,module,exports){ "use strict"; -var _interopRequireDefault = require("babel-runtime/helpers/interop-require-default")["default"]; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -33026,6 +32215,8 @@ exports.country = country; exports.dialingCode = dialingCode; exports.locationString = locationString; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + var _immutable = require('immutable'); var _immutable2 = _interopRequireDefault(_immutable); @@ -33049,70 +32240,26 @@ exports.defaultLocation = defaultLocation; var countryCodes = _immutable2["default"].fromJS([["Afghanistan", "+93"], ["Albania", "+355"], ["Algeria", "+213"], ["American Samoa", "+1684"], ["Andorra", "+376"], ["Angola", "+244"], ["Anguilla", "+1264"], ["Antarctica", "+672"], ["Antigua and Barbuda", "+1268"], ["Argentina", "+54"], ["Armenia", "+374"], ["Aruba", "+297"], ["Australia", "+61"], ["Austria", "+43"], ["Azerbaijan", "+994"], ["Bahamas", "+1242"], ["Bahrain", "+973"], ["Bangladesh", "+880"], ["Barbados", "+1246"], ["Belarus", "+375"], ["Belgium", "+32"], ["Belize", "+501"], ["Benin", "+229"], ["Bermuda", "+1441"], ["Bhutan", "+975"], ["Bolivia, Plurinational State of", "+591"], ["Bonaire, Sint Eustatius and Saba", "+599"], ["Bosnia and Herzegovina", "+387"], ["Botswana", "+267"], ["Bouvet Island", "+47"], ["Brazil", "+55"], ["British Indian Ocean Territory", "+246"], ["Brunei Darussalam", "+673"], ["Bulgaria", "+359"], ["Burkina Faso", "+226"], ["Burundi", "+257"], ["Cambodia", "+855"], ["Cameroon", "+237"], ["Canada", "+1"], ["Cape Verde", "+238"], ["Cayman Islands", "+1345"], ["Central African Republic", "+236"], ["Chad", "+235"], ["Chile", "+56"], ["China", "+86"], ["Christmas Island", "+61"], ["Cocos (Keeling) Islands", "+61"], ["Colombia", "+57"], ["Comoros", "+269"], ["Congo", "+242"], ["Congo, the Democratic Republic of the", "+243"], ["Cook Islands", "+682"], ["Costa Rica", "+506"], ["Croatia", "+385"], ["Cuba", "+53"], ["Curaçao", "+599"], ["Cyprus", "+357"], ["Czech Republic", "+420"], ["Côte d'Ivoire", "+225"], ["Denmark", "+45"], ["Djibouti", "+253"], ["Dominica", "+1767"], ["Dominican Republic", "+1809"], ["Dominican Republic", "+1829"], ["Dominican Republic", "+1849"], ["Ecuador", "+593"], ["Egypt", "+20"], ["El Salvador", "+503"], ["Equatorial Guinea", "+240"], ["Eritrea", "+291"], ["Estonia", "+372"], ["Ethiopia", "+251"], ["Falkland Islands (Malvinas)", "+500"], ["Faroe Islands", "+298"], ["Fiji", "+679"], ["Finland", "+358"], ["France", "+33"], ["French Guiana", "+594"], ["French Polynesia", "+689"], ["French Southern Territories", "+262"], ["Gabon", "+241"], ["Gambia", "+220"], ["Georgia", "+995"], ["Germany", "+49"], ["Ghana", "+233"], ["Gibraltar", "+350"], ["Greece", "+30"], ["Greenland", "+299"], ["Grenada", "+1473"], ["Guadeloupe", "+590"], ["Guam", "+1671"], ["Guatemala", "+502"], ["Guernsey", "+44"], ["Guinea", "+224"], ["Guinea-Bissau", "+245"], ["Guyana", "+592"], ["Haiti", "+509"], ["Heard Island and McDonald Mcdonald Islands", "+672"], ["Holy See (Vatican City State)", "+3906"], ["Honduras", "+504"], ["Hong Kong", "+852"], ["Hungary", "+36"], ["Iceland", "+354"], ["India", "+91"], ["Indonesia", "+62"], ["Iran, Islamic Republic of", "+98"], ["Iraq", "+964"], ["Ireland", "+353"], ["Isle of Man", "+44"], ["Israel", "+972"], ["Italy", "+39"], ["Jamaica", "+1876"], ["Japan", "+81"], ["Jersey", "+44"], ["Jordan", "+962"], ["Kazakhstan", "+7"], ["Kenya", "+254"], ["Kiribati", "+686"], ["Korea, Democratic People's Republic of", "+850"], ["Korea, Republic of", "+82"], ["Kuwait", "+965"], ["Kyrgyzstan", "+996"], ["Lao People's Democratic Republic", "+856"], ["Latvia", "+371"], ["Lebanon", "+961"], ["Lesotho", "+266"], ["Liberia", "+231"], ["Libya", "+218"], ["Liechtenstein", "+423"], ["Lithuania", "+370"], ["Luxembourg", "+352"], ["Macao", "+853"], ["Macedonia, the Former Yugoslav Republic of", "+389"], ["Madagascar", "+261"], ["Malawi", "+265"], ["Malaysia", "+60"], ["Maldives", "+960"], ["Mali", "+223"], ["Malta", "+356"], ["Marshall Islands", "+692"], ["Martinique", "+596"], ["Mauritania", "+222"], ["Mauritius", "+230"], ["Mayotte", "+262"], ["Mexico", "+52"], ["Micronesia, Federated States of", "+691"], ["Moldova, Republic of", "+373"], ["Monaco", "+377"], ["Mongolia", "+976"], ["Montenegro", "+382"], ["Montserrat", "+1664"], ["Morocco", "+212"], ["Mozambique", "+258"], ["Myanmar", "+95"], ["Namibia", "+264"], ["Nauru", "+674"], ["Nepal", "+977"], ["Netherlands", "+31"], ["New Caledonia", "+687"], ["New Zealand", "+64"], ["Nicaragua", "+505"], ["Niger", "+227"], ["Nigeria", "+234"], ["Niue", "+683"], ["Norfolk Island", "+672"], ["Northern Mariana Islands", "+1670"], ["Norway", "+47"], ["Oman", "+968"], ["Pakistan", "+92"], ["Palau", "+680"], ["Palestine, State of", "+970"], ["Panama", "+507"], ["Papua New Guinea", "+675"], ["Paraguay", "+595"], ["Peru", "+51"], ["Philippines", "+63"], ["Pitcairn", "+870"], ["Poland", "+48"], ["Portugal", "+351"], ["Puerto Rico", "+1"], ["Qatar", "+974"], ["Romania", "+40"], ["Russian Federation", "+7"], ["Rwanda", "+250"], ["Réunion", "+262"], ["Saint Barthélemy", "+590"], ["Saint Helena, Ascension and Tristan da Cunha", "+290"], ["Saint Kitts and Nevis", "+1869"], ["Saint Lucia", "+1758"], ["Saint Martin (French part)", "+590"], ["Saint Pierre and Miquelon", "+508"], ["Saint Vincent and the Grenadines", "+1784"], ["Samoa", "+685"], ["San Marino", "+378"], ["Sao Tome and Principe", "+239"], ["Saudi Arabia", "+966"], ["Senegal", "+221"], ["Serbia", "+381"], ["Seychelles", "+248"], ["Sierra Leone", "+232"], ["Singapore", "+65"], ["Sint Maarten (Dutch part)", "+1721"], ["Slovakia", "+421"], ["Slovenia", "+386"], ["Solomon Islands", "+677"], ["Somalia", "+252"], ["South Africa", "+27"], ["South Georgia and the South Sandwich Islands", "+500"], ["South Sudan", "+211"], ["Spain", "+34"], ["Sri Lanka", "+94"], ["Sudan", "+249"], ["Suriname", "+597"], ["Svalbard and Jan Mayen", "+47"], ["Swaziland", "+268"], ["Sweden", "+46"], ["Switzerland", "+41"], ["Syrian Arab Republic", "+963"], ["Taiwan, Province of China", "+886"], ["Tajikistan", "+992"], ["Tanzania, United Republic of", "+255"], ["Thailand", "+66"], ["Timor-Leste", "+670"], ["Togo", "+228"], ["Tokelau", "+690"], ["Tonga", "+676"], ["Trinidad and Tobago", "+1868"], ["Tunisia", "+216"], ["Turkey", "+90"], ["Turkmenistan", "+993"], ["Turks and Caicos Islands", "+1649"], ["Tuvalu", "+688"], ["Uganda", "+256"], ["Ukraine", "+380"], ["United Arab Emirates", "+971"], ["United Kingdom", "+44"], ["United States", "+1"], ["Uruguay", "+598"], ["Uzbekistan", "+998"], ["Vanuatu", "+678"], ["Venezuela, Bolivarian Republic of", "+58"], ["Viet Nam", "+84"], ["Virgin Islands, British", "+1284"], ["Virgin Islands, U.S.", "+1340"], ["Wallis and Futuna", "+681"], ["Western Sahara", "+212"], ["Yemen", "+967"], ["Zambia", "+260"], ["Zimbabwe", "+263"], ["Åland Islands", "+358"]]); exports.countryCodes = countryCodes; -},{"babel-runtime/helpers/interop-require-default":40,"immutable":101}],285:[function(require,module,exports){ +},{"immutable":29}],212:[function(require,module,exports){ 'use strict'; -var _get = require('babel-runtime/helpers/get')['default']; - -var _inherits = require('babel-runtime/helpers/inherits')['default']; - -var _createClass = require('babel-runtime/helpers/create-class')['default']; - -var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; - -var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; - Object.defineProperty(exports, '__esModule', { value: true }); -var _react = require('react'); - -var _react2 = _interopRequireDefault(_react); - -var EmailIcon = (function (_React$Component) { - _inherits(EmailIcon, _React$Component); - - function EmailIcon() { - _classCallCheck(this, EmailIcon); - - _get(Object.getPrototypeOf(EmailIcon.prototype), 'constructor', this).apply(this, arguments); - } - - _createClass(EmailIcon, [{ - key: 'render', - value: function render() { - var svgTag = ''; - return _react2['default'].createElement('span', { dangerouslySetInnerHTML: { __html: svgTag } }); - } - }]); - - return EmailIcon; -})(_react2['default'].Component); - -exports['default'] = EmailIcon; -module.exports = exports['default']; +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; -},{"babel-runtime/helpers/class-call-check":35,"babel-runtime/helpers/create-class":36,"babel-runtime/helpers/get":38,"babel-runtime/helpers/inherits":39,"babel-runtime/helpers/interop-require-default":40,"react":278}],286:[function(require,module,exports){ -'use strict'; +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); -var _get = require('babel-runtime/helpers/get')['default']; +var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; -var _inherits = require('babel-runtime/helpers/inherits')['default']; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } -var _createClass = require('babel-runtime/helpers/create-class')['default']; +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } -var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } -var _objectWithoutProperties = require('babel-runtime/helpers/object-without-properties')['default']; - -var _extends = require('babel-runtime/helpers/extends')['default']; - -var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; - -Object.defineProperty(exports, '__esModule', { - value: true -}); +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var _react = require('react'); @@ -33122,9 +32269,9 @@ var _input_wrap = require('./input_wrap'); var _input_wrap2 = _interopRequireDefault(_input_wrap); -var _email_icon = require('./email_icon'); +var _iconIcon = require('../icon/icon'); -var _email_icon2 = _interopRequireDefault(_email_icon); +var _iconIcon2 = _interopRequireDefault(_iconIcon); var _gravatarActions = require('../gravatar/actions'); @@ -33149,11 +32296,9 @@ var EmailInput = (function (_React$Component) { var props = _objectWithoutProperties(_props, ['isValid', 'onChange', 'gravatar']); - var icon = _react2['default'].createElement(_email_icon2['default'], null); - return _react2['default'].createElement( _input_wrap2['default'], - { name: 'email', isValid: isValid, icon: icon }, + { name: 'email', isValid: isValid, icon: _react2['default'].createElement(_iconIcon2['default'], { name: 'email' }) }, _react2['default'].createElement('input', _extends({ type: 'text', name: 'email', className: 'auth0-lock-input', @@ -33181,13 +32326,9 @@ var EmailInput = (function (_React$Component) { exports['default'] = EmailInput; module.exports = exports['default']; -},{"../gravatar/actions":298,"./email_icon":285,"./input_wrap":288,"babel-runtime/helpers/class-call-check":35,"babel-runtime/helpers/create-class":36,"babel-runtime/helpers/extends":37,"babel-runtime/helpers/get":38,"babel-runtime/helpers/inherits":39,"babel-runtime/helpers/interop-require-default":40,"babel-runtime/helpers/object-without-properties":42,"react":278}],287:[function(require,module,exports){ +},{"../gravatar/actions":221,"../icon/icon":230,"./input_wrap":214,"react":206}],213:[function(require,module,exports){ 'use strict'; -var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; - -var _interopRequireWildcard = require('babel-runtime/helpers/interop-require-wildcard')['default']; - Object.defineProperty(exports, '__esModule', { value: true }); @@ -33208,13 +32349,16 @@ exports.validateEmail = validateEmail; exports.validEmail = validEmail; exports.visiblyInvalidEmail = visiblyInvalidEmail; exports.setShowInvalidEmail = setShowInvalidEmail; -exports.verificationCode = verificationCode; -exports.setVerificationCode = setVerificationCode; -exports.validateVerificationCode = validateVerificationCode; -exports.validVerificationCode = validVerificationCode; -exports.visiblyInvalidVerificationCode = visiblyInvalidVerificationCode; -exports.setShowInvalidVerificationCode = setShowInvalidVerificationCode; -exports.validatePassword = validatePassword; +exports.vcode = vcode; +exports.setVcode = setVcode; +exports.validateVcode = validateVcode; +exports.validVcode = validVcode; +exports.visiblyInvalidVcode = visiblyInvalidVcode; +exports.setShowInvalidVcode = setShowInvalidVcode; + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _immutable = require('immutable'); @@ -33227,19 +32371,19 @@ var _country_codes = require('./country_codes'); var cc = _interopRequireWildcard(_country_codes); function valid(lock, field) { - return lock.getIn(["credentials", field, "valid"]); + return lock.getIn(["cred", field, "valid"]); } -function showInvalid(lock, credential) { - return lock.getIn(["credentials", credential, "showInvalid"]); +function showInvalid(lock, cred) { + return lock.getIn(["cred", cred, "showInvalid"]); } -function setShowInvalid(lock, credential, value) { - return lock.setIn(["credentials", credential, "showInvalid"], value); +function setShowInvalid(lock, cred, value) { + return lock.setIn(["cred", cred, "showInvalid"], value); } -function visiblyInvalid(lock, credential) { - return showInvalid(lock, credential) && !valid(lock, credential); +function visiblyInvalid(lock, cred) { + return showInvalid(lock, cred) && !valid(lock, cred); } // phone number @@ -33255,11 +32399,11 @@ function fullHumanPhoneNumber(m) { } function setPhoneLocation(m, value) { - return m.setIn(["credentials", "phoneNumber", "location"], value); + return m.setIn(["cred", "phoneNumber", "location"], value); } function phoneLocation(m) { - return m.getIn(["credentials", "phoneNumber", "location"], cc.defaultLocation); + return m.getIn(["cred", "phoneNumber", "location"], cc.defaultLocation); } function phoneLocationString(m) { @@ -33271,12 +32415,12 @@ function phoneDialingCode(m) { } function phoneNumber(lock) { - return lock.getIn(["credentials", "phoneNumber", "number"], ""); + return lock.getIn(["cred", "phoneNumber", "number"], ""); } function setPhoneNumber(lock, phoneNumber) { var valid = validatePhoneNumber(phoneNumber); - return lock.mergeIn(["credentials", "phoneNumber"], (0, _immutable.Map)({ + return lock.mergeIn(["cred", "phoneNumber"], (0, _immutable.Map)({ number: phoneNumber, valid: valid, showInvalid: !!showInvalid(lock, "phoneNumber") && !valid @@ -33303,12 +32447,12 @@ function setShowInvalidPhoneNumber(lock, value) { // email function email(lock) { - return lock.getIn(["credentials", "email", "email"], ""); + return lock.getIn(["cred", "email", "email"], ""); } function setEmail(lock, email) { var valid = !!validateEmail(email); - return lock.mergeIn(["credentials", "email"], (0, _immutable.Map)({ + return lock.mergeIn(["cred", "email"], (0, _immutable.Map)({ email: email, valid: valid, showInvalid: !!showInvalid(lock, "email") && !valid @@ -33335,62 +32479,55 @@ function setShowInvalidEmail(lock) { return setShowInvalid(lock, "email", value); } -// verification code +// vcode -function verificationCode(lock) { - return lock.getIn(["credentials", "verificationCode", "verificationCode"], ""); +function vcode(lock) { + return lock.getIn(["cred", "vcode", "vcode"], ""); } -function setVerificationCode(lock, verificationCode) { - var valid = validateVerificationCode(verificationCode); - return lock.mergeIn(["credentials", "verificationCode"], (0, _immutable.Map)({ - verificationCode: verificationCode, +function setVcode(lock, vcode) { + var valid = validateVcode(vcode); + return lock.mergeIn(["cred", "vcode"], (0, _immutable.Map)({ + vcode: vcode, valid: valid, - showInvalid: !!showInvalid(lock, "verificationCode") && !valid + showInvalid: !!showInvalid(lock, "vcode") && !valid })); } -function validateVerificationCode(verificationCode) { - return (0, _trim2['default'])(verificationCode).length > 0; +function validateVcode(vcode) { + return (0, _trim2['default'])(vcode).length > 0; } -function validVerificationCode(lock) { - return valid(lock, "verificationCode"); +function validVcode(lock) { + return valid(lock, "vcode"); } -function visiblyInvalidVerificationCode(lock) { - return visiblyInvalid(lock, "verificationCode"); +function visiblyInvalidVcode(lock) { + return visiblyInvalid(lock, "vcode"); } -function setShowInvalidVerificationCode(lock) { +function setShowInvalidVcode(lock) { var value = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1]; - return setShowInvalid(lock, "verificationCode", value); + return setShowInvalid(lock, "vcode", value); } -// password - -function validatePassword(password) { - var result = (0, _trim2['default'])(password); - return result.length > 3 ? result : null; -} - -},{"./country_codes":284,"babel-runtime/helpers/interop-require-default":40,"babel-runtime/helpers/interop-require-wildcard":41,"immutable":101,"trim":279}],288:[function(require,module,exports){ +},{"./country_codes":211,"immutable":29,"trim":207}],214:[function(require,module,exports){ "use strict"; -var _get = require("babel-runtime/helpers/get")["default"]; +Object.defineProperty(exports, "__esModule", { + value: true +}); -var _inherits = require("babel-runtime/helpers/inherits")["default"]; +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); -var _createClass = require("babel-runtime/helpers/create-class")["default"]; +var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; -var _classCallCheck = require("babel-runtime/helpers/class-call-check")["default"]; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } -var _interopRequireDefault = require("babel-runtime/helpers/interop-require-default")["default"]; +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -Object.defineProperty(exports, "__esModule", { - value: true -}); +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var _react = require('react'); @@ -33437,72 +32574,28 @@ exports["default"] = InputWrap; InputWrap.propTypes = { name: _react2["default"].PropTypes.string.isRequired, isValid: _react2["default"].PropTypes.bool.isRequired, - children: _react2["default"].PropTypes.element.isRequired + children: _react2["default"].PropTypes.oneOfType([_react2["default"].PropTypes.element.isRequired, _react2["default"].PropTypes.arrayOf(_react2["default"].PropTypes.element).isRequired]) }; module.exports = exports["default"]; -},{"babel-runtime/helpers/class-call-check":35,"babel-runtime/helpers/create-class":36,"babel-runtime/helpers/get":38,"babel-runtime/helpers/inherits":39,"babel-runtime/helpers/interop-require-default":40,"react":278}],289:[function(require,module,exports){ +},{"react":206}],215:[function(require,module,exports){ 'use strict'; -var _get = require('babel-runtime/helpers/get')['default']; - -var _inherits = require('babel-runtime/helpers/inherits')['default']; - -var _createClass = require('babel-runtime/helpers/create-class')['default']; - -var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; - -var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; - Object.defineProperty(exports, '__esModule', { value: true }); -var _react = require('react'); - -var _react2 = _interopRequireDefault(_react); - -var LocationIcon = (function (_React$Component) { - _inherits(LocationIcon, _React$Component); - - function LocationIcon() { - _classCallCheck(this, LocationIcon); - - _get(Object.getPrototypeOf(LocationIcon.prototype), 'constructor', this).apply(this, arguments); - } - - _createClass(LocationIcon, [{ - key: 'render', - value: function render() { - var svgTag = ''; - return _react2['default'].createElement('span', { dangerouslySetInnerHTML: { __html: svgTag } }); - } - }]); - - return LocationIcon; -})(_react2['default'].Component); - -exports['default'] = LocationIcon; -module.exports = exports['default']; +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; -},{"babel-runtime/helpers/class-call-check":35,"babel-runtime/helpers/create-class":36,"babel-runtime/helpers/get":38,"babel-runtime/helpers/inherits":39,"babel-runtime/helpers/interop-require-default":40,"react":278}],290:[function(require,module,exports){ -'use strict'; - -var _get = require('babel-runtime/helpers/get')['default']; - -var _inherits = require('babel-runtime/helpers/inherits')['default']; +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); -var _createClass = require('babel-runtime/helpers/create-class')['default']; +var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; -var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } -var _extends = require('babel-runtime/helpers/extends')['default']; +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } -var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; - -Object.defineProperty(exports, '__esModule', { - value: true -}); +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var _react = require('react'); @@ -33512,13 +32605,9 @@ var _input_wrap = require('./input_wrap'); var _input_wrap2 = _interopRequireDefault(_input_wrap); -var _location_icon = require('./location_icon'); - -var _location_icon2 = _interopRequireDefault(_location_icon); - -var _arrow_icon = require('./arrow_icon'); +var _iconIcon = require('../icon/icon'); -var _arrow_icon2 = _interopRequireDefault(_arrow_icon); +var _iconIcon2 = _interopRequireDefault(_iconIcon); var LocationInput = (function (_React$Component) { _inherits(LocationInput, _React$Component); @@ -33534,17 +32623,14 @@ var LocationInput = (function (_React$Component) { _createClass(LocationInput, [{ key: 'render', value: function render() { - var icon = _react2['default'].createElement(_location_icon2['default'], null); - return _react2['default'].createElement( _input_wrap2['default'], - { name: 'phone-number', isValid: true, icon: icon }, + { name: 'location', isValid: true, icon: _react2['default'].createElement(_iconIcon2['default'], { name: 'location' }) }, _react2['default'].createElement('input', _extends({ type: 'button', name: 'location', - className: 'auth0-lock-input auth0-lock-input-location', - placeholder: 'your phone number' + className: 'auth0-lock-input auth0-lock-input-location' }, this.props)), - _react2['default'].createElement(_arrow_icon2['default'], null) + _react2['default'].createElement(_iconIcon2['default'], { name: 'arrow' }) ); } }]); @@ -33555,32 +32641,32 @@ var LocationInput = (function (_React$Component) { exports['default'] = LocationInput; module.exports = exports['default']; -},{"./arrow_icon":283,"./input_wrap":288,"./location_icon":289,"babel-runtime/helpers/class-call-check":35,"babel-runtime/helpers/create-class":36,"babel-runtime/helpers/extends":37,"babel-runtime/helpers/get":38,"babel-runtime/helpers/inherits":39,"babel-runtime/helpers/interop-require-default":40,"react":278}],291:[function(require,module,exports){ +},{"../icon/icon":230,"./input_wrap":214,"react":206}],216:[function(require,module,exports){ 'use strict'; -var _get = require('babel-runtime/helpers/get')['default']; +Object.defineProperty(exports, '__esModule', { + value: true +}); -var _inherits = require('babel-runtime/helpers/inherits')['default']; +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); -var _createClass = require('babel-runtime/helpers/create-class')['default']; +var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; -var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } -var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } -var _interopRequireWildcard = require('babel-runtime/helpers/interop-require-wildcard')['default']; +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } -Object.defineProperty(exports, '__esModule', { - value: true -}); +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var _react = require('react'); var _react2 = _interopRequireDefault(_react); -var _location_icon = require('./location_icon'); +var _iconIcon = require('../icon/icon'); -var _location_icon2 = _interopRequireDefault(_location_icon); +var _iconIcon2 = _interopRequireDefault(_iconIcon); var _country_codes = require('./country_codes'); @@ -33622,7 +32708,7 @@ var LocationSelect = (function (_React$Component) { _react2['default'].createElement( 'div', { className: 'auth0-lock-input-wrap' }, - _react2['default'].createElement(_location_icon2['default'], null), + _react2['default'].createElement(_iconIcon2['default'], { name: 'location' }), _react2['default'].createElement('input', { className: 'auth0-lock-input auth0-lock-input-search', onChange: this.handleSearchChange.bind(this), type: 'text', @@ -33720,70 +32806,26 @@ var LocationListItem = (function (_React$Component3) { module.exports = exports['default']; -},{"../utils/string_utils":344,"./country_codes":284,"./location_icon":289,"babel-runtime/helpers/class-call-check":35,"babel-runtime/helpers/create-class":36,"babel-runtime/helpers/get":38,"babel-runtime/helpers/inherits":39,"babel-runtime/helpers/interop-require-default":40,"babel-runtime/helpers/interop-require-wildcard":41,"react":278}],292:[function(require,module,exports){ +},{"../icon/icon":230,"../utils/string_utils":269,"./country_codes":211,"react":206}],217:[function(require,module,exports){ 'use strict'; -var _get = require('babel-runtime/helpers/get')['default']; - -var _inherits = require('babel-runtime/helpers/inherits')['default']; - -var _createClass = require('babel-runtime/helpers/create-class')['default']; - -var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; - -var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; - Object.defineProperty(exports, '__esModule', { value: true }); -var _react = require('react'); - -var _react2 = _interopRequireDefault(_react); - -var PhoneNumberIcon = (function (_React$Component) { - _inherits(PhoneNumberIcon, _React$Component); - - function PhoneNumberIcon() { - _classCallCheck(this, PhoneNumberIcon); - - _get(Object.getPrototypeOf(PhoneNumberIcon.prototype), 'constructor', this).apply(this, arguments); - } - - _createClass(PhoneNumberIcon, [{ - key: 'render', - value: function render() { - var svgTag = ''; - return _react2['default'].createElement('span', { dangerouslySetInnerHTML: { __html: svgTag } }); - } - }]); - - return PhoneNumberIcon; -})(_react2['default'].Component); - -exports['default'] = PhoneNumberIcon; -module.exports = exports['default']; - -},{"babel-runtime/helpers/class-call-check":35,"babel-runtime/helpers/create-class":36,"babel-runtime/helpers/get":38,"babel-runtime/helpers/inherits":39,"babel-runtime/helpers/interop-require-default":40,"react":278}],293:[function(require,module,exports){ -'use strict'; - -var _get = require('babel-runtime/helpers/get')['default']; - -var _inherits = require('babel-runtime/helpers/inherits')['default']; +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; -var _createClass = require('babel-runtime/helpers/create-class')['default']; +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); -var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; +var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; -var _objectWithoutProperties = require('babel-runtime/helpers/object-without-properties')['default']; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } -var _extends = require('babel-runtime/helpers/extends')['default']; +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } -var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } -Object.defineProperty(exports, '__esModule', { - value: true -}); +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var _react = require('react'); @@ -33793,9 +32835,9 @@ var _input_wrap = require('./input_wrap'); var _input_wrap2 = _interopRequireDefault(_input_wrap); -var _phone_number_icon = require('./phone_number_icon'); +var _iconIcon = require('../icon/icon'); -var _phone_number_icon2 = _interopRequireDefault(_phone_number_icon); +var _iconIcon2 = _interopRequireDefault(_iconIcon); var PhoneNumberInput = (function (_React$Component) { _inherits(PhoneNumberInput, _React$Component); @@ -33816,11 +32858,9 @@ var PhoneNumberInput = (function (_React$Component) { var props = _objectWithoutProperties(_props, ['isValid']); - var icon = _react2['default'].createElement(_phone_number_icon2['default'], null); - return _react2['default'].createElement( _input_wrap2['default'], - { name: 'phone-number', isValid: isValid, icon: icon }, + { name: 'phone-number', isValid: isValid, icon: _react2['default'].createElement(_iconIcon2['default'], { name: 'phoneNumber' }) }, _react2['default'].createElement('input', _extends({ type: 'text', name: 'phoneNumber', className: 'auth0-lock-input auth0-lock-input-number', @@ -33836,70 +32876,26 @@ var PhoneNumberInput = (function (_React$Component) { exports['default'] = PhoneNumberInput; module.exports = exports['default']; -},{"./input_wrap":288,"./phone_number_icon":292,"babel-runtime/helpers/class-call-check":35,"babel-runtime/helpers/create-class":36,"babel-runtime/helpers/extends":37,"babel-runtime/helpers/get":38,"babel-runtime/helpers/inherits":39,"babel-runtime/helpers/interop-require-default":40,"babel-runtime/helpers/object-without-properties":42,"react":278}],294:[function(require,module,exports){ +},{"../icon/icon":230,"./input_wrap":214,"react":206}],218:[function(require,module,exports){ 'use strict'; -var _get = require('babel-runtime/helpers/get')['default']; - -var _inherits = require('babel-runtime/helpers/inherits')['default']; - -var _createClass = require('babel-runtime/helpers/create-class')['default']; - -var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; - -var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; - Object.defineProperty(exports, '__esModule', { value: true }); -var _react = require('react'); - -var _react2 = _interopRequireDefault(_react); - -var VerificationCodeIcon = (function (_React$Component) { - _inherits(VerificationCodeIcon, _React$Component); - - function VerificationCodeIcon() { - _classCallCheck(this, VerificationCodeIcon); - - _get(Object.getPrototypeOf(VerificationCodeIcon.prototype), 'constructor', this).apply(this, arguments); - } - - _createClass(VerificationCodeIcon, [{ - key: 'render', - value: function render() { - var svgTag = ''; - return _react2['default'].createElement('span', { dangerouslySetInnerHTML: { __html: svgTag } }); - } - }]); - - return VerificationCodeIcon; -})(_react2['default'].Component); - -exports['default'] = VerificationCodeIcon; -module.exports = exports['default']; - -},{"babel-runtime/helpers/class-call-check":35,"babel-runtime/helpers/create-class":36,"babel-runtime/helpers/get":38,"babel-runtime/helpers/inherits":39,"babel-runtime/helpers/interop-require-default":40,"react":278}],295:[function(require,module,exports){ -'use strict'; - -var _get = require('babel-runtime/helpers/get')['default']; - -var _inherits = require('babel-runtime/helpers/inherits')['default']; +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; -var _createClass = require('babel-runtime/helpers/create-class')['default']; +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); -var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; +var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; -var _objectWithoutProperties = require('babel-runtime/helpers/object-without-properties')['default']; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } -var _extends = require('babel-runtime/helpers/extends')['default']; +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } -var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } -Object.defineProperty(exports, '__esModule', { - value: true -}); +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var _react = require('react'); @@ -33909,22 +32905,22 @@ var _input_wrap = require('./input_wrap'); var _input_wrap2 = _interopRequireDefault(_input_wrap); -var _verification_code_icon = require('./verification_code_icon'); +var _iconIcon = require('../icon/icon'); -var _verification_code_icon2 = _interopRequireDefault(_verification_code_icon); +var _iconIcon2 = _interopRequireDefault(_iconIcon); -var VerificationCodeInput = (function (_React$Component) { - _inherits(VerificationCodeInput, _React$Component); +var VcodeInput = (function (_React$Component) { + _inherits(VcodeInput, _React$Component); - function VerificationCodeInput() { - _classCallCheck(this, VerificationCodeInput); + function VcodeInput() { + _classCallCheck(this, VcodeInput); - _get(Object.getPrototypeOf(VerificationCodeInput.prototype), 'constructor', this).apply(this, arguments); + _get(Object.getPrototypeOf(VcodeInput.prototype), 'constructor', this).apply(this, arguments); } // TODO: specify propTypes - _createClass(VerificationCodeInput, [{ + _createClass(VcodeInput, [{ key: 'render', value: function render() { var _props = this.props; @@ -33932,13 +32928,11 @@ var VerificationCodeInput = (function (_React$Component) { var props = _objectWithoutProperties(_props, ['isValid']); - var icon = _react2['default'].createElement(_verification_code_icon2['default'], null); - return _react2['default'].createElement( _input_wrap2['default'], - { name: 'verification-code', isValid: isValid, icon: icon }, + { name: 'vcode', isValid: isValid, icon: _react2['default'].createElement(_iconIcon2['default'], { name: 'vcode' }) }, _react2['default'].createElement('input', _extends({ type: 'text', - name: 'verificationCode', + name: 'vcode', className: 'auth0-lock-input auth0-lock-input-code', placeholder: 'Your code' }, props)) @@ -33946,29 +32940,29 @@ var VerificationCodeInput = (function (_React$Component) { } }]); - return VerificationCodeInput; + return VcodeInput; })(_react2['default'].Component); -exports['default'] = VerificationCodeInput; +exports['default'] = VcodeInput; module.exports = exports['default']; -},{"./input_wrap":288,"./verification_code_icon":294,"babel-runtime/helpers/class-call-check":35,"babel-runtime/helpers/create-class":36,"babel-runtime/helpers/extends":37,"babel-runtime/helpers/get":38,"babel-runtime/helpers/inherits":39,"babel-runtime/helpers/interop-require-default":40,"babel-runtime/helpers/object-without-properties":42,"react":278}],296:[function(require,module,exports){ +},{"../icon/icon":230,"./input_wrap":214,"react":206}],219:[function(require,module,exports){ (function (global){ 'use strict'; -var _get = require('babel-runtime/helpers/get')['default']; +Object.defineProperty(exports, '__esModule', { + value: true +}); -var _inherits = require('babel-runtime/helpers/inherits')['default']; +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); -var _createClass = require('babel-runtime/helpers/create-class')['default']; +var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; -var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } -var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } -Object.defineProperty(exports, '__esModule', { - value: true -}); +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var _react = require('react'); @@ -34197,10 +33191,10 @@ global.window.loadSnapshot = function (str) { }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"../atom/index":281,"../store/index":339,"babel-runtime/helpers/class-call-check":35,"babel-runtime/helpers/create-class":36,"babel-runtime/helpers/get":38,"babel-runtime/helpers/inherits":39,"babel-runtime/helpers/interop-require-default":40,"immutable":101,"react":278}],297:[function(require,module,exports){ +},{"../atom/index":209,"../store/index":264,"immutable":29,"react":206}],220:[function(require,module,exports){ 'use strict'; -var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _react = require('react'); @@ -34248,16 +33242,16 @@ WebAPI.prototype.startPasswordless = function (lockID, options, cb) { _react2['default'].render(_react2['default'].createElement(_control2['default']), document.getElementById("control-container")); -},{"../browser":282,"../index":308,"../lock/web_api":324,"./control":296,"babel-runtime/helpers/interop-require-default":40,"react":278}],298:[function(require,module,exports){ +},{"../browser":210,"../index":232,"../lock/web_api":249,"./control":219,"react":206}],221:[function(require,module,exports){ 'use strict'; -var _interopRequireWildcard = require('babel-runtime/helpers/interop-require-wildcard')['default']; - Object.defineProperty(exports, '__esModule', { value: true }); exports.requestGravatar = requestGravatar; +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + var _storeIndex = require('../store/index'); var _index = require('./index'); @@ -34307,7 +33301,7 @@ function requestGravatarImageSuccess(email, imageUrl) { function requestGravatarImageError(email) {} -},{"../store/index":339,"./index":299,"./web_api":300,"babel-runtime/helpers/interop-require-wildcard":41}],299:[function(require,module,exports){ +},{"../store/index":264,"./index":222,"./web_api":223}],222:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -34339,27 +33333,27 @@ function loaded(m) { return !!(displayName(m) && imageUrl(m)); } -},{}],300:[function(require,module,exports){ +},{}],223:[function(require,module,exports){ 'use strict'; -var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; - Object.defineProperty(exports, '__esModule', { value: true }); exports.profile = profile; exports.img = img; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + var _blueimpMd5 = require('blueimp-md5'); -var _credentialsIndex = require('../credentials/index'); +var _credIndex = require('../cred/index'); var _utilsJsonp_utils = require('../utils/jsonp_utils'); var _utilsJsonp_utils2 = _interopRequireDefault(_utilsJsonp_utils); function profile(email, success, error) { - if ((0, _credentialsIndex.validateEmail)(email)) { + if ((0, _credIndex.validateEmail)(email)) { var url = 'https://secure.gravatar.com/' + (0, _blueimpMd5.md5)(email) + '.json'; _utilsJsonp_utils2['default'].get(url, function (err, obj) { if (err) { @@ -34376,7 +33370,7 @@ function profile(email, success, error) { } function img(email, success, error) { - if ((0, _credentialsIndex.validateEmail)(email)) { + if ((0, _credIndex.validateEmail)(email)) { var _ret = (function () { var url = 'https://secure.gravatar.com/avatar/' + (0, _blueimpMd5.md5)(email) + '?d=404'; var img = document.createElement("img"); @@ -34398,76 +33392,22 @@ function img(email, success, error) { } } -},{"../credentials/index":287,"../utils/jsonp_utils":342,"babel-runtime/helpers/interop-require-default":40,"blueimp-md5":99}],301:[function(require,module,exports){ +},{"../cred/index":213,"../utils/jsonp_utils":267,"blueimp-md5":27}],224:[function(require,module,exports){ 'use strict'; -var _get = require('babel-runtime/helpers/get')['default']; - -var _inherits = require('babel-runtime/helpers/inherits')['default']; - -var _createClass = require('babel-runtime/helpers/create-class')['default']; - -var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; - -var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; - Object.defineProperty(exports, '__esModule', { value: true }); -var _react = require('react'); - -var _react2 = _interopRequireDefault(_react); - -var BackButton = (function (_React$Component) { - _inherits(BackButton, _React$Component); - - function BackButton() { - _classCallCheck(this, BackButton); - - _get(Object.getPrototypeOf(BackButton.prototype), 'constructor', this).apply(this, arguments); - } - - _createClass(BackButton, [{ - key: 'render', - value: function render() { - var svgTag = ' '; - return _react2['default'].createElement('span', { dangerouslySetInnerHTML: { __html: svgTag }, onClick: this.handleClick.bind(this) }); - } - }, { - key: 'handleClick', - value: function handleClick(e) { - e.preventDefault(); - this.props.onClick(); - } - }]); - - return BackButton; -})(_react2['default'].Component); - -exports['default'] = BackButton; +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); -BackButton.propTypes = { - onClick: _react2['default'].PropTypes.func.isRequired -}; -module.exports = exports['default']; - -},{"babel-runtime/helpers/class-call-check":35,"babel-runtime/helpers/create-class":36,"babel-runtime/helpers/get":38,"babel-runtime/helpers/inherits":39,"babel-runtime/helpers/interop-require-default":40,"react":278}],302:[function(require,module,exports){ -'use strict'; - -var _get = require('babel-runtime/helpers/get')['default']; - -var _inherits = require('babel-runtime/helpers/inherits')['default']; - -var _createClass = require('babel-runtime/helpers/create-class')['default']; +var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; -var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } -var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } -Object.defineProperty(exports, '__esModule', { - value: true -}); +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var _react = require('react'); @@ -34517,76 +33457,22 @@ Background.propTypes = { }; module.exports = exports['default']; -},{"babel-runtime/helpers/class-call-check":35,"babel-runtime/helpers/create-class":36,"babel-runtime/helpers/get":38,"babel-runtime/helpers/inherits":39,"babel-runtime/helpers/interop-require-default":40,"react":278}],303:[function(require,module,exports){ +},{"react":206}],225:[function(require,module,exports){ 'use strict'; -var _get = require('babel-runtime/helpers/get')['default']; - -var _inherits = require('babel-runtime/helpers/inherits')['default']; - -var _createClass = require('babel-runtime/helpers/create-class')['default']; - -var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; - -var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; - Object.defineProperty(exports, '__esModule', { value: true }); -var _react = require('react'); - -var _react2 = _interopRequireDefault(_react); - -var CloseButton = (function (_React$Component) { - _inherits(CloseButton, _React$Component); +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - function CloseButton() { - _classCallCheck(this, CloseButton); +var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; - _get(Object.getPrototypeOf(CloseButton.prototype), 'constructor', this).apply(this, arguments); - } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - _createClass(CloseButton, [{ - key: 'render', - value: function render() { - var svgTag = ''; - return _react2['default'].createElement('span', { dangerouslySetInnerHTML: { __html: svgTag }, onClick: this.handleClick.bind(this) }); - } - }, { - key: 'handleClick', - value: function handleClick(e) { - e.preventDefault(); - this.props.onClick(); - } - }]); +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - return CloseButton; -})(_react2['default'].Component); - -exports['default'] = CloseButton; - -CloseButton.propTypes = { - onClick: _react2['default'].PropTypes.func.isRequired -}; -module.exports = exports['default']; - -},{"babel-runtime/helpers/class-call-check":35,"babel-runtime/helpers/create-class":36,"babel-runtime/helpers/get":38,"babel-runtime/helpers/inherits":39,"babel-runtime/helpers/interop-require-default":40,"react":278}],304:[function(require,module,exports){ -'use strict'; - -var _get = require('babel-runtime/helpers/get')['default']; - -var _inherits = require('babel-runtime/helpers/inherits')['default']; - -var _createClass = require('babel-runtime/helpers/create-class')['default']; - -var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; - -var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; - -Object.defineProperty(exports, '__esModule', { - value: true -}); +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var _react = require('react'); @@ -34638,22 +33524,22 @@ Header.propTypes = { }; module.exports = exports['default']; -},{"./background":302,"./welcome":306,"babel-runtime/helpers/class-call-check":35,"babel-runtime/helpers/create-class":36,"babel-runtime/helpers/get":38,"babel-runtime/helpers/inherits":39,"babel-runtime/helpers/interop-require-default":40,"react":278}],305:[function(require,module,exports){ -"use strict"; +},{"./background":224,"./welcome":227,"react":206}],226:[function(require,module,exports){ +'use strict'; -var _get = require("babel-runtime/helpers/get")["default"]; +Object.defineProperty(exports, '__esModule', { + value: true +}); -var _inherits = require("babel-runtime/helpers/inherits")["default"]; +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); -var _createClass = require("babel-runtime/helpers/create-class")["default"]; +var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; -var _classCallCheck = require("babel-runtime/helpers/class-call-check")["default"]; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } -var _interopRequireDefault = require("babel-runtime/helpers/interop-require-default")["default"]; +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } -Object.defineProperty(exports, "__esModule", { - value: true -}); +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var _react = require('react'); @@ -34665,44 +33551,39 @@ var Icon = (function (_React$Component) { function Icon() { _classCallCheck(this, Icon); - _get(Object.getPrototypeOf(Icon.prototype), "constructor", this).apply(this, arguments); + _get(Object.getPrototypeOf(Icon.prototype), 'constructor', this).apply(this, arguments); } _createClass(Icon, [{ - key: "render", + key: 'render', value: function render() { - var imageUrl = this.props.imageUrl; - - return _react2["default"].createElement("img", { className: "auth0-lock-header-logo", src: imageUrl }); + var svgTag = ''; + return _react2['default'].createElement('span', { className: 'auth0-lock-header-logo', dangerouslySetInnerHTML: { __html: svgTag } }); } }]); return Icon; -})(_react2["default"].Component); - -exports["default"] = Icon; +})(_react2['default'].Component); -Icon.propTyes = { - imageUrl: _react2["default"].PropTypes.string -}; -module.exports = exports["default"]; +exports['default'] = Icon; +module.exports = exports['default']; -},{"babel-runtime/helpers/class-call-check":35,"babel-runtime/helpers/create-class":36,"babel-runtime/helpers/get":38,"babel-runtime/helpers/inherits":39,"babel-runtime/helpers/interop-require-default":40,"react":278}],306:[function(require,module,exports){ +},{"react":206}],227:[function(require,module,exports){ 'use strict'; -var _get = require('babel-runtime/helpers/get')['default']; +Object.defineProperty(exports, '__esModule', { + value: true +}); -var _inherits = require('babel-runtime/helpers/inherits')['default']; +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); -var _createClass = require('babel-runtime/helpers/create-class')['default']; +var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; -var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } -var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } -Object.defineProperty(exports, '__esModule', { - value: true -}); +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var _react = require('react'); @@ -34735,7 +33616,7 @@ var Welcome = (function (_React$Component) { return _react2['default'].createElement( 'div', { className: 'auth0-lock-header-welcome' }, - imageUrl && _react2['default'].createElement(_icon2['default'], { imageUrl: imageUrl }), + imageUrl && _react2['default'].createElement(_icon2['default'], null), _react2['default'].createElement(_welcome_message2['default'], { name: name }) ); } @@ -34752,22 +33633,22 @@ Welcome.propTypes = { }; module.exports = exports['default']; -},{"./icon":305,"./welcome_message":307,"babel-runtime/helpers/class-call-check":35,"babel-runtime/helpers/create-class":36,"babel-runtime/helpers/get":38,"babel-runtime/helpers/inherits":39,"babel-runtime/helpers/interop-require-default":40,"react":278}],307:[function(require,module,exports){ +},{"./icon":226,"./welcome_message":228,"react":206}],228:[function(require,module,exports){ "use strict"; -var _get = require("babel-runtime/helpers/get")["default"]; +Object.defineProperty(exports, "__esModule", { + value: true +}); -var _inherits = require("babel-runtime/helpers/inherits")["default"]; +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); -var _createClass = require("babel-runtime/helpers/create-class")["default"]; +var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; -var _classCallCheck = require("babel-runtime/helpers/class-call-check")["default"]; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } -var _interopRequireDefault = require("babel-runtime/helpers/interop-require-default")["default"]; +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -Object.defineProperty(exports, "__esModule", { - value: true -}); +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var _react = require('react'); @@ -34816,19 +33697,153 @@ WelcomeMessage.propTypes = { }; module.exports = exports["default"]; -},{"babel-runtime/helpers/class-call-check":35,"babel-runtime/helpers/create-class":36,"babel-runtime/helpers/get":38,"babel-runtime/helpers/inherits":39,"babel-runtime/helpers/interop-require-default":40,"react":278}],308:[function(require,module,exports){ +},{"react":206}],229:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, '__esModule', { + value: true +}); + +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + +var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _react = require('react'); + +var _react2 = _interopRequireDefault(_react); + +var _icon = require('./icon'); + +var _icon2 = _interopRequireDefault(_icon); + +var IconButton = (function (_React$Component) { + _inherits(IconButton, _React$Component); + + function IconButton() { + _classCallCheck(this, IconButton); + + _get(Object.getPrototypeOf(IconButton.prototype), 'constructor', this).apply(this, arguments); + } + + _createClass(IconButton, [{ + key: 'render', + value: function render() { + return _react2['default'].createElement( + 'span', + { onClick: this.handleClick.bind(this) }, + _react2['default'].createElement(_icon2['default'], { name: this.props.name }) + ); + } + }, { + key: 'handleClick', + value: function handleClick(e) { + e.preventDefault(); + this.props.onClick(); + } + }]); + + return IconButton; +})(_react2['default'].Component); + +exports['default'] = IconButton; + +IconButton.propTypes = { + name: _react2['default'].PropTypes.string.isRequired, + onClick: _react2['default'].PropTypes.func.isRequired +}; +module.exports = exports['default']; + +},{"./icon":230,"react":206}],230:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, '__esModule', { + value: true +}); + +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + +var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _react = require('react'); + +var _react2 = _interopRequireDefault(_react); + +var _index = require('./index'); + +var Icon = (function (_React$Component) { + _inherits(Icon, _React$Component); + + function Icon() { + _classCallCheck(this, Icon); + + _get(Object.getPrototypeOf(Icon.prototype), 'constructor', this).apply(this, arguments); + } + + _createClass(Icon, [{ + key: 'render', + value: function render() { + return _react2['default'].createElement('span', { dangerouslySetInnerHTML: { __html: (0, _index.iconTag)(this.props.name) } }); + } + }]); + + return Icon; +})(_react2['default'].Component); + +exports['default'] = Icon; +module.exports = exports['default']; + +},{"./index":231,"react":206}],231:[function(require,module,exports){ 'use strict'; -var _createClass = require('babel-runtime/helpers/create-class')['default']; +Object.defineProperty(exports, '__esModule', { + value: true +}); +exports.iconTag = iconTag; +exports.iconUrl = iconUrl; +var svgTags = { + arrow: '', + auth0: ' ', + back: ' ', + close: '', + email: '', + location: '', + phoneNumber: '', + vcode: '' +}; + +function iconTag(name) { + return svgTags[name]; +} -var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; +function iconUrl(name) { + return 'data:image/svg+xml;utf8,' + iconTag(name); +} -var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; +},{}],232:[function(require,module,exports){ +'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + var _lockRender_scheduler = require('./lock/render_scheduler'); var _lockRender_scheduler2 = _interopRequireDefault(_lockRender_scheduler); @@ -34921,13 +33936,9 @@ _auth0Js2['default'].clientInfo.name += " (LockPasswordless)"; _auth0Js2['default'].clientInfo.version += ' (' + _packageVersion2['default'] + ')'; module.exports = exports['default']; -},{"./lock/actions":309,"./lock/plugin_manager":319,"./lock/render_scheduler":320,"./lock/renderer":321,"./lock/web_api":324,"./passwordless-email/mode_spec":330,"./passwordless-sms/mode_spec":337,"./utils/id_utils":341,"auth0-js":4,"babel-runtime/helpers/class-call-check":35,"babel-runtime/helpers/create-class":36,"babel-runtime/helpers/interop-require-default":40}],309:[function(require,module,exports){ +},{"./lock/actions":233,"./lock/plugin_manager":243,"./lock/render_scheduler":244,"./lock/renderer":245,"./lock/web_api":249,"./passwordless-email/mode_spec":255,"./passwordless-sms/mode_spec":262,"./utils/id_utils":266,"auth0-js":4}],233:[function(require,module,exports){ 'use strict'; -var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; - -var _interopRequireWildcard = require('babel-runtime/helpers/interop-require-wildcard')['default']; - Object.defineProperty(exports, '__esModule', { value: true }); @@ -34936,6 +33947,10 @@ exports.openLock = openLock; exports.closeLock = closeLock; exports.registerMode = registerMode; +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + var _immutable = require('immutable'); var _immutable2 = _interopRequireDefault(_immutable); @@ -34984,69 +33999,66 @@ function registerMode(spec) { (0, _storeIndex.swap)(_storeIndex.setEntity, "mode", spec.name, _immutable2['default'].fromJS(spec)); } -},{"../store/index":339,"./index":316,"./web_api":324,"babel-runtime/helpers/interop-require-default":40,"babel-runtime/helpers/interop-require-wildcard":41,"immutable":101}],310:[function(require,module,exports){ +},{"../store/index":264,"./index":240,"./web_api":249,"immutable":29}],234:[function(require,module,exports){ 'use strict'; -var _get = require('babel-runtime/helpers/get')['default']; +Object.defineProperty(exports, '__esModule', { + value: true +}); -var _inherits = require('babel-runtime/helpers/inherits')['default']; +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); -var _createClass = require('babel-runtime/helpers/create-class')['default']; +var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; -var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } -var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } -Object.defineProperty(exports, '__esModule', { - value: true -}); +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var _react = require('react'); var _react2 = _interopRequireDefault(_react); -var svgTag = ' '; +var Badge = (function (_React$Component) { + _inherits(Badge, _React$Component); -var Auth0Icon = (function (_React$Component) { - _inherits(Auth0Icon, _React$Component); + function Badge() { + _classCallCheck(this, Badge); - function Auth0Icon() { - _classCallCheck(this, Auth0Icon); - - _get(Object.getPrototypeOf(Auth0Icon.prototype), 'constructor', this).apply(this, arguments); + _get(Object.getPrototypeOf(Badge.prototype), 'constructor', this).apply(this, arguments); } - _createClass(Auth0Icon, [{ + _createClass(Badge, [{ key: 'render', value: function render() { - return _react2['default'].createElement('span', { dangerouslySetInnerHTML: { __html: svgTag } }); + var svgTag = ''; + return _react2['default'].createElement('a', { href: 'https://auth0.com/', target: '_blank', className: 'auth0-lock-badge', dangerouslySetInnerHTML: { __html: svgTag } }); } }]); - return Auth0Icon; + return Badge; })(_react2['default'].Component); -exports['default'] = Auth0Icon; - -Auth0Icon.url = 'data:image/svg+xml;utf8,' + svgTag; +exports['default'] = Badge; module.exports = exports['default']; -},{"babel-runtime/helpers/class-call-check":35,"babel-runtime/helpers/create-class":36,"babel-runtime/helpers/get":38,"babel-runtime/helpers/inherits":39,"babel-runtime/helpers/interop-require-default":40,"react":278}],311:[function(require,module,exports){ +},{"react":206}],235:[function(require,module,exports){ "use strict"; -var _get = require("babel-runtime/helpers/get")["default"]; +Object.defineProperty(exports, "__esModule", { + value: true +}); -var _inherits = require("babel-runtime/helpers/inherits")["default"]; +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); -var _createClass = require("babel-runtime/helpers/create-class")["default"]; +var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; -var _classCallCheck = require("babel-runtime/helpers/class-call-check")["default"]; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } -var _interopRequireDefault = require("babel-runtime/helpers/interop-require-default")["default"]; +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -Object.defineProperty(exports, "__esModule", { - value: true -}); +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var _react = require('react'); @@ -35080,30 +34092,30 @@ Avatar.propTypes = { }; module.exports = exports["default"]; -},{"babel-runtime/helpers/class-call-check":35,"babel-runtime/helpers/create-class":36,"babel-runtime/helpers/get":38,"babel-runtime/helpers/inherits":39,"babel-runtime/helpers/interop-require-default":40,"react":278}],312:[function(require,module,exports){ +},{"react":206}],236:[function(require,module,exports){ 'use strict'; -var _get = require('babel-runtime/helpers/get')['default']; +Object.defineProperty(exports, '__esModule', { + value: true +}); -var _inherits = require('babel-runtime/helpers/inherits')['default']; +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); -var _createClass = require('babel-runtime/helpers/create-class')['default']; +var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; -var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } -var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } -Object.defineProperty(exports, '__esModule', { - value: true -}); +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var _react = require('react'); var _react2 = _interopRequireDefault(_react); -var _headerBack_button = require('../header/back_button'); +var _iconButton = require('../icon/button'); -var _headerBack_button2 = _interopRequireDefault(_headerBack_button); +var _iconButton2 = _interopRequireDefault(_iconButton); var CheckmarkIcon = (function (_React$Component) { _inherits(CheckmarkIcon, _React$Component); @@ -35142,7 +34154,7 @@ var ConfirmationPane = (function (_React$Component2) { return _react2['default'].createElement( 'div', { className: 'auth0-lock-confirmation' }, - _react2['default'].createElement(_headerBack_button2['default'], { onClick: backHandler }), + _react2['default'].createElement(_iconButton2['default'], { name: 'back', onClick: backHandler }), _react2['default'].createElement(CheckmarkIcon, null), this.props.children ); @@ -35155,17 +34167,17 @@ var ConfirmationPane = (function (_React$Component2) { exports['default'] = ConfirmationPane; module.exports = exports['default']; -},{"../header/back_button":301,"babel-runtime/helpers/class-call-check":35,"babel-runtime/helpers/create-class":36,"babel-runtime/helpers/get":38,"babel-runtime/helpers/inherits":39,"babel-runtime/helpers/interop-require-default":40,"react":278}],313:[function(require,module,exports){ +},{"../icon/button":229,"react":206}],237:[function(require,module,exports){ 'use strict'; -var _createClass = require('babel-runtime/helpers/create-class')['default']; - -var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; - Object.defineProperty(exports, '__esModule', { value: true }); +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + var LockContainerManager = (function () { function LockContainerManager() { _classCallCheck(this, LockContainerManager); @@ -35199,24 +34211,24 @@ var LockContainerManager = (function () { exports['default'] = LockContainerManager; module.exports = exports['default']; -},{"babel-runtime/helpers/class-call-check":35,"babel-runtime/helpers/create-class":36}],314:[function(require,module,exports){ +},{}],238:[function(require,module,exports){ 'use strict'; -var _get = require('babel-runtime/helpers/get')['default']; +Object.defineProperty(exports, '__esModule', { + value: true +}); -var _inherits = require('babel-runtime/helpers/inherits')['default']; +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); -var _createClass = require('babel-runtime/helpers/create-class')['default']; +var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; -var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } -var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } -var _interopRequireWildcard = require('babel-runtime/helpers/interop-require-wildcard')['default']; +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } -Object.defineProperty(exports, '__esModule', { - value: true -}); +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var _reactAddons = require('react/addons'); @@ -35245,16 +34257,16 @@ var g = _interopRequireWildcard(_gravatarIndex); var ReactTransitionGroup = _reactAddons2['default'].addons.TransitionGroup; var ReactCSSTransitionGroup = _reactAddons2['default'].addons.CSSTransitionGroup; -var CredentialsPane = (function (_React$Component) { - _inherits(CredentialsPane, _React$Component); +var CredPane = (function (_React$Component) { + _inherits(CredPane, _React$Component); - function CredentialsPane() { - _classCallCheck(this, CredentialsPane); + function CredPane() { + _classCallCheck(this, CredPane); - _get(Object.getPrototypeOf(CredentialsPane.prototype), 'constructor', this).apply(this, arguments); + _get(Object.getPrototypeOf(CredPane.prototype), 'constructor', this).apply(this, arguments); } - _createClass(CredentialsPane, [{ + _createClass(CredPane, [{ key: 'render', value: function render() { var _props = this.props; @@ -35279,7 +34291,7 @@ var CredentialsPane = (function (_React$Component) { return _reactAddons2['default'].createElement( 'div', - { className: className }, + { className: className + " auth0-lock-cred-pane" }, _reactAddons2['default'].createElement(_headerHeader2['default'], { name: name, backgroundUrl: backgroundUrl, logoUrl: icon }), _reactAddons2['default'].createElement( ReactTransitionGroup, @@ -35301,28 +34313,28 @@ var CredentialsPane = (function (_React$Component) { } }]); - return CredentialsPane; + return CredPane; })(_reactAddons2['default'].Component); -exports['default'] = CredentialsPane; +exports['default'] = CredPane; module.exports = exports['default']; -},{"../gravatar/index":299,"../header/header":304,"./global_error":315,"./index":316,"./submit_button":322,"babel-runtime/helpers/class-call-check":35,"babel-runtime/helpers/create-class":36,"babel-runtime/helpers/get":38,"babel-runtime/helpers/inherits":39,"babel-runtime/helpers/interop-require-default":40,"babel-runtime/helpers/interop-require-wildcard":41,"react/addons":106}],315:[function(require,module,exports){ +},{"../gravatar/index":222,"../header/header":225,"./global_error":239,"./index":240,"./submit_button":246,"react/addons":34}],239:[function(require,module,exports){ "use strict"; -var _get = require("babel-runtime/helpers/get")["default"]; +Object.defineProperty(exports, "__esModule", { + value: true +}); -var _inherits = require("babel-runtime/helpers/inherits")["default"]; +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); -var _createClass = require("babel-runtime/helpers/create-class")["default"]; +var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; -var _classCallCheck = require("babel-runtime/helpers/class-call-check")["default"]; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } -var _interopRequireDefault = require("babel-runtime/helpers/interop-require-default")["default"]; +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -Object.defineProperty(exports, "__esModule", { - value: true -}); +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var _react = require('react'); @@ -35412,11 +34424,9 @@ GlobalError.propTypes = { }; module.exports = exports["default"]; -},{"babel-runtime/helpers/class-call-check":35,"babel-runtime/helpers/create-class":36,"babel-runtime/helpers/get":38,"babel-runtime/helpers/inherits":39,"babel-runtime/helpers/interop-require-default":40,"react":278}],316:[function(require,module,exports){ +},{"react":206}],240:[function(require,module,exports){ 'use strict'; -var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; - Object.defineProperty(exports, '__esModule', { value: true }); @@ -35439,15 +34449,15 @@ exports.render = render; exports.modeOptions = modeOptions; exports.close = close; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + var _immutable = require('immutable'); var _immutable2 = _interopRequireDefault(_immutable); var _utilsMedia_utils = require('../utils/media_utils'); -var _auth0_icon = require('./auth0_icon'); - -var _auth0_icon2 = _interopRequireDefault(_auth0_icon); +var _iconIndex = require('../icon/index'); function setup(attrs) { var clientID = attrs.clientID; @@ -35457,16 +34467,7 @@ function setup(attrs) { return _immutable2['default'].fromJS({ clientID: clientID, domain: domain, - id: id, - // mode: undefined, - // show: false, - // submitting: false, - // render: false, - - // TODO: figure out how to handle credentials, they are specific to each mode - credentials: { - email: { email: "", valid: false, showInvalid: false } - } + id: id }); } @@ -35532,7 +34533,7 @@ function extractUIOptions(id, options) { return new _immutable.Map({ containerID: options.container || 'auth0-lock-container-' + id, appendContainer: !options.container, - icon: options.icon || _auth0_icon2['default'].url, + icon: options.icon || (0, _iconIndex.iconUrl)("auth0"), closable: undefined === options.closable ? !options.container : !!options.closable, focusInput: undefined === options.focusInput ? !(options.container || (0, _utilsMedia_utils.isSmallScreen)()) : !!options.focusInput, gravatar: undefined === options.gravatar ? true : !!options.gravatar, @@ -35605,7 +34606,6 @@ function render(m, modeName, options) { var modeOptions = options.modeOptions; m = m.merge(_immutable2['default'].fromJS({ - // show: true, mode: modeName, render: true, modeOptions: modeOptions @@ -35622,24 +34622,24 @@ function close(m) { return m.set("show", false); } -},{"../utils/media_utils":343,"./auth0_icon":310,"babel-runtime/helpers/interop-require-default":40,"immutable":101}],317:[function(require,module,exports){ +},{"../icon/index":231,"../utils/media_utils":268,"immutable":29}],241:[function(require,module,exports){ 'use strict'; -var _get = require('babel-runtime/helpers/get')['default']; +Object.defineProperty(exports, '__esModule', { + value: true +}); -var _inherits = require('babel-runtime/helpers/inherits')['default']; +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); -var _createClass = require('babel-runtime/helpers/create-class')['default']; +var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; -var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } -var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } -var _interopRequireWildcard = require('babel-runtime/helpers/interop-require-wildcard')['default']; +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } -Object.defineProperty(exports, '__esModule', { - value: true -}); +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var _reactAddons = require('react/addons'); @@ -35649,13 +34649,13 @@ var _avatar = require('./avatar'); var _avatar2 = _interopRequireDefault(_avatar); -var _headerBack_button = require('../header/back_button'); +var _iconButton = require('../icon/button'); -var _headerBack_button2 = _interopRequireDefault(_headerBack_button); +var _iconButton2 = _interopRequireDefault(_iconButton); -var _headerClose_button = require('../header/close_button'); +var _auth0_badge = require('./auth0_badge'); -var _headerClose_button2 = _interopRequireDefault(_headerClose_button); +var _auth0_badge2 = _interopRequireDefault(_auth0_badge); var _index = require('./index'); @@ -35703,9 +34703,8 @@ var Lock = (function (_React$Component) { value: function render() { var _props = this.props; var backHandler = _props.backHandler; + var children = _props.children; var closeHandler = _props.closeHandler; - var mainPane = _props.mainPane; - var mainPaneKey = _props.mainPaneKey; var lock = _props.lock; var submitHandler = _props.submitHandler; var disallowClose = _props.disallowClose; @@ -35737,18 +34736,22 @@ var Lock = (function (_React$Component) { 'form', { className: 'auth0-lock-widget', onSubmit: this.handleSubmit.bind(this) }, gravatar && _reactAddons2['default'].createElement(_avatar2['default'], { imageUrl: g.imageUrl(gravatar) }), - showCloseButton && _reactAddons2['default'].createElement(_headerClose_button2['default'], { onClick: this.handleClose.bind(this) }), - backHandler && _reactAddons2['default'].createElement(_headerBack_button2['default'], { onClick: this.handleBack.bind(this) }), + showCloseButton && _reactAddons2['default'].createElement(_iconButton2['default'], { name: 'close', onClick: this.handleClose.bind(this) }), + backHandler && _reactAddons2['default'].createElement(_iconButton2['default'], { name: 'back', onClick: this.handleBack.bind(this) }), _reactAddons2['default'].createElement( 'div', { className: 'auth0-lock-widget-container' }, _reactAddons2['default'].createElement( ReactCSSTransitionGroup, { transitionName: 'horizontal-fade' }, - _reactAddons2['default'].createElement(this.props.mainPane, { key: mainPaneKey, lock: lock }) + children ) ), - _reactAddons2['default'].createElement('a', { href: 'https://auth0.com/', target: '_blank', className: 'auth0-lock-badge auth0-lock-icon' }) + _reactAddons2['default'].createElement( + 'span', + { className: 'auth0-lock-badge-bottom' }, + _reactAddons2['default'].createElement(_auth0_badge2['default'], null) + ) ) ) ); @@ -35794,7 +34797,7 @@ Lock.propTypes = { }; module.exports = exports['default']; -},{"../gravatar/index":299,"../header/back_button":301,"../header/close_button":303,"../utils/esc_keydown_utils":340,"./actions":309,"./avatar":311,"./index":316,"babel-runtime/helpers/class-call-check":35,"babel-runtime/helpers/create-class":36,"babel-runtime/helpers/get":38,"babel-runtime/helpers/inherits":39,"babel-runtime/helpers/interop-require-default":40,"babel-runtime/helpers/interop-require-wildcard":41,"react/addons":106}],318:[function(require,module,exports){ +},{"../gravatar/index":222,"../icon/button":229,"../utils/esc_keydown_utils":265,"./actions":233,"./auth0_badge":234,"./avatar":235,"./index":240,"react/addons":34}],242:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -35833,19 +34836,19 @@ function openFunctionArgsResolver(fnName, args) { throw new Error("`" + fnName + "` must be called with two arguments at most."); } -},{}],319:[function(require,module,exports){ +},{}],243:[function(require,module,exports){ "use strict"; -var _createClass = require("babel-runtime/helpers/create-class")["default"]; - -var _classCallCheck = require("babel-runtime/helpers/class-call-check")["default"]; - -var _interopRequireDefault = require("babel-runtime/helpers/interop-require-default")["default"]; - Object.defineProperty(exports, "__esModule", { value: true }); +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + var _immutable = require('immutable'); var _immutable2 = _interopRequireDefault(_immutable); @@ -35906,15 +34909,15 @@ var PluginManager = (function () { exports["default"] = PluginManager; module.exports = exports["default"]; -},{"babel-runtime/helpers/class-call-check":35,"babel-runtime/helpers/create-class":36,"babel-runtime/helpers/interop-require-default":40,"immutable":101}],320:[function(require,module,exports){ +},{"immutable":29}],244:[function(require,module,exports){ "use strict"; -var _classCallCheck = require("babel-runtime/helpers/class-call-check")["default"]; - Object.defineProperty(exports, "__esModule", { value: true }); +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + var _storeIndex = require('../store/index'); var RenderScheduler = function RenderScheduler(spec) { @@ -35928,22 +34931,20 @@ var RenderScheduler = function RenderScheduler(spec) { exports["default"] = RenderScheduler; module.exports = exports["default"]; -},{"../store/index":339,"babel-runtime/helpers/class-call-check":35}],321:[function(require,module,exports){ +},{"../store/index":264}],245:[function(require,module,exports){ 'use strict'; -var _createClass = require('babel-runtime/helpers/create-class')['default']; - -var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; +Object.defineProperty(exports, '__esModule', { + value: true +}); -var _extends = require('babel-runtime/helpers/extends')['default']; +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); -var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } -var _interopRequireWildcard = require('babel-runtime/helpers/interop-require-wildcard')['default']; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } -Object.defineProperty(exports, '__esModule', { - value: true -}); +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } var _react = require('react'); @@ -35961,9 +34962,9 @@ var _index = require('./index'); var l = _interopRequireWildcard(_index); -var _credentialsIndex = require('../credentials/index'); +var _credIndex = require('../cred/index'); -var c = _interopRequireWildcard(_credentialsIndex); +var c = _interopRequireWildcard(_credIndex); var _gravatarIndex = require('../gravatar/index'); @@ -35990,8 +34991,7 @@ var Renderer = (function () { lock = lock.set("gravatar", gravatar && g.loaded(gravatar) ? gravatar : null); var container = _this.containerManager.ensure(l.ui.containerID(lock), l.ui.appendContainer(lock)); var renderFn = fns.get(l.mode(lock)); - var spec = renderFn(lock); - _react2['default'].render(_react2['default'].createElement(_lock2['default'], _extends({ lock: lock }, spec)), container); + _react2['default'].render(renderFn(lock), container); }); } }]); @@ -36002,79 +35002,127 @@ var Renderer = (function () { exports['default'] = Renderer; module.exports = exports['default']; -},{"../credentials/index":287,"../gravatar/index":299,"../store/index":339,"./container_manager":313,"./index":316,"./lock":317,"babel-runtime/helpers/class-call-check":35,"babel-runtime/helpers/create-class":36,"babel-runtime/helpers/extends":37,"babel-runtime/helpers/interop-require-default":40,"babel-runtime/helpers/interop-require-wildcard":41,"react":278}],322:[function(require,module,exports){ -"use strict"; +},{"../cred/index":213,"../gravatar/index":222,"../store/index":264,"./container_manager":237,"./index":240,"./lock":241,"react":206}],246:[function(require,module,exports){ +'use strict'; -var _get = require("babel-runtime/helpers/get")["default"]; +Object.defineProperty(exports, '__esModule', { + value: true +}); -var _inherits = require("babel-runtime/helpers/inherits")["default"]; +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); -var _createClass = require("babel-runtime/helpers/create-class")["default"]; +var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; -var _classCallCheck = require("babel-runtime/helpers/class-call-check")["default"]; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } -var _interopRequireDefault = require("babel-runtime/helpers/interop-require-default")["default"]; +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } -Object.defineProperty(exports, "__esModule", { - value: true -}); +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var _react = require('react'); var _react2 = _interopRequireDefault(_react); +var _submit_icon = require('./submit_icon'); + +var _submit_icon2 = _interopRequireDefault(_submit_icon); + var SubmitButton = (function (_React$Component) { _inherits(SubmitButton, _React$Component); function SubmitButton() { _classCallCheck(this, SubmitButton); - _get(Object.getPrototypeOf(SubmitButton.prototype), "constructor", this).apply(this, arguments); + _get(Object.getPrototypeOf(SubmitButton.prototype), 'constructor', this).apply(this, arguments); } _createClass(SubmitButton, [{ - key: "render", + key: 'render', value: function render() { - return _react2["default"].createElement( - "button", - { type: "submit", className: "auth0-lock-submit", disabled: this.props.disabled }, - _react2["default"].createElement( - "div", - { className: "auth0-loading-container" }, - _react2["default"].createElement("div", { className: "auth0-loading" }) + return _react2['default'].createElement( + 'button', + { type: 'submit', className: 'auth0-lock-submit', disabled: this.props.disabled }, + _react2['default'].createElement( + 'div', + { className: 'auth0-loading-container' }, + _react2['default'].createElement('div', { className: 'auth0-loading' }) ), - _react2["default"].createElement("i", { className: "auth0-lock-icon" }) + _react2['default'].createElement(_submit_icon2['default'], null) ); } }]); return SubmitButton; -})(_react2["default"].Component); +})(_react2['default'].Component); -exports["default"] = SubmitButton; +exports['default'] = SubmitButton; SubmitButton.propTypes = { - disabled: _react2["default"].PropTypes.bool + disabled: _react2['default'].PropTypes.bool }; -module.exports = exports["default"]; +module.exports = exports['default']; -},{"babel-runtime/helpers/class-call-check":35,"babel-runtime/helpers/create-class":36,"babel-runtime/helpers/get":38,"babel-runtime/helpers/inherits":39,"babel-runtime/helpers/interop-require-default":40,"react":278}],323:[function(require,module,exports){ -"use strict"; +},{"./submit_icon":247,"react":206}],247:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, '__esModule', { + value: true +}); + +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); -var _get = require("babel-runtime/helpers/get")["default"]; +var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; -var _inherits = require("babel-runtime/helpers/inherits")["default"]; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } -var _createClass = require("babel-runtime/helpers/create-class")["default"]; +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } -var _classCallCheck = require("babel-runtime/helpers/class-call-check")["default"]; +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } -var _interopRequireDefault = require("babel-runtime/helpers/interop-require-default")["default"]; +var _react = require('react'); + +var _react2 = _interopRequireDefault(_react); + +var SubmitIcon = (function (_React$Component) { + _inherits(SubmitIcon, _React$Component); + + function SubmitIcon() { + _classCallCheck(this, SubmitIcon); + + _get(Object.getPrototypeOf(SubmitIcon.prototype), 'constructor', this).apply(this, arguments); + } + + _createClass(SubmitIcon, [{ + key: 'render', + value: function render() { + var svgTag = ''; + return _react2['default'].createElement('span', { dangerouslySetInnerHTML: { __html: svgTag } }); + } + }]); + + return SubmitIcon; +})(_react2['default'].Component); + +exports['default'] = SubmitIcon; +module.exports = exports['default']; + +},{"react":206}],248:[function(require,module,exports){ +"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + +var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + var _react = require('react'); var _react2 = _interopRequireDefault(_react); @@ -36102,20 +35150,20 @@ var Terms = (function (_React$Component) { exports["default"] = Terms; module.exports = exports["default"]; -},{"babel-runtime/helpers/class-call-check":35,"babel-runtime/helpers/create-class":36,"babel-runtime/helpers/get":38,"babel-runtime/helpers/inherits":39,"babel-runtime/helpers/interop-require-default":40,"react":278}],324:[function(require,module,exports){ +},{"react":206}],249:[function(require,module,exports){ 'use strict'; -var _createClass = require('babel-runtime/helpers/create-class')['default']; +Object.defineProperty(exports, '__esModule', { + value: true +}); -var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); -var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } -var _interopRequireWildcard = require('babel-runtime/helpers/interop-require-wildcard')['default']; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } -Object.defineProperty(exports, '__esModule', { - value: true -}); +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } var _auth0Js = require('auth0-js'); @@ -36176,18 +35224,14 @@ function normalizeError(error) { } module.exports = exports['default']; -},{"../utils/string_utils":344,"auth0-js":4,"babel-runtime/helpers/class-call-check":35,"babel-runtime/helpers/create-class":36,"babel-runtime/helpers/interop-require-default":40,"babel-runtime/helpers/interop-require-wildcard":41}],325:[function(require,module,exports){ +},{"../utils/string_utils":269,"auth0-js":4}],250:[function(require,module,exports){ 'use strict'; -var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; - -var _interopRequireWildcard = require('babel-runtime/helpers/interop-require-wildcard')['default']; - Object.defineProperty(exports, '__esModule', { value: true }); exports.changeEmail = changeEmail; -exports.changeVerificationCode = changeVerificationCode; +exports.changeVcode = changeVcode; exports.requestPasswordlessEmail = requestPasswordlessEmail; exports.requestPasswordlessEmailSuccess = requestPasswordlessEmailSuccess; exports.requestPasswordlessEmailError = requestPasswordlessEmailError; @@ -36198,15 +35242,19 @@ exports.signIn = signIn; exports.reset = reset; exports.close = close; +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + var _lockWeb_api = require('../lock/web_api'); var _lockWeb_api2 = _interopRequireDefault(_lockWeb_api); var _storeIndex = require('../store/index'); -var _credentialsIndex = require('../credentials/index'); +var _credIndex = require('../cred/index'); -var c = _interopRequireWildcard(_credentialsIndex); +var c = _interopRequireWildcard(_credIndex); var _lockIndex = require('../lock/index'); @@ -36220,8 +35268,8 @@ function changeEmail(lockID, email) { (0, _storeIndex.swap)(_storeIndex.updateEntity, "lock", lockID, c.setEmail, email); } -function changeVerificationCode(lockID, verificationCode) { - (0, _storeIndex.swap)(_storeIndex.updateEntity, "lock", lockID, c.setVerificationCode, verificationCode); +function changeVcode(lockID, vcode) { + (0, _storeIndex.swap)(_storeIndex.updateEntity, "lock", lockID, c.setVcode, vcode); } function requestPasswordlessEmail(lockID) { @@ -36296,10 +35344,10 @@ function resendEmailError(lockID, error) { function signIn(lockID) { // TODO: abstract this submit thing (0, _storeIndex.swap)(_storeIndex.updateEntity, "lock", lockID, function (lock) { - if (c.validVerificationCode(lock)) { + if (c.validVcode(lock)) { return l.setSubmitting(lock, true); } else { - return c.setShowInvalidVerificationCode(lock); + return c.setShowInvalidVcode(lock); } }); @@ -36309,7 +35357,7 @@ function signIn(lockID) { var options = { connection: "email", username: c.email(lock), - password: c.verificationCode(lock), + password: c.vcode(lock), sso: false }; _lockWeb_api2['default'].signIn(lockID, options, function (error) { @@ -36348,45 +35396,45 @@ function signInError(lockID, error) { } function reset(lockID) { - var clearCredentials = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1]; + var clearCred = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1]; - (0, _storeIndex.swap)(_storeIndex.updateEntity, "lock", lockID, m.reset, clearCredentials); + (0, _storeIndex.swap)(_storeIndex.updateEntity, "lock", lockID, m.reset, clearCred); } function close(id) { (0, _storeIndex.swap)(_storeIndex.updateEntity, "lock", id, m.close); } -},{"../credentials/index":287,"../lock/index":316,"../lock/web_api":324,"../store/index":339,"./index":329,"babel-runtime/helpers/interop-require-default":40,"babel-runtime/helpers/interop-require-wildcard":41}],326:[function(require,module,exports){ +},{"../cred/index":213,"../lock/index":240,"../lock/web_api":249,"../store/index":264,"./index":254}],251:[function(require,module,exports){ 'use strict'; -var _get = require('babel-runtime/helpers/get')['default']; +Object.defineProperty(exports, '__esModule', { + value: true +}); -var _inherits = require('babel-runtime/helpers/inherits')['default']; +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); -var _createClass = require('babel-runtime/helpers/create-class')['default']; +var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; -var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } -var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } -var _interopRequireWildcard = require('babel-runtime/helpers/interop-require-wildcard')['default']; +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } -Object.defineProperty(exports, '__esModule', { - value: true -}); +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var _react = require('react'); var _react2 = _interopRequireDefault(_react); -var _lockCredentials_pane = require('../lock/credentials_pane'); +var _lockCred_pane = require('../lock/cred_pane'); -var _lockCredentials_pane2 = _interopRequireDefault(_lockCredentials_pane); +var _lockCred_pane2 = _interopRequireDefault(_lockCred_pane); -var _credentialsEmail_input = require('../credentials/email_input'); +var _credEmail_input = require('../cred/email_input'); -var _credentialsEmail_input2 = _interopRequireDefault(_credentialsEmail_input); +var _credEmail_input2 = _interopRequireDefault(_credEmail_input); var _lockTerms = require('../lock/terms'); @@ -36396,9 +35444,9 @@ var _email_sent_confirmation = require('./email_sent_confirmation'); var _email_sent_confirmation2 = _interopRequireDefault(_email_sent_confirmation); -var _credentialsIndex = require('../credentials/index'); +var _credIndex = require('../cred/index'); -var c = _interopRequireWildcard(_credentialsIndex); +var c = _interopRequireWildcard(_credIndex); var _actions = require('./actions'); @@ -36427,7 +35475,7 @@ var AskEmail = (function (_React$Component) { var auxiliaryPane = m.isSendLink(lock) && m.emailSent(lock) ? _react2['default'].createElement(_email_sent_confirmation2['default'], { key: 'auxiliarypane', lock: lock }) : null; return _react2['default'].createElement( - _lockCredentials_pane2['default'], + _lockCred_pane2['default'], { lock: lock, auxiliaryPane: auxiliaryPane, className: 'auth0-lock-ask-email' }, _react2['default'].createElement( 'div', @@ -36440,7 +35488,7 @@ var AskEmail = (function (_React$Component) { null, 'Enter your email to sign in or sign up.' ), - _react2['default'].createElement(_credentialsEmail_input2['default'], { value: c.email(lock), + _react2['default'].createElement(_credEmail_input2['default'], { value: c.email(lock), isValid: !c.visiblyInvalidEmail(lock), onChange: this.handleEmailChange.bind(this), gravatar: l.ui.gravatar(lock), @@ -36463,36 +35511,36 @@ var AskEmail = (function (_React$Component) { exports['default'] = AskEmail; module.exports = exports['default']; -},{"../credentials/email_input":286,"../credentials/index":287,"../lock/credentials_pane":314,"../lock/index":316,"../lock/terms":323,"./actions":325,"./email_sent_confirmation":328,"./index":329,"babel-runtime/helpers/class-call-check":35,"babel-runtime/helpers/create-class":36,"babel-runtime/helpers/get":38,"babel-runtime/helpers/inherits":39,"babel-runtime/helpers/interop-require-default":40,"babel-runtime/helpers/interop-require-wildcard":41,"react":278}],327:[function(require,module,exports){ +},{"../cred/email_input":212,"../cred/index":213,"../lock/cred_pane":238,"../lock/index":240,"../lock/terms":248,"./actions":250,"./email_sent_confirmation":253,"./index":254,"react":206}],252:[function(require,module,exports){ 'use strict'; -var _get = require('babel-runtime/helpers/get')['default']; +Object.defineProperty(exports, '__esModule', { + value: true +}); -var _inherits = require('babel-runtime/helpers/inherits')['default']; +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); -var _createClass = require('babel-runtime/helpers/create-class')['default']; +var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; -var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } -var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } -var _interopRequireWildcard = require('babel-runtime/helpers/interop-require-wildcard')['default']; +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } -Object.defineProperty(exports, '__esModule', { - value: true -}); +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var _react = require('react'); var _react2 = _interopRequireDefault(_react); -var _lockCredentials_pane = require('../lock/credentials_pane'); +var _lockCred_pane = require('../lock/cred_pane'); -var _lockCredentials_pane2 = _interopRequireDefault(_lockCredentials_pane); +var _lockCred_pane2 = _interopRequireDefault(_lockCred_pane); -var _credentialsVerification_code_input = require('../credentials/verification_code_input'); +var _credVcode_input = require('../cred/vcode_input'); -var _credentialsVerification_code_input2 = _interopRequireDefault(_credentialsVerification_code_input); +var _credVcode_input2 = _interopRequireDefault(_credVcode_input); var _actions = require('./actions'); @@ -36500,27 +35548,27 @@ var _lockIndex = require('../lock/index'); var l = _interopRequireWildcard(_lockIndex); -var _credentialsIndex = require('../credentials/index'); +var _credIndex = require('../cred/index'); -var c = _interopRequireWildcard(_credentialsIndex); +var c = _interopRequireWildcard(_credIndex); -var AskVerificationCode = (function (_React$Component) { - _inherits(AskVerificationCode, _React$Component); +var AskVcode = (function (_React$Component) { + _inherits(AskVcode, _React$Component); - function AskVerificationCode() { - _classCallCheck(this, AskVerificationCode); + function AskVcode() { + _classCallCheck(this, AskVcode); - _get(Object.getPrototypeOf(AskVerificationCode.prototype), 'constructor', this).apply(this, arguments); + _get(Object.getPrototypeOf(AskVcode.prototype), 'constructor', this).apply(this, arguments); } - _createClass(AskVerificationCode, [{ + _createClass(AskVcode, [{ key: 'render', value: function render() { var lock = this.props.lock; return _react2['default'].createElement( - _lockCredentials_pane2['default'], - { lock: lock, className: 'auth0-lock-ask-email-verification-code' }, + _lockCred_pane2['default'], + { lock: lock, className: 'auth0-lock-ask-email-vcode' }, _react2['default'].createElement( 'div', { className: 'auth0-lock-form auth0-lock-passwordless' }, @@ -36540,45 +35588,45 @@ var AskVerificationCode = (function (_React$Component) { _react2['default'].createElement('br', null), 'with your passcode.' ), - _react2['default'].createElement(_credentialsVerification_code_input2['default'], { value: c.verificationCode(lock), - isValid: !c.visiblyInvalidVerificationCode(lock) && !l.globalError(lock), - onChange: this.handleVerificationCodeChange.bind(this), + _react2['default'].createElement(_credVcode_input2['default'], { value: c.vcode(lock), + isValid: !c.visiblyInvalidVcode(lock) && !l.globalError(lock), + onChange: this.handleVcodeChange.bind(this), autoFocus: l.ui.focusInput(lock) }) ) ); } }, { - key: 'handleVerificationCodeChange', - value: function handleVerificationCodeChange(e) { + key: 'handleVcodeChange', + value: function handleVcodeChange(e) { e.preventDefault(); - (0, _actions.changeVerificationCode)(l.id(this.props.lock), e.target.value); + (0, _actions.changeVcode)(l.id(this.props.lock), e.target.value); } }]); - return AskVerificationCode; + return AskVcode; })(_react2['default'].Component); -exports['default'] = AskVerificationCode; +exports['default'] = AskVcode; module.exports = exports['default']; -},{"../credentials/index":287,"../credentials/verification_code_input":295,"../lock/credentials_pane":314,"../lock/index":316,"./actions":325,"babel-runtime/helpers/class-call-check":35,"babel-runtime/helpers/create-class":36,"babel-runtime/helpers/get":38,"babel-runtime/helpers/inherits":39,"babel-runtime/helpers/interop-require-default":40,"babel-runtime/helpers/interop-require-wildcard":41,"react":278}],328:[function(require,module,exports){ +},{"../cred/index":213,"../cred/vcode_input":218,"../lock/cred_pane":238,"../lock/index":240,"./actions":250,"react":206}],253:[function(require,module,exports){ 'use strict'; -var _get = require('babel-runtime/helpers/get')['default']; +Object.defineProperty(exports, '__esModule', { + value: true +}); -var _inherits = require('babel-runtime/helpers/inherits')['default']; +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); -var _createClass = require('babel-runtime/helpers/create-class')['default']; +var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; -var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } -var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } -var _interopRequireWildcard = require('babel-runtime/helpers/interop-require-wildcard')['default']; +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } -Object.defineProperty(exports, '__esModule', { - value: true -}); +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var _react = require('react'); @@ -36742,11 +35790,9 @@ var EmailSentConfirmation = (function (_React$Component4) { exports['default'] = EmailSentConfirmation; module.exports = exports['default']; -},{"../lock/confirmation_pane":312,"../lock/index":316,"./actions":325,"./index":329,"babel-runtime/helpers/class-call-check":35,"babel-runtime/helpers/create-class":36,"babel-runtime/helpers/get":38,"babel-runtime/helpers/inherits":39,"babel-runtime/helpers/interop-require-default":40,"babel-runtime/helpers/interop-require-wildcard":41,"react":278}],329:[function(require,module,exports){ +},{"../lock/confirmation_pane":236,"../lock/index":240,"./actions":250,"./index":254,"react":206}],254:[function(require,module,exports){ "use strict"; -var _interopRequireWildcard = require("babel-runtime/helpers/interop-require-wildcard")["default"]; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -36764,6 +35810,8 @@ exports.send = send; exports.isSendLink = isSendLink; exports.close = close; +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj["default"] = obj; return newObj; } } + var _lockIndex = require('../lock/index'); var l = _interopRequireWildcard(_lockIndex); @@ -36818,10 +35866,10 @@ function resendAvailable(m) { } function reset(m) { - var clearCredentials = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1]; + var clearCred = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1]; - if (clearCredentials) { - m = m.remove("credentials"); + if (clearCred) { + m = m.remove("cred"); } return l.clearGlobalError(m.remove("emailSent").remove("resendStatus")); } @@ -36838,17 +35886,17 @@ function close(m) { return reset(l.close(m)); } -},{"../lock/index":316,"babel-runtime/helpers/interop-require-wildcard":41}],330:[function(require,module,exports){ +},{"../lock/index":240}],255:[function(require,module,exports){ 'use strict'; -var _slicedToArray = require('babel-runtime/helpers/sliced-to-array')['default']; - -var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; - Object.defineProperty(exports, '__esModule', { value: true }); +var _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })(); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + var _lockActions = require('../lock/actions'); var _actions = require('./actions'); @@ -36904,25 +35952,25 @@ exports['default'] = { }; module.exports = exports['default']; -},{"../lock/actions":309,"../lock/mode":318,"./actions":325,"./render":331,"babel-runtime/helpers/interop-require-default":40,"babel-runtime/helpers/sliced-to-array":43}],331:[function(require,module,exports){ +},{"../lock/actions":233,"../lock/mode":242,"./actions":250,"./render":256}],256:[function(require,module,exports){ 'use strict'; -var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; - -var _interopRequireWildcard = require('babel-runtime/helpers/interop-require-wildcard')['default']; - Object.defineProperty(exports, '__esModule', { value: true }); exports['default'] = render; +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + var _ask_email = require('./ask_email'); var _ask_email2 = _interopRequireDefault(_ask_email); -var _ask_verification_code = require('./ask_verification_code'); +var _ask_vcode = require('./ask_vcode'); -var _ask_verification_code2 = _interopRequireDefault(_ask_verification_code); +var _ask_vcode2 = _interopRequireDefault(_ask_vcode); var _actions = require('./actions'); @@ -36934,11 +35982,19 @@ var _index = require('./index'); var m = _interopRequireWildcard(_index); +var _lockLock = require('../lock/lock'); + +var _lockLock2 = _interopRequireDefault(_lockLock); + +var _react = require('react'); + +var _react2 = _interopRequireDefault(_react); + function askEmailSubmitHandler(lock) { (0, _actions.requestPasswordlessEmail)(l.id(lock)); } -function askVerificationCodeSubmitHandler(lock) { +function askVcodeSubmitHandler(lock) { (0, _actions.signIn)(l.id(lock)); } @@ -36947,53 +36003,26 @@ function backHandler(lock) { } function render(lock) { - if (m.isSendLink(lock)) { - return { - closeHandler: _actions.close, - mainPane: _ask_email2['default'], - mainPaneKey: "ask-email", - submitHandler: !m.emailSent(lock) && askEmailSubmitHandler - }; - } else { - return { - backHandler: m.emailSent(lock) ? backHandler : null, - closeHandler: _actions.close, - mainPane: m.emailSent(lock) ? _ask_verification_code2['default'] : _ask_email2['default'], - mainPaneKey: m.emailSent(lock) ? "ask-verification-code" : "ask-email", - submitHandler: m.emailSent(lock) ? askVerificationCodeSubmitHandler : askEmailSubmitHandler - }; - } + var children = m.isSendLink(lock) || !m.emailSent(lock) ? _react2['default'].createElement(_ask_email2['default'], { lock: lock, key: 'ask-email' }) : _react2['default'].createElement(_ask_vcode2['default'], { lock: lock, key: 'ask-vcode' }); - // switch(state) { - // case LockStates.ASK_VERIFICATION_CODE: - // return ( - // - // - // - // ); - // case LockStates.DONE: - // return ; - // case LockStates.READY: - // return ( - // - // - // - // ); - // default: - // const mode = lock.get("mode"); - // throw new Error(`unknown state ${state} for mode ${mode}`) - // } + var submitHandler = !m.emailSent(lock) ? askEmailSubmitHandler : !m.isSendLink(lock) && askVcodeSubmitHandler; + + var props = { + backHandler: !m.isSendLink(lock) && m.emailSent(lock) ? backHandler : null, + children: children, + closeHandler: _actions.close, + lock: lock, + submitHandler: submitHandler + }; + + return _react2['default'].createElement(_lockLock2['default'], props); } module.exports = exports['default']; -},{"../lock/index":316,"./actions":325,"./ask_email":326,"./ask_verification_code":327,"./index":329,"babel-runtime/helpers/interop-require-default":40,"babel-runtime/helpers/interop-require-wildcard":41}],332:[function(require,module,exports){ +},{"../lock/index":240,"../lock/lock":241,"./actions":250,"./ask_email":251,"./ask_vcode":252,"./index":254,"react":206}],257:[function(require,module,exports){ 'use strict'; -var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; - -var _interopRequireWildcard = require('babel-runtime/helpers/interop-require-wildcard')['default']; - Object.defineProperty(exports, '__esModule', { value: true }); @@ -37003,11 +36032,15 @@ exports.changePhoneLocation = changePhoneLocation; exports.sendSMS = sendSMS; exports.sendSMSSuccess = sendSMSSuccess; exports.sendSMSError = sendSMSError; -exports.changeVerificationCode = changeVerificationCode; +exports.changeVcode = changeVcode; exports.signIn = signIn; exports.reset = reset; exports.close = close; +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + var _storeIndex = require('../store/index'); var _lockWeb_api = require('../lock/web_api'); @@ -37022,9 +36055,9 @@ var _index = require('./index'); var m = _interopRequireWildcard(_index); -var _credentialsIndex = require('../credentials/index'); +var _credIndex = require('../cred/index'); -var c = _interopRequireWildcard(_credentialsIndex); +var c = _interopRequireWildcard(_credIndex); function changePhoneNumber(id, phoneNumber) { (0, _storeIndex.swap)(_storeIndex.updateEntity, "lock", id, c.setPhoneNumber, phoneNumber); @@ -37079,17 +36112,17 @@ function sendSMSError(id, error) { (0, _storeIndex.swap)(_storeIndex.updateEntity, "lock", id, l.setSubmitting, false, errorMessage); } -function changeVerificationCode(id, verificationCode) { - return (0, _storeIndex.swap)(_storeIndex.updateEntity, "lock", id, c.setVerificationCode, verificationCode); +function changeVcode(id, vcode) { + return (0, _storeIndex.swap)(_storeIndex.updateEntity, "lock", id, c.setVcode, vcode); } function signIn(id) { // TODO: abstract this submit thing (0, _storeIndex.swap)(_storeIndex.updateEntity, "lock", id, function (lock) { - if (c.validVerificationCode(lock)) { + if (c.validVcode(lock)) { return l.setSubmitting(lock, true); } else { - return c.setShowInvalidVerificationCode(lock); + return c.setShowInvalidVcode(lock); } }); @@ -37099,7 +36132,7 @@ function signIn(id) { var options = { connection: "sms", username: c.fullPhoneNumber(lock), - password: c.verificationCode(lock), + password: c.vcode(lock), sso: false }; @@ -37139,9 +36172,9 @@ function signInError(id, error) { } function reset(id) { - var clearCredentials = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1]; + var clearCred = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1]; - (0, _storeIndex.swap)(_storeIndex.updateEntity, "lock", id, m.reset, clearCredentials); + (0, _storeIndex.swap)(_storeIndex.updateEntity, "lock", id, m.reset, clearCred); } function close(id) { @@ -37149,81 +36182,32 @@ function close(id) { (0, _storeIndex.swap)(_storeIndex.updateEntity, "lock", id, m.close); } -// import { Map } from 'immutable'; -// import { LockStates } from '../control/constants'; -// import { getLock, updateLock }k from '../store/index'; -// import { fullPhoneNumber, setCountryCode, setPhoneNumber, setShowInvalidPhoneNumber, setVerificationCode, validPhoneNumber, validVerificationCode, verificationCode } from '../credentials/index'; -// import WebApi from '../lock/web_api'; -// -// export function changeVerificationCode(lockID, verificationCode) { -// return updateLock(lockID, setVerificationCode, verificationCode); -// } -// -// export function signIn(lockID) { -// let submit = false; -// updateLock(lockID, lock => { -// if (validVerificationCode(lock)) { -// submit = true; -// return lock.set("submitting", true); -// } else { -// return setShowInvalidVerificationCode(lock); -// } -// }); -// -// if (submit) { -// const lock = getLock(lockID); -// const options = { -// connection: "sms", -// username: fullPhoneNumber(lock), -// password: verificationCode(lock), -// sso: false -// }; -// WebApi.signIn(lockID, options, ignInSuccess, signInError); -// } -// } -// -// function signInSuccess(lockID, response) { -// const callback = l.ui.signInCallback(getLock(lockID));; -// if (callback) { -// callback.apply(null, response); -// } -// // TODO update lock state -// } -// -// function signInError(lockID, error) { -// const callback = l.ui.signInCallback(getLock(lockID));; -// if (callback) { -// callback.call(null, error); -// } -// // TODO update lock state -// } - -},{"../credentials/index":287,"../lock":316,"../lock/web_api":324,"../store/index":339,"./index":336,"babel-runtime/helpers/interop-require-default":40,"babel-runtime/helpers/interop-require-wildcard":41}],333:[function(require,module,exports){ +},{"../cred/index":213,"../lock":240,"../lock/web_api":249,"../store/index":264,"./index":261}],258:[function(require,module,exports){ 'use strict'; -var _get = require('babel-runtime/helpers/get')['default']; +Object.defineProperty(exports, '__esModule', { + value: true +}); -var _inherits = require('babel-runtime/helpers/inherits')['default']; +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); -var _createClass = require('babel-runtime/helpers/create-class')['default']; +var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; -var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } -var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } -var _interopRequireWildcard = require('babel-runtime/helpers/interop-require-wildcard')['default']; +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } -Object.defineProperty(exports, '__esModule', { - value: true -}); +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var _react = require('react'); var _react2 = _interopRequireDefault(_react); -var _credentialsLocation_select = require('../credentials/location_select'); +var _credLocation_select = require('../cred/location_select'); -var _credentialsLocation_select2 = _interopRequireDefault(_credentialsLocation_select); +var _credLocation_select2 = _interopRequireDefault(_credLocation_select); var _actions = require('./actions'); @@ -37243,7 +36227,7 @@ var AskLocation = (function (_React$Component) { _createClass(AskLocation, [{ key: 'render', value: function render() { - return _react2['default'].createElement(_credentialsLocation_select2['default'], { selectHandler: this.locationSelectHandler.bind(this), + return _react2['default'].createElement(_credLocation_select2['default'], { selectHandler: this.locationSelectHandler.bind(this), autoFocus: l.ui.focusInput(this.props.lock) }); } }, { @@ -37259,40 +36243,40 @@ var AskLocation = (function (_React$Component) { exports['default'] = AskLocation; module.exports = exports['default']; -},{"../credentials/location_select":291,"../lock/index":316,"./actions":332,"babel-runtime/helpers/class-call-check":35,"babel-runtime/helpers/create-class":36,"babel-runtime/helpers/get":38,"babel-runtime/helpers/inherits":39,"babel-runtime/helpers/interop-require-default":40,"babel-runtime/helpers/interop-require-wildcard":41,"react":278}],334:[function(require,module,exports){ +},{"../cred/location_select":216,"../lock/index":240,"./actions":257,"react":206}],259:[function(require,module,exports){ 'use strict'; -var _get = require('babel-runtime/helpers/get')['default']; +Object.defineProperty(exports, '__esModule', { + value: true +}); -var _inherits = require('babel-runtime/helpers/inherits')['default']; +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); -var _createClass = require('babel-runtime/helpers/create-class')['default']; +var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; -var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } -var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } -var _interopRequireWildcard = require('babel-runtime/helpers/interop-require-wildcard')['default']; +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } -Object.defineProperty(exports, '__esModule', { - value: true -}); +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var _react = require('react'); var _react2 = _interopRequireDefault(_react); -var _lockCredentials_pane = require('../lock/credentials_pane'); +var _lockCred_pane = require('../lock/cred_pane'); -var _lockCredentials_pane2 = _interopRequireDefault(_lockCredentials_pane); +var _lockCred_pane2 = _interopRequireDefault(_lockCred_pane); -var _credentialsPhone_number_input = require('../credentials/phone_number_input'); +var _credPhone_number_input = require('../cred/phone_number_input'); -var _credentialsPhone_number_input2 = _interopRequireDefault(_credentialsPhone_number_input); +var _credPhone_number_input2 = _interopRequireDefault(_credPhone_number_input); -var _credentialsLocation_input = require('../credentials/location_input'); +var _credLocation_input = require('../cred/location_input'); -var _credentialsLocation_input2 = _interopRequireDefault(_credentialsLocation_input); +var _credLocation_input2 = _interopRequireDefault(_credLocation_input); var _lockTerms = require('../lock/terms'); @@ -37304,9 +36288,9 @@ var _ask_location2 = _interopRequireDefault(_ask_location); var _actions = require('./actions'); -var _credentialsIndex = require('../credentials/index'); +var _credIndex = require('../cred/index'); -var c = _interopRequireWildcard(_credentialsIndex); +var c = _interopRequireWildcard(_credIndex); var _lockIndex = require('../lock/index'); @@ -37333,7 +36317,7 @@ var AskPhoneNumber = (function (_React$Component) { var auxiliaryPane = m.selectingLocation(lock) ? _react2['default'].createElement(_ask_location2['default'], { key: 'auxiliarypane', lock: lock }) : null; return _react2['default'].createElement( - _lockCredentials_pane2['default'], + _lockCred_pane2['default'], { lock: lock, auxiliaryPane: auxiliaryPane, className: 'auth0-lock-intro' }, _react2['default'].createElement( 'div', @@ -37351,11 +36335,11 @@ var AskPhoneNumber = (function (_React$Component) { null, 'Please enter your phone number.' ), - _react2['default'].createElement(_credentialsPhone_number_input2['default'], { value: c.phoneNumber(lock), + _react2['default'].createElement(_credPhone_number_input2['default'], { value: c.phoneNumber(lock), isValid: !c.visiblyInvalidPhoneNumber(lock), onChange: this.handlePhoneNumberChange.bind(this), autoFocus: l.ui.focusInput(lock) }), - _react2['default'].createElement(_credentialsLocation_input2['default'], { value: c.phoneLocationString(lock), + _react2['default'].createElement(_credLocation_input2['default'], { value: c.phoneLocationString(lock), onClick: this.handleLocationClick.bind(this) }) ), l.ui.terms(lock) && _react2['default'].createElement(_lockTerms2['default'], { content: l.ui.terms(lock) }) @@ -37380,36 +36364,36 @@ var AskPhoneNumber = (function (_React$Component) { exports['default'] = AskPhoneNumber; module.exports = exports['default']; -},{"../credentials/index":287,"../credentials/location_input":290,"../credentials/phone_number_input":293,"../lock/credentials_pane":314,"../lock/index":316,"../lock/terms":323,"./actions":332,"./ask_location":333,"./index":336,"babel-runtime/helpers/class-call-check":35,"babel-runtime/helpers/create-class":36,"babel-runtime/helpers/get":38,"babel-runtime/helpers/inherits":39,"babel-runtime/helpers/interop-require-default":40,"babel-runtime/helpers/interop-require-wildcard":41,"react":278}],335:[function(require,module,exports){ +},{"../cred/index":213,"../cred/location_input":215,"../cred/phone_number_input":217,"../lock/cred_pane":238,"../lock/index":240,"../lock/terms":248,"./actions":257,"./ask_location":258,"./index":261,"react":206}],260:[function(require,module,exports){ 'use strict'; -var _get = require('babel-runtime/helpers/get')['default']; +Object.defineProperty(exports, '__esModule', { + value: true +}); -var _inherits = require('babel-runtime/helpers/inherits')['default']; +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); -var _createClass = require('babel-runtime/helpers/create-class')['default']; +var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; -var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } -var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } -var _interopRequireWildcard = require('babel-runtime/helpers/interop-require-wildcard')['default']; +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } -Object.defineProperty(exports, '__esModule', { - value: true -}); +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var _react = require('react'); var _react2 = _interopRequireDefault(_react); -var _lockCredentials_pane = require('../lock/credentials_pane'); +var _lockCred_pane = require('../lock/cred_pane'); -var _lockCredentials_pane2 = _interopRequireDefault(_lockCredentials_pane); +var _lockCred_pane2 = _interopRequireDefault(_lockCred_pane); -var _credentialsVerification_code_input = require('../credentials/verification_code_input'); +var _credVcode_input = require('../cred/vcode_input'); -var _credentialsVerification_code_input2 = _interopRequireDefault(_credentialsVerification_code_input); +var _credVcode_input2 = _interopRequireDefault(_credVcode_input); var _actions = require('./actions'); @@ -37417,26 +36401,26 @@ var _lockIndex = require('../lock/index'); var l = _interopRequireWildcard(_lockIndex); -var _credentialsIndex = require('../credentials/index'); +var _credIndex = require('../cred/index'); -var c = _interopRequireWildcard(_credentialsIndex); +var c = _interopRequireWildcard(_credIndex); -var AskVerificationCode = (function (_React$Component) { - _inherits(AskVerificationCode, _React$Component); +var AskVcode = (function (_React$Component) { + _inherits(AskVcode, _React$Component); - function AskVerificationCode() { - _classCallCheck(this, AskVerificationCode); + function AskVcode() { + _classCallCheck(this, AskVcode); - _get(Object.getPrototypeOf(AskVerificationCode.prototype), 'constructor', this).apply(this, arguments); + _get(Object.getPrototypeOf(AskVcode.prototype), 'constructor', this).apply(this, arguments); } - _createClass(AskVerificationCode, [{ + _createClass(AskVcode, [{ key: 'render', value: function render() { var lock = this.props.lock; return _react2['default'].createElement( - _lockCredentials_pane2['default'], + _lockCred_pane2['default'], { lock: lock, className: 'auth0-lock-confirmation' }, _react2['default'].createElement( 'div', @@ -37457,32 +36441,30 @@ var AskVerificationCode = (function (_React$Component) { _react2['default'].createElement('br', null), 'with your passcode.' ), - _react2['default'].createElement(_credentialsVerification_code_input2['default'], { value: c.verificationCode(lock), - isValid: !c.visiblyInvalidVerificationCode(lock) && !l.globalError(lock), - onChange: this.handleVerificationCodeChange.bind(this), + _react2['default'].createElement(_credVcode_input2['default'], { value: c.vcode(lock), + isValid: !c.visiblyInvalidVcode(lock) && !l.globalError(lock), + onChange: this.handleVcodeChange.bind(this), autoFocus: l.ui.focusInput(lock) }) ) ); } }, { - key: 'handleVerificationCodeChange', - value: function handleVerificationCodeChange(e) { + key: 'handleVcodeChange', + value: function handleVcodeChange(e) { e.preventDefault(); - (0, _actions.changeVerificationCode)(l.id(this.props.lock), e.target.value); + (0, _actions.changeVcode)(l.id(this.props.lock), e.target.value); } }]); - return AskVerificationCode; + return AskVcode; })(_react2['default'].Component); -exports['default'] = AskVerificationCode; +exports['default'] = AskVcode; module.exports = exports['default']; -},{"../credentials/index":287,"../credentials/verification_code_input":295,"../lock/credentials_pane":314,"../lock/index":316,"./actions":332,"babel-runtime/helpers/class-call-check":35,"babel-runtime/helpers/create-class":36,"babel-runtime/helpers/get":38,"babel-runtime/helpers/inherits":39,"babel-runtime/helpers/interop-require-default":40,"babel-runtime/helpers/interop-require-wildcard":41,"react":278}],336:[function(require,module,exports){ +},{"../cred/index":213,"../cred/vcode_input":218,"../lock/cred_pane":238,"../lock/index":240,"./actions":257,"react":206}],261:[function(require,module,exports){ "use strict"; -var _interopRequireWildcard = require("babel-runtime/helpers/interop-require-wildcard")["default"]; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -37493,6 +36475,8 @@ exports.smsSent = smsSent; exports.reset = reset; exports.close = close; +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj["default"] = obj; return newObj; } } + var _lockIndex = require('../lock/index'); var l = _interopRequireWildcard(_lockIndex); @@ -37514,10 +36498,10 @@ function smsSent(m) { } function reset(m) { - var clearCredentials = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1]; + var clearCred = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1]; - if (clearCredentials) { - m = m.remove("credentials"); + if (clearCred) { + m = m.remove("cred"); } return l.clearGlobalError(m.remove("selectingLocation").remove("smsSent")); } @@ -37526,17 +36510,17 @@ function close(m) { return reset(l.close(m)); } -},{"../lock/index":316,"babel-runtime/helpers/interop-require-wildcard":41}],337:[function(require,module,exports){ +},{"../lock/index":240}],262:[function(require,module,exports){ 'use strict'; -var _slicedToArray = require('babel-runtime/helpers/sliced-to-array')['default']; - -var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; - Object.defineProperty(exports, '__esModule', { value: true }); +var _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })(); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + var _lockActions = require('../lock/actions'); var _actions = require('./actions'); @@ -37575,25 +36559,25 @@ exports['default'] = { }; module.exports = exports['default']; -},{"../lock/actions":309,"../lock/mode":318,"./actions":332,"./render":338,"babel-runtime/helpers/interop-require-default":40,"babel-runtime/helpers/sliced-to-array":43}],338:[function(require,module,exports){ +},{"../lock/actions":233,"../lock/mode":242,"./actions":257,"./render":263}],263:[function(require,module,exports){ 'use strict'; -var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; - -var _interopRequireWildcard = require('babel-runtime/helpers/interop-require-wildcard')['default']; - Object.defineProperty(exports, '__esModule', { value: true }); exports['default'] = render; +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + var _ask_phone_number = require('./ask_phone_number'); var _ask_phone_number2 = _interopRequireDefault(_ask_phone_number); -var _ask_verification_code = require('./ask_verification_code'); +var _ask_vcode = require('./ask_vcode'); -var _ask_verification_code2 = _interopRequireDefault(_ask_verification_code); +var _ask_vcode2 = _interopRequireDefault(_ask_vcode); var _actions = require('./actions'); @@ -37605,11 +36589,19 @@ var _index = require('./index'); var m = _interopRequireWildcard(_index); +var _lockLock = require('../lock/lock'); + +var _lockLock2 = _interopRequireDefault(_lockLock); + +var _react = require('react'); + +var _react2 = _interopRequireDefault(_react); + function askPhoneNumberSubmitHandler(lock) { (0, _actions.sendSMS)(l.id(lock)); } -function askVerificationCodeSubmitHandler(lock) { +function askVcodeSubmitHandler(lock) { (0, _actions.signIn)(l.id(lock)); } @@ -37618,24 +36610,25 @@ function backHandler(lock) { } function render(lock) { - return { + var children = m.smsSent(lock) ? _react2['default'].createElement(_ask_vcode2['default'], { lock: lock, key: 'ask-vcode' }) : _react2['default'].createElement(_ask_phone_number2['default'], { lock: lock, key: 'ask-phone-number' }); + + var props = { backHandler: m.smsSent(lock) ? backHandler : undefined, closeHandler: _actions.close, - mainPane: m.smsSent(lock) ? _ask_verification_code2['default'] : _ask_phone_number2['default'], - mainPaneKey: m.smsSent(lock) ? "ask-verification-code" : "ask-phone-number", + children: children, disallowClose: m.selectingLocation(lock), - submitHandler: m.smsSent(lock) ? askVerificationCodeSubmitHandler : askPhoneNumberSubmitHandler + lock: lock, + submitHandler: m.smsSent(lock) ? askVcodeSubmitHandler : askPhoneNumberSubmitHandler }; + + return _react2['default'].createElement(_lockLock2['default'], props); } -// TODO: rename file to render.js module.exports = exports['default']; -},{"../lock/index":316,"./actions":332,"./ask_phone_number":334,"./ask_verification_code":335,"./index":336,"babel-runtime/helpers/interop-require-default":40,"babel-runtime/helpers/interop-require-wildcard":41}],339:[function(require,module,exports){ +},{"../lock/index":240,"../lock/lock":241,"./actions":257,"./ask_phone_number":259,"./ask_vcode":260,"./index":261,"react":206}],264:[function(require,module,exports){ 'use strict'; -var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; - Object.defineProperty(exports, '__esModule', { value: true }); @@ -37649,6 +36642,8 @@ exports.getEntity = getEntity; exports.getCollection = getCollection; exports.getState = getState; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + var _atomIndex = require('../atom/index'); var _atomIndex2 = _interopRequireDefault(_atomIndex); @@ -37717,18 +36712,18 @@ function getState() { // console.debug("something changed", newState.toJS()); // }); -},{"../atom/index":281,"babel-runtime/helpers/interop-require-default":40,"immutable":101}],340:[function(require,module,exports){ +},{"../atom/index":209,"immutable":29}],265:[function(require,module,exports){ (function (global){ 'use strict'; -var _createClass = require('babel-runtime/helpers/create-class')['default']; - -var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; - Object.defineProperty(exports, '__esModule', { value: true }); +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + var EscKeydownUtils = (function () { function EscKeydownUtils(f) { _classCallCheck(this, EscKeydownUtils); @@ -37756,7 +36751,7 @@ module.exports = exports['default']; }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"babel-runtime/helpers/class-call-check":35,"babel-runtime/helpers/create-class":36}],341:[function(require,module,exports){ +},{}],266:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -37769,19 +36764,19 @@ exports["default"] = { }; module.exports = exports["default"]; -},{}],342:[function(require,module,exports){ +},{}],267:[function(require,module,exports){ 'use strict'; -var _createClass = require('babel-runtime/helpers/create-class')['default']; - -var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default']; - -var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; - Object.defineProperty(exports, '__esModule', { value: true }); +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + var _jsonp = require('jsonp'); var _jsonp2 = _interopRequireDefault(_jsonp); @@ -37804,7 +36799,7 @@ var JSONPUtils = (function () { exports['default'] = new JSONPUtils(); module.exports = exports['default']; -},{"babel-runtime/helpers/class-call-check":35,"babel-runtime/helpers/create-class":36,"babel-runtime/helpers/interop-require-default":40,"jsonp":102}],343:[function(require,module,exports){ +},{"jsonp":30}],268:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -37816,7 +36811,7 @@ function isSmallScreen() { return window.matchMedia && !window.matchMedia("(min-width: 340px)").matches; } -},{}],344:[function(require,module,exports){ +},{}],269:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -37828,5 +36823,5 @@ function matches(search, str) { return str.toLowerCase().indexOf(search.toLowerCase()) > -1; } -},{}]},{},[297]) -//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2Z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FxuICAgICAgICAgICAgd2lsbCBiZSBwYXNzZWQgdGhlIGtleSBhc3NvY2lhdGVkIHdpdGggdGhlIHZhbHVlLCBhbmQgdGhpcyB3aWxsIGJlXG4gICAgICAgICAgICBib3VuZCB0byB0aGUgdmFsdWVcblxuICAgICAgICAgICAgRm9yIGV4YW1wbGUsIHRoaXMgd291bGQgc2VyaWFsaXplIERhdGVzIGFzIElTTyBzdHJpbmdzLlxuXG4gICAgICAgICAgICAgICAgRGF0ZS5wcm90b3R5cGUudG9KU09OID0gZnVuY3Rpb24gKGtleSkge1xuICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiBmKG4pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIEZvcm1hdCBpbnRlZ2VycyB0byBoYXZlIGF0IGxlYXN0IHR3byBkaWdpdHMuXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbiA8IDEwID8gJzAnICsgbiA6IG47XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5nZXRVVENGdWxsWWVhcigpICAgKyAnLScgK1xuICAgICAgICAgICAgICAgICAgICAgICAgIGYodGhpcy5nZXRVVENNb250aCgpICsgMSkgKyAnLScgK1xuICAgICAgICAgICAgICAgICAgICAgICAgIGYodGhpcy5nZXRVVENEYXRlKCkpICAgICAgKyAnVCcgK1xuICAgICAgICAgICAgICAgICAgICAgICAgIGYodGhpcy5nZXRVVENIb3VycygpKSAgICAgKyAnOicgK1xuICAgICAgICAgICAgICAgICAgICAgICAgIGYodGhpcy5nZXRVVENNaW51dGVzKCkpICAgKyAnOicgK1xuICAgICAgICAgICAgICAgICAgICAgICAgIGYodGhpcy5nZXRVVENTZWNvbmRzKCkpICAgKyAnWic7XG4gICAgICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgWW91IGNhbiBwcm92aWRlIGFuIG9wdGlvbmFsIHJlcGxhY2VyIG1ldGhvZC4gSXQgd2lsbCBiZSBwY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xuICAgICAgICAgICAgLy8gUGFyc2UgdGhlIHRleHQuIFZhbHVlcyB0aGF0IGxvb2sgbGlrZSBJU08gZGF0ZSBzdHJpbmdzIHdpbGxcbiAgICAgICAgICAgIC8vIGJlIGNvbnZlcnRlZCB0byBEYXRlIG9iamVjdHMuXG5cbiAgICAgICAgICAgIG15RGF0YSA9IEpTT04ucGFyc2UodGV4dCwgZnVuY3Rpb24gKGtleSwgdmFsdWUpIHtcbiAgICAgICAgICAgICAgICB2YXIgYTtcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHZhbHVlID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgICAgICAgICBhID1cbi9eKFxcZHs0fSktKFxcZHsyfSktKFxcZHsyfSlUKFxcZHsyfSk6KFxcZHsyfSk6KFxcZHsyfSg/OlxcLlxcZCopPylaJC8uZXhlYyh2YWx1ZSk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChhKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmV3IERhdGUoRGF0ZS5VVEMoK2FbMV0sICthWzJdIC0gMSwgK2FbM10sICthWzRdLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICthWzVdLCArYVs2XSkpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiB2YWx1ZTtcbiAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICBteURhdGEgPSBKU09OLnBhcnNlKCdbXCJEYXRlKDA5LzA5LzIwMDEpXCJdJywgZnVuY3Rpb24gKGtleSwgdmFsdWUpIHtcbiAgICAgICAgICAgICAgICB2YXIgZDtcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHZhbHVlID09PSAnc3RyaW5nJyAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWUuc2xpY2UoMCwgNSkgPT09ICdEYXRlKCcgJiZcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlLnNsa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BjcmVhdGluZyBnbG9iYWwgdmFyaWFibGVzLlxuXG52YXIgSlNPTiA9IHt9O1xuXG4oZnVuY3Rpb24gKCkge1xuICAgICd1c2Ugc3RyaWN0JztcblxuICAgIGZ1bmN0aW9uIGYobikge1xuICAgICAgICAvLyBGb3JtYXQgaW50ZWdlcnMgdG8gaGF2ZSBhdCBsZWFzdCB0d28gZGlnaXRzLlxuICAgICAgICByZXR1cm4gbiA8IDEwID8gJzAnICsgbiA6IG47XG4gICAgfVxuXG4gICAgaWYgKHR5cGVvZiBEYXRlLnByb3RvdHlwZS50b0pTT04gIT09ICdmdW5jdGlvbicpIHtcblxuICAgICAgICBEYXRlLnByb3RvdHlwZS50b0pTT04gPSBmdW5jdGlvbiAoa2V5KSB7XG5cbiAgICAgICAgICAgIHJldHVybiBpc0Zpbml0ZSh0aGlzLnZhbHVlT2YoKSlcbiAgICAgICAgICAgICAgICA/IHRoaXMuZ2V0VVRDRnVsbFllYXIoKSAgICAgKyAnLScgK1xuICAgICAgICAgICAgICAgICAgICBmKHRoaXMuZ2V0VVRDTW9udGgoKSArIDEpICsgJy0nICtcbiAgICAgICAgICAgICAgICAgICAgZih0aGlzLmdldFVUQ0RhdGUoKSkgICAgICArICdUJyArXG4gICAgICAgICAgICAgICAgICAgIGYodGhpcy5nZXRVVENIb3VycygpKSAgICAgKyAnOicgK1xuICAgICAgICAgICAgICAgICAgICBmKHRoaXMuZ2V0VVRDTWludXRlcygpKSAgICsgJzonICtcbiAgICAgICAgICAgICAgICAgICAgZih0aGlzLmdldFVUQ1NlY29uZHMoKSkgICArICdaJ1xuICAgICAgICAgICAgICAgIDogbnVsbDtcbiAgICAgICAgfTtcblxuICAgICAgICBTdHJpbmcucHJvdG90eXBlLnRvSlNPTiAgICAgID1cbiAgICAgICAgICAgIE51bWJlci5wcm90b3R5cGUudG9KU09OICA9XG4gICAgICAgICAgICBCb29sZWFuLnByb3RvdHlwZS50b0pTT04gPSBmdW5jdGlvbiAoa2V5KSB7XG4g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MgYSBwbGFjZWhvbGRlclxuLy8gZm9yIG5vbi1KU09OIHZhbHVlcy5cblxuICAgICAgICAgICAgICAgIGxlbmd0aCA9IHZhbHVlLmxlbmd0aDtcbiAgICAgICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgbGVuZ3RoOyBpICs9IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgcGFydGlhbFtpXSA9IHN0cihpLCB2YWx1ZSkgfHwgJ251bGwnO1xuICAgICAgICAgICAgICAgIH1cblxuLy8gSm9pbiBhbGwgb2YgdGhlIGVsZW1lbnRzIHRvZ2V0aGVyLCBzZXBhcmF0ZWQgd2l0aCBjb21tYXMsIGFuZCB3cmFwIHRoZW0gaW5cbi8vIGJyYWNrZXRzLlxuXG4gICAgICAgICAgICAgICAgdiA9IHBhcnRpYWwubGVuZ3RoID09PSAwXG4gICAgICAgICAgICAgICAgICAgID8gJ1tdJ1xuICAgICAgICAgICAgICAgICAgICA6IGdhcFxuICAgICAgICAgICAgICAgICAgICA/ICdbXFxuJyArIGdhcCArIHBhcnRpYWwuam9pbignLFxcbicgKyBnYXApICsgJ1xcbicgKyBtaW5kICsgJ10nXG4gICAgICAgICAgICAgICAgICAgIDogJ1snICsgcGFydGlhbC5qb2luKCcsJykgKyAnXSc7XG4gICAgICAgICAgICAgICAgZ2FwID0gbWluZDtcbiAgICAgICAgICAgICAgICByZXR1cm4gdjtcbiAgICAgICAgICAgIH1cblxuLy8gSWYgdGhlIHJlcGxhY2VyIGlzIGFuIGFycmF5LCB1c2UgaXQgdG8gc2VsZWN0IHRoZSBtZW1iZXJzIHRvIGJlIHN0cmluZ2lmaWVkLlxuXG4gICAgICAgICAgICBpZiAocmVwICYmIHR5cGVvZiByZXAgPT09ICdvYmplY3QnKSB7XG4gICAgICAgICAgICAgICAgbGVuZ3RoID0gcmVwLmxlbmd0aDtcbiAgICAgICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgbGVuZ3RoOyBpICs9IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiByZXBbaV0gPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBrID0gcmVwW2ldO1xuICAgICAgICAgICAgICAgICAgICAgICAgdiA9IHN0cihrLCB2YWx1ZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnRpYWwucHVzaChxdW90ZShrKSArIChnYXAgPyAnOiAnIDogJzonKSArIHYpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcblxuLy8gT3RoZXJ3aXNlLCBpdGVyYXRlIHRocm91Z2ggYWxsIG9mIHRoZSBrZXlzIGluIHRoZSBvYmplY3QuXG5cbiAgICAgICAgICAgICAgICBmb3IgKGsgaW4gdmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKE9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHkuY2FsbCh2YWx1ZSwgaykpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHYgPSBzdHIoaywgdmFsdWUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJ0aWFsLnB1c2gocXVvdGUoaykgKyAoZ2FwID8gJzogJyA6ICc6JykgKyB2KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuLy8gSm9pbiBhbGwgb2YgdGhlIG1lbWJlciB0ZXh0cyB0b2dldGhlciwgc2VwYXJhdGVkIHdpdGggY29tbWFzLFxuLy8gYW5kIHdyYXAgdGhlbSBpbiBicmFjZXMuXG5cbiAgICAgICAgICAgIHYgPSBwYXJ0aWFsLmxlbmd0aCA9PT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IgaTtcbiAgICAgICAgICAgIGdhcCA9ICcnO1xuICAgICAgICAgICAgaW5kZW50ID0gJyc7XG5cbi8vIElmIHRoZSBzcGFjZSBwYXJhbWV0ZXIgaXMgYSBudW1iZXIsIG1ha2UgYW4gaW5kZW50IHN0cmluZyBjb250YWluaW5nIHRoYXRcbi8vIG1hbnkgc3BhY2VzLlxuXG4gICAgICAgICAgICBpZiAodHlwZW9mIHNwYWNlID09PSAnbnVtYmVyJykge1xuICAgICAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBzcGFjZTsgaSArPSAxKSB7XG4gICAgICAgICAgICAgICAgICAgIGluZGVudCArPSAnICc7XG4gICAgICAgICAgICAgICAgfVxuXG4vLyBJZiB0aGUgc3BhY2UgcGFyYW1ldGVyIGlzIGEgc3RyaW5nLCBpdCB3aWxsIGJlIHVzZWQgYXMgdGhlIGluZGVudCBzdHJpbmcuXG5cbiAgICAgICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIHNwYWNlID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgICAgIGluZGVudCA9IHNwYWNlO1xuICAgICAgICAgICAgfVxuXG4vLyBJZiB0aGVyZSBpcyBhIHJlcGxhY2VyLCBpdCBtdXN0IGJlIGEgZnVuY3Rpb24gb3IgYW4gYXJyYXkuXG4vLyBPdGhlcndpc2UsIHRocm93IGFuIGVycm9yLlxuXG4gICAgICAgICAgICByZXAgPSByZXBsYWNlcjtcbiAgICAgICAgICAgIGlmIChyZXBsYWNlciAmJiB0eXBlb2YgcmVwbGFjZXIgIT09ICdmdW5jdGlvbicgJiZcbiAgICAgICAgICAgICAgICAgICAgKHR5cGVvZiByZXBsYWNlciAhPT0gJ29iamVjdCcgfHxcbiAgICAgICAgICAgICAgICAgICAgdHlwZW9mIHJlcGxhY2VyLmxlbmd0aCAhPT0gJ251bWJlcicpKSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdKU09OLnN0cmluZ2lmeScpO1xuICAgICAg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lKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoT2JqZWN0LnByb3RvdHlwZS5oYXNPd25Qcm9wZXJ0eS5jYWxsKHZhbHVlLCBrKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHYgPSB3YWxrKHZhbHVlLCBrKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodiAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlW2tdID0gdjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWxldGUgdmFsdWVba107XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiByZXZpdmVyLmNhbGwoaG9sZGVyLCBrZXksIHZhbHVlKTtcbiAgICAgICAgICAgIH1cblxuXG4vLyBQYXJzaW5nIGhhcHBlbnMgaW4gZm91ciBzdGFnZXMuIEluIHRoZSBmaXJzdCBzdGFnZSwgd2UgcmVwbGFjZSBjZXJ0YWluXG4vLyBVbmljb2RlIGNoYXJhY3RlcnMgd2l0aCBlc2NhcGUgc2VxdWVuY2VzLiBKYXZhU2NyaXB0IGhhbmRsZXMgbWFueSBjaGFyYWN0ZXJzXG4vLyBpbmNvcnJlY3RseSwgZWl0aGVyIHNpbGVudGx5IGRlbGV0aW5nIHRoZW0sIG9yIHRyZWF0aW5nIHRoZW0gYXMgbGluZSBlbmRpbmdzLlxuXG4gICAgICAgICAgICB0ZXh0ID0gU3RyaW5nKHRleHQpO1xuICAgICAgICAgICAgY3gubGFzdEluZGV4ID0gMDtcbiAgICAgICAgICAgIGlmIChjeC50ZXN0KHRleHQpKSB7XG4gICAgICAgICAgICAgICAgdGV4dCA9IHRleHQucmVw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iAocikge1xuICAgICAgICBzd2l0Y2ggKHR5cGUpIHtcbiAgICAgICAgY2FzZSAnanNvbic6XG4gICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIHJlc3AgPSB3aW4uSlNPTiA/IHdpbi5KU09OLnBhcnNlKHIpIDogZXZhbCgnKCcgKyByICsgJyknKVxuICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgcmV0dXJuIGVycm9yKHJlc3AsICdDb3VsZCBub3QgcGFyc2UgSlNPTiBpbiByZXNwb25zZScsIGVycilcbiAgICAgICAgICB9XG4gICAgICAgICAgYnJlYWtcbiAgICAgICAgY2FzZSAnanMnOlxuICAgICAgICAgIHJlc3AgPSBldmFsKHIpXG4gICAgICAgICAgYnJlYWtcbiAgICAgICAgY2FzZSAnaHRtbCc6XG4gICAgICAgICAgcmVzcCA9IHJcbiAgICAgICAgICBicmVha1xuICAgICAgICBjYXNlICd4bWwnOlxuICAgICAgICAgIHJlc3AgPSByZXNwLnJlc3BvbnNlWE1MXG4gICAgICAgICAgICAgICYmIHJlc3AucmVzcG9uc2VYTUwucGFyc2VFcnJvciAvLyBJRSB0cm9sb2xvXG4gICAgICAgICAgICAgICYmIHJlc3AucmVzcG9uc2VYTUwucGFyc2VFcnJvci5lcnJvckNvZGVcbiAgICAgICAgICAgICAgJiYgcmVzcC5yZXNwb25zZVhNTC5wYXJzZUVycm9yLnJlYXNvblxuICAgICAgICAgICAgPyBudWxsXG4gICAgICAgICAgICA6IHJlc3AucmVzcG9uc2VYTUxcbiAgICAgICAgICBicmVha1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIHNlbGYuX3Jlc3BvbnNlQXJncy5yZXNwID0gcmVzcFxuICAgICAgc2VsZi5fZnVsZmlsbGVkID0gdHJ1ZVxuICAgICAgZm4ocmVzcClcbiAgICAgIHNlbGYuX3N1Y2Nlc3NIYW5kbGVyKHJlc3ApXG4gICAgICB3aGlsZSAoc2VsZi5fZnVsZmlsbG1lbn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uICAgICAgICAgIGlmIChlLm9yaWdpbiAhPT0gb3JpZ2luKSB7IHJldHVybjsgfVxuICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICB2YXIgZCA9IEpTT04ucGFyc2UoZS5kYXRhKTtcbiAgICAgICAgICAgIGlmIChkLmEgPT09ICdyZWFkeScpIG1lc3NhZ2VUYXJnZXQucG9zdE1lc3NhZ2UocmVxLCBvcmlnaW4pO1xuICAgICAgICAgICAgZWxzZSBpZiAoZC5hID09PSAnZXJyb3InKSB7XG4gICAgICAgICAgICAgIGNsZWFudXAoKTtcbiAgICAgICAgICAgICAgaWYgKGNiKSB7XG4gICAgICAgICAgICAgICAgY2IoZC5kKTtcbiAgICAgICAgICAgICAgICBjYiA9IG51bGw7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBpZiAoZC5hID09PSAncmVzcG9uc2UnKSB7XG4gICAgICAgICAgICAgIGNsZWFudXAoKTtcbiAgICAgICAgICAgICAgaWYgKGNiKSB7XG4gICAgICAgICAgICAgICAgY2IobnVsbCwgZC5kKTtcbiAgICAgICAgICAgICAgICBjYiA9IG51bGw7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9IGNhdGNoKGVycikgeyB9XG4gICAgICAgIH1cblxuICAgICAgICBhZGRMaXN0ZW5lcih3aW5kb3csICdtZXNzYWdlJywgb25NZXNzYWdlKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGNsb3NlOiBjbGVhbnVwLFxuICAgICAgICAgIGZvY3VzOiBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgIGlmICh3KSB7XG4gICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgdy5mb2N1cygpO1xuICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgLy8gSUU3IGJsb3dzIHVwIGhlcmUsIGRvIG5vdGhpbmdcbiAgICAgICAgICAgICAgfVxuICAgIC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aWYgKCFkIHx8IGQuYSAhPT0gJ3JlcXVlc3QnKSByZXR1cm47XG4gICAgICAgICAgcmVtb3ZlTGlzdGVuZXIod2luZG93LCAnbWVzc2FnZScsIG9uTWVzc2FnZSk7XG4gICAgICAgICAgbyA9IGUub3JpZ2luO1xuICAgICAgICAgIGlmIChjYikge1xuICAgICAgICAgICAgLy8gdGhpcyBzZXRUaW1lb3V0IGlzIGNyaXRpY2FsbHkgaW1wb3J0YW50IGZvciBJRTggLVxuICAgICAgICAgICAgLy8gaW4gaWU4IHNvbWV0aW1lcyBhZGRMaXN0ZW5lciBmb3IgJ21lc3NhZ2UnIGNhbiBzeW5jaHJvbm91c2x5XG4gICAgICAgICAgICAvLyBjYXVzZSB5b3VyIGNhbGxiYWNrIHRvIGJlIGludm9rZWQuICBhd2Vzb21lLlxuICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgY2IobywgZC5kLCBmdW5jdGlvbihyKSB7XG4gICAgICAgICAgICAgICAgY2IgPSB1bmRlZmluZWQ7XG4gICAgICAgICAgICAgICAgZG9Qb3N0KHthOiAncmVzcG9uc2UnLCBkOiByfSk7XG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSwgMCk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuY3Rpb24gb25EaWUoZSkge1xuICAgICAgICAgIGlmIChlLmRhdGEgPT09IENMT1NFX0NNRCkge1xuICAgICAgICAgICAgdHJ5IHsgd2luZG93LmNsb3NlKCk7IH0gY2F0Y2ggKG9fTykge31cbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgYWRkTGlzdGVuZXIoaXNJRSA/IG1zZ1RhcmdldCA6IHdpbmRvdywgJ21lc3NhZ2UnLCBvbk1lc3NhZ2UpO1xuICAgICAgICBhZGRMaXN0ZW5lcihpc0lFID8gbXNnVGFyZ2V0IDogd2luZG93LCAnbWVzc2FnZScsIG9uRGllKTtc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4gICAgICAgICAgICBpcGFkID0gW10sXG4gICAgICAgICAgICBvcGFkID0gW10sXG4gICAgICAgICAgICBoYXNoO1xuICAgICAgICBpcGFkWzE1XSA9IG9wYWRbMTVdID0gdW5kZWZpbmVkO1xuICAgICAgICBpZiAoYmtleS5sZW5ndGggPiAxNikge1xuICAgICAgICAgICAgYmtleSA9IGJpbmxfbWQ1KGJrZXksIGtleS5sZW5ndGggKiA4KTtcbiAgICAgICAgfVxuICAgICAgICBmb3IgKGkgPSAwOyBpIDwgMTY7IGkgKz0gMSkge1xuICAgICAgICAgICAgaXBhZFtpXSA9IGJrZXlbaV0gXiAweDM2MzYzNjM2O1xuICAgICAgICAgICAgb3BhZFtpXSA9IGJrZXlbaV0gXiAweDVDNUM1QzVDO1xuICAgICAgICB9XG4gICAgICAgIGhhc2ggPSBiaW5sX21kNShpcGFkLmNvbmNhdChyc3RyMmJpbmwoZGF0YSkpLCA1MTIgKyBkYXRhLmxlbmd0aCAqIDgpO1xuICAgICAgICByZXR1cm4gYmlubDJyc3RyKGJpbmxfbWQ1KG9wYWQuY29uY2F0KGhhc2gpLCA1MTIgKyAxMjgpKTtcbiAgICB9XG5cbiAgICAvKlxuICAgICogQ29udmVydCBhIHJhdyBzdHJpbmcgdG8gYSBoZXggc3RyaW5nXG4gICAgKi9cbiAgICBmdW5jdGlvbiByc3RyMmhleChpbnB1dCkge1xuICAgICAgICB2YXIgaGV4X3RhYiA9ICcwMTIzNDU2Nzg5YWJjZGVmJyxcbiAgICAgICAgICAgIG91dHB1dCA9ICcnLFxuICAgICAgICAgICAgeCxcbiAgICAgICAgICAgIGk7XG4gICAgICAgIGZvciAoaSA9IDA7IGkgPCBpbnB1dC5sZW5ndGg7IGkgKz0gMSkge1xuICAgICAgICAgICAgeCA9IGlucHV0LmNoYXJDb2RlQXQoaSk7XG4gICAgICAgICAgICBvdXRwdXQgKz0gaGV4X3RhYi5jaGFyQXQoKHggPj4+IDQpICYgMHgwRikgK1xuICAgICAgICAgICAgICAgIGhleF90YWIuY2hhckF0KHggJiAweDBGKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gb3V0cHV0O1xuICAgIH1cblxuICAgIC8qXG4gICAgKiBFbmNvZGUgYSBzdHJpbmcgYXMgdXRmLThcbiAgICAqL1xuICAgIGZ1bmN0aW9uIHN0cjJyc3RyX3V0ZjgoaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIHVuZXNjYXBlKGVuY29kZVVSSUNvbXBvbmVudChpbnB1dCkpO1xuICAgIH1cblxuICAgIC8qXG4gICAgKiBUYWtlIHN0cmluZyBhcmd1bWVudHMgYW5kIHJldHVybiBlaXRoZXIgcmF3IG9yIGhleCBlbmNvZGVkIHN0cmluZ3NcbiAgICAqL1xuICAgIGZ1bmN0aW9uIHJhd19tZDUocykge1xuICAgICAgICByZXR1cm4gcnN0cl9tZDUoc3RyMnJzdHJfdXRmOChzKSk7XG4gICAgfVxuICAgIGZ1bmN0aW9uIGhleF9tZDUocykge1xuICAgICAgICByZXR1cm4gcnN0cjJoZXgocmF3X21kNShzKSk7XG4gICAgfVxuICAgIGZ1bmN0aW9uIHJhd19obWFjX21kNShrLCBkKSB7XG4gICAgICAgIHJldHVybiByc3RyX2htYWNfbWQ1KHN0cjJyc3RyX3V0ZjgoayksIHN0cjJyc3RyX3V0ZjgoZCkpO1xuICAgIH1cbiAgICBmdW5jdGlvbiBoZXhfaG1hY19tZDUoaywgZCkge1xuICAgICAgICByZXR1cm4gcnN0cjJoZXgocmF3X2htYWNfbWQ1KGssIGQpKTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBtZDUoc3RyaW5nLCBrZXksIHJhdykge1xuICAgICAgICBpZiAoIWtleSkge1xuICAgICAgICAgICAgaWYgKCFyYXcpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gaGV4X21kNShzdHJpbmcpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHJhd19tZDUoc3RyaW5nKTtcbiAgICAgICAgfVx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ICAgICAgICAgICBpZiAoICEgYXR0cmlidXRlcy5oYXNPd25Qcm9wZXJ0eShrZXkpKSB7XG4gICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YXIgdmFsdWUgPSBhdHRyaWJ1dGVzW2tleV07XG4gICAgICAgICAgICBsaW5rLnNldEF0dHJpYnV0ZSgnZGF0YS0nICsga2V5LCB2YWx1ZSk7XG4gICAgICAgIH1cblxuICAgICAgICBoZWFkLmFwcGVuZENoaWxkKGxpbmspO1xuICAgIH0sXG4gICAgLy8gQ3JlYXRlIGEgPHN0eWxlPiB0YWcgd2l0aCBvcHRpb25hbCBkYXRhIGF0dHJpYnV0ZXNcbiAgICBjcmVhdGVTdHlsZTogZnVuY3Rpb24oY3NzVGV4dCwgYXR0cmlidXRlcykge1xuICAgICAgICB2YXIgaGVhZCA9IGRvY3VtZW50LmhlYWQgfHwgZG9jdW1lbnQuZ2V0RWxlbWVudHNCeVRhZ05hbWUoJ2hlYWQnKVswXSxcbiAgICAgICAgICAgIHN0eWxlID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnc3R5bGUnKTtcblxuICAgICAgICBzdHlsZS50eXBlID0gJ3RleHQvY3NzJztcblxuICAgICAgICBmb3IgKHZhciBrZXkgaW4gYXR0cmlidXRlcykge1xuICAgICAgICAgICAgaWYgKCAhIGF0dHJpYnV0ZXMuaGFzT3duUHJvcGVydHkoa2V5KSkge1xuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdmFyIHZhbHVlID0gYXR0cmlidXRlc1trZXldO1xuICAgICAgICAgICAgc3R5bGUuc2V0QXR0cmlidXRlKCdkYXRhLScgKyBrZXksIHZhbHVlKTtcbiAgICAgICAgfVxuICAgICAgICBcbiAgICAgICAgaWYgKHN0eWxlLnNoZWV0KSB7IC8vIGZvciBqc2RvbSBhbmQgSUU5K1xuICAgICAgICAgICAgc3R5bGUuaW5uZ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SAge1xuICAgICAgICB2YXIgc3RlcCwgaywgdjtcbiAgICAgICAgZG8ge1xuICAgICAgICAgIHN0ZXAgPSBpdGVyYXRvci5uZXh0KCk7XG4gICAgICAgICAgaWYgKHN0ZXAuZG9uZSkge1xuICAgICAgICAgICAgaWYgKHVzZUtleXMgfHwgdHlwZSA9PT0gSVRFUkFURV9WQUxVRVMpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIHN0ZXA7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHR5cGUgPT09IElURVJBVEVfS0VZUykge1xuICAgICAgICAgICAgICByZXR1cm4gaXRlcmF0b3JWYWx1ZSh0eXBlLCBpdGVyYXRpb25zKyssIHVuZGVmaW5lZCwgc3RlcCk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICByZXR1cm4gaXRlcmF0b3JWYWx1ZSh0eXBlLCBpdGVyYXRpb25zKyssIHN0ZXAudmFsdWVbMV0sIHN0ZXApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgICB2YXIgZW50cnkgPSBzdGVwLnZhbHVlO1xuICAgICAgICAgIGsgPSBlbnRyeVswXTtcbiAgICAgICAgICB2ID0gZW50cnlbMV07XG4gICAgICAgICAgc2tpcHBpbmcgJiYgKHNraXBwaW5nID0gcHJlZGljYXRlLmNhbGwoY29udGV4dCwgdiwgaywgdGhpcyQwKSk7XG4gICAgICAgIH0gd2hpbGUgKHNraXBwaW5nKTtcbiAgICAgICAgcmV0dXJuIHR5cGUgPT09IElURVJBVEVfRU5UUklFUyA/IHN0ZXAgOlxuICAgICAgICAgIGl0ZXJhdG9yVmFsdWUodHlwZSwgaywgdiwgc3RlcCk7XG4gICAgICB9KTtcbiAgICB9O1xuICAgIHJldHVybiBza2lwU2VxdWVuY2U7XG4gIH1cblxuXG4gIGZ1bmN0aW9uIGNvbmNhdEZhY3RvcnkoaXRlcmFibGUsIHZhbHVlcykge1xuICAgIHZhciBpc0tleWVkSXRlcmFib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blxuICAgIEFycmF5TWFwTm9kZS5wcm90b3R5cGUudXBkYXRlID0gZnVuY3Rpb24ob3duZXJJRCwgc2hpZnQsIGtleUhhc2gsIGtleSwgdmFsdWUsIGRpZENoYW5nZVNpemUsIGRpZEFsdGVyKSB7XG4gICAgICB2YXIgcmVtb3ZlZCA9IHZhbHVlID09PSBOT1RfU0VUO1xuXG4gICAgICB2YXIgZW50cmllcyA9IHRoaXMuZW50cmllcztcbiAgICAgIHZhciBpZHggPSAwO1xuICAgICAgZm9yICh2YXIgbGVuID0gZW50cmllcy5sZW5ndGg7IGlkeCA8IGxlbjsgaWR4KyspIHtcbiAgICAgICAgaWYgKGlzKGtleSwgZW50cmllc1tpZHhdWzBdKSkge1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICB2YXIgZXhpc3RzID0gaWR4IDwgbGVuO1xuXG4gICAgICBpZiAoZXhpc3RzID8gZW50cmllc1tpZHhdWzFdID09PSB2YWx1ZSA6IHJlbW92ZWQpIHtcbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICB9XG5cbiAgICAgIFNldFJlZihkaWRBbHRlcik7XG4gICAgICAocmVtb3ZlZCB8fCAhZXhpc3RzKSAmJiBTZXRSZWYoZGlkQ2hhbmdlU2l6ZSk7XG5cbiAgICAgIGlmIChyZW1vdmVkICYmIGVudHJpZXMubGVuZ3RoID09PSAxKSB7XG4gICAgICAgIHJldHVybjsgLy8gdW5kZWZpbmVkXG4gICAgICB9XG5cbiAgICAgIGlmICghZXhpc3RzICYmICFyZW1vdmVkICYmIGVudHJpZXMubGVuZ3RoID49IE1BWF9BUlJBWV9NQVBfU0laRSkge1xuICAgICAgICByZXR1cm4gY3JlYXRlTm9kZXMob3duZXJJRCwgZW50cmllcywga2V5LCB2YWx1ZSk7XG4gICAgICB9XG5cbiAgICAgIHZhciBpc0VkaXRhYmxlID0gb3duZXJJRCAmJiBvd25lcklEID09PSB0aGlzLm93bmVySUQ7XG4gICAgICB2YXIgbmV3RW50cmllcyA9IGlzRWRpdGFibGUgPyBlbnRyaWVzIDogYXJyQ29weShlbnRyaWVzKTtcblxuICAgICAgaWYgKGV4aXN0cykge1xuICAgICAgICBpZiAocmVtb3ZlZCkge1xuICAgICAgICAgIGlkeCA9PT0gbGVuIC0gMSA/IG5ld0VudHJpZXMucG9wKCkgOiAobmV3RW50cmllc1tpZHhdID0gbmV3RW50cmllcy5wb3AoKSk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgbmV3RW50cmllc1tpZHhdID0gW2tleSwgdmFsdWVdO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBuZXdFbnRyaWVzLnB1c2goW2tleSwgdmFsdWVdKTtcbiAgICAgIH1cblxuICAgICAgaWYgKGlzRWRpdGFibGUpIHtcbiAgICAgICAgdGhpcy5lbnRyaWVzID0gbmV3RW50cmllcztcbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBuZXcgQXJyYXlNYXBOb2RlKG93bmVySUQsIG5ld0VudHJpZXMpO1xuICAgIH07XG5cblxuXG5cbiAgICBmdW5jdGlvbiBCaXRtYXBJbmRleGVkTm9kZShvd25lcklELCBiaXRtYXAsIG5vZGVzKSB7XG4gICAgICB0aGlzLm93bmVySUQgPSBvd25lcklEO1xuICAgICAgdGhpcy5iaXRtYXAgPSBiaXRtYXA7XG4gICAgICB0aGlzLm5vZGVzID0gbm9kZXM7XG4gICAgfVxuXG4gICAgQml0bWFwSW5kZXhlZE5vZGUucHJvdG90eXBlLmdldCA9IGZ1bmN0aW9uKHNoaWZ0LCBrZXlIYXNoLCBrZXksIG5vdFNldFZhbHVlKSB7XG4gICAgICBpZiAoa2V5SGFzaCA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgIGtleUhhc2ggPSBoYXNoKGtleSk7XG4gICAgICB9XG4gICAgICB2YXIgYml0ID0gKDEgPDwgKChzaGlmdCA9PT0gMCA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ZUxpc3QodGhpcywgcmV2ZXJzZSk7XG4gICAgICB2YXIgdmFsdWU7XG4gICAgICB3aGlsZSAoKHZhbHVlID0gdmFsdWVzKCkpICE9PSBET05FKSB7XG4gICAgICAgIGlmIChmbih2YWx1ZSwgaW5kZXgrKywgdGhpcykgPT09IGZhbHNlKSB7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIHJldHVybiBpbmRleDtcbiAgICB9O1xuXG4gICAgTGlzdC5wcm90b3R5cGUuX19lbnN1cmVPd25lciA9IGZ1bmN0aW9uKG93bmVySUQpIHtcbiAgICAgIGlmIChvd25lcklEID09PSB0aGlzLl9fb3duZXJJRCkge1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgIH1cbiAgICAgIGlmICghb3duZXJJRCkge1xuICAgICAgICB0aGlzLl9fb3duZXJJRCA9IG93bmVySUQ7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgfVxuICAgICAgcmV0dXJuIG1ha2VMaXN0KHRoaXMuX29yaWdpbiwgdGhpcy5fY2FwYWNpdHksIHRoaXMuX2xldmVsLCB0aGlzLl9yb290LCB0aGlzLl90YWlsLCBvd25lcklELCB0aGlzLl9faGFzaCk7XG4gICAgfTtcblxuXG4gIGZ1bmN0aW9uIGlzTGlzdChtYXliZUxpc3QpIHtcbiAgICByZXR1cm4gISEobWF5YmVMaXN0ICYmIG1heWJlTGlzdFtJU19MSVNUX1NFTlRJTkVMXSk7XG4gIH1cblxuICBMaXN0LmlzTGlzdCA9IGlzTGlzdDtcblxuICB2YXIgSVNfTElTVF9TRU5USU5FTCA9ICdAQF9fSU1NVVRBQkxFX0xJU1RfX0BAJztcblxuICB2YXIgTGlzdFByb3RvdHlwZSA9IExpc3QucHJvdG90eXBlO1xuICBMaXN0UHJvdG90eXBlW0lTX0xJU1RfU0VOVElORUxdID0gdHJ1ZTtcbiAgTGlzdFByb3RvdHlwZVtERUxFVEVdID0gTGlzdFByb3RvdHl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AwIDogbGVmdCAtIG9mZnNldDtcbiAgICAgIHZhciB0byA9IHJpZ2h0IC0gb2Zmc2V0O1xuICAgICAgaWYgKHRvID4gU0laRSkge1xuICAgICAgICB0byA9IFNJWkU7XG4gICAgICB9XG4gICAgICByZXR1cm4gZnVuY3Rpb24oKSAge1xuICAgICAgICBpZiAoZnJvbSA9PT0gdG8pIHtcbiAgICAgICAgICByZXR1cm4gRE9ORTtcbiAgICAgICAgfVxuICAgICAgICB2YXIgaWR4ID0gcmV2ZXJzZSA/IC0tdG8gOiBmcm9tKys7XG4gICAgICAgIHJldHVybiBhcnJheSAmJiBhcnJheVtpZHhdO1xuICAgICAgfTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBpdGVyYXRlTm9kZShub2RlLCBsZXZlbCwgb2Zmc2V0KSB7XG4gICAgICB2YXIgdmFsdWVzO1xuICAgICAgdmFyIGFycmF5ID0gbm9kZSAmJiBub2RlLmFycmF5O1xuICAgICAgdmFyIGZyb20gPSBvZmZzZXQgPiBsZWZ0ID8gMCA6IChsZWZ0IC0gb2Zmc2V0KSA+PiBsZXZlbDtcbiAgICAgIHZhciB0byA9ICgocmlnaHQgLSBvZmZzZXQpID4+IGxldmVsKSArIDE7XG4gICAgICBpZiAodG8gPiBTSVpFKSB7XG4gICAgICAgIHRvID0gU0laRTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBmdW5jdGlvbigpICB7XG4gICAgICAgIGRvIHtcbiAgICAgICAgICBpZiAodmFsdWVzKSB7XG4gICAgICAgICAgICB2YXIgdmFsdWUgPSB2YWx1ZXMoKTtcbiAgICAgICAgICAgIGlmICh2YWx1ZSAhPT0gRE9ORSkge1xuICAgICAgICAgICAgICByZXR1cm4gdmFsdWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YWx1ZXMgPSBudWxsO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoZnJvbSA9PT0gdG8pIHtcbiAgICAgICAgICAgIHJldHVybiBET05FO1xuICAg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aW9uKGZuLCByZXZlcnNlKSB7XG4gICAgICBpZiAocmV2ZXJzZSkge1xuICAgICAgICByZXR1cm4gdGhpcy5yZXZlcnNlKCkuX19pdGVyYXRlKGZuKTtcbiAgICAgIH1cbiAgICAgIHZhciBpdGVyYXRpb25zID0gMDtcbiAgICAgIHZhciBub2RlID0gdGhpcy5faGVhZDtcbiAgICAgIHdoaWxlIChub2RlKSB7XG4gICAgICAgIGlmIChmbihub2RlLnZhbHVlLCBpdGVyYXRpb25zKyssIHRoaXMpID09PSBmYWxzZSkge1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIG5vZGUgPSBub2RlLm5leHQ7XG4gICAgICB9XG4gICAgICByZXR1cm4gaXRlcmF0aW9ucztcbiAgICB9O1xuXG4gICAgU3RhY2sucHJvdG90eXBlLl9faXRlcmF0b3IgPSBmdW5jdGlvbih0eXBlLCByZXZlcnNlKSB7XG4gICAgICBpZiAocmV2ZXJzZSkge1xuICAgICAgICByZXR1cm4gdGhpcy5yZXZlcnNlKCkuX19pdGVyYXRvcih0eXBlKTtcbiAgICAgIH1cbiAgICAgIHZhciBpdGVyYXRpb25zID0gMDtcbiAgICAgIHZhciBub2RlID0gdGhpcy5faGVhZDtcbiAgICAgIHJldHVybiBuZXcgc3JjX0l0ZXJhdG9yX19JdGVyYXRvcihmdW5jdGlvbigpICB7XG4gICAgICAgIGlmIChub2RlKSB7XG4gICAgICAgICAgdmFyIHZhbHVlID0gbm9kZS52YWx1ZTtcbiAgICAgICAgICBub2RlID0gbm9kZS5uZXh0O1xuICAgICAgICAgIHJldHVybiBpdGVyYXRvclZhbHVlKHR5cGUsIGl0ZXJhdGlvbnMrKywgdmFsdWUpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBpdGVyYXRvckRvbmUoKTtcbiAgICAgIH0pO1xuICAgIH07XG5cblxuICBmdW5jdGlvbiBpc1N0YWNrKG1heWJlU3RhY2spIHtcbiAgICByZXR1cm4gISEobWF5YmVTd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ID0gcmVxdWlyZShcIi4vRXhlY3V0aW9uRW52aXJvbm1lbnRcIik7XG4gIGlmIChFeGVjdXRpb25FbnZpcm9ubWVudC5jYW5Vc2VET00gJiYgd2luZG93LnRvcCA9PT0gd2luZG93LnNlbGYpIHtcblxuICAgIC8vIElmIHdlJ3JlIGluIENocm9tZSwgbG9vayBmb3IgdGhlIGRldnRvb2xzIG1hcmtlciBhbmQgcHJvdmlkZSBhIGRvd25sb2FkXG4gICAgLy8gbGluayBpZiBub3QgaW5zdGFsbGVkLlxuICAgIGlmIChuYXZpZ2F0b3IudXNlckFnZW50LmluZGV4T2YoJ0Nocm9tZScpID4gLTEpIHtcbiAgICAgIGlmICh0eXBlb2YgX19SRUFDVF9ERVZUT09MU19HTE9CQUxfSE9PS19fID09PSAndW5kZWZpbmVkJykge1xuICAgICAgICBjb25zb2xlLmRlYnVnKFxuICAgICAgICAgICdEb3dubG9hZCB0aGUgUmVhY3QgRGV2VG9vbHMgZm9yIGEgYmV0dGVyIGRldmVsb3BtZW50IGV4cGVyaWVuY2U6ICcgK1xuICAgICAgICAgICdodHRwczovL2ZiLm1lL3JlYWN0LWRldnRvb2xzJ1xuICAgICAgICApO1xuICAgICAgfVxuICAgIH1cblxuICAgIHZhciBleHBlY3RlZEZlYXR1cmVzID0gW1xuICAgICAgLy8gc2hpbXNcbiAgICAgIEFycmF5LmlzQXJyYXksXG4gICAgICBBcnJheS5wcm90b3R5cGUuZXZlcnksXG4gICAgICBBcnJheS5wcm90b3R5cGUuZm9yRWFjaCxcbiAgICAgIEFycmF5LnByb3RvdHlwZS5pbmRleE9mLFxuICAgICAgQXJyYXkucHJvdG90eXBlLm1hcCxcbiAgICAgIERhdGUubm93LFxuICAgICAgRnVuY3Rpb24ucHJvdG90eXBlLmJpbmQsXG4gICAgICBPYmplY3Qua2V5cyxcbiAgICAgIFN0cmluZy5wcm90b3R5cGUuc3BsaXQsXG4gICAgICBTdHJpbmcucHJvdG90eXBlLnRyaW0sXG5cbiAgICA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1wbGVFdmVudHxcbiAqICAgICAgIHwgICAgICAgICAgIC4gICAgICAgICAgICAgICB8ICAgICAgICAgfFBsdWdpbiAgICAgfFxuICogKy0tLS0tfC0tLS0tLSsgICAgLiAgICAgICAgICAgICAgIHYgICAgICAgICArLS0tLS0tLS0tLS0rXG4gKiB8ICAgICB8ICAgICAgfCAgICAuICAgICstLS0tLS0tLS0tLS0tLSsgICAgICAgICAgICAgICAgICAgICstLS0tLS0tLS0tLS0rXG4gKiB8ICAgICArLS0tLS0tLS0tLS0uLS0tPnxFdmVudFBsdWdpbkh1YnwgICAgICAgICAgICAgICAgICAgIHwgICAgRXZlbnQgICB8XG4gKiB8ICAgICAgICAgICAgfCAgICAuICAgIHwgICAgICAgICAgICAgIHwgICAgICstLS0tLS0tLS0tLSsgIHwgUHJvcGFnYXRvcnN8XG4gKiB8IFJlYWN0RXZlbnQgfCAgICAuICAgIHwgICAgICAgICAgICAgIHwgICAgIHxUYXBFdmVudCAgIHwgIHwtLS0tLS0tLS0tLS18XG4gKiB8ICBFbWl0dGVyICAgfCAgICAuICAgIHwgICAgICAgICAgICAgIHw8LS0tK3xQbHVnaW4gICAgIHwgIHxvdGhlciBwbHVnaW58XG4gKiB8ICAgICAgICAgICAgfCAgICAuICAgIHwgICAgICAgICAgICAgIHwgICAgICstLS0tLS0tLS0tLSsgIHwgIHV0aWxpdGllcyB8XG4gKiB8ICAgICArLS0tLS0tLS0tLS0uLS0tPnwgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICstLS0tLS0tLS0tLS0rXG4gKiB8ICAgICB8ICAgICAgfCAgICAuICAgICstLS0tLS0tLS0tLS0tLStcbiAqICstLS0tLXwtLS0tLS0rICAgIC4gICAgICAgICAgICAgICAgXiAgICAgICAgKy0tLS0tLS0tLS0tK1xuICogICAgICAgfCAgICAgICAgICAgLiAgICAgICAgICAgICAgICB8ICAgICAgICB8RW50ZXIvTGVhdmV8XG4gKiAgICAgICArICAgICAgICAgICAuICAgICAgICA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VsJyxcbiAgICAgICAgICAgICAgbW91bnRBdFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgLy8gRmlyZWZveCBuZWVkcyB0byBjYXB0dXJlIGEgZGlmZmVyZW50IG1vdXNlIHNjcm9sbCBldmVudC5cbiAgICAgICAgICAgIC8vIEBzZWUgaHR0cDovL3d3dy5xdWlya3Ntb2RlLm9yZy9kb20vZXZlbnRzL3Rlc3RzL3Njcm9sbC5odG1sXG4gICAgICAgICAgICBSZWFjdEJyb3dzZXJFdmVudEVtaXR0ZXIuUmVhY3RFdmVudExpc3RlbmVyLnRyYXBCdWJibGVkRXZlbnQoXG4gICAgICAgICAgICAgIHRvcExldmVsVHlwZXMudG9wV2hlZWwsXG4gICAgICAgICAgICAgICdET01Nb3VzZVNjcm9sbCcsXG4gICAgICAgICAgICAgIG1vdW50QXRcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKGRlcGVuZGVuY3kgPT09IHRvcExldmVsVHlwZXMudG9wU2Nyb2xsKSB7XG5cbiAgICAgICAgICBpZiAoaXNFdmVudFN1cHBvcnRlZCgnc2Nyb2xsJywgdHJ1ZSkpIHtcbiAgICAgICAgICAgIFJlYWN0QnJvd3NlckV2ZW50RW1pdHRlci5SZWFjdEV2ZW50TGlzdGVuZXIudHJhcENhcHR1cmVkRXZlbnQoXG4gICAgICAgICAgICAgIHRvcExldmVsVHlwZXMudG9wU2Nyb2xsLFxuICAgICAgICAgICAgICAnc2Nyb2xsJyxcbiAgICAgICAgICAgICAgbW91bnRBdFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgUmVhY3RCcm93c2VyRXZlbnRFbWl0dGVyLlJlYWN0RXZlbnRMaXN0ZW5lci50cmFwQnViYmxlZEV2ZW50KFxuICAgICAgICAgICAgICB0b3BMZXZlbFR5cGVzLnRvcFNjcm9sbCxcbiAgICAgICA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HQoKS4nLFxuICAgICAgICB0aGlzLmdldE5hbWUoKSB8fCAnUmVhY3RDb21wb3NpdGVDb21wb25lbnQnXG4gICAgICApIDogaW52YXJpYW50KHR5cGVvZiBpbnN0LmNvbnN0cnVjdG9yLmNoaWxkQ29udGV4dFR5cGVzID09PSAnb2JqZWN0JykpO1xuICAgICAgaWYgKFwicHJvZHVjdGlvblwiICE9PSBwcm9jZXNzLmVudi5OT0RFX0VOVikge1xuICAgICAgICB0aGlzLl9jaGVja1Byb3BUeXBlcyhcbiAgICAgICAgICBpbnN0LmNvbnN0cnVjdG9yLmNoaWxkQ29udGV4dFR5cGVzLFxuICAgICAgICAgIGNoaWxkQ29udGV4dCxcbiAgICAgICAgICBSZWFjdFByb3BUeXBlTG9jYXRpb25zLmNoaWxkQ29udGV4dFxuICAgICAgICApO1xuICAgICAgfVxuICAgICAgZm9yICh2YXIgbmFtZSBpbiBjaGlsZENvbnRleHQpIHtcbiAgICAgICAgKFwicHJvZHVjdGlvblwiICE9PSBwcm9jZXNzLmVudi5OT0RFX0VOViA/IGludmFyaWFudChcbiAgICAgICAgICBuYW1lIGluIGluc3QuY29uc3RydWN0b3IuY2hpbGRDb250ZXh0VHlwZXMsXG4gICAgICAgICAgJyVzLmdldENoaWxkQ29udGV4dCgpOiBrZXkgXCIlc1wiIGlzIG5vdCBkZWZpbmVkIGluIGNoaWxkQ29udGV4dFR5cGVzLicsXG4gICAgICAgICAgdGhpcy5nZXROYW1lKCkgfHwgJ1JlYWN0Q29tcG9zaXRlQ29tcG9uZW50JyxcbiAgICAgICAgICBuYW1lXG4gICAgICAgICkgOiBpbnZhcmlhbnQobmFtZSBpbiBpbnN0LmNvbnN0cnVjdG9yLmNoaWxkQ29udGV4dFR5cGVzKSk7XG4gICAgICB9XG4gICAgICByZXR1cm4gY2hpbGRDb250ZXh0O1xuICAgIH1cbiAgICByZXR1cm4gbnVsbDtcbiAgfSxcblxuICBfbWVyZ2VDaGlsZENvbnRleHQ6IGZ1bmN0a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cFR5cGVMb2NhdGlvbnMucHJvcCkge1xuICAgICAgICAgICAgLy8gUHJlZmFjZSBnaXZlcyB1cyBzb21ldGhpbmcgdG8gYmxhY2tsaXN0IGluIHdhcm5pbmcgbW9kdWxlXG4gICAgICAgICAgICAoXCJwcm9kdWN0aW9uXCIgIT09IHByb2Nlc3MuZW52Lk5PREVfRU5WID8gd2FybmluZyhcbiAgICAgICAgICAgICAgZmFsc2UsXG4gICAgICAgICAgICAgICdGYWlsZWQgQ29tcG9zaXRlIHByb3BUeXBlOiAlcyVzJyxcbiAgICAgICAgICAgICAgZXJyb3IubWVzc2FnZSxcbiAgICAgICAgICAgICAgYWRkZW5kdW1cbiAgICAgICAgICAgICkgOiBudWxsKTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgKFwicHJvZHVjdGlvblwiICE9PSBwcm9jZXNzLmVudi5OT0RFX0VOViA/IHdhcm5pbmcoXG4gICAgICAgICAgICAgIGZhbHNlLFxuICAgICAgICAgICAgICAnRmFpbGVkIENvbnRleHQgVHlwZXM6ICVzJXMnLFxuICAgICAgICAgICAgICBlcnJvci5tZXNzYWdlLFxuICAgICAgICAgICAgICBhZGRlbmR1bVxuICAgICAgICAgICAgKSA6IG51bGwpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgfSxcblxuICByZWNlaXZlQ29tcG9uZW50OiBmdW5jdGlvbihuZXh0RWxlbWVudCwgdHJhbnNhY3Rpb24sIG5leHRDb250ZXh0KSB7XG4gICAgdmFyIHByZXZFbGVtZW50ID0gdGhpcy5fY3VycmVudEVsZW1lbnQ7XG4gICAgdmFyIHByZXZDb250ZXh0ID0gdGhpcy5fY29udGV4dDtcblxuICAgIHRoaXMuX3BlbmRpbmdFbGVtZW50ID0gbnVsbDtcblxuICAgIHRoaXMudXBkYXRlQ29tcG9uZW50KFxuICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICBwcmV2RWxlbWVudCxcbiAgICAgIG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nIHx8XG4gICAgICAgICAgbW9kdWxlTmFtZSA9PT0gJ1JlYWN0RE9NSURPcGVyYXRpb25zJykge1xuICAgICAgICBzdGFydCA9IHBlcmZvcm1hbmNlTm93KCk7XG4gICAgICAgIHJ2ID0gZnVuYy5hcHBseSh0aGlzLCBhcmdzKTtcbiAgICAgICAgdG90YWxUaW1lID0gcGVyZm9ybWFuY2VOb3coKSAtIHN0YXJ0O1xuXG4gICAgICAgIGlmIChmbk5hbWUgPT09ICdfbW91bnRJbWFnZUludG9Ob2RlJykge1xuICAgICAgICAgIHZhciBtb3VudElEID0gUmVhY3RNb3VudC5nZXRJRChhcmdzWzFdKTtcbiAgICAgICAgICBSZWFjdERlZmF1bHRQZXJmLl9yZWNvcmRXcml0ZShtb3VudElELCBmbk5hbWUsIHRvdGFsVGltZSwgYXJnc1swXSk7XG4gICAgICAgIH0gZWxzZSBpZiAoZm5OYW1lID09PSAnZGFuZ2Vyb3VzbHlQcm9jZXNzQ2hpbGRyZW5VcGRhdGVzJykge1xuICAgICAgICAgIC8vIHNwZWNpYWwgZm9ybWF0XG4gICAgICAgICAgYXJnc1swXS5mb3JFYWNoKGZ1bmN0aW9uKHVwZGF0ZSkge1xuICAgICAgICAgICAgdmFyIHdyaXRlQXJncyA9IHt9O1xuICAgICAgICAgICAgaWYgKHVwZGF0ZS5mcm9tSW5kZXggIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgd3JpdGVBcmdzLmZyb21JbmRleCA9IHVwZGF0ZS5mcm9tSW5kZXg7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAodXBkYXRlLnRvSW5kZXggIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgd3JpdGVBcmdzLnRvSW5kZXggPSB1cGRhdGUudG9JbmRleDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICh1cGRhdGUudGV4dENvbnRlbnQgIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgd3JpdGVBcmdzLnRleHRDb250ZW50ID0gdXBkYXRlLnRleHRDb250ZW50O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHVwZGF0ZS5tYXJrdXBJbmRleCAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICB3cml0ZUFyZ3MubWFya3VwID0gYXJnc1sxXVt1cGRhdGUubWFya3VwSW5kZXhdO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgUmVhY3REZWZhdWx0UGVyZi5fcmVjb3JkV3JpdGUoXG4gICAgICAgICAgICAgIHVwZGF0ZS5wYXJlbnRJRCxcbiAgICAgICAgICAgICAgdXBkYXRlLnR5cGUsXG4gICAgICAgICAgICAgIHRvdGFsVGltZSxcbiAgICAgICAgICAgICAgd3JpdGVBcmdzXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH0pO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIC8vIGJhc2ljIGZvcm1hdFxuICAgICAgICAgIFJlYWN0RGVmYXVsdFBlcmYuX3JlY29yZFdyaXRlKFxuICAgICAgICAgICAgYXJnc1swXSxcbiAgICAgICAgICAgIGZuTmFtZSxcbiAgICAgICAgICAgIHRvdGFsVGltZSxcbiAgICAgICAgICAgIEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKGFyZ3MsIDEpXG4gICAgICAgICAgKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gcnY7XG4gICAgICB9IGVsc2UgaWYgKG1vZHVsZU5hbWUgPT09ICdSZWFjdENvbXBvc2l0ZUNvbXBvbmVudCcgJiYgKFxuICAgICAgICAoLy8gVE9ETzogcmVjZWl2ZUNvbXBvbmVudCgpP1xuICAgICAgICAoZm5OYW1lID09PSAnbW91bnRDb21wb25lbnQnIHx8XG4gICAgICAgIGZuTmFtZSA9PT0gJ3VwZGF0ZUNvbXBvbmVudCcgfHwgZm5OYW1lID09PSAnX3JlbmRlclZhbGlkYXRlZENvbXBvbmVudCcpKSkpIHtcblxuICAgICAgICBpZiAodHlwZW9mIHRoaXMuX2N1cnJlbnRFbGVtZW50LnR5cGUgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgcmV0dXJuIGZ1bmMuYXBwbHkodGhpcywgYXJncyk7XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgcm9vdE5vZGVJRCA9IGZuTmFtZSA9PT0gJ21vdW50Q29tcG9uZW50JyA/XG4gICAgICAgICAgYXJnc1swXSA6XG4gICAgICAgICAgdGhpcy5fcm9vdE5vZGVJRDtcbiAgICAgICAgdmFyIGlzUmVuZGVyID0gZm5OYW1lID09PSAnX3JlbmRlclZhbGlkYXRlZENvbXBvbmVudCc7XG4gICAgICAgIHZhciBpc01vdW50ID0gZm5OYW1lID09PSAnbW91bnRDb21wb25lbnQnO1xuXG4gICAgICAgIHZhciBtb3VudFN0YWNrID0gUmVhY3REZWZhdWx0UGVyZi5fbW91bnRTdGFjaztcbiAgICAgICAgdmFyIGVudHJ5ID0gUmVhY3REZWZhdWx0UGVyZi5fYWxsTWVhc3VyZW1lbnRzW1xuICAgICAgICAgIFJlYWN0RGVmYXVsdFBlcmYuX2FsbE1lYXN1cmVtZW50cy5sZW5ndGggLSAxXG4gICAgICAgIF07XG5cbiAgICAgICAgaWYgKGlzUmVuZGVyKSB7XG4gICAgICAgICAgYWRkVmFsdWUoZW50cnkuY291bnRzLCByb290Tm9kZUlELCAxKTtcbiAgICAgICAgfSBlbHNlIGlmIChpc01vdW50KSB7XG4gICAgICAgICAgbW91bnRTdGFjay5wdXNoKDApO1xuICAgICAgICB9XG5cbiAgICAgICAgc3RhcnQgPSBwZXJmb3JtYW5jZU5vdygpO1xuICAgICAgICBydiA9IGZ1bmMuYXBwbHkodGhpcywgYXJncyk7XG4gICAgICAgIHRvdGFsVGltZSA9IHBlcmZvcm1hbmNlTm93KCkgLSBzdGFydDtcblxuICAgICAgICBpZiAoaXNSZW5kZXIpIHtcbiAgICAgICAgICBhZGRWYWx1ZShlbnRyeS5yZW5kZXIsIHJvb3ROb2RlSUQsIHRvdGFsVGlt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fRU5WID8gd2FybmluZyhcbiAgICAgICAgICBmYWxzZSxcbiAgICAgICAgICAnUmVhY3QuYWRkb25zLmNyZWF0ZUZyYWdtZW50IG9ubHkgYWNjZXB0cyBhIHNpbmdsZSBvYmplY3QuJyxcbiAgICAgICAgICBvYmplY3RcbiAgICAgICAgKSA6IG51bGwpO1xuICAgICAgICByZXR1cm4gb2JqZWN0O1xuICAgICAgfVxuICAgICAgaWYgKFJlYWN0RWxlbWVudC5pc1ZhbGlkRWxlbWVudChvYmplY3QpKSB7XG4gICAgICAgIChcInByb2R1Y3Rpb25cIiAhPT0gcHJvY2Vzcy5lbnYuTk9ERV9FTlYgPyB3YXJuaW5nKFxuICAgICAgICAgIGZhbHNlLFxuICAgICAgICAgICdSZWFjdC5hZGRvbnMuY3JlYXRlRnJhZ21lbnQgZG9lcyBub3QgYWNjZXB0IGEgUmVhY3RFbGVtZW50ICcgK1xuICAgICAgICAgICd3aXRob3V0IGEgd3JhcHBlciBvYmplY3QuJ1xuICAgICAgICApIDogbnVsbCk7XG4gICAgICAgIHJldHVybiBvYmplY3Q7XG4gICAgICB9XG4gICAgICBpZiAoY2FuV2FybkZvclJlYWN0RnJhZ21lbnQpIHtcbiAgICAgICAgdmFyIHByb3h5ID0ge307XG4gICAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShwcm94eSwgZnJhZ21lbnRLZXksIHtcbiAgICAgICAgICBlbnVtZXJhYmxlOiBmYWxzZSxcbiAgICAgICAgICB2YWx1ZTogb2JqZWN0XG4gICAgICAgIH0pO1xuICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkocHJveHksIGRpZFdhcm5LZXksIHtcbiAgICAgICAgICB3cml0YWJsZTogdHJ1ZSxcbiAgICAgICAgICBlbnVtZXJhYmxlOiBmYWxzZSxcbiAgICAgICAgICB2YWx1ZTogZmFsc2VcbiAgICAgICAgfSk7XG4gICAgICAgIGZvciAodmFyIGtleSBpbiBvYmplY3QpIHtcbiAgICAgICAgICBw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Y2tzIGxpa2UgYW4gZWxlbWVudFxuICAgICAgICBuZXh0RWxlbWVudCAhPSBudWxsICYmIG5leHRFbGVtZW50LnByb3BzICE9PSB1bmRlZmluZWQgP1xuICAgICAgICAgICcgVGhpcyBtYXkgYmUgY2F1c2VkIGJ5IHVuaW50ZW50aW9uYWxseSBsb2FkaW5nIHR3byBpbmRlcGVuZGVudCAnICtcbiAgICAgICAgICAnY29waWVzIG9mIFJlYWN0LicgOlxuICAgICAgICAgICcnXG4gICAgICApXG4gICAgKSA6IGludmFyaWFudChSZWFjdEVsZW1lbnQuaXNWYWxpZEVsZW1lbnQobmV4dEVsZW1lbnQpKSk7XG5cbiAgICB2YXIgcHJldkNvbXBvbmVudCA9IGluc3RhbmNlc0J5UmVhY3RSb290SURbZ2V0UmVhY3RSb290SUQoY29udGFpbmVyKV07XG5cbiAgICBpZiAocHJldkNvbXBvbmVudCkge1xuICAgICAgdmFyIHByZXZFbGVtZW50ID0gcHJldkNvbXBvbmVudC5fY3VycmVudEVsZW1lbnQ7XG4gICAgICBpZiAoc2hvdWxkVXBkYXRlUmVhY3RDb21wb25lbnQocHJldkVsZW1lbnQsIG5leHRFbGVtZW50KSkge1xuICAgICAgICByZXR1cm4gUmVhY3RNb3VudC5fdXBkYXRlUm9vdENvbXBvbmVudChcbiAgICAgICAgICBwcmV2Q29tcG9uZW50LFxuICAgICAgICAgIG5leHRFbGVtZW50LFxuICAgICAgICAgIGNvbnRhaW5lcixcbiAgICAgICAgICBjYWxsYmFja1xuICAgICAgICApLmdldFB1YmxpY0luc3RhbmNlKCk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBSZWFjdE1vdW50LnVubW91bnRDb21wb25lbnRBdE5vZGUoY29udGFpbmVyKTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICB2YXIgcmVhY3RSb290RWxlbWVudCA9IGdldFJlYWN0Um9vdEVsZW1lbnRJbkNvbnRhaW5lcihjb250YWluZXIpO1xuICAgIHZhciBjb250YWluZXJIYX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WFjdE1vdW50LmdldElEKGFuY2VzdG9yTm9kZSlcbiAgICApIDogaW52YXJpYW50KGZhbHNlKSk7XG4gIH0sXG5cbiAgX21vdW50SW1hZ2VJbnRvTm9kZTogZnVuY3Rpb24obWFya3VwLCBjb250YWluZXIsIHNob3VsZFJldXNlTWFya3VwKSB7XG4gICAgKFwicHJvZHVjdGlvblwiICE9PSBwcm9jZXNzLmVudi5OT0RFX0VOViA/IGludmFyaWFudChcbiAgICAgIGNvbnRhaW5lciAmJiAoXG4gICAgICAgIChjb250YWluZXIubm9kZVR5cGUgPT09IEVMRU1FTlRfTk9ERV9UWVBFIHx8IGNvbnRhaW5lci5ub2RlVHlwZSA9PT0gRE9DX05PREVfVFlQRSlcbiAgICAgICksXG4gICAgICAnbW91bnRDb21wb25lbnRJbnRvTm9kZSguLi4pOiBUYXJnZXQgY29udGFpbmVyIGlzIG5vdCB2YWxpZC4nXG4gICAgKSA6IGludmFyaWFudChjb250YWluZXIgJiYgKFxuICAgICAgKGNvbnRhaW5lci5ub2RlVHlwZSA9PT0gRUxFTUVOVF9OT0RFX1RZUEUgfHwgY29udGFpbmVyLm5vZGVUeXBlID09PSBET0NfTk9ERV9UWVBFKVxuICAgICkpKTtcblxuICAgIGlmIChzaG91bGRSZXVzZU1hcmt1cCkge1xuICAgICAgdmFyIHJvb3RFbGVtZW50ID0gZ2V0UmVhY3RSb290RWxlbWVudEluQ29udGFpbmVyKGNvbnRhaW5lcik7XG4gICAgICBpZiAoUmVhY3RNYXJrdXBDaGVja3N1bS5jYW5SZXVzZU1hcmt1cChtYXJrdXAsIHJvb3RFbGVtZW50KSkge1xuICAgICAgICByZXR1cm47XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB2YXIgY2hlY2tzdW0gPSByb290RWxlbWVudC5nZXRBdHRyaWJ1dGUoXG4gICAgICAgICAgUmVhY3RNYXJrdXBDaGVja3N1bS5DSEVDS1NVTV9BVFRSX05BTUVcbiAgICAgICAgKTtcbiAgICAgICAgcm9v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mRleCkge1xuICAgICAgICBlbnF1ZXVlTW92ZSh0aGlzLl9yb290Tm9kZUlELCBjaGlsZC5fbW91bnRJbmRleCwgdG9JbmRleCk7XG4gICAgICB9XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIENyZWF0ZXMgYSBjaGlsZCBjb21wb25lbnQuXG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1JlYWN0Q29tcG9uZW50fSBjaGlsZCBDb21wb25lbnQgdG8gY3JlYXRlLlxuICAgICAqIEBwYXJhbSB7c3RyaW5nfSBtb3VudEltYWdlIE1hcmt1cCB0byBpbnNlcnQuXG4gICAgICogQHByb3RlY3RlZFxuICAgICAqL1xuICAgIGNyZWF0ZUNoaWxkOiBmdW5jdGlvbihjaGlsZCwgbW91bnRJbWFnZSkge1xuICAgICAgZW5xdWV1ZU1hcmt1cCh0aGlzLl9yb290Tm9kZUlELCBtb3VudEltYWdlLCBjaGlsZC5fbW91bnRJbmRleCk7XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIFJlbW92ZXMgYSBjaGlsZCBjb21wb25lbnQuXG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1JlYWN0Q29tcG9uZW50fSBjaGlsZCBDaGlsZCB0byByZW1vdmUuXG4gICAgICogQHByb3RlY3RlZFxuICAgICAqL1xuICAgIHJlbW92ZUNoaWxkOiBmdW5jdGlvbihjaGlsZCkge1xuICAgICAgZW5xdWV1ZVJlbW92ZSh0aGlzLl9yb290Tm9kZUlELCBjaGlsZC5fbW91bnRJbmRleCk7XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIFNldHMgdGhpcyB0ZXh0IGNvbnRlbnQgc3RyaW5nLlxuICAgICAqXG4gICAgICogQHBhcmFtIHtzdHJpbmd9IHRleHRDb250ZW50IFRleHQgY29udGVudCB0byBzZXQuXG4gICAgICogQHByb3RlY3RlZFxuICAgICAqL1xuICAgIHNldFRleHRDb250ZW50OiBmdW5jdGlvbih0ZXh0Q29udGVudCkge1xuICAgICA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yZW50IG1ldGhvZHMuIFdyYXBwZXJzIGFyZSBleHRyZW1lbHkgc2ltcGxlIC1cbiAqIHRoZXkgb25seSByZXF1aXJlIGltcGxlbWVudGluZyB0d28gbWV0aG9kcy5cbiAqXG4gKiA8cHJlPlxuICogICAgICAgICAgICAgICAgICAgICAgIHdyYXBwZXJzIChpbmplY3RlZCBhdCBjcmVhdGlvbiB0aW1lKVxuICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsgICAgICAgICtcbiAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICB8XG4gKiAgICAgICAgICAgICAgICAgICAgKy0tLS0tLS0tLS0tLS0tLS0tfC0tLS0tLS0tfC0tLS0tLS0tLS0tLS0tK1xuICogICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgIHYgICAgICAgIHwgICAgICAgICAgICAgIHxcbiAqICAgICAgICAgICAgICAgICAgICB8ICAgICAgKy0tLS0tLS0tLS0tLS0tLSsgICB8ICAgICAgICAgICAgICB8XG4gKiAgICAgICAgICAgICAgICAgICAgfCAgICstLXwgICAgd3JhcHBlcjEgICB8LS0tfC0tLS0rICAgICAgICAgfFxuICogICAgICAgICAgICAgICAgICAgIHwgICB8ICArLS0tLS0tLS0tLS0tLS0tKyAgIHYgICAgfCAgICAgICAgIHxcbiAqICAgICAgICAgICAgICAgICAgICB8ICAgfCAgICAgICAgICArLS0tLS0tLS0tLS0tLSsgIHwgICAgICAgICB8XG4gKiAgICAgICAgICAgICAgICAgICAgfCAgIHwgICAgICstLS0tfCAgIHdyYXBwZXIyICB8LS0tLS0tLS0rICAgfFxuICogICAgICAgICAgICAgICAgICAgIHwgICB8ICAgICB8ICAgICstLS0tLS0tLS0tLS0tKyAgfCAgICAgfCAgIHxcbiAqICAgICAgICAgICAgICAgICAgICB8ICAgfCAgICAgfCAgICAgICAgICAgICAgICAgICAgIHwgICAgIHwgICB8XG4gKiAgICAgICAgICAgICAgICAgICAgfCAgIHYgICAgIHYgICAgICAgICAgICAgICAgICAgICB2ICAgICB2ICAgfCB3cmFwcGVyXG4gKiAgICAgICAgICAgICAgICAgICAgfCArLS0tKyArLS0tKyAgICstLS0tLS0tLS0rICAgKy0tLSsgKy0tLSsgfCBpbnZhcmlhbnRzXG4gKiBwZXJmb3JtKGFueU1ldGhvZCkgfCB8ICAgfCB8ICAgfCAgIHwgICAgICAgICB8ICAgfCAgIHwgfCAgIHwgfCBtYWludGFpbmVkXG4gKiArLS0tLS0tLS0tLS0tLS0tLS0+fC18LS0tfC18LS0tfC0tPnxhbnlNZXRob2R8LS0tfC0tLXwtfC0tLXwtfC0tLS0tLS0tPlxuICogICAgICAgICAgICAgICAgICAgIHwgfCAgIHwgfCAgIHwgICB8ICAgICAgICAgfCAgIHwgICB8IHwgICB8IHxcbiAqICAgICAgICAgICAgICAgICAgICB8IHwgICB8IHwgICB8ICAgfCAgICAgICAgIHwgICB8ICAgfCB8ICAgfCB8XG4gKiAgICAgICAgICAgICAgICAgICAgfCB8ICAgfCB8ICAgfCAgIHwgICAgICAgICB8ICAgfCAgIHwgfCAgIHwgfFxuICogICAgICAgICAgICAgICAgICAgIHwgKy0tLSsgKy0tLSsgICArLS0tLS0tLS0tKyAgICstLS0rICstLS0rIHxcbiAqICAgICAgICAgICAgICAgICAgICB8ICBpbml0aWFsaXplICAgICAgICAgICAgICAgICAgICBjbG9zZSAgICB8XG4gKiAgICAgICAgICAgICAgICAgICAgKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tK1xuICogPC9wcmU+XG4gKlxuICogVXNlIGNhc2VzOlxuICogLSBQcmVzZXJ2aW5nIHRoZSBpbnB1dCBzZWxlY3Rpb24gcmFuZ2VzIGJlZm9yZS9hZnRlciByZWNvbmNpbGlhdGlvbi5cbiAqICAgUmVzdG9yaW5nIHNlbGVjdGlvbiBldmVuIGluIHRoZSBldmVudCBvZiBhbiB1bmV4cGVjdGVkIGVyc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V4dERpc3BsYXlOYW1lID0gbnVsbDtcbiAgICAgICAgaWYgKFwicHJvZHVjdGlvblwiICE9PSBwcm9jZXNzLmVudi5OT0RFX0VOVikge1xuICAgICAgICAgIGlmICghb3duZXJzTWF0Y2gpIHtcbiAgICAgICAgICAgIGlmIChwcmV2RWxlbWVudC5fb3duZXIgIT0gbnVsbCAmJlxuICAgICAgICAgICAgICAgIHByZXZFbGVtZW50Ll9vd25lci5nZXRQdWJsaWNJbnN0YW5jZSgpICE9IG51bGwgJiZcbiAgICAgICAgICAgICAgICBwcmV2RWxlbWVudC5fb3duZXIuZ2V0UHVibGljSW5zdGFuY2UoKS5jb25zdHJ1Y3RvciAhPSBudWxsKSB7XG4gICAgICAgICAgICAgIHByZXZOYW1lID1cbiAgICAgICAgICAgICAgICBwcmV2RWxlbWVudC5fb3duZXIuZ2V0UHVibGljSW5zdGFuY2UoKS5jb25zdHJ1Y3Rvci5kaXNwbGF5TmFtZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChuZXh0RWxlbWVudC5fb3duZXIgIT0gbnVsbCAmJlxuICAgICAgICAgICAgICAgIG5leHRFbGVtZW50Ll9vd25lci5nZXRQdWJsaWNJbnN0YW5jZSgpICE9IG51bGwgJiZcbiAgICAgICAgICAgICAgICBuZXh0RWxlbWVudC5fb3duZXIuZ2V0UHVibGljSW5zdGFuY2UoKS5jb25zdHJ1Y3RvciAhPSBudWxsKSB7XG4gICAgICAgICAgICAgIG5leHROYW1lID1cbiAgICAgICAgICAgICAgICBuZXh0RWxlbWVudC5fb3duZXIuZ2V0UHVibGljSW5zdGFuY2UoKS5jb25zdHJ1Y3Rvci5kaXNwbGF5TmFtZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChuZXh0RWxlbWVudC50eXBlICE9IG51bGwgJiZcbiAgICAgICAgICAgICAgICBuZXh0RWxlbWVudC50eXBlLmRpc3BsYXlOYW1lICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgbmV4dERpc3BsYXlOYW1lID0gbmV4dEVsZW1lbnQudHlwZS5kaXNwbGF5TmFtZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChuZXh0RWxlbWVudC50eXBlICE9IG51bGwgJiYgdHlwZW9mIG5leHRFbGVtZW50LnR5cGUgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgIG5leHREaXNwbGF5TmFtZSA9IG5leHRFbGVtZW50LnR5cGU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAodHlwZW9mIG5leHRFbGVtZW50LnR5cGUgIT09ICdzdHJpbmcnIHx8XG4gICAgICAgICAgICAgICAgbmV4dEVsZW1lbnQudHlwZSA9PT0gJ2lucHV0JyB8fFxuICAgICAgICAgICAgICAgIG5leHRFbGVtZW50LnR5cGUgPT09ICd0ZXh0YXJlYScpIHtcbiAgICAgICAgICAgICAgaWYgKChwcmV2RWxlbWVudC5fb3duZXIgIT0gbnVsbCAmJlxuICAgICAgICAgICAgICAgICAgcHJldkVsZW1lbnQuX293bmVyLl9pc093bmVyTmVjZXNzYXJ5ID09PSBmYWxzZSkgfHxcbiAgICAgICAgICAgICAgICAgIChuZXh0RWxlbWVudC5fb3duZXIgIT0gbnVsbCAmJlxuICAgICAgICAgICAgICAgICAgbmV4dEVsZW1lbnQuX293bmVyLl9pc093bmVyTmVjZXNzYXJ5ID09PSBmYWxzZSkpIHtcbiAgICAgICAgICAgICAgICBpZiAocHJldkVsZW1lbnQuX293bmVyICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgIHByZXZFbGVtZW50Ll9vd25lci5faXNPd25lck5lY2Vzc2FyeSA9IHRydWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChuZXh0RWxlbWVudC5fb3duZXIgIT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgbmV4dEVsZW1lbnQuX293bmVyLl9pc093bmVyTmVjZXNzYXJ5ID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgKFwicHJvZHVjdGlvblwiICE9PSBwcm9jZXNzLmVudi5OT0RFX0VOViA/IHdhcm5pbmcoXG4gICAgICAgICAgICAgICAgICBmYWxzZSxcbiAgICAgICAgICAgICAgICAgICc8JXMgLz4gaXMgYmVpbmcgcmVuZGVyZWQgYnkgYm90aCAlcyBhbmQgJXMgdXNpbmcgdGhlIHNhbWUgJyArXG4gICAgICAgICAgICAgICAgICAna2V5ICglcykgaW4gdGhlIHNhbWUgcGxhY2UuIEN1cnJlbnRseSwgdGhpcyBtZWFucyB0aGF0ICcgK1xuICAgICAgICAgICAgICAgICAgJ3RoZXkgZG9uXFwndCBwcmVzZXJ2ZSBzdGF0ZS4gVGhpcyBiZWhhdmlvciBzaG91bGQgYmUgdmVyeSAnICtcbiAgICAgICAgICAgICAgICAgICdyYXJlIHNvIHdlXFwncmUgY29uc2lkZXJpbmcgZGVwcmVjYXRpbmcgaXQuIFBsZWFzZSBjb250YWN0ICcgK1xuICAgICAgICAgICAgICAgICAgJ3RoZSBSZWFjdCB0ZWFtIGFuZCBleHBsYWluIHlvdXIgdXNlIGNhc2Ugc28gdGhhdCB3ZSBjYW4gJyArXG4gICAgICAgICAgICAgICAgICAndGFrZSB0aGF0IGludG8gY29uc2lkZXJhdGlvbi4nLFxuICAgICAgICAgICAgICAgICAgbmV4dERpc3BsYXlOYW1lIHx8ICdVbmtub3duIENvbXBvbmVudCcsXG4gICAgICAgICAgICAgICAgICBwcmV2TmFtZSB8fCAnW1Vua25vd25dJyxcbiAgICAgICAgICAgICAgICAgIG5leHROYW1lIHx8ICdbVW5rbm93bl0nLFxuICAgICAgICAgICAgICAgICAgcHJldkVsZW1lbnQua2V5XG4gICAgICAgICAgICAgICAgKSA6IG51bGwpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBvd25lcnNNYXRjaDtcbiAgICAgI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ogbnVsbCk7XG4gICAgICAgICAgZGlkV2FybkFib3V0TWFwcyA9IHRydWU7XG4gICAgICAgIH1cbiAgICAgICAgLy8gSXRlcmF0b3Igd2lsbCBwcm92aWRlIGVudHJ5IFtrLHZdIHR1cGxlcyByYXRoZXIgdGhhbiB2YWx1ZXMuXG4gICAgICAgIHdoaWxlICghKHN0ZXAgPSBpdGVyYXRvci5uZXh0KCkpLmRvbmUpIHtcbiAgICAgICAgICB2YXIgZW50cnkgPSBzdGVwLnZhbHVlO1xuICAgICAgICAgIGlmIChlbnRyeSkge1xuICAgICAgICAgICAgY2hpbGQgPSBlbnRyeVsxXTtcbiAgICAgICAgICAgIG5leHROYW1lID0gKFxuICAgICAgICAgICAgICAobmFtZVNvRmFyICE9PSAnJyA/IG5hbWVTb0ZhciArIFNVQlNFUEFSQVRPUiA6IFNFUEFSQVRPUikgK1xuICAgICAgICAgICAgICB3cmFwVXNlclByb3ZpZGVkS2V5KGVudHJ5WzBdKSArIFNVQlNFUEFSQVRPUiArXG4gICAgICAgICAgICAgIGdldENvbXBvbmVudEtleShjaGlsZCwgMClcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICBuZXh0SW5kZXggPSBpbmRleFNvRmFyICsgc3VidHJlZUNvdW50O1xuICAgICAgICAgICAgc3VidHJlZUNvdW50ICs9IHRyYXZlcnNlQWxsQ2hpbGRyZW5JbXBsKFxuICAgICAgICAgICAgICBjaGlsZCxcbiAgICAgICAgICAgICAgbmV4dE5hbWUsXG4gICAgICAgICAgICAgIG5leHRJbmRleCxcbiAgICAgICAgICAgICAgY2FsbGJhY2ssXG4gICAgICAgICAgICAgIHRyYXZlcnNlQ29udGV4dFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9IGVsc2UgaWYgKHR5cGUgPT09ICdvYmplY3QnKSB7XG4gICAgICAoXCJwcm9kdWN0aW9uXCIgIT09IHByb2Nlc3MuZW52Lk5PREVfRU5WID8gaW52YXJpYW50KFxuICAgICAgICBjaGlsZHJlbi5ub2RlVHlwZSAhPT0gMSxcbiAgICAgICAgJ3RyYXZlcnNlQWxsQ2hpbGRyZW4oLi4uKTogRW5jb3VudGVyZWQgYW4gaW52YWxpZCBjaGlsZDsgRE9NICcgK1xuICAgICAgICAnZWxlbWVudHMgYXJlIG5vdCB2YWxpZCBjaGlsZHJlbiBvZiBSZWFjdCBjb21wb25lbnRzLidcbiAgICAgICkgOiBpbnZhcmlhbnQoY2hpbGRyZW4ubm9kZVR5cGUgIT09IDEpKTtcbiAgICAgIHZhciBmcmFnbWVudCA9IFJlYWN0RnJhZ21lbnQuZXh0cmFjdChjaGlsZHJlbik7XG4gICAgICBmb3IgKHZhciBrZXkgaW4gZnJhZ21lbnQpIHtcbiAgICAgICAgaWYgKGZyYWdtZW50Lmhhc093blByb3BlcnR5KGtleSkpIHtcbiAgICAgICAgICBjaGlsZCA9IGZyYWdtZW50W2tleV07XG4gICAgICAgICAgbmV4dE5hbWUgPSAoXG4gICAgICAgICAgICAobmFtZVNvRmFyICE9PSAnJyA/IG5hbWVTb0ZhciArIFNVQlNFUEFSQVRPUiA6IFNFUEFSQVRPUikgK1xuICAgICAgICAgICAgd3JhcFVzZXJQcm92aWRlZEtleShrZXkpICsgU1VCU0VQQVJBVE9SICtcbiAgICAgICAgICAgIGdldENvbXBvbmVudEtleShjaGlsZCwgMClcbiAgICAgICAgICApO1xuICAgICAgICAgIG5leHRJbmRleCA9IGluZGV4U29GYXIgKyBzdWJ0cmVlQ291bnQ7XG4gICAgICAgICAgc3VidHJlZUNvdW50ICs9IHRyYXZlcnNlQWxsQ2hpbGRyZW5JbXBsKFxuICAgICAgICAgICAgY2hpbGQsXG4gICAgICAgICAgICBuZXh0TmFtZSxcbiAgICAgICAgICAgIG5leHRJbmRleCxcbiAgICAgICAgICAgIGNhbGxiYWNrLFxuICAgICAgICAgICAgdHJhdmVyc2VDb250ZXh0XG4gICAgICAgICAgKTtcbiAgICAgICAgf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ICAgICAgICBuZXcgTG9naW5FcnJvcihyZXN1bHQuZXJyLnN0YXR1cyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0LmVyciAmJiByZXN1bHQuZXJyLmRldGFpbHMgP1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdC5lcnIuZGV0YWlscyA6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0LmVycikgOlxuICAgICAgICAgICAgICAgICAgICBuZXcgTG9naW5FcnJvcignU29tZXRoaW5nIHdlbnQgd3JvbmcnKSxcbiAgICAgICAgICAgIG51bGwsIG51bGwsIG51bGwsIG51bGwsIG51bGwpO1xuICB9KTtcblxuICBwb3B1cC5mb2N1cygpO1xufTtcblxuLyoqXG4gKiBMb2dpbiB3aXRoIFJlc291cmNlIE93bmVyIChSTylcbiAqXG4gKiBAcGFyYW0ge09iamVjdH0gb3B0aW9uc1xuICogQHBhcmFtIHtGdW5jdGlvbn0gY2FsbGJhY2tcbiAqIEBtZXRob2QgbG9naW5XaXRoUmVzb3VyY2VPd25lclxuICovXG5cbkF1dGgwLnByb3RvdHlwZS5sb2dpbldpdGhSZXNvdXJjZU93bmVyID0gZnVuY3Rpb24gKG9wdGlvbnMsIGNhbGxiYWNrKSB7XG4gIHZhciBzZWxmID0gdGhpcztcbiAgdmFyIHF1ZXJ5ID0geHRlbmQoXG4gICAgdGhpcy5fZ2V0TW9kZShvcHRpb25zKSxcbiAgICBvcHRpb25zLFxuICAgIHtcbiAgICAgIGNsaWVudF9pZDogICAgdGhpcy5fY2xpZW50SUQsXG4gICAgICB1c2VybmFtZTogICAgIHRyaW0ob3B0aW9ucy51c2VybmFtZSB8fCBvcHRpb25zLmVtYWlsIHx8ICcnKSxcbiAgICAgIGdyYW50X3R5cGU6ICAgJ3Bhc3N3b3JkJ1xuICAgIH0pO1xuXG4gIHRoaXMuX2NvbmZpZ3VyZU9mZmxpbmVNb2RlK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gICAgIERhdGUucHJvdG90eXBlLnRvSlNPTiA9IGZ1bmN0aW9uIChrZXkpIHtcbiAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gZihuKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBGb3JtYXQgaW50ZWdlcnMgdG8gaGF2ZSBhdCBsZWFzdCB0d28gZGlnaXRzLlxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG4gPCAxMCA/ICcwJyArIG4gOiBuO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuZ2V0VVRDRnVsbFllYXIoKSAgICsgJy0nICtcbiAgICAgICAgICAgICAgICAgICAgICAgICBmKHRoaXMuZ2V0VVRDTW9udGgoKSArIDEpICsgJy0nICtcbiAgICAgICAgICAgICAgICAgICAgICAgICBmKHRoaXMuZ2V0VVRDRGF0ZSgpKSAgICAgICsgJ1QnICtcbiAgICAgICAgICAgICAgICAgICAgICAgICBmKHRoaXMuZ2V0VVRDSG91cnMoKSkgICAgICsgJzonICtcbiAgICAgICAgICAgICAgICAgICAgICAgICBmKHRoaXMuZ2V0VVRDTWludXRlcygpKSAgICsgJzonICtcbiAgICAgICAgICAgICAgICAgICAgICAgICBmKHRoaXMuZ2V0VVRDU2Vjb25kcygpKSAgICsgJ1onO1xuICAgICAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIFlvdSBjYW4gcHJvdmlkZSBhbiBvcHRpb25hbCByZXBsYWNlciBtZXRob2QuIEl0IHdpbGwgYmUgcGFzc2VkIHRoZVxuICAgICAgICAgICAga2V5IGFuZCB2YWx1ZSBvZiBlYWNoIG1lbWJlciwgd2l0aCB0aGlzIGJvdW5kIHRvIHRoZSBjb250YWluaW5nXG4gICAgICAgICAgICBvYmplY3QuIFRoZSB2YWx1ZSB0aGF0IGlzIHJldHVybmVkIGZyb20geW91ciBtZXRob2Qgd2lsbCBiZVxuICAgICAgICAgICAgc2VyaWFsa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AgICAgICAgIHZhbHVlIHRoYXQgaXMgZmlsbGVkIHdpdGggbGluZSBicmVha3MgYW5kIGluZGVudGF0aW9uIHRvIG1ha2UgaXRcbiAgICAgICAgICAgIGVhc2llciB0byByZWFkLlxuXG4gICAgICAgICAgICBJZiB0aGUgc3BhY2UgcGFyYW1ldGVyIGlzIGEgbm9uLWVtcHR5IHN0cmluZywgdGhlbiB0aGF0IHN0cmluZyB3aWxsXG4gICAgICAgICAgICBiZSB1c2VkIGZvciBpbmRlbnRhdGlvbi4gSWYgdGhlIHNwYWNlIHBhcmFtZXRlciBpcyBhIG51bWJlciwgdGhlblxuICAgICAgICAgICAgdGhlIGluZGVudGF0aW9uIHdpbGwgYmUgdGhhdCBtYW55IHNwYWNlcy5cblxuICAgICAgICAgICAgRXhhbXBsZTpcblxuICAgICAgICAgICAgdGV4dCA9IEpTT04uc3RyaW5naWZ5KFsnZScsIHtwbHVyaWJ1czogJ3VudW0nfV0pO1xuICAgICAgICAgICAgLy8gdGV4dCBpcyAnW1wiZVwiLHtcInBsdXJpYnVzXCI6XCJ1bnVtXCJ9XSdcblxuXG4gICAgICAgICAgICB0ZXh0ID0gSlNPTi5zdHJpbmdpZnkoWydlJywge3BsdXJpYnVzOiAndW51bSd9XSwgbnVsbCwgJ1xcdCcpO1xuICAgICAgICAgICAgLy8gdGV4dCBpcyAnW1xcblxcdFwiZVwiLFxcblxcdHtcXG5cXHRcXHRcInBsdXJpYnVzXCI6IFwidW51bVwiXFxuXFx0fVxcbl0nXG5cbiAgICAgICAgICAgIHRleHQgPSBKU09OLnN0cmluZ2lmeShbbmV3IERhdGUoKV0sIGZ1bmN0aW9uIChrZXksIHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXNba2V5XSBpbnN0YW5jZW9mIERhdGUgP1xuICAgICAgICAgICAgICAgICAgICAnRGF0ZSgnICsgdGhpc1trZXldICsgJyknIDogdmFsdWU7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICA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yIGE7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiB2YWx1ZSA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgICAgICAgICAgYSA9XG4vXihcXGR7NH0pLShcXGR7Mn0pLShcXGR7Mn0pVChcXGR7Mn0pOihcXGR7Mn0pOihcXGR7Mn0oPzpcXC5cXGQqKT8pWiQvLmV4ZWModmFsdWUpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoYSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBEYXRlKERhdGUuVVRDKCthWzFdLCArYVsyXSAtIDEsICthWzNdLCArYVs0XSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICArYVs1XSwgK2FbNl0pKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gdmFsdWU7XG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgbXlEYXRhID0gSlNPTi5wYXJzZSgnW1wiRGF0ZSgwOS8wOS8yMDAxKVwiXScsIGZ1bmN0aW9uIChrZXksIHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgdmFyIGQ7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiB2YWx1ZSA9PT0gJ3N0cmluZycgJiZcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlLnNsaWNlKDAsIDUpID09PSAnRGF0ZSgnICYmXG4gICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZS5zbGljZSgtMSkgPT09ICcpJykge1xuICAgICAgICAgICAgICAgICAgICBkID0gbmV3IERhdGUodmFsdWUuc2xpY2UoNSwgLTEpKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBkO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiB2YWx1ZTtcbiAg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cwJyArIG4gOiBuO1xuICAgIH1cblxuICAgIGlmICh0eXBlb2YgRGF0ZS5wcm90b3R5cGUudG9KU09OICE9PSAnZnVuY3Rpb24nKSB7XG5cbiAgICAgICAgRGF0ZS5wcm90b3R5cGUudG9KU09OID0gZnVuY3Rpb24gKGtleSkge1xuXG4gICAgICAgICAgICByZXR1cm4gaXNGaW5pdGUodGhpcy52YWx1ZU9mKCkpXG4gICAgICAgICAgICAgICAgPyB0aGlzLmdldFVUQ0Z1bGxZZWFyKCkgICAgICsgJy0nICtcbiAgICAgICAgICAgICAgICAgICAgZih0aGlzLmdldFVUQ01vbnRoKCkgKyAxKSArICctJyArXG4gICAgICAgICAgICAgICAgICAgIGYodGhpcy5nZXRVVENEYXRlKCkpICAgICAgKyAnVCcgK1xuICAgICAgICAgICAgICAgICAgICBmKHRoaXMuZ2V0VVRDSG91cnMoKSkgICAgICsgJzonICtcbiAgICAgICAgICAgICAgICAgICAgZih0aGlzLmdldFVUQ01pbnV0ZXMoKSkgICArICc6JyArXG4gICAgICAgICAgICAgICAgICAgIGYodGhpcy5nZXRVVENTZWNvbmRzKCkpICAgKyAnWidcbiAgICAgICAgICAgICAgICA6IG51bGw7XG4gICAgICAgIH07XG5cbiAgICAgICAgU3RyaW5nLnByb3RvdHlwZS50b0pTT04gICAgICA9XG4gICAgICAgICAgICBOdW1iZXIucHJvdG90eXBlLnRvSlNPTiAgPVxuICAgICAgICAgICAgQm9vbGVhbi5wcm90b3R5cGUudG9KU09OID0gZnVuY3Rpb24gKGtleSkge1xuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLnZhbHVlT2YoKTtcbiAgICAgICAgICAgIH07XG4gICAgfVxuXG4gICAgdmFyIGN4ID0gL1tcXHUwMDAwXFx1MDBhZFxcdTA2MDAtXFx1MDYwNFxcdTA3MGZcXHUxN2I0XFx1MTdiNVxcdTIwMGMtXFx1MjAwZlxcdTIwMjgtXFx1MjAyZlxcdTIwNjAtXFx1MjA2ZlxcdWZlZmZc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A9IDA7XG4gICAgICAgIHJldHVybiBlc2NhcGFibGUudGVzdChzdHJpbmcpID8gJ1wiJyArIHN0cmluZy5yZXBsYWNlKGVzY2FwYWJsZSwgZnVuY3Rpb24gKGEpIHtcbiAgICAgICAgICAgIHZhciBjID0gbWV0YVthXTtcbiAgICAgICAgICAgIHJldHVybiB0eXBlb2YgYyA9PT0gJ3N0cmluZydcbiAgICAgICAgICAgICAgICA/IGNcbiAgICAgICAgICAgICAgICA6ICdcXFxcdScgKyAoJzAwMDAnICsgYS5jaGFyQ29kZUF0KDApLnRvU3RyaW5nKDE2KSkuc2xpY2UoLTQpO1xuICAgICAgICB9KSArICdcIicgOiAnXCInICsgc3RyaW5nICsgJ1wiJztcbiAgICB9XG5cblxuICAgIGZ1bmN0aW9uIHN0cihrZXksIGhvbGRlcikge1xuXG4vLyBQcm9kdWNlIGEgc3RyaW5nIGZyb20gaG9sZGVyW2tleV0uXG5cbiAgICAgICAgdmFyIGksICAgICAgICAgIC8vIFRoZSBsb29wIGNvdW50ZXIuXG4gICAgICAgICAgICBrLCAgICAgICAgICAvLyBUaGUgbWVtYmVyIGtleS5cbiAgICAgICAgICAgIHYsICAgICAgICAgIC8vIFRoZSBtZW1iZXIgdmFsdWUuXG4gICAgICAgICAgICBsZW5ndGgsXG4gICAgICAgICAgICBtaW5kID0gZ2FwLFxuICAgICAgICAgICAgcGFydGlhbCxcbiAgICAgICAgICAgIHZhbHVlID0gaG9sZGVyW2tleV07XG5cbi8vIElmIHRoZSB2YWx1ZSBoYXMgYSB0b0pTT04gbWV0aG9kLCBjYWxsIGl0IHRvIG9idGFpbiBhIHJlcGxhY2VtZW50IHZhbHVlLlxuXG4gICAgICAgIGlmICh2YWx1ZSAmJiB0eXBlb2YgdmFsdWUgPT09ICdvYmplY3QnICYmXG4gICAgICAgICAgICAgICAgdHlwZW9mIHZhbHVlLnRvSlNPTiA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICAgICAgdmFsdWUgPSB2YWx1Z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ICAgICB9XG5cbi8vIEpvaW4gYWxsIG9mIHRoZSBlbGVtZW50cyB0b2dldGhlciwgc2VwYXJhdGVkIHdpdGggY29tbWFzLCBhbmQgd3JhcCB0aGVtIGluXG4vLyBicmFja2V0cy5cblxuICAgICAgICAgICAgICAgIHYgPSBwYXJ0aWFsLmxlbmd0aCA9PT0gMFxuICAgICAgICAgICAgICAgICAgICA/ICdbXSdcbiAgICAgICAgICAgICAgICAgICAgOiBnYXBcbiAgICAgICAgICAgICAgICAgICAgPyAnW1xcbicgKyBnYXAgKyBwYXJ0aWFsLmpvaW4oJyxcXG4nICsgZ2FwKSArICdcXG4nICsgbWluZCArICddJ1xuICAgICAgICAgICAgICAgICAgICA6ICdbJyArIHBhcnRpYWwuam9pbignLCcpICsgJ10nO1xuICAgICAgICAgICAgICAgIGdhcCA9IG1pbmQ7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHY7XG4gICAgICAgICAgICB9XG5cbi8vIElmIHRoZSByZXBsYWNlciBpcyBhbiBhcnJheSwgdXNlIGl0IHRvIHNlbGVjdCB0aGUgbWVtYmVycyB0byBiZSBzdHJpbmdpZmllZC5cblxuICAgICAgICAgICAgaWYgKHJlcCAmJiB0eXBlb2YgcmVwID09PSAnb2JqZWN0Jykge1xuICAgICAgICAgICAgICAgIGxlbmd0aCA9IHJlcC5sZW5ndGg7XG4gICAgICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IGxlbmd0aDsgaSArPSAxKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgcmVwW2ldID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgayA9IHJlcFtpXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHYgPSBzdHIoaywgdmFsdWUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJ0aWFsLnB1c2gocXVvdGUoaykgKyAoZ2FwID8gJzogJyA6ICc6JykgKyB2KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG5cbi8vIE90aGVyd2lzZSwgaXRlcmF0ZSB0aHJvdWdoIGFsbCBvZiB0aGUga2V5cyBpbiB0aGUgb2JqZWN0LlxuXG4gICAgICAgICAgICAgICAgZm9yIChrIGluIHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwodmFsdWUsIGspKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2ID0gc3RyKGssIHZhbHVlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFydGlhbC5wdXNoKHF1b3RlKGspICsgKGdhcCA/ICc6ICcgOiAnOicpICsgdik7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbi8vIEpvaW4gYWxsIG9mIHRoZSBtZW1iZXIgdGV4dHMgdG9nZXRoZXIsIHNlcGFyYXRlZCB3aXRoIGNvbW1hcyxcbi8vIGFuZCB3cmFwIHRoZW0gaW4gYnJhY2VzLlxuXG4gICAgICAgICAgICB2ID0gcGFydGlhbC5sZW5ndGggPT09IDBcbiAgICAgICAgICAgICAgICA/ICd7fSdcbiAgICAgICAgICAgICAgICA6IGdhcFxuICAgICAgICAgICAgICAgID8gJ3tcXG4nICsgZ2FwICsgcGFydGlhbC5qb2luKCcsXFxuJyArIGdhcCkgKyAnXFxuJyArIG1pbmQgKyAnfSdcbiAgICAgICAgICAgICAgICA6ICd7JyArIHBhcnRpYWwuam9pbignLCcpICsgJ30nO1xuICAgICAgICAgICAgZ2FwID0gbWluZDtcbiAgICAgICAgICAgIHJldHV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rXSA9IHY7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVsZXRlIHZhbHVlW2tdO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gcmV2aXZlci5jYWxsKGhvbGRlciwga2V5LCB2YWx1ZSk7XG4gICAgICAgICAgICB9XG5cblxuLy8gUGFyc2luZyBoYXBwZW5zIGluIGZvdXIgc3RhZ2VzLiBJbiB0aGUgZmlyc3Qgc3RhZ2UsIHdlIHJlcGxhY2UgY2VydGFpblxuLy8gVW5pY29kZSBjaGFyYWN0ZXJzIHdpdGggZXNjYXBlIHNlcXVlbmNlcy4gSmF2YVNjcmlwdCBoYW5kbGVzIG1hbnkgY2hhcmFjdGVyc1xuLy8gaW5jb3JyZWN0bHksIGVpdGhlciBzaWxlbnRseSBkZWxldGluZyB0aGVtLCBvciB0cmVhdGluZyB0aGVtIGFzIGxpbmUgZW5kaW5ncy5cblxuICAgICAgICAgICAgdGV4dCA9IFN0cmluZyh0ZXh0KTtcbiAgICAgICAgICAgIGN4Lmxhc3RJbmRleCA9IDA7XG4gICAgICAgICAgICBpZiAoY3gudGVzdCh0ZXh0KSkge1xuICAgICAgICAgICAgICAgIHRleHQgPSB0ZXh0LnJlcGxhY2UoY3gsIGZ1bmN0aW9uIChhKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnXFxcXHUnICtcbiAgICAgICAgICAgICAgICAgICAgICAgICgnMDAwMCcgKyBhLmNoYXJDb2RlQXQoMCkudG9TdHJpbmcoMTYpKS5zbGljZSgtNCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG5cbi8vIEluIHRoZSBzZWNvbmQgc3RhZ2UsIHdlIHJ1biB0a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FtrZXldID0gdmFsO1xuICAgIH0gZWxzZSBpZiAoJ3VuZGVmaW5lZCcgPT0gdHlwZW9mIHBhcmVudFtrZXldKSB7XG4gICAgICBwYXJlbnRba2V5XSA9IHZhbDtcbiAgICB9IGVsc2Uge1xuICAgICAgcGFyZW50W2tleV0gPSBbcGFyZW50W2tleV0sIHZhbF07XG4gICAgfVxuICAgIC8vIGFycmF5XG4gIH0gZWxzZSB7XG4gICAgdmFyIG9iaiA9IHBhcmVudFtrZXldID0gcGFyZW50W2tleV0gfHwgW107XG4gICAgaWYgKCddJyA9PSBwYXJ0KSB7XG4gICAgICBpZiAoaXNBcnJheShvYmopKSB7XG4gICAgICAgIGlmICgnJyAhPSB2YWwpIG9iai5wdXNoKHZhbCk7XG4gICAgICB9IGVsc2UgaWYgKCdvYmplY3QnID09IHR5cGVvZiBvYmopIHtcbiAgICAgICAgb2JqW29iamVjdEtleXMob2JqKS5sZW5ndGhdID0gdmFsO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgb2JqID0gcGFyZW50W2tleV0gPSBbcGFyZW50W2tleV0sIHZhbF07XG4gICAgICB9XG4gICAgICAvLyBwcm9wXG4gICAgfSBlbHNlIGlmICh+aW5kZXhPZihwYXJ0LCAnXScpKSB7XG4gICAgICBwYXJ0ID0gcGFydC5zdWJzdHIoMCwgcGFydC5sZW5ndGggLSAxKTtcbiAgICAgIGlmICghaXNpbnQudGVzdChwYXJ0KSAmJiBpc0FycmF5KG9iaikpIG9iaiA9IHByb21vdGUocGFyZW50LCBrZXkpO1xuICAgICAgcGFyc2UocGFydHMsIG9iaiwgcGFydCwgdmFsKTtcbiAgICAgIC8vIGtleVxuICAgIH0gZWxzZSB7XG4gICAgICBpZiAoIWlzaW50LnRlc3QocGFydCkgJiYgaXNBcnJheShvYmopKSBvYmogPSBwcm9tb3RlKHBhcmVudCwga2V5KTtcbiAgICAgIHBhcnNlKHBhcnRzLCBvYmosIHBhcnQsIHZhbCk7XG4gICAgfVxuICB9XG59X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AgICAgICAgICAgICwgJ2pzb24nOiAnYXBwbGljYXRpb24vanNvbiwgdGV4dC9qYXZhc2NyaXB0J1xuICAgICAgICAgICAgLCAnanMnOiAgICdhcHBsaWNhdGlvbi9qYXZhc2NyaXB0LCB0ZXh0L2phdmFzY3JpcHQnXG4gICAgICAgICAgfVxuICAgICAgfVxuXG4gICAgLCB4aHIgPSBmdW5jdGlvbihvKSB7XG4gICAgICAgIC8vIGlzIGl0IHgtZG9tYWluXG4gICAgICAgIGlmIChvWydjcm9zc09yaWdpbiddID09PSB0cnVlKSB7XG4gICAgICAgICAgdmFyIHhociA9IHdpblt4bWxIdHRwUmVxdWVzdF0gPyBuZXcgWE1MSHR0cFJlcXVlc3QoKSA6IG51bGxcbiAgICAgICAgICBpZiAoeGhyICYmICd3aXRoQ3JlZGVudGlhbHMnIGluIHhocikge1xuICAgICAgICAgICAgcmV0dXJuIHhoclxuICAgICAgICAgIH0gZWxzZSBpZiAod2luW3hEb21haW5SZXF1ZXN0XSkge1xuICAgICAgICAgICAgcmV0dXJuIG5ldyBYRG9tYWluUmVxdWVzdCgpXG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignQnJvd3NlciBkb2VzIG5vdCBzdXBwb3J0IGNyb3NzLW9yaWdpbiByZXF1ZXN0cycpXG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKHdpblt4bWxIdHRwUmVxdWVzdF0pIHtcbiAgICAgICAgICByZXR1cm4gbmV3IFhNTEh0dHBSZXF1ZXN0KClcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICByZXR1cm4gbmV3IEFjdGl2ZVhPYmplY3QoJ01pY3Jvc29mdC5YTUxIVFRQJylcbiAgICAgICAgfVxuICAgICAgfVxuICAgICwgZ2xvYmFsU2V0dXBPcHRpb25zID0ge1xuICAgICAgICBkYXRhRmlsdGVyOiBmdW5jdGlvbiAoZGF0YSkge1xuICAgICAgICAgIHJldHVybiBk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cbiAgICAgICAgICByZXNwID0gZXZhbChyKVxuICAgICAgICAgIGJyZWFrXG4gICAgICAgIGNhc2UgJ2h0bWwnOlxuICAgICAgICAgIHJlc3AgPSByXG4gICAgICAgICAgYnJlYWtcbiAgICAgICAgY2FzZSAneG1sJzpcbiAgICAgICAgICByZXNwID0gcmVzcC5yZXNwb25zZVhNTFxuICAgICAgICAgICAgICAmJiByZXNwLnJlc3BvbnNlWE1MLnBhcnNlRXJyb3IgLy8gSUUgdHJvbG9sb1xuICAgICAgICAgICAgICAmJiByZXNwLnJlc3BvbnNlWE1MLnBhcnNlRXJyb3IuZXJyb3JDb2RlXG4gICAgICAgICAgICAgICYmIHJlc3AucmVzcG9uc2VYTUwucGFyc2VFcnJvci5yZWFzb25cbiAgICAgICAgICAgID8gbnVsbFxuICAgICAgICAgICAgOiByZXNwLnJlc3BvbnNlWE1MXG4gICAgICAgICAgYnJlYWtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBzZWxmLl9yZXNwb25zZUFyZ3MucmVzcCA9IHJlc3BcbiAgICAgIHNlbGYuX2Z1bGZpbGxlZCA9IHRydWVcbiAgICAgIGZuKHJlc3ApXG4gICAgICBzZWxmLl9zdWNjZXNzSGFuZGxlcihyZXNwKVxuICAgICAgd2hpbGUgKHNlbGYuX2Z1bGZpbGxtZW50SGFuZGxlcnMubGVuZ3RoID4gMCkge1xuICAgICAgICByZXNwID0gc2VsZi5fZnVsZmlsbG1lbnRIYW5kbGVycy5zaGlmdCgpKHJlc3ApXG4gICAgICB9XG5cbiAgICAgIGNvbXBsZXRlKHJlc3ApXG4gICAgfVxuXG4gICAgZnVuY3Rpb24gdGltZWRPdXQoKSB7XG4gICAgICBzZWxmLl90aW1lZE91dCA9IHRydWVcbiAgICAgIHNlbGYucmVxdWVzdC5hYm9ydCgpICAgICAgXG4gICAgfVxuXG4gICAgZnVuY3Rpb24gZXJyb3IocmVzcCwgbXNnLCB0KSB7XG4gICAgICByZXNwID0gc2VsZi5yZX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ZXJ2YWwpO1xuICAgICAgICAgIHJlbW92ZUxpc3RlbmVyKHdpbmRvdywgJ21lc3NhZ2UnLCBvbk1lc3NhZ2UpO1xuICAgICAgICAgIHJlbW92ZUxpc3RlbmVyKHdpbmRvdywgJ3VubG9hZCcsIGNsZWFudXApO1xuICAgICAgICAgIGlmICh3KSB7XG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICB3LmNsb3NlKCk7XG4gICAgICAgICAgICB9IGNhdGNoIChzZWN1cml0eVZpb2xhdGlvbikge1xuICAgICAgICAgICAgICAvLyBUaGlzIGhhcHBlbnMgaW4gT3BlcmEgMTIgc29tZXRpbWVzXG4gICAgICAgICAgICAgIC8vIHNlZSBodHRwczovL2dpdGh1Yi5jb20vbW96aWxsYS9icm93c2VyaWQvaXNzdWVzLzE4NDRcbiAgICAgICAgICAgICAgbWVzc2FnZVRhcmdldC5wb3N0TWVzc2FnZShDTE9TRV9DTUQsIG9yaWdpbik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIHcgPSBtZXNzYWdlVGFyZ2V0ID0gdW5kZWZpbmVkO1xuICAgICAgICB9XG5cbiAgICAgICAgYWRkTGlzdGVuZXIod2luZG93LCAndW5sb2FkJywgY2xlYW51cCk7XG5cbiAgICAgICAgZnVuY3Rpb24gb25NZXNzYWdlKGUpIHtcbiAgICAgICAgICBpZiAoZS5vcmlnaW4gIT09IG9yaWdpbikgeyByZXR1cm47IH1cbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgdmFyIGQgPSBKU09OLnBhcnNlKGUuZGF0YSk7XG4gICAgICAgICAgICBpZiAoZC5hID09PSAncmVhZHknKSBtZXNzYWdlVGFyZ2V0LnBvc3RNZXNzYWdlKHJlcSwgb3JpZ2luKTtcbiAgICAgICAgICAgIGVsc2UgaWYgKGQuYSA9PT0gJ2Vycm9yJykge1xuICAgICAgICAgICAgICBjbGVhbnVwKCk7XG4gICAgICAgICAgICAgIGlmIChjYikge1xuICAgICAgICAgICAgICAgIGNiKGQuZCk7XG4gICAgICAgICAgICAgICAgY2IgPSBudWxsO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGQuYSA9PT0gJ3Jlc3BvbnNlJykge1xuICAgICAgICAgICAgICBjbGVhbnVwKCk7XG4gICAgICAgICAgICAgIGlmIChjYikge1xuICAgICAgICAgICAgICAgIGNiKG51bGwsIGQuZCk7XG4gICAgICAgICAgICAgICAgY2IgPSBudWxsO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSBjYXRjaChlcnIpIHsgfVxuICAgICAgICB9XG5cbiAgICAgICAgYWRkTGlzdGVuZXIod2luZG93LCAnbWVzc2FnZScsIG9uTWVzc2FnZSk7XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBjbG9zZTogY2xlYW51cCxcbiAgICAgICAgICBmb2N1czogZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICBpZiAodykge1xuICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgIHcuZm9jdXMoKTtcbiAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgIC8vIElFNyBibG93cyB1cCBoZXJlLCBkbyBub3RoaW5nXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgICB9LFxuICAgICAgb25PcGVuOiBmdW5jdGlvbihjYikge1xuICAgICAgICB2YXIgbyA9IFwiKlwiO1xuICAgICAgICB2YXIgbXNnVGFyZ2V0ID0gaXNJRSA/IGZpbmRSZWxheSgpIDogd2luZG93Lm9wZW5lcjtcbiAgICAgICAgaWYgKCFtc2dUYXJnZXQpIHRocm93IFwiY2FuJ3QgZmluZCByZWxheSBmcmFtZVwiO1xuICAgICAgICBmdW5jdGlvbiBkb1Bvc3QobXNnKSB7XG4gICAgICAgICAgbXNnID0gSlNPTi5zdHJpbmdpZn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ICAgICAgICAgYWRkTGlzdGVuZXIobXNnVGFyZ2V0LCAnbG9hZCcsIGZ1bmN0aW9uKGUpIHtcbiAgICAgICAgICAgIGRvUG9zdCh7YTogXCJyZWFkeVwifSk7XG4gICAgICAgICAgfSk7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBpZiB3aW5kb3cgaXMgdW5sb2FkZWQgYW5kIHRoZSBjbGllbnQgaGFzbid0IGNhbGxlZCBjYiwgaXQncyBhbiBlcnJvclxuICAgICAgICB2YXIgb25VbmxvYWQgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgLy8gSUU4IGRvZXNuJ3QgbGlrZSB0aGlzLi4uXG4gICAgICAgICAgICByZW1vdmVMaXN0ZW5lcihpc0lFID8gbXNnVGFyZ2V0IDogd2luZG93LCAnbWVzc2FnZScsIG9uRGllKTtcbiAgICAgICAgICB9IGNhdGNoIChvaFdlbGwpIHsgfVxuICAgICAgICAgIGlmIChjYikgZG9Qb3N0KHsgYTogJ2Vycm9yJywgZDogJ2NsaWVudCBjbG9zZWQgd2luZG93JyB9KTtcbiAgICAgICAgICBjYiA9IHVuZGVmaW5lZDtcbiAgICAgICAgICAvLyBleHBsaWNpdGx5IGNsb3NlIHRoZSB3aW5kb3csIGluIGNhc2UgdGhlIGNsaWVudCBpcyB0cnlpbmcgdG8gcmVsb2FkIG9yIG5hdlxuICAgICAgICAgIHRyeSB7IHdpbmRvdy5jbG9zZSgpOyB9IGNhdGNoIChlKSB7IH1cbiAgICAgICAgfTtcbiAgICAgICAgYWRkTGlzdGVuZXIod2luZG93LCAndW5sb2FkJywgb25VbmxvYWQpO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGRldGFjaDogZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICByZW1vdmVMaXN0ZW5lcih3aW5kb3csICd1bmxvYWQnLCBvblVubG9hZCk7XG4gICAgICAgICAgfVxuICAgICAgICB9O1xuICAgICAgfVxuICAgIH07XG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Bzb21lIGRhdGEgKHJhdyBzdHJpbmdzKVxuICAgICovXG4gICAgZnVuY3Rpb24gcnN0cl9obWFjX21kNShrZXksIGRhdGEpIHtcbiAgICAgICAgdmFyIGksXG4gICAgICAgICAgICBia2V5ID0gcnN0cjJiaW5sKGtleSksXG4gICAgICAgICAgICBpcGFkID0gW10sXG4gICAgICAgICAgICBvcGFkID0gW10sXG4gICAgICAgICAgICBoYXNoO1xuICAgICAgICBpcGFkWzE1XSA9IG9wYWRbMTVdID0gdW5kZWZpbmVkO1xuICAgICAgICBpZiAoYmtleS5sZW5ndGggPiAxNikge1xuICAgICAgICAgICAgYmtleSA9IGJpbmxfbWQ1KGJrZXksIGtleS5sZW5ndGggKiA4KTtcbiAgICAgICAgfVxuICAgICAgICBmb3IgKGkgPSAwOyBpIDwgMTY7IGkgKz0gMSkge1xuICAgICAgICAgICAgaXBhZFtpXSA9IGJrZXlbaV0gXiAweDM2MzYzNjM2O1xuICAgICAgICAgICAgb3BhZFtpXSA9IGJrZXlbaV0gXiAweDVDNUM1QzVDO1xuICAgICAgICB9XG4gICAgICAgIGhhc2ggPSBiaW5sX21kNShpcGFkLmNvbmNhdChyc3RyMmJpbmwoZGF0YSkpLCA1MTIgKyBkYXRhLmxlbmd0aCAqIDgpO1xuICAgICAgICByZXR1cm4gYmlubDJyc3RyKGJpbmxfbWQ1KG9wYWQuY29uY2F0KGhhc2gpLCA1MTIgKyAxMjgpKTtcbiAgICB9XG5cbiAgICAvKlxuICAgICogQ29udmVydCBhIHJhdyBzdHJpbmcgdG8gYSBoZXggc3RyaW5nXG4gICAgKi9cbiAgICBmdW5jdGlvbiByc3RyMmhleChpbnB1dCkge1xuICAgICAgICB2YXIgaGV4X3RhYiA9ICcwMTIzNDU2Nzg5YWJjZGVmJyxcbiAgICAgICAgICAgIG91dHB1dCA9ICcnLFxuICAgICAgICAgICAgeCxcbiAgICAgICAgICAgIGk7XG4gICAgICAgIGZvciAoaSA9IDA7IGkgPCBpbnB1dC5sZW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lbWVudCgnbGluaycpO1xuXG4gICAgICAgIGxpbmsuaHJlZiA9IGhyZWY7XG4gICAgICAgIGxpbmsucmVsID0gJ3N0eWxlc2hlZXQnO1xuXG4gICAgICAgIGZvciAodmFyIGtleSBpbiBhdHRyaWJ1dGVzKSB7XG4gICAgICAgICAgICBpZiAoICEgYXR0cmlidXRlcy5oYXNPd25Qcm9wZXJ0eShrZXkpKSB7XG4gICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YXIgdmFsdWUgPSBhdHRyaWJ1dGVzW2tleV07XG4gICAgICAgICAgICBsaW5rLnNldEF0dHJpYnV0ZSgnZGF0YS0nICsga2V5LCB2YWx1ZSk7XG4gICAgICAgIH1cblxuICAgICAgICBoZWFkLmFwcGVuZENoaWxkKGxpbmspO1xuICAgIH0sXG4gICAgLy8gQ3JlYXRlIGEgPHN0eWxlPiB0YWcgd2l0aCBvcHRpb25hbCBkYXRhIGF0dHJpYnV0ZXNcbiAgICBjcmVhdGVTdHlsZTogZnVuY3Rpb24oY3NzVGV4dCwgYXR0cmlidXRlcykge1xuICAgICAgICB2YXIgaGVhZCA9IGRvY3VtZW50LmhlYWQgfHwgZG9jdW1lbnQuZ2V0RWxlbWVudHNCeVRhZ05hbWUoJ2hlYWQnKVswXSxcbiAgICAgICAgICAgIHN0eWxlID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnc3R5bGUnKTtcblxuICAgICAgICBzdHlsZS50eXBlID0gJ3RleHQvY3NzJztcblxuICAgICAgICBmb3IgKHZhciBrZXkgaW4gYXR0cmlidXRlcykge1xuICAgICAgICAgICAgaWYgKCAhIGF0dHJpYnV0ZXMuaGFzT3duUHJvcGVydHkoa2V5KSkge1xuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdmFyIHZhbHVlID0gYXR0cmlidXRlc1trZXldO1xuICAgICAgICAgICAgc3R5bGUuc2V0QXR0c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gICAgICAgaWYgKGlzKGtleSwgZW50cmllc1tpaV1bMF0pKSB7XG4gICAgICAgICAgcmV0dXJuIGVudHJpZXNbaWldWzFdO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICByZXR1cm4gbm90U2V0VmFsdWU7XG4gICAgfTtcblxuICAgIEFycmF5TWFwTm9kZS5wcm90b3R5cGUudXBkYXRlID0gZnVuY3Rpb24ob3duZXJJRCwgc2hpZnQsIGtleUhhc2gsIGtleSwgdmFsdWUsIGRpZENoYW5nZVNpemUsIGRpZEFsdGVyKSB7XG4gICAgICB2YXIgcmVtb3ZlZCA9IHZhbHVlID09PSBOT1RfU0VUO1xuXG4gICAgICB2YXIgZW50cmllcyA9IHRoaXMuZW50cmllcztcbiAgICAgIHZhciBpZHggPSAwO1xuICAgICAgZm9yICh2YXIgbGVuID0gZW50cmllcy5sZW5ndGg7IGlkeCA8IGxlbjsgaWR4KyspIHtcbiAgICAgICAgaWYgKGlzKGtleSwgZW50cmllc1tpZHhdWzBdKSkge1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICB2YXIgZXhpc3RzID0gaWR4IDwgbGVuO1xuXG4gICAgICBpZiAoZXhpc3RzID8gZW50cmllc1tpZHhdWzFdID09PSB2YWx1ZSA6IHJlbW92ZWQpIHtcbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICB9XG5cbiAgICAgIFNldFJlZihkaWRBbHRlcik7XG4gICAgICAocmVtb3ZlZCB8fCAhZXhpc3RzKSAmJiBTZXRSZWYoZGlkQ2hhbmdlU2l6ZSk7XG5cbiAgICAgIGlmIChyZW1vdmVkICYmIGVudHJpZXMubGVuZ3RoID09PSAxKSB7XG4gICAgICAgIHJldHVybjsgLy8gdW5kZWZpbmVkXG4gICAgICB9XG5cbiAgICAgIGlmICghZXhpc3RzICYmICFyZW1vdmVkICYmIGVudHJpZXMubGVuZ3RoID49IE1BWF9BUlJBWV9NQVBfU0laRSkge1xuICAgICAgICByZXR1cm4gY3JlYXRlTm9kZXMob3duZXJJRCwgZW50cmllcywga2V5LCB2YWx1ZSk7XG4gICAgICB9XG5cbiAgICAgIHZhciBpc0VkaXRhYmxlID0gb3duZXJJRCAmJiBvd25lcklEID09PSB0aGlzLm93bmVySUQ7XG4gICAgICB2YXIgbmV3RW50cmllcyA9IGlzRWRpdGFibGUgPyBlbnRyaWVzIDogYXJyQ29weShlbnRyaWVzKTtcblxuICAgICAgaWYgKGV4aXN0cykge1xuICAgICAgICBpZiAocmVtb3ZlZCkge1xuICAgICAgICAgIGlkeCA9PT0gbGVuIC0gMSA/IG5ld0VudHJpZXMucG9wKCkgOiAobmV3RW50cmllc1tpZHhdID0gbmV3RW50cmllcy5wb3AoKSk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgbmV3RW50cmllc1tpZHhdID0gW2tleSwgdmFsdWVdO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBuZXdFbnRyaWVzLnB1c2goW2tleSwgdmFsdWVdKTtcbiAgICAgIH1cblxuICAgICAgaWYgKGlzRWRpdGFibGUpIHtcbiAgICAgICAgdGhpcy5lbnRyaWVzID0gbmV3RW50cmllcztcbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBuZXcgQXJyYXlNYXBOb2RlKG93bmVySUQsIG5ld0VudHJpZXMpO1xuICAgIH07XG5cblxuXG5cbiAgICBmdW5jdGlvbiBCaXRtYXBJbmRleGVkTm9kZShvd25lcklELCBiaXRtYXAsIG5vZGVzKSB7XG4gICAgICB0aGlzLm93bmVySUQgPSBvd25lcklEO1xuICAgICAgdGhpcy5iaXRtYXAgPSBiaXRtYXA7XG4gICAgICB0aGlzLm5vZGVzID0gbm9kZXM7XG4gICAgfVxuXG4gICAgQml0bWFwSW5kZXhlZE5vZGUucHJvdG90eXBlLmdldCA9IGZ1bmN0aW9uKHNoaWZ0LCBrZXlIYXNoLCBrZXksIG5vdFNldF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F9BUlJBWV9NQVBfU0laRSkge1xuICAgICAgICAgIHJldHVybiBwYWNrTm9kZXMob3duZXJJRCwgbm9kZXMsIG5ld0NvdW50LCBpZHgpO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIHZhciBpc0VkaXRhYmxlID0gb3duZXJJRCAmJiBvd25lcklEID09PSB0aGlzLm93bmVySUQ7XG4gICAgICB2YXIgbmV3Tm9kZXMgPSBzZXRJbihub2RlcywgaWR4LCBuZXdOb2RlLCBpc0VkaXRhYmxlKTtcblxuICAgICAgaWYgKGlzRWRpdGFibGUpIHtcbiAgICAgICAgdGhpcy5jb3VudCA9IG5ld0NvdW50O1xuICAgICAgICB0aGlzLm5vZGVzID0gbmV3Tm9kZXM7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IEhhc2hBcnJheU1hcE5vZGUob3duZXJJRCwgbmV3Q291bnQsIG5ld05vZGVzKTtcbiAgICB9O1xuXG5cblxuXG4gICAgZnVuY3Rpb24gSGFzaENvbGxpc2lvbk5vZGUob3duZXJJRCwga2V5SGFzaCwgZW50cmllcykge1xuICAgICAgdGhpcy5vd25lcklEID0gb3duZXJJRDtcbiAgICAgIHRoaXMua2V5SGFzaCA9IGtleUhhc2g7XG4gICAgICB0aGlzLmVudHJpZXMgPSBlbnRyaWVzO1xuICAgIH1cblxuICAgIEhhc2hDb2xsaXNpb25Ob2RlLnByb3RvdHlwZS5nZXQgPSBmdW5jdGlvbihzaGlmdCwga2V5SGFzaCwga2V5LCBub3RTZXRWYWx1ZSkge1xuICAgICAgdmFyIGVudHJpZXMgPSB0aGlzLmVudHJpZXM7XG4gICAgICBmb3IgKHZhciBpaSA9IDAsIGxlbiA9IGVudHJpZXMubGVuZ3RoOyBpaSA8IGxlbjsgaWkrKykge1xuICAgICAgICBpZiAoaXMoa2V5LCBlbnRyaWVzW2lpXVswXSkpIHtcbiAgICAgICAgICByZXR1cm4gZW50cmllc1tpaV1bM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gICB9KTtcbiAgICB9O1xuXG4gICAgTGlzdC5wcm90b3R5cGUuX19pdGVyYXRlID0gZnVuY3Rpb24oZm4sIHJldmVyc2UpIHtcbiAgICAgIHZhciBpbmRleCA9IDA7XG4gICAgICB2YXIgdmFsdWVzID0gaXRlcmF0ZUxpc3QodGhpcywgcmV2ZXJzZSk7XG4gICAgICB2YXIgdmFsdWU7XG4gICAgICB3aGlsZSAoKHZhbHVlID0gdmFsdWVzKCkpICE9PSBET05FKSB7XG4gICAgICAgIGlmIChmbih2YWx1ZSwgaW5kZXgrKywgdGhpcykgPT09IGZhbHNlKSB7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIHJldHVybiBpbmRleDtcbiAgICB9O1xuXG4gICAgTGlzdC5wcm90b3R5cGUuX19lbnN1cmVPd25lciA9IGZ1bmN0aW9uKG93bmVySUQpIHtcbiAgICAgIGlmIChvd25lcklEID09PSB0aGlzLl9fb3duZXJJRCkge1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgIH1cbiAgICAgIGlmICghb3duZXJJRCkge1xuICAgICAgICB0aGlzLl9fb3duZXJJRCA9IG93bmVySUQ7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgfVxuICAgICAgcmV0dXJuIG1ha2VMaXN0KHRoaXMuX29yaWdpbiwgdGhpcy5fY2FwYWNpdHksIHRoaXMuX2xldmVsLCB0aGlzLl9yb290LCB0aGlzLl90YWlsLCBvd25lcklELCB0aGlzLl9faGFzaCk7XG4gICAgfTtcblxuXG4gIGZ1bmN0aW9uIGlzTGlzdChtYXliZUxpc3QpIHtcbiAgICByZXR1cm4gISEobWF5YmVMaXN0ICYmIG1heWJlTGlzdFtJU19MSVNUX1NFTlRJTkVMXSk7XG4gIH1cblxuICBMaXN0LmlzTGlzdCA9IGlzTGlzdDtcblxuICB2YXIgSVNfTElTVF9TRU5USU5FTCA9ICdAQF9fSU1NVVRBQkxFX0xJU1RfX0BAJztcbl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2l6ZSwgdGhpcy5faGVhZCwgb3duZXJJRCwgdGhpcy5fX2hhc2gpO1xuICAgIH07XG5cbiAgICAvLyBAcHJhZ21hIEl0ZXJhdGlvblxuXG4gICAgU3RhY2sucHJvdG90eXBlLl9faXRlcmF0ZSA9IGZ1bmN0aW9uKGZuLCByZXZlcnNlKSB7XG4gICAgICBpZiAocmV2ZXJzZSkge1xuICAgICAgICByZXR1cm4gdGhpcy5yZXZlcnNlKCkuX19pdGVyYXRlKGZuKTtcbiAgICAgIH1cbiAgICAgIHZhciBpdGVyYXRpb25zID0gMDtcbiAgICAgIHZhciBub2RlID0gdGhpcy5faGVhZDtcbiAgICAgIHdoaWxlIChub2RlKSB7XG4gICAgICAgIGlmIChmbihub2RlLnZhbHVlLCBpdGVyYXRpb25zKyssIHRoaXMpID09PSBmYWxzZSkge1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIG5vZGUgPSBub2RlLm5leHQ7XG4gICAgICB9XG4gICAgICByZXR1cm4gaXRlcmF0aW9ucztcbiAgICB9O1xuXG4gICAgU3RhY2sucHJvdG90eXBlLl9faXRlcmF0b3IgPSBmdW5jdGlvbih0eXBlLCByZXZlcnNlKSB7XG4gICAgICBpZiAocmV2ZXJzZSkge1xuICAgICAgICByZXR1cm4gdGhpcy5yZXZlcnNlKCkuX19pdGVyYXRvcih0eXBlKTtcbiAgICAgIH1cbiAgICAgIHZhciBpdGVyYXRpb25zID0gMDtcbiAgICAgIHZhciBub2RlID0gdGhpcy5faGVhZDtcbiAgICAgIHJldHVybiBuZXcgc3JjX0l0ZXJhdG9yX19JdGVyYXRvcihmdW5jdGlvbigpICB7XG4gICAgICAgIGlmIChub2RlKSB7XG4gICAgICAgICAgdmFyIHZhbHVlID0gbm9kZS52YWx1ZTtcbiAgICAgICAgICBub2RlID0gbm9kZS5uZXh0O1xuICAgICAgICAgIHJldHVybiBpdGVyYXRvclZhbHVlKHR5cGUsIGl0ZXJhdGlvbnMrKywgdmFsd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yKG93bmVySUQpO1xuICAgICAgaWYgKCFvd25lcklEKSB7XG4gICAgICAgIHRoaXMuX19vd25lcklEID0gb3duZXJJRDtcbiAgICAgICAgdGhpcy5fbWFwID0gbmV3TWFwO1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgIH1cbiAgICAgIHJldHVybiB0aGlzLl9fbWFrZShuZXdNYXAsIG93bmVySUQpO1xuICAgIH07XG5cblxuICBmdW5jdGlvbiBpc1NldChtYXliZVNldCkge1xuICAgIHJldHVybiAhIShtYXliZVNldCAmJiBtYXliZVNldFtJU19TRVRfU0VOVElORUxdKTtcbiAgfVxuXG4gIHNyY19TZXRfX1NldC5pc1NldCA9IGlzU2V0O1xuXG4gIHZhciBJU19TRVRfU0VOVElORUwgPSAnQEBfX0lNTVVUQUJMRV9TRVRfX0BAJztcblxuICB2YXIgU2V0UHJvdG90eXBlID0gc3JjX1NldF9fU2V0LnByb3RvdHlwZTtcbiAgU2V0UHJvdG90eXBlW0lTX1NFVF9TRU5USU5FTF0gPSB0cnVlO1xuICBTZXRQcm90b3R5cGVbREVMRVRFXSA9IFNldFByb3RvdHlwZS5yZW1vdmU7XG4gIFNldFByb3RvdHlwZS5tZXJnZURlZXAgPSBTZXRQcm90b3R5cGUubWVyZ2U7XG4gIFNldFByb3RvdHlwZS5tZXJnZURlZXBXaXRoID0gU2V0UHJvdG90eXBlLm1lcmdlV2l0aDtcbiAgU2V0UHJvdG90eXBlLndpdGhNdXRhdGlvbnMgPSBNYXBQcm90b3R5cGUud2l0aE11dGF0aW9ucztcbiAgU2V0UHJvdG90eXBlLmFzTXV0YWJsZSA9IE1hcFByb3RvdHlwZS5hc011dGFibGU7XG4gIFNldFByb3RvdHlwZS5hc0ltbXV0YWJsZSA9IE1hcFByb3RvdHlwZS5hc0ltbXV0YWJsZTtcblxuICBTZXRQcm90b3R5cGUuX19lbXB0eSA9IGVtcHR5U2V0O1xuICBTZXRQcm90b3R5cGUuX19tYWtlID0gbWFrZVNldDtcblxuIC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gICAgICAgICAgICBzdGFjayA9IGVycm9yLnN0YWNrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHN0YWNrLmluZGV4T2YoJ193cmFwT2JqZWN0JykgPT09IC0xKSB7XG4gICAgICAgICAgICAgIGNvbnNvbGUgJiYgY29uc29sZS53YXJuICYmIGNvbnNvbGUud2FybihcbiAgICAgICAgICAgICAgICAnaXRlcmFibGUubGVuZ3RoIGhhcyBiZWVuIGRlcHJlY2F0ZWQsICcrXG4gICAgICAgICAgICAgICAgJ3VzZSBpdGVyYWJsZS5zaXplIG9yIGl0ZXJhYmxlLmNvdW50KCkuICcrXG4gICAgICAgICAgICAgICAgJ1RoaXMgd2FybmluZyB3aWxsIGJlY29tZSBhIHNpbGVudCBlcnJvciBpbiBhIGZ1dHVyZSB2ZXJzaW9uLiAnICtcbiAgICAgICAgICAgICAgICBzdGFja1xuICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICByZXR1cm4gdGhpcy5zaXplO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfSBjYXRjaCAoZSkge31cbiAgfSkoKTtcblxuXG5cbiAgbWl4aW4oS2V5ZWRJdGVyYWJsZSwge1xuXG4gICAgLy8gIyMjIE1vcmUgc2VxdWVudGlhbCBtZXRob2RzXG5cbiAgICBmbGlwOiBmdW5jdGlvbigpIHtcbiAgICAgIHJldHVybiByZWlmeSh0aGlzLCBmbGlwRmFjdG9yeSh0aGlzKSk7XG4gICAgfSxcblxuICAgIGZpbmRLZXk6IGZ1bmN0aW9uKHByZWRpY2F0ZSwgY29udGV4dCkge1xuICAgICAgdmFyIGVudHJ5ID0gdGhpcy5maW5kRW50cnkocHJlZGljYXRlLCBjb250ZXh0KTtcbiAgICAgIHJldHVybiBlbnRyeSAmJiBlbnRyeVswXTtcbiAgICB9LFxuXG4gICAgZmluZExhc3RLZXk6IGZ1bmN0aW9uKHByZWRpY2F0ZSwgY29udGV4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tcG9uZW50OiBSZWFjdERPTVRleHRDb21wb25lbnRcbiAgfSk7XG59XG5cbmlmIChcInByb2R1Y3Rpb25cIiAhPT0gcHJvY2Vzcy5lbnYuTk9ERV9FTlYpIHtcbiAgdmFyIEV4ZWN1dGlvbkVudmlyb25tZW50ID0gcmVxdWlyZShcIi4vRXhlY3V0aW9uRW52aXJvbm1lbnRcIik7XG4gIGlmIChFeGVjdXRpb25FbnZpcm9ubWVudC5jYW5Vc2VET00gJiYgd2luZG93LnRvcCA9PT0gd2luZG93LnNlbGYpIHtcblxuICAgIC8vIElmIHdlJ3JlIGluIENocm9tZSwgbG9vayBmb3IgdGhlIGRldnRvb2xzIG1hcmtlciBhbmQgcHJvdmlkZSBhIGRvd25sb2FkXG4gICAgLy8gbGluayBpZiBub3QgaW5zdGFsbGVkLlxuICAgIGlmIChuYXZpZ2F0b3IudXNlckFnZW50LmluZGV4T2YoJ0Nocm9tZScpID4gLTEpIHtcbiAgICAgIGlmICh0eXBlb2YgX19SRUFDVF9ERVZUT09MU19HTE9CQUxfSE9PS19fID09PSAndW5kZWZpbmVkJykge1xuICAgICAgICBjb25zb2xlLmRlYnVnKFxuICAgICAgICAgICdEb3dubG9hZCB0aGUgUmVhY3QgRGV2VG9vbHMgZm9yIGEgYmV0dGVyIGRldmVsb3BtZW50IGV4cGVyaWVuY2U6ICcgK1xuICAgICAgICAgICdodHRwczovL2ZiLm1lL3JlYWN0LWRldnRvb2xzJ1xuICAgICAgICApO1xuICAgICAgfVxuICAgIH1cblxuICAgIHZhciBleHBlY3RlZEZlYXR1cmVzID0gW1xuICAgICAgLy8gc2hpbXNcbiAgICAgIEFycmF5LmlzQXJyYXksXG4gICAgICBBcnJheS5wcm90b3R5cGUuZXZlcnksXG4gICAgICBBcnJheS5wcm90b3R5cGUuZm9yRWFjaCxcbiAgICAgIEFycmF5LnByb3RvdHlwZS5pbmRleE9mLFxuICAgICAgQXJyYXkucHJvdG90eXBlLm1hcCxcbiAgICAgIERhdGUubm93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lzdGVuZXIgIHwgICAgLlxuICogKy0tLS0tLS0tLS0tLSsgICAgLiAgICAgICAgICAgICAgICAgICAgICAgICArLS0tLS0tLS0tLS0rXG4gKiAgICAgICB8ICAgICAgICAgICAuICAgICAgICAgICAgICAgKy0tLS0tLS0tK3xTaW1wbGVFdmVudHxcbiAqICAgICAgIHwgICAgICAgICAgIC4gICAgICAgICAgICAgICB8ICAgICAgICAgfFBsdWdpbiAgICAgfFxuICogKy0tLS0tfC0tLS0tLSsgICAgLiAgICAgICAgICAgICAgIHYgICAgICAgICArLS0tLS0tLS0tLS0rXG4gKiB8ICAgICB8ICAgICAgfCAgICAuICAgICstLS0tLS0tLS0tLS0tLSsgICAgICAgICAgICAgICAgICAgICstLS0tLS0tLS0tLS0rXG4gKiB8ICAgICArLS0tLS0tLS0tLS0uLS0tPnxFdmVudFBsdWdpbkh1YnwgICAgICAgICAgICAgICAgICAgIHwgICAgRXZlbnQgICB8XG4gKiB8ICAgICAgICAgICAgfCAgICAuICAgIHwgICAgICAgICAgICAgIHwgICAgICstLS0tLS0tLS0tLSsgIHwgUHJvcGFnYXRvcnN8XG4gKiB8IFJlYWN0RXZlbnQgfCAgICAuICAgIHwgICAgICAgICAgICAgIHwgICAgIHxUYXBFdmVudCAgIHwgIHwtLS0tLS0tLS0tLS18XG4gKiB8ICBFbWl0dGVyICAgfCAgICAuICAgIHwgICAgICAgICAgICAgIHw8LS0tK3xQbHVnaW4gICAgIHwgIHxvdGhlciBwbHVnaW58XG4gKiB8ICAgICAgICAgICAgfCAgICAuICAgIHwgICAgICAgICAgICAgIHwgICAgICstLS0tLS0tLS0tLSsgIHwgIHV0aWxpdGllcyB8XG4gKiB8ICAgICArLS0tLS0tLS0tLS0uLS0tPnwgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICstLS0tLS0tLS0tLS0rXG4gKiB8ICAgICB8ICAgICAgfCAgICAuICAgICstLS0tLS0tLS0tLS0tLStcbiAqICstLS0tLXwtLS0tLS0rICA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FjdEJyb3dzZXJFdmVudEVtaXR0ZXIuUmVhY3RFdmVudExpc3RlbmVyLnRyYXBCdWJibGVkRXZlbnQoXG4gICAgICAgICAgICAgIHRvcExldmVsVHlwZXMudG9wV2hlZWwsXG4gICAgICAgICAgICAgICdtb3VzZXdoZWVsJyxcbiAgICAgICAgICAgICAgbW91bnRBdFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgLy8gRmlyZWZveCBuZWVkcyB0byBjYXB0dXJlIGEgZGlmZmVyZW50IG1vdXNlIHNjcm9sbCBldmVudC5cbiAgICAgICAgICAgIC8vIEBzZWUgaHR0cDovL3d3dy5xdWlya3Ntb2RlLm9yZy9kb20vZXZlbnRzL3Rlc3RzL3Njcm9sbC5odG1sXG4gICAgICAgICAgICBSZWFjdEJyb3dzZXJFdmVudEVtaXR0ZXIuUmVhY3RFdmVudExpc3RlbmVyLnRyYXBCdWJibGVkRXZlbnQoXG4gICAgICAgICAgICAgIHRvcExldmVsVHlwZXMudG9wV2hlZWwsXG4gICAgICAgICAgICAgICdET01Nb3VzZVNjcm9sbCcsXG4gICAgICAgICAgICAgIG1vdW50QXRcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKGRlcGVuZGVuY3kgPT09IHRvcExldmVsVHlwZXMudG9wU2Nyb2xsKSB7XG5cbiAgICAgICAgICBpZiAoaXNFdmVudFN1cHBvcnRlZCgnc2Nyb2xsJywgdHJ1ZSkpIHtcbiAgICAgICAgICAgIFJlYWN0QnJvd3NlckV2ZW50RW1pdHRlci5SZWFjdEV2ZW50TGlzdGVuZXIudHJhcENhcHR1cmVkRXZlbnQoXG4gICAgICAgICAgICAgIHRvcExldmVsVHlwZXMudG9wU2Nyb2xsLFxuICAgICAgICAgICAgICAnc2Nyb2xsJyxcbiAgICAgICAgICAgICAgbW91bnRBdFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9IGVsc2Uge1xu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ICdvYmplY3QnLFxuICAgICAgICAnJXMuZ2V0Q2hpbGRDb250ZXh0KCk6IGNoaWxkQ29udGV4dFR5cGVzIG11c3QgYmUgZGVmaW5lZCBpbiBvcmRlciB0byAnICtcbiAgICAgICAgJ3VzZSBnZXRDaGlsZENvbnRleHQoKS4nLFxuICAgICAgICB0aGlzLmdldE5hbWUoKSB8fCAnUmVhY3RDb21wb3NpdGVDb21wb25lbnQnXG4gICAgICApIDogaW52YXJpYW50KHR5cGVvZiBpbnN0LmNvbnN0cnVjdG9yLmNoaWxkQ29udGV4dFR5cGVzID09PSAnb2JqZWN0JykpO1xuICAgICAgaWYgKFwicHJvZHVjdGlvblwiICE9PSBwcm9jZXNzLmVudi5OT0RFX0VOVikge1xuICAgICAgICB0aGlzLl9jaGVja1Byb3BUeXBlcyhcbiAgICAgICAgICBpbnN0LmNvbnN0cnVjdG9yLmNoaWxkQ29udGV4dFR5cGVzLFxuICAgICAgICAgIGNoaWxkQ29udGV4dCxcbiAgICAgICAgICBSZWFjdFByb3BUeXBlTG9jYXRpb25zLmNoaWxkQ29udGV4dFxuICAgICAgICApO1xuICAgICAgfVxuICAgICAgZm9yICh2YXIgbmFtZSBpbiBjaGlsZENvbnRleHQpIHtcbiAgICAgICAgKFwicHJvZHVjdGlvblwiICE9PSBwcm9jZXNzLmVudi5OT0RFX0VOViA/IGludmFyaWFudChcbiAgICAgICAgICBuYW1lIGluIGluc3QuY29uc3RydWN0b3IuY2hpbGRDb250ZXh0VHlwZXMsXG4gICAgICAgICAgJyVzLmdldENoaWxkQ29udGV4dCgpOiBrZXkgXCIlc1wiIGlzIG5vdCBkZWZpbmVkIGluIGNoaWxkQ29udGV4dFR5cGVzLicsXG4gICAgICAgICAgdGhpcy5nZXROYW1lKCkgfHwgJ1JlYWN0Q29tcG9zaXRlQ29tcG9uZW50JyxcbiAgICAgICAgICBuYW1lXG4gICAgICAgICkgOiBpbnZhcmlhbnQobmFtZSBpbiBpbnN0LmNvbnN0cnVjdG9yL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FjdG9yaW5nIGluIHRoZSBmdXR1cmVcbiAgICAgICAgICB2YXIgYWRkZW5kdW0gPSBnZXREZWNsYXJhdGlvbkVycm9yQWRkZW5kdW0odGhpcyk7XG5cbiAgICAgICAgICBpZiAobG9jYXRpb24gPT09IFJlYWN0UHJvcFR5cGVMb2NhdGlvbnMucHJvcCkge1xuICAgICAgICAgICAgLy8gUHJlZmFjZSBnaXZlcyB1cyBzb21ldGhpbmcgdG8gYmxhY2tsaXN0IGluIHdhcm5pbmcgbW9kdWxlXG4gICAgICAgICAgICAoXCJwcm9kdWN0aW9uXCIgIT09IHByb2Nlc3MuZW52Lk5PREVfRU5WID8gd2FybmluZyhcbiAgICAgICAgICAgICAgZmFsc2UsXG4gICAgICAgICAgICAgICdGYWlsZWQgQ29tcG9zaXRlIHByb3BUeXBlOiAlcyVzJyxcbiAgICAgICAgICAgICAgZXJyb3IubWVzc2FnZSxcbiAgICAgICAgICAgICAgYWRkZW5kdW1cbiAgICAgICAgICAgICkgOiBudWxsKTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgKFwicHJvZHVjdGlvblwiICE9PSBwcm9jZXNzLmVudi5OT0RFX0VOViA/IHdhcm5pbmcoXG4gICAgICAgICAgICAgIGZhbHNlLFxuICAgICAgICAgICAgICAnRmFpbGVkIENvbnRleHQgVHlwZXM6ICVzJXMnLFxuICAgICAgICAgICAgICBlcnJvci5tZXNzYWdlLFxuICAgICAgICAgICAgICBhZGRlbmR1bVxuICAgICAgICAgICAgKSA6IG51bGwpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgfSxcblxuICByZWNlaXZlQ29tcG9uZW50OiBmdW5jdGlvbihuZXh0RWxlbWVudCwgdHJhbnNhY3Rpb24sIG5leHRDb250ZXh0KSB7XG4gICAgdmFyIHByZXZFbGVtZW50ID0gdGhpcy5fY3VycmVudEVsZW1lbnQ7XG4gICAgdmFyIHByZXZDb250ZXh0ID0gdGhpcy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xuICAgICAgICAgIHByb3BLZXlcbiAgICAgICAgKTtcbiAgICAgIH1cbiAgICB9XG4gICAgZm9yIChwcm9wS2V5IGluIG5leHRQcm9wcykge1xuICAgICAgdmFyIG5leHRQcm9wID0gbmV4dFByb3BzW3Byb3BLZXldO1xuICAgICAgdmFyIGxhc3RQcm9wID0gcHJvcEtleSA9PT0gU1RZTEUgP1xuICAgICAgICB0aGlzLl9wcmV2aW91c1N0eWxlQ29weSA6XG4gICAgICAgIGxhc3RQcm9wc1twcm9wS2V5XTtcbiAgICAgIGlmICghbmV4dFByb3BzLmhhc093blByb3BlcnR5KHByb3BLZXkpIHx8IG5leHRQcm9wID09PSBsYXN0UHJvcCkge1xuICAgICAgICBjb250aW51ZTtcbiAgICAgIH1cbiAgICAgIGlmIChwcm9wS2V5ID09PSBTVFlMRSkge1xuICAgICAgICBpZiAobmV4dFByb3ApIHtcbiAgICAgICAgICBuZXh0UHJvcCA9IHRoaXMuX3ByZXZpb3VzU3R5bGVDb3B5ID0gYXNzaWduKHt9LCBuZXh0UHJvcCk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgdGhpcy5fcHJldmlvdXNTdHlsZUNvcHkgPSBudWxsO1xuICAgICAgICB9XG4gICAgICAgIGlmIChsYXN0UHJvcCkge1xuICAgICAgICAgIC8vIFVuc2V0IHN0eWxlcyBvbiBgbGFzdFByb3BgIGJ1dCBub3Qgb24gYG5leHRQcm9wYC5cbiAgICAgICAgICBmb3IgKHN0eWxlTmFtZSBpbiBsYXN0UHJvcCkge1xuICAgICAgICAgICAgaWYgKGxhc3RQcm9wLmhhc093blByb3BlcnR5KHN0eWxlTmFtZSkgJiZcbiAgICAgICAgICAgICAgICAoIW5leHRQcm9wIHx8ICFuZXh0UHJvcC5oYXNPd25Qcm9wZXJ0eShzdHlsZU5hbWUpKSkge1xuICAgICAgICAgICAgICBzdHlsZVVwZGF0ZXMgPSBzdHlsZVVwZGF0ZXMgfHwge307XG4gICAgICAgICAgICAgIH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zLnRvSW5kZXggPSB1cGRhdGUudG9JbmRleDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICh1cGRhdGUudGV4dENvbnRlbnQgIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgd3JpdGVBcmdzLnRleHRDb250ZW50ID0gdXBkYXRlLnRleHRDb250ZW50O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHVwZGF0ZS5tYXJrdXBJbmRleCAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICB3cml0ZUFyZ3MubWFya3VwID0gYXJnc1sxXVt1cGRhdGUubWFya3VwSW5kZXhdO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgUmVhY3REZWZhdWx0UGVyZi5fcmVjb3JkV3JpdGUoXG4gICAgICAgICAgICAgIHVwZGF0ZS5wYXJlbnRJRCxcbiAgICAgICAgICAgICAgdXBkYXRlLnR5cGUsXG4gICAgICAgICAgICAgIHRvdGFsVGltZSxcbiAgICAgICAgICAgICAgd3JpdGVBcmdzXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH0pO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIC8vIGJhc2ljIGZvcm1hdFxuICAgICAgICAgIFJlYWN0RGVmYXVsdFBlcmYuX3JlY29yZFdyaXRlKFxuICAgICAgICAgICAgYXJnc1swXSxcbiAgICAgICAgICAgIGZuTmFtZSxcbiAgICAgICAgICAgIHRvdGFsVGltZSxcbiAgICAgICAgICAgIEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKGFyZ3MsIDEpXG4gICAgICAgICAgKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gcnY7XG4gICAgICB9IGVsc2UgaWYgKG1vZHVsZU5hbWUgPT09ICdSZWFjdENvbXBvc2l0ZUNvbXBvbmVudCcgJiYgKFxuICAgICAgICAoLy8gVE9ETzogcmVjZWl2ZUNvbXBvbmVudCgpP1xuICAgICAgICAoZm5OYW1lID09PSAnbW91bnRDb21wb25lbnQnIHx8XG4gICAgICAgIGZuTmFtZSA9PT0gJ3VwZGF0ZUNvbXBvbmVudCcgfHwgZm5OYW1lID09PSAnX3JlbmRlclZhbGlkYXRlZENvbXBvbmVudCcpKSkpIHtcblxuICAgICAgICBpZiAodHlwZW9mIHRoaXMuX2N1cnJlbnRFbGVtZW50LnR5cGUgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgcmV0dXJuIGZ1bmMuYXBwbHkodGhpcywgYXJncyk7XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgcm9vdE5vZGVJRCA9IGZuTmFtZSA9PT0gJ21vdW50Q29tcG9uZW50JyA/XG4gICAgICAgICAgYXJnc1swXSA6XG4gICAgICAgICAgdGhpcy5fcm9vdE5vZGVJRDtcbiAgICAgICAgdmFyIGlzUmVuZGVyID0gZm5OYW1lID09PSAnX3JlbmRlclZhbGlkYXRlZENvbXBvbmVudCc7XG4gICAgICAgIHZhciBpc01vdW50ID0gZm5OYW1lID09PSAnbW91bnRDb21wb25lbnQnO1xuXG4gICAgICAgIHZhciBtb3VudFN0YWNrID0gUmVhY3REZWZhdWx0UGVyZi5fbW91bnRTdGFjaztcbiAgICAgICAgdmFyIGVudHJ5ID0gUmVhY3REZWZhdWx0UGVyZi5fYWxsTWVhc3VyZW1lbnRzW1xuICAgICAgICAgIFJlYWN0RGVmYXVsdFBlcmYuX2FsbE1lYXN1cmVtZW50cy5sZW5ndGggLSAxXG4gICAgICAgIF07XG5cbiAgICAgICAgaWYgKGlzUmVuZGVyKSB7XG4gICAgICAgICAgYWRkVmFsdWUoZW50cnkuY291bnRzLCByb290Tm9kZUlELCAxKTtcbiAgICAgICAgfSBlbHNlIGlmIChpc01vdW50KSB7XG4gICAgICAgICAgbW91bnRTdGFjay5wdXNoKDApO1xuICAgICAgICB9XG5cbiAgICAgICAgc3RhcnQgPSBwZXJmb3JtYW5jZU5vdygpO1xuICAgICAgICBydiA9IGZ1bmMuYXBwbHkodGhpcywgYXJncyk7XG4gICAgICAg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NzLCBtYWtlIHN1cmUgdG8gaW5zdGFudGlhdGUgJyArXG4gICAgICAgICAgJ2l0IGJ5IHBhc3NpbmcgaXQgdG8gUmVhY3QuY3JlYXRlRWxlbWVudC4nIDpcbiAgICAgICAgLy8gQ2hlY2sgaWYgaXQgcXVhY2tzIGxpa2UgYW4gZWxlbWVudFxuICAgICAgICBuZXh0RWxlbWVudCAhPSBudWxsICYmIG5leHRFbGVtZW50LnByb3BzICE9PSB1bmRlZmluZWQgP1xuICAgICAgICAgICcgVGhpcyBtYXkgYmUgY2F1c2VkIGJ5IHVuaW50ZW50aW9uYWxseSBsb2FkaW5nIHR3byBpbmRlcGVuZGVudCAnICtcbiAgICAgICAgICAnY29waWVzIG9mIFJlYWN0LicgOlxuICAgICAgICAgICcnXG4gICAgICApXG4gICAgKSA6IGludmFyaWFudChSZWFjdEVsZW1lbnQuaXNWYWxpZEVsZW1lbnQobmV4dEVsZW1lbnQpKSk7XG5cbiAgICB2YXIgcHJldkNvbXBvbmVudCA9IGluc3RhbmNlc0J5UmVhY3RSb290SURbZ2V0UmVhY3RSb290SUQoY29udGFpbmVyKV07XG5cbiAgICBpZiAocHJldkNvbXBvbmVudCkge1xuICAgICAgdmFyIHByZXZFbGVtZW50ID0gcHJldkNvbXBvbmVudC5fY3VycmVudEVsZW1lbnQ7XG4gICAgICBpZiAoc2hvdWxkVXBkYXRlUmVhY3RDb21wb25lbnQocHJldkVsZW1lbnQsIG5leHRFbGVtZW50KSkge1xuICAgICAgICByZXR1cm4gUmVhY3RNb3VudC5fdXBkYXRlUm9vdENvbXBvbmVudChcbiAgICAgICAgICBwcmV2Q29tcG9uZW50LFxuICAgICAgICAgIG5leHRFbGVtZW50LFxuICAgICAgICAgIGNvbnRhaW5lcixcbiAgICAgICAgICBjYWxsYmFja1xuICAgICAgICApLmdldFB1YmxpY0luc3RhbmNlKCk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBSZWFjdE1vdW50LnVubW91bnRDb21wb25lbnRBdE5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B2YXIgcm9vdEVsZW1lbnQgPSByb290RWxlbWVudHNCeVJlYWN0Um9vdElEW3JlYWN0Um9vdElEXTtcbiAgICAgIGlmIChyb290RWxlbWVudCAmJiByb290RWxlbWVudC5wYXJlbnROb2RlICE9PSBjb250YWluZXIpIHtcbiAgICAgICAgKFwicHJvZHVjdGlvblwiICE9PSBwcm9jZXNzLmVudi5OT0RFX0VOViA/IGludmFyaWFudChcbiAgICAgICAgICAvLyBDYWxsIGludGVybmFsR2V0SUQgaGVyZSBiZWNhdXNlIGdldElEIGNhbGxzIGlzVmFsaWQgd2hpY2ggY2FsbHNcbiAgICAgICAgICAvLyBmaW5kUmVhY3RDb250YWluZXJGb3JJRCAodGhpcyBmdW5jdGlvbikuXG4gICAgICAgICAgaW50ZXJuYWxHZXRJRChyb290RWxlbWVudCkgPT09IHJlYWN0Um9vdElELFxuICAgICAgICAgICdSZWFjdE1vdW50OiBSb290IGVsZW1lbnQgSUQgZGlmZmVyZWQgZnJvbSByZWFjdFJvb3RJRC4nXG4gICAgICAgICkgOiBpbnZhcmlhbnQoLy8gQ2FsbCBpbnRlcm5hbEdldElEIGhlcmUgYmVjYXVzZSBnZXRJRCBjYWxscyBpc1ZhbGlkIHdoaWNoIGNhbGxzXG4gICAgICAgIC8vIGZpbmRSZWFjdENvbnRhaW5lckZvcklEICh0aGlzIGZ1bmN0aW9uKS5cbiAgICAgICAgaW50ZXJuYWxHZXRJRChyb290RWxlbWVudCkgPT09IHJlYWN0Um9vdElEKSk7XG5cbiAgICAgICAgdmFyIGNvbnRhaW5lckNoaWxkID0gY29udGFpbmVyLmZpcnN0Q2hpbGQ7XG4gICAgICAgIGlmIChjb250YWluZXJDaGlsZCAmJlxuICAgICAgICAgICAgcmVhY3RSb290SUQgPT09IGludGVybmFsR2V0SUQoY29udGFpbmVyQ2hpbGQpKSB7XG4gICAgICAgICAgLy8gSWYgdGhlIGNvbnRhaW5lciBoYXMgYSBuZXcgY2hpbGQgd2l0aCB0aGUgc2FtZ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gICAgJ3BhcmVudC4gJyArXG4gICAgICAnVHJ5IGluc3BlY3RpbmcgdGhlIGNoaWxkIG5vZGVzIG9mIHRoZSBlbGVtZW50IHdpdGggUmVhY3QgSUQgYCVzYC4nLFxuICAgICAgdGFyZ2V0SUQsXG4gICAgICBSZWFjdE1vdW50LmdldElEKGFuY2VzdG9yTm9kZSlcbiAgICApIDogaW52YXJpYW50KGZhbHNlKSk7XG4gIH0sXG5cbiAgX21vdW50SW1hZ2VJbnRvTm9kZTogZnVuY3Rpb24obWFya3VwLCBjb250YWluZXIsIHNob3VsZFJldXNlTWFya3VwKSB7XG4gICAgKFwicHJvZHVjdGlvblwiICE9PSBwcm9jZXNzLmVudi5OT0RFX0VOViA/IGludmFyaWFudChcbiAgICAgIGNvbnRhaW5lciAmJiAoXG4gICAgICAgIChjb250YWluZXIubm9kZVR5cGUgPT09IEVMRU1FTlRfTk9ERV9UWVBFIHx8IGNvbnRhaW5lci5ub2RlVHlwZSA9PT0gRE9DX05PREVfVFlQRSlcbiAgICAgICksXG4gICAgICAnbW91bnRDb21wb25lbnRJbnRvTm9kZSguLi4pOiBUYXJnZXQgY29udGFpbmVyIGlzIG5vdCB2YWxpZC4nXG4gICAgKSA6IGludmFyaWFudChjb250YWluZXIgJiYgKFxuICAgICAgKGNvbnRhaW5lci5ub2RlVHlwZSA9PT0gRUxFTUVOVF9OT0RFX1RZUEUgfHwgY29udGFpbmVyLm5vZGVUeXBlID09PSBET0NfTk9ERV9UWVBFKVxuICAgICkpKTtcblxuICAgIGlmIChzaG91bGRSZXVzZU1hcmt1cCkge1xuICAgICAgdmFyIHJvb3RFbGVtZW50ID0gZ2V0UmVhY3RSb290RWxlbWVudEluQ29udGFpbmVyKGNvbnRhaW5lcik7XG4gICAgICBpZiAoUmVhY3RNYXJrdXBDaGVja3N1bS5jYW5SZXVzZU1hcmt1cChtYXJrdXAsIHJvb3RFbGVtZW50KSkge1xuICAgICAgICByZXR1cm47XG4gICAgICB9IGVsc2Uge1xu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3Jvb3ROb2RlSUQgKyBuYW1lO1xuICAgICAgICAgIHZhciBtb3VudEltYWdlID0gUmVhY3RSZWNvbmNpbGVyLm1vdW50Q29tcG9uZW50KFxuICAgICAgICAgICAgY2hpbGQsXG4gICAgICAgICAgICByb290SUQsXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGNvbnRleHRcbiAgICAgICAgICApO1xuICAgICAgICAgIGNoaWxkLl9tb3VudEluZGV4ID0gaW5kZXg7XG4gICAgICAgICAgbW91bnRJbWFnZXMucHVzaChtb3VudEltYWdlKTtcbiAgICAgICAgICBpbmRleCsrO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICByZXR1cm4gbW91bnRJbWFnZXM7XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIFJlcGxhY2VzIGFueSByZW5kZXJlZCBjaGlsZHJlbiB3aXRoIGEgdGV4dCBjb250ZW50IHN0cmluZy5cbiAgICAgKlxuICAgICAqIEBwYXJhbSB7c3RyaW5nfSBuZXh0Q29udGVudCBTdHJpbmcgb2YgY29udGVudC5cbiAgICAgKiBAaW50ZXJuYWxcbiAgICAgKi9cbiAgICB1cGRhdGVUZXh0Q29udGVudDogZnVuY3Rpb24obmV4dENvbnRlbnQpIHtcbiAgICAgIHVwZGF0ZURlcHRoKys7XG4gICAgICB2YXIgZXJyb3JUaHJvd24gPSB0cnVlO1xuICAgICAgdHJ5IHtcbiAgICAgICAgdmFyIHByZXZDaGlsZHJlbiA9IHRoaXMuX3JlbmRlcmVkQ2hpbGRyZW47XG4gICAgICAgIC8vIFJlbW92ZSBhbnkgcmVuZGVyZWQgY2hpbGRyZW4uXG4gICAgICAgIFJlYWN0Q2hpbGRSZWNvbmNpbGVyLnVubW91bnRDaGlsZHJlbihwcmV2Q2hpbGRyZW4pO1xuICAgICAgICAvLyBUT0RPOiBUaGUgc2V0VGV4dENvbnRlbnQgb3BlcmF0aW9uIHNob3VsZCBiZSBlbm91Z2hcbiAgICAgICAgZm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hXG4gKiBzaW5nbGUgaW5zdGFuY2Ugb2YgYSBgVHJhbnNhY3Rpb25gIGZvciByZXVzZSBtdWx0aXBsZSB0aW1lcywgdGhhdCBwb3RlbnRpYWxseVxuICogaXMgdXNlZCB0byB3cmFwIHNldmVyYWwgZGlmZmVyZW50IG1ldGhvZHMuIFdyYXBwZXJzIGFyZSBleHRyZW1lbHkgc2ltcGxlIC1cbiAqIHRoZXkgb25seSByZXF1aXJlIGltcGxlbWVudGluZyB0d28gbWV0aG9kcy5cbiAqXG4gKiA8cHJlPlxuICogICAgICAgICAgICAgICAgICAgICAgIHdyYXBwZXJzIChpbmplY3RlZCBhdCBjcmVhdGlvbiB0aW1lKVxuICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsgICAgICAgICtcbiAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICB8XG4gKiAgICAgICAgICAgICAgICAgICAgKy0tLS0tLS0tLS0tLS0tLS0tfC0tLS0tLS0tfC0tLS0tLS0tLS0tLS0tK1xuICogICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgIHYgICAgICAgIHwgICAgICAgICAgICAgIHxcbiAqICAgICAgICAgICAgICAgICAgICB8ICAgICAgKy0tLS0tLS0tLS0tLS0tLSsgICB8ICAgICAgICAgICAgICB8XG4gKiAgICAgICAgICAgICAgICAgICAgfCAgICstLXwgICAgd3JhcHBlcjEgICB8LS0tfC0tLS0rICAgICAgICAgfFxuICogICAgICAgICAgICAgICAgICAgIHwgICB8ICArLS0tLS0tLS0tLS0tLS0tKyAgIHYgICAgfCAgICAgICAgIHxcbiAqICAgICAgICAgICAgICAgICAgICB8ICAgfCAgICAgICAgICArLS0tLS0tLS0tLS0tLSsgIHwgICAgICAgICB8XG4gKiAgICAgICAgICAgICAgICAgICAgfCAgIHwgICAgICstLS0tfCAgIHdyYXBwZXIyICB8LS0tLS0tLS0rICAgfFxuICogICAgICAgICAgICAgICAgICAgIHwgICB8ICAgICB8ICAgICstLS0tLS0tLS0tLS0tKyAgfCAgICAgfCAgIHxcbiAqICAgICAgICAgICAgICAgICAgICB8ICAgfCAgICAgfCAgICAgICAgICAgICAgICAgICAgIHwgICAgIHwgICB8XG4gKiAgICAgICAgICAgICAgICAgICAgfCAgIHYgICAgIHYgICAgICAgICAgICAgICAgICAgICB2ICAgICB2ICAgfCB3cmFwcGVyXG4gKiAgICAgICAgICAgICAgICAgICAgfCArLS0tKyArLS0tKyAgICstLS0tLS0tLS0rICAgKy0tLSsgKy0tLSsgfCBpbnZhcmlhbnRzXG4gKiBwZXJmb3JtKGFueU1ldGhvZCkgfCB8ICAgfCB8ICAgfCAgIHwgICAgICAgICB8ICAgfCAgIHwgfCAgIHwgfCBtYWludGFpbmVkXG4gKiArLS0tLS0tLS0tLS0tLS0tLS0+fC18LS0tfC18LS0tfC0tPnxhbnlNZXRob2R8LS0tfC0tLXwtfC0tLXwtfC0tLS0tLS0tPlxuICogICAgICAgICAgICAgICAgICAgIHwgfCAgIHwgfCAgIHwgICB8ICAgICAgICAgfCAgIHwgICB8IHwgICB8IHxcbiAqICAgICAgICAgICAgICAgICAgICB8IHwgICB8IHwgICB8ICAgfCAgICAgICAgIHwgICB8ICAgfCB8ICAgfCB8XG4gKiAgICAgICAgICAgICAgICAgICAgfCB8ICAgfCB8ICAgfCAgIHwgICAgICAgICB8ICAgfCAgIHwgfCAgIHwgfFxuICogICAgICAgICAgICAgICAgICAgIHwgKy0tLSsgKy0tLSsgICArLS0tLS0tLS0tKyAgICstLS0rICstLS0rIHxcbiAqICAgICAgICAgICAgICAgICAgICB8ICBpbml0aWFsaXplICAgICAgICAgICAgICAgICAgICBjbG9zZSAgICB8XG4gKiAgICAgICAgICAgICAgICAgICAgKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tK1xuICogPC9wcmU+XG4gKlxuICogVXNlIGNhc2VzOlxuICogLSBQcmVzZXJ2aW5nIHRoZ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W5zXG4gICAgICAvLyBvbmUgb2YgdGhlc2UgY2FsbHMgdGhyZXcuXG4gICAgICBlcnJvclRocm93biA9IHRydWU7XG4gICAgICB0aGlzLmluaXRpYWxpemVBbGwoMCk7XG4gICAgICByZXQgPSBtZXRob2QuY2FsbChzY29wZSwgYSwgYiwgYywgZCwgZSwgZik7XG4gICAgICBlcnJvclRocm93biA9IGZhbHNlO1xuICAgIH0gZmluYWxseSB7XG4gICAgICB0cnkge1xuICAgICAgICBpZiAoZXJyb3JUaHJvd24pIHtcbiAgICAgICAgICAvLyBJZiBgbWV0aG9kYCB0aHJvd3MsIHByZWZlciB0byBzaG93IHRoYXQgc3RhY2sgdHJhY2Ugb3ZlciBhbnkgdGhyb3duXG4gICAgICAgICAgLy8gYnkgaW52b2tpbmcgYGNsb3NlQWxsYC5cbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgdGhpcy5jbG9zZUFsbCgwKTtcbiAgICAgICAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgLy8gU2luY2UgYG1ldGhvZGAgZGlkbid0IHRocm93LCB3ZSBkb24ndCB3YW50IHRvIHNpbGVuY2UgdGhlIGV4Y2VwdGlvblxuICAgICAgICAgIC8vIGhlcmUuXG4gICAgICAgICAgdGhpcy5jbG9zZUFsbCgwKTtcbiAgICAgICAgfVxuICAgICAgfSBmaW5hbGx5IHtcbiAgICAgICAgdGhpcy5faXNJblRyYW5zYWN0aW9uID0gZmFsc2U7XG4gICAgICB9XG4gICAgfVxuICAgIHJldHVybiByZXQ7XG4gIH0sXG5cbiAgaW5pdGlhbGl6ZUFsbDogZnVuY3Rpb24oc3RhcnRJbmRleCkge1xuICAgIHZhciB0cmFuc2FjdGlvbldyYXBwZXJzID0gdGhpcy50cmFuc2FjdGlvbldyYXBwZXJzO1xuICAgIGZvciAodmFyIGkgPSBzdGFydEluZGV4OyBpIDwgdHJhbnNhY3Rpb25XcmFw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YXRjaCA9IHByZXZFbGVtZW50Ll9vd25lciA9PT0gbmV4dEVsZW1lbnQuX293bmVyO1xuICAgICAgICB2YXIgcHJldk5hbWUgPSBudWxsO1xuICAgICAgICB2YXIgbmV4dE5hbWUgPSBudWxsO1xuICAgICAgICB2YXIgbmV4dERpc3BsYXlOYW1lID0gbnVsbDtcbiAgICAgICAgaWYgKFwicHJvZHVjdGlvblwiICE9PSBwcm9jZXNzLmVudi5OT0RFX0VOVikge1xuICAgICAgICAgIGlmICghb3duZXJzTWF0Y2gpIHtcbiAgICAgICAgICAgIGlmIChwcmV2RWxlbWVudC5fb3duZXIgIT0gbnVsbCAmJlxuICAgICAgICAgICAgICAgIHByZXZFbGVtZW50Ll9vd25lci5nZXRQdWJsaWNJbnN0YW5jZSgpICE9IG51bGwgJiZcbiAgICAgICAgICAgICAgICBwcmV2RWxlbWVudC5fb3duZXIuZ2V0UHVibGljSW5zdGFuY2UoKS5jb25zdHJ1Y3RvciAhPSBudWxsKSB7XG4gICAgICAgICAgICAgIHByZXZOYW1lID1cbiAgICAgICAgICAgICAgICBwcmV2RWxlbWVudC5fb3duZXIuZ2V0UHVibGljSW5zdGFuY2UoKS5jb25zdHJ1Y3Rvci5kaXNwbGF5TmFtZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChuZXh0RWxlbWVudC5fb3duZXIgIT0gbnVsbCAmJlxuICAgICAgICAgICAgICAgIG5leHRFbGVtZW50Ll9vd25lci5nZXRQdWJsaWNJbnN0YW5jZSgpICE9IG51bGwgJiZcbiAgICAgICAgICAgICAgICBuZXh0RWxlbWVudC5fb3duZXIuZ2V0UHVibGljSW5zdGFuY2UoKS5jb25zdHJ1Y3RvciAhPSBudWxsKSB7XG4gICAgICAgICAgICAgIG5leHROYW1lID1cbiAgICAgICAgICAgICAgICBuZXh0RWxlbWVudC5fb3duZXIuZ2V0UHVibGljSW5zdGFuY2UoKS5jb25zdHJ1Y3Rvci5kaXNwbGF5TmFtZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChuZXh0RWxlbWVudC50eXBlICE9IG51bGwgJiZcbiAgICAgICAgICAgICAgICBuZXh0RWxlbWVudC50eXBlLmRpc3BsYXlOYW1lICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgbmV4dERpc3BsYXlOYW1lID0gbmV4dEVsZW1lbnQudHlwZS5kaXNwbGF5TmFtZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChuZXh0RWxlbWVudC50eXBlICE9IG51bGwgJiYgdHlwZW9mIG5leHRFbGVtZW50LnR5cGUgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgIG5leHREaXNwbGF5TmFtZSA9IG5leHRFbGVtZW50LnR5cGU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAodHlwZW9mIG5leHRFbGVtZW50LnR5cGUgIT09ICdzdHJpbmcnIHx8XG4gICAgICAgICAgICAgICAgbmV4dEVsZW1lbnQudHlwZSA9PT0gJ2lucHV0JyB8fFxuICAgICAgICAgICAgICAgIG5leHRFbGVtZW50LnR5cGUgPT09ICd0ZXh0YXJlYScpIHtcbiAgICAgICAgICAgICAgaWYgKChwcmV2RWxlbWVudC5fb3duZXIgIT0gbnVsbCAmJlxuICAgICAgICAgICAgICAgICAgcHJldkVsZW1lbnQuX293bmVyLl9pc093bmVyTmVjZXNzYXJ5ID09PSBmYWxzZSkgfHxcbiAgICAgICAgICAgICAgICAgIChuZXh0RWxlbWVudC5fb3duZXIgIT0gbnVsbCAmJlxuICAgICAgICAgICAgICAgICAgbmV4dEVsZW1lbnQuX293bmVyLl9pc093bmVyTmVjZXNzYXJ5ID09PSBmYWxzZSkpIHtcbiAgICAgICAgICAgICAgICBpZiAocHJldkVsZW1lbnQuX293bmVyICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgIHByZXZFbGVtZW50Ll9vd25lci5faXNPd25lck5lY2Vzc2FyeSA9IHRydWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChuZXh0RWxlbWVudC5fb3duZXIgIT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgbmV4dEVsZW1lbnQuX293bmVyLl9pc093bmVyTmVjZXNzYXJ5ID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgKFwicHJvZHVjdGlvblwiICE9PSBwcm9jZXNzLmVudi5OT0RFX0VOViA/IHdhcm5pbmcoXG4gICAgICAgICAgICAgICAgICBmYWxzZSxcbiAgICAgICAgICAgICAgICAgICc8JXMgLz4gaXMgYmVpbmcgcmVuZGVyZWQgYnkgYm90aCAlcyBhbmQgJXMgdXNpbmcgdGhlIHNhbWUgJyArXG4gICAgICAgICAgICAgICAgICAna2V5ICglcykgaW4gdGhlIHNhbWUgcGxhY2UuIEN1cnJlbnRseSwgdGhpcyBtZWFucyB0aGF0ICcgK1xuICAgICAgICAgICAgICAgICAgJ3RoZXkgZG9uXFwndCBwcmVzZXJ2ZSBzdGF0ZS4gVGhpcyBiZWhhdmlvciBzaG91bGQgYmUgdmVyeSAnICtcbiAgICAgICAgICAgICAgICAgICdyYXJlIHNvIHdlXFwncmUgY29uc2lkZXJpbmcgZGVwcmVjYXRpbmcgaXQuIFBsZWFzZSBjb250YWN0ICcgK1xuICAgICAgICAgICAgICAgICAgJ3RoZSBSZWFjdCB0ZWFtIGFuZCBleHBsYWluIHlvdXIgdXNlIGNhc2Ugc28gdGhhdCB3ZSBjYW4gJyArXG4gICAgICAgICAgICAgICAgICAndGFrZSB0aGF0IGludG8gY29uc2lkZXJhdGlvbi4nLFxuICAgICAgICAgICAgICAgICAgbmV4dERpc3BsYXlOYW1lIHx8ICdVbmtub3duIENvbXBvbmVudCcsXG4gICAgICAgICAgICAgICAgICBwcmV2TmFtZSB8fCAnW1Vua25vd25dJyxcbiAgICAgICAgICAgICAgICAgIG5leHROYW1lIHx8ICdbVW5rbm93bl0nLFxuICAgICAgICAgICAgICAgICAgcHJ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QgbWlnaHQgYmUgcmVtb3ZlZC4gQ29udmVydCBpdCB0byBhICcgK1xuICAgICAgICAgICAgJ3NlcXVlbmNlIC8gaXRlcmFibGUgb2Yga2V5ZWQgUmVhY3RFbGVtZW50cyBpbnN0ZWFkLidcbiAgICAgICAgICApIDogbnVsbCk7XG4gICAgICAgICAgZGlkV2FybkFib3V0TWFwcyA9IHRydWU7XG4gICAgICAgIH1cbiAgICAgICAgLy8gSXRlcmF0b3Igd2lsbCBwcm92aWRlIGVudHJ5IFtrLHZdIHR1cGxlcyByYXRoZXIgdGhhbiB2YWx1ZXMuXG4gICAgICAgIHdoaWxlICghKHN0ZXAgPSBpdGVyYXRvci5uZXh0KCkpLmRvbmUpIHtcbiAgICAgICAgICB2YXIgZW50cnkgPSBzdGVwLnZhbHVlO1xuICAgICAgICAgIGlmIChlbnRyeSkge1xuICAgICAgICAgICAgY2hpbGQgPSBlbnRyeVsxXTtcbiAgICAgICAgICAgIG5leHROYW1lID0gKFxuICAgICAgICAgICAgICAobmFtZVNvRmFyICE9PSAnJyA/IG5hbWVTb0ZhciArIFNVQlNFUEFSQVRPUiA6IFNFUEFSQVRPUikgK1xuICAgICAgICAgICAgICB3cmFwVXNlclByb3ZpZGVkS2V5KGVudHJ5WzBdKSArIFNVQlNFUEFSQVRPUiArXG4gICAgICAgICAgICAgIGdldENvbXBvbmVudEtleShjaGlsZCwgMClcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICBuZXh0SW5kZXggPSBpbmRleFNvRmFyICsgc3VidHJlZUNvdW50O1xuICAgICAgICAgICAgc3VidHJlZUNvdW50ICs9IHRyYXZlcnNlQWxsQ2hpbGRyZW5JbXBsKFxuICAgICAgICAgICAgICBjaGlsZCxcbiAgICAgICAgICAgICAgbmV4dE5hbWUsXG4gICAgICAgICAgICAgIG5leHRJbmRleCxcbiAgICAgICAgICAgICAgY2FsbGJhY2ssXG4gICAgICAgICAgICAgIHRyYXZlcnNlQ29udGV4dFxuICAgICAgICAgICAgK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F0aC5mbG9vcihNYXRoLnJhbmRvbSgpICogMTAwMDAwMDApKS50b1N0cmluZygzNik7XG4gIH1cbn1cbiIsImltcG9ydCBqc29ucCBmcm9tICdqc29ucCc7XG5cbmNsYXNzIEpTT05QVXRpbHMge1xuICBnZXQoLi4uYXJncykge1xuICAgIHJldHVybiBqc29ucCguLi5hcmdzKTtcbiAgfVxufVxuXG5leHBvcnQgZGVmYXVsdCBuZXcgSlNPTlBVdGlscygpO1xuIiwiZXhwb3J0IGZ1bmN0aW9uIGlzU21hbGxTY3JlZW4oKSB7XG4gIHJldHVybiB3aW5kb3cubWF0Y2hNZWRpYSAmJiAhd2luZG93Lm1hdGNoTWVkaWEoXCIobWluLXdpZHRoOiAzNDBweClcIikubWF0Y2hlcztcbn1cbiIsImV4cG9ydCBmdW5jdGlvbiBtYXRjaGVzKHNlYXJjaCwgc3RyKSB7XG4gIHJldHVybiBzdHIudG9Mb3dlckNhc2UoKS5pbmRleE9mKHNlYXJjaC50b0xvd2VyQ2FzZSgpKSA+IC0xO1xufVxuIl19 diff --git a/css/index.css b/css/index.css index 114c72cad..3a0981761 100644 --- a/css/index.css +++ b/css/index.css @@ -27,11 +27,10 @@ body.frame { } .auth0-loading { position: absolute; - top: 50%; - left: 50%; + top: 4px; + left: 44.5%; width: 30px; height: 30px; - margin: -20px 0 0 -20px; border-width: 2px; border-style: solid; border-color: rgba(0,0,0,0.4) rgba(0,0,0,0.4) rgba(0,0,0,0.2) rgba(0,0,0,0.2); @@ -208,9 +207,11 @@ body.frame { display: block; } .auth0-lock .auth0-lock-header-logo { - max-width: 60px; - height: 60px; - margin: auto auto 10px auto; + display: inline-block; + margin-bottom: 10px; +} +.auth0-lock .auth0-lock-header-logo svg { + vertical-align: middle; } .auth0-lock .auth0-lock-header-placeholder { background: #008000; @@ -433,13 +434,17 @@ body.frame { bottom: 0; transition: background-color 0.2s ease-in-out; } -.auth0-lock .auth0-lock-submit i { +.auth0-lock .auth0-lock-submit span { + display: inline-block; transition: all 0.2s ease-in-out; } +.auth0-lock .auth0-lock-submit span svg { + vertical-align: middle; +} .auth0-lock .auth0-lock-submit:hover { background: #c43e13; } -.auth0-lock .auth0-lock-submit:hover i { +.auth0-lock .auth0-lock-submit:hover span { transform: scale(1.05); } .auth0-lock .auth0-lock-submit:focus { @@ -451,32 +456,9 @@ body.frame { position: relative; } } -.auth0-lock .auth0-lock-submit i { - border: 2.5px solid #fff; - width: 40px; - height: 40px; - display: block; - margin: auto; - border-radius: 100px; -} -.auth0-lock .auth0-lock-submit i:before { - content: "p"; - color: #fff; - top: 9.5px; - position: relative; - font-size: 20px; - left: 2px; -} .auth0-lock .auth0-lock-submit[disabled] { background: #c43e13; } -.auth0-lock .auth0-lock-submit[disabled] i:before { - content: "…"; - left: 0; -} -.auth0-lock .auth0-lock-submit .auth0-loading { - top: 26px; -} .auth0-lock .auth0-loading-container { position: relative; display: none; @@ -494,7 +476,7 @@ body.frame { cursor: initial; pointer-events: none; } -.auth0-lock.auth0-lock-mode-loading i { +.auth0-lock.auth0-lock-mode-loading .auth0-lock-submit span { animation-name: fadeOutDownBig; animation-duration: 1s; animation-fill-mode: both; @@ -631,13 +613,7 @@ body.frame { margin: 30px 0 0 0; color: #5c666f; } -.auth0-lock .auth0-lock-badge { - display: block; - text-align: center; - margin-top: 20px; - font-size: 20px; - position: relative; - z-index: -1; +.auth0-lock .auth0-lock-badge-bottom { -webkit-transition: transform 4s ease 1.8s, opacity 1.2s ease 1.8s; -webkit-transform: translateY(-200%) scale(0.8); transition: transform 0.5s ease 1s, opacity 0.2s ease 0s; @@ -646,15 +622,19 @@ body.frame { left: 0; right: 0; opacity: 0; - font-size: 18px; + z-index: -1; + text-align: center; + margin-top: 20px; } -.auth0-lock .auth0-lock-badge:before { - content: "f"; - transition: color 0.5s; - color: rgba(255,255,255,0.4); +.auth0-lock .auth0-lock-badge-bottom .auth0-lock-badge { + display: inline-block; +} +.auth0-lock .auth0-lock-badge-bottom .auth0-lock-badge svg { + vertical-align: middle; } -.auth0-lock .auth0-lock-badge:hover:before { - color: #eb5424; +.auth0-lock .auth0-lock-badge-bottom .auth0-lock-badge:hover svg g#Lock { + fill: #eb5424; + fill-opacity: 1; } .auth0-lock.auth0-lock-opened .auth0-lock-header-bg .auth0-lock-header-bg-inner { opacity: 0.4; @@ -674,7 +654,7 @@ body.frame { -webkit-transition: transform 0.6s, opacity 0.6s; -webkit-transition-delay: 0.5s; } -.auth0-lock.auth0-lock-opened .auth0-lock-badge { +.auth0-lock.auth0-lock-opened .auth0-lock-badge-bottom { -webkit-transform: translateY(0%) scale(1); -webkit-transition-delay: 0; transform: translateY(0%) scale(1); @@ -701,7 +681,7 @@ body.frame { -webkit-transition: transform 0.6s, opacity 0.6s; -webkit-transition-delay: 0.5s; } -.auth0-lock.auth0-lock-opened-in-frame .auth0-lock-badge { +.auth0-lock.auth0-lock-opened-in-frame .auth0-lock-badge-bottom { -webkit-transform: translateY(0%) scale(1); -webkit-transition-delay: 0; transform: translateY(0%) scale(1); diff --git a/css/index.styl b/css/index.styl index 828fc65ae..54b7e888e 100644 --- a/css/index.styl +++ b/css/index.styl @@ -52,11 +52,10 @@ body.frame .auth0-loading position:absolute; - top:50%; - left:50%; + top: 4px; + left: 44.5%; width:30px; height:30px; - margin:-20px 0 0 -20px; border-width: 2px; border-style:solid; border-color: rgba(0,0,0,.4) rgba(0,0,0,.4) rgba(0,0,0,.2) rgba(0,0,0,.2); @@ -222,9 +221,10 @@ body.frame display: block; .auth0-lock-header-logo - max-width: 60px; - height: 60px; - margin: auto auto 10px auto; + display inline-block + margin-bottom 10px + svg + vertical-align middle .auth0-lock-header-placeholder background: green; @@ -440,13 +440,16 @@ body.frame position: relative; bottom: 0; transition: background-color .2s ease-in-out; - i + span + display inline-block transition: all .2s ease-in-out; + svg + vertical-align middle &:hover background: darken(#EA5323, 20%) - i + span transform: scale(1.05) &:focus @@ -455,34 +458,10 @@ body.frame +breakpoint("mobile-landscape") position: static; position: relative; - // border-bottom-right-radius: 5px; - // border-bottom-left-radius: 5px; - - i - border: 2.5px solid white; - width: 40px; - height: 40px; - display: block; - margin: auto; - border-radius: 100px; - &:before - content: "p" - color: white - top: 9.5px; - position: relative; - font-size: 20px - left: 2px; &[disabled] background: darken(#EA5323, 20%) - i:before - content: "…" - left: 0; - - .auth0-loading - top: 26px - .auth0-loading-container position: relative; @@ -503,10 +482,10 @@ body.frame cursor: initial; pointer-events: none - i - animation-name: fadeOutDownBig; - animation-duration: 1s; - animation-fill-mode: both; + span + animation-name: fadeOutDownBig; + animation-duration: 1s; + animation-fill-mode: both; .auth0-loading-container animation-name: fadeInDownBig; @@ -635,13 +614,7 @@ body.frame margin: 30px 0 0 0; color: #5C666F; - .auth0-lock-badge - display: block; - text-align: center; - margin-top: 20px; - font-size: 20px; - position: relative; - z-index: -1; + .auth0-lock-badge-bottom -webkit-transition: transform 4s ease 1.8s, opacity 1.2s ease 1.8s; -webkit-transform: translateY(-200%) scale(.8); transition: transform .5s ease 1s, opacity .2s ease 0s; @@ -650,15 +623,20 @@ body.frame left: 0; right: 0; opacity: 0; - font-size: 18px; - &:before - content: "f" - transition: color .5s; - color: rgba(255,255,255,.4) + z-index: -1; + text-align: center; + margin-top: 20px; - &:hover - &:before - color: #EB5424 + .auth0-lock-badge + display: inline-block; + svg + vertical-align middle + + &:hover + svg + g#Lock + fill #EB5424 + fill-opacity 1 &.auth0-lock-opened .auth0-lock-header-bg @@ -679,7 +657,7 @@ body.frame -webkit-transition: transform .6s, opacity .6s; -webkit-transition-delay: .5s; - .auth0-lock-badge + .auth0-lock-badge-bottom -webkit-transform: translateY(0%) scale(1); -webkit-transition-delay: 0; transform: translateY(0%) scale(1); @@ -706,7 +684,7 @@ body.frame -webkit-transition: transform .6s, opacity .6s; -webkit-transition-delay: .5s; - .auth0-lock-badge + .auth0-lock-badge-bottom -webkit-transform: translateY(0%) scale(1); -webkit-transition-delay: 0; transform: translateY(0%) scale(1); diff --git a/src/header/icon.jsx b/src/header/icon.jsx index 0f25d3b8c..ad90fbccd 100644 --- a/src/header/icon.jsx +++ b/src/header/icon.jsx @@ -2,11 +2,7 @@ import React from 'react'; export default class Icon extends React.Component { render() { - const { imageUrl } = this.props; - return ; + const svgTag = ''; + return ; } } - -Icon.propTyes = { - imageUrl: React.PropTypes.string -}; diff --git a/src/header/welcome.jsx b/src/header/welcome.jsx index d215466d7..624f7f8a9 100644 --- a/src/header/welcome.jsx +++ b/src/header/welcome.jsx @@ -8,7 +8,7 @@ export default class Welcome extends React.Component { return (
- {imageUrl && } + {imageUrl && }
); diff --git a/src/lock/auth0_badge.jsx b/src/lock/auth0_badge.jsx new file mode 100644 index 000000000..c18d7d323 --- /dev/null +++ b/src/lock/auth0_badge.jsx @@ -0,0 +1,8 @@ +import React from 'react'; + +export default class Badge extends React.Component { + render() { + const svgTag = ''; + return ; + } +} diff --git a/src/lock/lock.jsx b/src/lock/lock.jsx index df6bcda31..ab1a6b64f 100644 --- a/src/lock/lock.jsx +++ b/src/lock/lock.jsx @@ -1,6 +1,7 @@ import React from 'react/addons'; import Avatar from './avatar'; import IconButton from '../icon/button'; +import Badge from './auth0_badge'; import * as l from './index'; import * as g from '../gravatar/index'; const ReactCSSTransitionGroup = React.addons.CSSTransitionGroup; @@ -49,7 +50,9 @@ export default class Lock extends React.Component { {children} - + + + diff --git a/src/lock/submit_button.jsx b/src/lock/submit_button.jsx index 4134f6ce6..20bd33aca 100644 --- a/src/lock/submit_button.jsx +++ b/src/lock/submit_button.jsx @@ -1,4 +1,5 @@ import React from 'react'; +import SubmitIcon from './submit_icon'; export default class SubmitButton extends React.Component { render() { @@ -7,7 +8,7 @@ export default class SubmitButton extends React.Component {
- + ); } diff --git a/src/lock/submit_icon.jsx b/src/lock/submit_icon.jsx new file mode 100644 index 000000000..ce073ec9b --- /dev/null +++ b/src/lock/submit_icon.jsx @@ -0,0 +1,8 @@ +import React from 'react'; + +export default class SubmitIcon extends React.Component { + render() { + const svgTag = ''; + return ; + } +}