diff --git a/extension/dist/lesspass.js b/extension/dist/lesspass.js index 10f40dc..aab8776 100644 --- a/extension/dist/lesspass.js +++ b/extension/dist/lesspass.js @@ -1882,7 +1882,7 @@ function isnan (val) { return val !== val // eslint-disable-line no-self-compare } -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0).Buffer, __webpack_require__(21))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0).Buffer, __webpack_require__(14))) /***/ }, /* 1 */ @@ -2995,16 +2995,16 @@ var objectKeys = Object.keys || function (obj) { module.exports = Duplex; /**/ -var processNextTick = __webpack_require__(45); +var processNextTick = __webpack_require__(46); /**/ /**/ -var util = __webpack_require__(19); +var util = __webpack_require__(20); util.inherits = __webpack_require__(1); /**/ var Readable = __webpack_require__(76); -var Writable = __webpack_require__(47); +var Writable = __webpack_require__(48); util.inherits(Duplex, Readable); @@ -3060,7 +3060,7 @@ function forEach(xs, f) { exports.__esModule = true; -var _assign = __webpack_require__(33); +var _assign = __webpack_require__(23); var _assign2 = _interopRequireDefault(_assign); @@ -3084,7 +3084,7 @@ exports.default = _assign2.default || function (target) { /* 10 */ /***/ function(module, exports, __webpack_require__) { -var isObject = __webpack_require__(27); +var isObject = __webpack_require__(28); module.exports = function(it){ if(!isObject(it))throw TypeError(it + ' is not an object!'); return it; @@ -3095,7 +3095,7 @@ module.exports = function(it){ /***/ function(module, exports, __webpack_require__) { // Thank's IE8 for his funny defineProperty -module.exports = !__webpack_require__(38)(function(){ +module.exports = !__webpack_require__(39)(function(){ return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7; }); @@ -3103,7 +3103,7 @@ module.exports = !__webpack_require__(38)(function(){ /* 12 */ /***/ function(module, exports, __webpack_require__) { -var dP = __webpack_require__(18) +var dP = __webpack_require__(19) , createDesc = __webpack_require__(66); module.exports = __webpack_require__(11) ? function(object, key, value){ return dP.f(object, key, createDesc(1, value)); @@ -3190,6 +3190,31 @@ module.exports = Hash /***/ }, /* 14 */ +/***/ function(module, exports) { + +var g; + +// This works in non-strict mode +g = (function() { return this; })(); + +try { + // This works if eval is allowed (see CSP) + g = g || Function("return this")() || (1,eval)("this"); +} catch(e) { + // This works if the window reference is available + if(typeof window === "object") + g = window; +} + +// g can still be undefined, but nothing to do about it... +// We return undefined, instead of nothing here, so it's +// easier to handle this case. if(!global) { ...} + +module.exports = g; + + +/***/ }, +/* 15 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -3208,15 +3233,15 @@ var _stringify = __webpack_require__(115); var _stringify2 = _interopRequireDefault(_stringify); -var _assign = __webpack_require__(33); +var _assign = __webpack_require__(23); var _assign2 = _interopRequireDefault(_assign); -var _classCallCheck2 = __webpack_require__(15); +var _classCallCheck2 = __webpack_require__(16); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); -var _createClass2 = __webpack_require__(16); +var _createClass2 = __webpack_require__(17); var _createClass3 = _interopRequireDefault(_createClass2); @@ -3284,7 +3309,7 @@ var Storage = function () { exports.default = Storage; /***/ }, -/* 15 */ +/* 16 */ /***/ function(module, exports) { "use strict"; @@ -3299,7 +3324,7 @@ exports.default = function (instance, Constructor) { }; /***/ }, -/* 16 */ +/* 17 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -3332,13 +3357,13 @@ exports.default = function () { }(); /***/ }, -/* 17 */ +/* 18 */ /***/ function(module, exports) { module.exports = {}; /***/ }, -/* 18 */ +/* 19 */ /***/ function(module, exports, __webpack_require__) { var anObject = __webpack_require__(10) @@ -3359,7 +3384,7 @@ exports.f = __webpack_require__(11) ? Object.defineProperty : function definePro }; /***/ }, -/* 19 */ +/* 20 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(Buffer) {// Copyright Joyent, Inc. and other Node contributors. @@ -3473,7 +3498,7 @@ function objectToString(o) { /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0).Buffer)) /***/ }, -/* 20 */ +/* 21 */ /***/ function(module, exports, __webpack_require__) { // Copyright Joyent, Inc. and other Node contributors. @@ -3499,7 +3524,7 @@ function objectToString(o) { module.exports = Stream; -var EE = __webpack_require__(29).EventEmitter; +var EE = __webpack_require__(30).EventEmitter; var inherits = __webpack_require__(1); inherits(Stream, EE); @@ -3606,31 +3631,6 @@ Stream.prototype.pipe = function(dest, options) { /***/ }, -/* 21 */ -/***/ function(module, exports) { - -var g; - -// This works in non-strict mode -g = (function() { return this; })(); - -try { - // This works if eval is allowed (see CSP) - g = g || Function("return this")() || (1,eval)("this"); -} catch(e) { - // This works if the window reference is available - if(typeof window === "object") - g = window; -} - -// g can still be undefined, but nothing to do about it... -// We return undefined, instead of nothing here, so it's -// easier to handle this case. if(!global) { ...} - -module.exports = g; - - -/***/ }, /* 22 */ /***/ function(module, exports, __webpack_require__) { @@ -3645,15 +3645,15 @@ var _promise = __webpack_require__(58); var _promise2 = _interopRequireDefault(_promise); -var _classCallCheck2 = __webpack_require__(15); +var _classCallCheck2 = __webpack_require__(16); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); -var _createClass2 = __webpack_require__(16); +var _createClass2 = __webpack_require__(17); var _createClass3 = _interopRequireDefault(_createClass2); -var _axios = __webpack_require__(49); +var _axios = __webpack_require__(50); var _axios2 = _interopRequireDefault(_axios); @@ -3775,6 +3775,12 @@ exports.default = Auth; /***/ }, /* 23 */ +/***/ function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(123), __esModule: true }; + +/***/ }, +/* 24 */ /***/ function(module, exports) { var toString = {}.toString; @@ -3784,11 +3790,11 @@ module.exports = function(it){ }; /***/ }, -/* 24 */ +/* 25 */ /***/ function(module, exports, __webpack_require__) { // optional / simple context binding -var aFunction = __webpack_require__(35); +var aFunction = __webpack_require__(36); module.exports = function(fn, that, length){ aFunction(fn); if(that === undefined)return fn; @@ -3809,12 +3815,12 @@ module.exports = function(fn, that, length){ }; /***/ }, -/* 25 */ +/* 26 */ /***/ function(module, exports, __webpack_require__) { var global = __webpack_require__(4) , core = __webpack_require__(6) - , ctx = __webpack_require__(24) + , ctx = __webpack_require__(25) , hide = __webpack_require__(12) , PROTOTYPE = 'prototype'; @@ -3875,7 +3881,7 @@ $export.R = 128; // real proto method for `library` module.exports = $export; /***/ }, -/* 26 */ +/* 27 */ /***/ function(module, exports) { var hasOwnProperty = {}.hasOwnProperty; @@ -3884,7 +3890,7 @@ module.exports = function(it, key){ }; /***/ }, -/* 27 */ +/* 28 */ /***/ function(module, exports) { module.exports = function(it){ @@ -3892,7 +3898,7 @@ module.exports = function(it){ }; /***/ }, -/* 28 */ +/* 29 */ /***/ function(module, exports) { /* @@ -3948,7 +3954,7 @@ module.exports = function() { /***/ }, -/* 29 */ +/* 30 */ /***/ function(module, exports) { // Copyright Joyent, Inc. and other Node contributors. @@ -4256,7 +4262,7 @@ function isUndefined(arg) { /***/ }, -/* 30 */ +/* 31 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(setImmediate, clearImmediate) {var nextTick = __webpack_require__(5).nextTick; @@ -4335,10 +4341,10 @@ exports.setImmediate = typeof setImmediate === "function" ? setImmediate : funct exports.clearImmediate = typeof clearImmediate === "function" ? clearImmediate : function(id) { delete immediateIds[id]; }; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(30).setImmediate, __webpack_require__(30).clearImmediate)) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(31).setImmediate, __webpack_require__(31).clearImmediate)) /***/ }, -/* 31 */ +/* 32 */ /***/ function(module, exports) { /* @@ -4560,12 +4566,12 @@ function applyToTag(styleElement, obj) { /***/ }, -/* 32 */ +/* 33 */ /***/ function(module, exports, __webpack_require__) { "use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/*! - * Vue.js v2.0.7 +/* WEBPACK VAR INJECTION */(function(global, process) {/*! + * Vue.js v2.1.3 * (c) 2014-2016 Evan You * Released under the MIT License. */ @@ -4794,98 +4800,6 @@ function looseIndexOf (arr, val) { /* */ -var config = { - /** - * Option merge strategies (used in core/util/options) - */ - optionMergeStrategies: Object.create(null), - - /** - * Whether to suppress warnings. - */ - silent: false, - - /** - * Whether to enable devtools - */ - devtools: process.env.NODE_ENV !== 'production', - - /** - * Error handler for watcher errors - */ - errorHandler: null, - - /** - * Ignore certain custom elements - */ - ignoredElements: null, - - /** - * Custom user key aliases for v-on - */ - keyCodes: Object.create(null), - - /** - * Check if a tag is reserved so that it cannot be registered as a - * component. This is platform-dependent and may be overwritten. - */ - isReservedTag: no, - - /** - * Check if a tag is an unknown element. - * Platform-dependent. - */ - isUnknownElement: no, - - /** - * Get the namespace of an element - */ - getTagNamespace: noop, - - /** - * Check if an attribute must be bound using property, e.g. value - * Platform-dependent. - */ - mustUseProp: no, - - /** - * List of asset types that a component can own. - */ - _assetTypes: [ - 'component', - 'directive', - 'filter' - ], - - /** - * List of lifecycle hooks. - */ - _lifecycleHooks: [ - 'beforeCreate', - 'created', - 'beforeMount', - 'mounted', - 'beforeUpdate', - 'updated', - 'beforeDestroy', - 'destroyed', - 'activated', - 'deactivated' - ], - - /** - * Max circular updates allowed in a scheduler flush cycle. - */ - _maxUpdateCount: 100, - - /** - * Server rendering? - */ - _isServer: process.env.VUE_ENV === 'server' -}; - -/* */ - /** * Check if a string starts with $ or _ */ @@ -4943,6 +4857,23 @@ var isEdge = UA && UA.indexOf('edge/') > 0; var isAndroid = UA && UA.indexOf('android') > 0; var isIOS = UA && /iphone|ipad|ipod|ios/.test(UA); +// this needs to be lazy-evaled because vue may be required before +// vue-server-renderer can set VUE_ENV +var _isServer; +var isServerRendering = function () { + if (_isServer === undefined) { + /* istanbul ignore if */ + if (!inBrowser && typeof global !== 'undefined') { + // detect presence of vue-server-renderer and avoid + // Webpack shimming the process + _isServer = global['process'].env.VUE_ENV === 'server'; + } else { + _isServer = false; + } + } + return _isServer +}; + // detect devtools var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__; @@ -5012,14 +4943,20 @@ var nextTick = (function () { } return function queueNextTick (cb, ctx) { - var func = ctx - ? function () { cb.call(ctx); } - : cb; - callbacks.push(func); + var _resolve; + callbacks.push(function () { + if (cb) { cb.call(ctx); } + if (_resolve) { _resolve(ctx); } + }); if (!pending) { pending = true; timerFunc(); } + if (!cb && typeof Promise !== 'undefined') { + return new Promise(function (resolve) { + _resolve = resolve; + }) + } } })(); @@ -5048,61 +4985,140 @@ if (typeof Set !== 'undefined' && isNative(Set)) { }()); } -/* not type checking this file because flow doesn't play well with Proxy */ +/* */ -var hasProxy; -var proxyHandlers; -var initProxy; +var config = { + /** + * Option merge strategies (used in core/util/options) + */ + optionMergeStrategies: Object.create(null), -if (process.env.NODE_ENV !== 'production') { - var allowedGlobals = makeMap( - 'Infinity,undefined,NaN,isFinite,isNaN,' + - 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' + - 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' + - 'require' // for Webpack/Browserify - ); + /** + * Whether to suppress warnings. + */ + silent: false, - hasProxy = - typeof Proxy !== 'undefined' && - Proxy.toString().match(/native code/); + /** + * Whether to enable devtools + */ + devtools: process.env.NODE_ENV !== 'production', - proxyHandlers = { - has: function has (target, key) { - var has = key in target; - var isAllowed = allowedGlobals(key) || key.charAt(0) === '_'; - if (!has && !isAllowed) { - warn( - "Property or method \"" + key + "\" is not defined on the instance but " + - "referenced during render. Make sure to declare reactive data " + - "properties in the data option.", - target - ); - } - return has || !isAllowed - } - }; + /** + * Error handler for watcher errors + */ + errorHandler: null, - initProxy = function initProxy (vm) { - if (hasProxy) { - vm._renderProxy = new Proxy(vm, proxyHandlers); - } else { - vm._renderProxy = vm; - } - }; -} + /** + * Ignore certain custom elements + */ + ignoredElements: null, -/* */ + /** + * Custom user key aliases for v-on + */ + keyCodes: Object.create(null), + /** + * Check if a tag is reserved so that it cannot be registered as a + * component. This is platform-dependent and may be overwritten. + */ + isReservedTag: no, -var uid$2 = 0; + /** + * Check if a tag is an unknown element. + * Platform-dependent. + */ + isUnknownElement: no, -/** - * A dep is an observable that can have multiple - * directives subscribing to it. - */ -var Dep = function Dep () { - this.id = uid$2++; - this.subs = []; + /** + * Get the namespace of an element + */ + getTagNamespace: noop, + + /** + * Check if an attribute must be bound using property, e.g. value + * Platform-dependent. + */ + mustUseProp: no, + + /** + * List of asset types that a component can own. + */ + _assetTypes: [ + 'component', + 'directive', + 'filter' + ], + + /** + * List of lifecycle hooks. + */ + _lifecycleHooks: [ + 'beforeCreate', + 'created', + 'beforeMount', + 'mounted', + 'beforeUpdate', + 'updated', + 'beforeDestroy', + 'destroyed', + 'activated', + 'deactivated' + ], + + /** + * Max circular updates allowed in a scheduler flush cycle. + */ + _maxUpdateCount: 100 +}; + +var warn = noop; +var formatComponentName; + +if (process.env.NODE_ENV !== 'production') { + var hasConsole = typeof console !== 'undefined'; + + warn = function (msg, vm) { + if (hasConsole && (!config.silent)) { + console.error("[Vue warn]: " + msg + " " + ( + vm ? formatLocation(formatComponentName(vm)) : '' + )); + } + }; + + formatComponentName = function (vm) { + if (vm.$root === vm) { + return 'root instance' + } + var name = vm._isVue + ? vm.$options.name || vm.$options._componentTag + : vm.name; + return ( + (name ? ("component <" + name + ">") : "anonymous component") + + (vm._isVue && vm.$options.__file ? (" at " + (vm.$options.__file)) : '') + ) + }; + + var formatLocation = function (str) { + if (str === 'anonymous component') { + str += " - use the \"name\" option for better debugging messages."; + } + return ("\n(found in " + str + ")") + }; +} + +/* */ + + +var uid$1 = 0; + +/** + * A dep is an observable that can have multiple + * directives subscribing to it. + */ +var Dep = function Dep () { + this.id = uid$1++; + this.subs = []; }; Dep.prototype.addSub = function addSub (sub) { @@ -5142,2634 +5158,2697 @@ function popTarget () { Dep.target = targetStack.pop(); } +/* + * not type checking this file because flow doesn't play well with + * dynamically accessing methods on Array prototype + */ + +var arrayProto = Array.prototype; +var arrayMethods = Object.create(arrayProto);[ + 'push', + 'pop', + 'shift', + 'unshift', + 'splice', + 'sort', + 'reverse' +] +.forEach(function (method) { + // cache original method + var original = arrayProto[method]; + def(arrayMethods, method, function mutator () { + var arguments$1 = arguments; + + // avoid leaking arguments: + // http://jsperf.com/closure-with-arguments + var i = arguments.length; + var args = new Array(i); + while (i--) { + args[i] = arguments$1[i]; + } + var result = original.apply(this, args); + var ob = this.__ob__; + var inserted; + switch (method) { + case 'push': + inserted = args; + break + case 'unshift': + inserted = args; + break + case 'splice': + inserted = args.slice(2); + break + } + if (inserted) { ob.observeArray(inserted); } + // notify change + ob.dep.notify(); + return result + }); +}); + /* */ +var arrayKeys = Object.getOwnPropertyNames(arrayMethods); -var queue = []; -var has$1 = {}; -var circular = {}; -var waiting = false; -var flushing = false; -var index = 0; +/** + * By default, when a reactive property is set, the new value is + * also converted to become reactive. However when passing down props, + * we don't want to force conversion because the value may be a nested value + * under a frozen data structure. Converting it would defeat the optimization. + */ +var observerState = { + shouldConvert: true, + isSettingProps: false +}; /** - * Reset the scheduler's state. + * Observer class that are attached to each observed + * object. Once attached, the observer converts target + * object's property keys into getter/setters that + * collect dependencies and dispatches updates. */ -function resetSchedulerState () { - queue.length = 0; - has$1 = {}; - if (process.env.NODE_ENV !== 'production') { - circular = {}; +var Observer = function Observer (value) { + this.value = value; + this.dep = new Dep(); + this.vmCount = 0; + def(value, '__ob__', this); + if (Array.isArray(value)) { + var augment = hasProto + ? protoAugment + : copyAugment; + augment(value, arrayMethods, arrayKeys); + this.observeArray(value); + } else { + this.walk(value); } - waiting = flushing = false; -} +}; /** - * Flush both queues and run the watchers. + * Walk through each property and convert them into + * getter/setters. This method should only be called when + * value type is Object. */ -function flushSchedulerQueue () { - flushing = true; - - // Sort queue before flush. - // This ensures that: - // 1. Components are updated from parent to child. (because parent is always - // created before the child) - // 2. A component's user watchers are run before its render watcher (because - // user watchers are created before the render watcher) - // 3. If a component is destroyed during a parent component's watcher run, - // its watchers can be skipped. - queue.sort(function (a, b) { return a.id - b.id; }); - - // do not cache length because more watchers might be pushed - // as we run existing watchers - for (index = 0; index < queue.length; index++) { - var watcher = queue[index]; - var id = watcher.id; - has$1[id] = null; - watcher.run(); - // in dev build, check and stop circular updates. - if (process.env.NODE_ENV !== 'production' && has$1[id] != null) { - circular[id] = (circular[id] || 0) + 1; - if (circular[id] > config._maxUpdateCount) { - warn( - 'You may have an infinite update loop ' + ( - watcher.user - ? ("in watcher with expression \"" + (watcher.expression) + "\"") - : "in a component render function." - ), - watcher.vm - ); - break - } - } +Observer.prototype.walk = function walk (obj) { + var keys = Object.keys(obj); + for (var i = 0; i < keys.length; i++) { + defineReactive$$1(obj, keys[i], obj[keys[i]]); } +}; - // devtool hook - /* istanbul ignore if */ - if (devtools && config.devtools) { - devtools.emit('flush'); +/** + * Observe a list of Array items. + */ +Observer.prototype.observeArray = function observeArray (items) { + for (var i = 0, l = items.length; i < l; i++) { + observe(items[i]); } +}; - resetSchedulerState(); +// helpers + +/** + * Augment an target Object or Array by intercepting + * the prototype chain using __proto__ + */ +function protoAugment (target, src) { + /* eslint-disable no-proto */ + target.__proto__ = src; + /* eslint-enable no-proto */ } /** - * Push a watcher into the watcher queue. - * Jobs with duplicate IDs will be skipped unless it's - * pushed when the queue is being flushed. + * Augment an target Object or Array by defining + * hidden properties. + * + * istanbul ignore next */ -function queueWatcher (watcher) { - var id = watcher.id; - if (has$1[id] == null) { - has$1[id] = true; - if (!flushing) { - queue.push(watcher); - } else { - // if already flushing, splice the watcher based on its id - // if already past its id, it will be run next immediately. - var i = queue.length - 1; - while (i >= 0 && queue[i].id > watcher.id) { - i--; - } - queue.splice(Math.max(i, index) + 1, 0, watcher); - } - // queue the flush - if (!waiting) { - waiting = true; - nextTick(flushSchedulerQueue); - } +function copyAugment (target, src, keys) { + for (var i = 0, l = keys.length; i < l; i++) { + var key = keys[i]; + def(target, key, src[key]); } } -/* */ - -var uid$1 = 0; +/** + * Attempt to create an observer instance for a value, + * returns the new observer if successfully observed, + * or the existing observer if the value already has one. + */ +function observe (value) { + if (!isObject(value)) { + return + } + var ob; + if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) { + ob = value.__ob__; + } else if ( + observerState.shouldConvert && + !isServerRendering() && + (Array.isArray(value) || isPlainObject(value)) && + Object.isExtensible(value) && + !value._isVue + ) { + ob = new Observer(value); + } + return ob +} /** - * A watcher parses an expression, collects dependencies, - * and fires callback when the expression value changes. - * This is used for both the $watch() api and directives. + * Define a reactive property on an Object. */ -var Watcher = function Watcher ( - vm, - expOrFn, - cb, - options +function defineReactive$$1 ( + obj, + key, + val, + customSetter ) { - if ( options === void 0 ) options = {}; + var dep = new Dep(); - this.vm = vm; - vm._watchers.push(this); - // options - this.deep = !!options.deep; - this.user = !!options.user; - this.lazy = !!options.lazy; - this.sync = !!options.sync; - this.expression = expOrFn.toString(); - this.cb = cb; - this.id = ++uid$1; // uid for batching - this.active = true; - this.dirty = this.lazy; // for lazy watchers - this.deps = []; - this.newDeps = []; - this.depIds = new _Set(); - this.newDepIds = new _Set(); - // parse expression for getter - if (typeof expOrFn === 'function') { - this.getter = expOrFn; - } else { - this.getter = parsePath(expOrFn); - if (!this.getter) { - this.getter = function () {}; - process.env.NODE_ENV !== 'production' && warn( - "Failed watching path: \"" + expOrFn + "\" " + - 'Watcher only accepts simple dot-delimited paths. ' + - 'For full control, use a function instead.', - vm - ); - } + var property = Object.getOwnPropertyDescriptor(obj, key); + if (property && property.configurable === false) { + return } - this.value = this.lazy - ? undefined - : this.get(); -}; + + // cater for pre-defined getter/setters + var getter = property && property.get; + var setter = property && property.set; + + var childOb = observe(val); + Object.defineProperty(obj, key, { + enumerable: true, + configurable: true, + get: function reactiveGetter () { + var value = getter ? getter.call(obj) : val; + if (Dep.target) { + dep.depend(); + if (childOb) { + childOb.dep.depend(); + } + if (Array.isArray(value)) { + dependArray(value); + } + } + return value + }, + set: function reactiveSetter (newVal) { + var value = getter ? getter.call(obj) : val; + /* eslint-disable no-self-compare */ + if (newVal === value || (newVal !== newVal && value !== value)) { + return + } + /* eslint-enable no-self-compare */ + if (process.env.NODE_ENV !== 'production' && customSetter) { + customSetter(); + } + if (setter) { + setter.call(obj, newVal); + } else { + val = newVal; + } + childOb = observe(newVal); + dep.notify(); + } + }); +} /** - * Evaluate the getter, and re-collect dependencies. + * Set a property on an object. Adds the new property and + * triggers change notification if the property doesn't + * already exist. */ -Watcher.prototype.get = function get () { - pushTarget(this); - var value = this.getter.call(this.vm, this.vm); - // "touch" every property so they are all tracked as - // dependencies for deep watching - if (this.deep) { - traverse(value); +function set (obj, key, val) { + if (Array.isArray(obj)) { + obj.length = Math.max(obj.length, key); + obj.splice(key, 1, val); + return val } - popTarget(); - this.cleanupDeps(); - return value -}; + if (hasOwn(obj, key)) { + obj[key] = val; + return + } + var ob = obj.__ob__; + if (obj._isVue || (ob && ob.vmCount)) { + process.env.NODE_ENV !== 'production' && warn( + 'Avoid adding reactive properties to a Vue instance or its root $data ' + + 'at runtime - declare it upfront in the data option.' + ); + return + } + if (!ob) { + obj[key] = val; + return + } + defineReactive$$1(ob.value, key, val); + ob.dep.notify(); + return val +} /** - * Add a dependency to this directive. + * Delete a property and trigger change if necessary. */ -Watcher.prototype.addDep = function addDep (dep) { - var id = dep.id; - if (!this.newDepIds.has(id)) { - this.newDepIds.add(id); - this.newDeps.push(dep); - if (!this.depIds.has(id)) { - dep.addSub(this); - } +function del (obj, key) { + var ob = obj.__ob__; + if (obj._isVue || (ob && ob.vmCount)) { + process.env.NODE_ENV !== 'production' && warn( + 'Avoid deleting properties on a Vue instance or its root $data ' + + '- just set it to null.' + ); + return } -}; + if (!hasOwn(obj, key)) { + return + } + delete obj[key]; + if (!ob) { + return + } + ob.dep.notify(); +} /** - * Clean up for dependency collection. + * Collect dependencies on array elements when the array is touched, since + * we cannot intercept array element access like property getters. */ -Watcher.prototype.cleanupDeps = function cleanupDeps () { - var this$1 = this; - - var i = this.deps.length; - while (i--) { - var dep = this$1.deps[i]; - if (!this$1.newDepIds.has(dep.id)) { - dep.removeSub(this$1); +function dependArray (value) { + for (var e = (void 0), i = 0, l = value.length; i < l; i++) { + e = value[i]; + e && e.__ob__ && e.__ob__.dep.depend(); + if (Array.isArray(e)) { + dependArray(e); } } - var tmp = this.depIds; - this.depIds = this.newDepIds; - this.newDepIds = tmp; - this.newDepIds.clear(); - tmp = this.deps; - this.deps = this.newDeps; - this.newDeps = tmp; - this.newDeps.length = 0; -}; +} + +/* */ /** - * Subscriber interface. - * Will be called when a dependency changes. + * Option overwriting strategies are functions that handle + * how to merge a parent option value and a child option + * value into the final value. */ -Watcher.prototype.update = function update () { - /* istanbul ignore else */ - if (this.lazy) { - this.dirty = true; - } else if (this.sync) { - this.run(); - } else { - queueWatcher(this); - } -}; +var strats = config.optionMergeStrategies; /** - * Scheduler job interface. - * Will be called by the scheduler. + * Options with restrictions */ -Watcher.prototype.run = function run () { - if (this.active) { - var value = this.get(); - if ( - value !== this.value || - // Deep watchers and watchers on Object/Arrays should fire even - // when the value is the same, because the value may - // have mutated. - isObject(value) || - this.deep - ) { - // set new value - var oldValue = this.value; - this.value = value; - if (this.user) { - try { - this.cb.call(this.vm, value, oldValue); - } catch (e) { - process.env.NODE_ENV !== 'production' && warn( - ("Error in watcher \"" + (this.expression) + "\""), - this.vm - ); - /* istanbul ignore else */ - if (config.errorHandler) { - config.errorHandler.call(null, e, this.vm); - } else { - throw e - } - } +if (process.env.NODE_ENV !== 'production') { + strats.el = strats.propsData = function (parent, child, vm, key) { + if (!vm) { + warn( + "option \"" + key + "\" can only be used during instance " + + 'creation with the `new` keyword.' + ); + } + return defaultStrat(parent, child) + }; +} + +/** + * Helper that recursively merges two data objects together. + */ +function mergeData (to, from) { + if (!from) { return to } + var key, toVal, fromVal; + var keys = Object.keys(from); + for (var i = 0; i < keys.length; i++) { + key = keys[i]; + toVal = to[key]; + fromVal = from[key]; + if (!hasOwn(to, key)) { + set(to, key, fromVal); + } else if (isPlainObject(toVal) && isPlainObject(fromVal)) { + mergeData(toVal, fromVal); + } + } + return to +} + +/** + * Data + */ +strats.data = function ( + parentVal, + childVal, + vm +) { + if (!vm) { + // in a Vue.extend merge, both should be functions + if (!childVal) { + return parentVal + } + if (typeof childVal !== 'function') { + process.env.NODE_ENV !== 'production' && warn( + 'The "data" option should be a function ' + + 'that returns a per-instance value in component ' + + 'definitions.', + vm + ); + return parentVal + } + if (!parentVal) { + return childVal + } + // when parentVal & childVal are both present, + // we need to return a function that returns the + // merged result of both functions... no need to + // check if parentVal is a function here because + // it has to be a function to pass previous merges. + return function mergedDataFn () { + return mergeData( + childVal.call(this), + parentVal.call(this) + ) + } + } else if (parentVal || childVal) { + return function mergedInstanceDataFn () { + // instance merge + var instanceData = typeof childVal === 'function' + ? childVal.call(vm) + : childVal; + var defaultData = typeof parentVal === 'function' + ? parentVal.call(vm) + : undefined; + if (instanceData) { + return mergeData(instanceData, defaultData) } else { - this.cb.call(this.vm, value, oldValue); + return defaultData } } } }; /** - * Evaluate the value of the watcher. - * This only gets called for lazy watchers. + * Hooks and param attributes are merged as arrays. */ -Watcher.prototype.evaluate = function evaluate () { - this.value = this.get(); - this.dirty = false; -}; +function mergeHook ( + parentVal, + childVal +) { + return childVal + ? parentVal + ? parentVal.concat(childVal) + : Array.isArray(childVal) + ? childVal + : [childVal] + : parentVal +} + +config._lifecycleHooks.forEach(function (hook) { + strats[hook] = mergeHook; +}); /** - * Depend on all deps collected by this watcher. + * Assets + * + * When a vm is present (instance creation), we need to do + * a three-way merge between constructor options, instance + * options and parent options. */ -Watcher.prototype.depend = function depend () { - var this$1 = this; +function mergeAssets (parentVal, childVal) { + var res = Object.create(parentVal || null); + return childVal + ? extend(res, childVal) + : res +} - var i = this.deps.length; - while (i--) { - this$1.deps[i].depend(); - } -}; +config._assetTypes.forEach(function (type) { + strats[type + 's'] = mergeAssets; +}); /** - * Remove self from all dependencies' subscriber list. + * Watchers. + * + * Watchers hashes should not overwrite one + * another, so we merge them as arrays. */ -Watcher.prototype.teardown = function teardown () { - var this$1 = this; - - if (this.active) { - // remove self from vm's watcher list - // this is a somewhat expensive operation so we skip it - // if the vm is being destroyed or is performing a v-for - // re-render (the watcher list is then filtered by v-for). - if (!this.vm._isBeingDestroyed && !this.vm._vForRemoving) { - remove$1(this.vm._watchers, this); - } - var i = this.deps.length; - while (i--) { - this$1.deps[i].removeSub(this$1); +strats.watch = function (parentVal, childVal) { + /* istanbul ignore if */ + if (!childVal) { return parentVal } + if (!parentVal) { return childVal } + var ret = {}; + extend(ret, parentVal); + for (var key in childVal) { + var parent = ret[key]; + var child = childVal[key]; + if (parent && !Array.isArray(parent)) { + parent = [parent]; } - this.active = false; + ret[key] = parent + ? parent.concat(child) + : [child]; } + return ret }; /** - * Recursively traverse an object to evoke all converted - * getters, so that every nested property inside the object - * is collected as a "deep" dependency. + * Other object hashes. */ -var seenObjects = new _Set(); -function traverse (val) { - seenObjects.clear(); - _traverse(val, seenObjects); -} +strats.props = +strats.methods = +strats.computed = function (parentVal, childVal) { + if (!childVal) { return parentVal } + if (!parentVal) { return childVal } + var ret = Object.create(null); + extend(ret, parentVal); + extend(ret, childVal); + return ret +}; -function _traverse (val, seen) { - var i, keys; - var isA = Array.isArray(val); - if ((!isA && !isObject(val)) || !Object.isExtensible(val)) { - return - } - if (val.__ob__) { - var depId = val.__ob__.dep.id; - if (seen.has(depId)) { - return +/** + * Default strategy. + */ +var defaultStrat = function (parentVal, childVal) { + return childVal === undefined + ? parentVal + : childVal +}; + +/** + * Validate component names + */ +function checkComponents (options) { + for (var key in options.components) { + var lower = key.toLowerCase(); + if (isBuiltInTag(lower) || config.isReservedTag(lower)) { + warn( + 'Do not use built-in or reserved HTML elements as component ' + + 'id: ' + key + ); } - seen.add(depId); - } - if (isA) { - i = val.length; - while (i--) { _traverse(val[i], seen); } - } else { - keys = Object.keys(val); - i = keys.length; - while (i--) { _traverse(val[keys[i]], seen); } } } -/* - * not type checking this file because flow doesn't play well with - * dynamically accessing methods on Array prototype +/** + * Ensure all props option syntax are normalized into the + * Object-based format. */ - -var arrayProto = Array.prototype; -var arrayMethods = Object.create(arrayProto);[ - 'push', - 'pop', - 'shift', - 'unshift', - 'splice', - 'sort', - 'reverse' -] -.forEach(function (method) { - // cache original method - var original = arrayProto[method]; - def(arrayMethods, method, function mutator () { - var arguments$1 = arguments; - - // avoid leaking arguments: - // http://jsperf.com/closure-with-arguments - var i = arguments.length; - var args = new Array(i); +function normalizeProps (options) { + var props = options.props; + if (!props) { return } + var res = {}; + var i, val, name; + if (Array.isArray(props)) { + i = props.length; while (i--) { - args[i] = arguments$1[i]; + val = props[i]; + if (typeof val === 'string') { + name = camelize(val); + res[name] = { type: null }; + } else if (process.env.NODE_ENV !== 'production') { + warn('props must be strings when using array syntax.'); + } } - var result = original.apply(this, args); - var ob = this.__ob__; - var inserted; - switch (method) { - case 'push': - inserted = args; - break - case 'unshift': - inserted = args; - break - case 'splice': - inserted = args.slice(2); - break + } else if (isPlainObject(props)) { + for (var key in props) { + val = props[key]; + name = camelize(key); + res[name] = isPlainObject(val) + ? val + : { type: val }; } - if (inserted) { ob.observeArray(inserted); } - // notify change - ob.dep.notify(); - return result - }); -}); - -/* */ - -var arrayKeys = Object.getOwnPropertyNames(arrayMethods); - -/** - * By default, when a reactive property is set, the new value is - * also converted to become reactive. However when passing down props, - * we don't want to force conversion because the value may be a nested value - * under a frozen data structure. Converting it would defeat the optimization. - */ -var observerState = { - shouldConvert: true, - isSettingProps: false -}; - -/** - * Observer class that are attached to each observed - * object. Once attached, the observer converts target - * object's property keys into getter/setters that - * collect dependencies and dispatches updates. - */ -var Observer = function Observer (value) { - this.value = value; - this.dep = new Dep(); - this.vmCount = 0; - def(value, '__ob__', this); - if (Array.isArray(value)) { - var augment = hasProto - ? protoAugment - : copyAugment; - augment(value, arrayMethods, arrayKeys); - this.observeArray(value); - } else { - this.walk(value); - } -}; - -/** - * Walk through each property and convert them into - * getter/setters. This method should only be called when - * value type is Object. - */ -Observer.prototype.walk = function walk (obj) { - var keys = Object.keys(obj); - for (var i = 0; i < keys.length; i++) { - defineReactive$$1(obj, keys[i], obj[keys[i]]); } -}; + options.props = res; +} /** - * Observe a list of Array items. + * Normalize raw function directives into object format. */ -Observer.prototype.observeArray = function observeArray (items) { - for (var i = 0, l = items.length; i < l; i++) { - observe(items[i]); +function normalizeDirectives (options) { + var dirs = options.directives; + if (dirs) { + for (var key in dirs) { + var def = dirs[key]; + if (typeof def === 'function') { + dirs[key] = { bind: def, update: def }; + } + } } -}; - -// helpers - -/** - * Augment an target Object or Array by intercepting - * the prototype chain using __proto__ - */ -function protoAugment (target, src) { - /* eslint-disable no-proto */ - target.__proto__ = src; - /* eslint-enable no-proto */ } /** - * Augment an target Object or Array by defining - * hidden properties. - * - * istanbul ignore next + * Merge two option objects into a new one. + * Core utility used in both instantiation and inheritance. */ -function copyAugment (target, src, keys) { - for (var i = 0, l = keys.length; i < l; i++) { - var key = keys[i]; - def(target, key, src[key]); +function mergeOptions ( + parent, + child, + vm +) { + if (process.env.NODE_ENV !== 'production') { + checkComponents(child); + } + normalizeProps(child); + normalizeDirectives(child); + var extendsFrom = child.extends; + if (extendsFrom) { + parent = typeof extendsFrom === 'function' + ? mergeOptions(parent, extendsFrom.options, vm) + : mergeOptions(parent, extendsFrom, vm); + } + if (child.mixins) { + for (var i = 0, l = child.mixins.length; i < l; i++) { + var mixin = child.mixins[i]; + if (mixin.prototype instanceof Vue$2) { + mixin = mixin.options; + } + parent = mergeOptions(parent, mixin, vm); + } + } + var options = {}; + var key; + for (key in parent) { + mergeField(key); + } + for (key in child) { + if (!hasOwn(parent, key)) { + mergeField(key); + } } + function mergeField (key) { + var strat = strats[key] || defaultStrat; + options[key] = strat(parent[key], child[key], vm, key); + } + return options } /** - * Attempt to create an observer instance for a value, - * returns the new observer if successfully observed, - * or the existing observer if the value already has one. + * Resolve an asset. + * This function is used because child instances need access + * to assets defined in its ancestor chain. */ -function observe (value) { - if (!isObject(value)) { +function resolveAsset ( + options, + type, + id, + warnMissing +) { + /* istanbul ignore if */ + if (typeof id !== 'string') { return } - var ob; - if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) { - ob = value.__ob__; - } else if ( - observerState.shouldConvert && - !config._isServer && - (Array.isArray(value) || isPlainObject(value)) && - Object.isExtensible(value) && - !value._isVue - ) { - ob = new Observer(value); + var assets = options[type]; + var res = assets[id] || + // camelCase ID + assets[camelize(id)] || + // Pascal Case ID + assets[capitalize(camelize(id))]; + if (process.env.NODE_ENV !== 'production' && warnMissing && !res) { + warn( + 'Failed to resolve ' + type.slice(0, -1) + ': ' + id, + options + ); } - return ob + return res } -/** - * Define a reactive property on an Object. - */ -function defineReactive$$1 ( - obj, +/* */ + +function validateProp ( key, - val, - customSetter + propOptions, + propsData, + vm ) { - var dep = new Dep(); - - var property = Object.getOwnPropertyDescriptor(obj, key); - if (property && property.configurable === false) { - return + var prop = propOptions[key]; + var absent = !hasOwn(propsData, key); + var value = propsData[key]; + // handle boolean props + if (isBooleanType(prop.type)) { + if (absent && !hasOwn(prop, 'default')) { + value = false; + } else if (value === '' || value === hyphenate(key)) { + value = true; + } } - - // cater for pre-defined getter/setters - var getter = property && property.get; - var setter = property && property.set; - - var childOb = observe(val); - Object.defineProperty(obj, key, { - enumerable: true, - configurable: true, - get: function reactiveGetter () { - var value = getter ? getter.call(obj) : val; - if (Dep.target) { - dep.depend(); - if (childOb) { - childOb.dep.depend(); - } - if (Array.isArray(value)) { - dependArray(value); - } - } - return value - }, - set: function reactiveSetter (newVal) { - var value = getter ? getter.call(obj) : val; - if (newVal === value) { - return - } - if (process.env.NODE_ENV !== 'production' && customSetter) { - customSetter(); - } - if (setter) { - setter.call(obj, newVal); - } else { - val = newVal; - } - childOb = observe(newVal); - dep.notify(); - } - }); + // check default value + if (value === undefined) { + value = getPropDefaultValue(vm, prop, key); + // since the default value is a fresh copy, + // make sure to observe it. + var prevShouldConvert = observerState.shouldConvert; + observerState.shouldConvert = true; + observe(value); + observerState.shouldConvert = prevShouldConvert; + } + if (process.env.NODE_ENV !== 'production') { + assertProp(prop, key, value, vm, absent); + } + return value } /** - * Set a property on an object. Adds the new property and - * triggers change notification if the property doesn't - * already exist. + * Get the default value of a prop. */ -function set (obj, key, val) { - if (Array.isArray(obj)) { - obj.length = Math.max(obj.length, key); - obj.splice(key, 1, val); - return val - } - if (hasOwn(obj, key)) { - obj[key] = val; - return +function getPropDefaultValue (vm, prop, key) { + // no default, return undefined + if (!hasOwn(prop, 'default')) { + return undefined } - var ob = obj.__ob__; - if (obj._isVue || (ob && ob.vmCount)) { + var def = prop.default; + // warn against non-factory defaults for Object & Array + if (isObject(def)) { process.env.NODE_ENV !== 'production' && warn( - 'Avoid adding reactive properties to a Vue instance or its root $data ' + - 'at runtime - declare it upfront in the data option.' + 'Invalid default value for prop "' + key + '": ' + + 'Props with type Object/Array must use a factory function ' + + 'to return the default value.', + vm ); - return } - if (!ob) { - obj[key] = val; - return + // the raw prop value was also undefined from previous render, + // return previous default value to avoid unnecessary watcher trigger + if (vm && vm.$options.propsData && + vm.$options.propsData[key] === undefined && + vm[key] !== undefined) { + return vm[key] } - defineReactive$$1(ob.value, key, val); - ob.dep.notify(); - return val + // call factory function for non-Function types + return typeof def === 'function' && prop.type !== Function + ? def.call(vm) + : def } /** - * Delete a property and trigger change if necessary. + * Assert whether a prop is valid. */ -function del (obj, key) { - var ob = obj.__ob__; - if (obj._isVue || (ob && ob.vmCount)) { - process.env.NODE_ENV !== 'production' && warn( - 'Avoid deleting properties on a Vue instance or its root $data ' + - '- just set it to null.' +function assertProp ( + prop, + name, + value, + vm, + absent +) { + if (prop.required && absent) { + warn( + 'Missing required prop: "' + name + '"', + vm ); return } - if (!hasOwn(obj, key)) { + if (value == null && !prop.required) { return } - delete obj[key]; - if (!ob) { + var type = prop.type; + var valid = !type || type === true; + var expectedTypes = []; + if (type) { + if (!Array.isArray(type)) { + type = [type]; + } + for (var i = 0; i < type.length && !valid; i++) { + var assertedType = assertType(value, type[i]); + expectedTypes.push(assertedType.expectedType); + valid = assertedType.valid; + } + } + if (!valid) { + warn( + 'Invalid prop: type check failed for prop "' + name + '".' + + ' Expected ' + expectedTypes.map(capitalize).join(', ') + + ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.', + vm + ); return } - ob.dep.notify(); + var validator = prop.validator; + if (validator) { + if (!validator(value)) { + warn( + 'Invalid prop: custom validator check failed for prop "' + name + '".', + vm + ); + } + } } /** - * Collect dependencies on array elements when the array is touched, since - * we cannot intercept array element access like property getters. + * Assert the type of a value */ -function dependArray (value) { - for (var e = (void 0), i = 0, l = value.length; i < l; i++) { - e = value[i]; - e && e.__ob__ && e.__ob__.dep.depend(); - if (Array.isArray(e)) { - dependArray(e); - } +function assertType (value, type) { + var valid; + var expectedType = getType(type); + if (expectedType === 'String') { + valid = typeof value === (expectedType = 'string'); + } else if (expectedType === 'Number') { + valid = typeof value === (expectedType = 'number'); + } else if (expectedType === 'Boolean') { + valid = typeof value === (expectedType = 'boolean'); + } else if (expectedType === 'Function') { + valid = typeof value === (expectedType = 'function'); + } else if (expectedType === 'Object') { + valid = isPlainObject(value); + } else if (expectedType === 'Array') { + valid = Array.isArray(value); + } else { + valid = value instanceof type; + } + return { + valid: valid, + expectedType: expectedType } } -/* */ - -function initState (vm) { - vm._watchers = []; - initProps(vm); - initData(vm); - initComputed(vm); - initMethods(vm); - initWatch(vm); -} - -function initProps (vm) { - var props = vm.$options.props; - if (props) { - var propsData = vm.$options.propsData || {}; - var keys = vm.$options._propKeys = Object.keys(props); - var isRoot = !vm.$parent; - // root instance props should be converted - observerState.shouldConvert = isRoot; - var loop = function ( i ) { - var key = keys[i]; - /* istanbul ignore else */ - if (process.env.NODE_ENV !== 'production') { - defineReactive$$1(vm, key, validateProp(key, props, propsData, vm), function () { - if (vm.$parent && !observerState.isSettingProps) { - warn( - "Avoid mutating a prop directly since the value will be " + - "overwritten whenever the parent component re-renders. " + - "Instead, use a data or computed property based on the prop's " + - "value. Prop being mutated: \"" + key + "\"", - vm - ); - } - }); - } else { - defineReactive$$1(vm, key, validateProp(key, props, propsData, vm)); - } - }; - - for (var i = 0; i < keys.length; i++) loop( i ); - observerState.shouldConvert = true; - } +/** + * Use function string name to check built-in types, + * because a simple equality check will fail when running + * across different vms / iframes. + */ +function getType (fn) { + var match = fn && fn.toString().match(/^\s*function (\w+)/); + return match && match[1] } -function initData (vm) { - var data = vm.$options.data; - data = vm._data = typeof data === 'function' - ? data.call(vm) - : data || {}; - if (!isPlainObject(data)) { - data = {}; - process.env.NODE_ENV !== 'production' && warn( - 'data functions should return an object.', - vm - ); +function isBooleanType (fn) { + if (!Array.isArray(fn)) { + return getType(fn) === 'Boolean' } - // proxy data on instance - var keys = Object.keys(data); - var props = vm.$options.props; - var i = keys.length; - while (i--) { - if (props && hasOwn(props, keys[i])) { - process.env.NODE_ENV !== 'production' && warn( - "The data property \"" + (keys[i]) + "\" is already declared as a prop. " + - "Use prop default value instead.", - vm - ); - } else { - proxy(vm, keys[i]); + for (var i = 0, len = fn.length; i < len; i++) { + if (getType(fn[i]) === 'Boolean') { + return true } } - // observe data - observe(data); - data.__ob__ && data.__ob__.vmCount++; + /* istanbul ignore next */ + return false } -var computedSharedDefinition = { - enumerable: true, - configurable: true, - get: noop, - set: noop -}; -function initComputed (vm) { - var computed = vm.$options.computed; - if (computed) { - for (var key in computed) { - var userDef = computed[key]; - if (typeof userDef === 'function') { - computedSharedDefinition.get = makeComputedGetter(userDef, vm); - computedSharedDefinition.set = noop; - } else { - computedSharedDefinition.get = userDef.get - ? userDef.cache !== false - ? makeComputedGetter(userDef.get, vm) - : bind$1(userDef.get, vm) - : noop; - computedSharedDefinition.set = userDef.set - ? bind$1(userDef.set, vm) - : noop; + +var util = Object.freeze({ + defineReactive: defineReactive$$1, + _toString: _toString, + toNumber: toNumber, + makeMap: makeMap, + isBuiltInTag: isBuiltInTag, + remove: remove$1, + hasOwn: hasOwn, + isPrimitive: isPrimitive, + cached: cached, + camelize: camelize, + capitalize: capitalize, + hyphenate: hyphenate, + bind: bind$1, + toArray: toArray, + extend: extend, + isObject: isObject, + isPlainObject: isPlainObject, + toObject: toObject, + noop: noop, + no: no, + genStaticKeys: genStaticKeys, + looseEqual: looseEqual, + looseIndexOf: looseIndexOf, + isReserved: isReserved, + def: def, + parsePath: parsePath, + hasProto: hasProto, + inBrowser: inBrowser, + UA: UA, + isIE: isIE, + isIE9: isIE9, + isEdge: isEdge, + isAndroid: isAndroid, + isIOS: isIOS, + isServerRendering: isServerRendering, + devtools: devtools, + nextTick: nextTick, + get _Set () { return _Set; }, + mergeOptions: mergeOptions, + resolveAsset: resolveAsset, + get warn () { return warn; }, + get formatComponentName () { return formatComponentName; }, + validateProp: validateProp +}); + +/* not type checking this file because flow doesn't play well with Proxy */ + +var initProxy; + +if (process.env.NODE_ENV !== 'production') { + var allowedGlobals = makeMap( + 'Infinity,undefined,NaN,isFinite,isNaN,' + + 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' + + 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' + + 'require' // for Webpack/Browserify + ); + + var warnNonPresent = function (target, key) { + warn( + "Property or method \"" + key + "\" is not defined on the instance but " + + "referenced during render. Make sure to declare reactive data " + + "properties in the data option.", + target + ); + }; + + var hasProxy = + typeof Proxy !== 'undefined' && + Proxy.toString().match(/native code/); + + var hasHandler = { + has: function has (target, key) { + var has = key in target; + var isAllowed = allowedGlobals(key) || key.charAt(0) === '_'; + if (!has && !isAllowed) { + warnNonPresent(target, key); } - Object.defineProperty(vm, key, computedSharedDefinition); + return has || !isAllowed } - } -} + }; -function makeComputedGetter (getter, owner) { - var watcher = new Watcher(owner, getter, noop, { - lazy: true - }); - return function computedGetter () { - if (watcher.dirty) { - watcher.evaluate(); + var getHandler = { + get: function get (target, key) { + if (typeof key === 'string' && !(key in target)) { + warnNonPresent(target, key); + } + return target[key] } - if (Dep.target) { - watcher.depend(); + }; + + initProxy = function initProxy (vm) { + if (hasProxy) { + // determine which proxy handler to use + var options = vm.$options; + var handlers = options.render && options.render._withStripped + ? getHandler + : hasHandler; + vm._renderProxy = new Proxy(vm, handlers); + } else { + vm._renderProxy = vm; } - return watcher.value + }; +} + +/* */ + + +var queue = []; +var has$1 = {}; +var circular = {}; +var waiting = false; +var flushing = false; +var index = 0; + +/** + * Reset the scheduler's state. + */ +function resetSchedulerState () { + queue.length = 0; + has$1 = {}; + if (process.env.NODE_ENV !== 'production') { + circular = {}; } + waiting = flushing = false; } -function initMethods (vm) { - var methods = vm.$options.methods; - if (methods) { - for (var key in methods) { - vm[key] = methods[key] == null ? noop : bind$1(methods[key], vm); - if (process.env.NODE_ENV !== 'production' && methods[key] == null) { +/** + * Flush both queues and run the watchers. + */ +function flushSchedulerQueue () { + flushing = true; + + // Sort queue before flush. + // This ensures that: + // 1. Components are updated from parent to child. (because parent is always + // created before the child) + // 2. A component's user watchers are run before its render watcher (because + // user watchers are created before the render watcher) + // 3. If a component is destroyed during a parent component's watcher run, + // its watchers can be skipped. + queue.sort(function (a, b) { return a.id - b.id; }); + + // do not cache length because more watchers might be pushed + // as we run existing watchers + for (index = 0; index < queue.length; index++) { + var watcher = queue[index]; + var id = watcher.id; + has$1[id] = null; + watcher.run(); + // in dev build, check and stop circular updates. + if (process.env.NODE_ENV !== 'production' && has$1[id] != null) { + circular[id] = (circular[id] || 0) + 1; + if (circular[id] > config._maxUpdateCount) { warn( - "method \"" + key + "\" has an undefined value in the component definition. " + - "Did you reference the function correctly?", - vm + 'You may have an infinite update loop ' + ( + watcher.user + ? ("in watcher with expression \"" + (watcher.expression) + "\"") + : "in a component render function." + ), + watcher.vm ); + break } } } + + // devtool hook + /* istanbul ignore if */ + if (devtools && config.devtools) { + devtools.emit('flush'); + } + + resetSchedulerState(); } -function initWatch (vm) { - var watch = vm.$options.watch; - if (watch) { - for (var key in watch) { - var handler = watch[key]; - if (Array.isArray(handler)) { - for (var i = 0; i < handler.length; i++) { - createWatcher(vm, key, handler[i]); - } - } else { - createWatcher(vm, key, handler); +/** + * Push a watcher into the watcher queue. + * Jobs with duplicate IDs will be skipped unless it's + * pushed when the queue is being flushed. + */ +function queueWatcher (watcher) { + var id = watcher.id; + if (has$1[id] == null) { + has$1[id] = true; + if (!flushing) { + queue.push(watcher); + } else { + // if already flushing, splice the watcher based on its id + // if already past its id, it will be run next immediately. + var i = queue.length - 1; + while (i >= 0 && queue[i].id > watcher.id) { + i--; } + queue.splice(Math.max(i, index) + 1, 0, watcher); + } + // queue the flush + if (!waiting) { + waiting = true; + nextTick(flushSchedulerQueue); } } } -function createWatcher (vm, key, handler) { - var options; - if (isPlainObject(handler)) { - options = handler; - handler = handler.handler; - } - if (typeof handler === 'string') { - handler = vm[handler]; - } - vm.$watch(key, handler, options); -} +/* */ -function stateMixin (Vue) { - // flow somehow has problems with directly declared definition object - // when using Object.defineProperty, so we have to procedurally build up - // the object here. - var dataDef = {}; - dataDef.get = function () { - return this._data - }; - if (process.env.NODE_ENV !== 'production') { - dataDef.set = function (newData) { - warn( - 'Avoid replacing instance root $data. ' + - 'Use nested data properties instead.', - this - ); - }; - } - Object.defineProperty(Vue.prototype, '$data', dataDef); +var uid$2 = 0; - Vue.prototype.$set = set; - Vue.prototype.$delete = del; +/** + * A watcher parses an expression, collects dependencies, + * and fires callback when the expression value changes. + * This is used for both the $watch() api and directives. + */ +var Watcher = function Watcher ( + vm, + expOrFn, + cb, + options +) { + if ( options === void 0 ) options = {}; - Vue.prototype.$watch = function ( - expOrFn, - cb, - options - ) { - var vm = this; - options = options || {}; - options.user = true; - var watcher = new Watcher(vm, expOrFn, cb, options); - if (options.immediate) { - cb.call(vm, watcher.value); - } - return function unwatchFn () { - watcher.teardown(); + this.vm = vm; + vm._watchers.push(this); + // options + this.deep = !!options.deep; + this.user = !!options.user; + this.lazy = !!options.lazy; + this.sync = !!options.sync; + this.expression = expOrFn.toString(); + this.cb = cb; + this.id = ++uid$2; // uid for batching + this.active = true; + this.dirty = this.lazy; // for lazy watchers + this.deps = []; + this.newDeps = []; + this.depIds = new _Set(); + this.newDepIds = new _Set(); + // parse expression for getter + if (typeof expOrFn === 'function') { + this.getter = expOrFn; + } else { + this.getter = parsePath(expOrFn); + if (!this.getter) { + this.getter = function () {}; + process.env.NODE_ENV !== 'production' && warn( + "Failed watching path: \"" + expOrFn + "\" " + + 'Watcher only accepts simple dot-delimited paths. ' + + 'For full control, use a function instead.', + vm + ); } - }; -} - -function proxy (vm, key) { - if (!isReserved(key)) { - Object.defineProperty(vm, key, { - configurable: true, - enumerable: true, - get: function proxyGetter () { - return vm._data[key] - }, - set: function proxySetter (val) { - vm._data[key] = val; - } - }); } -} - -/* */ + this.value = this.lazy + ? undefined + : this.get(); +}; -var VNode = function VNode ( - tag, - data, - children, - text, - elm, - ns, - context, - componentOptions -) { - this.tag = tag; - this.data = data; - this.children = children; - this.text = text; - this.elm = elm; - this.ns = ns; - this.context = context; - this.functionalContext = undefined; - this.key = data && data.key; - this.componentOptions = componentOptions; - this.child = undefined; - this.parent = undefined; - this.raw = false; - this.isStatic = false; - this.isRootInsert = true; - this.isComment = false; - this.isCloned = false; - this.isOnce = false; +/** + * Evaluate the getter, and re-collect dependencies. + */ +Watcher.prototype.get = function get () { + pushTarget(this); + var value = this.getter.call(this.vm, this.vm); + // "touch" every property so they are all tracked as + // dependencies for deep watching + if (this.deep) { + traverse(value); + } + popTarget(); + this.cleanupDeps(); + return value }; -var emptyVNode = function () { - var node = new VNode(); - node.text = ''; - node.isComment = true; - return node +/** + * Add a dependency to this directive. + */ +Watcher.prototype.addDep = function addDep (dep) { + var id = dep.id; + if (!this.newDepIds.has(id)) { + this.newDepIds.add(id); + this.newDeps.push(dep); + if (!this.depIds.has(id)) { + dep.addSub(this); + } + } }; -// optimized shallow clone -// used for static nodes and slot nodes because they may be reused across -// multiple renders, cloning them avoids errors when DOM manipulations rely -// on their elm reference. -function cloneVNode (vnode) { - var cloned = new VNode( - vnode.tag, - vnode.data, - vnode.children, - vnode.text, - vnode.elm, - vnode.ns, - vnode.context, - vnode.componentOptions - ); - cloned.isStatic = vnode.isStatic; - cloned.key = vnode.key; - cloned.isCloned = true; - return cloned -} +/** + * Clean up for dependency collection. + */ +Watcher.prototype.cleanupDeps = function cleanupDeps () { + var this$1 = this; -function cloneVNodes (vnodes) { - var res = new Array(vnodes.length); - for (var i = 0; i < vnodes.length; i++) { - res[i] = cloneVNode(vnodes[i]); + var i = this.deps.length; + while (i--) { + var dep = this$1.deps[i]; + if (!this$1.newDepIds.has(dep.id)) { + dep.removeSub(this$1); + } } - return res -} + var tmp = this.depIds; + this.depIds = this.newDepIds; + this.newDepIds = tmp; + this.newDepIds.clear(); + tmp = this.deps; + this.deps = this.newDeps; + this.newDeps = tmp; + this.newDeps.length = 0; +}; -/* */ +/** + * Subscriber interface. + * Will be called when a dependency changes. + */ +Watcher.prototype.update = function update () { + /* istanbul ignore else */ + if (this.lazy) { + this.dirty = true; + } else if (this.sync) { + this.run(); + } else { + queueWatcher(this); + } +}; -function mergeVNodeHook (def, hookKey, hook, key) { - key = key + hookKey; - var injectedHash = def.__injected || (def.__injected = {}); - if (!injectedHash[key]) { - injectedHash[key] = true; - var oldHook = def[hookKey]; - if (oldHook) { - def[hookKey] = function () { - oldHook.apply(this, arguments); - hook.apply(this, arguments); - }; - } else { - def[hookKey] = hook; +/** + * Scheduler job interface. + * Will be called by the scheduler. + */ +Watcher.prototype.run = function run () { + if (this.active) { + var value = this.get(); + if ( + value !== this.value || + // Deep watchers and watchers on Object/Arrays should fire even + // when the value is the same, because the value may + // have mutated. + isObject(value) || + this.deep + ) { + // set new value + var oldValue = this.value; + this.value = value; + if (this.user) { + try { + this.cb.call(this.vm, value, oldValue); + } catch (e) { + process.env.NODE_ENV !== 'production' && warn( + ("Error in watcher \"" + (this.expression) + "\""), + this.vm + ); + /* istanbul ignore else */ + if (config.errorHandler) { + config.errorHandler.call(null, e, this.vm); + } else { + throw e + } + } + } else { + this.cb.call(this.vm, value, oldValue); + } } } -} +}; -/* */ +/** + * Evaluate the value of the watcher. + * This only gets called for lazy watchers. + */ +Watcher.prototype.evaluate = function evaluate () { + this.value = this.get(); + this.dirty = false; +}; -function updateListeners ( - on, - oldOn, - add, - remove$$1, - vm -) { - var name, cur, old, fn, event, capture; - for (name in on) { - cur = on[name]; - old = oldOn[name]; - if (!cur) { - process.env.NODE_ENV !== 'production' && warn( - "Invalid handler for event \"" + name + "\": got " + String(cur), - vm - ); - } else if (!old) { - capture = name.charAt(0) === '!'; - event = capture ? name.slice(1) : name; - if (Array.isArray(cur)) { - add(event, (cur.invoker = arrInvoker(cur)), capture); - } else { - if (!cur.invoker) { - fn = cur; - cur = on[name] = {}; - cur.fn = fn; - cur.invoker = fnInvoker(cur); - } - add(event, cur.invoker, capture); - } - } else if (cur !== old) { - if (Array.isArray(old)) { - old.length = cur.length; - for (var i = 0; i < old.length; i++) { old[i] = cur[i]; } - on[name] = old; - } else { - old.fn = cur; - on[name] = old; - } - } - } - for (name in oldOn) { - if (!on[name]) { - event = name.charAt(0) === '!' ? name.slice(1) : name; - remove$$1(event, oldOn[name].invoker); - } +/** + * Depend on all deps collected by this watcher. + */ +Watcher.prototype.depend = function depend () { + var this$1 = this; + + var i = this.deps.length; + while (i--) { + this$1.deps[i].depend(); } -} +}; -function arrInvoker (arr) { - return function (ev) { - var arguments$1 = arguments; +/** + * Remove self from all dependencies' subscriber list. + */ +Watcher.prototype.teardown = function teardown () { + var this$1 = this; - var single = arguments.length === 1; - for (var i = 0; i < arr.length; i++) { - single ? arr[i](ev) : arr[i].apply(null, arguments$1); + if (this.active) { + // remove self from vm's watcher list + // this is a somewhat expensive operation so we skip it + // if the vm is being destroyed or is performing a v-for + // re-render (the watcher list is then filtered by v-for). + if (!this.vm._isBeingDestroyed && !this.vm._vForRemoving) { + remove$1(this.vm._watchers, this); + } + var i = this.deps.length; + while (i--) { + this$1.deps[i].removeSub(this$1); } + this.active = false; } -} +}; -function fnInvoker (o) { - return function (ev) { - var single = arguments.length === 1; - single ? o.fn(ev) : o.fn.apply(null, arguments); - } +/** + * Recursively traverse an object to evoke all converted + * getters, so that every nested property inside the object + * is collected as a "deep" dependency. + */ +var seenObjects = new _Set(); +function traverse (val) { + seenObjects.clear(); + _traverse(val, seenObjects); } -/* */ - -function normalizeChildren ( - children, - ns, - nestedIndex -) { - if (isPrimitive(children)) { - return [createTextVNode(children)] +function _traverse (val, seen) { + var i, keys; + var isA = Array.isArray(val); + if ((!isA && !isObject(val)) || !Object.isExtensible(val)) { + return } - if (Array.isArray(children)) { - var res = []; - for (var i = 0, l = children.length; i < l; i++) { - var c = children[i]; - var last = res[res.length - 1]; - // nested - if (Array.isArray(c)) { - res.push.apply(res, normalizeChildren(c, ns, ((nestedIndex || '') + "_" + i))); - } else if (isPrimitive(c)) { - if (last && last.text) { - last.text += String(c); - } else if (c !== '') { - // convert primitive to vnode - res.push(createTextVNode(c)); - } - } else if (c instanceof VNode) { - if (c.text && last && last.text) { - if (!last.isCloned) { - last.text += c.text; - } - } else { - // inherit parent namespace - if (ns) { - applyNS(c, ns); - } - // default key for nested array children (likely generated by v-for) - if (c.tag && c.key == null && nestedIndex != null) { - c.key = "__vlist" + nestedIndex + "_" + i + "__"; - } - res.push(c); - } - } + if (val.__ob__) { + var depId = val.__ob__.dep.id; + if (seen.has(depId)) { + return } - return res + seen.add(depId); } -} - -function createTextVNode (val) { - return new VNode(undefined, undefined, undefined, String(val)) -} - -function applyNS (vnode, ns) { - if (vnode.tag && !vnode.ns) { - vnode.ns = ns; - if (vnode.children) { - for (var i = 0, l = vnode.children.length; i < l; i++) { - applyNS(vnode.children[i], ns); - } - } + if (isA) { + i = val.length; + while (i--) { _traverse(val[i], seen); } + } else { + keys = Object.keys(val); + i = keys.length; + while (i--) { _traverse(val[keys[i]], seen); } } } /* */ -function getFirstComponentChild (children) { - return children && children.filter(function (c) { return c && c.componentOptions; })[0] +function initState (vm) { + vm._watchers = []; + initProps(vm); + initData(vm); + initComputed(vm); + initMethods(vm); + initWatch(vm); } -/* */ - -var activeInstance = null; - -function initLifecycle (vm) { - var options = vm.$options; - - // locate first non-abstract parent - var parent = options.parent; - if (parent && !options.abstract) { - while (parent.$options.abstract && parent.$parent) { - parent = parent.$parent; - } - parent.$children.push(vm); - } - - vm.$parent = parent; - vm.$root = parent ? parent.$root : vm; - - vm.$children = []; - vm.$refs = {}; - - vm._watcher = null; - vm._inactive = false; - vm._isMounted = false; - vm._isDestroyed = false; - vm._isBeingDestroyed = false; -} +var isReservedProp = makeMap('key,ref,slot'); -function lifecycleMixin (Vue) { - Vue.prototype._mount = function ( - el, - hydrating - ) { - var vm = this; - vm.$el = el; - if (!vm.$options.render) { - vm.$options.render = emptyVNode; +function initProps (vm) { + var props = vm.$options.props; + if (props) { + var propsData = vm.$options.propsData || {}; + var keys = vm.$options._propKeys = Object.keys(props); + var isRoot = !vm.$parent; + // root instance props should be converted + observerState.shouldConvert = isRoot; + var loop = function ( i ) { + var key = keys[i]; + /* istanbul ignore else */ if (process.env.NODE_ENV !== 'production') { - /* istanbul ignore if */ - if (vm.$options.template && vm.$options.template.charAt(0) !== '#') { - warn( - 'You are using the runtime-only build of Vue where the template ' + - 'option is not available. Either pre-compile the templates into ' + - 'render functions, or use the compiler-included build.', - vm - ); - } else { + if (isReservedProp(key)) { warn( - 'Failed to mount component: template or render function not defined.', + ("\"" + key + "\" is a reserved attribute and cannot be used as component prop."), vm ); } + defineReactive$$1(vm, key, validateProp(key, props, propsData, vm), function () { + if (vm.$parent && !observerState.isSettingProps) { + warn( + "Avoid mutating a prop directly since the value will be " + + "overwritten whenever the parent component re-renders. " + + "Instead, use a data or computed property based on the prop's " + + "value. Prop being mutated: \"" + key + "\"", + vm + ); + } + }); + } else { + defineReactive$$1(vm, key, validateProp(key, props, propsData, vm)); } - } - callHook(vm, 'beforeMount'); - vm._watcher = new Watcher(vm, function () { - vm._update(vm._render(), hydrating); - }, noop); - hydrating = false; - // manually mounted instance, call mounted on self - // mounted is called for render-created child components in its inserted hook - if (vm.$vnode == null) { - vm._isMounted = true; - callHook(vm, 'mounted'); - } - return vm - }; + }; - Vue.prototype._update = function (vnode, hydrating) { - var vm = this; - if (vm._isMounted) { - callHook(vm, 'beforeUpdate'); - } - var prevEl = vm.$el; - var prevActiveInstance = activeInstance; - activeInstance = vm; - var prevVnode = vm._vnode; - vm._vnode = vnode; - if (!prevVnode) { - // Vue.prototype.__patch__ is injected in entry points - // based on the rendering backend used. - vm.$el = vm.__patch__(vm.$el, vnode, hydrating); + for (var i = 0; i < keys.length; i++) loop( i ); + observerState.shouldConvert = true; + } +} + +function initData (vm) { + var data = vm.$options.data; + data = vm._data = typeof data === 'function' + ? data.call(vm) + : data || {}; + if (!isPlainObject(data)) { + data = {}; + process.env.NODE_ENV !== 'production' && warn( + 'data functions should return an object.', + vm + ); + } + // proxy data on instance + var keys = Object.keys(data); + var props = vm.$options.props; + var i = keys.length; + while (i--) { + if (props && hasOwn(props, keys[i])) { + process.env.NODE_ENV !== 'production' && warn( + "The data property \"" + (keys[i]) + "\" is already declared as a prop. " + + "Use prop default value instead.", + vm + ); } else { - vm.$el = vm.__patch__(prevVnode, vnode); - } - activeInstance = prevActiveInstance; - // update __vue__ reference - if (prevEl) { - prevEl.__vue__ = null; - } - if (vm.$el) { - vm.$el.__vue__ = vm; - } - // if parent is an HOC, update its $el as well - if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) { - vm.$parent.$el = vm.$el; - } - if (vm._isMounted) { - callHook(vm, 'updated'); + proxy(vm, keys[i]); } - }; + } + // observe data + observe(data); + data.__ob__ && data.__ob__.vmCount++; +} - Vue.prototype._updateFromParent = function ( - propsData, - listeners, - parentVnode, - renderChildren - ) { - var vm = this; - var hasChildren = !!(vm.$options._renderChildren || renderChildren); - vm.$options._parentVnode = parentVnode; - vm.$options._renderChildren = renderChildren; - // update props - if (propsData && vm.$options.props) { - observerState.shouldConvert = false; - if (process.env.NODE_ENV !== 'production') { - observerState.isSettingProps = true; - } - var propKeys = vm.$options._propKeys || []; - for (var i = 0; i < propKeys.length; i++) { - var key = propKeys[i]; - vm[key] = validateProp(key, vm.$options.props, propsData, vm); - } - observerState.shouldConvert = true; - if (process.env.NODE_ENV !== 'production') { - observerState.isSettingProps = false; - } - vm.$options.propsData = propsData; - } - // update listeners - if (listeners) { - var oldListeners = vm.$options._parentListeners; - vm.$options._parentListeners = listeners; - vm._updateListeners(listeners, oldListeners); - } - // resolve slots + force update if has children - if (hasChildren) { - vm.$slots = resolveSlots(renderChildren, vm._renderContext); - vm.$forceUpdate(); - } - }; +var computedSharedDefinition = { + enumerable: true, + configurable: true, + get: noop, + set: noop +}; - Vue.prototype.$forceUpdate = function () { - var vm = this; - if (vm._watcher) { - vm._watcher.update(); +function initComputed (vm) { + var computed = vm.$options.computed; + if (computed) { + for (var key in computed) { + var userDef = computed[key]; + if (typeof userDef === 'function') { + computedSharedDefinition.get = makeComputedGetter(userDef, vm); + computedSharedDefinition.set = noop; + } else { + computedSharedDefinition.get = userDef.get + ? userDef.cache !== false + ? makeComputedGetter(userDef.get, vm) + : bind$1(userDef.get, vm) + : noop; + computedSharedDefinition.set = userDef.set + ? bind$1(userDef.set, vm) + : noop; + } + Object.defineProperty(vm, key, computedSharedDefinition); } - }; + } +} - Vue.prototype.$destroy = function () { - var vm = this; - if (vm._isBeingDestroyed) { - return - } - callHook(vm, 'beforeDestroy'); - vm._isBeingDestroyed = true; - // remove self from parent - var parent = vm.$parent; - if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) { - remove$1(parent.$children, vm); - } - // teardown watchers - if (vm._watcher) { - vm._watcher.teardown(); - } - var i = vm._watchers.length; - while (i--) { - vm._watchers[i].teardown(); - } - // remove reference from data ob - // frozen object may not have observer. - if (vm._data.__ob__) { - vm._data.__ob__.vmCount--; +function makeComputedGetter (getter, owner) { + var watcher = new Watcher(owner, getter, noop, { + lazy: true + }); + return function computedGetter () { + if (watcher.dirty) { + watcher.evaluate(); } - // call the last hook... - vm._isDestroyed = true; - callHook(vm, 'destroyed'); - // turn off all instance listeners. - vm.$off(); - // remove __vue__ reference - if (vm.$el) { - vm.$el.__vue__ = null; + if (Dep.target) { + watcher.depend(); } - // invoke destroy hooks on current rendered tree - vm.__patch__(vm._vnode, null); - }; + return watcher.value + } } -function callHook (vm, hook) { - var handlers = vm.$options[hook]; - if (handlers) { - for (var i = 0, j = handlers.length; i < j; i++) { - handlers[i].call(vm); +function initMethods (vm) { + var methods = vm.$options.methods; + if (methods) { + for (var key in methods) { + vm[key] = methods[key] == null ? noop : bind$1(methods[key], vm); + if (process.env.NODE_ENV !== 'production' && methods[key] == null) { + warn( + "method \"" + key + "\" has an undefined value in the component definition. " + + "Did you reference the function correctly?", + vm + ); + } } } - vm.$emit('hook:' + hook); } -/* */ - -var hooks = { init: init, prepatch: prepatch, insert: insert, destroy: destroy$1 }; -var hooksToMerge = Object.keys(hooks); - -function createComponent ( - Ctor, - data, - context, - children, - tag -) { - if (!Ctor) { - return +function initWatch (vm) { + var watch = vm.$options.watch; + if (watch) { + for (var key in watch) { + var handler = watch[key]; + if (Array.isArray(handler)) { + for (var i = 0; i < handler.length; i++) { + createWatcher(vm, key, handler[i]); + } + } else { + createWatcher(vm, key, handler); + } + } } +} - var baseCtor = context.$options._base; - if (isObject(Ctor)) { - Ctor = baseCtor.extend(Ctor); +function createWatcher (vm, key, handler) { + var options; + if (isPlainObject(handler)) { + options = handler; + handler = handler.handler; } - - if (typeof Ctor !== 'function') { - if (process.env.NODE_ENV !== 'production') { - warn(("Invalid Component definition: " + (String(Ctor))), context); - } - return + if (typeof handler === 'string') { + handler = vm[handler]; } + vm.$watch(key, handler, options); +} - // async component - if (!Ctor.cid) { - if (Ctor.resolved) { - Ctor = Ctor.resolved; - } else { - Ctor = resolveAsyncComponent(Ctor, baseCtor, function () { - // it's ok to queue this on every render because - // $forceUpdate is buffered by the scheduler. - context.$forceUpdate(); - }); - if (!Ctor) { - // return nothing if this is indeed an async component - // wait for the callback to trigger parent update. - return - } - } - } - - // resolve constructor options in case global mixins are applied after - // component constructor creation - resolveConstructorOptions(Ctor); - - data = data || {}; - - // extract props - var propsData = extractProps(data, Ctor); - - // functional component - if (Ctor.options.functional) { - return createFunctionalComponent(Ctor, propsData, data, context, children) - } - - // extract listeners, since these needs to be treated as - // child component listeners instead of DOM listeners - var listeners = data.on; - // replace with listeners with .native modifier - data.on = data.nativeOn; - - if (Ctor.options.abstract) { - // abstract components do not keep anything - // other than props & listeners - data = {}; +function stateMixin (Vue) { + // flow somehow has problems with directly declared definition object + // when using Object.defineProperty, so we have to procedurally build up + // the object here. + var dataDef = {}; + dataDef.get = function () { + return this._data + }; + if (process.env.NODE_ENV !== 'production') { + dataDef.set = function (newData) { + warn( + 'Avoid replacing instance root $data. ' + + 'Use nested data properties instead.', + this + ); + }; } + Object.defineProperty(Vue.prototype, '$data', dataDef); - // merge component management hooks onto the placeholder node - mergeHooks(data); - - // return a placeholder vnode - var name = Ctor.options.name || tag; - var vnode = new VNode( - ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')), - data, undefined, undefined, undefined, undefined, context, - { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children } - ); - return vnode -} + Vue.prototype.$set = set; + Vue.prototype.$delete = del; -function createFunctionalComponent ( - Ctor, - propsData, - data, - context, - children -) { - var props = {}; - var propOptions = Ctor.options.props; - if (propOptions) { - for (var key in propOptions) { - props[key] = validateProp(key, propOptions, propsData); - } - } - var vnode = Ctor.options.render.call( - null, - // ensure the createElement function in functional components - // gets a unique context - this is necessary for correct named slot check - bind$1(createElement, { _self: Object.create(context) }), - { - props: props, - data: data, - parent: context, - children: normalizeChildren(children), - slots: function () { return resolveSlots(children, context); } + Vue.prototype.$watch = function ( + expOrFn, + cb, + options + ) { + var vm = this; + options = options || {}; + options.user = true; + var watcher = new Watcher(vm, expOrFn, cb, options); + if (options.immediate) { + cb.call(vm, watcher.value); } - ); - if (vnode instanceof VNode) { - vnode.functionalContext = context; - if (data.slot) { - (vnode.data || (vnode.data = {})).slot = data.slot; + return function unwatchFn () { + watcher.teardown(); } - } - return vnode -} - -function createComponentInstanceForVnode ( - vnode, // we know it's MountedComponentVNode but flow doesn't - parent // activeInstance in lifecycle state -) { - var vnodeComponentOptions = vnode.componentOptions; - var options = { - _isComponent: true, - parent: parent, - propsData: vnodeComponentOptions.propsData, - _componentTag: vnodeComponentOptions.tag, - _parentVnode: vnode, - _parentListeners: vnodeComponentOptions.listeners, - _renderChildren: vnodeComponentOptions.children }; - // check inline-template render functions - var inlineTemplate = vnode.data.inlineTemplate; - if (inlineTemplate) { - options.render = inlineTemplate.render; - options.staticRenderFns = inlineTemplate.staticRenderFns; - } - return new vnodeComponentOptions.Ctor(options) } -function init (vnode, hydrating) { - if (!vnode.child || vnode.child._isDestroyed) { - var child = vnode.child = createComponentInstanceForVnode(vnode, activeInstance); - child.$mount(hydrating ? vnode.elm : undefined, hydrating); +function proxy (vm, key) { + if (!isReserved(key)) { + Object.defineProperty(vm, key, { + configurable: true, + enumerable: true, + get: function proxyGetter () { + return vm._data[key] + }, + set: function proxySetter (val) { + vm._data[key] = val; + } + }); } } -function prepatch ( - oldVnode, - vnode +/* */ + +var VNode = function VNode ( + tag, + data, + children, + text, + elm, + ns, + context, + componentOptions ) { - var options = vnode.componentOptions; - var child = vnode.child = oldVnode.child; - child._updateFromParent( - options.propsData, // updated props - options.listeners, // updated listeners - vnode, // new parent vnode - options.children // new children + this.tag = tag; + this.data = data; + this.children = children; + this.text = text; + this.elm = elm; + this.ns = ns; + this.context = context; + this.functionalContext = undefined; + this.key = data && data.key; + this.componentOptions = componentOptions; + this.child = undefined; + this.parent = undefined; + this.raw = false; + this.isStatic = false; + this.isRootInsert = true; + this.isComment = false; + this.isCloned = false; + this.isOnce = false; +}; + +var emptyVNode = function () { + var node = new VNode(); + node.text = ''; + node.isComment = true; + return node +}; + +// optimized shallow clone +// used for static nodes and slot nodes because they may be reused across +// multiple renders, cloning them avoids errors when DOM manipulations rely +// on their elm reference. +function cloneVNode (vnode) { + var cloned = new VNode( + vnode.tag, + vnode.data, + vnode.children, + vnode.text, + vnode.elm, + vnode.ns, + vnode.context, + vnode.componentOptions ); + cloned.isStatic = vnode.isStatic; + cloned.key = vnode.key; + cloned.isCloned = true; + return cloned } -function insert (vnode) { - if (!vnode.child._isMounted) { - vnode.child._isMounted = true; - callHook(vnode.child, 'mounted'); - } - if (vnode.data.keepAlive) { - vnode.child._inactive = false; - callHook(vnode.child, 'activated'); +function cloneVNodes (vnodes) { + var res = new Array(vnodes.length); + for (var i = 0; i < vnodes.length; i++) { + res[i] = cloneVNode(vnodes[i]); } + return res } -function destroy$1 (vnode) { - if (!vnode.child._isDestroyed) { - if (!vnode.data.keepAlive) { - vnode.child.$destroy(); +/* */ + +function mergeVNodeHook (def, hookKey, hook, key) { + key = key + hookKey; + var injectedHash = def.__injected || (def.__injected = {}); + if (!injectedHash[key]) { + injectedHash[key] = true; + var oldHook = def[hookKey]; + if (oldHook) { + def[hookKey] = function () { + oldHook.apply(this, arguments); + hook.apply(this, arguments); + }; } else { - vnode.child._inactive = true; - callHook(vnode.child, 'deactivated'); + def[hookKey] = hook; } } } -function resolveAsyncComponent ( - factory, - baseCtor, - cb -) { - if (factory.requested) { - // pool callbacks - factory.pendingCallbacks.push(cb); - } else { - factory.requested = true; - var cbs = factory.pendingCallbacks = [cb]; - var sync = true; - - var resolve = function (res) { - if (isObject(res)) { - res = baseCtor.extend(res); - } - // cache resolved - factory.resolved = res; - // invoke callbacks only if this is not a synchronous resolve - // (async resolves are shimmed as synchronous during SSR) - if (!sync) { - for (var i = 0, l = cbs.length; i < l; i++) { - cbs[i](res); - } - } - }; +/* */ - var reject = function (reason) { +function updateListeners ( + on, + oldOn, + add, + remove$$1, + vm +) { + var name, cur, old, fn, event, capture; + for (name in on) { + cur = on[name]; + old = oldOn[name]; + if (!cur) { process.env.NODE_ENV !== 'production' && warn( - "Failed to resolve async component: " + (String(factory)) + - (reason ? ("\nReason: " + reason) : '') + "Invalid handler for event \"" + name + "\": got " + String(cur), + vm ); - }; - - var res = factory(resolve, reject); - - // handle promise - if (res && typeof res.then === 'function' && !factory.resolved) { - res.then(resolve, reject); + } else if (!old) { + capture = name.charAt(0) === '!'; + event = capture ? name.slice(1) : name; + if (Array.isArray(cur)) { + add(event, (cur.invoker = arrInvoker(cur)), capture); + } else { + if (!cur.invoker) { + fn = cur; + cur = on[name] = {}; + cur.fn = fn; + cur.invoker = fnInvoker(cur); + } + add(event, cur.invoker, capture); + } + } else if (cur !== old) { + if (Array.isArray(old)) { + old.length = cur.length; + for (var i = 0; i < old.length; i++) { old[i] = cur[i]; } + on[name] = old; + } else { + old.fn = cur; + on[name] = old; + } } - - sync = false; - // return in case resolved synchronously - return factory.resolved - } -} - -function extractProps (data, Ctor) { - // we are only extracting raw values here. - // validation and default values are handled in the child - // component itself. - var propOptions = Ctor.options.props; - if (!propOptions) { - return } - var res = {}; - var attrs = data.attrs; - var props = data.props; - var domProps = data.domProps; - if (attrs || props || domProps) { - for (var key in propOptions) { - var altKey = hyphenate(key); - checkProp(res, props, key, altKey, true) || - checkProp(res, attrs, key, altKey) || - checkProp(res, domProps, key, altKey); + for (name in oldOn) { + if (!on[name]) { + event = name.charAt(0) === '!' ? name.slice(1) : name; + remove$$1(event, oldOn[name].invoker); } } - return res } -function checkProp ( - res, - hash, - key, - altKey, - preserve -) { - if (hash) { - if (hasOwn(hash, key)) { - res[key] = hash[key]; - if (!preserve) { - delete hash[key]; - } - return true - } else if (hasOwn(hash, altKey)) { - res[key] = hash[altKey]; - if (!preserve) { - delete hash[altKey]; - } - return true - } - } - return false -} +function arrInvoker (arr) { + return function (ev) { + var arguments$1 = arguments; -function mergeHooks (data) { - if (!data.hook) { - data.hook = {}; - } - for (var i = 0; i < hooksToMerge.length; i++) { - var key = hooksToMerge[i]; - var fromParent = data.hook[key]; - var ours = hooks[key]; - data.hook[key] = fromParent ? mergeHook$1(ours, fromParent) : ours; + var single = arguments.length === 1; + for (var i = 0; i < arr.length; i++) { + single ? arr[i](ev) : arr[i].apply(null, arguments$1); + } } } -function mergeHook$1 (a, b) { - // since all hooks have at most two args, use fixed args - // to avoid having to use fn.apply(). - return function (_, __) { - a(_, __); - b(_, __); +function fnInvoker (o) { + return function (ev) { + var single = arguments.length === 1; + single ? o.fn(ev) : o.fn.apply(null, arguments); } } /* */ -// wrapper function for providing a more flexible interface -// without getting yelled at by flow -function createElement ( - tag, - data, - children +function normalizeChildren ( + children, + ns, + nestedIndex ) { - if (data && (Array.isArray(data) || typeof data !== 'object')) { - children = data; - data = undefined; + if (isPrimitive(children)) { + return [createTextVNode(children)] + } + if (Array.isArray(children)) { + var res = []; + for (var i = 0, l = children.length; i < l; i++) { + var c = children[i]; + var last = res[res.length - 1]; + // nested + if (Array.isArray(c)) { + res.push.apply(res, normalizeChildren(c, ns, ((nestedIndex || '') + "_" + i))); + } else if (isPrimitive(c)) { + if (last && last.text) { + last.text += String(c); + } else if (c !== '') { + // convert primitive to vnode + res.push(createTextVNode(c)); + } + } else if (c instanceof VNode) { + if (c.text && last && last.text) { + if (!last.isCloned) { + last.text += c.text; + } + } else { + // inherit parent namespace + if (ns) { + applyNS(c, ns); + } + // default key for nested array children (likely generated by v-for) + if (c.tag && c.key == null && nestedIndex != null) { + c.key = "__vlist" + nestedIndex + "_" + i + "__"; + } + res.push(c); + } + } + } + return res } - // make sure to use real instance instead of proxy as context - return _createElement(this._self, tag, data, children) } -function _createElement ( - context, - tag, - data, - children -) { - if (data && data.__ob__) { - process.env.NODE_ENV !== 'production' && warn( - "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" + - 'Always create fresh vnode data objects in each render!', - context - ); - return - } - if (!tag) { - // in case of component :is set to falsy value - return emptyVNode() - } - if (typeof tag === 'string') { - var Ctor; - var ns = config.getTagNamespace(tag); - if (config.isReservedTag(tag)) { - // platform built-in elements - return new VNode( - tag, data, normalizeChildren(children, ns), - undefined, undefined, ns, context - ) - } else if ((Ctor = resolveAsset(context.$options, 'components', tag))) { - // component - return createComponent(Ctor, data, context, children, tag) - } else { - // unknown or unlisted namespaced elements - // check at runtime because it may get assigned a namespace when its - // parent normalizes children - var childNs = tag === 'foreignObject' ? 'xhtml' : ns; - return new VNode( - tag, data, normalizeChildren(children, childNs), - undefined, undefined, ns, context - ) +function createTextVNode (val) { + return new VNode(undefined, undefined, undefined, String(val)) +} + +function applyNS (vnode, ns) { + if (vnode.tag && !vnode.ns) { + vnode.ns = ns; + if (vnode.children) { + for (var i = 0, l = vnode.children.length; i < l; i++) { + applyNS(vnode.children[i], ns); + } } - } else { - // direct component options / constructor - return createComponent(tag, data, context, children) } } /* */ -function initRender (vm) { - vm.$vnode = null; // the placeholder node in parent tree - vm._vnode = null; // the root of the child tree - vm._staticTrees = null; - vm._renderContext = vm.$options._parentVnode && vm.$options._parentVnode.context; - vm.$slots = resolveSlots(vm.$options._renderChildren, vm._renderContext); - // bind the public createElement fn to this instance - // so that we get proper render context inside it. - vm.$createElement = bind$1(createElement, vm); - if (vm.$options.el) { - vm.$mount(vm.$options.el); - } +function getFirstComponentChild (children) { + return children && children.filter(function (c) { return c && c.componentOptions; })[0] } -function renderMixin (Vue) { - Vue.prototype.$nextTick = function (fn) { - nextTick(fn, this); - }; +/* */ - Vue.prototype._render = function () { - var vm = this; - var ref = vm.$options; - var render = ref.render; - var staticRenderFns = ref.staticRenderFns; - var _parentVnode = ref._parentVnode; +var activeInstance = null; - if (vm._isMounted) { - // clone slot nodes on re-renders - for (var key in vm.$slots) { - vm.$slots[key] = cloneVNodes(vm.$slots[key]); - } - } +function initLifecycle (vm) { + var options = vm.$options; - if (staticRenderFns && !vm._staticTrees) { - vm._staticTrees = []; + // locate first non-abstract parent + var parent = options.parent; + if (parent && !options.abstract) { + while (parent.$options.abstract && parent.$parent) { + parent = parent.$parent; } - // set parent vnode. this allows render functions to have access - // to the data on the placeholder node. - vm.$vnode = _parentVnode; - // render self - var vnode; - try { - vnode = render.call(vm._renderProxy, vm.$createElement); - } catch (e) { + parent.$children.push(vm); + } + + vm.$parent = parent; + vm.$root = parent ? parent.$root : vm; + + vm.$children = []; + vm.$refs = {}; + + vm._watcher = null; + vm._inactive = false; + vm._isMounted = false; + vm._isDestroyed = false; + vm._isBeingDestroyed = false; +} + +function lifecycleMixin (Vue) { + Vue.prototype._mount = function ( + el, + hydrating + ) { + var vm = this; + vm.$el = el; + if (!vm.$options.render) { + vm.$options.render = emptyVNode; if (process.env.NODE_ENV !== 'production') { - warn(("Error when rendering " + (formatComponentName(vm)) + ":")); - } - /* istanbul ignore else */ - if (config.errorHandler) { - config.errorHandler.call(null, e, vm); - } else { - if (config._isServer) { - throw e + /* istanbul ignore if */ + if (vm.$options.template && vm.$options.template.charAt(0) !== '#') { + warn( + 'You are using the runtime-only build of Vue where the template ' + + 'option is not available. Either pre-compile the templates into ' + + 'render functions, or use the compiler-included build.', + vm + ); } else { - console.error(e); + warn( + 'Failed to mount component: template or render function not defined.', + vm + ); } } - // return previous vnode to prevent render error causing blank component - vnode = vm._vnode; } - // return empty vnode in case the render function errored out - if (!(vnode instanceof VNode)) { - if (process.env.NODE_ENV !== 'production' && Array.isArray(vnode)) { - warn( - 'Multiple root nodes returned from render function. Render function ' + - 'should return a single root node.', - vm - ); - } - vnode = emptyVNode(); + callHook(vm, 'beforeMount'); + vm._watcher = new Watcher(vm, function () { + vm._update(vm._render(), hydrating); + }, noop); + hydrating = false; + // manually mounted instance, call mounted on self + // mounted is called for render-created child components in its inserted hook + if (vm.$vnode == null) { + vm._isMounted = true; + callHook(vm, 'mounted'); } - // set parent - vnode.parent = _parentVnode; - return vnode + return vm }; - // shorthands used in render functions - Vue.prototype._h = createElement; - // toString for mustaches - Vue.prototype._s = _toString; - // number conversion - Vue.prototype._n = toNumber; - // empty vnode - Vue.prototype._e = emptyVNode; - // loose equal - Vue.prototype._q = looseEqual; - // loose indexOf - Vue.prototype._i = looseIndexOf; - - // render static tree by index - Vue.prototype._m = function renderStatic ( - index, - isInFor - ) { - var tree = this._staticTrees[index]; - // if has already-rendered static tree and not inside v-for, - // we can reuse the same tree by doing a shallow clone. - if (tree && !isInFor) { - return Array.isArray(tree) - ? cloneVNodes(tree) - : cloneVNode(tree) + Vue.prototype._update = function (vnode, hydrating) { + var vm = this; + if (vm._isMounted) { + callHook(vm, 'beforeUpdate'); } - // otherwise, render a fresh tree. - tree = this._staticTrees[index] = this.$options.staticRenderFns[index].call(this._renderProxy); - markStatic(tree, ("__static__" + index), false); - return tree - }; - - // mark node as static (v-once) - Vue.prototype._o = function markOnce ( - tree, - index, - key - ) { - markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true); - return tree - }; - - function markStatic (tree, key, isOnce) { - if (Array.isArray(tree)) { - for (var i = 0; i < tree.length; i++) { - if (tree[i] && typeof tree[i] !== 'string') { - markStaticNode(tree[i], (key + "_" + i), isOnce); - } - } + var prevEl = vm.$el; + var prevActiveInstance = activeInstance; + activeInstance = vm; + var prevVnode = vm._vnode; + vm._vnode = vnode; + if (!prevVnode) { + // Vue.prototype.__patch__ is injected in entry points + // based on the rendering backend used. + vm.$el = vm.__patch__(vm.$el, vnode, hydrating); } else { - markStaticNode(tree, key, isOnce); + vm.$el = vm.__patch__(prevVnode, vnode); + } + activeInstance = prevActiveInstance; + // update __vue__ reference + if (prevEl) { + prevEl.__vue__ = null; + } + if (vm.$el) { + vm.$el.__vue__ = vm; + } + // if parent is an HOC, update its $el as well + if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) { + vm.$parent.$el = vm.$el; + } + if (vm._isMounted) { + callHook(vm, 'updated'); } - } - - function markStaticNode (node, key, isOnce) { - node.isStatic = true; - node.key = key; - node.isOnce = isOnce; - } - - // filter resolution helper - var identity = function (_) { return _; }; - Vue.prototype._f = function resolveFilter (id) { - return resolveAsset(this.$options, 'filters', id, true) || identity }; - // render v-for - Vue.prototype._l = function renderList ( - val, - render + Vue.prototype._updateFromParent = function ( + propsData, + listeners, + parentVnode, + renderChildren ) { - var ret, i, l, keys, key; - if (Array.isArray(val)) { - ret = new Array(val.length); - for (i = 0, l = val.length; i < l; i++) { - ret[i] = render(val[i], i); + var vm = this; + var hasChildren = !!(vm.$options._renderChildren || renderChildren); + vm.$options._parentVnode = parentVnode; + vm.$vnode = parentVnode; // update vm's placeholder node without re-render + if (vm._vnode) { // update child tree's parent + vm._vnode.parent = parentVnode; + } + vm.$options._renderChildren = renderChildren; + // update props + if (propsData && vm.$options.props) { + observerState.shouldConvert = false; + if (process.env.NODE_ENV !== 'production') { + observerState.isSettingProps = true; } - } else if (typeof val === 'number') { - ret = new Array(val); - for (i = 0; i < val; i++) { - ret[i] = render(i + 1, i); + var propKeys = vm.$options._propKeys || []; + for (var i = 0; i < propKeys.length; i++) { + var key = propKeys[i]; + vm[key] = validateProp(key, vm.$options.props, propsData, vm); } - } else if (isObject(val)) { - keys = Object.keys(val); - ret = new Array(keys.length); - for (i = 0, l = keys.length; i < l; i++) { - key = keys[i]; - ret[i] = render(val[key], key, i); + observerState.shouldConvert = true; + if (process.env.NODE_ENV !== 'production') { + observerState.isSettingProps = false; } + vm.$options.propsData = propsData; } - return ret - }; - - // renderSlot - Vue.prototype._t = function ( - name, - fallback - ) { - var slotNodes = this.$slots[name]; - // warn duplicate slot usage - if (slotNodes && process.env.NODE_ENV !== 'production') { - slotNodes._rendered && warn( - "Duplicate presence of slot \"" + name + "\" found in the same render tree " + - "- this will likely cause render errors.", - this - ); - slotNodes._rendered = true; + // update listeners + if (listeners) { + var oldListeners = vm.$options._parentListeners; + vm.$options._parentListeners = listeners; + vm._updateListeners(listeners, oldListeners); + } + // resolve slots + force update if has children + if (hasChildren) { + vm.$slots = resolveSlots(renderChildren, vm._renderContext); + vm.$forceUpdate(); } - return slotNodes || fallback }; - // apply v-bind object - Vue.prototype._b = function bindProps ( - data, - value, - asProp - ) { - if (value) { - if (!isObject(value)) { - process.env.NODE_ENV !== 'production' && warn( - 'v-bind without argument expects an Object or Array value', - this - ); - } else { - if (Array.isArray(value)) { - value = toObject(value); - } - for (var key in value) { - if (key === 'class' || key === 'style') { - data[key] = value[key]; - } else { - var hash = asProp || config.mustUseProp(key) - ? data.domProps || (data.domProps = {}) - : data.attrs || (data.attrs = {}); - hash[key] = value[key]; - } - } - } + Vue.prototype.$forceUpdate = function () { + var vm = this; + if (vm._watcher) { + vm._watcher.update(); } - return data }; - // expose v-on keyCodes - Vue.prototype._k = function getKeyCodes (key) { - return config.keyCodes[key] + Vue.prototype.$destroy = function () { + var vm = this; + if (vm._isBeingDestroyed) { + return + } + callHook(vm, 'beforeDestroy'); + vm._isBeingDestroyed = true; + // remove self from parent + var parent = vm.$parent; + if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) { + remove$1(parent.$children, vm); + } + // teardown watchers + if (vm._watcher) { + vm._watcher.teardown(); + } + var i = vm._watchers.length; + while (i--) { + vm._watchers[i].teardown(); + } + // remove reference from data ob + // frozen object may not have observer. + if (vm._data.__ob__) { + vm._data.__ob__.vmCount--; + } + // call the last hook... + vm._isDestroyed = true; + callHook(vm, 'destroyed'); + // turn off all instance listeners. + vm.$off(); + // remove __vue__ reference + if (vm.$el) { + vm.$el.__vue__ = null; + } + // invoke destroy hooks on current rendered tree + vm.__patch__(vm._vnode, null); }; } -function resolveSlots ( - renderChildren, - context -) { - var slots = {}; - if (!renderChildren) { - return slots - } - var children = normalizeChildren(renderChildren) || []; - var defaultSlot = []; - var name, child; - for (var i = 0, l = children.length; i < l; i++) { - child = children[i]; - // named slots should only be respected if the vnode was rendered in the - // same context. - if ((child.context === context || child.functionalContext === context) && - child.data && (name = child.data.slot)) { - var slot = (slots[name] || (slots[name] = [])); - if (child.tag === 'template') { - slot.push.apply(slot, child.children); - } else { - slot.push(child); - } - } else { - defaultSlot.push(child); +function callHook (vm, hook) { + var handlers = vm.$options[hook]; + if (handlers) { + for (var i = 0, j = handlers.length; i < j; i++) { + handlers[i].call(vm); } } - // ignore single whitespace - if (defaultSlot.length && !( - defaultSlot.length === 1 && - (defaultSlot[0].text === ' ' || defaultSlot[0].isComment) - )) { - slots.default = defaultSlot; - } - return slots + vm.$emit('hook:' + hook); } /* */ -function initEvents (vm) { - vm._events = Object.create(null); - // init parent attached events - var listeners = vm.$options._parentListeners; - var on = bind$1(vm.$on, vm); - var off = bind$1(vm.$off, vm); - vm._updateListeners = function (listeners, oldListeners) { - updateListeners(listeners, oldListeners || {}, on, off, vm); - }; - if (listeners) { - vm._updateListeners(listeners); +var hooks = { init: init, prepatch: prepatch, insert: insert, destroy: destroy$1 }; +var hooksToMerge = Object.keys(hooks); + +function createComponent ( + Ctor, + data, + context, + children, + tag +) { + if (!Ctor) { + return } -} -function eventsMixin (Vue) { - Vue.prototype.$on = function (event, fn) { - var vm = this;(vm._events[event] || (vm._events[event] = [])).push(fn); - return vm - }; + var baseCtor = context.$options._base; + if (isObject(Ctor)) { + Ctor = baseCtor.extend(Ctor); + } - Vue.prototype.$once = function (event, fn) { - var vm = this; - function on () { - vm.$off(event, on); - fn.apply(vm, arguments); + if (typeof Ctor !== 'function') { + if (process.env.NODE_ENV !== 'production') { + warn(("Invalid Component definition: " + (String(Ctor))), context); } - on.fn = fn; - vm.$on(event, on); - return vm - }; + return + } - Vue.prototype.$off = function (event, fn) { - var vm = this; - // all - if (!arguments.length) { - vm._events = Object.create(null); - return vm - } - // specific event - var cbs = vm._events[event]; - if (!cbs) { - return vm - } - if (arguments.length === 1) { - vm._events[event] = null; - return vm - } - // specific handler - var cb; - var i = cbs.length; - while (i--) { - cb = cbs[i]; - if (cb === fn || cb.fn === fn) { - cbs.splice(i, 1); - break + // async component + if (!Ctor.cid) { + if (Ctor.resolved) { + Ctor = Ctor.resolved; + } else { + Ctor = resolveAsyncComponent(Ctor, baseCtor, function () { + // it's ok to queue this on every render because + // $forceUpdate is buffered by the scheduler. + context.$forceUpdate(); + }); + if (!Ctor) { + // return nothing if this is indeed an async component + // wait for the callback to trigger parent update. + return } } - return vm - }; + } - Vue.prototype.$emit = function (event) { - var vm = this; - var cbs = vm._events[event]; - if (cbs) { - cbs = cbs.length > 1 ? toArray(cbs) : cbs; - var args = toArray(arguments, 1); - for (var i = 0, l = cbs.length; i < l; i++) { - cbs[i].apply(vm, args); - } - } - return vm - }; -} + // resolve constructor options in case global mixins are applied after + // component constructor creation + resolveConstructorOptions(Ctor); -/* */ + data = data || {}; -var uid = 0; + // extract props + var propsData = extractProps(data, Ctor); -function initMixin (Vue) { - Vue.prototype._init = function (options) { - var vm = this; - // a uid - vm._uid = uid++; - // a flag to avoid this being observed - vm._isVue = true; - // merge options - if (options && options._isComponent) { - // optimize internal component instantiation - // since dynamic options merging is pretty slow, and none of the - // internal component options needs special treatment. - initInternalComponent(vm, options); - } else { - vm.$options = mergeOptions( - resolveConstructorOptions(vm.constructor), - options || {}, - vm - ); - } - /* istanbul ignore else */ - if (process.env.NODE_ENV !== 'production') { - initProxy(vm); - } else { - vm._renderProxy = vm; - } - // expose real self - vm._self = vm; - initLifecycle(vm); - initEvents(vm); - callHook(vm, 'beforeCreate'); - initState(vm); - callHook(vm, 'created'); - initRender(vm); - }; -} + // functional component + if (Ctor.options.functional) { + return createFunctionalComponent(Ctor, propsData, data, context, children) + } -function initInternalComponent (vm, options) { - var opts = vm.$options = Object.create(vm.constructor.options); - // doing this because it's faster than dynamic enumeration. - opts.parent = options.parent; - opts.propsData = options.propsData; - opts._parentVnode = options._parentVnode; - opts._parentListeners = options._parentListeners; - opts._renderChildren = options._renderChildren; - opts._componentTag = options._componentTag; - if (options.render) { - opts.render = options.render; - opts.staticRenderFns = options.staticRenderFns; + // extract listeners, since these needs to be treated as + // child component listeners instead of DOM listeners + var listeners = data.on; + // replace with listeners with .native modifier + data.on = data.nativeOn; + + if (Ctor.options.abstract) { + // abstract components do not keep anything + // other than props & listeners + data = {}; } + + // merge component management hooks onto the placeholder node + mergeHooks(data); + + // return a placeholder vnode + var name = Ctor.options.name || tag; + var vnode = new VNode( + ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')), + data, undefined, undefined, undefined, undefined, context, + { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children } + ); + return vnode } -function resolveConstructorOptions (Ctor) { - var options = Ctor.options; - if (Ctor.super) { - var superOptions = Ctor.super.options; - var cachedSuperOptions = Ctor.superOptions; - var extendOptions = Ctor.extendOptions; - if (superOptions !== cachedSuperOptions) { - // super option changed - Ctor.superOptions = superOptions; - extendOptions.render = options.render; - extendOptions.staticRenderFns = options.staticRenderFns; - options = Ctor.options = mergeOptions(superOptions, extendOptions); - if (options.name) { - options.components[options.name] = Ctor; - } +function createFunctionalComponent ( + Ctor, + propsData, + data, + context, + children +) { + var props = {}; + var propOptions = Ctor.options.props; + if (propOptions) { + for (var key in propOptions) { + props[key] = validateProp(key, propOptions, propsData); } } - return options + var vnode = Ctor.options.render.call( + null, + // ensure the createElement function in functional components + // gets a unique context - this is necessary for correct named slot check + bind$1(createElement, { _self: Object.create(context) }), + { + props: props, + data: data, + parent: context, + children: normalizeChildren(children), + slots: function () { return resolveSlots(children, context); } + } + ); + if (vnode instanceof VNode) { + vnode.functionalContext = context; + if (data.slot) { + (vnode.data || (vnode.data = {})).slot = data.slot; + } + } + return vnode } -function Vue$2 (options) { - if (process.env.NODE_ENV !== 'production' && - !(this instanceof Vue$2)) { - warn('Vue is a constructor and should be called with the `new` keyword'); +function createComponentInstanceForVnode ( + vnode, // we know it's MountedComponentVNode but flow doesn't + parent // activeInstance in lifecycle state +) { + var vnodeComponentOptions = vnode.componentOptions; + var options = { + _isComponent: true, + parent: parent, + propsData: vnodeComponentOptions.propsData, + _componentTag: vnodeComponentOptions.tag, + _parentVnode: vnode, + _parentListeners: vnodeComponentOptions.listeners, + _renderChildren: vnodeComponentOptions.children + }; + // check inline-template render functions + var inlineTemplate = vnode.data.inlineTemplate; + if (inlineTemplate) { + options.render = inlineTemplate.render; + options.staticRenderFns = inlineTemplate.staticRenderFns; } - this._init(options); + return new vnodeComponentOptions.Ctor(options) } -initMixin(Vue$2); -stateMixin(Vue$2); -eventsMixin(Vue$2); -lifecycleMixin(Vue$2); -renderMixin(Vue$2); - -var warn = noop; -var formatComponentName; - -if (process.env.NODE_ENV !== 'production') { - var hasConsole = typeof console !== 'undefined'; +function init (vnode, hydrating) { + if (!vnode.child || vnode.child._isDestroyed) { + var child = vnode.child = createComponentInstanceForVnode(vnode, activeInstance); + child.$mount(hydrating ? vnode.elm : undefined, hydrating); + } else if (vnode.data.keepAlive) { + // kept-alive components, treat as a patch + var mountedNode = vnode; // work around flow + prepatch(mountedNode, mountedNode); + } +} - warn = function (msg, vm) { - if (hasConsole && (!config.silent)) { - console.error("[Vue warn]: " + msg + " " + ( - vm ? formatLocation(formatComponentName(vm)) : '' - )); - } - }; +function prepatch ( + oldVnode, + vnode +) { + var options = vnode.componentOptions; + var child = vnode.child = oldVnode.child; + child._updateFromParent( + options.propsData, // updated props + options.listeners, // updated listeners + vnode, // new parent vnode + options.children // new children + ); +} - formatComponentName = function (vm) { - if (vm.$root === vm) { - return 'root instance' - } - var name = vm._isVue - ? vm.$options.name || vm.$options._componentTag - : vm.name; - return ( - (name ? ("component <" + name + ">") : "anonymous component") + - (vm._isVue && vm.$options.__file ? (" at " + (vm.$options.__file)) : '') - ) - }; +function insert (vnode) { + if (!vnode.child._isMounted) { + vnode.child._isMounted = true; + callHook(vnode.child, 'mounted'); + } + if (vnode.data.keepAlive) { + vnode.child._inactive = false; + callHook(vnode.child, 'activated'); + } +} - var formatLocation = function (str) { - if (str === 'anonymous component') { - str += " - use the \"name\" option for better debugging messages."; +function destroy$1 (vnode) { + if (!vnode.child._isDestroyed) { + if (!vnode.data.keepAlive) { + vnode.child.$destroy(); + } else { + vnode.child._inactive = true; + callHook(vnode.child, 'deactivated'); } - return ("\n(found in " + str + ")") - }; + } } -/* */ +function resolveAsyncComponent ( + factory, + baseCtor, + cb +) { + if (factory.requested) { + // pool callbacks + factory.pendingCallbacks.push(cb); + } else { + factory.requested = true; + var cbs = factory.pendingCallbacks = [cb]; + var sync = true; -/** - * Option overwriting strategies are functions that handle - * how to merge a parent option value and a child option - * value into the final value. - */ -var strats = config.optionMergeStrategies; + var resolve = function (res) { + if (isObject(res)) { + res = baseCtor.extend(res); + } + // cache resolved + factory.resolved = res; + // invoke callbacks only if this is not a synchronous resolve + // (async resolves are shimmed as synchronous during SSR) + if (!sync) { + for (var i = 0, l = cbs.length; i < l; i++) { + cbs[i](res); + } + } + }; -/** - * Options with restrictions - */ -if (process.env.NODE_ENV !== 'production') { - strats.el = strats.propsData = function (parent, child, vm, key) { - if (!vm) { - warn( - "option \"" + key + "\" can only be used during instance " + - 'creation with the `new` keyword.' + var reject = function (reason) { + process.env.NODE_ENV !== 'production' && warn( + "Failed to resolve async component: " + (String(factory)) + + (reason ? ("\nReason: " + reason) : '') ); + }; + + var res = factory(resolve, reject); + + // handle promise + if (res && typeof res.then === 'function' && !factory.resolved) { + res.then(resolve, reject); } - return defaultStrat(parent, child) - }; + + sync = false; + // return in case resolved synchronously + return factory.resolved + } } -/** - * Helper that recursively merges two data objects together. - */ -function mergeData (to, from) { - if (!from) { return to } - var key, toVal, fromVal; - var keys = Object.keys(from); - for (var i = 0; i < keys.length; i++) { - key = keys[i]; - toVal = to[key]; - fromVal = from[key]; - if (!hasOwn(to, key)) { - set(to, key, fromVal); - } else if (isPlainObject(toVal) && isPlainObject(fromVal)) { - mergeData(toVal, fromVal); +function extractProps (data, Ctor) { + // we are only extracting raw values here. + // validation and default values are handled in the child + // component itself. + var propOptions = Ctor.options.props; + if (!propOptions) { + return + } + var res = {}; + var attrs = data.attrs; + var props = data.props; + var domProps = data.domProps; + if (attrs || props || domProps) { + for (var key in propOptions) { + var altKey = hyphenate(key); + checkProp(res, props, key, altKey, true) || + checkProp(res, attrs, key, altKey) || + checkProp(res, domProps, key, altKey); } } - return to + return res } -/** - * Data - */ -strats.data = function ( - parentVal, - childVal, - vm +function checkProp ( + res, + hash, + key, + altKey, + preserve ) { - if (!vm) { - // in a Vue.extend merge, both should be functions - if (!childVal) { - return parentVal - } - if (typeof childVal !== 'function') { - process.env.NODE_ENV !== 'production' && warn( - 'The "data" option should be a function ' + - 'that returns a per-instance value in component ' + - 'definitions.', - vm - ); - return parentVal - } - if (!parentVal) { - return childVal - } - // when parentVal & childVal are both present, - // we need to return a function that returns the - // merged result of both functions... no need to - // check if parentVal is a function here because - // it has to be a function to pass previous merges. - return function mergedDataFn () { - return mergeData( - childVal.call(this), - parentVal.call(this) - ) - } - } else if (parentVal || childVal) { - return function mergedInstanceDataFn () { - // instance merge - var instanceData = typeof childVal === 'function' - ? childVal.call(vm) - : childVal; - var defaultData = typeof parentVal === 'function' - ? parentVal.call(vm) - : undefined; - if (instanceData) { - return mergeData(instanceData, defaultData) - } else { - return defaultData + if (hash) { + if (hasOwn(hash, key)) { + res[key] = hash[key]; + if (!preserve) { + delete hash[key]; } + return true + } else if (hasOwn(hash, altKey)) { + res[key] = hash[altKey]; + if (!preserve) { + delete hash[altKey]; + } + return true } } -}; + return false +} -/** - * Hooks and param attributes are merged as arrays. - */ -function mergeHook ( - parentVal, - childVal +function mergeHooks (data) { + if (!data.hook) { + data.hook = {}; + } + for (var i = 0; i < hooksToMerge.length; i++) { + var key = hooksToMerge[i]; + var fromParent = data.hook[key]; + var ours = hooks[key]; + data.hook[key] = fromParent ? mergeHook$1(ours, fromParent) : ours; + } +} + +function mergeHook$1 (a, b) { + // since all hooks have at most two args, use fixed args + // to avoid having to use fn.apply(). + return function (_, __) { + a(_, __); + b(_, __); + } +} + +/* */ + +// wrapper function for providing a more flexible interface +// without getting yelled at by flow +function createElement ( + tag, + data, + children ) { - return childVal - ? parentVal - ? parentVal.concat(childVal) - : Array.isArray(childVal) - ? childVal - : [childVal] - : parentVal + if (data && (Array.isArray(data) || typeof data !== 'object')) { + children = data; + data = undefined; + } + // make sure to use real instance instead of proxy as context + return _createElement(this._self, tag, data, children) } -config._lifecycleHooks.forEach(function (hook) { - strats[hook] = mergeHook; -}); +function _createElement ( + context, + tag, + data, + children +) { + if (data && data.__ob__) { + process.env.NODE_ENV !== 'production' && warn( + "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" + + 'Always create fresh vnode data objects in each render!', + context + ); + return + } + if (!tag) { + // in case of component :is set to falsy value + return emptyVNode() + } + // support single function children as default scoped slot + if (Array.isArray(children) && + typeof children[0] === 'function') { + data = data || {}; + data.scopedSlots = { default: children[0] }; + children.length = 0; + } + if (typeof tag === 'string') { + var Ctor; + var ns = config.getTagNamespace(tag); + if (config.isReservedTag(tag)) { + // platform built-in elements + return new VNode( + tag, data, normalizeChildren(children, ns), + undefined, undefined, ns, context + ) + } else if ((Ctor = resolveAsset(context.$options, 'components', tag))) { + // component + return createComponent(Ctor, data, context, children, tag) + } else { + // unknown or unlisted namespaced elements + // check at runtime because it may get assigned a namespace when its + // parent normalizes children + var childNs = tag === 'foreignObject' ? 'xhtml' : ns; + return new VNode( + tag, data, normalizeChildren(children, childNs), + undefined, undefined, ns, context + ) + } + } else { + // direct component options / constructor + return createComponent(tag, data, context, children) + } +} -/** - * Assets - * - * When a vm is present (instance creation), we need to do - * a three-way merge between constructor options, instance - * options and parent options. - */ -function mergeAssets (parentVal, childVal) { - var res = Object.create(parentVal || null); - return childVal - ? extend(res, childVal) - : res +/* */ + +function initRender (vm) { + vm.$vnode = null; // the placeholder node in parent tree + vm._vnode = null; // the root of the child tree + vm._staticTrees = null; + vm._renderContext = vm.$options._parentVnode && vm.$options._parentVnode.context; + vm.$slots = resolveSlots(vm.$options._renderChildren, vm._renderContext); + vm.$scopedSlots = {}; + // bind the public createElement fn to this instance + // so that we get proper render context inside it. + vm.$createElement = bind$1(createElement, vm); + if (vm.$options.el) { + vm.$mount(vm.$options.el); + } } -config._assetTypes.forEach(function (type) { - strats[type + 's'] = mergeAssets; -}); +function renderMixin (Vue) { + Vue.prototype.$nextTick = function (fn) { + return nextTick(fn, this) + }; -/** - * Watchers. - * - * Watchers hashes should not overwrite one - * another, so we merge them as arrays. - */ -strats.watch = function (parentVal, childVal) { - /* istanbul ignore if */ - if (!childVal) { return parentVal } - if (!parentVal) { return childVal } - var ret = {}; - extend(ret, parentVal); - for (var key in childVal) { - var parent = ret[key]; - var child = childVal[key]; - if (parent && !Array.isArray(parent)) { - parent = [parent]; + Vue.prototype._render = function () { + var vm = this; + var ref = vm.$options; + var render = ref.render; + var staticRenderFns = ref.staticRenderFns; + var _parentVnode = ref._parentVnode; + + if (vm._isMounted) { + // clone slot nodes on re-renders + for (var key in vm.$slots) { + vm.$slots[key] = cloneVNodes(vm.$slots[key]); + } } - ret[key] = parent - ? parent.concat(child) - : [child]; - } - return ret -}; -/** - * Other object hashes. - */ -strats.props = -strats.methods = -strats.computed = function (parentVal, childVal) { - if (!childVal) { return parentVal } - if (!parentVal) { return childVal } - var ret = Object.create(null); - extend(ret, parentVal); - extend(ret, childVal); - return ret -}; + if (_parentVnode && _parentVnode.data.scopedSlots) { + vm.$scopedSlots = _parentVnode.data.scopedSlots; + } -/** - * Default strategy. - */ -var defaultStrat = function (parentVal, childVal) { - return childVal === undefined - ? parentVal - : childVal -}; + if (staticRenderFns && !vm._staticTrees) { + vm._staticTrees = []; + } + // set parent vnode. this allows render functions to have access + // to the data on the placeholder node. + vm.$vnode = _parentVnode; + // render self + var vnode; + try { + vnode = render.call(vm._renderProxy, vm.$createElement); + } catch (e) { + if (process.env.NODE_ENV !== 'production') { + warn(("Error when rendering " + (formatComponentName(vm)) + ":")); + } + /* istanbul ignore else */ + if (config.errorHandler) { + config.errorHandler.call(null, e, vm); + } else { + if (isServerRendering()) { + throw e + } else { + console.error(e); + } + } + // return previous vnode to prevent render error causing blank component + vnode = vm._vnode; + } + // return empty vnode in case the render function errored out + if (!(vnode instanceof VNode)) { + if (process.env.NODE_ENV !== 'production' && Array.isArray(vnode)) { + warn( + 'Multiple root nodes returned from render function. Render function ' + + 'should return a single root node.', + vm + ); + } + vnode = emptyVNode(); + } + // set parent + vnode.parent = _parentVnode; + return vnode + }; -/** - * Validate component names - */ -function checkComponents (options) { - for (var key in options.components) { - var lower = key.toLowerCase(); - if (isBuiltInTag(lower) || config.isReservedTag(lower)) { - warn( - 'Do not use built-in or reserved HTML elements as component ' + - 'id: ' + key - ); + // shorthands used in render functions + Vue.prototype._h = createElement; + // toString for mustaches + Vue.prototype._s = _toString; + // number conversion + Vue.prototype._n = toNumber; + // empty vnode + Vue.prototype._e = emptyVNode; + // loose equal + Vue.prototype._q = looseEqual; + // loose indexOf + Vue.prototype._i = looseIndexOf; + + // render static tree by index + Vue.prototype._m = function renderStatic ( + index, + isInFor + ) { + var tree = this._staticTrees[index]; + // if has already-rendered static tree and not inside v-for, + // we can reuse the same tree by doing a shallow clone. + if (tree && !isInFor) { + return Array.isArray(tree) + ? cloneVNodes(tree) + : cloneVNode(tree) + } + // otherwise, render a fresh tree. + tree = this._staticTrees[index] = this.$options.staticRenderFns[index].call(this._renderProxy); + markStatic(tree, ("__static__" + index), false); + return tree + }; + + // mark node as static (v-once) + Vue.prototype._o = function markOnce ( + tree, + index, + key + ) { + markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true); + return tree + }; + + function markStatic (tree, key, isOnce) { + if (Array.isArray(tree)) { + for (var i = 0; i < tree.length; i++) { + if (tree[i] && typeof tree[i] !== 'string') { + markStaticNode(tree[i], (key + "_" + i), isOnce); + } + } + } else { + markStaticNode(tree, key, isOnce); } } -} -/** - * Ensure all props option syntax are normalized into the - * Object-based format. - */ -function normalizeProps (options) { - var props = options.props; - if (!props) { return } - var res = {}; - var i, val, name; - if (Array.isArray(props)) { - i = props.length; - while (i--) { - val = props[i]; - if (typeof val === 'string') { - name = camelize(val); - res[name] = { type: null }; - } else if (process.env.NODE_ENV !== 'production') { - warn('props must be strings when using array syntax.'); + function markStaticNode (node, key, isOnce) { + node.isStatic = true; + node.key = key; + node.isOnce = isOnce; + } + + // filter resolution helper + var identity = function (_) { return _; }; + Vue.prototype._f = function resolveFilter (id) { + return resolveAsset(this.$options, 'filters', id, true) || identity + }; + + // render v-for + Vue.prototype._l = function renderList ( + val, + render + ) { + var ret, i, l, keys, key; + if (Array.isArray(val)) { + ret = new Array(val.length); + for (i = 0, l = val.length; i < l; i++) { + ret[i] = render(val[i], i); + } + } else if (typeof val === 'number') { + ret = new Array(val); + for (i = 0; i < val; i++) { + ret[i] = render(i + 1, i); + } + } else if (isObject(val)) { + keys = Object.keys(val); + ret = new Array(keys.length); + for (i = 0, l = keys.length; i < l; i++) { + key = keys[i]; + ret[i] = render(val[key], key, i); } } - } else if (isPlainObject(props)) { - for (var key in props) { - val = props[key]; - name = camelize(key); - res[name] = isPlainObject(val) - ? val - : { type: val }; - } - } - options.props = res; -} + return ret + }; -/** - * Normalize raw function directives into object format. - */ -function normalizeDirectives (options) { - var dirs = options.directives; - if (dirs) { - for (var key in dirs) { - var def = dirs[key]; - if (typeof def === 'function') { - dirs[key] = { bind: def, update: def }; + // renderSlot + Vue.prototype._t = function ( + name, + fallback, + props + ) { + var scopedSlotFn = this.$scopedSlots[name]; + if (scopedSlotFn) { // scoped slot + return scopedSlotFn(props || {}) || fallback + } else { + var slotNodes = this.$slots[name]; + // warn duplicate slot usage + if (slotNodes && process.env.NODE_ENV !== 'production') { + slotNodes._rendered && warn( + "Duplicate presence of slot \"" + name + "\" found in the same render tree " + + "- this will likely cause render errors.", + this + ); + slotNodes._rendered = true; } + return slotNodes || fallback } - } -} + }; -/** - * Merge two option objects into a new one. - * Core utility used in both instantiation and inheritance. - */ -function mergeOptions ( - parent, - child, - vm -) { - if (process.env.NODE_ENV !== 'production') { - checkComponents(child); - } - normalizeProps(child); - normalizeDirectives(child); - var extendsFrom = child.extends; - if (extendsFrom) { - parent = typeof extendsFrom === 'function' - ? mergeOptions(parent, extendsFrom.options, vm) - : mergeOptions(parent, extendsFrom, vm); - } - if (child.mixins) { - for (var i = 0, l = child.mixins.length; i < l; i++) { - var mixin = child.mixins[i]; - if (mixin.prototype instanceof Vue$2) { - mixin = mixin.options; + // apply v-bind object + Vue.prototype._b = function bindProps ( + data, + tag, + value, + asProp + ) { + if (value) { + if (!isObject(value)) { + process.env.NODE_ENV !== 'production' && warn( + 'v-bind without argument expects an Object or Array value', + this + ); + } else { + if (Array.isArray(value)) { + value = toObject(value); + } + for (var key in value) { + if (key === 'class' || key === 'style') { + data[key] = value[key]; + } else { + var hash = asProp || config.mustUseProp(tag, key) + ? data.domProps || (data.domProps = {}) + : data.attrs || (data.attrs = {}); + hash[key] = value[key]; + } + } } - parent = mergeOptions(parent, mixin, vm); - } - } - var options = {}; - var key; - for (key in parent) { - mergeField(key); - } - for (key in child) { - if (!hasOwn(parent, key)) { - mergeField(key); } - } - function mergeField (key) { - var strat = strats[key] || defaultStrat; - options[key] = strat(parent[key], child[key], vm, key); - } - return options -} + return data + }; -/** - * Resolve an asset. - * This function is used because child instances need access - * to assets defined in its ancestor chain. - */ -function resolveAsset ( - options, - type, - id, - warnMissing -) { - /* istanbul ignore if */ - if (typeof id !== 'string') { - return - } - var assets = options[type]; - var res = assets[id] || - // camelCase ID - assets[camelize(id)] || - // Pascal Case ID - assets[capitalize(camelize(id))]; - if (process.env.NODE_ENV !== 'production' && warnMissing && !res) { - warn( - 'Failed to resolve ' + type.slice(0, -1) + ': ' + id, - options - ); - } - return res + // expose v-on keyCodes + Vue.prototype._k = function getKeyCodes (key) { + return config.keyCodes[key] + }; } -/* */ - -function validateProp ( - key, - propOptions, - propsData, - vm +function resolveSlots ( + renderChildren, + context ) { - var prop = propOptions[key]; - var absent = !hasOwn(propsData, key); - var value = propsData[key]; - // handle boolean props - if (isBooleanType(prop.type)) { - if (absent && !hasOwn(prop, 'default')) { - value = false; - } else if (value === '' || value === hyphenate(key)) { - value = true; - } + var slots = {}; + if (!renderChildren) { + return slots } - // check default value - if (value === undefined) { - value = getPropDefaultValue(vm, prop, key); - // since the default value is a fresh copy, - // make sure to observe it. - var prevShouldConvert = observerState.shouldConvert; - observerState.shouldConvert = true; - observe(value); - observerState.shouldConvert = prevShouldConvert; + var children = normalizeChildren(renderChildren) || []; + var defaultSlot = []; + var name, child; + for (var i = 0, l = children.length; i < l; i++) { + child = children[i]; + // named slots should only be respected if the vnode was rendered in the + // same context. + if ((child.context === context || child.functionalContext === context) && + child.data && (name = child.data.slot)) { + var slot = (slots[name] || (slots[name] = [])); + if (child.tag === 'template') { + slot.push.apply(slot, child.children); + } else { + slot.push(child); + } + } else { + defaultSlot.push(child); + } } - if (process.env.NODE_ENV !== 'production') { - assertProp(prop, key, value, vm, absent); + // ignore single whitespace + if (defaultSlot.length && !( + defaultSlot.length === 1 && + (defaultSlot[0].text === ' ' || defaultSlot[0].isComment) + )) { + slots.default = defaultSlot; } - return value + return slots } -/** - * Get the default value of a prop. - */ -function getPropDefaultValue (vm, prop, key) { - // no default, return undefined - if (!hasOwn(prop, 'default')) { - return undefined - } - var def = prop.default; - // warn against non-factory defaults for Object & Array - if (isObject(def)) { - process.env.NODE_ENV !== 'production' && warn( - 'Invalid default value for prop "' + key + '": ' + - 'Props with type Object/Array must use a factory function ' + - 'to return the default value.', - vm - ); - } - // the raw prop value was also undefined from previous render, - // return previous default value to avoid unnecessary watcher trigger - if (vm && vm.$options.propsData && - vm.$options.propsData[key] === undefined && - vm[key] !== undefined) { - return vm[key] - } - // call factory function for non-Function types - return typeof def === 'function' && prop.type !== Function - ? def.call(vm) - : def -} +/* */ -/** - * Assert whether a prop is valid. - */ -function assertProp ( - prop, - name, - value, - vm, - absent -) { - if (prop.required && absent) { - warn( - 'Missing required prop: "' + name + '"', - vm - ); - return - } - if (value == null && !prop.required) { - return +function initEvents (vm) { + vm._events = Object.create(null); + // init parent attached events + var listeners = vm.$options._parentListeners; + var on = bind$1(vm.$on, vm); + var off = bind$1(vm.$off, vm); + vm._updateListeners = function (listeners, oldListeners) { + updateListeners(listeners, oldListeners || {}, on, off, vm); + }; + if (listeners) { + vm._updateListeners(listeners); } - var type = prop.type; - var valid = !type || type === true; - var expectedTypes = []; - if (type) { - if (!Array.isArray(type)) { - type = [type]; +} + +function eventsMixin (Vue) { + Vue.prototype.$on = function (event, fn) { + var vm = this;(vm._events[event] || (vm._events[event] = [])).push(fn); + return vm + }; + + Vue.prototype.$once = function (event, fn) { + var vm = this; + function on () { + vm.$off(event, on); + fn.apply(vm, arguments); } - for (var i = 0; i < type.length && !valid; i++) { - var assertedType = assertType(value, type[i]); - expectedTypes.push(assertedType.expectedType); - valid = assertedType.valid; + on.fn = fn; + vm.$on(event, on); + return vm + }; + + Vue.prototype.$off = function (event, fn) { + var vm = this; + // all + if (!arguments.length) { + vm._events = Object.create(null); + return vm } - } - if (!valid) { - warn( - 'Invalid prop: type check failed for prop "' + name + '".' + - ' Expected ' + expectedTypes.map(capitalize).join(', ') + - ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.', - vm - ); - return - } - var validator = prop.validator; - if (validator) { - if (!validator(value)) { - warn( - 'Invalid prop: custom validator check failed for prop "' + name + '".', + // specific event + var cbs = vm._events[event]; + if (!cbs) { + return vm + } + if (arguments.length === 1) { + vm._events[event] = null; + return vm + } + // specific handler + var cb; + var i = cbs.length; + while (i--) { + cb = cbs[i]; + if (cb === fn || cb.fn === fn) { + cbs.splice(i, 1); + break + } + } + return vm + }; + + Vue.prototype.$emit = function (event) { + var vm = this; + var cbs = vm._events[event]; + if (cbs) { + cbs = cbs.length > 1 ? toArray(cbs) : cbs; + var args = toArray(arguments, 1); + for (var i = 0, l = cbs.length; i < l; i++) { + cbs[i].apply(vm, args); + } + } + return vm + }; +} + +/* */ + +var uid = 0; + +function initMixin (Vue) { + Vue.prototype._init = function (options) { + var vm = this; + // a uid + vm._uid = uid++; + // a flag to avoid this being observed + vm._isVue = true; + // merge options + if (options && options._isComponent) { + // optimize internal component instantiation + // since dynamic options merging is pretty slow, and none of the + // internal component options needs special treatment. + initInternalComponent(vm, options); + } else { + vm.$options = mergeOptions( + resolveConstructorOptions(vm.constructor), + options || {}, vm ); } - } + /* istanbul ignore else */ + if (process.env.NODE_ENV !== 'production') { + initProxy(vm); + } else { + vm._renderProxy = vm; + } + // expose real self + vm._self = vm; + initLifecycle(vm); + initEvents(vm); + callHook(vm, 'beforeCreate'); + initState(vm); + callHook(vm, 'created'); + initRender(vm); + }; } -/** - * Assert the type of a value - */ -function assertType (value, type) { - var valid; - var expectedType = getType(type); - if (expectedType === 'String') { - valid = typeof value === (expectedType = 'string'); - } else if (expectedType === 'Number') { - valid = typeof value === (expectedType = 'number'); - } else if (expectedType === 'Boolean') { - valid = typeof value === (expectedType = 'boolean'); - } else if (expectedType === 'Function') { - valid = typeof value === (expectedType = 'function'); - } else if (expectedType === 'Object') { - valid = isPlainObject(value); - } else if (expectedType === 'Array') { - valid = Array.isArray(value); - } else { - valid = value instanceof type; - } - return { - valid: valid, - expectedType: expectedType +function initInternalComponent (vm, options) { + var opts = vm.$options = Object.create(vm.constructor.options); + // doing this because it's faster than dynamic enumeration. + opts.parent = options.parent; + opts.propsData = options.propsData; + opts._parentVnode = options._parentVnode; + opts._parentListeners = options._parentListeners; + opts._renderChildren = options._renderChildren; + opts._componentTag = options._componentTag; + if (options.render) { + opts.render = options.render; + opts.staticRenderFns = options.staticRenderFns; } } -/** - * Use function string name to check built-in types, - * because a simple equality check will fail when running - * across different vms / iframes. - */ -function getType (fn) { - var match = fn && fn.toString().match(/^\s*function (\w+)/); - return match && match[1] -} - -function isBooleanType (fn) { - if (!Array.isArray(fn)) { - return getType(fn) === 'Boolean' - } - for (var i = 0, len = fn.length; i < len; i++) { - if (getType(fn[i]) === 'Boolean') { - return true +function resolveConstructorOptions (Ctor) { + var options = Ctor.options; + if (Ctor.super) { + var superOptions = Ctor.super.options; + var cachedSuperOptions = Ctor.superOptions; + var extendOptions = Ctor.extendOptions; + if (superOptions !== cachedSuperOptions) { + // super option changed + Ctor.superOptions = superOptions; + extendOptions.render = options.render; + extendOptions.staticRenderFns = options.staticRenderFns; + extendOptions._scopeId = options._scopeId; + options = Ctor.options = mergeOptions(superOptions, extendOptions); + if (options.name) { + options.components[options.name] = Ctor; + } } } - /* istanbul ignore next */ - return false + return options } +function Vue$2 (options) { + if (process.env.NODE_ENV !== 'production' && + !(this instanceof Vue$2)) { + warn('Vue is a constructor and should be called with the `new` keyword'); + } + this._init(options); +} - -var util = Object.freeze({ - defineReactive: defineReactive$$1, - _toString: _toString, - toNumber: toNumber, - makeMap: makeMap, - isBuiltInTag: isBuiltInTag, - remove: remove$1, - hasOwn: hasOwn, - isPrimitive: isPrimitive, - cached: cached, - camelize: camelize, - capitalize: capitalize, - hyphenate: hyphenate, - bind: bind$1, - toArray: toArray, - extend: extend, - isObject: isObject, - isPlainObject: isPlainObject, - toObject: toObject, - noop: noop, - no: no, - genStaticKeys: genStaticKeys, - looseEqual: looseEqual, - looseIndexOf: looseIndexOf, - isReserved: isReserved, - def: def, - parsePath: parsePath, - hasProto: hasProto, - inBrowser: inBrowser, - UA: UA, - isIE: isIE, - isIE9: isIE9, - isEdge: isEdge, - isAndroid: isAndroid, - isIOS: isIOS, - devtools: devtools, - nextTick: nextTick, - get _Set () { return _Set; }, - mergeOptions: mergeOptions, - resolveAsset: resolveAsset, - get warn () { return warn; }, - get formatComponentName () { return formatComponentName; }, - validateProp: validateProp -}); +initMixin(Vue$2); +stateMixin(Vue$2); +eventsMixin(Vue$2); +lifecycleMixin(Vue$2); +renderMixin(Vue$2); /* */ @@ -7903,9 +7982,25 @@ function initAssetRegisters (Vue) { }); } +/* */ + +var patternTypes = [String, RegExp]; + +function matches (pattern, name) { + if (typeof pattern === 'string') { + return pattern.split(',').indexOf(name) > -1 + } else { + return pattern.test(name) + } +} + var KeepAlive = { name: 'keep-alive', abstract: true, + props: { + include: patternTypes, + exclude: patternTypes + }, created: function created () { this.cache = Object.create(null); }, @@ -7913,10 +8008,18 @@ var KeepAlive = { var vnode = getFirstComponentChild(this.$slots.default); if (vnode && vnode.componentOptions) { var opts = vnode.componentOptions; + // check pattern + var name = opts.Ctor.options.name || opts.tag; + if (name && ( + (this.include && !matches(this.include, name)) || + (this.exclude && matches(this.exclude, name)) + )) { + return vnode + } var key = vnode.key == null // same constructor may get registered as different local components // so cid alone is not enough (#3269) - ? opts.Ctor.cid + '::' + opts.tag + ? opts.Ctor.cid + (opts.tag ? ("::" + (opts.tag)) : '') : vnode.key; if (this.cache[key]) { vnode.child = this.cache[key].child; @@ -7981,15 +8084,22 @@ function initGlobalAPI (Vue) { initGlobalAPI(Vue$2); Object.defineProperty(Vue$2.prototype, '$isServer', { - get: function () { return config._isServer; } + get: isServerRendering }); -Vue$2.version = '2.0.7'; +Vue$2.version = '2.1.3'; /* */ // attributes that should be using props for binding -var mustUseProp = makeMap('value,selected,checked,muted'); +var mustUseProp = function (tag, attr) { + return ( + (attr === 'value' && (tag === 'input' || tag === 'textarea' || tag === 'option')) || + (attr === 'selected' && tag === 'option') || + (attr === 'checked' && tag === 'input') || + (attr === 'muted' && tag === 'video') + ) +}; var isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck'); @@ -8333,7 +8443,7 @@ function registerRef (vnode, isRemoval) { } } else { if (vnode.data.refInFor) { - if (Array.isArray(refs[key])) { + if (Array.isArray(refs[key]) && refs[key].indexOf(ref) < 0) { refs[key].push(ref); } else { refs[key] = [ref]; @@ -8683,6 +8793,7 @@ function createPatchFunction (backend) { vnode.key === oldVnode.key && (vnode.isCloned || vnode.isOnce)) { vnode.elm = oldVnode.elm; + vnode.child = oldVnode.child; return } var i; @@ -8847,9 +8958,13 @@ function createPatchFunction (backend) { createElm(vnode, insertedVnodeQueue); // component root element replaced. - // update parent placeholder node element. + // update parent placeholder node element, recursively if (vnode.parent) { - vnode.parent.elm = vnode.elm; + var ancestor = vnode.parent; + while (ancestor) { + ancestor.elm = vnode.elm; + ancestor = ancestor.parent; + } if (isPatchable(vnode)) { for (var i = 0; i < cbs.create.length; ++i) { cbs.create[i](emptyNode, vnode.parent); @@ -9123,13 +9238,14 @@ function updateDOMProps (oldVnode, vnode) { } } for (key in props) { + cur = props[key]; // ignore children if the node has textContent or innerHTML, // as these will throw away existing DOM nodes and cause removal errors // on subsequent patches (#3360) - if ((key === 'textContent' || key === 'innerHTML') && vnode.children) { - vnode.children.length = 0; + if (key === 'textContent' || key === 'innerHTML') { + if (vnode.children) { vnode.children.length = 0; } + if (cur === oldProps[key]) { continue } } - cur = props[key]; if (key === 'value') { // store value as _value as well since // non-string values will be stringified @@ -9260,7 +9376,12 @@ function updateStyle (oldVnode, vnode) { var cur, name; var el = vnode.elm; - var oldStyle = oldVnode.data.style || {}; + var oldStaticStyle = oldVnode.data.staticStyle; + var oldStyleBinding = oldVnode.data.style || {}; + + // if static style exists, stylebinding already merged into it when doing normalizeStyleData + var oldStyle = oldStaticStyle || oldStyleBinding; + var style = normalizeStyleBinding(vnode.data.style) || {}; vnode.data.style = style.__ob__ ? extend({}, style) : style; @@ -10179,7 +10300,7 @@ var TransitionGroup = { updated: function updated () { var children = this.prevChildren; - var moveClass = this.moveClass || (this.name + '-move'); + var moveClass = this.moveClass || ((this.name || 'v') + '-move'); if (!children.length || !this.hasMove(children[0].elm, moveClass)) { return } @@ -10273,14 +10394,14 @@ extend(Vue$2.options.directives, platformDirectives); extend(Vue$2.options.components, platformComponents); // install platform patch function -Vue$2.prototype.__patch__ = config._isServer ? noop : patch$1; +Vue$2.prototype.__patch__ = inBrowser ? patch$1 : noop; // wrap mount Vue$2.prototype.$mount = function ( el, hydrating ) { - el = el && !config._isServer ? query(el) : undefined; + el = el && inBrowser ? query(el) : undefined; return this._mount(el, hydrating) }; @@ -10304,16 +10425,111 @@ setTimeout(function () { module.exports = Vue$2; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(14), __webpack_require__(5))) /***/ }, -/* 33 */ +/* 34 */ /***/ function(module, exports, __webpack_require__) { -module.exports = { "default": __webpack_require__(123), __esModule: true }; +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {'use strict'; + +var utils = __webpack_require__(2); +var normalizeHeaderName = __webpack_require__(99); + +var PROTECTION_PREFIX = /^\)\]\}',?\n/; +var DEFAULT_CONTENT_TYPE = { + 'Content-Type': 'application/x-www-form-urlencoded' +}; + +function setContentTypeIfUnset(headers, value) { + if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) { + headers['Content-Type'] = value; + } +} + +function getDefaultAdapter() { + var adapter; + if (typeof XMLHttpRequest !== 'undefined') { + // For browsers use XHR adapter + adapter = __webpack_require__(51); + } else if (typeof process !== 'undefined') { + // For node use HTTP adapter + adapter = __webpack_require__(51); + } + return adapter; +} + +var defaults = { + adapter: getDefaultAdapter(), + + transformRequest: [function transformRequest(data, headers) { + normalizeHeaderName(headers, 'Content-Type'); + if (utils.isFormData(data) || + utils.isArrayBuffer(data) || + utils.isStream(data) || + utils.isFile(data) || + utils.isBlob(data) + ) { + return data; + } + if (utils.isArrayBufferView(data)) { + return data.buffer; + } + if (utils.isURLSearchParams(data)) { + setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8'); + return data.toString(); + } + if (utils.isObject(data)) { + setContentTypeIfUnset(headers, 'application/json;charset=utf-8'); + return JSON.stringify(data); + } + return data; + }], + + transformResponse: [function transformResponse(data) { + /*eslint no-param-reassign:0*/ + if (typeof data === 'string') { + data = data.replace(PROTECTION_PREFIX, ''); + try { + data = JSON.parse(data); + } catch (e) { /* Ignore */ } + } + return data; + }], + + timeout: 0, + + xsrfCookieName: 'XSRF-TOKEN', + xsrfHeaderName: 'X-XSRF-TOKEN', + + maxContentLength: -1, + + validateStatus: function validateStatus(status) { + return status >= 200 && status < 300; + } +}; + +defaults.headers = { + common: { + 'Accept': 'application/json, text/plain, */*' + } +}; + +utils.forEach(['delete', 'get', 'head'], function forEachMehtodNoData(method) { + defaults.headers[method] = {}; +}); + +utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { + defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE); +}); + +module.exports = defaults; + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) /***/ }, -/* 34 */ +/* 35 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -10426,10 +10642,10 @@ exports.allocUnsafeSlow = function allocUnsafeSlow(size) { return new SlowBuffer(size); } -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(21))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(14))) /***/ }, -/* 35 */ +/* 36 */ /***/ function(module, exports) { module.exports = function(it){ @@ -10438,7 +10654,7 @@ module.exports = function(it){ }; /***/ }, -/* 36 */ +/* 37 */ /***/ function(module, exports) { // 7.2.1 RequireObjectCoercible(argument) @@ -10448,10 +10664,10 @@ module.exports = function(it){ }; /***/ }, -/* 37 */ +/* 38 */ /***/ function(module, exports, __webpack_require__) { -var isObject = __webpack_require__(27) +var isObject = __webpack_require__(28) , document = __webpack_require__(4).document // in old IE typeof document.createElement is 'object' , is = isObject(document) && isObject(document.createElement); @@ -10460,7 +10676,7 @@ module.exports = function(it){ }; /***/ }, -/* 38 */ +/* 39 */ /***/ function(module, exports) { module.exports = function(exec){ @@ -10472,11 +10688,11 @@ module.exports = function(exec){ }; /***/ }, -/* 39 */ +/* 40 */ /***/ function(module, exports, __webpack_require__) { -var def = __webpack_require__(18).f - , has = __webpack_require__(26) +var def = __webpack_require__(19).f + , has = __webpack_require__(27) , TAG = __webpack_require__(3)('toStringTag'); module.exports = function(it, tag, stat){ @@ -10484,7 +10700,7 @@ module.exports = function(it, tag, stat){ }; /***/ }, -/* 40 */ +/* 41 */ /***/ function(module, exports, __webpack_require__) { var shared = __webpack_require__(67)('keys') @@ -10494,7 +10710,7 @@ module.exports = function(key){ }; /***/ }, -/* 41 */ +/* 42 */ /***/ function(module, exports) { // 7.1.4 ToInteger @@ -10505,23 +10721,23 @@ module.exports = function(it){ }; /***/ }, -/* 42 */ +/* 43 */ /***/ function(module, exports, __webpack_require__) { // to indexed object, toObject with fallback for non-array-like ES3 strings var IObject = __webpack_require__(62) - , defined = __webpack_require__(36); + , defined = __webpack_require__(37); module.exports = function(it){ return IObject(defined(it)); }; /***/ }, -/* 43 */ +/* 44 */ /***/ function(module, exports, __webpack_require__) { var v1 = __webpack_require__(175); var v2 = __webpack_require__(176); -var pbkdf2 = __webpack_require__(44); +var pbkdf2 = __webpack_require__(45); var objectAssign = __webpack_require__(178); module.exports = { @@ -10583,7 +10799,7 @@ function generatePassword(site, login, masterPassword, passwordProfile) { } /***/ }, -/* 44 */ +/* 45 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(Buffer) {var pbkdf2 = __webpack_require__(179); @@ -10640,7 +10856,7 @@ module.exports = shouldUseNative() ? pbkdf2Native : pbkdf2Browserified; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0).Buffer)) /***/ }, -/* 45 */ +/* 46 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -10691,7 +10907,7 @@ function nextTick(fn, arg1, arg2, arg3) { /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) /***/ }, -/* 46 */ +/* 47 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -10744,7 +10960,7 @@ module.exports = Transform; var Duplex = __webpack_require__(8); /**/ -var util = __webpack_require__(19); +var util = __webpack_require__(20); util.inherits = __webpack_require__(1); /**/ @@ -10791,7 +11007,6 @@ function Transform(options) { this._transformState = new TransformState(this); - // when the writable side finishes, then flush out anything remaining. var stream = this; // start out asking for a readable event once data is transformed. @@ -10808,9 +11023,10 @@ function Transform(options) { if (typeof options.flush === 'function') this._flush = options.flush; } + // When the writable side finishes, then flush out anything remaining. this.once('prefinish', function () { - if (typeof this._flush === 'function') this._flush(function (er) { - done(stream, er); + if (typeof this._flush === 'function') this._flush(function (er, data) { + done(stream, er, data); });else done(stream); }); } @@ -10831,7 +11047,7 @@ Transform.prototype.push = function (chunk, encoding) { // an error, then that'll put the hurt on the whole operation. If you // never call cb(), then you'll never get another chunk. Transform.prototype._transform = function (chunk, encoding, cb) { - throw new Error('Not implemented'); + throw new Error('_transform() is not implemented'); }; Transform.prototype._write = function (chunk, encoding, cb) { @@ -10861,9 +11077,11 @@ Transform.prototype._read = function (n) { } }; -function done(stream, er) { +function done(stream, er, data) { if (er) return stream.emit('error', er); + if (data !== null && data !== undefined) stream.push(data); + // if there's nothing in the write buffer, then that means // that nothing more will ever be provided var ws = stream._writableState; @@ -10877,7 +11095,7 @@ function done(stream, er) { } /***/ }, -/* 47 */ +/* 48 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -10890,17 +11108,21 @@ function done(stream, er) { module.exports = Writable; /**/ -var processNextTick = __webpack_require__(45); +var processNextTick = __webpack_require__(46); /**/ /**/ var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : processNextTick; /**/ +/**/ +var Duplex; +/**/ + Writable.WritableState = WritableState; /**/ -var util = __webpack_require__(19); +var util = __webpack_require__(20); util.inherits = __webpack_require__(1); /**/ @@ -10914,16 +11136,16 @@ var internalUtil = { var Stream; (function () { try { - Stream = __webpack_require__(20); + Stream = __webpack_require__(21); } catch (_) {} finally { - if (!Stream) Stream = __webpack_require__(29).EventEmitter; + if (!Stream) Stream = __webpack_require__(30).EventEmitter; } })(); /**/ var Buffer = __webpack_require__(0).Buffer; /**/ -var bufferShim = __webpack_require__(34); +var bufferShim = __webpack_require__(35); /**/ util.inherits(Writable, Stream); @@ -10937,7 +11159,6 @@ function WriteReq(chunk, encoding, cb) { this.next = null; } -var Duplex; function WritableState(options, stream) { Duplex = Duplex || __webpack_require__(8); @@ -10959,6 +11180,7 @@ function WritableState(options, stream) { // cast to ints. this.highWaterMark = ~ ~this.highWaterMark; + // drain event flag. this.needDrain = false; // at the start of calling end() this.ending = false; @@ -11033,7 +11255,7 @@ function WritableState(options, stream) { this.corkedRequestsFree = new CorkedRequest(this); } -WritableState.prototype.getBuffer = function writableStateGetBuffer() { +WritableState.prototype.getBuffer = function getBuffer() { var current = this.bufferedRequest; var out = []; while (current) { @@ -11053,13 +11275,37 @@ WritableState.prototype.getBuffer = function writableStateGetBuffer() { } catch (_) {} })(); -var Duplex; +// Test _writableState for inheritance to account for Duplex streams, +// whose prototype chain only points to Readable. +var realHasInstance; +if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') { + realHasInstance = Function.prototype[Symbol.hasInstance]; + Object.defineProperty(Writable, Symbol.hasInstance, { + value: function (object) { + if (realHasInstance.call(this, object)) return true; + + return object && object._writableState instanceof WritableState; + } + }); +} else { + realHasInstance = function (object) { + return object instanceof this; + }; +} + function Writable(options) { Duplex = Duplex || __webpack_require__(8); - // Writable ctor is applied to Duplexes, though they're not - // instanceof Writable, they're instanceof Readable. - if (!(this instanceof Writable) && !(this instanceof Duplex)) return new Writable(options); + // Writable ctor is applied to Duplexes, too. + // `realHasInstance` is necessary because using plain `instanceof` + // would return false, as no `_writableState` property is attached. + + // Trying to use the custom `instanceof` for Writable here will also break the + // Node.js LazyTransform implementation, which has a non-trivial getter for + // `_writableState` that would lead to infinite recursion. + if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) { + return new Writable(options); + } this._writableState = new WritableState(options, this); @@ -11319,7 +11565,7 @@ function clearBuffer(stream, state) { } Writable.prototype._write = function (chunk, encoding, cb) { - cb(new Error('not implemented')); + cb(new Error('_write() is not implemented')); }; Writable.prototype._writev = null; @@ -11407,10 +11653,10 @@ function CorkedRequest(state) { } }; } -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5), __webpack_require__(30).setImmediate)) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5), __webpack_require__(31).setImmediate)) /***/ }, -/* 48 */ +/* 49 */ /***/ function(module, exports, __webpack_require__) { // Copyright Joyent, Inc. and other Node contributors. @@ -11637,13 +11883,13 @@ function base64DetectIncompleteChar(buffer) { /***/ }, -/* 49 */ +/* 50 */ /***/ function(module, exports, __webpack_require__) { module.exports = __webpack_require__(85); /***/ }, -/* 50 */ +/* 51 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -11654,8 +11900,8 @@ var settle = __webpack_require__(91); var buildURL = __webpack_require__(94); var parseHeaders = __webpack_require__(100); var isURLSameOrigin = __webpack_require__(98); -var createError = __webpack_require__(53); -var btoa = (typeof window !== 'undefined' && window.btoa) || __webpack_require__(93); +var createError = __webpack_require__(54); +var btoa = (typeof window !== 'undefined' && window.btoa && window.btoa.bind(window)) || __webpack_require__(93); module.exports = function xhrAdapter(config) { return new Promise(function dispatchXhrRequest(resolve, reject) { @@ -11828,7 +12074,7 @@ module.exports = function xhrAdapter(config) { /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) /***/ }, -/* 51 */ +/* 52 */ /***/ function(module, exports) { "use strict"; @@ -11848,140 +12094,46 @@ Cancel.prototype.toString = function toString() { return 'Cancel' + (this.message ? ': ' + this.message : ''); }; -Cancel.prototype.__CANCEL__ = true; - -module.exports = Cancel; - - -/***/ }, -/* 52 */ -/***/ function(module, exports) { - -"use strict"; -'use strict'; - -module.exports = function isCancel(value) { - return !!(value && value.__CANCEL__); -}; - - -/***/ }, -/* 53 */ -/***/ function(module, exports, __webpack_require__) { - -"use strict"; -'use strict'; - -var enhanceError = __webpack_require__(90); - -/** - * Create an Error with the specified message, config, error code, and response. - * - * @param {string} message The error message. - * @param {Object} config The config. - * @param {string} [code] The error code (for example, 'ECONNABORTED'). - @ @param {Object} [response] The response. - * @returns {Error} The created error. - */ -module.exports = function createError(message, config, code, response) { - var error = new Error(message); - return enhanceError(error, config, code, response); -}; - - -/***/ }, -/* 54 */ -/***/ function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) {'use strict'; - -var utils = __webpack_require__(2); -var normalizeHeaderName = __webpack_require__(99); - -var PROTECTION_PREFIX = /^\)\]\}',?\n/; -var DEFAULT_CONTENT_TYPE = { - 'Content-Type': 'application/x-www-form-urlencoded' -}; - -function setContentTypeIfUnset(headers, value) { - if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) { - headers['Content-Type'] = value; - } -} - -function getDefaultAdapter() { - var adapter; - if (typeof XMLHttpRequest !== 'undefined') { - // For browsers use XHR adapter - adapter = __webpack_require__(50); - } else if (typeof process !== 'undefined') { - // For node use HTTP adapter - adapter = __webpack_require__(50); - } - return adapter; -} - -module.exports = { - adapter: getDefaultAdapter(), - - transformRequest: [function transformRequest(data, headers) { - normalizeHeaderName(headers, 'Content-Type'); - if (utils.isFormData(data) || - utils.isArrayBuffer(data) || - utils.isStream(data) || - utils.isFile(data) || - utils.isBlob(data) - ) { - return data; - } - if (utils.isArrayBufferView(data)) { - return data.buffer; - } - if (utils.isURLSearchParams(data)) { - setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8'); - return data.toString(); - } - if (utils.isObject(data)) { - setContentTypeIfUnset(headers, 'application/json;charset=utf-8'); - return JSON.stringify(data); - } - return data; - }], +Cancel.prototype.__CANCEL__ = true; - transformResponse: [function transformResponse(data) { - /*eslint no-param-reassign:0*/ - if (typeof data === 'string') { - data = data.replace(PROTECTION_PREFIX, ''); - try { - data = JSON.parse(data); - } catch (e) { /* Ignore */ } - } - return data; - }], +module.exports = Cancel; - headers: { - common: { - 'Accept': 'application/json, text/plain, */*' - }, - patch: utils.merge(DEFAULT_CONTENT_TYPE), - post: utils.merge(DEFAULT_CONTENT_TYPE), - put: utils.merge(DEFAULT_CONTENT_TYPE) - }, - timeout: 0, +/***/ }, +/* 53 */ +/***/ function(module, exports) { - xsrfCookieName: 'XSRF-TOKEN', - xsrfHeaderName: 'X-XSRF-TOKEN', +"use strict"; +'use strict'; - maxContentLength: -1, +module.exports = function isCancel(value) { + return !!(value && value.__CANCEL__); +}; - validateStatus: function validateStatus(status) { - return status >= 200 && status < 300; - } + +/***/ }, +/* 54 */ +/***/ function(module, exports, __webpack_require__) { + +"use strict"; +'use strict'; + +var enhanceError = __webpack_require__(90); + +/** + * Create an Error with the specified message, config, error code, and response. + * + * @param {string} message The error message. + * @param {Object} config The config. + * @param {string} [code] The error code (for example, 'ECONNABORTED'). + @ @param {Object} [response] The response. + * @returns {Error} The created error. + */ +module.exports = function createError(message, config, code, response) { + var error = new Error(message); + return enhanceError(error, config, code, response); }; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) /***/ }, /* 55 */ @@ -12012,21 +12164,25 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _classCallCheck2 = __webpack_require__(15); +var _assign = __webpack_require__(23); + +var _assign2 = _interopRequireDefault(_assign); + +var _classCallCheck2 = __webpack_require__(16); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); -var _createClass2 = __webpack_require__(16); +var _createClass2 = __webpack_require__(17); var _createClass3 = _interopRequireDefault(_createClass2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var Password = function () { - function Password(password) { + function Password(pwd) { (0, _classCallCheck3.default)(this, Password); - this.password = password; + var password = (0, _assign2.default)({}, pwd); this.options = { uppercase: password.uppercase, lowercase: password.lowercase, @@ -12035,6 +12191,7 @@ var Password = function () { length: password.length, counter: password.counter }; + this.password = password; } (0, _createClass3.default)(Password, [{ @@ -12078,7 +12235,7 @@ module.exports = { "default": __webpack_require__(125), __esModule: true }; /***/ function(module, exports, __webpack_require__) { // getting tag from 19.1.3.6 Object.prototype.toString() -var cof = __webpack_require__(23) +var cof = __webpack_require__(24) , TAG = __webpack_require__(3)('toStringTag') // ES3 wrong here , ARG = cof(function(){ return arguments; }()) == 'Arguments'; @@ -12121,7 +12278,7 @@ module.exports = __webpack_require__(4).document && document.documentElement; /***/ function(module, exports, __webpack_require__) { // fallback for non-array-like ES3 and non-enumerable old V8 strings -var cof = __webpack_require__(23); +var cof = __webpack_require__(24); module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){ return cof(it) == 'String' ? it.split('') : Object(it); }; @@ -12133,13 +12290,13 @@ module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){ "use strict"; 'use strict'; var LIBRARY = __webpack_require__(64) - , $export = __webpack_require__(25) + , $export = __webpack_require__(26) , redefine = __webpack_require__(146) , hide = __webpack_require__(12) - , has = __webpack_require__(26) - , Iterators = __webpack_require__(17) + , has = __webpack_require__(27) + , Iterators = __webpack_require__(18) , $iterCreate = __webpack_require__(134) - , setToStringTag = __webpack_require__(39) + , setToStringTag = __webpack_require__(40) , getPrototypeOf = __webpack_require__(142) , ITERATOR = __webpack_require__(3)('iterator') , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next` @@ -12248,10 +12405,10 @@ module.exports = function(key){ /* 68 */ /***/ function(module, exports, __webpack_require__) { -var ctx = __webpack_require__(24) +var ctx = __webpack_require__(25) , invoke = __webpack_require__(131) , html = __webpack_require__(61) - , cel = __webpack_require__(37) + , cel = __webpack_require__(38) , global = __webpack_require__(4) , process = global.process , setTask = global.setImmediate @@ -12287,7 +12444,7 @@ if(!setTask || !clearTask){ delete queue[id]; }; // Node.js 0.8- - if(__webpack_require__(23)(process) == 'process'){ + if(__webpack_require__(24)(process) == 'process'){ defer = function(id){ process.nextTick(ctx(run, id, 1)); }; @@ -12329,7 +12486,7 @@ module.exports = { /***/ function(module, exports, __webpack_require__) { // 7.1.15 ToLength -var toInteger = __webpack_require__(41) +var toInteger = __webpack_require__(42) , min = Math.min; module.exports = function(it){ return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 @@ -12340,7 +12497,7 @@ module.exports = function(it){ /***/ function(module, exports, __webpack_require__) { // 7.1.13 ToObject(argument) -var defined = __webpack_require__(36); +var defined = __webpack_require__(37); module.exports = function(it){ return Object(defined(it)); }; @@ -12364,7 +12521,7 @@ module.exports = function(key){ var createHash = __webpack_require__(160); var inherits = __webpack_require__(1) -var Transform = __webpack_require__(20).Transform +var Transform = __webpack_require__(21).Transform var ZEROS = new Buffer(128) ZEROS.fill(0) @@ -12465,10 +12622,10 @@ module.exports = typeof Promise === 'function' ? Promise : __webpack_require__(1 module.exports = PassThrough; -var Transform = __webpack_require__(46); +var Transform = __webpack_require__(47); /**/ -var util = __webpack_require__(19); +var util = __webpack_require__(20); util.inherits = __webpack_require__(1); /**/ @@ -12494,17 +12651,21 @@ PassThrough.prototype._transform = function (chunk, encoding, cb) { module.exports = Readable; /**/ -var processNextTick = __webpack_require__(45); +var processNextTick = __webpack_require__(46); /**/ /**/ var isArray = __webpack_require__(73); /**/ +/**/ +var Duplex; +/**/ + Readable.ReadableState = ReadableState; /**/ -var EE = __webpack_require__(29).EventEmitter; +var EE = __webpack_require__(30).EventEmitter; var EElistenerCount = function (emitter, type) { return emitter.listeners(type).length; @@ -12515,20 +12676,20 @@ var EElistenerCount = function (emitter, type) { var Stream; (function () { try { - Stream = __webpack_require__(20); + Stream = __webpack_require__(21); } catch (_) {} finally { - if (!Stream) Stream = __webpack_require__(29).EventEmitter; + if (!Stream) Stream = __webpack_require__(30).EventEmitter; } })(); /**/ var Buffer = __webpack_require__(0).Buffer; /**/ -var bufferShim = __webpack_require__(34); +var bufferShim = __webpack_require__(35); /**/ /**/ -var util = __webpack_require__(19); +var util = __webpack_require__(20); util.inherits = __webpack_require__(1); /**/ @@ -12548,6 +12709,8 @@ var StringDecoder; util.inherits(Readable, Stream); function prependListener(emitter, event, fn) { + // Sadly this is not cacheable as some libraries bundle their own + // event emitter implementation with them. if (typeof emitter.prependListener === 'function') { return emitter.prependListener(event, fn); } else { @@ -12559,7 +12722,6 @@ function prependListener(emitter, event, fn) { } } -var Duplex; function ReadableState(options, stream) { Duplex = Duplex || __webpack_require__(8); @@ -12623,13 +12785,12 @@ function ReadableState(options, stream) { this.decoder = null; this.encoding = null; if (options.encoding) { - if (!StringDecoder) StringDecoder = __webpack_require__(48).StringDecoder; + if (!StringDecoder) StringDecoder = __webpack_require__(49).StringDecoder; this.decoder = new StringDecoder(options.encoding); this.encoding = options.encoding; } } -var Duplex; function Readable(options) { Duplex = Duplex || __webpack_require__(8); @@ -12734,7 +12895,7 @@ function needMoreData(state) { // backwards compatibility. Readable.prototype.setEncoding = function (enc) { - if (!StringDecoder) StringDecoder = __webpack_require__(48).StringDecoder; + if (!StringDecoder) StringDecoder = __webpack_require__(49).StringDecoder; this._readableState.decoder = new StringDecoder(enc); this._readableState.encoding = enc; return this; @@ -12952,7 +13113,7 @@ function maybeReadMore_(stream, state) { // for virtual (non-string, non-buffer) streams, "length" is somewhat // arbitrary, and perhaps not very meaningful. Readable.prototype._read = function (n) { - this.emit('error', new Error('not implemented')); + this.emit('error', new Error('_read() is not implemented')); }; Readable.prototype.pipe = function (dest, pipeOpts) { @@ -13130,16 +13291,16 @@ Readable.prototype.unpipe = function (dest) { state.pipesCount = 0; state.flowing = false; - for (var _i = 0; _i < len; _i++) { - dests[_i].emit('unpipe', this); + for (var i = 0; i < len; i++) { + dests[i].emit('unpipe', this); }return this; } // try to find the right one. - var i = indexOf(state.pipes, dest); - if (i === -1) return this; + var index = indexOf(state.pipes, dest); + if (index === -1) return this; - state.pipes.splice(i, 1); + state.pipes.splice(index, 1); state.pipesCount -= 1; if (state.pipesCount === 1) state.pipes = state.pipes[0]; @@ -13846,7 +14007,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _vue = __webpack_require__(32); +var _vue = __webpack_require__(33); var _vue2 = _interopRequireDefault(_vue); @@ -13897,11 +14058,11 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _assign = __webpack_require__(33); +var _assign = __webpack_require__(23); var _assign2 = _interopRequireDefault(_assign); -var _vue = __webpack_require__(32); +var _vue = __webpack_require__(33); var _vue2 = _interopRequireDefault(_vue); @@ -13917,7 +14078,7 @@ var _http = __webpack_require__(111); var _http2 = _interopRequireDefault(_http); -var _storage = __webpack_require__(14); +var _storage = __webpack_require__(15); var _storage2 = _interopRequireDefault(_storage); @@ -13944,6 +14105,7 @@ var defaultPassword = { length: 12, counter: 1 }; + function getDefaultPasswordProfile(version) { var passwordProfile = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; @@ -13955,7 +14117,7 @@ function getDefaultPasswordProfile(version) { } } -var versionLoadedByDefault = 1; +var versionLoadedByDefault = storage.json().version || 1; var state = { authenticated: auth.isAuthenticated(), email: '', @@ -14025,6 +14187,12 @@ var mutations = { state.password = getDefaultPasswordProfile(version, state.password); state.version = version; + }, + + SAVE_DEFAULT_OPTIONS: function SAVE_DEFAULT_OPTIONS(state) { + var password = new _password2.default(state.password); + var jsonPassword = password.json(); + storage.save({ password: jsonPassword, version: jsonPassword.version }); } }; @@ -14196,6 +14364,7 @@ module.exports = __vue_exports__ var utils = __webpack_require__(2); var bind = __webpack_require__(55); var Axios = __webpack_require__(87); +var defaults = __webpack_require__(34); /** * Create an instance of Axios @@ -14217,20 +14386,20 @@ function createInstance(defaultConfig) { } // Create the default instance to be exported -var axios = createInstance(); +var axios = createInstance(defaults); // Expose Axios class to allow class inheritance axios.Axios = Axios; // Factory for creating new instances -axios.create = function create(defaultConfig) { - return createInstance(defaultConfig); +axios.create = function create(instanceConfig) { + return createInstance(utils.merge(defaults, instanceConfig)); }; // Expose Cancel & CancelToken -axios.Cancel = __webpack_require__(51); +axios.Cancel = __webpack_require__(52); axios.CancelToken = __webpack_require__(86); -axios.isCancel = __webpack_require__(52); +axios.isCancel = __webpack_require__(53); // Expose all/spread axios.all = function all(promises) { @@ -14251,7 +14420,7 @@ module.exports.default = axios; "use strict"; 'use strict'; -var Cancel = __webpack_require__(51); +var Cancel = __webpack_require__(52); /** * A `CancelToken` is an object that can be used to request cancellation of an operation. @@ -14315,7 +14484,7 @@ module.exports = CancelToken; "use strict"; 'use strict'; -var defaults = __webpack_require__(54); +var defaults = __webpack_require__(34); var utils = __webpack_require__(2); var InterceptorManager = __webpack_require__(88); var dispatchRequest = __webpack_require__(89); @@ -14325,10 +14494,10 @@ var combineURLs = __webpack_require__(95); /** * Create a new instance of Axios * - * @param {Object} defaultConfig The default config for the instance + * @param {Object} instanceConfig The default config for the instance */ -function Axios(defaultConfig) { - this.defaults = utils.merge(defaults, defaultConfig); +function Axios(instanceConfig) { + this.defaults = instanceConfig; this.interceptors = { request: new InterceptorManager(), response: new InterceptorManager() @@ -14468,8 +14637,8 @@ module.exports = InterceptorManager; var utils = __webpack_require__(2); var transformData = __webpack_require__(92); -var isCancel = __webpack_require__(52); -var defaults = __webpack_require__(54); +var isCancel = __webpack_require__(53); +var defaults = __webpack_require__(34); /** * Throws a `Cancel` if cancellation has been requested. @@ -14578,7 +14747,7 @@ module.exports = function enhanceError(error, config, code, response) { "use strict"; 'use strict'; -var createError = __webpack_require__(53); +var createError = __webpack_require__(54); /** * Resolve or reject a Promise based on response status. @@ -15106,7 +15275,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _lesspass = __webpack_require__(43); +var _lesspass = __webpack_require__(44); var _lesspass2 = _interopRequireDefault(_lesspass); @@ -15200,7 +15369,7 @@ var _extends2 = __webpack_require__(9); var _extends3 = _interopRequireDefault(_extends2); -var _lesspass = __webpack_require__(43); +var _lesspass = __webpack_require__(44); var _lesspass2 = _interopRequireDefault(_lesspass); @@ -15208,7 +15377,7 @@ var _auth = __webpack_require__(22); var _auth2 = _interopRequireDefault(_auth); -var _storage = __webpack_require__(14); +var _storage = __webpack_require__(15); var _storage2 = _interopRequireDefault(_storage); @@ -15416,7 +15585,7 @@ var _extends2 = __webpack_require__(9); var _extends3 = _interopRequireDefault(_extends2); -var _lesspass = __webpack_require__(43); +var _lesspass = __webpack_require__(44); var _lesspass2 = _interopRequireDefault(_lesspass); @@ -15494,7 +15663,8 @@ exports.default = { cleanTimeout: null, showOptions: false, showError: false, - generatingPassword: false + generatingPassword: false, + optionsSaved: false }; }, @@ -15549,7 +15719,7 @@ exports.default = { methods: { showFingerprint: (0, _lodash2.default)(function () { this.fingerprint = this.masterPassword; - }, 3000), + }, 1000), togglePasswordType: function togglePasswordType(element) { if (element.type === 'password') { element.type = 'text'; @@ -15638,6 +15808,15 @@ exports.default = { }, incrementCounter: function incrementCounter() { this.password.counter += 1; + }, + saveDefault: function saveDefault() { + var _this4 = this; + + this.$store.commit('SAVE_DEFAULT_OPTIONS'); + this.optionsSaved = true; + setTimeout(function () { + _this4.optionsSaved = false; + }, 3000); } } }; @@ -15661,7 +15840,7 @@ var _auth = __webpack_require__(22); var _auth2 = _interopRequireDefault(_auth); -var _storage = __webpack_require__(14); +var _storage = __webpack_require__(15); var _storage2 = _interopRequireDefault(_storage); @@ -15734,7 +15913,7 @@ var _auth = __webpack_require__(22); var _auth2 = _interopRequireDefault(_auth); -var _storage = __webpack_require__(14); +var _storage = __webpack_require__(15); var _storage2 = _interopRequireDefault(_storage); @@ -15863,19 +16042,19 @@ var _extends2 = __webpack_require__(9); var _extends3 = _interopRequireDefault(_extends2); -var _classCallCheck2 = __webpack_require__(15); +var _classCallCheck2 = __webpack_require__(16); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); -var _createClass2 = __webpack_require__(16); +var _createClass2 = __webpack_require__(17); var _createClass3 = _interopRequireDefault(_createClass2); -var _axios = __webpack_require__(49); +var _axios = __webpack_require__(50); var _axios2 = _interopRequireDefault(_axios); -var _storage = __webpack_require__(14); +var _storage = __webpack_require__(15); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -15951,11 +16130,11 @@ Object.defineProperty(exports, "__esModule", { }); exports.TOKEN_KEY = undefined; -var _classCallCheck2 = __webpack_require__(15); +var _classCallCheck2 = __webpack_require__(16); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); -var _createClass2 = __webpack_require__(16); +var _createClass2 = __webpack_require__(17); var _createClass3 = _interopRequireDefault(_createClass2); @@ -17504,9 +17683,9 @@ if (typeof module !== "undefined" && module.hasOwnProperty("exports")) { /* 119 */ /***/ function(module, exports, __webpack_require__) { -/* WEBPACK VAR INJECTION */(function(Buffer) {var Transform = __webpack_require__(20).Transform +/* WEBPACK VAR INJECTION */(function(Buffer) {var Transform = __webpack_require__(21).Transform var inherits = __webpack_require__(1) -var StringDecoder = __webpack_require__(48).StringDecoder +var StringDecoder = __webpack_require__(49).StringDecoder module.exports = CipherBase inherits(CipherBase, Transform) function CipherBase (hashMode) { @@ -18080,7 +18259,7 @@ module.exports = function(it, Constructor, name, forbiddenField){ // false -> Array#indexOf // true -> Array#includes -var toIObject = __webpack_require__(42) +var toIObject = __webpack_require__(43) , toLength = __webpack_require__(69) , toIndex = __webpack_require__(150); module.exports = function(IS_INCLUDES){ @@ -18104,7 +18283,7 @@ module.exports = function(IS_INCLUDES){ /* 129 */ /***/ function(module, exports, __webpack_require__) { -var ctx = __webpack_require__(24) +var ctx = __webpack_require__(25) , call = __webpack_require__(133) , isArrayIter = __webpack_require__(132) , anObject = __webpack_require__(10) @@ -18134,8 +18313,8 @@ exports.RETURN = RETURN; /* 130 */ /***/ function(module, exports, __webpack_require__) { -module.exports = !__webpack_require__(11) && !__webpack_require__(38)(function(){ - return Object.defineProperty(__webpack_require__(37)('div'), 'a', {get: function(){ return 7; }}).a != 7; +module.exports = !__webpack_require__(11) && !__webpack_require__(39)(function(){ + return Object.defineProperty(__webpack_require__(38)('div'), 'a', {get: function(){ return 7; }}).a != 7; }); /***/ }, @@ -18164,7 +18343,7 @@ module.exports = function(fn, args, that){ /***/ function(module, exports, __webpack_require__) { // check on default Array iterator -var Iterators = __webpack_require__(17) +var Iterators = __webpack_require__(18) , ITERATOR = __webpack_require__(3)('iterator') , ArrayProto = Array.prototype; @@ -18197,7 +18376,7 @@ module.exports = function(iterator, fn, value, entries){ 'use strict'; var create = __webpack_require__(139) , descriptor = __webpack_require__(66) - , setToStringTag = __webpack_require__(39) + , setToStringTag = __webpack_require__(40) , IteratorPrototype = {}; // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() @@ -18251,7 +18430,7 @@ var global = __webpack_require__(4) , Observer = global.MutationObserver || global.WebKitMutationObserver , process = global.process , Promise = global.Promise - , isNode = __webpack_require__(23)(process) == 'process'; + , isNode = __webpack_require__(24)(process) == 'process'; module.exports = function(){ var head, last, notify; @@ -18330,7 +18509,7 @@ var getKeys = __webpack_require__(65) , $assign = Object.assign; // should work with symbols and should have deterministic property order (V8 bug) -module.exports = !$assign || __webpack_require__(38)(function(){ +module.exports = !$assign || __webpack_require__(39)(function(){ var A = {} , B = {} , S = Symbol() @@ -18362,14 +18541,14 @@ module.exports = !$assign || __webpack_require__(38)(function(){ var anObject = __webpack_require__(10) , dPs = __webpack_require__(140) , enumBugKeys = __webpack_require__(60) - , IE_PROTO = __webpack_require__(40)('IE_PROTO') + , IE_PROTO = __webpack_require__(41)('IE_PROTO') , Empty = function(){ /* empty */ } , PROTOTYPE = 'prototype'; // Create object with fake `null` prototype: use iframe Object with cleared prototype var createDict = function(){ // Thrash, waste and sodomy: IE GC bug - var iframe = __webpack_require__(37)('iframe') + var iframe = __webpack_require__(38)('iframe') , i = enumBugKeys.length , lt = '<' , gt = '>' @@ -18405,7 +18584,7 @@ module.exports = Object.create || function create(O, Properties){ /* 140 */ /***/ function(module, exports, __webpack_require__) { -var dP = __webpack_require__(18) +var dP = __webpack_require__(19) , anObject = __webpack_require__(10) , getKeys = __webpack_require__(65); @@ -18430,9 +18609,9 @@ exports.f = Object.getOwnPropertySymbols; /***/ function(module, exports, __webpack_require__) { // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) -var has = __webpack_require__(26) +var has = __webpack_require__(27) , toObject = __webpack_require__(70) - , IE_PROTO = __webpack_require__(40)('IE_PROTO') + , IE_PROTO = __webpack_require__(41)('IE_PROTO') , ObjectProto = Object.prototype; module.exports = Object.getPrototypeOf || function(O){ @@ -18447,10 +18626,10 @@ module.exports = Object.getPrototypeOf || function(O){ /* 143 */ /***/ function(module, exports, __webpack_require__) { -var has = __webpack_require__(26) - , toIObject = __webpack_require__(42) +var has = __webpack_require__(27) + , toIObject = __webpack_require__(43) , arrayIndexOf = __webpack_require__(128)(false) - , IE_PROTO = __webpack_require__(40)('IE_PROTO'); + , IE_PROTO = __webpack_require__(41)('IE_PROTO'); module.exports = function(object, names){ var O = toIObject(object) @@ -18497,7 +18676,7 @@ module.exports = __webpack_require__(12); 'use strict'; var global = __webpack_require__(4) , core = __webpack_require__(6) - , dP = __webpack_require__(18) + , dP = __webpack_require__(19) , DESCRIPTORS = __webpack_require__(11) , SPECIES = __webpack_require__(3)('species'); @@ -18515,7 +18694,7 @@ module.exports = function(KEY){ // 7.3.20 SpeciesConstructor(O, defaultConstructor) var anObject = __webpack_require__(10) - , aFunction = __webpack_require__(35) + , aFunction = __webpack_require__(36) , SPECIES = __webpack_require__(3)('species'); module.exports = function(O, D){ var C = anObject(O).constructor, S; @@ -18526,8 +18705,8 @@ module.exports = function(O, D){ /* 149 */ /***/ function(module, exports, __webpack_require__) { -var toInteger = __webpack_require__(41) - , defined = __webpack_require__(36); +var toInteger = __webpack_require__(42) + , defined = __webpack_require__(37); // true -> String#at // false -> String#codePointAt module.exports = function(TO_STRING){ @@ -18548,7 +18727,7 @@ module.exports = function(TO_STRING){ /* 150 */ /***/ function(module, exports, __webpack_require__) { -var toInteger = __webpack_require__(41) +var toInteger = __webpack_require__(42) , max = Math.max , min = Math.min; module.exports = function(index, length){ @@ -18561,7 +18740,7 @@ module.exports = function(index, length){ /***/ function(module, exports, __webpack_require__) { // 7.1.1 ToPrimitive(input [, PreferredType]) -var isObject = __webpack_require__(27); +var isObject = __webpack_require__(28); // instead of the ES6 spec version, we didn't implement @@toPrimitive case // and the second argument - flag - preferred type is a string module.exports = function(it, S){ @@ -18579,7 +18758,7 @@ module.exports = function(it, S){ var classof = __webpack_require__(59) , ITERATOR = __webpack_require__(3)('iterator') - , Iterators = __webpack_require__(17); + , Iterators = __webpack_require__(18); module.exports = __webpack_require__(6).getIteratorMethod = function(it){ if(it != undefined)return it[ITERATOR] || it['@@iterator'] @@ -18594,8 +18773,8 @@ module.exports = __webpack_require__(6).getIteratorMethod = function(it){ 'use strict'; var addToUnscopables = __webpack_require__(126) , step = __webpack_require__(136) - , Iterators = __webpack_require__(17) - , toIObject = __webpack_require__(42); + , Iterators = __webpack_require__(18) + , toIObject = __webpack_require__(43); // 22.1.3.4 Array.prototype.entries() // 22.1.3.13 Array.prototype.keys() @@ -18631,7 +18810,7 @@ addToUnscopables('entries'); /***/ function(module, exports, __webpack_require__) { // 19.1.3.1 Object.assign(target, source) -var $export = __webpack_require__(25); +var $export = __webpack_require__(26); $export($export.S + $export.F, 'Object', {assign: __webpack_require__(138)}); @@ -18639,9 +18818,9 @@ $export($export.S + $export.F, 'Object', {assign: __webpack_require__(138)}); /* 155 */ /***/ function(module, exports, __webpack_require__) { -var $export = __webpack_require__(25); +var $export = __webpack_require__(26); // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) -$export($export.S + $export.F * !__webpack_require__(11), 'Object', {defineProperty: __webpack_require__(18).f}); +$export($export.S + $export.F * !__webpack_require__(11), 'Object', {defineProperty: __webpack_require__(19).f}); /***/ }, /* 156 */ @@ -18657,11 +18836,11 @@ $export($export.S + $export.F * !__webpack_require__(11), 'Object', {definePrope 'use strict'; var LIBRARY = __webpack_require__(64) , global = __webpack_require__(4) - , ctx = __webpack_require__(24) + , ctx = __webpack_require__(25) , classof = __webpack_require__(59) - , $export = __webpack_require__(25) - , isObject = __webpack_require__(27) - , aFunction = __webpack_require__(35) + , $export = __webpack_require__(26) + , isObject = __webpack_require__(28) + , aFunction = __webpack_require__(36) , anInstance = __webpack_require__(127) , forOf = __webpack_require__(129) , speciesConstructor = __webpack_require__(148) @@ -18884,7 +19063,7 @@ if(!USE_NATIVE){ } $export($export.G + $export.W + $export.F * !USE_NATIVE, {Promise: $Promise}); -__webpack_require__(39)($Promise, PROMISE); +__webpack_require__(40)($Promise, PROMISE); __webpack_require__(147)(PROMISE); Wrapper = __webpack_require__(6)[PROMISE]; @@ -18984,7 +19163,7 @@ __webpack_require__(63)(String, 'String', function(iterated){ __webpack_require__(153); var global = __webpack_require__(4) , hide = __webpack_require__(12) - , Iterators = __webpack_require__(17) + , Iterators = __webpack_require__(18) , TO_STRING_TAG = __webpack_require__(3)('toStringTag'); for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){ @@ -19262,7 +19441,7 @@ module.exports = function md5(buf) { /* 163 */ /***/ function(module, exports, __webpack_require__) { -exports = module.exports = __webpack_require__(28)(); +exports = module.exports = __webpack_require__(29)(); // imports @@ -19276,7 +19455,7 @@ exports.push([module.i, "\n#fingerprint {\n min-width: 90px;\n text-align: /* 164 */ /***/ function(module, exports, __webpack_require__) { -exports = module.exports = __webpack_require__(28)(); +exports = module.exports = __webpack_require__(29)(); // imports @@ -19290,12 +19469,12 @@ exports.push([module.i, "\n#password-generator {\n color: #555;\n}\n.inner-ad /* 165 */ /***/ function(module, exports, __webpack_require__) { -exports = module.exports = __webpack_require__(28)(); +exports = module.exports = __webpack_require__(29)(); // imports // module -exports.push([module.i, "\n#lesspass .white-link {\n color: white;\n}\n#lesspass.card {\n border: none;\n}\n@media (min-width: 544px) {\n#lesspass.v1 {\n border: 1px solid #f0ad4e;\n}\n#lesspass.v2 {\n border: 1px solid #0275d8;\n}\n}\n#lesspass .white-link:hover, #lesspass .white-link:focus, #lesspass .white-link:active {\n text-decoration: none;\n color: white;\n}\n#lesspass, #lesspass * {\n border-radius: 0 !important;\n}\n", ""]); +exports.push([module.i, "\n#lesspass .white-link {\n color: white;\n}\n@media (max-width: 544px) {\n#lesspass.card {\n border: none;\n}\n}\n#lesspass .white-link:hover, #lesspass .white-link:focus, #lesspass .white-link:active {\n text-decoration: none;\n color: white;\n}\n#lesspass, #lesspass * {\n border-radius: 0 !important;\n}\n", ""]); // exports @@ -19304,7 +19483,7 @@ exports.push([module.i, "\n#lesspass .white-link {\n color: white;\n}\n#lessp /* 166 */ /***/ function(module, exports, __webpack_require__) { -exports = module.exports = __webpack_require__(28)(); +exports = module.exports = __webpack_require__(29)(); // imports @@ -19751,7 +19930,7 @@ module.exports = function (token,options) { /* 175 */ /***/ function(module, exports, __webpack_require__) { -/* WEBPACK VAR INJECTION */(function(Buffer) {var pbkdf2 = __webpack_require__(44); +/* WEBPACK VAR INJECTION */(function(Buffer) {var pbkdf2 = __webpack_require__(45); var createHMAC = __webpack_require__(72); var Promise = __webpack_require__(74); @@ -19866,7 +20045,7 @@ function createFingerprint(str) { /* 176 */ /***/ function(module, exports, __webpack_require__) { -var pbkdf2 = __webpack_require__(44); +var pbkdf2 = __webpack_require__(45); var bigInt = __webpack_require__(118); module.exports = { @@ -20334,7 +20513,7 @@ function toNumber(value) { module.exports = debounce; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(21))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(14))) /***/ }, /* 178 */ @@ -20823,7 +21002,7 @@ Promise.reject = function (reason) { module.exports = Promise; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(21), __webpack_require__(30).setImmediate)) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(14), __webpack_require__(31).setImmediate)) /***/ }, /* 182 */ @@ -20841,7 +21020,7 @@ module.exports = __webpack_require__(8) var Buffer = __webpack_require__(0).Buffer; /**/ -var bufferShim = __webpack_require__(34); +var bufferShim = __webpack_require__(35); /**/ module.exports = BufferList; @@ -20915,15 +21094,15 @@ module.exports = __webpack_require__(75) /* WEBPACK VAR INJECTION */(function(process) {var Stream = (function (){ try { - return __webpack_require__(20); // hack to fix a circular dependency issue when used with browserify + return __webpack_require__(21); // hack to fix a circular dependency issue when used with browserify } catch(_){} }()); exports = module.exports = __webpack_require__(76); exports.Stream = Stream || exports; exports.Readable = exports; -exports.Writable = __webpack_require__(47); +exports.Writable = __webpack_require__(48); exports.Duplex = __webpack_require__(8); -exports.Transform = __webpack_require__(46); +exports.Transform = __webpack_require__(47); exports.PassThrough = __webpack_require__(75); if (!process.browser && process.env.READABLE_STREAM === 'disable' && Stream) { @@ -20936,14 +21115,14 @@ if (!process.browser && process.env.READABLE_STREAM === 'disable' && Stream) { /* 186 */ /***/ function(module, exports, __webpack_require__) { -module.exports = __webpack_require__(46) +module.exports = __webpack_require__(47) /***/ }, /* 187 */ /***/ function(module, exports, __webpack_require__) { -module.exports = __webpack_require__(47) +module.exports = __webpack_require__(48) /***/ }, @@ -21694,7 +21873,7 @@ function config (name) { return String(val).toLowerCase() === 'true'; } -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(21))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(14))) /***/ }, /* 197 */ @@ -21967,29 +22146,29 @@ module.exports = __vue_exports__ /* 206 */ /***/ function(module, exports) { -module.exports={render:function (){var _vm=this; +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement; return _vm._m(0) -},staticRenderFns: [function (){var _vm=this; - return _vm._h('div', { +},staticRenderFns: [function (){var _vm=this;var _h=_vm.$createElement; + return _h('div', { staticStyle: { "display": "none" } - }, [_vm._h('label', { + }, [_h('label', { attrs: { "for": "username" } - }, [_vm._h('input', { + }, [_h('input', { attrs: { "type": "text", "id": "username", "name": "username", "autocomplete": "username" } - })]), " ", _vm._h('label', { + })]), " ", _h('label', { attrs: { "for": "password" } - }, [_vm._h('input', { + }, [_h('input', { attrs: { "type": "password", "id": "password", @@ -22003,14 +22182,16 @@ module.exports={render:function (){var _vm=this; /* 207 */ /***/ function(module, exports) { -module.exports={render:function (){var _vm=this; - return _vm._h('form', [_vm._h('div', { +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement; + return _h('form', [_h('div', { staticClass: "form-group row" - }, [_vm._h('div', { + }, [_h('div', { staticClass: "col-xs-12" - }, [_vm._h('div', { + }, [_h('div', { staticClass: "inner-addon left-addon" - }, [_vm._m(0), " ", _vm._h('input', { + }, [_h('i', { + staticClass: "fa fa-user" + }), " ", _h('input', { directives: [{ name: "model", rawName: "v-model", @@ -22034,15 +22215,17 @@ module.exports={render:function (){var _vm=this; _vm.email = $event.target.value } } - }), " ", _vm._h('small', { + }), " ", _h('small', { staticClass: "form-text text-muted text-danger" - }, [(_vm.errors.userNameAlreadyExist) ? _vm._h('span', ["Someone already use that username. Do you want to sign in ?"]) : _vm._e(), " ", (_vm.errors.emailInvalid) ? _vm._h('span', ["Please enter a valid email"]) : _vm._e(), " ", (_vm.errors.emailRequired) ? _vm._h('span', ["An email is required"]) : _vm._e()])])])]), " ", _vm._h('div', { + }, [(_vm.errors.userNameAlreadyExist) ? _h('span', ["Someone already use that username. Do you want to sign in ?"]) : _vm._e(), " ", (_vm.errors.emailInvalid) ? _h('span', ["Please enter a valid email"]) : _vm._e(), " ", (_vm.errors.emailRequired) ? _h('span', ["An email is required"]) : _vm._e()])])])]), " ", _h('div', { staticClass: "form-group row" - }, [_vm._h('div', { + }, [_h('div', { staticClass: "col-xs-12" - }, [_vm._h('div', { + }, [_h('div', { staticClass: "inner-addon left-addon" - }, [_vm._m(1), " ", _vm._h('input', { + }, [_h('i', { + staticClass: "fa fa-lock" + }), " ", _h('input', { directives: [{ name: "model", rawName: "v-model", @@ -22071,13 +22254,13 @@ module.exports={render:function (){var _vm=this; _vm.password = $event.target.value } } - }), " ", _vm._h('small', { + }), " ", _h('small', { staticClass: "form-text text-muted" - }, [(_vm.errors.passwordRequired) ? _vm._h('span', { + }, [(_vm.errors.passwordRequired) ? _h('span', { staticClass: "text-danger" - }, ["A password is required"]) : _vm._e(), " ", _vm._h('label', { + }, ["A password is required"]) : _vm._e(), " ", _h('label', { staticClass: "form-check-label" - }, [_vm._h('input', { + }, [_h('input', { directives: [{ name: "model", rawName: "v-model", @@ -22109,7 +22292,7 @@ module.exports={render:function (){var _vm=this; } } } - }), "\n Check me if you want to use your master password here.\n ", _vm._h('span', { + }), "\n Check me if you want to use your master password here.\n ", _h('span', { staticClass: "tag tag-warning", on: { "click": function($event) { @@ -22117,11 +22300,11 @@ module.exports={render:function (){var _vm=this; _vm.seeMasterPasswordHelp = !_vm.seeMasterPasswordHelp } } - }, ["\n ?\n "]), " ", (_vm.seeMasterPasswordHelp) ? _vm._h('span', { + }, ["\n ?\n "]), " ", (_vm.seeMasterPasswordHelp) ? _h('span', { staticClass: "text-warning" - }, [_vm._m(2), " Your master password ", _vm._m(3), " on a database even encrypted.\n If you want to use your master password here, you can check the option.\n It will replace your master password with a LessPass generated password.\n "]) : _vm._e()])])])])]), " ", _vm._h('div', { + }, [_h('br'), " Your master password ", _h('b', ["should not be saved"]), " on a database even encrypted.\n If you want to use your master password here, you can check the option.\n It will replace your master password with a LessPass generated password.\n "]) : _vm._e()])])])])]), " ", _h('div', { staticClass: "form-group row" - }, [_vm._h('div', { + }, [_h('div', { directives: [{ name: "show", rawName: "v-show", @@ -22129,7 +22312,7 @@ module.exports={render:function (){var _vm=this; expression: "!generatedPassword" }], staticClass: "col-xs-8" - }, [_vm._h('button', { + }, [_h('button', { staticClass: "btn", class: { 'btn-warning': _vm.version === 1, 'btn-primary': _vm.version === 2 @@ -22141,7 +22324,9 @@ module.exports={render:function (){var _vm=this; on: { "click": _vm.signIn } - }, [(_vm.loadingSignIn) ? _vm._h('span', [_vm._m(4)]) : _vm._e(), "\n Sign In\n "]), " ", _vm._h('button', { + }, [(_vm.loadingSignIn) ? _h('span', [_h('i', { + staticClass: "fa fa-spinner fa-pulse fa-fw" + })]) : _vm._e(), "\n Sign In\n "]), " ", _h('button', { staticClass: "btn btn-secondary", attrs: { "id": "registerButton", @@ -22150,9 +22335,11 @@ module.exports={render:function (){var _vm=this; on: { "click": _vm.register } - }, [(_vm.loadingRegister) ? _vm._h('span', [_vm._m(5)]) : _vm._e(), "\n Register\n "])]), " ", _vm._h('div', { + }, [(_vm.loadingRegister) ? _h('span', [_h('i', { + staticClass: "fa fa-spinner fa-pulse fa-fw" + })]) : _vm._e(), "\n Register\n "])]), " ", _h('div', { staticClass: "col-xs-4 text-xs-right" - }, [_vm._h('button', { + }, [_h('button', { staticClass: "btn btn-secondary", class: { 'btn-outline-warning': _vm.version === 1, 'btn-outline-primary': _vm.version === 2 @@ -22163,21 +22350,21 @@ module.exports={render:function (){var _vm=this; on: { "click": _vm.toggleVersion } - }, [_vm._h('small', { + }, [_h('small', { directives: [{ name: "show", rawName: "v-show", value: (_vm.version === 1), expression: "version===1" }] - }, ["v1"]), " ", _vm._h('small', { + }, ["v1"]), " ", _h('small', { directives: [{ name: "show", rawName: "v-show", value: (_vm.version === 2), expression: "version===2" }] - }, ["v2"])]), " ", _vm._h('button', { + }, ["v2"])]), " ", _h('button', { staticClass: "btn btn-secondary", attrs: { "type": "button" @@ -22187,18 +22374,29 @@ module.exports={render:function (){var _vm=this; _vm.showOptions = !_vm.showOptions } } - }, [_vm._m(6)])])]), " ", (_vm.showError) ? _vm._h('div', { + }, [_h('i', { + staticClass: "fa fa-sliders", + attrs: { + "aria-hidden": "true" + } + })])])]), " ", (_vm.showError) ? _h('div', { staticClass: "form-group" - }, [_vm._h('div', { + }, [_h('div', { staticClass: "alert alert-danger", attrs: { "role": "alert" } - }, ["\n " + _vm._s(_vm.errorMessage) + "\n "])]) : _vm._e(), " ", (_vm.showOptions) ? _vm._h('div', { + }, ["\n " + _vm._s(_vm.errorMessage) + "\n "])]) : _vm._e(), " ", (_vm.showOptions) ? _h('div', { staticClass: "form-group" - }, [_vm._m(7), " ", _vm._h('div', { + }, [_h('label', { + attrs: { + "for": "baseURL" + } + }, ["Self Hosted Url"]), " ", _h('div', { staticClass: "inner-addon left-addon" - }, [_vm._m(8), " ", _vm._h('input', { + }, [_h('i', { + staticClass: "fa fa-globe" + }), " ", _h('input', { directives: [{ name: "model", rawName: "v-model", @@ -22220,90 +22418,53 @@ module.exports={render:function (){var _vm=this; _vm.baseURL = $event.target.value } } - }), " ", _vm._h('small', { + }), " ", _h('small', { staticClass: "form-text text-muted" - }, [(_vm.noErrors()) ? _vm._h('span', ["You can use your self hosted LessPass Database"]) : _vm._e(), " ", (_vm.errors.baseURLRequired) ? _vm._h('span', { + }, [(_vm.noErrors()) ? _h('span', ["You can use your self hosted LessPass Database"]) : _vm._e(), " ", (_vm.errors.baseURLRequired) ? _h('span', { staticClass: "text-danger" - }, ["\n A LessPass database url is required\n "]) : _vm._e()])])]) : _vm._e(), " ", _vm._h('div', { + }, ["\n A LessPass database url is required\n "]) : _vm._e()])])]) : _vm._e(), " ", _h('div', { staticClass: "form-group mb-0" - }, [_vm._h('router-link', { + }, [_h('router-link', { attrs: { "to": { name: 'passwordReset' } } - }, [_vm._h('small', ["Forgot your password?"])])])]) -},staticRenderFns: [function (){var _vm=this; - return _vm._h('i', { - staticClass: "fa fa-user" - }) -},function (){var _vm=this; - return _vm._h('i', { - staticClass: "fa fa-lock" - }) -},function (){var _vm=this; - return _vm._h('br') -},function (){var _vm=this; - return _vm._h('b', ["should not be saved"]) -},function (){var _vm=this; - return _vm._h('i', { - staticClass: "fa fa-spinner fa-pulse fa-fw" - }) -},function (){var _vm=this; - return _vm._h('i', { - staticClass: "fa fa-spinner fa-pulse fa-fw" - }) -},function (){var _vm=this; - return _vm._h('i', { - staticClass: "fa fa-sliders", - attrs: { - "aria-hidden": "true" - } - }) -},function (){var _vm=this; - return _vm._h('label', { - attrs: { - "for": "baseURL" - } - }, ["Self Hosted Url"]) -},function (){var _vm=this; - return _vm._h('i', { - staticClass: "fa fa-globe" - }) -}]} + }, [_h('small', ["Forgot your password?"])])])]) +},staticRenderFns: []} /***/ }, /* 208 */ /***/ function(module, exports) { -module.exports={render:function (){var _vm=this; - return (_vm.fingerprint) ? _vm._h('span', { +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement; + return (_vm.fingerprint) ? _h('span', { staticClass: "input-group-btn" - }, [_vm._h('button', { + }, [_h('button', { staticClass: "btn", attrs: { "id": "fingerprint", "type": "button", "tabindex": "-1" } - }, [_vm._h('small', { + }, [_h('small', { staticClass: "hint--left", attrs: { "aria-label": "master password fingerprint" } - }, [_vm._h('i', { + }, [_h('i', { staticClass: "fa fa-fw", class: [_vm.icon1], style: ({ color: _vm.color1 }) - }), " ", _vm._h('i', { + }), " ", _h('i', { staticClass: "fa fa-fw", class: [_vm.icon2], style: ({ color: _vm.color2 }) - }), " ", _vm._h('i', { + }), " ", _h('i', { staticClass: "fa fa-fw", class: [_vm.icon3], style: ({ @@ -22316,14 +22477,16 @@ module.exports={render:function (){var _vm=this; /* 209 */ /***/ function(module, exports) { -module.exports={render:function (){var _vm=this; - return _vm._h('div', [_vm._h('div', { +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement; + return _h('div', [_h('div', { staticClass: "form-group row" - }, [_vm._h('div', { + }, [_h('div', { staticClass: "col-xs-12" - }, [_vm._h('div', { + }, [_h('div', { staticClass: "inner-addon left-addon" - }, [_vm._m(0), " ", _vm._h('input', { + }, [_h('i', { + staticClass: "fa fa-search" + }), " ", _h('input', { directives: [{ name: "model", rawName: "v-model", @@ -22344,20 +22507,20 @@ module.exports={render:function (){var _vm=this; _vm.searchQuery = $event.target.value } } - })])])]), " ", _vm._h('ul', { + })])])]), " ", _h('ul', { staticClass: "list-group" - }, [(_vm.passwords.length === 0) ? _vm._h('li', { + }, [(_vm.passwords.length === 0) ? _h('li', { staticClass: "list-group-item" - }, ["\n You don't have any passwords saved in your database.\n ", _vm._h('router-link', { + }, ["\n You don't have any passwords saved in your database.\n ", _h('router-link', { attrs: { "to": { name: 'home' } } }, ["Would you like to create one ?"])]) : _vm._e(), " ", _vm._l((_vm.filteredPasswords), function(password) { - return _vm._h('li', { + return _h('li', { staticClass: "list-group-item" - }, [_vm._h('delete-button', { + }, [_h('delete-button', { staticClass: "float-xs-right mt-1 text-xs-right", attrs: { "confirmText": "Are you sure you want to delete this password profile?", @@ -22369,9 +22532,9 @@ module.exports={render:function (){var _vm=this; _vm.deletePassword(password) } } - }), " ", _vm._h('ul', { + }), " ", _h('ul', { staticClass: "list-unstyled" - }, [_vm._h('li', [_vm._h('router-link', { + }, [_h('li', [_h('router-link', { attrs: { "to": { name: 'password', @@ -22380,28 +22543,31 @@ module.exports={render:function (){var _vm=this; } } } - }, ["\n " + _vm._s(password.site) + "\n "])]), " ", _vm._h('li', ["\n " + _vm._s(password.login) + "\n "])])]) + }, ["\n " + _vm._s(password.site) + "\n "])]), " ", _h('li', ["\n " + _vm._s(password.login) + "\n "])])]) })])]) -},staticRenderFns: [function (){var _vm=this; - return _vm._h('i', { - staticClass: "fa fa-search" - }) -}]} +},staticRenderFns: []} /***/ }, /* 210 */ /***/ function(module, exports) { -module.exports={render:function (){var _vm=this; - return _vm._h('form', { +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement; + return _h('form', { attrs: { "id": "password-generator" } - }, [_vm._h('div', { + }, [_h('div', { staticClass: "form-group" - }, [_vm._h('div', { + }, [_h('div', { staticClass: "inner-addon left-addon" - }, [_vm._m(0), " ", _vm._m(1), " ", _vm._h('input', { + }, [_h('label', { + staticClass: "sr-only", + attrs: { + "for": "site" + } + }, ["Site"]), " ", _h('i', { + staticClass: "fa fa-globe" + }), " ", _h('input', { directives: [{ name: "model", rawName: "v-model", @@ -22428,17 +22594,24 @@ module.exports={render:function (){var _vm=this; _vm.password.site = $event.target.value } } - }), " ", _vm._h('datalist', { + }), " ", _h('datalist', { attrs: { "id": "savedSites" } }, [_vm._l((_vm.passwords), function(pwd) { - return _vm._h('option', ["\n " + _vm._s(pwd.site) + " | " + _vm._s(pwd.login) + "\n "]) - })])])]), " ", _vm._h('remove-auto-complete'), " ", _vm._h('div', { + return _h('option', ["\n " + _vm._s(pwd.site) + " | " + _vm._s(pwd.login) + "\n "]) + })])])]), " ", _h('remove-auto-complete'), " ", _h('div', { staticClass: "form-group" - }, [_vm._h('div', { + }, [_h('div', { staticClass: "inner-addon left-addon" - }, [_vm._m(2), " ", _vm._m(3), " ", _vm._h('input', { + }, [_h('label', { + staticClass: "sr-only", + attrs: { + "for": "login" + } + }, ["Login"]), " ", _h('i', { + staticClass: "fa fa-user" + }), " ", _h('input', { directives: [{ name: "model", rawName: "v-model", @@ -22464,11 +22637,18 @@ module.exports={render:function (){var _vm=this; _vm.password.login = $event.target.value } } - })])]), " ", _vm._h('div', { + })])]), " ", _h('div', { staticClass: "form-group" - }, [_vm._h('div', { + }, [_h('div', { staticClass: "inner-addon left-addon input-group" - }, [_vm._m(4), " ", _vm._m(5), " ", _vm._h('input', { + }, [_h('label', { + staticClass: "sr-only", + attrs: { + "for": "masterPassword" + } + }, ["Master Password"]), " ", _h('i', { + staticClass: "fa fa-lock" + }), " ", _h('input', { directives: [{ name: "model", rawName: "v-model", @@ -22500,7 +22680,7 @@ module.exports={render:function (){var _vm=this; _vm.masterPassword = $event.target.value } } - }), " ", _vm._h('fingerprint', { + }), " ", _h('fingerprint', { attrs: { "fingerprint": _vm.fingerprint }, @@ -22509,9 +22689,9 @@ module.exports={render:function (){var _vm=this; _vm.togglePasswordType(_vm.$refs.masterPassword) } } - })])]), " ", _vm._h('div', { + })])]), " ", _h('div', { staticClass: "form-group row" - }, [_vm._h('div', { + }, [_h('div', { directives: [{ name: "show", rawName: "v-show", @@ -22519,11 +22699,11 @@ module.exports={render:function (){var _vm=this; expression: "generatedPassword" }], staticClass: "col-xs-9" - }, [_vm._h('div', { + }, [_h('div', { staticClass: "input-group" - }, [_vm._h('span', { + }, [_h('span', { staticClass: "input-group-btn" - }, [_vm._h('button', { + }, [_h('button', { ref: "copyPasswordButton", staticClass: "btn", class: { @@ -22534,25 +22714,46 @@ module.exports={render:function (){var _vm=this; "type": "button", "data-clipboard-text": "" } - }, [_vm._m(6)])]), " ", _vm._h('input', { - staticClass: "form-control read-only", + }, [_h('i', { + staticClass: "fa fa-clipboard", + attrs: { + "aria-hidden": "true" + } + })])]), " ", _h('input', { + ref: "generatedPassword", + staticClass: "form-control", class: { 'btn-outline-warning': _vm.password.version === 1, 'btn-outline-primary': _vm.password.version === 2 }, attrs: { "type": "password", - "readonly": "", "tabindex": "-1" }, domProps: { "value": _vm.generatedPassword + } + }), " ", _h('span', { + staticClass: "input-group-btn" + }, [_h('button', { + staticClass: "btn", + class: { + 'btn-outline-warning': _vm.password.version === 1, 'btn-outline-primary': _vm.password.version === 2 + }, + attrs: { + "id": "revealGeneratedPassword", + "type": "button" }, on: { "click": function($event) { - _vm.togglePasswordType($event.target) + _vm.togglePasswordType(_vm.$refs.generatedPassword) } } - })])]), " ", _vm._h('div', { + }, [_h('i', { + staticClass: "fa fa-eye", + attrs: { + "aria-hidden": "true" + } + })])])])]), " ", _h('div', { directives: [{ name: "show", rawName: "v-show", @@ -22560,7 +22761,7 @@ module.exports={render:function (){var _vm=this; expression: "!generatedPassword" }], staticClass: "col-xs-9" - }, [_vm._h('button', { + }, [_h('button', { staticClass: "btn", class: { 'btn-warning': _vm.password.version === 1, 'btn-primary': _vm.password.version === 2 @@ -22571,7 +22772,7 @@ module.exports={render:function (){var _vm=this; on: { "click": _vm.generatePassword } - }, [(!_vm.generatingPassword) ? _vm._h('span', ["Generate"]) : _vm._e(), " ", (_vm.generatingPassword) ? _vm._h('span', ["Generating..."]) : _vm._e()]), " ", _vm._h('button', { + }, [(!_vm.generatingPassword) ? _h('span', ["Generate"]) : _vm._e(), " ", (_vm.generatingPassword) ? _h('span', ["Generating..."]) : _vm._e()]), " ", _h('button', { staticClass: "btn btn-secondary", class: { 'btn-outline-warning': _vm.password.version === 1, 'btn-outline-primary': _vm.password.version === 2 @@ -22582,28 +22783,28 @@ module.exports={render:function (){var _vm=this; on: { "click": _vm.toggleVersion } - }, [_vm._h('small', { + }, [_h('small', { directives: [{ name: "show", rawName: "v-show", value: (_vm.password.version === 1), expression: "password.version===1" }] - }, ["v1"]), " ", _vm._h('small', { + }, ["v1"]), " ", _h('small', { directives: [{ name: "show", rawName: "v-show", value: (_vm.password.version === 2), expression: "password.version===2" }] - }, ["v2"])])]), " ", _vm._h('div', { + }, ["v2"])])]), " ", _h('div', { staticClass: "col-xs-3" - }, [_vm._h('div', { + }, [_h('div', { staticClass: "btn-group float-xs-right", attrs: { "role": "group" } - }, [_vm._h('button', { + }, [_h('button', { staticClass: "btn btn-secondary", attrs: { "type": "button" @@ -22613,20 +22814,23 @@ module.exports={render:function (){var _vm=this; _vm.showOptions = !_vm.showOptions } } - }, [_vm._m(7)])])])]), " ", (_vm.showOptions) ? _vm._h('div', { - staticClass: "form-group" - }, ["\n Options\n "]) : _vm._e(), " ", (_vm.showOptions) ? _vm._h('div', { - staticClass: "form-group" - }, [_vm._h('label', { - staticClass: "custom-control custom-checkbox" - }, [_vm._h('input', { + }, [_h('i', { + staticClass: "fa fa-sliders", + attrs: { + "aria-hidden": "true" + } + })])])])]), " ", (_vm.showOptions) ? _h('div', { + staticClass: "form-group pt-1" + }, [_h('label', { + staticClass: "form-check-inline" + }, [_h('input', { directives: [{ name: "model", rawName: "v-model", value: (_vm.password.lowercase), expression: "password.lowercase" }], - staticClass: "custom-control-input", + staticClass: "form-check-input", attrs: { "type": "checkbox", "id": "lowercase" @@ -22652,16 +22856,16 @@ module.exports={render:function (){var _vm=this; } } } - }), " ", _vm._m(8), " ", _vm._m(9)]), " ", _vm._h('label', { - staticClass: "custom-control custom-checkbox" - }, [_vm._h('input', { + }), " abc\n "]), " ", _h('label', { + staticClass: "form-check-inline" + }, [_h('input', { directives: [{ name: "model", rawName: "v-model", value: (_vm.password.uppercase), expression: "password.uppercase" }], - staticClass: "custom-control-input", + staticClass: "form-check-input", attrs: { "type": "checkbox", "id": "uppercase" @@ -22687,16 +22891,16 @@ module.exports={render:function (){var _vm=this; } } } - }), " ", _vm._m(10), " ", _vm._m(11)]), " ", _vm._h('label', { - staticClass: "custom-control custom-checkbox" - }, [_vm._h('input', { + }), " ABC\n "]), " ", _h('label', { + staticClass: "form-check-inline" + }, [_h('input', { directives: [{ name: "model", rawName: "v-model", value: (_vm.password.numbers), expression: "password.numbers" }], - staticClass: "custom-control-input", + staticClass: "form-check-input", attrs: { "type": "checkbox", "id": "numbers" @@ -22722,16 +22926,16 @@ module.exports={render:function (){var _vm=this; } } } - }), " ", _vm._m(12), " ", _vm._m(13)]), " ", _vm._h('label', { - staticClass: "custom-control custom-checkbox" - }, [_vm._h('input', { + }), "\n 123\n "]), " ", _h('label', { + staticClass: "form-check-inline" + }, [_h('input', { directives: [{ name: "model", rawName: "v-model", value: (_vm.password.symbols), expression: "password.symbols" }], - staticClass: "custom-control-input", + staticClass: "form-check-input", attrs: { "type": "checkbox", "id": "symbols" @@ -22757,13 +22961,17 @@ module.exports={render:function (){var _vm=this; } } } - }), " ", _vm._m(14), " ", _vm._m(15)])]) : _vm._e(), " ", (_vm.showOptions) ? _vm._h('div', { + }), "\n %!@\n "])]) : _vm._e(), " ", (_vm.showOptions) ? _h('div', { staticClass: "form-group row" - }, [_vm._h('div', { + }, [_h('div', { staticClass: "col-xs-6" - }, [_vm._m(16), " ", _vm._h('div', { + }, [_h('label', { + attrs: { + "for": "passwordLength" + } + }, ["Length"]), " ", _h('div', { staticClass: "input-group" - }, [_vm._h('input', { + }, [_h('input', { directives: [{ name: "model", rawName: "v-model", @@ -22785,7 +22993,7 @@ module.exports={render:function (){var _vm=this; _vm.password.length = _vm._n($event.target.value) } } - }), " ", _vm._h('span', { + }), " ", _h('span', { staticClass: "input-group-addon", on: { "click": function($event) { @@ -22793,7 +23001,12 @@ module.exports={render:function (){var _vm=this; _vm.decrementPasswordLength($event) } } - }, [_vm._m(17)]), " ", _vm._h('span', { + }, [_h('i', { + staticClass: "fa fa-minus", + attrs: { + "aria-hidden": "true" + } + })]), " ", _h('span', { staticClass: "input-group-addon", on: { "click": function($event) { @@ -22801,11 +23014,20 @@ module.exports={render:function (){var _vm=this; _vm.incrementPasswordLength($event) } } - }, [_vm._m(18)])])]), " ", _vm._h('div', { + }, [_h('i', { + staticClass: "fa fa-plus", + attrs: { + "aria-hidden": "true" + } + })])])]), " ", _h('div', { staticClass: "col-xs-6" - }, [_vm._m(19), " ", _vm._h('div', { + }, [_h('label', { + attrs: { + "for": "passwordCounter" + } + }, ["Counter"]), " ", _h('div', { staticClass: "input-group" - }, [_vm._h('input', { + }, [_h('input', { directives: [{ name: "model", rawName: "v-model", @@ -22827,7 +23049,7 @@ module.exports={render:function (){var _vm=this; _vm.password.counter = _vm._n($event.target.value) } } - }), " ", _vm._h('span', { + }), " ", _h('span', { staticClass: "input-group-addon", on: { "click": function($event) { @@ -22835,7 +23057,12 @@ module.exports={render:function (){var _vm=this; _vm.decrementCounter($event) } } - }, [_vm._m(20)]), " ", _vm._h('span', { + }, [_h('i', { + staticClass: "fa fa-minus", + attrs: { + "aria-hidden": "true" + } + })]), " ", _h('span', { staticClass: "input-group-addon", on: { "click": function($event) { @@ -22843,162 +23070,61 @@ module.exports={render:function (){var _vm=this; _vm.incrementCounter($event) } } - }, [_vm._m(21)])])])]) : _vm._e(), " ", (_vm.showError) ? _vm._h('div', { - staticClass: "form-group" - }, [_vm._m(22)]) : _vm._e(), " ", (_vm.version === 1 && !_vm.showError) ? _vm._h('div', { - staticClass: "form-group mb-0" - }, [_vm._h('div', { - staticClass: "alert alert-warning mb-0", - attrs: { - "role": "alert" - } - }, [_vm._h('small', [_vm._m(23), "\n You use an obsolette version of LessPass.\n The default version will be version 2 in\n ", _vm._h('strong', { - staticClass: "hint--right", - attrs: { - "aria-label": "10 jan 2017" - } - }, [_vm._s(_vm.getDayBeforeV2()) + " days"]), ".\n You can continue to use version 1 even if we advise you to update your passwords.\n "])])]) : _vm._e()]) -},staticRenderFns: [function (){var _vm=this; - return _vm._h('label', { - staticClass: "sr-only", - attrs: { - "for": "site" - } - }, ["Site"]) -},function (){var _vm=this; - return _vm._h('i', { - staticClass: "fa fa-globe" - }) -},function (){var _vm=this; - return _vm._h('label', { - staticClass: "sr-only", - attrs: { - "for": "login" - } - }, ["Login"]) -},function (){var _vm=this; - return _vm._h('i', { - staticClass: "fa fa-user" - }) -},function (){var _vm=this; - return _vm._h('label', { - staticClass: "sr-only", - attrs: { - "for": "masterPassword" - } - }, ["Master Password"]) -},function (){var _vm=this; - return _vm._h('i', { - staticClass: "fa fa-lock" - }) -},function (){var _vm=this; - return _vm._h('i', { - staticClass: "fa fa-clipboard", - attrs: { - "aria-hidden": "true" - } - }) -},function (){var _vm=this; - return _vm._h('i', { - staticClass: "fa fa-sliders", - attrs: { - "aria-hidden": "true" - } - }) -},function (){var _vm=this; - return _vm._h('span', { - staticClass: "custom-control-indicator" - }) -},function (){var _vm=this; - return _vm._h('span', { - staticClass: "custom-control-description" - }, ["abc"]) -},function (){var _vm=this; - return _vm._h('span', { - staticClass: "custom-control-indicator" - }) -},function (){var _vm=this; - return _vm._h('span', { - staticClass: "custom-control-description" - }, ["ABC"]) -},function (){var _vm=this; - return _vm._h('span', { - staticClass: "custom-control-indicator" - }) -},function (){var _vm=this; - return _vm._h('span', { - staticClass: "custom-control-description" - }, ["123"]) -},function (){var _vm=this; - return _vm._h('span', { - staticClass: "custom-control-indicator" - }) -},function (){var _vm=this; - return _vm._h('span', { - staticClass: "custom-control-description" - }, ["%!@"]) -},function (){var _vm=this; - return _vm._h('label', { - attrs: { - "for": "passwordLength" - } - }, ["Length"]) -},function (){var _vm=this; - return _vm._h('i', { - staticClass: "fa fa-minus", - attrs: { - "aria-hidden": "true" - } - }) -},function (){var _vm=this; - return _vm._h('i', { + }, [_h('i', { staticClass: "fa fa-plus", attrs: { "aria-hidden": "true" } - }) -},function (){var _vm=this; - return _vm._h('label', { + })])])])]) : _vm._e(), " ", (_vm.showOptions) ? _h('div', { + staticClass: "form-group" + }, [_h('button', { + staticClass: "btn btn-secondary btn-sm", attrs: { - "for": "passwordCounter" + "type": "button" + }, + on: { + "click": _vm.saveDefault } - }, ["Counter"]) -},function (){var _vm=this; - return _vm._h('i', { - staticClass: "fa fa-minus", + }, ["\n save as default\n "]), " ", (_vm.optionsSaved) ? _h('span', { + staticClass: "text-success" + }, [_h('i', { + staticClass: "fa fa-check", attrs: { "aria-hidden": "true" } - }) -},function (){var _vm=this; - return _vm._h('i', { - staticClass: "fa fa-plus", + })]) : _vm._e()]) : _vm._e(), " ", (_vm.showError) ? _h('div', { + staticClass: "form-group" + }, [_h('div', { + staticClass: "alert alert-danger", attrs: { - "aria-hidden": "true" + "role": "alert" } - }) -},function (){var _vm=this; - return _vm._h('div', { - staticClass: "alert alert-danger", + }, ["\n site, login and master password fields are mandatory\n "])]) : _vm._e(), " ", (_vm.version === 1 && !_vm.showError && !_vm.showOptions) ? _h('div', { + staticClass: "form-group mb-0" + }, [_h('div', { + staticClass: "alert alert-warning mb-0", attrs: { "role": "alert" } - }, ["\n site, login and master password fields are mandatory\n "]) -},function (){var _vm=this; - return _vm._h('i', { + }, [_h('small', [_h('i', { staticClass: "fa fa-exclamation-triangle", attrs: { "aria-hidden": "true" } - }) -}]} + }), "\n You are using a deprecated version of LessPass.\n The default version will be version 2 in\n ", _h('strong', { + staticClass: "hint--right", + attrs: { + "aria-label": "10 jan 2017" + } + }, [_vm._s(_vm.getDayBeforeV2()) + " days"]), ".\n You can continue to use version 1, but we strongly advise you to migrate your passwords to\n version 2.\n "])])]) : _vm._e()]) +},staticRenderFns: []} /***/ }, /* 211 */ /***/ function(module, exports) { -module.exports={render:function (){var _vm=this; - return _vm._h('div', { +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement; + return _h('div', { staticClass: "card", class: { 'v1': _vm.version === 1, 'v2': _vm.version === 2 @@ -23009,34 +23135,40 @@ module.exports={render:function (){var _vm=this; attrs: { "id": "lesspass" } - }, [_vm._h('lesspass-menu'), " ", _vm._h('div', { + }, [_h('lesspass-menu'), " ", _h('div', { staticClass: "card-block" - }, [_vm._h('router-view')])]) + }, [_h('router-view')])]) },staticRenderFns: []} /***/ }, /* 212 */ /***/ function(module, exports) { -module.exports={render:function (){var _vm=this; - return _vm._h('form', { +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement; + return _h('form', { on: { "submit": function($event) { $event.preventDefault(); _vm.resetPassword($event) } } - }, [(_vm.showError) ? _vm._h('div', { + }, [(_vm.showError) ? _h('div', { staticClass: "form-group row" - }, [_vm._m(0)]) : _vm._e(), " ", (_vm.successMessage) ? _vm._h('div', { + }, [_h('div', { + staticClass: "col-xs-12 text-muted text-danger" + }, ["\n Oops! Something went wrong. Retry in a few minutes.\n "])]) : _vm._e(), " ", (_vm.successMessage) ? _h('div', { staticClass: "form-group row" - }, [_vm._m(1)]) : _vm._e(), " ", _vm._h('div', { + }, [_h('div', { + staticClass: "col-xs-12 text-muted text-success" + }, ["\n If a matching account was found an email was sent to allow you to reset your password.\n "])]) : _vm._e(), " ", _h('div', { staticClass: "form-group row" - }, [_vm._h('div', { + }, [_h('div', { staticClass: "col-xs-12" - }, [_vm._h('div', { + }, [_h('div', { staticClass: "inner-addon left-addon" - }, [_vm._m(2), " ", _vm._h('input', { + }, [_h('i', { + staticClass: "fa fa-user" + }), " ", _h('input', { directives: [{ name: "model", rawName: "v-model", @@ -23059,13 +23191,13 @@ module.exports={render:function (){var _vm=this; _vm.email = $event.target.value } } - }), " ", _vm._h('small', { + }), " ", _h('small', { staticClass: "form-text text-muted text-danger" - }, [(_vm.emailRequired) ? _vm._h('span', ["An email is required"]) : _vm._e()])])])]), " ", _vm._h('div', { + }, [(_vm.emailRequired) ? _h('span', ["An email is required"]) : _vm._e()])])])]), " ", _h('div', { staticClass: "form-group row" - }, [_vm._h('div', { + }, [_h('div', { staticClass: "col-xs-12" - }, [_vm._h('button', { + }, [_h('button', { staticClass: "btn", class: { 'btn-warning': _vm.version === 1, 'btn-primary': _vm.version === 2 @@ -23074,37 +23206,23 @@ module.exports={render:function (){var _vm=this; "id": "loginButton", "type": "submit" } - }, [(_vm.loading) ? _vm._h('span', [_vm._m(3)]) : _vm._e(), "\n Send me a reset link\n "])])])]) -},staticRenderFns: [function (){var _vm=this; - return _vm._h('div', { - staticClass: "col-xs-12 text-muted text-danger" - }, ["\n Oops! Something went wrong. Retry in a few minutes.\n "]) -},function (){var _vm=this; - return _vm._h('div', { - staticClass: "col-xs-12 text-muted text-success" - }, ["\n If a matching account was found an email was sent to allow you to reset your password.\n "]) -},function (){var _vm=this; - return _vm._h('i', { - staticClass: "fa fa-user" - }) -},function (){var _vm=this; - return _vm._h('i', { + }, [(_vm.loading) ? _h('span', [_h('i', { staticClass: "fa fa-spinner fa-pulse fa-fw" - }) -}]} + })]) : _vm._e(), "\n Send me a reset link\n "])])])]) +},staticRenderFns: []} /***/ }, /* 213 */ /***/ function(module, exports) { -module.exports={render:function (){var _vm=this; - return _vm._h('div', { +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement; + return _h('div', { attrs: { "id": "delete-button" } - }, [(_vm.confirm) ? _vm._h('div', { + }, [(_vm.confirm) ? _h('div', { staticClass: "form-group has-danger" - }, [_vm._h('button', { + }, [_h('button', { staticClass: "btn btn-danger btn-sm", attrs: { "type": "button" @@ -23115,7 +23233,7 @@ module.exports={render:function (){var _vm=this; _vm.confirmDelete($event) } } - }, ["\n " + _vm._s(_vm.confirmButton) + "\n "]), " ", _vm._h('button', { + }, ["\n " + _vm._s(_vm.confirmButton) + "\n "]), " ", _h('button', { staticClass: "btn btn-secondary btn-sm", attrs: { "type": "button" @@ -23126,9 +23244,9 @@ module.exports={render:function (){var _vm=this; _vm.confirm = false } } - }, ["\n " + _vm._s(_vm.cancelButton) + "\n "]), " ", _vm._h('div', { + }, ["\n " + _vm._s(_vm.cancelButton) + "\n "]), " ", _h('div', { staticClass: "form-control-feedback" - }, [_vm._s(_vm.confirmText)])]) : _vm._e(), " ", (!_vm.confirm) ? _vm._h('button', { + }, [_vm._s(_vm.confirmText)])]) : _vm._e(), " ", (!_vm.confirm) ? _h('button', { staticClass: "btn btn-outline-danger btn-sm", attrs: { "type": "button" @@ -23139,46 +23257,46 @@ module.exports={render:function (){var _vm=this; _vm.confirm = true } } - }, [_vm._m(0)]) : _vm._e()]) -},staticRenderFns: [function (){var _vm=this; - return _vm._h('i', { - staticClass: "fa fa-trash fa-fw" - }) -}]} + }, [_h('i', { + staticClass: "fa fa-trash fa-fw" + })]) : _vm._e()]) +},staticRenderFns: []} /***/ }, /* 214 */ /***/ function(module, exports) { -module.exports={render:function (){var _vm=this; - return _vm._h('form', { +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement; + return _h('form', { on: { "submit": function($event) { $event.preventDefault(); _vm.resetPasswordConfirm($event) } } - }, [(_vm.showError) ? _vm._h('div', { + }, [(_vm.showError) ? _h('div', { staticClass: "form-group row" - }, [_vm._h('div', { + }, [_h('div', { staticClass: "col-xs-12 text-muted text-danger" - }, ["\n " + _vm._s(_vm.errorMessage) + "\n "])]) : _vm._e(), " ", (_vm.successMessage) ? _vm._h('div', { + }, ["\n " + _vm._s(_vm.errorMessage) + "\n "])]) : _vm._e(), " ", (_vm.successMessage) ? _h('div', { staticClass: "form-group row" - }, [_vm._h('div', { + }, [_h('div', { staticClass: "col-xs-12 text-muted text-success" - }, ["\n You're password was reset successfully.\n ", _vm._h('router-link', { + }, ["\n You're password was reset successfully.\n ", _h('router-link', { attrs: { "to": { name: 'login' } } - }, ["Do you want to login ?"])])]) : _vm._e(), " ", _vm._h('div', { + }, ["Do you want to login ?"])])]) : _vm._e(), " ", _h('div', { staticClass: "form-group row" - }, [_vm._h('div', { + }, [_h('div', { staticClass: "col-xs-12" - }, [_vm._h('div', { + }, [_h('div', { staticClass: "inner-addon left-addon" - }, [_vm._m(0), " ", _vm._h('input', { + }, [_h('i', { + staticClass: "fa fa-lock" + }), " ", _h('input', { directives: [{ name: "model", rawName: "v-model", @@ -23202,13 +23320,13 @@ module.exports={render:function (){var _vm=this; _vm.new_password = $event.target.value } } - }), " ", _vm._h('small', { + }), " ", _h('small', { staticClass: "form-text text-muted text-danger" - }, [(_vm.passwordRequired) ? _vm._h('span', ["A password is required"]) : _vm._e()])])])]), " ", _vm._h('div', { + }, [(_vm.passwordRequired) ? _h('span', ["A password is required"]) : _vm._e()])])])]), " ", _h('div', { staticClass: "form-group row" - }, [_vm._h('div', { + }, [_h('div', { staticClass: "col-xs-12" - }, [_vm._h('button', { + }, [_h('button', { staticClass: "btn", class: { 'btn-warning': _vm.version === 1, 'btn-primary': _vm.version === 2 @@ -23218,22 +23336,18 @@ module.exports={render:function (){var _vm=this; "type": "submit" } }, ["\n Reset my password\n "])])])]) -},staticRenderFns: [function (){var _vm=this; - return _vm._h('i', { - staticClass: "fa fa-lock" - }) -}]} +},staticRenderFns: []} /***/ }, /* 215 */ /***/ function(module, exports) { -module.exports={render:function (){var _vm=this; - return _vm._h('div', { +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement; + return _h('div', { attrs: { "id": "menu" } - }, [_vm._h('div', { + }, [_h('div', { directives: [{ name: "show", rawName: "v-show", @@ -23244,41 +23358,43 @@ module.exports={render:function (){var _vm=this; class: { 'card-warning': _vm.version === 1, 'card-primary': _vm.version === 2 } - }, [_vm._h('div', { + }, [_h('div', { staticClass: "row" - }, [_vm._h('div', { + }, [_h('div', { staticClass: "col-xs-6" - }, [_vm._h('router-link', { + }, [_h('router-link', { staticClass: "white-link", attrs: { "to": { name: 'home' } } - }, ["LessPass"]), " ", _vm._h('span', { + }, ["LessPass"]), " ", _h('span', { staticClass: "white-link", on: { "click": _vm.saveOrUpdatePassword } - }, [(_vm.passwordStatus == 'DIRTY') ? _vm._h('i', { + }, [(_vm.passwordStatus == 'DIRTY') ? _h('i', { staticClass: "fa fa-save ml-1 fa-clickable" - }) : _vm._e()]), " ", (_vm.passwordStatus == 'CREATED' || _vm.passwordStatus == 'UPDATED') ? _vm._h('span', { + }) : _vm._e()]), " ", (_vm.passwordStatus == 'CREATED' || _vm.passwordStatus == 'UPDATED') ? _h('span', { staticClass: "text-success" - }, [_vm._m(0)]) : _vm._e()]), " ", _vm._h('div', { + }, [_h('i', { + staticClass: "fa fa-check ml-1 text-success" + })]) : _vm._e()]), " ", _h('div', { staticClass: "col-xs-6 text-xs-right" - }, [_vm._h('router-link', { + }, [_h('router-link', { staticClass: "white-link ml-1", attrs: { "to": { name: 'passwords' } } - }, [_vm._h('i', { + }, [_h('i', { staticClass: "fa fa-key", attrs: { "aria-hidden": "true" } - })]), " ", _vm._h('button', { + })]), " ", _h('button', { staticClass: "white-link ml-1 btn btn-link p-0 m-0", attrs: { "type": "button" @@ -23286,7 +23402,12 @@ module.exports={render:function (){var _vm=this; on: { "click": _vm.logout } - }, [_vm._m(1)])])])]), " ", _vm._h('div', { + }, [_h('i', { + staticClass: "fa fa-sign-out", + attrs: { + "aria-hidden": "true" + } + })])])])]), " ", _h('div', { directives: [{ name: "show", rawName: "v-show", @@ -23297,61 +23418,47 @@ module.exports={render:function (){var _vm=this; class: { 'card-warning': _vm.version === 1, 'card-primary': _vm.version === 2 } - }, [_vm._h('div', { + }, [_h('div', { staticClass: "row" - }, [_vm._h('div', { + }, [_h('div', { staticClass: "index-header" - }, [_vm._h('div', { + }, [_h('div', { staticClass: "col-xs-6" - }, [_vm._h('router-link', { + }, [_h('router-link', { staticClass: "white-link", attrs: { "to": { name: 'home' } } - }, ["LessPass"])]), " ", _vm._h('div', { + }, ["LessPass"])]), " ", _h('div', { staticClass: "col-xs-6 text-xs-right" - }, [_vm._h('router-link', { + }, [_h('router-link', { staticClass: "white-link pl-1", attrs: { "to": { name: 'login' } } - }, [_vm._h('i', { + }, [_h('i', { staticClass: "fa fa-user-secret fa-clickable", attrs: { "aria-hidden": "true" } })])])])])])]) -},staticRenderFns: [function (){var _vm=this; - return _vm._h('i', { - staticClass: "fa fa-check ml-1 text-success" - }) -},function (){var _vm=this; - return _vm._h('i', { - staticClass: "fa fa-sign-out", - attrs: { - "aria-hidden": "true" - } - }) -}]} +},staticRenderFns: []} /***/ }, /* 216 */ /***/ function(module, exports, __webpack_require__) { -/** - * vue-router v2.0.2 - * (c) 2016 Evan You - * @license MIT - */ -(function (global, factory) { - true ? module.exports = factory() : - typeof define === 'function' && define.amd ? define(factory) : - (global.VueRouter = factory()); -}(this, (function () { 'use strict'; +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * vue-router v2.1.0 + * (c) 2016 Evan You + * @license MIT + */ +'use strict'; var View = { name: 'router-view', @@ -23417,78 +23524,6 @@ var View = { /* */ -function resolvePath ( - relative, - base, - append -) { - if (relative.charAt(0) === '/') { - return relative - } - - if (relative.charAt(0) === '?' || relative.charAt(0) === '#') { - return base + relative - } - - var stack = base.split('/') - - // remove trailing segment if: - // - not appending - // - appending to trailing slash (last segment is empty) - if (!append || !stack[stack.length - 1]) { - stack.pop() - } - - // resolve relative path - var segments = relative.replace(/^\//, '').split('/') - for (var i = 0; i < segments.length; i++) { - var segment = segments[i] - if (segment === '.') { - continue - } else if (segment === '..') { - stack.pop() - } else { - stack.push(segment) - } - } - - // ensure leading slash - if (stack[0] !== '') { - stack.unshift('') - } - - return stack.join('/') -} - -function parsePath (path) { - var hash = '' - var query = '' - - var hashIndex = path.indexOf('#') - if (hashIndex >= 0) { - hash = path.slice(hashIndex) - path = path.slice(0, hashIndex) - } - - var queryIndex = path.indexOf('?') - if (queryIndex >= 0) { - query = path.slice(queryIndex + 1) - path = path.slice(0, queryIndex) - } - - return { - path: path, - query: query, - hash: hash - } -} - -function cleanPath (path) { - return path.replace(/\/\//g, '/') -} - -/* */ - function assert (condition, message) { if (!condition) { throw new Error(("[vue-router] " + message)) @@ -23517,7 +23552,7 @@ function resolveQuery ( try { parsedQuery = parseQuery(query) } catch (e) { - warn(false, e.message) + process.env.NODE_ENV !== 'production' && warn(false, e.message) parsedQuery = {} } for (var key in extraQuery) { @@ -23558,7 +23593,7 @@ function parseQuery (query) { } function stringifyQuery (obj) { - var res = obj ? Object.keys(obj).sort().map(function (key) { + var res = obj ? Object.keys(obj).map(function (key) { var val = obj[key] if (val === undefined) { @@ -23689,37 +23724,6 @@ function queryIncludes (current, target) { /* */ -function normalizeLocation ( - raw, - current, - append -) { - var next = typeof raw === 'string' ? { path: raw } : raw - if (next.name || next._normalized) { - return next - } - - var parsedPath = parsePath(next.path || '') - var basePath = (current && current.path) || '/' - var path = parsedPath.path - ? resolvePath(parsedPath.path, basePath, append) - : (current && current.path) || '/' - var query = resolveQuery(parsedPath.query, next.query) - var hash = next.hash || parsedPath.hash - if (hash && hash.charAt(0) !== '#') { - hash = "#" + hash - } - - return { - _normalized: true, - path: path, - query: query, - hash: hash - } -} - -/* */ - // work around weird flow bug var toTypes = [String, Object] @@ -23737,50 +23741,45 @@ var Link = { exact: Boolean, append: Boolean, replace: Boolean, - activeClass: String + activeClass: String, + event: { + type: [String, Array], + default: 'click' + } }, render: function render (h) { var this$1 = this; var router = this.$router var current = this.$route - var to = normalizeLocation(this.to, current, this.append) - var resolved = router.match(to, current) - var fullPath = resolved.redirectedFrom || resolved.fullPath - var base = router.history.base - var href = createHref(base, fullPath, router.mode) + var ref = router.resolve(this.to, current, this.append); + var normalizedTo = ref.normalizedTo; + var resolved = ref.resolved; + var href = ref.href; var classes = {} var activeClass = this.activeClass || router.options.linkActiveClass || 'router-link-active' - var compareTarget = to.path ? createRoute(null, to) : resolved + var compareTarget = normalizedTo.path ? createRoute(null, normalizedTo) : resolved classes[activeClass] = this.exact ? isSameRoute(current, compareTarget) : isIncludedRoute(current, compareTarget) - var on = { - click: function (e) { - // don't redirect with control keys - /* istanbul ignore if */ - if (e.metaKey || e.ctrlKey || e.shiftKey) { return } - // don't redirect when preventDefault called - /* istanbul ignore if */ - if (e.defaultPrevented) { return } - // don't redirect on right click - /* istanbul ignore if */ - if (e.button !== 0) { return } - // don't redirect if `target="_blank"` - /* istanbul ignore if */ - var target = e.target.getAttribute('target') - if (/\b_blank\b/i.test(target)) { return } - - e.preventDefault() + var handler = function (e) { + if (guardEvent(e)) { if (this$1.replace) { - router.replace(to) + router.replace(normalizedTo) } else { - router.push(to) + router.push(normalizedTo) } } } + var on = { click: guardEvent } + if (Array.isArray(this.event)) { + this.event.forEach(function (e) { on[e] = handler }) + } else { + on[this.event] = handler + } + var data = { class: classes } @@ -23809,6 +23808,25 @@ var Link = { } } +function guardEvent (e) { + // don't redirect with control keys + /* istanbul ignore if */ + if (e.metaKey || e.ctrlKey || e.shiftKey) { return } + // don't redirect when preventDefault called + /* istanbul ignore if */ + if (e.defaultPrevented) { return } + // don't redirect on right click + /* istanbul ignore if */ + if (e.button !== 0) { return } + // don't redirect if `target="_blank"` + /* istanbul ignore if */ + var target = e.target.getAttribute('target') + if (/\b_blank\b/i.test(target)) { return } + + e.preventDefault() + return true +} + function findAnchor (children) { if (children) { var child @@ -23824,43 +23842,200 @@ function findAnchor (children) { } } -function createHref (base, fullPath, mode) { - var path = mode === 'hash' ? '/#' + fullPath : fullPath - return base ? cleanPath(base + path) : path +var _Vue + +function install (Vue) { + if (install.installed) { return } + install.installed = true + + _Vue = Vue + + Object.defineProperty(Vue.prototype, '$router', { + get: function get () { return this.$root._router } + }) + + Object.defineProperty(Vue.prototype, '$route', { + get: function get$1 () { return this.$root._route } + }) + + Vue.mixin({ + beforeCreate: function beforeCreate () { + if (this.$options.router) { + this._router = this.$options.router + this._router.init(this) + Vue.util.defineReactive(this, '_route', this._router.history.current) + } + } + }) + + Vue.component('router-view', View) + Vue.component('router-link', Link) + + var strats = Vue.config.optionMergeStrategies + // use the same hook merging strategy for route hooks + strats.beforeRouteEnter = strats.beforeRouteLeave = strats.created } -var _Vue +/* */ + +function resolvePath ( + relative, + base, + append +) { + if (relative.charAt(0) === '/') { + return relative + } + + if (relative.charAt(0) === '?' || relative.charAt(0) === '#') { + return base + relative + } + + var stack = base.split('/') + + // remove trailing segment if: + // - not appending + // - appending to trailing slash (last segment is empty) + if (!append || !stack[stack.length - 1]) { + stack.pop() + } + + // resolve relative path + var segments = relative.replace(/^\//, '').split('/') + for (var i = 0; i < segments.length; i++) { + var segment = segments[i] + if (segment === '.') { + continue + } else if (segment === '..') { + stack.pop() + } else { + stack.push(segment) + } + } + + // ensure leading slash + if (stack[0] !== '') { + stack.unshift('') + } + + return stack.join('/') +} + +function parsePath (path) { + var hash = '' + var query = '' + + var hashIndex = path.indexOf('#') + if (hashIndex >= 0) { + hash = path.slice(hashIndex) + path = path.slice(0, hashIndex) + } + + var queryIndex = path.indexOf('?') + if (queryIndex >= 0) { + query = path.slice(queryIndex + 1) + path = path.slice(0, queryIndex) + } + + return { + path: path, + query: query, + hash: hash + } +} + +function cleanPath (path) { + return path.replace(/\/\//g, '/') +} -function install (Vue) { - if (install.installed) { return } - install.installed = true +/* */ - _Vue = Vue +function createRouteMap (routes) { + var pathMap = Object.create(null) + var nameMap = Object.create(null) - Object.defineProperty(Vue.prototype, '$router', { - get: function get () { return this.$root._router } + routes.forEach(function (route) { + addRouteRecord(pathMap, nameMap, route) }) - Object.defineProperty(Vue.prototype, '$route', { - get: function get$1 () { return this.$root._route } - }) + return { + pathMap: pathMap, + nameMap: nameMap + } +} - Vue.mixin({ - beforeCreate: function beforeCreate () { - if (this.$options.router) { - this._router = this.$options.router - this._router.init(this) - Vue.util.defineReactive(this, '_route', this._router.history.current) +function addRouteRecord ( + pathMap, + nameMap, + route, + parent, + matchAs +) { + var path = route.path; + var name = route.name; + if (process.env.NODE_ENV !== 'production') { + assert(path != null, "\"path\" is required in a route configuration.") + assert( + typeof route.component !== 'string', + "route config \"component\" for path: " + (String(path || name)) + " cannot be a " + + "string id. Use an actual component instead." + ) + } + + var record = { + path: normalizePath(path, parent), + components: route.components || { default: route.component }, + instances: {}, + name: name, + parent: parent, + matchAs: matchAs, + redirect: route.redirect, + beforeEnter: route.beforeEnter, + meta: route.meta || {} + } + + if (route.children) { + // Warn if route is named and has a default child route. + // If users navigate to this route by name, the default child will + // not be rendered (GH Issue #629) + if (process.env.NODE_ENV !== 'production') { + if (route.name && route.children.some(function (child) { return /^\/?$/.test(child.path); })) { + warn(false, ("Named Route '" + (route.name) + "' has a default child route.\n When navigating to this named route (:to=\"{name: '" + (route.name) + "'\"), the default child route will not be rendered.\n Remove the name from this route and use the name of the default child route for named links instead.") + ) } } - }) + route.children.forEach(function (child) { + addRouteRecord(pathMap, nameMap, child, record) + }) + } - Vue.component('router-view', View) - Vue.component('router-link', Link) + if (route.alias !== undefined) { + if (Array.isArray(route.alias)) { + route.alias.forEach(function (alias) { + addRouteRecord(pathMap, nameMap, { path: alias }, parent, record.path) + }) + } else { + addRouteRecord(pathMap, nameMap, { path: route.alias }, parent, record.path) + } + } - var strats = Vue.config.optionMergeStrategies - // use the same hook merging strategy for route hooks - strats.beforeRouteEnter = strats.beforeRouteLeave = strats.created + if (!pathMap[record.path]) { + pathMap[record.path] = record + } + if (name) { + if (!nameMap[name]) { + nameMap[name] = record + } else if (process.env.NODE_ENV !== 'production') { + warn(false, ("Duplicate named routes definition: { name: \"" + name + "\", path: \"" + (record.path) + "\" }")) + } + } +} + +function normalizePath (path, parent) { + path = path.replace(/\/$/, '') + if (path[0] === '/') { return path } + if (parent == null) { return path } + return cleanPath(((parent.path) + "/" + path)) } var __moduleExports = Array.isArray || function (arr) { @@ -24301,86 +24476,102 @@ index.tokensToRegExp = tokensToRegExp_1; /* */ -function createRouteMap (routes) { - var pathMap = Object.create(null) - var nameMap = Object.create(null) +var regexpCache = Object.create(null) - routes.forEach(function (route) { - addRouteRecord(pathMap, nameMap, route) - }) +function getRouteRegex (path) { + var hit = regexpCache[path] + var keys, regexp - return { - pathMap: pathMap, - nameMap: nameMap + if (hit) { + keys = hit.keys + regexp = hit.regexp + } else { + keys = [] + regexp = index(path, keys) + regexpCache[path] = { keys: keys, regexp: regexp } } + + return { keys: keys, regexp: regexp } } -function addRouteRecord ( - pathMap, - nameMap, - route, - parent, - matchAs -) { - var path = route.path; - var name = route.name; - assert(path != null, "\"path\" is required in a route configuration.") +var regexpCompileCache = Object.create(null) - var record = { - path: normalizePath(path, parent), - components: route.components || { default: route.component }, - instances: {}, - name: name, - parent: parent, - matchAs: matchAs, - redirect: route.redirect, - beforeEnter: route.beforeEnter, - meta: route.meta || {} +function fillParams ( + path, + params, + routeMsg +) { + try { + var filler = + regexpCompileCache[path] || + (regexpCompileCache[path] = index.compile(path)) + return filler(params || {}, { pretty: true }) + } catch (e) { + if (process.env.NODE_ENV !== 'production') { + warn(false, ("missing param for " + routeMsg + ": " + (e.message))) + } + return '' } +} - if (route.children) { - // Warn if route is named and has a default child route. - // If users navigate to this route by name, the default child will - // not be rendered (GH Issue #629) - if (false) {} - route.children.forEach(function (child) { - addRouteRecord(pathMap, nameMap, child, record) - }) +/* */ + +function normalizeLocation ( + raw, + current, + append +) { + var next = typeof raw === 'string' ? { path: raw } : raw + // named target + if (next.name || next._normalized) { + return next } - if (route.alias !== undefined) { - if (Array.isArray(route.alias)) { - route.alias.forEach(function (alias) { - addRouteRecord(pathMap, nameMap, { path: alias }, parent, record.path) - }) - } else { - addRouteRecord(pathMap, nameMap, { path: route.alias }, parent, record.path) + // relative params + if (!next.path && next.params && current) { + next = assign({}, next) + next._normalized = true + var params = assign(assign({}, current.params), next.params) + if (current.name) { + next.name = current.name + next.params = params + } else if (current.matched) { + var rawPath = current.matched[current.matched.length - 1].path + next.path = fillParams(rawPath, params, ("path " + (current.path))) + } else if (process.env.NODE_ENV !== 'production') { + warn(false, "relative params navigation requires a current route.") } + return next } - pathMap[record.path] = record - if (name) { - if (!nameMap[name]) { - nameMap[name] = record - } else { - warn(false, ("Duplicate named routes definition: { name: \"" + name + "\", path: \"" + (record.path) + "\" }")) - } + var parsedPath = parsePath(next.path || '') + var basePath = (current && current.path) || '/' + var path = parsedPath.path + ? resolvePath(parsedPath.path, basePath, append || next.append) + : (current && current.path) || '/' + var query = resolveQuery(parsedPath.query, next.query) + var hash = next.hash || parsedPath.hash + if (hash && hash.charAt(0) !== '#') { + hash = "#" + hash + } + + return { + _normalized: true, + path: path, + query: query, + hash: hash } } -function normalizePath (path, parent) { - path = path.replace(/\/$/, '') - if (path[0] === '/') { return path } - if (parent == null) { return path } - return cleanPath(((parent.path) + "/" + path)) +function assign (a, b) { + for (var key in b) { + a[key] = b[key] + } + return a } /* */ -var regexpCache = Object.create(null) - -var regexpCompileCache = Object.create(null) - function createMatcher (routes) { var ref = createRouteMap(routes); var pathMap = ref.pathMap; @@ -24396,6 +24587,9 @@ function createMatcher (routes) { if (name) { var record = nameMap[name] + var paramNames = getRouteRegex(record.path).keys + .filter(function (key) { return !key.optional; }) + .map(function (key) { return key.name; }) if (typeof location.params !== 'object') { location.params = {} @@ -24403,7 +24597,7 @@ function createMatcher (routes) { if (currentRoute && typeof currentRoute.params === 'object') { for (var key in currentRoute.params) { - if (!(key in location.params)) { + if (!(key in location.params) && paramNames.indexOf(key) > -1) { location.params[key] = currentRoute.params[key] } } @@ -24439,7 +24633,9 @@ function createMatcher (routes) { } if (!redirect || typeof redirect !== 'object') { - warn(false, ("invalid redirect option: " + (JSON.stringify(redirect)))) + process.env.NODE_ENV !== 'production' && warn( + false, ("invalid redirect option: " + (JSON.stringify(redirect))) + ) return _createRoute(null, location) } @@ -24456,7 +24652,9 @@ function createMatcher (routes) { if (name) { // resolved named direct var targetRecord = nameMap[name] - assert(targetRecord, ("redirect failed: named route \"" + name + "\" not found.")) + if (process.env.NODE_ENV !== 'production') { + assert(targetRecord, ("redirect failed: named route \"" + name + "\" not found.")) + } return match({ _normalized: true, name: name, @@ -24523,16 +24721,9 @@ function matchRoute ( params, pathname ) { - var keys, regexp - var hit = regexpCache[path] - if (hit) { - keys = hit.keys - regexp = hit.regexp - } else { - keys = [] - regexp = index(path, keys) - regexpCache[path] = { keys: keys, regexp: regexp } - } + var ref = getRouteRegex(path); + var regexp = ref.regexp; + var keys = ref.keys; var m = pathname.match(regexp) if (!m) { @@ -24550,22 +24741,6 @@ function matchRoute ( return true } -function fillParams ( - path, - params, - routeMsg -) { - try { - var filler = - regexpCompileCache[path] || - (regexpCompileCache[path] = index.compile(path)) - return filler(params || {}, { pretty: true }) - } catch (e) { - assert(false, ("missing param for " + routeMsg + ": " + (e.message))) - return '' - } -} - function resolveRecordPath (path, record) { return resolvePath(path, record.parent ? record.parent.path : '/', true) } @@ -24667,7 +24842,7 @@ History.prototype.confirmTransition = function confirmTransition (route, cb) { this$1.ensureURL(true) } else if (typeof to === 'string' || typeof to === 'object') { // next('/') or next({ path: '/' }) -> redirect - this$1.push(to) + (typeof to === 'object' && to.replace) ? this$1.replace(to) : this$1.push(to) } else { // confirm transition and pass on the value next(to) @@ -24686,9 +24861,11 @@ History.prototype.confirmTransition = function confirmTransition (route, cb) { if (this$1.pending === route) { this$1.pending = null cb(route) - this$1.router.app.$nextTick(function () { - postEnterCbs.forEach(function (cb) { return cb(); }) - }) + if (this$1.router.app) { + this$1.router.app.$nextTick(function () { + postEnterCbs.forEach(function (cb) { return cb(); }) + }) + } } }) }) @@ -24984,7 +25161,9 @@ var HTML5History = (function (History) { if (!behavior) { return } - assert(typeof behavior === 'function', "scrollBehavior must be a function") + if (process.env.NODE_ENV !== 'production') { + assert(typeof behavior === 'function', "scrollBehavior must be a function") + } // wait until re-render finishes before scrolling router.app.$nextTick(function () { @@ -25048,7 +25227,12 @@ function replaceState (url) { var HashHistory = (function (History) { function HashHistory (router, base, fallback) { + var this$1 = this; + History.call(this, router, base) + window.addEventListener('hashchange', function () { + this$1.onHashChange() + }) // check history fallback deeplinking if (fallback && this.checkFallback()) { @@ -25219,7 +25403,7 @@ var VueRouter = function VueRouter (options) { this.history = new AbstractHistory(this) break default: - assert(false, ("invalid mode: " + mode)) + process.env.NODE_ENV !== 'production' && assert(false, ("invalid mode: " + mode)) } }; @@ -25232,7 +25416,7 @@ prototypeAccessors.currentRoute.get = function () { VueRouter.prototype.init = function init (app /* Vue component instance */) { var this$1 = this; - assert( + process.env.NODE_ENV !== 'production' && assert( install.installed, "not installed. Make sure to call `Vue.use(VueRouter)` " + "before creating root instance." @@ -25245,11 +25429,7 @@ VueRouter.prototype.init = function init (app /* Vue component instance */) { if (history instanceof HTML5History) { history.transitionTo(getLocation(history.base)) } else if (history instanceof HashHistory) { - history.transitionTo(getHash(), function () { - window.addEventListener('hashchange', function () { - history.onHashChange() - }) - }) + history.transitionTo(getHash()) } history.listen(function (route) { @@ -25285,28 +25465,52 @@ VueRouter.prototype.forward = function forward () { this.go(1) }; -VueRouter.prototype.getMatchedComponents = function getMatchedComponents () { - if (!this.currentRoute) { +VueRouter.prototype.getMatchedComponents = function getMatchedComponents (to) { + var route = to + ? this.resolve(to).resolved + : this.currentRoute + if (!route) { return [] } - return [].concat.apply([], this.currentRoute.matched.map(function (m) { + return [].concat.apply([], route.matched.map(function (m) { return Object.keys(m.components).map(function (key) { return m.components[key] }) })) }; +VueRouter.prototype.resolve = function resolve ( + to, + current, + append +) { + var normalizedTo = normalizeLocation(to, current || this.history.current, append) + var resolved = this.match(normalizedTo, current) + var fullPath = resolved.redirectedFrom || resolved.fullPath + var base = this.history.base + var href = createHref(base, fullPath, this.mode) + return { + normalizedTo: normalizedTo, + resolved: resolved, + href: href + } +}; + Object.defineProperties( VueRouter.prototype, prototypeAccessors ); +function createHref (base, fullPath, mode) { + var path = mode === 'hash' ? '/#' + fullPath : fullPath + return base ? cleanPath(base + path) : path +} + VueRouter.install = install if (inBrowser && window.Vue) { window.Vue.use(VueRouter) } -return VueRouter; - -}))); +module.exports = VueRouter; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) /***/ }, /* 217 */ @@ -25318,7 +25522,7 @@ return VueRouter; var content = __webpack_require__(163); if(typeof content === 'string') content = [[module.i, content, '']]; // add the styles to the DOM -var update = __webpack_require__(31)(content, {}); +var update = __webpack_require__(32)(content, {}); if(content.locals) module.exports = content.locals; // Hot Module Replacement if(false) { @@ -25344,7 +25548,7 @@ if(false) { var content = __webpack_require__(164); if(typeof content === 'string') content = [[module.i, content, '']]; // add the styles to the DOM -var update = __webpack_require__(31)(content, {}); +var update = __webpack_require__(32)(content, {}); if(content.locals) module.exports = content.locals; // Hot Module Replacement if(false) { @@ -25370,7 +25574,7 @@ if(false) { var content = __webpack_require__(165); if(typeof content === 'string') content = [[module.i, content, '']]; // add the styles to the DOM -var update = __webpack_require__(31)(content, {}); +var update = __webpack_require__(32)(content, {}); if(content.locals) module.exports = content.locals; // Hot Module Replacement if(false) { @@ -25396,7 +25600,7 @@ if(false) { var content = __webpack_require__(166); if(typeof content === 'string') content = [[module.i, content, '']]; // add the styles to the DOM -var update = __webpack_require__(31)(content, {}); +var update = __webpack_require__(32)(content, {}); if(content.locals) module.exports = content.locals; // Hot Module Replacement if(false) { @@ -25451,7 +25655,7 @@ module.exports = function(module) { "use strict"; 'use strict'; -var _vue = __webpack_require__(32); +var _vue = __webpack_require__(33); var _vue2 = _interopRequireDefault(_vue); diff --git a/extension/dist/lesspass.min.js b/extension/dist/lesspass.min.js index 50e9e33..8b25c73 100644 --- a/extension/dist/lesspass.min.js +++ b/extension/dist/lesspass.min.js @@ -1,15 +1,15 @@ -!function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,e,n){Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/dist/",e(e.s=223)}(function(t){for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))switch(typeof t[e]){case"function":break;case"object":t[e]=function(e){var n=e.slice(1),r=t[e[0]];return function(t,e,i){r.apply(this,[t,e,i].concat(n))}}(t[e]);break;default:t[e]=t[t[e]]}return t}([function(t,e,n){"use strict";(function(t,r){function i(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}function o(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,n){if(o()=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function m(e){return+e!=e&&(e=0),t.alloc(+e)}function g(e,n){if(t.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var i=!1;;)switch(n){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return W(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return G(e).length;default:if(i)return W(e).length;n=(""+n).toLowerCase(),i=!0}}function y(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,e>>>=0,n<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return M(this,e,n);case"utf8":case"utf-8":return T(this,e,n);case"ascii":return P(this,e,n);case"latin1":case"binary":return j(this,e,n);case"base64":return O(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function _(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function w(e,n,r,i,o){if(0===e.length)return-1;if("string"==typeof r?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof n&&(n=t.from(n,i)),t.isBuffer(n))return 0===n.length?-1:b(e,n,r,i,o);if("number"==typeof n)return n&=255,t.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,n,r):Uint8Array.prototype.lastIndexOf.call(e,n,r):b(e,[n],r,i,o);throw new TypeError("val must be string, number or Buffer")}function b(t,e,n,r,i){function o(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}var s=1,a=t.length,u=e.length;if(void 0!==r&&(r=String(r).toLowerCase(),"ucs2"===r||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,n/=2}var c;if(i){var f=-1;for(c=n;ca&&(n=a-u),c=n;c>=0;c--){for(var l=!0,h=0;hi&&(r=i)):r=i;var o=e.length;if(o%2!==0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s239?4:o>223?3:o>191?2:1;if(i+a<=n){var u,c,f,l;switch(a){case 1:o<128&&(s=o);break;case 2:u=t[i+1],128===(192&u)&&(l=(31&o)<<6|63&u,l>127&&(s=l));break;case 3:u=t[i+1],c=t[i+2],128===(192&u)&&128===(192&c)&&(l=(15&o)<<12|(63&u)<<6|63&c,l>2047&&(l<55296||l>57343)&&(s=l));break;case 4:u=t[i+1],c=t[i+2],f=t[i+3],128===(192&u)&&128===(192&c)&&128===(192&f)&&(l=(15&o)<<18|(63&u)<<12|(63&c)<<6|63&f,l>65535&&l<1114112&&(s=l))}}null===s?(s=65533,a=1):s>65535&&(s-=65536,r.push(s>>>10&1023|55296),s=56320|1023&s),r.push(s),i+=a}return R(r)}function R(t){var e=t.length;if(e<=tt)return String.fromCharCode.apply(String,t);for(var n="",r=0;rr)&&(n=r);for(var i="",o=e;on)throw new RangeError("Trying to access beyond buffer length")}function N(e,n,r,i,o,s){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(n>o||ne.length)throw new RangeError("Index out of range")}function B(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i>>8*(r?i:1-i)}function I(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i>>8*(r?i:3-i)&255}function U(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function $(t,e,n,r,i){return i||U(t,e,n,4,3.4028234663852886e38,-3.4028234663852886e38),X.write(t,e,n,r,23,4),n+4}function q(t,e,n,r,i){return i||U(t,e,n,8,1.7976931348623157e308,-1.7976931348623157e308),X.write(t,e,n,r,52,8),n+8}function F(t){if(t=V(t).replace(et,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function V(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function H(t){return t<16?"0"+t.toString(16):t.toString(16)}function W(t,e){e=e||1/0;for(var n,r=t.length,i=null,o=[],s=0;s55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function z(t){for(var e=[],n=0;n>8,i=n%256,o.push(i),o.push(r);return o}function G(t){return Z.toByteArray(F(t))}function K(t,e,n,r){for(var i=0;i=e.length||i>=t.length);++i)e[i+n]=t[i];return i}function J(t){return t!==t}var Z=n(117),X=n(171),Q=n(73);e.Buffer=t,e.SlowBuffer=m,e.INSPECT_MAX_BYTES=50,t.TYPED_ARRAY_SUPPORT=void 0!==r.TYPED_ARRAY_SUPPORT?r.TYPED_ARRAY_SUPPORT:i(),e.kMaxLength=o(),t.poolSize=8192,t._augment=function(e){return e.__proto__=t.prototype,e},t.from=function(t,e,n){return a(null,t,e,n)},t.TYPED_ARRAY_SUPPORT&&(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&t[Symbol.species]===t&&Object.defineProperty(t,Symbol.species,{value:null,configurable:!0})),t.alloc=function(t,e,n){return c(null,t,e,n)},t.allocUnsafe=function(t){return f(null,t)},t.allocUnsafeSlow=function(t){return f(null,t)},t.isBuffer=function(t){return!(null==t||!t._isBuffer)},t.compare=function(e,n){if(!t.isBuffer(e)||!t.isBuffer(n))throw new TypeError("Arguments must be Buffers");if(e===n)return 0;for(var r=e.length,i=n.length,o=0,s=Math.min(r,i);o0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),""},t.prototype.compare=function(e,n,r,i,o){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===n&&(n=0),void 0===r&&(r=e?e.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),n<0||r>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&n>=r)return 0;if(i>=o)return-1;if(n>=r)return 1;if(n>>>=0,r>>>=0,i>>>=0,o>>>=0,this===e)return 0;for(var s=o-i,a=r-n,u=Math.min(s,a),c=this.slice(i,o),f=e.slice(n,r),l=0;li)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return E(this,t,e,n);case"utf8":case"utf-8":return x(this,t,e,n);case"ascii":return C(this,t,e,n);case"latin1":case"binary":return S(this,t,e,n);case"base64":return k(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var tt=4096;t.prototype.slice=function(e,n){var r=this.length;e=~~e,n=void 0===n?r:~~n,e<0?(e+=r,e<0&&(e=0)):e>r&&(e=r),n<0?(n+=r,n<0&&(n=0)):n>r&&(n=r),n0&&(i*=256);)r+=this[t+--e]*i;return r},t.prototype.readUInt8=function(t,e){return e||D(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||D(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||D(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||D(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},t.prototype.readUInt32BE=function(t,e){return e||D(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},t.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||D(t,e,this.length);for(var r=this[t],i=1,o=0;++o=i&&(r-=Math.pow(2,8*e)),r},t.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||D(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},t.prototype.readInt8=function(t,e){return e||D(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},t.prototype.readInt16LE=function(t,e){e||D(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},t.prototype.readInt16BE=function(t,e){e||D(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},t.prototype.readInt32LE=function(t,e){return e||D(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},t.prototype.readInt32BE=function(t,e){return e||D(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},t.prototype.readFloatLE=function(t,e){return e||D(t,4,this.length),X.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||D(t,4,this.length),X.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||D(t,8,this.length),X.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||D(t,8,this.length),X.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,n,r){if(t=+t,e|=0,n|=0,!r){var i=Math.pow(2,8*n)-1;N(this,t,e,n,i,0)}var o=1,s=0;for(this[e]=255&t;++s=0&&(s*=256);)this[e+o]=t/s&255;return e+n},t.prototype.writeUInt8=function(e,n,r){return e=+e,n|=0,r||N(this,e,n,1,255,0),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[n]=255&e,n+1},t.prototype.writeUInt16LE=function(e,n,r){return e=+e,n|=0,r||N(this,e,n,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8):B(this,e,n,!0),n+2},t.prototype.writeUInt16BE=function(e,n,r){return e=+e,n|=0,r||N(this,e,n,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>8,this[n+1]=255&e):B(this,e,n,!1),n+2},t.prototype.writeUInt32LE=function(e,n,r){return e=+e,n|=0,r||N(this,e,n,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[n+3]=e>>>24,this[n+2]=e>>>16,this[n+1]=e>>>8,this[n]=255&e):I(this,e,n,!0),n+4},t.prototype.writeUInt32BE=function(e,n,r){return e=+e,n|=0,r||N(this,e,n,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=255&e):I(this,e,n,!1),n+4},t.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);N(this,t,e,n,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o>0)-a&255;return e+n},t.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);N(this,t,e,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},t.prototype.writeInt8=function(e,n,r){return e=+e,n|=0,r||N(this,e,n,1,127,-128),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[n]=255&e,n+1},t.prototype.writeInt16LE=function(e,n,r){return e=+e,n|=0,r||N(this,e,n,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8):B(this,e,n,!0),n+2},t.prototype.writeInt16BE=function(e,n,r){return e=+e,n|=0,r||N(this,e,n,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>8,this[n+1]=255&e):B(this,e,n,!1),n+2},t.prototype.writeInt32LE=function(e,n,r){return e=+e,n|=0,r||N(this,e,n,4,2147483647,-2147483648),t.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8,this[n+2]=e>>>16,this[n+3]=e>>>24):I(this,e,n,!0),n+4},t.prototype.writeInt32BE=function(e,n,r){return e=+e,n|=0,r||N(this,e,n,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=255&e):I(this,e,n,!1),n+4},t.prototype.writeFloatLE=function(t,e,n){return $(this,t,e,!0,n)},t.prototype.writeFloatBE=function(t,e,n){return $(this,t,e,!1,n)},t.prototype.writeDoubleLE=function(t,e,n){return q(this,t,e,!0,n)},t.prototype.writeDoubleBE=function(t,e,n){return q(this,t,e,!1,n)},t.prototype.copy=function(e,n,r,i){if(r||(r=0),i||0===i||(i=this.length),n>=e.length&&(n=e.length),n||(n=0),i>0&&i=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-n=0;--o)e[o+n]=this[o+r];else if(s<1e3||!t.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,r=void 0===r?this.length:r>>>0,e||(e=0);var s;if("number"==typeof e)for(s=n;s1)for(var n=1;n=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function m(e){return+e!=e&&(e=0),t.alloc(+e)}function g(e,n){if(t.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var i=!1;;)switch(n){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return W(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return G(e).length;default:if(i)return W(e).length;n=(""+n).toLowerCase(),i=!0}}function y(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,e>>>=0,n<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return N(this,e,n);case"utf8":case"utf-8":return T(this,e,n);case"ascii":return P(this,e,n);case"latin1":case"binary":return j(this,e,n);case"base64":return O(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function w(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function _(e,n,r,i,o){if(0===e.length)return-1;if("string"==typeof r?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof n&&(n=t.from(n,i)),t.isBuffer(n))return 0===n.length?-1:b(e,n,r,i,o);if("number"==typeof n)return n&=255,t.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,n,r):Uint8Array.prototype.lastIndexOf.call(e,n,r):b(e,[n],r,i,o);throw new TypeError("val must be string, number or Buffer")}function b(t,e,n,r,i){function o(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}var s=1,a=t.length,u=e.length;if(void 0!==r&&(r=String(r).toLowerCase(),"ucs2"===r||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,n/=2}var c;if(i){var f=-1;for(c=n;ca&&(n=a-u),c=n;c>=0;c--){for(var l=!0,p=0;pi&&(r=i)):r=i;var o=e.length;if(o%2!==0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s239?4:o>223?3:o>191?2:1;if(i+a<=n){var u,c,f,l;switch(a){case 1:o<128&&(s=o);break;case 2:u=t[i+1],128===(192&u)&&(l=(31&o)<<6|63&u,l>127&&(s=l));break;case 3:u=t[i+1],c=t[i+2],128===(192&u)&&128===(192&c)&&(l=(15&o)<<12|(63&u)<<6|63&c,l>2047&&(l<55296||l>57343)&&(s=l));break;case 4:u=t[i+1],c=t[i+2],f=t[i+3],128===(192&u)&&128===(192&c)&&128===(192&f)&&(l=(15&o)<<18|(63&u)<<12|(63&c)<<6|63&f,l>65535&&l<1114112&&(s=l))}}null===s?(s=65533,a=1):s>65535&&(s-=65536,r.push(s>>>10&1023|55296),s=56320|1023&s),r.push(s),i+=a}return R(r)}function R(t){var e=t.length;if(e<=tt)return String.fromCharCode.apply(String,t);for(var n="",r=0;rr)&&(n=r);for(var i="",o=e;on)throw new RangeError("Trying to access beyond buffer length")}function L(e,n,r,i,o,s){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(n>o||ne.length)throw new RangeError("Index out of range")}function B(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i>>8*(r?i:1-i)}function I(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i>>8*(r?i:3-i)&255}function $(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function U(t,e,n,r,i){return i||$(t,e,n,4,3.4028234663852886e38,-3.4028234663852886e38),X.write(t,e,n,r,23,4),n+4}function q(t,e,n,r,i){return i||$(t,e,n,8,1.7976931348623157e308,-1.7976931348623157e308),X.write(t,e,n,r,52,8),n+8}function F(t){if(t=V(t).replace(et,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function V(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function H(t){return t<16?"0"+t.toString(16):t.toString(16)}function W(t,e){e=e||1/0;for(var n,r=t.length,i=null,o=[],s=0;s55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function z(t){for(var e=[],n=0;n>8,i=n%256,o.push(i),o.push(r);return o}function G(t){return Z.toByteArray(F(t))}function K(t,e,n,r){for(var i=0;i=e.length||i>=t.length);++i)e[i+n]=t[i];return i}function J(t){return t!==t}var Z=n(117),X=n(171),Q=n(73);e.Buffer=t,e.SlowBuffer=m,e.INSPECT_MAX_BYTES=50,t.TYPED_ARRAY_SUPPORT=void 0!==r.TYPED_ARRAY_SUPPORT?r.TYPED_ARRAY_SUPPORT:i(),e.kMaxLength=o(),t.poolSize=8192,t._augment=function(e){return e.__proto__=t.prototype,e},t.from=function(t,e,n){return a(null,t,e,n)},t.TYPED_ARRAY_SUPPORT&&(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&t[Symbol.species]===t&&Object.defineProperty(t,Symbol.species,{value:null,configurable:!0})),t.alloc=function(t,e,n){return c(null,t,e,n)},t.allocUnsafe=function(t){return f(null,t)},t.allocUnsafeSlow=function(t){return f(null,t)},t.isBuffer=function(t){return!(null==t||!t._isBuffer)},t.compare=function(e,n){if(!t.isBuffer(e)||!t.isBuffer(n))throw new TypeError("Arguments must be Buffers");if(e===n)return 0;for(var r=e.length,i=n.length,o=0,s=Math.min(r,i);o0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),""},t.prototype.compare=function(e,n,r,i,o){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===n&&(n=0),void 0===r&&(r=e?e.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),n<0||r>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&n>=r)return 0;if(i>=o)return-1;if(n>=r)return 1;if(n>>>=0,r>>>=0,i>>>=0,o>>>=0,this===e)return 0;for(var s=o-i,a=r-n,u=Math.min(s,a),c=this.slice(i,o),f=e.slice(n,r),l=0;li)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return E(this,t,e,n);case"utf8":case"utf-8":return x(this,t,e,n);case"ascii":return S(this,t,e,n);case"latin1":case"binary":return k(this,t,e,n);case"base64":return C(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var tt=4096;t.prototype.slice=function(e,n){var r=this.length;e=~~e,n=void 0===n?r:~~n,e<0?(e+=r,e<0&&(e=0)):e>r&&(e=r),n<0?(n+=r,n<0&&(n=0)):n>r&&(n=r),n0&&(i*=256);)r+=this[t+--e]*i;return r},t.prototype.readUInt8=function(t,e){return e||D(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||D(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||D(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||D(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},t.prototype.readUInt32BE=function(t,e){return e||D(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},t.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||D(t,e,this.length);for(var r=this[t],i=1,o=0;++o=i&&(r-=Math.pow(2,8*e)),r},t.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||D(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},t.prototype.readInt8=function(t,e){return e||D(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},t.prototype.readInt16LE=function(t,e){e||D(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},t.prototype.readInt16BE=function(t,e){e||D(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},t.prototype.readInt32LE=function(t,e){return e||D(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},t.prototype.readInt32BE=function(t,e){return e||D(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},t.prototype.readFloatLE=function(t,e){return e||D(t,4,this.length),X.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||D(t,4,this.length),X.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||D(t,8,this.length),X.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||D(t,8,this.length),X.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,n,r){if(t=+t,e|=0,n|=0,!r){var i=Math.pow(2,8*n)-1;L(this,t,e,n,i,0)}var o=1,s=0;for(this[e]=255&t;++s=0&&(s*=256);)this[e+o]=t/s&255;return e+n},t.prototype.writeUInt8=function(e,n,r){return e=+e,n|=0,r||L(this,e,n,1,255,0),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[n]=255&e,n+1},t.prototype.writeUInt16LE=function(e,n,r){return e=+e,n|=0,r||L(this,e,n,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8):B(this,e,n,!0),n+2},t.prototype.writeUInt16BE=function(e,n,r){return e=+e,n|=0,r||L(this,e,n,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>8,this[n+1]=255&e):B(this,e,n,!1),n+2},t.prototype.writeUInt32LE=function(e,n,r){return e=+e,n|=0,r||L(this,e,n,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[n+3]=e>>>24,this[n+2]=e>>>16,this[n+1]=e>>>8,this[n]=255&e):I(this,e,n,!0),n+4},t.prototype.writeUInt32BE=function(e,n,r){return e=+e,n|=0,r||L(this,e,n,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=255&e):I(this,e,n,!1),n+4},t.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);L(this,t,e,n,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o>0)-a&255;return e+n},t.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);L(this,t,e,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},t.prototype.writeInt8=function(e,n,r){return e=+e,n|=0,r||L(this,e,n,1,127,-128),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[n]=255&e,n+1},t.prototype.writeInt16LE=function(e,n,r){return e=+e,n|=0,r||L(this,e,n,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8):B(this,e,n,!0),n+2},t.prototype.writeInt16BE=function(e,n,r){return e=+e,n|=0,r||L(this,e,n,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>8,this[n+1]=255&e):B(this,e,n,!1),n+2},t.prototype.writeInt32LE=function(e,n,r){return e=+e,n|=0,r||L(this,e,n,4,2147483647,-2147483648),t.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8,this[n+2]=e>>>16,this[n+3]=e>>>24):I(this,e,n,!0),n+4},t.prototype.writeInt32BE=function(e,n,r){return e=+e,n|=0,r||L(this,e,n,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=255&e):I(this,e,n,!1),n+4},t.prototype.writeFloatLE=function(t,e,n){return U(this,t,e,!0,n)},t.prototype.writeFloatBE=function(t,e,n){return U(this,t,e,!1,n)},t.prototype.writeDoubleLE=function(t,e,n){return q(this,t,e,!0,n)},t.prototype.writeDoubleBE=function(t,e,n){return q(this,t,e,!1,n)},t.prototype.copy=function(e,n,r,i){if(r||(r=0),i||0===i||(i=this.length),n>=e.length&&(n=e.length),n||(n=0),i>0&&i=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-n=0;--o)e[o+n]=this[o+r];else if(s<1e3||!t.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,r=void 0===r?this.length:r>>>0,e||(e=0);var s;if("number"==typeof e)for(s=n;s1)for(var n=1;n=2){var r=t.config._lifecycleHooks.indexOf("init")>-1;t.mixin(r?{init:e}:{beforeCreate:e})}else{var i=t.prototype._init;t.prototype._init=function(t){void 0===t&&(t={}),t.init=t.init?[e].concat(t.init):e,i.call(this,t)}}}function n(t){var e={};return s(t).forEach(function(t){var n=t.key,r=t.val;e[n]=function(){return"function"==typeof r?r.call(this,this.$store.state,this.$store.getters):this.$store.state[r]}}),e}function r(t){var e={};return s(t).forEach(function(t){var n=t.key,r=t.val;e[n]=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return this.$store.commit.apply(this.$store,[r].concat(t))}}),e}function i(t){var e={};return s(t).forEach(function(t){var n=t.key,r=t.val;e[n]=function(){return r in this.$store.getters||console.error("[vuex] unknown getter: "+r),this.$store.getters[r]}}),e}function o(t){var e={};return s(t).forEach(function(t){var n=t.key,r=t.val;e[n]=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return this.$store.dispatch.apply(this.$store,[r].concat(t))}}),e}function s(t){return Array.isArray(t)?t.map(function(t){return{key:t,val:t}}):Object.keys(t).map(function(e){return{key:e,val:t[e]}})}function a(t){return null!==t&&"object"==typeof t}function u(t){return t&&"function"==typeof t.then}function c(t,e){if(!t)throw new Error("[vuex] "+e)}function f(t,e){if(e.actions&&(t.actions=e.actions),e.mutations&&(t.mutations=e.mutations),e.getters&&(t.getters=e.getters),e.modules)for(var n in e.modules){if(!t.modules||!t.modules[n])return void console.warn("[vuex] trying to add a new module '"+n+"' on hot reloading, manual reload is needed");f(t.modules[n],e.modules[n])}}function l(t){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null);var e=t.state;p(t,e,[],t._options,!0),Object.keys(t._runtimeModules).forEach(function(n){p(t,e,n.split("."),t._runtimeModules[n],!0)}),h(t,e)}function h(t,e){var n=t._vm;t.getters={};var r=t._wrappedGetters,i={};Object.keys(r).forEach(function(e){var n=r[e];i[e]=function(){return n(t)},Object.defineProperty(t.getters,e,{get:function(){return t._vm[e]}})});var o=w.config.silent;w.config.silent=!0,t._vm=new w({data:{state:e},computed:i}),w.config.silent=o,t.strict&&g(t),n&&(t._withCommit(function(){n.state=null}),w.nextTick(function(){return n.$destroy()}))}function p(t,e,n,r,i){var o=!n.length,s=r.state,a=r.actions,u=r.mutations,c=r.getters,f=r.modules;if(!o&&!i){var l=y(e,n.slice(0,-1)),h=n[n.length-1];t._withCommit(function(){w.set(l,h,s||{})})}u&&Object.keys(u).forEach(function(e){d(t,e,u[e],n)}),a&&Object.keys(a).forEach(function(e){v(t,e,a[e],n)}),c&&m(t,c,n),f&&Object.keys(f).forEach(function(r){p(t,e,n.concat(r),f[r],i)})}function d(t,e,n,r){void 0===r&&(r=[]);var i=t._mutations[e]||(t._mutations[e]=[]);i.push(function(e){n(y(t.state,r),e)})}function v(t,e,n,r){void 0===r&&(r=[]);var i=t._actions[e]||(t._actions[e]=[]),o=t.dispatch,s=t.commit;i.push(function(e,i){var a=n({dispatch:o,commit:s,getters:t.getters,state:y(t.state,r),rootState:t.state},e,i);return u(a)||(a=Promise.resolve(a)),t._devtoolHook?a.catch(function(e){throw t._devtoolHook.emit("vuex:error",e),e}):a})}function m(t,e,n){Object.keys(e).forEach(function(r){var i=e[r];return t._wrappedGetters[r]?void console.error("[vuex] duplicate getter key: "+r):void(t._wrappedGetters[r]=function(t){return i(y(t.state,n),t.getters,t.state)})})}function g(t){t._vm.$watch("state",function(){c(t._committing,"Do not mutate vuex store state outside mutation handlers.")},{deep:!0,sync:!0})}function y(t,e){return e.length?e.reduce(function(t,e){return t[e]},t):t}function _(t){return w?void console.error("[vuex] already installed. Vue.use(Vuex) should be called only once."):(w=t,void e(w))}var w,b="undefined"!=typeof window&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__,E=function(e){var n=this;void 0===e&&(e={}),c(w,"must call Vue.use(Vuex) before creating a store instance."),c("undefined"!=typeof Promise,"vuex requires a Promise polyfill in this browser.");var r=e.state;void 0===r&&(r={});var i=e.plugins;void 0===i&&(i=[]);var o=e.strict;void 0===o&&(o=!1),this._options=e,this._committing=!1,this._actions=Object.create(null),this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._runtimeModules=Object.create(null),this._subscribers=[],this._watcherVM=new w;var s=this,a=this,u=a.dispatch,f=a.commit;this.dispatch=function(t,e){return u.call(s,t,e)},this.commit=function(t,e,n){return f.call(s,t,e,n)},this.strict=o,p(this,r,[],e),h(this,r),i.concat(t).forEach(function(t){return t(n)})},x={state:{}};x.state.get=function(){return this._vm.state},x.state.set=function(t){c(!1,"Use store.replaceState() to explicit replace store state.")},E.prototype.commit=function(t,e,n){var r=this;a(t)&&t.type&&(n=e,e=t,t=t.type);var i={type:t,payload:e},o=this._mutations[t];return o?(this._withCommit(function(){o.forEach(function(t){t(e)})}),void(n&&n.silent||this._subscribers.forEach(function(t){return t(i,r.state)}))):void console.error("[vuex] unknown mutation type: "+t)},E.prototype.dispatch=function(t,e){a(t)&&t.type&&(e=t,t=t.type);var n=this._actions[t];return n?n.length>1?Promise.all(n.map(function(t){return t(e)})):n[0](e):void console.error("[vuex] unknown action type: "+t)},E.prototype.subscribe=function(t){var e=this._subscribers;return e.indexOf(t)<0&&e.push(t),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}},E.prototype.watch=function(t,e,n){var r=this;return c("function"==typeof t,"store.watch only accepts a function."),this._watcherVM.$watch(function(){return t(r.state)},e,n)},E.prototype.replaceState=function(t){var e=this;this._withCommit(function(){e._vm.state=t})},E.prototype.registerModule=function(t,e){"string"==typeof t&&(t=[t]),c(Array.isArray(t),"module path must be a string or an Array."),this._runtimeModules[t.join(".")]=e,p(this,this.state,t,e),h(this,this.state)},E.prototype.unregisterModule=function(t){var e=this;"string"==typeof t&&(t=[t]),c(Array.isArray(t),"module path must be a string or an Array."),delete this._runtimeModules[t.join(".")],this._withCommit(function(){var n=y(e.state,t.slice(0,-1));w.delete(n,t[t.length-1])}),l(this)},E.prototype.hotUpdate=function(t){f(this._options,t),l(this)},E.prototype._withCommit=function(t){var e=this._committing;this._committing=!0,t(),this._committing=e},Object.defineProperties(E.prototype,x),"undefined"!=typeof window&&window.Vue&&_(window.Vue);var C={Store:E,install:_,mapState:n,mapMutations:r,mapGetters:i,mapActions:o};return C})},function(t,e,n){"use strict";function r(t){return this instanceof r?(c.call(this,t),f.call(this,t),t&&t.readable===!1&&(this.readable=!1),t&&t.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,t&&t.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",i)):new r(t)}function i(){this.allowHalfOpen||this._writableState.ended||a(o,this)}function o(t){t.end()}var s=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};t.exports=r;var a=n(45),u=n(19);u.inherits=n(1);var c=n(76),f=n(47);u.inherits(r,c);for(var l=s(f.prototype),h=0;h=8*this._finalSize&&(this._update(this._block),this._block.fill(0)),this._block.writeInt32BE(e,this._blockSize-4);var n=this._update(this._block)||this._hash();return t?n.toString(t):n},n.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=n}).call(e,n(0).Buffer)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.TOKEN_KEY=e.LOCAL_STORAGE_KEY=void 0;var i=n(116),o=r(i),s=n(115),a=r(s),u=n(33),c=r(u),f=n(15),l=r(f),h=n(16),p=r(h),d=n(112),v=r(d),m=e.LOCAL_STORAGE_KEY="lesspass",g=e.TOKEN_KEY="jwt",y=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.localStorage;(0,l.default)(this,t),this.storage=e}return(0,p.default)(t,[{key:"_getLocalStorage",value:function(){return JSON.parse(this.storage.getItem(m)||"{}")}},{key:"json",value:function(){var t={baseURL:"https://lesspass.com",timeout:5e3},e=this._getLocalStorage();return(0,c.default)(t,e)}},{key:"save",value:function(t){var e=(0,c.default)(this._getLocalStorage(),t);this.storage.setItem(m,(0,a.default)(e))}},{key:"clear",value:function(){this.storage.clear()}},{key:"getToken",value:function(){var t=this.json();return g in t?new v.default(t[g]):new v.default}},{key:"saveToken",value:function(t){this.save((0,o.default)({},g,t))}}]),t}();e.default=y},function(t,e){"use strict";e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var i=n(57),o=r(i);e.default=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};return l.default.post("/api/tokens/auth/",t,e).then(function(t){return t.data.token})}},{key:"_requestNewToken",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l.default.post("/api/tokens/refresh/",t,e).then(function(t){return t.data.token})}}]),t}();e.default=h},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var r=n(35);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){var r=n(4),i=n(6),o=n(24),s=n(12),a="prototype",u=function(t,e,n){var c,f,l,h=t&u.F,p=t&u.G,d=t&u.S,v=t&u.P,m=t&u.B,g=t&u.W,y=p?i:i[e]||(i[e]={}),_=y[a],w=p?r:d?r[e]:(r[e]||{})[a];p&&(n=e);for(c in n)f=!h&&w&&void 0!==w[c],f&&c in y||(l=f?w[c]:n[c],y[c]=p&&"function"!=typeof w[c]?n[c]:m&&f?o(l,r):g&&w[c]==l?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e[a]=t[a],e}(l):v&&"function"==typeof l?o(Function.call,l):l,v&&((y.virtual||(y.virtual={}))[c]=l,t&u.R&&_&&!_[c]&&s(_,c,l)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e0&&this._events[t].length>i&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(t,e){function n(){this.removeListener(t,n),i||(i=!0,e.apply(this,arguments))}if(!r(e))throw TypeError("listener must be a function");var i=!1;return n.listener=e,this.on(t,n),this},n.prototype.removeListener=function(t,e){var n,i,s,a;if(!r(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(n=this._events[t],s=n.length,i=-1,n===e||r(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(o(n)){for(a=s;a-- >0;)if(n[a]===e||n[a].listener&&n[a].listener===e){i=a;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},n.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[t],r(n))this.removeListener(t,n);else if(n)for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},n.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?r(this._events[t])?[this._events[t]]:this._events[t].slice():[]},n.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(r(e))return 1;if(e)return e.length}return 0},n.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,n){(function(t,r){function i(t,e){this._id=t,this._clearFn=e}var o=n(5).nextTick,s=Function.prototype.apply,a=Array.prototype.slice,u={},c=0;e.setTimeout=function(){return new i(s.call(setTimeout,window,arguments),clearTimeout)},e.setInterval=function(){return new i(s.call(setInterval,window,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(window,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},e.setImmediate="function"==typeof t?t:function(t){var n=c++,r=!(arguments.length<2)&&a.call(arguments,1);return u[n]=!0,o(function(){u[n]&&(r?t.apply(null,r):t.call(null),e.clearImmediate(n))}),n},e.clearImmediate="function"==typeof r?r:function(t){delete u[t]}}).call(e,n(30).setImmediate,n(30).clearImmediate)},function(t,e){function n(t,e){for(var n=0;n=0&&m.splice(e,1)}function s(t){var e=document.createElement("style");return e.type="text/css",i(t,e),e}function a(t,e){var n,r,i;if(e.singleton){var a=v++;n=d||(d=s(e)),r=u.bind(null,n,a,!1),i=u.bind(null,n,a,!0)}else n=s(e),r=c.bind(null,n),i=function(){o(n)};return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else i()}}function u(t,e,n,r){var i=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=g(e,i);else{var o=document.createTextNode(i),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(o,s[e]):t.appendChild(o)}}function c(t,e){var n=e.css,r=e.media,i=e.sourceMap;if(r&&t.setAttribute("media",r),i&&(n+="\n/*# sourceURL="+i.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}var f={},l=function(t){var e;return function(){return"undefined"==typeof e&&(e=t.apply(this,arguments)),e}},h=l(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),p=l(function(){return document.head||document.getElementsByTagName("head")[0]}),d=null,v=0,m=[];t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");e=e||{},"undefined"==typeof e.singleton&&(e.singleton=h()),"undefined"==typeof e.insertAt&&(e.insertAt="bottom");var i=r(t);return n(i,e),function(t){for(var o=[],s=0;s-1)return t.splice(n,1)}}function s(t,e){return fn.call(t,e)}function a(t){return"string"==typeof t||"number"==typeof t}function u(t){var e=Object.create(null);return function(n){var r=e[n];return r||(e[n]=t(n))}}function c(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n}function f(t,e){e=e||0;for(var n=t.length-e,r=new Array(n);n--;)r[n]=t[n+e];return r}function l(t,e){for(var n in e)t[n]=e[n];return t}function h(t){return null!==t&&"object"==typeof t}function p(t){return mn.call(t)===gn}function d(t){for(var e={},n=0;n_n._maxUpdateCount)){sr("You may have an infinite update loop "+(t.user?'in watcher with expression "'+t.expression+'"':"in a component render function."),t.vm);break}}Tn&&_n.devtools&&Tn.emit("flush"),S()}function A(t){var e=t.id;if(null==Un[e]){if(Un[e]=!0,Fn){for(var n=In.length-1;n>=0&&In[n].id>t.id;)n--;In.splice(Math.max(n,Vn)+1,0,t)}else In.push(t);qn||(qn=!0,Rn(k))}}function O(t){zn.clear(),T(t,zn)}function T(t,e){var n,r,i=Array.isArray(t);if((i||h(t))&&Object.isExtensible(t)){if(t.__ob__){var o=t.__ob__.dep.id;if(e.has(o))return;e.add(o)}if(i)for(n=t.length;n--;)T(t[n],e);else for(r=Object.keys(t),n=r.length;n--;)T(t[r[n]],e)}}function R(t,e){t.__proto__=e}function P(t,e,n){for(var r=0,i=n.length;r1?f(n):n;for(var r=f(arguments,1),i=0,o=n.length;i-1?kr[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:kr[t]=/HTMLUnknownElement/.test(e.toString())}function ee(t){if("string"==typeof t){var n=t;if(t=document.querySelector(t),!t)return"production"!==e.env.NODE_ENV&&sr("Cannot find element: "+n),document.createElement("div")}return t}function ne(t,e){var n=document.createElement(t);return"select"!==t?n:(e.data&&e.data.attrs&&"multiple"in e.data.attrs&&n.setAttribute("multiple","multiple"),n)}function re(t,e){return document.createElementNS(Er[t],e)}function ie(t){return document.createTextNode(t)}function oe(t){return document.createComment(t)}function se(t,e,n){t.insertBefore(e,n)}function ae(t,e){t.removeChild(e)}function ue(t,e){t.appendChild(e)}function ce(t){return t.parentNode}function fe(t){return t.nextSibling}function le(t){return t.tagName}function he(t,e){t.textContent=e}function pe(t){return t.childNodes}function de(t,e,n){t.setAttribute(e,n)}function ve(t,e){var n=t.data.ref;if(n){var r=t.context,i=t.child||t.elm,s=r.$refs;e?Array.isArray(s[n])?o(s[n],i):s[n]===i&&(s[n]=void 0):t.data.refInFor?Array.isArray(s[n])?s[n].push(i):s[n]=[i]:s[n]=i}}function me(t){return null==t}function ge(t){return null!=t}function ye(t,e){return t.key===e.key&&t.tag===e.tag&&t.isComment===e.isComment&&!t.data==!e.data}function _e(t,e,n){var r,i,o={};for(r=e;r<=n;++r)i=t[r].key,ge(i)&&(o[i]=r);return o}function we(t){function r(t){return new Qn(k.tagName(t).toLowerCase(),{},[],void 0,t)}function i(t,e){function n(){0===--n.listeners&&o(t)}return n.listeners=e,n}function o(t){var e=k.parentNode(t);e&&k.removeChild(e,t)}function s(t,n,r){var i,o=t.data;if(t.isRootInsert=!r,ge(o)&&(ge(i=o.hook)&&ge(i=i.init)&&i(t),ge(i=t.child)))return l(t,n),t.elm;var s=t.children,a=t.tag;return ge(a)?("production"!==e.env.NODE_ENV&&(t.ns||_n.ignoredElements&&_n.ignoredElements.indexOf(a)>-1||!_n.isUnknownElement(a)||sr("Unknown custom element: <"+a+'> - did you register the component correctly? For recursive components, make sure to provide the "name" option.',t.context)),t.elm=t.ns?k.createElementNS(t.ns,a):k.createElement(a,t),h(t),u(t,s,n),ge(o)&&f(t,n)):t.isComment?t.elm=k.createComment(t.text):t.elm=k.createTextNode(t.text),t.elm}function u(t,e,n){if(Array.isArray(e))for(var r=0;rd?(f=me(r[_+1])?null:r[_+1].elm,p(t,f,r,h,_,i)):h>_&&v(t,n,l,d)}function y(t,e,n,r){if(t!==e){if(e.isStatic&&t.isStatic&&e.key===t.key&&(e.isCloned||e.isOnce))return void(e.elm=t.elm);var i,o=e.data,s=ge(o);s&&ge(i=o.hook)&&ge(i=i.prepatch)&&i(t,e);var a=e.elm=t.elm,u=t.children,f=e.children;if(s&&c(e)){for(i=0;i, or missing . Bailing hydration and performing full client-side render.")}t=r(t)}if(a=t.elm,u=k.parentNode(a),s(n,l),n.parent&&(n.parent.elm=n.elm,c(n)))for(var p=0;p-1?e.split(/\s+/).forEach(function(e){return t.classList.add(e)}):t.classList.add(e);else{var n=" "+t.getAttribute("class")+" ";n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function De(t,e){if(e&&e.trim())if(t.classList)e.indexOf(" ")>-1?e.split(/\s+/).forEach(function(e){return t.classList.remove(e)}):t.classList.remove(e);else{for(var n=" "+t.getAttribute("class")+" ",r=" "+e+" ";n.indexOf(r)>=0;)n=n.replace(r," ");t.setAttribute("class",n.trim())}}function Ne(t){Zr(function(){Zr(t)})}function Be(t,e){(t._transitionClasses||(t._transitionClasses=[])).push(e),Le(t,e)}function Ie(t,e){t._transitionClasses&&o(t._transitionClasses,e),De(t,e)}function Ue(t,e,n){var r=$e(t,e),i=r.type,o=r.timeout,s=r.propCount;if(!i)return n();var a=i===Wr?Gr:Jr,u=0,c=function(){t.removeEventListener(a,f),n()},f=function(e){e.target===t&&++u>=s&&c()};setTimeout(function(){u0&&(n=Wr,f=s,l=o.length):e===zr?c>0&&(n=zr,f=c,l=u.length):(f=Math.max(s,c),n=f>0?s>c?Wr:zr:null,l=n?n===Wr?o.length:u.length:0);var h=n===Wr&&Xr.test(r[Yr+"Property"]);return{type:n,timeout:f,propCount:l,hasTransform:h}}function qe(t,e){for(;t.length1,O=e._enterCb=ze(function(){k&&Ie(e,b),O.cancelled?(k&&Ie(e,w),S&&S(e)):C&&C(e),e._enterCb=null});t.data.show||K(t.data.hook||(t.data.hook={}),"insert",function(){var n=e.parentNode,r=n&&n._pending&&n._pending[t.key];r&&r.tag===t.tag&&r.elm._leaveCb&&r.elm._leaveCb(),x&&x(e,O)},"transition-insert"),E&&E(e),k&&(Be(e,w),Be(e,b),Ne(function(){Ie(e,w),O.cancelled||A||Ue(e,i,O)})),t.data.show&&x&&x(e,O),k||A||O()}}}function He(t,e){function n(){m.cancelled||(t.data.show||((r.parentNode._pending||(r.parentNode._pending={}))[t.key]=t),c&&c(r),d&&(Be(r,a),Be(r,u),Ne(function(){Ie(r,a),m.cancelled||v||Ue(r,s,m)})),f&&f(r,m),d||v||m())}var r=t.elm;r._enterCb&&(r._enterCb.cancelled=!0,r._enterCb());var i=We(t.data.transition);if(!i)return e();if(!r._leaveCb&&1===r.nodeType){var o=i.css,s=i.type,a=i.leaveClass,u=i.leaveActiveClass,c=i.beforeLeave,f=i.leave,l=i.afterLeave,h=i.leaveCancelled,p=i.delayLeave,d=o!==!1&&!Sn,v=f&&(f._length||f.length)>1,m=r._leaveCb=ze(function(){r.parentNode&&r.parentNode._pending&&(r.parentNode._pending[t.key]=null),d&&Ie(r,u),m.cancelled?(d&&Ie(r,a),h&&h(r)):(e(),l&&l(r)),r._leaveCb=null});p?p(n):n()}}function We(t){if(t){if("object"==typeof t){var e={};return t.css!==!1&&l(e,Qr(t.name||"v")),l(e,t),e}return"string"==typeof t?Qr(t):void 0}}function ze(t){var e=!1;return function(){e||(e=!0,t())}}function Ye(t,n,r){var i=n.value,o=t.multiple;if(o&&!Array.isArray(i))return void("production"!==e.env.NODE_ENV&&sr(' expects an Array value for its binding, but got '+Object.prototype.toString.call(i).slice(8,-1),r));for(var s,a,u=0,c=t.options.length;u-1,a.selected!==s&&(a.selected=s);else if(y(Ze(a),i))return void(t.selectedIndex!==u&&(t.selectedIndex=u));o||(t.selectedIndex=-1)}function Je(t,e){for(var n=0,r=e.length;n0,On=kn&&kn.indexOf("edge/")>0,Tn=kn&&kn.indexOf("android")>0,Rn=kn&&/iphone|ipad|ipod|ios/.test(kn),Pn=function(){return void 0===fn&&(fn=!Sn&&"undefined"!=typeof e&&"server"===e.process.env.VUE_ENV),fn},jn=Sn&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__,Nn=function(){function t(){r=!1;var t=n.slice(0);n.length=0;for(var e=0;e":"anonymous component")+(t._isVue&&t.$options.__file?" at "+t.$options.__file:"")};var In=function(t){return"anonymous component"===t&&(t+=' - use the "name" option for better debugging messages.'),"\n(found in "+t+")"}}var $n=0,Un=function(){this.id=$n++,this.subs=[]};Un.prototype.addSub=function(t){this.subs.push(t)},Un.prototype.removeSub=function(t){s(this.subs,t)},Un.prototype.depend=function(){Un.target&&Un.target.addDep(this)},Un.prototype.notify=function(){for(var t=this.subs.slice(),e=0,n=t.length;e,height,hidden,high,href,hreflang,http-equiv,icon,id,ismap,itemprop,keytype,kind,label,lang,language,list,loop,low,manifest,max,maxlength,media,method,GET,POST,min,multiple,email,file,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,seamless,selected,shape,size,type,text,password,sizes,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,type,usemap,value,width,wrap"),"http://www.w3.org/1999/xlink"),Ar=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},Or=function(t){return Ar(t)?t.slice(6,t.length):""},Tr=function(t){return null==t||t===!1},Rr={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML",xhtml:"http://www.w3.org/1999/xhtml"},Pr=o("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template"),jr=(o("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr",!0),o("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source",!0),o("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track",!0),o("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font,font-face,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0)),Nr=function(t){return Pr(t)||jr(t)},Mr=Object.create(null),Dr=Object.freeze({createElement:ie,createElementNS:oe,createTextNode:se,createComment:ae,insertBefore:ue,removeChild:ce,appendChild:fe,parentNode:le,nextSibling:pe,tagName:he,setTextContent:de,childNodes:ve,setAttribute:me}),Lr={create:function(t,e){ge(e)},update:function(t,e){t.data.ref!==e.data.ref&&(ge(t,!0),ge(e))},destroy:function(t){ge(t,!0)}},Br=new hr("",{},[]),Ir=["create","update","remove","destroy"],$r={create:xe,update:xe,destroy:function(t){xe(t,Br)}},Ur=Object.create(null),qr=[Lr,$r],Fr={create:Ae,update:Ae},Vr={create:Te,update:Te},Hr={create:Re,update:Re},Wr={create:Pe,update:Pe},zr=c(function(t){var e={},n=t.indexOf("background")>=0,r=n?/;(?![^(]*\))/g:";",i=n?/:(.+)/:":";return t.split(r).forEach(function(t){if(t){var n=t.split(i);n.length>1&&(e[n[0].trim()]=n[1].trim())}}),e}),Yr=/^--/,Gr=function(t,e,n){Yr.test(e)?t.style.setProperty(e,n):t.style[Jr(e)]=n},Kr=["Webkit","Moz","ms"],Jr=c(function(t){if(Er=Er||document.createElement("div"),t=vn(t),"filter"!==t&&t in Er.style)return t;for(var e=t.charAt(0).toUpperCase()+t.slice(1),n=0;n. If you are working with contenteditable, it's recommended to wrap a library dedicated for that purpose inside a custom component.",r.context)),"select"===r.tag){var i=function(){Ke(t,e,r.context)};i(),(Cn||On)&&setTimeout(i,0)}else"textarea"!==r.tag&&"text"!==t.type||e.modifiers.lazy||(Tn||(t.addEventListener("compositionstart",Xe),t.addEventListener("compositionend",Qe)),An&&(t.vmodel=!0))},componentUpdated:function(t,e,n){if("select"===n.tag){Ke(t,e,n.context);var r=t.multiple?e.value.some(function(e){return Je(e,t.options)}):e.value!==e.oldValue&&Je(e.value,t.options);r&&tn(t,"change")}}},di={bind:function(t,e,n){var r=e.value;n=en(n);var i=n.data&&n.data.transition;r&&i&&!An&&We(n);var o="none"===t.style.display?"":t.style.display;t.style.display=r?o:"none",t.__vOriginalDisplay=o},update:function(t,e,n){var r=e.value,i=e.oldValue;if(r!==i){n=en(n);var o=n.data&&n.data.transition;o&&!An?r?(We(n),t.style.display=t.__vOriginalDisplay):ze(n,function(){t.style.display="none"}):t.style.display=r?t.__vOriginalDisplay:"none"}}},vi={model:hi,show:di},mi={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String},gi={name:"transition",props:mi,abstract:!0,render:function(t){var e=this,r=this.$slots.default;if(r&&(r=r.filter(function(t){return t.tag}),r.length)){"production"!==n.env.NODE_ENV&&r.length>1&&Ln(" can only be used on a single element. Use for lists.",this.$parent);var i=this.mode;"production"!==n.env.NODE_ENV&&i&&"in-out"!==i&&"out-in"!==i&&Ln("invalid mode: "+i,this.$parent);var o=r[0];if(sn(this.$vnode))return o;var s=nn(o);if(!s)return o;if(this._leaving)return on(t,o);var a=s.key=null==s.key||s.isStatic?"__v"+(s.tag+this._uid)+"__":s.key,u=(s.data||(s.data={})).transition=rn(this),c=this._vnode,f=nn(c);if(s.data.directives&&s.data.directives.some(function(t){return"show"===t.name})&&(s.data.show=!0),f&&f.data&&f.key!==a){var l=f.data.transition=p({},u);if("out-in"===i)return this._leaving=!0,ft(l,"afterLeave",function(){e._leaving=!1,e.$forceUpdate()},a),on(t,o);if("in-out"===i){var h,d=function(){h()};ft(u,"afterEnter",d,a),ft(u,"enterCancelled",d,a),ft(l,"delayLeave",function(t){h=t},a)}}return o}}},yi=p({tag:String,moveClass:String},mi);delete yi.mode;var wi={props:yi,render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",r=Object.create(null),i=this.prevChildren=this.children,o=this.$slots.default||[],s=this.children=[],a=rn(this),u=0;u children must be keyed: <"+l+">")}}if(i){for(var p=[],h=[],d=0;d=200&&t<300}};c.headers={common:{Accept:"application/json, text/plain, */*"}},o.forEach(["delete","get","head"],function(t){c.headers[t]={}}),o.forEach(["post","put","patch"],function(t){c.headers[t]=o.merge(u)}),t.exports=c}).call(e,n(5))},function(t,e,n){"use strict";(function(t){var r=n(0),i=r.Buffer,o=r.SlowBuffer,s=r.kMaxLength||2147483647;e.alloc=function(t,e,n){if("function"==typeof i.alloc)return i.alloc(t,e,n);if("number"==typeof n)throw new TypeError("encoding must not be number");if("number"!=typeof t)throw new TypeError("size must be a number");if(t>s)throw new RangeError("size is too large");var r=n,o=e;void 0===o&&(r=void 0,o=0);var a=new i(t);if("string"==typeof o)for(var u=new i(o,r),c=u.length,f=-1;++fs)throw new RangeError("size is too large");return new i(t)},e.from=function(e,n,r){if("function"==typeof i.from&&(!t.Uint8Array||Uint8Array.from!==i.from))return i.from(e,n,r);if("number"==typeof e)throw new TypeError('"value" argument must not be a number');if("string"==typeof e)return new i(e,n);if("undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer){var o=n;if(1===arguments.length)return new i(e);"undefined"==typeof o&&(o=0);var s=r;if("undefined"==typeof s&&(s=e.byteLength-o),o>=e.byteLength)throw new RangeError("'offset' is out of bounds");if(s>e.byteLength-o)throw new RangeError("'length' is out of bounds");return new i(e.slice(o,o+s))}if(i.isBuffer(e)){var a=new i(e.length);return e.copy(a,0,0,e.length),a}if(e){if(Array.isArray(e)||"undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return new i(e);if("Buffer"===e.type&&Array.isArray(e.data))return new i(e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")},e.allocUnsafeSlow=function(t){if("function"==typeof i.allocUnsafeSlow)return i.allocUnsafeSlow(t);if("number"!=typeof t)throw new TypeError("size must be a number");if(t>=s)throw new RangeError("size is too large");return new o(t)}}).call(e,n(14))},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(28),i=n(4).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var r=n(19).f,i=n(27),o=n(3)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},function(t,e,n){var r=n(67)("keys"),i=n(71);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(62),i=n(37);t.exports=function(t){return r(i(t))}},function(t,e,n){function r(t,e,n,r){var s=a({},u,r);if(1===s.version){var c={counter:s.counter,length:s.length,lowercase:s.lowercase,uppercase:s.uppercase,numbers:s.numbers,symbols:s.symbols};return i.encryptLogin(e,n).then(function(e){return i.renderPassword(e,t,c).then(function(t){return t})})}return o.generatePassword(t,e,n,s)}var i=n(175),o=n(176),s=n(45),a=n(178);t.exports={encryptLogin:i.encryptLogin,renderPassword:i.renderPassword,createFingerprint:i.createFingerprint,_deriveEncryptedLogin:i._deriveEncryptedLogin,_getPasswordTemplate:i._getPasswordTemplate,_prettyPrint:i._prettyPrint,_string2charCodes:i._string2charCodes,_getCharType:i._getCharType,_getPasswordChar:i._getPasswordChar,_createHmac:i._createHmac,generatePassword:r,_calcEntropy:o._calcEntropy,_consumeEntropy:o._consumeEntropy,_getSetOfCharacters:o._getSetOfCharacters,_getConfiguredRules:o._getConfiguredRules,_insertStringPseudoRandomly:o._insertStringPseudoRandomly,_getOneCharPerRule:o._getOneCharPerRule,_renderPassword:o._renderPassword,pbkdf2:s};var u={version:2,lowercase:!0,numbers:!0,uppercase:!0,symbols:!0,keylen:32,digest:"sha256",length:16,index:1,iterations:1e5}},function(t,e,n){(function(e){function r(){return!("undefined"==typeof window||!window.crypto||!window.crypto.subtle)}function i(t,n,r,i,o){var s={sha1:"SHA-1","sha-1":"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha512:"SHA-512","sha-512":"SHA-512"};return window.crypto.subtle.importKey("raw",new e(t),"PBKDF2",!1,["deriveKey"]).then(function(t){var a={name:"PBKDF2",salt:new e(n),iterations:r,hash:s[o.toLowerCase()]};return window.crypto.subtle.deriveKey(a,t,{name:"AES-CTR",length:8*i},!0,["encrypt","decrypt"])}).then(function(t){return window.crypto.subtle.exportKey("raw",t).then(function(t){return new e(t).toString("hex")})})}function o(t,e,n,r,i){return new a(function(o,a){s.pbkdf2(t,e,n,r,i,function(t,e){t?a("error in pbkdf2"):o(e.toString("hex"))})})}var s=n(179),a=n(74);t.exports=r()?i:o}).call(e,n(0).Buffer)},function(t,e,n){"use strict";(function(e){function n(t,n,r,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var o,s,a=arguments.length;switch(a){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick(function(){t.call(null,n)});case 3:return e.nextTick(function(){t.call(null,n,r)});case 4:return e.nextTick(function(){t.call(null,n,r,i)});default:for(o=new Array(a-1),s=0;s-1?r:k;a.WritableState=s;var A=n(20);A.inherits=n(1);var O,T={deprecate:n(196)};!function(){try{O=n(21)}catch(t){}finally{O||(O=n(30).EventEmitter)}}();var R=n(0).Buffer,P=n(35);A.inherits(a,O),s.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){ +try{Object.defineProperty(s.prototype,"buffer",{get:T.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")})}catch(t){}}();var j;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(j=Function.prototype[Symbol.hasInstance],Object.defineProperty(a,Symbol.hasInstance,{value:function(t){return!!j.call(this,t)||t&&t._writableState instanceof s}})):j=function(t){return t instanceof this},a.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},a.prototype.write=function(t,e,n){var r=this._writableState,o=!1;return"function"==typeof e&&(n=e,e=null),R.isBuffer(t)?e="buffer":e||(e=r.defaultEncoding),"function"!=typeof n&&(n=i),r.ended?u(this,n):c(this,r,t,n)&&(r.pendingcb++,o=l(this,r,t,e,n)),o},a.prototype.cork=function(){var t=this._writableState;t.corked++},a.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||y(this,t))},a.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},a.prototype._write=function(t,e,n){n(new Error("_write() is not implemented"))},a.prototype._writev=null,a.prototype.end=function(t,e,n){var r=this._writableState;"function"==typeof t?(n=t,t=null,e=null):"function"==typeof e&&(n=e,e=null),null!==t&&void 0!==t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||E(this,r,n)}}).call(e,n(5),n(31).setImmediate)},function(t,e,n){function r(t){if(t&&!u(t))throw new Error("Unknown encoding: "+t)}function i(t){return t.toString(this.encoding)}function o(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function s(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}var a=n(0).Buffer,u=a.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},c=e.StringDecoder=function(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),r(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=o;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=s;break;default:return void(this.write=i)}this.charBuffer=new a(6),this.charReceived=0,this.charLength=0};c.prototype.write=function(t){for(var e="";this.charLength;){var n=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n,this.charReceived=55296&&r<=56319)){if(this.charReceived=this.charLength=0,0===t.length)return e;break}this.charLength+=this.surrogateSize,e=""}this.detectIncompleteChar(t);var i=t.length;this.charLength&&(t.copy(this.charBuffer,0,t.length-this.charReceived,i),i-=this.charReceived),e+=t.toString(this.encoding,0,i);var i=e.length-1,r=e.charCodeAt(i);if(r>=55296&&r<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),t.copy(this.charBuffer,0,0,o),e.substring(0,i)}return e},c.prototype.detectIncompleteChar=function(t){for(var e=t.length>=3?3:t.length;e>0;e--){var n=t[t.length-e];if(1==e&&n>>5==6){this.charLength=2;break}if(e<=2&&n>>4==14){this.charLength=3;break}if(e<=3&&n>>3==30){this.charLength=4;break}}this.charReceived=e},c.prototype.end=function(t){var e="";if(t&&t.length&&(e=this.write(t)),this.charReceived){var n=this.charReceived,r=this.charBuffer,i=this.encoding;e+=r.slice(0,n).toString(i)}return e}},function(t,e,n){t.exports=n(85)},function(t,e,n){"use strict";(function(e){var r=n(2),i=n(91),o=n(94),s=n(100),a=n(98),u=n(54),c="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||n(93);t.exports=function(t){return new Promise(function(f,l){var p=t.data,h=t.headers;r.isFormData(p)&&delete h["Content-Type"];var d=new XMLHttpRequest,v="onreadystatechange",m=!1;if("test"===e.env.NODE_ENV||"undefined"==typeof window||!window.XDomainRequest||"withCredentials"in d||a(t.url)||(d=new window.XDomainRequest,v="onload",m=!0,d.onprogress=function(){},d.ontimeout=function(){}),t.auth){var g=t.auth.username||"",y=t.auth.password||"";h.Authorization="Basic "+c(g+":"+y)}if(d.open(t.method.toUpperCase(),o(t.url,t.params,t.paramsSerializer),!0),d.timeout=t.timeout,d[v]=function(){if(d&&(4===d.readyState||m)&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))){var e="getAllResponseHeaders"in d?s(d.getAllResponseHeaders()):null,n=t.responseType&&"text"!==t.responseType?d.response:d.responseText,r={data:n,status:1223===d.status?204:d.status,statusText:1223===d.status?"No Content":d.statusText,headers:e,config:t,request:d};i(f,l,r),d=null}},d.onerror=function(){l(u("Network Error",t)),d=null},d.ontimeout=function(){l(u("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED")),d=null},r.isStandardBrowserEnv()){var w=n(96),_=(t.withCredentials||a(t.url))&&t.xsrfCookieName?w.read(t.xsrfCookieName):void 0;_&&(h[t.xsrfHeaderName]=_)}if("setRequestHeader"in d&&r.forEach(h,function(t,e){"undefined"==typeof p&&"content-type"===e.toLowerCase()?delete h[e]:d.setRequestHeader(e,t)}),t.withCredentials&&(d.withCredentials=!0),t.responseType)try{d.responseType=t.responseType}catch(t){if("json"!==d.responseType)throw t}"function"==typeof t.onDownloadProgress&&d.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then(function(t){d&&(d.abort(),l(t),d=null)}),void 0===p&&(p=null),d.send(p)})}}).call(e,n(5))},function(t,e){"use strict";function n(t){this.message=t}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,t.exports=n},function(t,e){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},function(t,e,n){"use strict";var r=n(90);t.exports=function(t,e,n,i){var o=new Error(t);return r(o,e,n,i)}},function(t,e){"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;rn;)e.push(arguments[n++]);return m[++v]=function(){a("function"==typeof t?t:Function(t),e)},r(v),v},h=function(t){delete m[t]},"process"==n(24)(l)?r=function(t){l.nextTick(s(y,t,1))}:d?(i=new d,o=i.port2,i.port1.onmessage=w,r=s(o.postMessage,o,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(t){f.postMessage(t+"","*")},f.addEventListener("message",w,!1)):r=g in c("script")?function(t){u.appendChild(c("script"))[g]=function(){u.removeChild(this),y.call(t)}}:function(t){setTimeout(s(y,t,1),0)}),t.exports={set:p,clear:h}},function(t,e,n){var r=n(42),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e,n){var r=n(37);t.exports=function(t){return Object(r(t))}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){"use strict";(function(e){function r(t,n){s.call(this),t=t.toLowerCase(),"string"==typeof n&&(n=new e(n));var r="sha512"===t||"sha384"===t?128:64;this._alg=t,this._key=n,n.length>r?n=i(t).update(n).digest():n.length0)if(e.ended&&!i){var s=new Error("stream.push() after EOF");t.emit("error",s)}else if(e.endEmitted&&i){var u=new Error("stream.unshift() after end event");t.emit("error",u)}else{var c;!e.decoder||i||r||(n=e.decoder.write(n),c=!e.objectMode&&0===n.length),i||(e.reading=!1),c||(e.flowing&&0===e.length&&!e.sync?(t.emit("data",n),t.read(0)):(e.length+=e.objectMode?1:n.length,i?e.buffer.unshift(n):e.buffer.push(n),e.needReadable&&p(t))),d(t,e)}else i||(e.reading=!1);return a(e)}function a(t){return!t.ended&&(t.needReadable||t.length=q?t=q:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function c(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=u(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function f(t,e){var n=null;return M.isBuffer(e)||"string"==typeof e||null===e||void 0===e||t.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function l(t,e){if(!e.ended){if(e.decoder){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,p(t)}}function p(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(I("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?R(h,t):h(t))}function h(t){I("emit readable"),t.emit("readable"),_(t)}function d(t,e){e.readingMore||(e.readingMore=!0,R(v,t,e))}function v(t,e){for(var n=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):n=E(t,e.buffer,e.decoder),n}function E(t,e,n){var r;return to.length?o.length:t;if(i+=s===o.length?o:o.slice(0,t),t-=s,0===t){s===o.length?(++r,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(s));break}++r}return e.length-=r,i}function S(t,e){var n=D.allocUnsafe(t),r=e.head,i=1;for(r.data.copy(n),t-=r.data.length;r=r.next;){var o=r.data,s=t>o.length?o.length:t;if(o.copy(n,n.length-t,0,s),t-=s,0===t){s===o.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(s));break}++i}return e.length-=i,n}function k(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,R(C,e,t))}function C(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function A(t,e){for(var n=0,r=t.length;n=e.highWaterMark||e.ended))return I("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?k(this):p(this),null;if(t=c(t,e),0===t&&e.ended)return 0===e.length&&k(this),null;var r=e.needReadable;I("need readable",r),(0===e.length||e.length-t0?b(t,e):null,null===i?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&k(this)),null!==i&&this.emit("data",i),i},o.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},o.prototype.pipe=function(t,n){function i(t){I("onunpipe"),t===p&&s()}function o(){I("onend"),t.end()}function s(){I("cleanup"),t.removeListener("close",c),t.removeListener("finish",f),t.removeListener("drain",g),t.removeListener("error",u),t.removeListener("unpipe",i),p.removeListener("end",o),p.removeListener("end",s),p.removeListener("data",a),y=!0,!h.awaitDrain||t._writableState&&!t._writableState.needDrain||g()}function a(e){I("ondata"),w=!1;var n=t.write(e);!1!==n||w||((1===h.pipesCount&&h.pipes===t||h.pipesCount>1&&O(h.pipes,t)!==-1)&&!y&&(I("false write response, pause",p._readableState.awaitDrain),p._readableState.awaitDrain++,w=!0),p.pause())}function u(e){I("onerror",e),l(),t.removeListener("error",u),0===N(t,"error")&&t.emit("error",e)}function c(){t.removeListener("finish",f),l()}function f(){I("onfinish"),t.removeListener("close",c),l()}function l(){I("unpipe"),p.unpipe(t)}var p=this,h=this._readableState;switch(h.pipesCount){case 0:h.pipes=t;break;case 1:h.pipes=[h.pipes,t];break;default:h.pipes.push(t)}h.pipesCount+=1,I("pipe count=%d opts=%j",h.pipesCount,n);var d=(!n||n.end!==!1)&&t!==e.stdout&&t!==e.stderr,v=d?o:s;h.endEmitted?R(v):p.once("end",v),t.on("unpipe",i);var g=m(p);t.on("drain",g);var y=!1,w=!1;return p.on("data",a),r(t,"error",u),t.once("close",c),t.once("finish",f),t.emit("pipe",p),h.flowing||(I("pipe resume"),p.resume()),t},o.prototype.unpipe=function(t){var e=this._readableState;if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this),this);if(!t){var n=e.pipes,r=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var i=0;i>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function a(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function u(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function c(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10}var f=n(1),l=n(13),p=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],h=new Array(64);f(r,l),r.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},r.prototype._update=function(t){for(var e=this._w,n=0|this._a,r=0|this._b,f=0|this._c,l=0|this._d,h=0|this._e,d=0|this._f,v=0|this._g,m=0|this._h,g=0;g<16;++g)e[g]=t.readInt32BE(4*g);for(;g<64;++g)e[g]=c(e[g-2])+e[g-7]+u(e[g-15])+e[g-16]|0;for(var y=0;y<64;++y){var w=m+a(h)+i(h,d,v)+p[y]+e[y]|0,_=s(n)+o(n,r,f)|0;m=v,v=d,d=h,h=l+w|0,l=f,f=r,r=n,n=w+_|0}this._a=n+this._a|0,this._b=r+this._b|0,this._c=f+this._c|0,this._d=l+this._d|0,this._e=h+this._e|0,this._f=d+this._f|0,this._g=v+this._g|0,this._h=m+this._h|0},r.prototype._hash=function(){var t=new e(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=r}).call(e,n(0).Buffer)},function(t,e,n){(function(e){function r(){this.init(),this._w=m,d.call(this,128,112)}function i(t,e,n){return n^t&(e^n)}function o(t,e,n){return t&e|n&(t|e)}function s(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function a(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function u(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function c(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function f(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function l(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function p(t,e){return t>>>0>>0?1:0}var h=n(1),d=n(13),v=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],m=new Array(160);h(r,d),r.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},r.prototype._update=function(t){for(var e=this._w,n=0|this._ah,r=0|this._bh,h=0|this._ch,d=0|this._dh,m=0|this._eh,g=0|this._fh,y=0|this._gh,w=0|this._hh,_=0|this._al,b=0|this._bl,E=0|this._cl,x=0|this._dl,S=0|this._el,k=0|this._fl,C=0|this._gl,A=0|this._hl,O=0;O<32;O+=2)e[O]=t.readInt32BE(4*O),e[O+1]=t.readInt32BE(4*O+4);for(;O<160;O+=2){var T=e[O-30],R=e[O-30+1],P=u(T,R),j=c(R,T);T=e[O-4],R=e[O-4+1];var N=f(T,R),M=l(R,T),D=e[O-14],L=e[O-14+1],B=e[O-32],I=e[O-32+1],$=j+L|0,U=P+D+p($,j)|0;$=$+M|0,U=U+N+p($,M)|0,$=$+I|0,U=U+B+p($,I)|0,e[O]=U,e[O+1]=$}for(var q=0;q<160;q+=2){U=e[q],$=e[q+1];var F=o(n,r,h),V=o(_,b,E),H=s(n,_),W=s(_,n),z=a(m,S),Y=a(S,m),G=v[q],K=v[q+1],J=i(m,g,y),Z=i(S,k,C),X=A+Y|0,Q=w+z+p(X,A)|0;X=X+Z|0,Q=Q+J+p(X,Z)|0,X=X+K|0,Q=Q+G+p(X,K)|0,X=X+$|0,Q=Q+U+p(X,$)|0;var tt=W+V|0,et=H+F+p(tt,W)|0;w=y,A=C,y=g,C=k,g=m,k=S,S=x+X|0,m=d+Q+p(S,x)|0,d=h,x=E,h=r,E=b,r=n,b=_,_=X+tt|0,n=Q+et+p(_,X)|0}this._al=this._al+_|0,this._bl=this._bl+b|0,this._cl=this._cl+E|0,this._dl=this._dl+x|0,this._el=this._el+S|0,this._fl=this._fl+k|0,this._gl=this._gl+C|0,this._hl=this._hl+A|0,this._ah=this._ah+n+p(this._al,_)|0,this._bh=this._bh+r+p(this._bl,b)|0,this._ch=this._ch+h+p(this._cl,E)|0,this._dh=this._dh+d+p(this._dl,x)|0,this._eh=this._eh+m+p(this._el,S)|0,this._fh=this._fh+g+p(this._fl,k)|0,this._gh=this._gh+y+p(this._gl,C)|0,this._hh=this._hh+w+p(this._hl,A)|0},r.prototype._hash=function(){function t(t,e,r){n.writeInt32BE(t,r),n.writeInt32BE(e,r+4)}var n=new e(64);return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),n},t.exports=r}).call(e,n(0).Buffer)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(33),o=r(i),s=n(216),a=r(s),u=n(202),c=r(u),f=n(201),l=r(f),p=n(203),h=r(p),d=n(204),v=r(d),m=n(205),g=r(m);o.default.use(a.default);var y=[{path:"/",name:"home",component:c.default},{path:"/login",name:"login",component:l.default},{path:"/passwords/",name:"passwords",component:g.default},{path:"/passwords/:id",name:"password",component:c.default},{path:"/password/reset",name:"passwordReset",component:h.default},{path:"/password/reset/confirm/:uid/:token",name:"passwordResetConfirm",component:v.default}],w=new a.default({routes:y});e.default=w},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return 1===t?(0,s.default)({},E,e,{version:1,length:12}):2===t?(0,s.default)({},E,e,{version:2,length:16}):void 0}Object.defineProperty(e,"__esModule",{value:!0});var o=n(23),s=r(o),a=n(33),u=r(a),c=n(7),f=r(c),l=n(22),p=r(l),h=n(111),d=r(h),v=n(15),m=r(v),g=n(56),y=r(g);u.default.use(f.default);var w=new m.default,_=new p.default(w),b=new d.default("passwords",w),E={id:"",site:"",login:"",uppercase:!0,lowercase:!0,numbers:!0,symbols:!0,length:12,counter:1},x=w.json().version||1,S={authenticated:_.isAuthenticated(),email:"",passwordStatus:"CLEAN",passwords:[],baseURL:"https://lesspass.com",password:i(x),version:x},k={LOGOUT:function(t){t.authenticated=!1},USER_AUTHENTICATED:function(t,e){t.authenticated=!0,t.email=e.email},SET_PASSWORDS:function(t,e){t.passwords=e},SET_PASSWORD:function(t,e){var n=e.password;t.password=n},DELETE_PASSWORD:function(t,e){var n=e.id,r=t.passwords;t.passwords=r.filter(function(t){return t.id!==n}),t.password.id===n&&(t.password=t.defaultPassword)},PASSWORD_CLEAN:function(t){setTimeout(function(){t.passwordStatus="CLEAN"},5e3)},CHANGE_PASSWORD_STATUS:function(t,e){t.passwordStatus=e},SET_DEFAULT_PASSWORD:function(t){t.password=(0,s.default)({},E)},UPDATE_SITE:function(t,e){var n=e.site;t.password.site=n},UPDATE_BASE_URL:function(t,e){var n=e.baseURL;t.baseURL=n},UPDATE_EMAIL:function(t,e){var n=e.email;t.email=n},CHANGE_VERSION:function(t,e){var n=e.version;t.password=i(n,t.password),t.version=n},SAVE_DEFAULT_OPTIONS:function(t){var e=new y.default(t.password),n=e.json();w.save({password:n,version:n.version})}},C={USER_AUTHENTICATED:function(t,e){var n=t.commit;return n("USER_AUTHENTICATED",e)},LOGOUT:function(t){var e=t.commit;_.logout(),e("LOGOUT")},SAVE_OR_UPDATE_PASSWORD:function(t){var e=t.commit,n=t.state,r=t.dispatch,i=new y.default(n.password);i.isNewPassword(n.passwords)?b.create(i.json()).then(function(){e("CHANGE_PASSWORD_STATUS","CREATED"),e("PASSWORD_CLEAN"),r("FETCH_PASSWORDS")}):b.update(i.json()).then(function(){e("CHANGE_PASSWORD_STATUS","UPDATED"),e("PASSWORD_CLEAN"),r("FETCH_PASSWORDS")})},REFRESH_TOKEN:function(t){var e=t.commit;_.isAuthenticated()&&_.refreshToken().catch(function(){e("LOGOUT")})},PASSWORD_CHANGE:function(t,e){var n=t.commit,r=e.password;n("SET_PASSWORD",{password:r})},PASSWORD_GENERATED:function(t){var e=t.commit;e("CHANGE_PASSWORD_STATUS","DIRTY")},FETCH_PASSWORDS:function(t){var e=t.commit;_.isAuthenticated()&&b.all().then(function(t){return e("SET_PASSWORDS",t.data.results)})},FETCH_PASSWORD:function(t,e){var n=t.commit,r=e.id;b.get({id:r}).then(function(t){return n("SET_PASSWORD",{password:t.data})})},DELETE_PASSWORD:function(t,e){var n=t.commit,r=e.id;b.remove({id:r}).then(function(){n("DELETE_PASSWORD",{id:r})})},LOAD_DEFAULT_PASSWORD:function(t){var e=t.commit;e("SET_DEFAULT_PASSWORD")}},A={passwords:function(t){return t.passwords},password:function(t){return t.password},isAuthenticated:function(t){return t.authenticated},isGuest:function(t){return!t.authenticated},passwordStatus:function(t){return t.passwordStatus},email:function(t){return t.email; +},version:function(t){return t.version}};e.default=new f.default.Store({state:(0,s.default)(S,w.json()),getters:A,actions:C,mutations:k})},function(t,e){},81,81,function(t,e,n){var r,i;n(219),r=n(102);var o=n(211);i=r=r||{},"object"!=typeof r.default&&"function"!=typeof r.default||(i=r=r.default),"function"==typeof i&&(i=i.options),i.render=o.render,i.staticRenderFns=o.staticRenderFns,t.exports=r},function(t,e,n){"use strict";function r(t){var e=new s(t),n=o(s.prototype.request,e);return i.extend(n,s.prototype,e),i.extend(n,e),n}var i=n(2),o=n(55),s=n(87),a=n(34),u=r(a);u.Axios=s,u.create=function(t){return r(i.merge(a,t))},u.Cancel=n(52),u.CancelToken=n(86),u.isCancel=n(53),u.all=function(t){return Promise.all(t)},u.spread=n(101),t.exports=u,t.exports.default=u},function(t,e,n){"use strict";function r(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(t){e=t});var n=this;t(function(t){n.reason||(n.reason=new i(t),e(n.reason))})}var i=n(52);r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var t,e=new r(function(e){t=e});return{token:e,cancel:t}},t.exports=r},function(t,e,n){"use strict";function r(t){this.defaults=t,this.interceptors={request:new s,response:new s}}var i=n(34),o=n(2),s=n(88),a=n(89),u=n(97),c=n(95);r.prototype.request=function(t){"string"==typeof t&&(t=o.merge({url:arguments[0]},arguments[1])),t=o.merge(i,this.defaults,{method:"get"},t),t.baseURL&&!u(t.url)&&(t.url=c(t.baseURL,t.url));var e=[a,void 0],n=Promise.resolve(t);for(this.interceptors.request.forEach(function(t){e.unshift(t.fulfilled,t.rejected)}),this.interceptors.response.forEach(function(t){e.push(t.fulfilled,t.rejected)});e.length;)n=n.then(e.shift(),e.shift());return n},o.forEach(["delete","get","head"],function(t){r.prototype[t]=function(e,n){return this.request(o.merge(n||{},{method:t,url:e}))}}),o.forEach(["post","put","patch"],function(t){r.prototype[t]=function(e,n,r){return this.request(o.merge(r||{},{method:t,url:e,data:n}))}}),t.exports=r},function(t,e,n){"use strict";function r(){this.handlers=[]}var i=n(2);r.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},r.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},r.prototype.forEach=function(t){i.forEach(this.handlers,function(e){null!==e&&t(e)})},t.exports=r},function(t,e,n){"use strict";function r(t){t.cancelToken&&t.cancelToken.throwIfRequested()}var i=n(2),o=n(92),s=n(53),a=n(34);t.exports=function(t){r(t),t.headers=t.headers||{},t.data=o(t.data,t.headers,t.transformRequest),t.headers=i.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),i.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]});var e=t.adapter||a.adapter;return e(t).then(function(e){return r(t),e.data=o(e.data,e.headers,t.transformResponse),e},function(e){return s(e)||(r(t),e&&e.response&&(e.response.data=o(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})}},function(t,e){"use strict";t.exports=function(t,e,n,r){return t.config=e,n&&(t.code=n),t.response=r,t}},function(t,e,n){"use strict";var r=n(54);t.exports=function(t,e,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n)):t(n)}},function(t,e,n){"use strict";var r=n(2);t.exports=function(t,e,n){return r.forEach(n,function(n){t=n(t,e)}),t}},function(t,e){"use strict";function n(){this.message="String contains an invalid character"}function r(t){for(var e,r,o=String(t),s="",a=0,u=i;o.charAt(0|a)||(u="=",a%1);s+=u.charAt(63&e>>8-a%1*8)){if(r=o.charCodeAt(a+=.75),r>255)throw new n;e=e<<8|r}return s}var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.prototype=new Error,n.prototype.code=5,n.prototype.name="InvalidCharacterError",t.exports=r},function(t,e,n){"use strict";function r(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var i=n(2);t.exports=function(t,e,n){if(!e)return t;var o;if(n)o=n(e);else if(i.isURLSearchParams(e))o=e.toString();else{var s=[];i.forEach(e,function(t,e){null!==t&&"undefined"!=typeof t&&(i.isArray(t)&&(e+="[]"),i.isArray(t)||(t=[t]),i.forEach(t,function(t){i.isDate(t)?t=t.toISOString():i.isObject(t)&&(t=JSON.stringify(t)),s.push(r(e)+"="+r(t))}))}),o=s.join("&")}return o&&(t+=(t.indexOf("?")===-1?"?":"&")+o),t}},function(t,e){"use strict";t.exports=function(t,e){return t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,"")}},function(t,e,n){"use strict";var r=n(2);t.exports=r.isStandardBrowserEnv()?function(){return{write:function(t,e,n,i,o,s){var a=[];a.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(i)&&a.push("path="+i),r.isString(o)&&a.push("domain="+o),s===!0&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(t,e){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e,n){"use strict";var r=n(2);t.exports=r.isStandardBrowserEnv()?function(){function t(t){var e=t;return n&&(i.setAttribute("href",e),e=i.href),i.setAttribute("href",e),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:"/"===i.pathname.charAt(0)?i.pathname:"/"+i.pathname}}var e,n=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");return e=t(window.location.href),function(n){var i=r.isString(n)?t(n):n;return i.protocol===e.protocol&&i.host===e.host}}():function(){return function(){return!0}}()},function(t,e,n){"use strict";var r=n(2);t.exports=function(t,e){r.forEach(t,function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])})}},function(t,e,n){"use strict";var r=n(2);t.exports=function(t){var e,n,i,o={};return t?(r.forEach(t.split("\n"),function(t){i=t.indexOf(":"),e=r.trim(t.substr(0,i)).toLowerCase(),n=r.trim(t.substr(i+1)),e&&(o[e]=o[e]?o[e]+", "+n:n)}),o):o}},function(t,e){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(199),o=r(i),s=n(7);e.default={name:"LessPass",components:{"lesspass-menu":o.default},computed:(0,s.mapGetters)(["version"]),created:function(){var t=this,e=3e5;this.$store.dispatch("REFRESH_TOKEN"),setInterval(function(){t.$store.dispatch("REFRESH_TOKEN")},e)}}},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={data:function(){return{confirm:!1}},props:{confirmText:{type:String,default:"Are you sure you want to delete this?"},confirmButton:{type:String,default:"Sure delete it"},cancelButton:{type:String,default:"Oups no!"}},methods:{confirmDelete:function(){this.confirm=!1,this.$emit("remove")}}}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(44),o=r(i);e.default={data:function(){return{icon1:"",icon2:"",icon3:"",color1:"",color2:"",color3:""}},props:["fingerprint"],watch:{fingerprint:function(t){var e=this;t&&o.default.createFingerprint(t).then(function(t){var n=t.substring(0,6),r=t.substring(6,12),i=t.substring(12,18);e.icon1=e.getIcon(n),e.icon2=e.getIcon(r),e.icon3=e.getIcon(i),e.color1=e.getColor(n),e.color2=e.getColor(r),e.color3=e.getColor(i)})}},methods:{getColor:function(t){var e=["#000000","#074750","#009191","#FF6CB6","#FFB5DA","#490092","#006CDB","#B66DFF","#6DB5FE","#B5DAFE","#920000","#924900","#DB6D00","#24FE23"],n=parseInt(t,16)%e.length;return e[n]},getIcon:function(t){var e=["fa-hashtag","fa-heart","fa-hotel","fa-university","fa-plug","fa-ambulance","fa-bus","fa-car","fa-plane","fa-rocket","fa-ship","fa-subway","fa-truck","fa-jpy","fa-eur","fa-btc","fa-usd","fa-gbp","fa-archive","fa-area-chart","fa-bed","fa-beer","fa-bell","fa-binoculars","fa-birthday-cake","fa-bomb","fa-briefcase","fa-bug","fa-camera","fa-cart-plus","fa-certificate","fa-coffee","fa-cloud","fa-coffee","fa-comment","fa-cube","fa-cutlery","fa-database","fa-diamond","fa-exclamation-circle","fa-eye","fa-flag","fa-flask","fa-futbol-o","fa-gamepad","fa-graduation-cap"],n=parseInt(t,16)%e.length;return e[n]}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7);e.default={methods:{logout:function(){this.$store.dispatch("LOGOUT"),this.$router.push({name:"home"})},saveOrUpdatePassword:function(){this.$store.dispatch("SAVE_OR_UPDATE_PASSWORD")}},computed:(0,r.mapGetters)(["isAuthenticated","isGuest","passwordStatus","version"])}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(9),o=r(i),s=n(44),a=r(s),u=n(22),c=r(u),f=n(15),l=r(f),p=n(7),h={userNameAlreadyExist:!1,emailInvalid:!1,baseURLRequired:!1,emailRequired:!1,passwordRequired:!1};e.default={data:function(){var t=new l.default,e=new c.default(t);return{auth:e,storage:t,password:"",useMasterPassword:!1,seeMasterPasswordHelp:!1,showError:!1,errorMessage:"",loadingRegister:!1,loadingSignIn:!1,errors:(0,o.default)({},h),showOptions:!1}},methods:{noErrors:function(){return!(this.errors.userNameAlreadyExist||this.errors.emailInvalid||this.errors.emailRequired||this.errors.passwordRequired||this.errors.baseURLRequired||this.showError)},formIsValid:function t(){this.cleanErrors();var t=!0;return this.email||(this.errors.emailRequired=!0,t=!1),this.password||(this.errors.passwordRequired=!0,t=!1),this.baseURL||(this.errors.baseURLRequired=!0,t=!1),t},cleanErrors:function(){this.loadingRegister=!1,this.loadingSignIn=!1,this.showError=!1,this.errorMessage="",this.errors=(0,o.default)({},h)},signIn:function(){var t=this;this.formIsValid()&&!function(){t.loadingSignIn=!0;var e=t.email,n=t.password,r=t.baseURL;t.auth.login({email:e,password:n},r).then(function(){t.loadingSignIn=!1,t.storage.save({baseURL:r,email:e}),t.$store.dispatch("USER_AUTHENTICATED",{email:e}),t.$router.push({name:"home"})}).catch(function(e){t.cleanErrors(),void 0===e.response?"https://lesspass.com"===r?t.showErrorMessage():t.showErrorMessage("Your LessPass Database is not running"):400===e.response.status?t.showErrorMessage("Your email and/or password is not good. Do you have an account?"):t.showErrorMessage()})}()},register:function(){var t=this;if(this.formIsValid()){this.loadingRegister=!0;var e=this.email,n=this.password,r=this.baseURL;this.auth.register({email:e,password:n},r).then(function(){t.loadingRegister=!1,t.signIn()}).catch(function(e){t.cleanErrors(),e.response&&"undefined"!=typeof e.response.data.email?(e.response.data.email[0].indexOf("already exists")!==-1&&(t.errors.userNameAlreadyExist=!0),e.response.data.email[0].indexOf("valid email")!==-1&&(t.errors.emailInvalid=!0)):t.showErrorMessage()})}},showErrorMessage:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Oops! Something went wrong. Retry in a few minutes.";this.errorMessage=t,this.showError=!0},toggleVersion:function(){1===this.version?this.$store.commit("CHANGE_VERSION",{version:2}):this.$store.commit("CHANGE_VERSION",{version:1})}},computed:(0,o.default)({},(0,p.mapGetters)(["version"]),{baseURL:{get:function(){return this.$store.state.baseURL},set:function(t){this.$store.commit("UPDATE_BASE_URL",{baseURL:t})}},email:{get:function(){return this.$store.state.email},set:function(t){this.$store.commit("UPDATE_EMAIL",{email:t})}}}),watch:{useMasterPassword:function(t){var e=this;if(this.email&&this.password){if(!t)return void(this.password="");var n={1:{lowercase:!0,uppercase:!0,numbers:!0,symbols:!0,length:12,counter:1,version:1},2:{lowercase:!0,uppercase:!0,numbers:!0,symbols:!0,length:16,counter:1,version:2}};return a.default.generatePassword("lesspass.com",this.email,this.password,n[this.version]).then(function(t){e.password=t})}}}}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){return t.dispatch("FETCH_PASSWORDS")}Object.defineProperty(e,"__esModule",{value:!0});var o=n(9),s=r(o),a=n(44),u=r(a),c=n(7),f=n(121),l=r(f),p=n(177),h=r(p),d=n(113),v=n(56),m=(r(v),n(114)),g=n(200),y=r(g),w=n(198),_=r(w);e.default={name:"password-generator-view",components:{RemoveAutoComplete:y.default,Fingerprint:_.default},computed:(0,c.mapGetters)(["passwords","password","version"]),preFetch:i,beforeMount:function(){var t=this,e=this.$route.params.id;e?this.$store.dispatch("FETCH_PASSWORD",{id:e}):i(this.$store),(0,m.getSite)(this.version).then(function(e){e&&t.$store.commit("UPDATE_SITE",{site:e})});var n=new l.default("#copyPasswordButton");n.on("success",function(e){e.text&&((0,d.showTooltip)(e.trigger,"copied !"),setTimeout(function(){t.cleanFormInSeconds(10)},2e3))})},data:function(){return{masterPassword:"",fingerprint:"",generatedPassword:"",cleanTimeout:null,showOptions:!1,showError:!1,generatingPassword:!1,optionsSaved:!1}},watch:{"password.site":function(t){this.cleanErrors();var e=t.split(" | ");if(2===e.length)for(var n=e[0],r=e[1],i=this.passwords,o=0;o4&&(this.password.length-=1)},incrementPasswordLength:function(){this.password.length+=1},decrementCounter:function(){this.password.counter>1&&(this.password.counter-=1)},incrementCounter:function(){this.password.counter+=1},saveDefault:function(){var t=this;this.$store.commit("SAVE_DEFAULT_OPTIONS"),this.optionsSaved=!0,setTimeout(function(){t.optionsSaved=!1},3e3)}}}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(9),o=r(i),s=n(22),a=r(s),u=n(15),c=r(u),f=n(7);e.default={data:function(){var t=new c.default,e=new a.default(t);return{auth:e,storage:t,email:"",emailRequired:!1,showError:!1,loading:!1,successMessage:!1}},computed:(0,o.default)({},(0,f.mapGetters)(["version"])),methods:{cleanErrors:function(){this.loading=!1,this.emailRequired=!1,this.showError=!1,this.successMessage=!1},noErrors:function(){return!(this.emailRequired||this.showError)},resetPassword:function(){var t=this;return this.cleanErrors(),this.email?(this.loading=!0,void this.auth.resetPassword({email:this.email}).then(function(){t.cleanErrors(),t.successMessage=!0}).catch(function(){t.cleanErrors(),t.showError=!0})):void(this.emailRequired=!0)}}}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(9),o=r(i),s=n(22),a=r(s),u=n(15),c=r(u),f=n(7);e.default={data:function(){var t=new c.default,e=new a.default(t);return{auth:e,storage:t,new_password:"",passwordRequired:!1,showError:!1,successMessage:!1,errorMessage:"Oops! Something went wrong. Retry in a few minutes."}},methods:{cleanErrors:function(){this.passwordRequired=!1,this.showError=!1,this.successMessage=!1},noErrors:function(){return!(this.passwordRequired||this.showError)},resetPasswordConfirm:function(){var t=this;return this.cleanErrors(),this.new_password?void this.auth.confirmResetPassword({uid:this.$route.params.uid,token:this.$route.params.token,new_password:this.new_password}).then(function(){t.successMessage=!0}).catch(function(e){400===e.response.status&&(t.errorMessage="This password reset link become invalid."),t.showError=!0}):void(this.passwordRequired=!0)}},computed:(0,o.default)({},(0,f.mapGetters)(["version"]))}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){return t.dispatch("FETCH_PASSWORDS")}Object.defineProperty(e,"__esModule",{value:!0});var o=n(9),s=r(o),a=n(197),u=r(a),c=n(7);e.default={name:"passwords-view",data:function(){return{searchQuery:""}},components:{DeleteButton:u.default},computed:(0,s.default)({},(0,c.mapGetters)(["passwords","email"]),{filteredPasswords:function(){var t=this;return this.passwords.filter(function(e){return e.site.indexOf(t.searchQuery)>-1||e.login.indexOf(t.searchQuery)>-1})}}),preFetch:i,beforeMount:function(){i(this.$store)},methods:{deletePassword:function(t){return this.$store.dispatch("DELETE_PASSWORD",{id:t.id})}}}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(9),o=r(i),s=n(16),a=r(s),u=n(17),c=r(u),f=n(50),l=r(f),p=n(15),h=function(){function t(e,n){(0,a.default)(this,t),this.storage=n,this.resource=e}return(0,c.default)(t,[{key:"getRequestConfig",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.storage.json();return(0,o.default)({},t,{baseURL:e.baseURL,headers:{Authorization:"JWT "+e[p.TOKEN_KEY]}})}},{key:"create",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l.default.post("/api/"+this.resource+"/",t,this.getRequestConfig(e))}},{key:"all",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return l.default.get("/api/"+this.resource+"/",this.getRequestConfig(t))}},{key:"get",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l.default.get("/api/"+this.resource+"/"+t.id+"/",this.getRequestConfig(e))}},{key:"update",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l.default.put("/api/"+this.resource+"/"+t.id+"/",t,this.getRequestConfig(e))}},{key:"remove",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l.default.delete("/api/"+this.resource+"/"+t.id+"/",this.getRequestConfig(e))}}]),t}();e.default=h},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.TOKEN_KEY=void 0;var i=n(16),o=r(i),s=n(17),a=r(s),u=n(174),c=r(u),f=(e.TOKEN_KEY="jwt",function(){function t(e){(0,o.default)(this,t),this.name=e}return(0,a.default)(t,[{key:"stillValid",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date;try{return this._expirationDateSuperiorTo(t)}catch(t){return!1}}},{key:"expiresInMinutes",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date;try{var n=new Date(e.getTime()+6e4*t);return this._expirationDateInferiorTo(n)}catch(t){return!1}}},{key:"_expirationDateInferiorTo",value:function(t){var e=this._getTokenExpirationDate();return e1&&void 0!==arguments[1]?arguments[1]:1;return 1===e?o(t):s(t)}function u(){return"undefined"!=typeof chrome&&"undefined"!=typeof chrome.tabs&&"function"==typeof chrome.tabs.query}function c(){return new p.default(function(t){chrome.tabs.query({active:!0,currentWindow:!0},function(e){t(e[0].url)})})}function f(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return u()?c(t).then(function(t){return a(t)}):new p.default(function(t){t("")})}Object.defineProperty(e,"__esModule",{value:!0}),e.getSite=e.getCurrentUrl=e.isWebExtension=e._ipIsValid=e.getDomainName=void 0;var l=n(58),p=r(l);e.getDomainName=a,e._ipIsValid=i,e.isWebExtension=u,e.getCurrentUrl=c,e.getSite=f},function(t,e,n){t.exports={default:n(122),__esModule:!0}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var i=n(57),o=r(i);e.default=function(t,e,n){return e in t?(0,o.default)(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},function(t,e){"use strict";function n(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function r(t){return 3*t.length/4-n(t)}function i(t){var e,r,i,o,s,a,u=t.length;s=n(t),a=new f(3*u/4-s),i=s>0?u-4:u;var l=0;for(e=0,r=0;e>16&255,a[l++]=o>>8&255,a[l++]=255&o;return 2===s?(o=c[t.charCodeAt(e)]<<2|c[t.charCodeAt(e+1)]>>4,a[l++]=255&o):1===s&&(o=c[t.charCodeAt(e)]<<10|c[t.charCodeAt(e+1)]<<4|c[t.charCodeAt(e+2)]>>2,a[l++]=o>>8&255,a[l++]=255&o),a}function o(t){return u[t>>18&63]+u[t>>12&63]+u[t>>6&63]+u[63&t]}function s(t,e,n){for(var r,i=[],s=e;sf?f:c+a));return 1===r?(e=t[n-1],i+=u[e>>2],i+=u[e<<4&63],i+="=="):2===r&&(e=(t[n-2]<<8)+t[n-1],i+=u[e>>10],i+=u[e>>4&63],i+=u[e<<2&63],i+="="),o.push(i),o.join("")}e.byteLength=r,e.toByteArray=i,e.fromByteArray=a;for(var u=[],c=[],f="undefined"!=typeof Uint8Array?Uint8Array:Array,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0,h=l.length;p0?Math.floor(t):Math.ceil(t)}function l(t,e){var n,r,i=t.length,o=e.length,s=new Array(i),a=0,u=V;for(r=0;r=u?1:0,s[r]=n-a*u;for(;r0&&s.push(a),s}function p(t,e){return t.length>=e.length?l(t,e):l(e,t)}function h(t,e){var n,r,i=t.length,o=new Array(i),s=V;for(r=0;r0;)o[r++]=e%s,e=Math.floor(e/s);return o}function d(t,e){var n,r,i=t.length,o=e.length,s=new Array(i),a=0,c=V;for(n=0;n=0?o=d(t,e):(o=d(e,t),n=!n),o=a(o),"number"==typeof o?(n&&(o=-o),new i(o)):new r(o,n)}function m(t,e,n){var o,s,u=t.length,c=new Array(u),f=-e,l=V;for(o=0;o0;)o[r++]=a%s,a=Math.floor(a/s);return o}function w(t,e){for(var n=[];e-- >0;)n.push(0);return n.concat(t)}function _(t,e){var n=Math.max(t.length,e.length);if(n<=30)return g(t,e);n=Math.ceil(n/2);var r=t.slice(n),i=t.slice(0,n),o=e.slice(n),s=e.slice(0,n),a=_(i,s),c=_(r,o),f=_(p(i,r),p(s,o)),l=p(p(a,w(d(d(f,a),c),n)),w(c,2*n));return u(l),l}function b(t,e){return-.012*t-.012*e+15e-6*t*e>0}function E(t,e,n){return t=0;r--){for(n=h-1,g[r+p]!==v&&(n=Math.floor((g[r+p]*h+g[r+p-1])/v)),i=0,o=0,u=w.length,s=0;sc&&(i=(i+1)*p),n=Math.ceil(i/o);do{if(s=y(e,n),O(s,l)<=0)break;n--}while(n);f.push(n),l=d(l,s)}return f.reverse(),[a(f),a(l)]}function C(t,e){var n,r,i,o,s=t.length,a=c(s),u=V;for(i=0,n=s-1;n>=0;--n)o=i*u+t[n],r=f(o/e),i=o-r*e,a[n]=0|r;return[a,0|i]}function A(t,e){var o,u,c=F(e),l=t.value,p=c.value;if(0===p)throw new Error("Cannot divide by zero");if(t.isSmall)return c.isSmall?[new i(f(l/p)),new i(l%p)]:[n[0],t];if(c.isSmall){if(1===p)return[t,n[0]];if(p==-1)return[t.negate(),n[0]];var h=Math.abs(p);if(he.length?1:-1;for(var n=t.length-1;n>=0;n--)if(t[n]!==e[n])return t[n]>e[n]?1:-1;return 0}function T(t){var e=t.abs();return!e.isUnit()&&(!!(e.equals(2)||e.equals(3)||e.equals(5))||!(e.isEven()||e.isDivisibleBy(3)||e.isDivisibleBy(5))&&(!!e.lesser(25)||void 0))}function R(t){return("number"==typeof t||"string"==typeof t)&&+Math.abs(t)<=V||t instanceof r&&t.value.length<=1}function P(t,n,r){n=F(n);for(var i=t.isNegative(),o=n.isNegative(),s=i?t.not():t,a=o?n.not():n,u=[],c=[],f=!1,l=!1;!f||!l;)s.isZero()?(f=!0,u.push(i?1:0)):i?u.push(s.isEven()?1:0):u.push(s.isEven()?0:1),a.isZero()?(l=!0,c.push(o?1:0)):o?c.push(a.isEven()?1:0):c.push(a.isEven()?0:1),s=s.over(2),a=a.over(2);for(var p=[],h=0;h=0;p--){var h=l?s.value[p]:V,d=f(Math.random()*h);c.unshift(d),d"}function $(t,n){if(n=e(n),n.isZero()){if(t.isZero())return"0";throw new Error("Cannot convert nonzero numbers to base 0.")}if(n.equals(-1))return t.isZero()?"0":t.isNegative()?new Array(1-t).join("10"):"1"+new Array(+t).join("01");var r="";if(t.isNegative()&&n.isPositive()&&(r="-",t=t.abs()),n.equals(1))return t.isZero()?"0":r+new Array(+t+1).join(1);for(var i,o=[],s=t;s.isNegative()||s.compareAbs(n)>=0;){i=s.divmod(n),s=i.quotient;var a=i.remainder;a.isNegative()&&(a=n.minus(a).abs(),s=s.next()),o.push(I(a))}return o.push(I(s)),r+o.reverse().join("")}function U(t){if(o(+t)){var e=+t;if(e===f(e))return new i(e);throw"Invalid integer: "+t}var n="-"===t[0];n&&(t=t.slice(1));var s=t.split(/e/i);if(s.length>2)throw new Error("Invalid integer: "+s.join("e"));if(2===s.length){var a=s[1];if("+"===a[0]&&(a=a.slice(1)),a=+a,a!==f(a)||!o(a))throw new Error("Invalid integer: "+a+" is not a valid exponent.");var c=s[0],l=c.indexOf(".");if(l>=0&&(a-=c.length-l-1,c=c.slice(0,l)+c.slice(l+1)),a<0)throw new Error("Cannot include negative exponent part for integers");c+=new Array(a+1).join("0"),t=c}var p=/^([0-9][0-9]*)$/.test(t); +if(!p)throw new Error("Invalid integer: "+t);for(var h=[],d=t.length,v=H,m=d-v;d>0;)h.push(+t.slice(m,d)),m-=v,m<0&&(m=0),d-=v;return u(h),new r(h,n)}function q(t){if(o(t)){if(t!==f(t))throw new Error(t+" is not an integer.");return new i(t)}return U(t.toString())}function F(t){return"number"==typeof t?q(t):"string"==typeof t?U(t):t}var V=1e7,H=7,W=9007199254740992,z=s(W),Y=Math.log(W);r.prototype=Object.create(n.prototype),i.prototype=Object.create(n.prototype),r.prototype.add=function(t){var e=F(t);if(this.sign!==e.sign)return this.subtract(e.negate());var n=this.value,i=e.value;return e.isSmall?new r(h(n,Math.abs(i)),this.sign):new r(p(n,i),this.sign)},r.prototype.plus=r.prototype.add,i.prototype.add=function(t){var e=F(t),n=this.value;if(n<0!==e.sign)return this.subtract(e.negate());var a=e.value;if(e.isSmall){if(o(n+a))return new i(n+a);a=s(Math.abs(a))}return new r(h(a,Math.abs(n)),n<0)},i.prototype.plus=i.prototype.add,r.prototype.subtract=function(t){var e=F(t);if(this.sign!==e.sign)return this.add(e.negate());var n=this.value,r=e.value;return e.isSmall?m(n,Math.abs(r),this.sign):v(n,r,this.sign)},r.prototype.minus=r.prototype.subtract,i.prototype.subtract=function(t){var e=F(t),n=this.value;if(n<0!==e.sign)return this.add(e.negate());var r=e.value;return e.isSmall?new i(n-r):m(r,Math.abs(n),n>=0)},i.prototype.minus=i.prototype.subtract,r.prototype.negate=function(){return new r(this.value,!this.sign)},i.prototype.negate=function(){var t=this.sign,e=new i(-this.value);return e.sign=!t,e},r.prototype.abs=function(){return new r(this.value,!1)},i.prototype.abs=function(){return new i(Math.abs(this.value))},r.prototype.multiply=function(t){var e,i=F(t),o=this.value,a=i.value,u=this.sign!==i.sign;if(i.isSmall){if(0===a)return n[0];if(1===a)return this;if(a===-1)return this.negate();if(e=Math.abs(a),er?1:-1):-1},r.prototype.compare=function(t){if(t===1/0)return-1;if(t===-(1/0))return 1;var e=F(t),n=this.value,r=e.value;return this.sign!==e.sign?e.sign?1:-1:e.isSmall?this.sign?-1:1:O(n,r)*(this.sign?-1:1)},r.prototype.compareTo=r.prototype.compare,i.prototype.compare=function(t){if(t===1/0)return-1;if(t===-(1/0))return 1;var e=F(t),n=this.value,r=e.value;return e.isSmall?n==r?0:n>r?1:-1:n<0!==e.sign?n<0?-1:1:n<0?1:-1},i.prototype.compareTo=i.prototype.compare,r.prototype.equals=function(t){return 0===this.compare(t)},i.prototype.eq=i.prototype.equals=r.prototype.eq=r.prototype.equals,r.prototype.notEquals=function(t){return 0!==this.compare(t)},i.prototype.neq=i.prototype.notEquals=r.prototype.neq=r.prototype.notEquals,r.prototype.greater=function(t){return this.compare(t)>0},i.prototype.gt=i.prototype.greater=r.prototype.gt=r.prototype.greater,r.prototype.lesser=function(t){return this.compare(t)<0},i.prototype.lt=i.prototype.lesser=r.prototype.lt=r.prototype.lesser,r.prototype.greaterOrEquals=function(t){return this.compare(t)>=0},i.prototype.geq=i.prototype.greaterOrEquals=r.prototype.geq=r.prototype.greaterOrEquals,r.prototype.lesserOrEquals=function(t){return this.compare(t)<=0},i.prototype.leq=i.prototype.lesserOrEquals=r.prototype.leq=r.prototype.lesserOrEquals,r.prototype.isEven=function(){return 0===(1&this.value[0])},i.prototype.isEven=function(){return 0===(1&this.value)},r.prototype.isOdd=function(){return 1===(1&this.value[0])},i.prototype.isOdd=function(){return 1===(1&this.value)},r.prototype.isPositive=function(){return!this.sign},i.prototype.isPositive=function(){return this.value>0},r.prototype.isNegative=function(){return this.sign},i.prototype.isNegative=function(){return this.value<0},r.prototype.isUnit=function(){return!1},i.prototype.isUnit=function(){return 1===Math.abs(this.value)},r.prototype.isZero=function(){return!1},i.prototype.isZero=function(){return 0===this.value},r.prototype.isDivisibleBy=function(t){var e=F(t),r=e.value;return 0!==r&&(1===r||(2===r?this.isEven():this.mod(e).equals(n[0])))},i.prototype.isDivisibleBy=r.prototype.isDivisibleBy,r.prototype.isPrime=function(){var r=T(this);if(r!==t)return r;for(var i,o,s,a,u=this.abs(),c=u.prev(),f=[2,3,5,7,11,13,17,19],l=c;l.isEven();)l=l.divide(2);for(s=0;s-W?new i(t-1):new r(z,!0)};for(var G=[1];G[G.length-1]<=V;)G.push(2*G[G.length-1]);var K=G.length,J=G[K-1];r.prototype.shiftLeft=function(t){if(!R(t))throw new Error(String(t)+" is too large for shifting.");if(t=+t,t<0)return this.shiftRight(-t);for(var e=this;t>=K;)e=e.multiply(J),t-=K-1;return e.multiply(G[t])},i.prototype.shiftLeft=r.prototype.shiftLeft,r.prototype.shiftRight=function(t){var e;if(!R(t))throw new Error(String(t)+" is too large for shifting.");if(t=+t,t<0)return this.shiftLeft(-t);for(var n=this;t>=K;){if(n.isZero())return n;e=A(n,J),n=e[1].isNegative()?e[0].prev():e[0],t-=K-1}return e=A(n,G[t]),e[1].isNegative()?e[0].prev():e[0]},i.prototype.shiftRight=r.prototype.shiftRight,r.prototype.not=function(){return this.negate().prev()},i.prototype.not=r.prototype.not,r.prototype.and=function(t){return P(this,t,function(t,e){return t&e})},i.prototype.and=r.prototype.and,r.prototype.or=function(t){return P(this,t,function(t,e){return t|e})},i.prototype.or=r.prototype.or,r.prototype.xor=function(t){return P(this,t,function(t,e){return t^e})},i.prototype.xor=r.prototype.xor;var Z=1<<30,X=(V&-V)*(V&-V)|Z,Q=function(t,e){var r=n[0],o=n[1],s=t.length;if(2<=e&&e<=36&&s<=Y/Math.log(e))return new i(parseInt(t,e));e=F(e);var a,u=[],c="-"===t[0];for(a=c?1:0;a"!==t[a]);u.push(F(t.slice(p+1,a)))}}for(u.reverse(),a=0;a=0;)n=String(r[i]),o+=s.slice(n.length)+n;var a=this.sign?"-":"";return a+o},i.prototype.toString=function(e){return e===t&&(e=10),10!=e?$(this,e):String(this.value)},r.prototype.valueOf=function(){return+this.toString()},r.prototype.toJSNumber=r.prototype.valueOf,i.prototype.valueOf=function(){return this.value},i.prototype.toJSNumber=i.prototype.valueOf;for(var tt=0;tt<1e3;tt++)n[tt]=new i(tt),tt>0&&(n[-tt]=new i(-tt));return n.one=n[1],n.zero=n[0],n.minusOne=n[-1],n.max=N,n.min=M,n.gcd=D,n.lcm=L,n.isInstance=function(t){return t instanceof r||t instanceof i},n.randBetween=B,n}();"undefined"!=typeof t&&t.hasOwnProperty("exports")&&(t.exports=e)}).call(e,n(221)(t))},function(t,e,n){(function(e){function r(t){i.call(this),this.hashMode="string"==typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._decoder=null,this._encoding=null}var i=n(21).Transform,o=n(1),s=n(49).StringDecoder;t.exports=r,o(r,i),r.prototype.update=function(t,n,r){"string"==typeof t&&(t=new e(t,n));var i=this._update(t);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},r.prototype.setAutoPadding=function(){},r.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},r.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},r.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},r.prototype._transform=function(t,e,n){var r;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(t){r=t}finally{n(r)}},r.prototype._flush=function(t){var e;try{this.push(this._final())}catch(t){e=t}finally{t(e)}},r.prototype._finalOrDigest=function(t){var n=this._final()||new e("");return t&&(n=this._toString(n,t,!0)),n},r.prototype._toString=function(t,e,n){if(this._decoder||(this._decoder=new s(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var r=this._decoder.write(t);return n&&(r+=this._decoder.end()),r}}).call(e,n(0).Buffer)},function(t,e,n){var r,i,o;!function(s,a){i=[t,n(189)],r=a,o="function"==typeof r?r.apply(e,i):r,!(void 0!==o&&(t.exports=o))}(this,function(t,e){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=n(e),o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};this.action=t.action,this.emitter=t.emitter,this.target=t.target,this.text=t.text,this.trigger=t.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var t=this,e="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return t.removeFake()},this.fakeHandler=document.body.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[e?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.addEventListener("focus",window.scrollTo(0,n)),this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,document.body.appendChild(this.fakeElem),this.selectedText=(0,i.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(document.body.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(document.body.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,i.default)(this.target),this.copyText()}},{key:"copyText",value:function(){var t=void 0;try{t=document.execCommand(this.action)}catch(e){t=!1}this.handleResult(t)}},{key:"handleResult",value:function(t){this.emitter.emit(t?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.target&&this.target.blur(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=t,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(t){if(void 0!==t){if(!t||"object"!==("undefined"==typeof t?"undefined":o(t))||1!==t.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&t.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(t.hasAttribute("readonly")||t.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=t}},get:function(){return this._target}}]),t}();t.exports=a})},function(t,e,n){var r,i,o;!function(s,a){i=[t,n(120),n(195),n(170)],r=a,o="function"==typeof r?r.apply(e,i):r,!(void 0!==o&&(t.exports=o))}(this,function(t,e,n,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function u(t,e){var n="data-clipboard-"+t;if(e.hasAttribute(n))return e.getAttribute(n)}var c=i(e),f=i(n),l=i(r),p=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText}},{key:"listenClick",value:function(t){var e=this;this.listener=(0,l.default)(t,"click",function(t){return e.onClick(t)})}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new c.default({action:this.action(e),target:this.target(e),text:this.text(e),trigger:e,emitter:this})}},{key:"defaultAction",value:function(t){return u("action",t)}},{key:"defaultTarget",value:function(t){var e=u("target",t);if(e)return document.querySelector(e)}},{key:"defaultText",value:function(t){return u("text",t)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}]),e}(f.default);t.exports=h})},function(t,e,n){var r=n(6),i=r.JSON||(r.JSON={stringify:JSON.stringify});t.exports=function(t){return i.stringify.apply(i,arguments)}},function(t,e,n){n(154),t.exports=n(6).Object.assign},function(t,e,n){n(155);var r=n(6).Object;t.exports=function(t,e,n){return r.defineProperty(t,e,n)}},function(t,e,n){n(156),n(158),n(159),n(157),t.exports=n(6).Promise},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){var r=n(43),i=n(69),o=n(150);t.exports=function(t){return function(e,n,s){var a,u=r(e),c=i(u.length),f=o(s,c);if(t&&n!=n){for(;c>f;)if(a=u[f++],a!=a)return!0}else for(;c>f;f++)if((t||f in u)&&u[f]===n)return t||f||0;return!t&&-1}}},function(t,e,n){var r=n(25),i=n(133),o=n(132),s=n(10),a=n(69),u=n(152),c={},f={},e=t.exports=function(t,e,n,l,p){var h,d,v,m,g=p?function(){return t}:u(t),y=r(n,l,e?2:1),w=0;if("function"!=typeof g)throw TypeError(t+" is not iterable!");if(o(g)){for(h=a(t.length);h>w;w++)if(m=e?y(s(d=t[w])[0],d[1]):y(t[w]),m===c||m===f)return m}else for(v=g.call(t);!(d=v.next()).done;)if(m=i(v,y,d.value,e),m===c||m===f)return m};e.BREAK=c,e.RETURN=f},function(t,e,n){t.exports=!n(11)&&!n(39)(function(){return 7!=Object.defineProperty(n(38)("div"),"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},function(t,e,n){var r=n(18),i=n(3)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},function(t,e,n){var r=n(10);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&r(o.call(t)),e}}},function(t,e,n){"use strict";var r=n(139),i=n(66),o=n(40),s={};n(12)(s,n(3)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(s,{next:i(1,n)}),o(t,e+" Iterator")}},function(t,e,n){var r=n(3)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o=[7],s=o[r]();s.next=function(){return{done:n=!0}},o[r]=function(){return s},t(o)}catch(t){}return n}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){var r=n(4),i=n(68).set,o=r.MutationObserver||r.WebKitMutationObserver,s=r.process,a=r.Promise,u="process"==n(24)(s);t.exports=function(){var t,e,n,c=function(){var r,i;for(u&&(r=s.domain)&&r.exit();t;){i=t.fn,t=t.next;try{i()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(u)n=function(){s.nextTick(c)};else if(o){var f=!0,l=document.createTextNode("");new o(c).observe(l,{characterData:!0}),n=function(){l.data=f=!f}}else if(a&&a.resolve){var p=a.resolve();n=function(){p.then(c)}}else n=function(){i.call(r,c)};return function(r){var i={fn:r,next:void 0};e&&(e.next=i),t||(t=i,n()),e=i}}},function(t,e,n){"use strict";var r=n(65),i=n(141),o=n(144),s=n(70),a=n(62),u=Object.assign;t.exports=!u||n(39)(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=u({},t)[n]||Object.keys(u({},e)).join("")!=r})?function(t,e){for(var n=s(t),u=arguments.length,c=1,f=i.f,l=o.f;u>c;)for(var p,h=a(arguments[c++]),d=f?r(h).concat(f(h)):r(h),v=d.length,m=0;v>m;)l.call(h,p=d[m++])&&(n[p]=h[p]);return n}:u},function(t,e,n){var r=n(10),i=n(140),o=n(60),s=n(41)("IE_PROTO"),a=function(){},u="prototype",c=function(){var t,e=n(38)("iframe"),r=o.length,i="<",s=">";for(e.style.display="none",n(61).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(i+"script"+s+"document.F=Object"+i+"/script"+s),t.close(),c=t.F;r--;)delete c[u][o[r]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(a[u]=r(t),n=new a,a[u]=null,n[s]=t):n=c(),void 0===e?n:i(n,e)}},function(t,e,n){var r=n(19),i=n(10),o=n(65);t.exports=n(11)?Object.defineProperties:function(t,e){i(t);for(var n,s=o(e),a=s.length,u=0;a>u;)r.f(t,n=s[u++],e[n]);return t}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var r=n(27),i=n(70),o=n(41)("IE_PROTO"),s=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?s:null}},function(t,e,n){var r=n(27),i=n(43),o=n(128)(!1),s=n(41)("IE_PROTO");t.exports=function(t,e){var n,a=i(t),u=0,c=[];for(n in a)n!=s&&r(a,n)&&c.push(n);for(;e.length>u;)r(a,n=e[u++])&&(~o(c,n)||c.push(n));return c}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(12);t.exports=function(t,e,n){for(var i in e)n&&t[i]?t[i]=e[i]:r(t,i,e[i]);return t}},function(t,e,n){t.exports=n(12)},function(t,e,n){"use strict";var r=n(4),i=n(6),o=n(19),s=n(11),a=n(3)("species");t.exports=function(t){var e="function"==typeof i[t]?i[t]:r[t];s&&e&&!e[a]&&o.f(e,a,{configurable:!0,get:function(){return this}})}},function(t,e,n){var r=n(10),i=n(36),o=n(3)("species");t.exports=function(t,e){var n,s=r(t).constructor;return void 0===s||void 0==(n=r(s)[o])?e:i(n)}},function(t,e,n){var r=n(42),i=n(37);t.exports=function(t){return function(e,n){var o,s,a=String(i(e)),u=r(n),c=a.length;return u<0||u>=c?t?"":void 0:(o=a.charCodeAt(u),o<55296||o>56319||u+1===c||(s=a.charCodeAt(u+1))<56320||s>57343?t?a.charAt(u):o:t?a.slice(u,u+2):(o-55296<<10)+(s-56320)+65536)}}},function(t,e,n){var r=n(42),i=Math.max,o=Math.min;t.exports=function(t,e){return t=r(t),t<0?i(t+e,0):o(t,e)}},function(t,e,n){var r=n(28);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var r=n(59),i=n(3)("iterator"),o=n(18);t.exports=n(6).getIteratorMethod=function(t){if(void 0!=t)return t[i]||t["@@iterator"]||o[r(t)]}},function(t,e,n){"use strict";var r=n(126),i=n(136),o=n(18),s=n(43);t.exports=n(63)(Array,"Array",function(t,e){this._t=s(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):"keys"==e?i(0,n):"values"==e?i(0,t[n]):i(0,[n,t[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(t,e,n){var r=n(26);r(r.S+r.F,"Object",{assign:n(138)})},function(t,e,n){var r=n(26);r(r.S+r.F*!n(11),"Object",{defineProperty:n(19).f})},function(t,e){},function(t,e,n){"use strict";var r,i,o,s=n(64),a=n(4),u=n(25),c=n(59),f=n(26),l=n(28),p=n(36),h=n(127),d=n(129),v=n(148),m=n(68).set,g=n(137)(),y="Promise",w=a.TypeError,_=a.process,b=a[y],_=a.process,E="process"==c(_),x=function(){},S=!!function(){try{var t=b.resolve(1),e=(t.constructor={})[n(3)("species")]=function(t){t(x,x)};return(E||"function"==typeof PromiseRejectionEvent)&&t.then(x)instanceof e}catch(t){}}(),k=function(t,e){return t===e||t===b&&e===o},C=function(t){var e;return!(!l(t)||"function"!=typeof(e=t.then))&&e},A=function(t){return k(b,t)?new O(t):new i(t)},O=i=function(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw w("Bad Promise constructor");e=t,n=r}),this.resolve=p(e),this.reject=p(n)},T=function(t){try{t()}catch(t){return{error:t}}},R=function(t,e){if(!t._n){t._n=!0;var n=t._c;g(function(){for(var r=t._v,i=1==t._s,o=0,s=function(e){var n,o,s=i?e.ok:e.fail,a=e.resolve,u=e.reject,c=e.domain;try{s?(i||(2==t._h&&N(t),t._h=1),s===!0?n=r:(c&&c.enter(),n=s(r),c&&c.exit()),n===e.promise?u(w("Promise-chain cycle")):(o=C(n))?o.call(n,a,u):a(n)):u(r)}catch(t){u(t)}};n.length>o;)s(n[o++]);t._c=[],t._n=!1,e&&!t._h&&P(t)})}},P=function(t){m.call(a,function(){var e,n,r,i=t._v;if(j(t)&&(e=T(function(){E?_.emit("unhandledRejection",i,t):(n=a.onunhandledrejection)?n({promise:t,reason:i}):(r=a.console)&&r.error&&r.error("Unhandled promise rejection",i)}),t._h=E||j(t)?2:1),t._a=void 0,e)throw e.error})},j=function(t){if(1==t._h)return!1;for(var e,n=t._a||t._c,r=0;n.length>r;)if(e=n[r++],e.fail||!j(e.promise))return!1;return!0},N=function(t){m.call(a,function(){var e;E?_.emit("rejectionHandled",t):(e=a.onrejectionhandled)&&e({promise:t,reason:t._v})})},M=function(t){var e=this;e._d||(e._d=!0,e=e._w||e,e._v=t,e._s=2,e._a||(e._a=e._c.slice()),R(e,!0))},D=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw w("Promise can't be resolved itself");(e=C(t))?g(function(){var r={_w:n,_d:!1};try{e.call(t,u(D,r,1),u(M,r,1))}catch(t){M.call(r,t)}}):(n._v=t,n._s=1,R(n,!1))}catch(t){M.call({_w:n,_d:!1},t)}}};S||(b=function(t){h(this,b,y,"_h"),p(t),r.call(this);try{t(u(D,this,1),u(M,this,1))}catch(t){M.call(this,t)}},r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},r.prototype=n(145)(b.prototype,{then:function(t,e){var n=A(v(this,b));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=E?_.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&R(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),O=function(){var t=new r;this.promise=t,this.resolve=u(D,t,1),this.reject=u(M,t,1)}),f(f.G+f.W+f.F*!S,{Promise:b}),n(40)(b,y),n(147)(y),o=n(6)[y],f(f.S+f.F*!S,y,{reject:function(t){var e=A(this),n=e.reject;return n(t),e.promise}}),f(f.S+f.F*(s||!S),y,{resolve:function(t){if(t instanceof b&&k(t.constructor,this))return t;var e=A(this),n=e.resolve;return n(t),e.promise}}),f(f.S+f.F*!(S&&n(135)(function(t){b.all(t).catch(x)})),y,{all:function(t){var e=this,n=A(e),r=n.resolve,i=n.reject,o=T(function(){var n=[],o=0,s=1;d(t,!1,function(t){var a=o++,u=!1;n.push(void 0),s++,e.resolve(t).then(function(t){u||(u=!0,n[a]=t,--s||r(n))},i)}),--s||r(n)});return o&&i(o.error),n.promise},race:function(t){var e=this,n=A(e),r=n.reject,i=T(function(){d(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return i&&r(i.error),n.promise}})},function(t,e,n){"use strict";var r=n(149)(!0);n(63)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){n(153);for(var r=n(4),i=n(12),o=n(18),s=n(3)("toStringTag"),a=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],u=0;u<5;u++){var c=a[u],f=r[c],l=f&&f.prototype;l&&!l[s]&&i(l,s,c),o[c]=o.Array}},function(t,e,n){"use strict";(function(e){function r(t){c.call(this,"digest"),this._hash=t,this.buffers=[]}function i(t){c.call(this,"digest"),this._hash=t}var o=n(1),s=n(162),a=n(188),u=n(190),c=n(119);o(r,c),r.prototype._update=function(t){this.buffers.push(t)},r.prototype._final=function(){var t=e.concat(this.buffers),n=this._hash(t);return this.buffers=null,n},o(i,c),i.prototype._update=function(t){this._hash.update(t)},i.prototype._final=function(){return this._hash.digest()},t.exports=function(t){return t=t.toLowerCase(),"md5"===t?new r(s):"rmd160"===t||"ripemd160"===t?new r(a):new i(u(t))}}).call(e,n(0).Buffer)},function(t,e,n){"use strict";(function(t){function n(e,n){if(e.length%o!==0){var r=e.length+(o-e.length%o);e=t.concat([e,s],r)}for(var i=[],a=n?e.readInt32BE:e.readInt32LE,u=0;u>5]|=128<>>9<<4)+14]=e;for(var n=1732584193,r=-271733879,i=-1732584194,f=271733878,l=0;l>16)+(e>>16)+(n>>16);return r<<16|65535&n}function f(t,e){return t<>>32-e}var l=n(161);t.exports=function(t){return l.hash(t,r,16)}},function(t,e,n){e=t.exports=n(29)(),e.push([t.i,"\n#fingerprint {\n min-width: 90px;\n text-align: center;\n background-color: transparent;\n color: white;\n}\n#fingerprint i {\n color: black;\n position: relative;\n padding: 0;\n text-shadow: 1px 1px 0 white;\n font-size: 1.3em;\n}\n",""]); +},function(t,e,n){e=t.exports=n(29)(),e.push([t.i,"\n#password-generator {\n color: #555;\n}\n.inner-addon i {\n position: absolute;\n padding: 10px;\n pointer-events: none;\n z-index: 10;\n}\n.inner-addon {\n position: relative;\n}\n.left-addon i {\n left: 0;\n}\n.right-addon i {\n right: 0;\n}\n.left-addon input {\n padding-left: 30px;\n}\n.right-addon input {\n padding-right: 30px;\n}\n",""])},function(t,e,n){e=t.exports=n(29)(),e.push([t.i,"\n#lesspass .white-link {\n color: white;\n}\n@media (max-width: 544px) {\n#lesspass.card {\n border: none;\n}\n}\n#lesspass .white-link:hover, #lesspass .white-link:focus, #lesspass .white-link:active {\n text-decoration: none;\n color: white;\n}\n#lesspass, #lesspass * {\n border-radius: 0 !important;\n}\n",""])},function(t,e,n){e=t.exports=n(29)(),e.push([t.i,"\n.white-link {\n color: white;\n}\n.white-link:hover, .white-link:focus, .white-link:active {\n text-decoration: none;\n color: white;\n}\n.fa-clickable {\n cursor: pointer;\n}\n",""])},function(t,e){function n(t,e){for(;t&&t!==document;){if(t.matches(e))return t;t=t.parentNode}}if(Element&&!Element.prototype.matches){var r=Element.prototype;r.matches=r.matchesSelector||r.mozMatchesSelector||r.msMatchesSelector||r.oMatchesSelector||r.webkitMatchesSelector}t.exports=n},function(t,e,n){function r(t,e,n,r,o){var s=i.apply(this,arguments);return t.addEventListener(n,s,o),{destroy:function(){t.removeEventListener(n,s,o)}}}function i(t,e,n,r){return function(n){n.delegateTarget=o(n.target,e),n.delegateTarget&&r.call(t,n)}}var o=n(167);t.exports=r},function(t,e){e.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},e.nodeList=function(t){var n=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"in t&&(0===t.length||e.node(t[0]))},e.string=function(t){return"string"==typeof t||t instanceof String},e.fn=function(t){var e=Object.prototype.toString.call(t);return"[object Function]"===e}},function(t,e,n){function r(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!a.string(e))throw new TypeError("Second argument must be a String");if(!a.fn(n))throw new TypeError("Third argument must be a Function");if(a.node(t))return i(t,e,n);if(a.nodeList(t))return o(t,e,n);if(a.string(t))return s(t,e,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function i(t,e,n){return t.addEventListener(e,n),{destroy:function(){t.removeEventListener(e,n)}}}function o(t,e,n){return Array.prototype.forEach.call(t,function(t){t.addEventListener(e,n)}),{destroy:function(){Array.prototype.forEach.call(t,function(t){t.removeEventListener(e,n)})}}}function s(t,e,n){return u(document.body,t,e,n)}var a=n(169),u=n(168);t.exports=r},function(t,e){e.read=function(t,e,n,r,i){var o,s,a=8*i-r-1,u=(1<>1,f=-7,l=n?i-1:0,p=n?-1:1,h=t[e+l];for(l+=p,o=h&(1<<-f)-1,h>>=-f,f+=a;f>0;o=256*o+t[e+l],l+=p,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=r;f>0;s=256*s+t[e+l],l+=p,f-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:(h?-1:1)*(1/0);s+=Math.pow(2,r),o-=c}return(h?-1:1)*s*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var s,a,u,c=8*o-i-1,f=(1<>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,d=r?1:-1,v=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=f):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),e+=s+l>=1?p/u:p*Math.pow(2,1-l),e*u>=2&&(s++,u/=2),s+l>=f?(a=0,s=f):s+l>=1?(a=(e*u-1)*Math.pow(2,i),s+=l):(a=e*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;t[n+h]=255&a,h+=d,a/=256,i-=8);for(s=s<0;t[n+h]=255&s,h+=d,s/=256,c-=8);t[n+h-d]|=128*v}},function(t,e){function n(t){this.message=t}function r(t){var e=String(t).replace(/=+$/,"");if(e.length%4==1)throw new n("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,o,s=0,a=0,u="";o=e.charAt(a++);~o&&(r=s%4?64*r+o:o,s++%4)?u+=String.fromCharCode(255&r>>(-2*s&6)):0)o=i.indexOf(o);return u}var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.prototype=new Error,n.prototype.name="InvalidCharacterError",t.exports="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||r},function(t,e,n){function r(t){return decodeURIComponent(i(t).replace(/(.)/g,function(t,e){var n=e.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}var i=n(172);t.exports=function(t){var e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw"Illegal base64url string!"}try{return r(e)}catch(t){return i(e)}}},function(t,e,n){"use strict";var r=n(173);t.exports=function(t,e){if("string"!=typeof t)throw new Error("Invalid token specified");e=e||{};var n=e.header===!0?0:1;return JSON.parse(r(t.split(".")[n]))}},function(t,e,n){(function(e){function r(t,e,n){var r=void 0!==n?n:{},i=r.iterations||8192,o=r.keylen||32;return h(e,t,i,o,"sha256")}function i(t,e,n){return s(t,e,n).then(function(t){var e=n.template||a(n);return u(t,e)})}function o(t,n){return new v(function(r){r(d("sha256",new e(t)).update(n).digest("hex"))})}function s(t,e,n){var r=void 0!==n?n:{},i=r.length||12,s=r.counter||1,a=e+s.toString();return o(t,a).then(function(t){return t.substring(0,i)})}function a(t){var e={lowercase:"vc",uppercase:"VC",numbers:"n",symbols:"s"},n="";return Object.keys(e).forEach(function(r){t.hasOwnProperty(r)&&t[r]&&(n+=e[r])}),n}function u(t,e){var n="";return c(t).forEach(function(t,r){var i=f(e,r);n+=l(i,t)}),n}function c(t){for(var e=[],n=0;n=r)return{value:t,entropy:e};var i=e.divmod(n.length);return t+=n[i.remainder],s(t,i.quotient,n,r)}function a(t,e,n){for(var r=0;r?@[\\]^_`{|}~"}},function(t,e,n){(function(e){function n(t,e,n){function i(e){var n=v,r=m;return v=m=void 0,S=e,y=t.apply(r,n)}function o(t){return S=t,w=setTimeout(f,e),k?i(t):y}function u(t){var n=t-x,r=t-S,i=e-n;return C?b(i,g-r):i}function c(t){var n=t-x,r=t-S;return void 0===x||n>=e||n<0||C&&r>=g}function f(){var t=E();return c(t)?l(t):void(w=setTimeout(f,u(t)))}function l(t){return w=void 0,A&&v?i(t):(v=m=void 0,y)}function p(){void 0!==w&&clearTimeout(w),S=0,v=x=m=w=void 0}function h(){return void 0===w?y:l(E())}function d(){var t=E(),n=c(t);if(v=arguments,m=this,x=t,n){if(void 0===w)return o(x);if(C)return w=setTimeout(f,e),i(x)}return void 0===w&&(w=setTimeout(f,e)),y}var v,m,g,y,w,x,S=0,k=!1,C=!1,A=!0;if("function"!=typeof t)throw new TypeError(a);return e=s(e)||0,r(n)&&(k=!!n.leading,C="maxWait"in n,g=C?_(s(n.maxWait)||0,e):g,A="trailing"in n?!!n.trailing:A),d.cancel=p,d.flush=h,d}function r(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function i(t){return!!t&&"object"==typeof t}function o(t){return"symbol"==typeof t||i(t)&&w.call(t)==c}function s(t){if("number"==typeof t)return t;if(o(t))return u;if(r(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=r(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(f,"");var n=p.test(t);return n||h.test(t)?d(t.slice(2),n?2:8):l.test(t)?u:+t}var a="Expected a function",u=NaN,c="[object Symbol]",f=/^\s+|\s+$/g,l=/^[-+]0x[0-9a-f]+$/i,p=/^0b[01]+$/i,h=/^0o[0-7]+$/i,d=parseInt,v="object"==typeof e&&e&&e.Object===Object&&e,m="object"==typeof self&&self&&self.Object===Object&&self,g=v||m||Function("return this")(),y=Object.prototype,w=y.toString,_=Math.max,b=Math.min,E=function(){return g.Date.now()};t.exports=n}).call(e,n(14))},function(t,e){"use strict";function n(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function r(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(e).map(function(t){return e[t]});if("0123456789"!==r.join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(t){i[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(t){return!1}}var i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;t.exports=r()?Object.assign:function(t,e){for(var r,s,a=n(t),u=1;u=6?"utf-8":"binary"}e.pbkdf2Sync=function(t,e,n,a,u){r.isBuffer(t)||(t=new r(t,s)),r.isBuffer(e)||(e=new r(e,s)),o(n,a),u=u||"sha1";var c,f=1,l=new r(a),p=new r(e.length+4);e.copy(p,0,0,e.length);for(var h,d,v=1;v<=f;v++){p.writeUInt32BE(v,e.length);var m=i(u,t).update(p).digest();c||(c=m.length,d=new r(c),f=Math.ceil(a/c),h=a-(f-1)*c),m.copy(d,0,0,c);for(var g=1;gn||e!==e)throw new TypeError("Bad key length")}},function(t,e,n){"use strict";(function(e,n){function r(){for(var t=0;t0?this.tail.next=e:this.head=e,this.tail=e,++this.length},r.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},r.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},r.prototype.clear=function(){this.head=this.tail=null,this.length=0},r.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,n=""+e.data;e=e.next;)n+=t+e.data;return n},r.prototype.concat=function(t){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var e=i.allocUnsafe(t>>>0),n=this.head,r=0;n;)n.data.copy(e,r),r+=n.data.length,n=n.next;return e}},function(t,e,n){t.exports=n(75)},function(t,e,n){(function(r){var i=function(){try{return n(21)}catch(t){}}();e=t.exports=n(76),e.Stream=i||e,e.Readable=e,e.Writable=n(48),e.Duplex=n(8),e.Transform=n(47),e.PassThrough=n(75),!r.browser&&"disable"===r.env.READABLE_STREAM&&i&&(t.exports=i)}).call(e,n(5))},function(t,e,n){t.exports=n(47)},function(t,e,n){t.exports=n(48)},function(t,e,n){(function(e){function n(t){for(var e=[],n=0,r=0;n>>5]|=t[n]<<24-r%32;return e}function r(t){for(var e=[],n=0;n<32*t.length;n+=8)e.push(t[n>>>5]>>>24-n%32&255);return e}function i(t,e,n){for(var r=0;r<16;r++){var i=n+r,l=e[i];e[i]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}var y,w,_,b,E,x,S,k,C,A;x=y=t[0],S=w=t[1],k=_=t[2],C=b=t[3],A=E=t[4];var O;for(r=0;r<80;r+=1)O=y+e[n+p[r]]|0,O+=r<16?o(w,_,b)+m[0]:r<32?s(w,_,b)+m[1]:r<48?a(w,_,b)+m[2]:r<64?u(w,_,b)+m[3]:c(w,_,b)+m[4],O|=0,O=f(O,d[r]),O=O+E|0,y=E,E=b,b=f(_,10),_=w,w=O,O=x+e[n+h[r]]|0,O+=r<16?c(S,k,C)+g[0]:r<32?u(S,k,C)+g[1]:r<48?a(S,k,C)+g[2]:r<64?s(S,k,C)+g[3]:o(S,k,C)+g[4],O|=0,O=f(O,v[r]),O=O+A|0,x=A,A=C,C=f(k,10),k=S,S=O;O=t[1]+_+C|0,t[1]=t[2]+b+A|0,t[2]=t[3]+E+x|0,t[3]=t[4]+y+S|0,t[4]=t[0]+w+k|0,t[0]=O}function o(t,e,n){return t^e^n}function s(t,e,n){return t&e|~t&n}function a(t,e,n){return(t|~e)^n}function u(t,e,n){return t&n|e&~n}function c(t,e,n){return t^(e|~n)}function f(t,e){return t<>>32-e}function l(t){var o=[1732584193,4023233417,2562383102,271733878,3285377520];"string"==typeof t&&(t=new e(t,"utf8"));var s=n(t),a=8*t.length,u=8*t.length;s[a>>>5]|=128<<24-a%32,s[(a+64>>>9<<4)+14]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8);for(var c=0;c>>24)|4278255360&(f<<24|f>>>8)}var l=r(o);return new e(l)}/** @preserve (c) 2012 by Cédric Mesnil. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -19,10 +19,5 @@ Redistribution and use in source and binary forms, with or without modification, THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -var h=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],p=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],d=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],v=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],m=[0,1518500249,1859775393,2400959708,2840853838],g=[1352829926,1548603684,1836072691,2053994217,0];t.exports=l}).call(e,n(0).Buffer)},function(t,e){function n(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName)t.focus(),t.setSelectionRange(0,t.value.length),e=t.value;else{t.hasAttribute("contenteditable")&&t.focus();var n=window.getSelection(),r=document.createRange();r.selectNodeContents(t),n.removeAllRanges(),n.addRange(r),e=n.toString()}return e}t.exports=n},function(t,e,n){var e=t.exports=function(t){t=t.toLowerCase();var n=e[t];if(!n)throw new Error(t+" is not supported (we accept pull requests)");return new n};e.sha=n(191),e.sha1=n(192),e.sha224=n(193),e.sha256=n(77),e.sha384=n(194),e.sha512=n(78)},function(t,e,n){(function(e){function r(){this.init(),this._w=f,u.call(this,64,56)}function i(t){return t<<5|t>>>27}function o(t){return t<<30|t>>>2}function s(t,e,n,r){return 0===t?e&n|~e&r:2===t?e&n|e&r|n&r:e^n^r}var a=n(1),u=n(13),c=[1518500249,1859775393,-1894007588,-899497514],f=new Array(80);a(r,u),r.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},r.prototype._update=function(t){for(var e=this._w,n=0|this._a,r=0|this._b,a=0|this._c,u=0|this._d,f=0|this._e,l=0;l<16;++l)e[l]=t.readInt32BE(4*l);for(;l<80;++l)e[l]=e[l-3]^e[l-8]^e[l-14]^e[l-16];for(var h=0;h<80;++h){var p=~~(h/20),d=i(n)+s(p,r,a,u)+f+e[h]+c[p]|0;f=u,u=a,a=o(r),r=n,n=d}this._a=n+this._a|0,this._b=r+this._b|0,this._c=a+this._c|0,this._d=u+this._d|0,this._e=f+this._e|0},r.prototype._hash=function(){var t=new e(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=r}).call(e,n(0).Buffer)},function(t,e,n){(function(e){function r(){this.init(),this._w=l,c.call(this,64,56)}function i(t){return t<<1|t>>>31}function o(t){return t<<5|t>>>27}function s(t){return t<<30|t>>>2}function a(t,e,n,r){return 0===t?e&n|~e&r:2===t?e&n|e&r|n&r:e^n^r}var u=n(1),c=n(13),f=[1518500249,1859775393,-1894007588,-899497514],l=new Array(80);u(r,c),r.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},r.prototype._update=function(t){for(var e=this._w,n=0|this._a,r=0|this._b,u=0|this._c,c=0|this._d,l=0|this._e,h=0;h<16;++h)e[h]=t.readInt32BE(4*h);for(;h<80;++h)e[h]=i(e[h-3]^e[h-8]^e[h-14]^e[h-16]);for(var p=0;p<80;++p){var d=~~(p/20),v=o(n)+a(d,r,u,c)+l+e[p]+f[d]|0;l=c,c=u,u=s(r),r=n,n=v}this._a=n+this._a|0,this._b=r+this._b|0,this._c=u+this._c|0,this._d=c+this._d|0,this._e=l+this._e|0},r.prototype._hash=function(){var t=new e(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=r}).call(e,n(0).Buffer)},function(t,e,n){(function(e){function r(){this.init(),this._w=a,s.call(this,64,56)}var i=n(1),o=n(77),s=n(13),a=new Array(64);i(r,o),r.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},r.prototype._hash=function(){var t=new e(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=r}).call(e,n(0).Buffer)},function(t,e,n){(function(e){function r(){this.init(),this._w=a,s.call(this,128,112)}var i=n(1),o=n(78),s=n(13),a=new Array(160);i(r,o),r.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},r.prototype._hash=function(){function t(t,e,r){n.writeInt32BE(t,r),n.writeInt32BE(e,r+4)}var n=new e(48);return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),n},t.exports=r}).call(e,n(0).Buffer)},function(t,e){function n(){}n.prototype={on:function(t,e,n){var r=this.e||(this.e={});return(r[t]||(r[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){function r(){i.off(t,r),e.apply(n,arguments)}var i=this;return r._=e,this.on(t,r,n)},emit:function(t){var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),r=0,i=n.length;for(r;r-1:t._q(t.useMasterPassword,!0)},on:{change:function(e){var n=t.useMasterPassword,r=e.target,i=!!r.checked;if(Array.isArray(n)){var o=null,s=t._i(n,o);i?s<0&&(t.useMasterPassword=n.concat(o)):s>-1&&(t.useMasterPassword=n.slice(0,s).concat(n.slice(s+1)))}else t.useMasterPassword=i}}}),"\n Check me if you want to use your master password here.\n ",t._h("span",{staticClass:"tag tag-warning",on:{click:function(e){e.preventDefault(),t.seeMasterPasswordHelp=!t.seeMasterPasswordHelp}}},["\n ?\n "])," ",t.seeMasterPasswordHelp?t._h("span",{staticClass:"text-warning"},[t._m(2)," Your master password ",t._m(3)," on a database even encrypted.\n If you want to use your master password here, you can check the option.\n It will replace your master password with a LessPass generated password.\n "]):t._e()])])])])])," ",t._h("div",{staticClass:"form-group row"},[t._h("div",{directives:[{name:"show",rawName:"v-show",value:!t.generatedPassword,expression:"!generatedPassword"}],staticClass:"col-xs-8"},[t._h("button",{staticClass:"btn",class:{"btn-warning":1===t.version,"btn-primary":2===t.version},attrs:{id:"signInButton",type:"button"},on:{click:t.signIn}},[t.loadingSignIn?t._h("span",[t._m(4)]):t._e(),"\n Sign In\n "])," ",t._h("button",{staticClass:"btn btn-secondary",attrs:{id:"registerButton",type:"button"},on:{click:t.register}},[t.loadingRegister?t._h("span",[t._m(5)]):t._e(),"\n Register\n "])])," ",t._h("div",{staticClass:"col-xs-4 text-xs-right"},[t._h("button",{staticClass:"btn btn-secondary",class:{"btn-outline-warning":1===t.version,"btn-outline-primary":2===t.version},attrs:{type:"button"},on:{click:t.toggleVersion}},[t._h("small",{directives:[{name:"show",rawName:"v-show",value:1===t.version,expression:"version===1"}]},["v1"])," ",t._h("small",{directives:[{name:"show",rawName:"v-show",value:2===t.version,expression:"version===2"}]},["v2"])])," ",t._h("button",{staticClass:"btn btn-secondary",attrs:{type:"button"},on:{click:function(e){t.showOptions=!t.showOptions}}},[t._m(6)])])])," ",t.showError?t._h("div",{staticClass:"form-group"},[t._h("div",{staticClass:"alert alert-danger",attrs:{role:"alert"}},["\n "+t._s(t.errorMessage)+"\n "])]):t._e()," ",t.showOptions?t._h("div",{staticClass:"form-group"},[t._m(7)," ",t._h("div",{staticClass:"inner-addon left-addon"},[t._m(8)," ",t._h("input",{directives:[{name:"model",rawName:"v-model",value:t.baseURL,expression:"baseURL"}],staticClass:"form-control",attrs:{id:"baseURL",type:"text",placeholder:"LessPass Database (https://...)"},domProps:{value:t._s(t.baseURL)},on:{input:function(e){e.target.composing||(t.baseURL=e.target.value)}}})," ",t._h("small",{staticClass:"form-text text-muted"},[t.noErrors()?t._h("span",["You can use your self hosted LessPass Database"]):t._e()," ",t.errors.baseURLRequired?t._h("span",{staticClass:"text-danger"},["\n A LessPass database url is required\n "]):t._e()])])]):t._e()," ",t._h("div",{staticClass:"form-group mb-0"},[t._h("router-link",{attrs:{to:{name:"passwordReset"}}},[t._h("small",["Forgot your password?"])])])])},staticRenderFns:[function(){var t=this;return t._h("i",{staticClass:"fa fa-user"})},function(){var t=this;return t._h("i",{staticClass:"fa fa-lock"})},function(){var t=this;return t._h("br")},function(){var t=this;return t._h("b",["should not be saved"])},function(){var t=this;return t._h("i",{staticClass:"fa fa-spinner fa-pulse fa-fw"})},function(){var t=this;return t._h("i",{staticClass:"fa fa-spinner fa-pulse fa-fw"})},function(){var t=this;return t._h("i",{staticClass:"fa fa-sliders",attrs:{"aria-hidden":"true"}})},function(){var t=this;return t._h("label",{attrs:{for:"baseURL"}},["Self Hosted Url"])},function(){var t=this;return t._h("i",{staticClass:"fa fa-globe"})}]}},function(t,e){t.exports={render:function(){var t=this;return t.fingerprint?t._h("span",{staticClass:"input-group-btn"},[t._h("button",{staticClass:"btn",attrs:{id:"fingerprint",type:"button",tabindex:"-1"}},[t._h("small",{staticClass:"hint--left",attrs:{"aria-label":"master password fingerprint"}},[t._h("i",{staticClass:"fa fa-fw",class:[t.icon1],style:{color:t.color1}})," ",t._h("i",{staticClass:"fa fa-fw",class:[t.icon2],style:{color:t.color2}})," ",t._h("i",{staticClass:"fa fa-fw",class:[t.icon3],style:{color:t.color3}})])])]):t._e()},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this;return t._h("div",[t._h("div",{staticClass:"form-group row"},[t._h("div",{staticClass:"col-xs-12"},[t._h("div",{staticClass:"inner-addon left-addon"},[t._m(0)," ",t._h("input",{directives:[{name:"model",rawName:"v-model",value:t.searchQuery,expression:"searchQuery"}],staticClass:"form-control",attrs:{name:"search",placeholder:"Search"},domProps:{value:t._s(t.searchQuery)},on:{input:function(e){e.target.composing||(t.searchQuery=e.target.value)}}})])])])," ",t._h("ul",{staticClass:"list-group"},[0===t.passwords.length?t._h("li",{staticClass:"list-group-item"},["\n You don't have any passwords saved in your database.\n ",t._h("router-link",{attrs:{to:{name:"home"}}},["Would you like to create one ?"])]):t._e()," ",t._l(t.filteredPasswords,function(e){return t._h("li",{staticClass:"list-group-item"},[t._h("delete-button",{staticClass:"float-xs-right mt-1 text-xs-right",attrs:{confirmText:"Are you sure you want to delete this password profile?",confirmButton:"Sure delete it",cancelButton:"Oups no!"},on:{remove:function(n){t.deletePassword(e)}}})," ",t._h("ul",{staticClass:"list-unstyled"},[t._h("li",[t._h("router-link",{attrs:{to:{name:"password",params:{id:e.id}}}},["\n "+t._s(e.site)+"\n "])])," ",t._h("li",["\n "+t._s(e.login)+"\n "])])])})])])},staticRenderFns:[function(){var t=this;return t._h("i",{staticClass:"fa fa-search"})}]}},function(t,e){t.exports={render:function(){var t=this;return t._h("form",{attrs:{id:"password-generator"}},[t._h("div",{staticClass:"form-group"},[t._h("div",{staticClass:"inner-addon left-addon"},[t._m(0)," ",t._m(1)," ",t._h("input",{directives:[{name:"model",rawName:"v-model",value:t.password.site,expression:"password.site"}],ref:"site",staticClass:"form-control",attrs:{id:"site",name:"site",type:"text",placeholder:"Site",list:"savedSites",autocorrect:"off",autocapitalize:"off"},domProps:{value:t._s(t.password.site)},on:{input:function(e){e.target.composing||(t.password.site=e.target.value)}}})," ",t._h("datalist",{attrs:{id:"savedSites"}},[t._l(t.passwords,function(e){return t._h("option",["\n "+t._s(e.site)+" | "+t._s(e.login)+"\n "])})])])])," ",t._h("remove-auto-complete")," ",t._h("div",{staticClass:"form-group"},[t._h("div",{staticClass:"inner-addon left-addon"},[t._m(2)," ",t._m(3)," ",t._h("input",{directives:[{name:"model",rawName:"v-model",value:t.password.login,expression:"password.login"}],staticClass:"form-control",attrs:{id:"login",name:"login",type:"text",placeholder:"Login",autocomplete:"off",autocorrect:"off",autocapitalize:"off"},domProps:{value:t._s(t.password.login)},on:{input:function(e){e.target.composing||(t.password.login=e.target.value)}}})])])," ",t._h("div",{staticClass:"form-group"},[t._h("div",{staticClass:"inner-addon left-addon input-group"},[t._m(4)," ",t._m(5)," ",t._h("input",{directives:[{name:"model",rawName:"v-model",value:t.masterPassword,expression:"masterPassword"}],ref:"masterPassword",staticClass:"form-control",attrs:{id:"masterPassword",name:"masterPassword",type:"password",placeholder:"Master password",autocomplete:"new-password",autocorrect:"off",autocapitalize:"off"},domProps:{value:t._s(t.masterPassword)},on:{keyup:function(e){13===e.keyCode&&(e.preventDefault(),t.generatePassword(e))},input:function(e){e.target.composing||(t.masterPassword=e.target.value)}}})," ",t._h("fingerprint",{attrs:{fingerprint:t.fingerprint},nativeOn:{click:function(e){t.togglePasswordType(t.$refs.masterPassword)}}})])])," ",t._h("div",{staticClass:"form-group row"},[t._h("div",{directives:[{name:"show",rawName:"v-show",value:t.generatedPassword,expression:"generatedPassword"}],staticClass:"col-xs-9"},[t._h("div",{staticClass:"input-group"},[t._h("span",{staticClass:"input-group-btn"},[t._h("button",{ref:"copyPasswordButton",staticClass:"btn",class:{"btn-warning":1===t.password.version,"btn-primary":2===t.password.version},attrs:{id:"copyPasswordButton",type:"button","data-clipboard-text":""}},[t._m(6)])])," ",t._h("input",{staticClass:"form-control read-only",class:{"btn-outline-warning":1===t.password.version,"btn-outline-primary":2===t.password.version},attrs:{type:"password",readonly:"",tabindex:"-1"},domProps:{value:t.generatedPassword},on:{click:function(e){t.togglePasswordType(e.target)}}})])])," ",t._h("div",{directives:[{name:"show",rawName:"v-show",value:!t.generatedPassword,expression:"!generatedPassword"}],staticClass:"col-xs-9"},[t._h("button",{staticClass:"btn",class:{"btn-warning":1===t.password.version,"btn-primary":2===t.password.version},attrs:{type:"button"},on:{click:t.generatePassword}},[t.generatingPassword?t._e():t._h("span",["Generate"])," ",t.generatingPassword?t._h("span",["Generating..."]):t._e()])," ",t._h("button",{staticClass:"btn btn-secondary",class:{"btn-outline-warning":1===t.password.version,"btn-outline-primary":2===t.password.version},attrs:{type:"button"},on:{click:t.toggleVersion}},[t._h("small",{directives:[{name:"show",rawName:"v-show",value:1===t.password.version,expression:"password.version===1"}]},["v1"])," ",t._h("small",{directives:[{name:"show",rawName:"v-show",value:2===t.password.version,expression:"password.version===2"}]},["v2"])])])," ",t._h("div",{staticClass:"col-xs-3"},[t._h("div",{staticClass:"btn-group float-xs-right",attrs:{role:"group"}},[t._h("button",{staticClass:"btn btn-secondary",attrs:{type:"button"},on:{click:function(e){t.showOptions=!t.showOptions}}},[t._m(7)])])])])," ",t.showOptions?t._h("div",{staticClass:"form-group"},["\n Options\n "]):t._e()," ",t.showOptions?t._h("div",{staticClass:"form-group"},[t._h("label",{staticClass:"custom-control custom-checkbox"},[t._h("input",{directives:[{name:"model",rawName:"v-model",value:t.password.lowercase,expression:"password.lowercase"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"lowercase"},domProps:{checked:Array.isArray(t.password.lowercase)?t._i(t.password.lowercase,null)>-1:t._q(t.password.lowercase,!0)},on:{change:function(e){var n=t.password.lowercase,r=e.target,i=!!r.checked;if(Array.isArray(n)){var o=null,s=t._i(n,o);i?s<0&&(t.password.lowercase=n.concat(o)):s>-1&&(t.password.lowercase=n.slice(0,s).concat(n.slice(s+1)))}else t.password.lowercase=i}}})," ",t._m(8)," ",t._m(9)])," ",t._h("label",{staticClass:"custom-control custom-checkbox"},[t._h("input",{directives:[{name:"model",rawName:"v-model",value:t.password.uppercase,expression:"password.uppercase"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"uppercase"},domProps:{checked:Array.isArray(t.password.uppercase)?t._i(t.password.uppercase,null)>-1:t._q(t.password.uppercase,!0)},on:{change:function(e){var n=t.password.uppercase,r=e.target,i=!!r.checked;if(Array.isArray(n)){var o=null,s=t._i(n,o);i?s<0&&(t.password.uppercase=n.concat(o)):s>-1&&(t.password.uppercase=n.slice(0,s).concat(n.slice(s+1)))}else t.password.uppercase=i}}})," ",t._m(10)," ",t._m(11)])," ",t._h("label",{staticClass:"custom-control custom-checkbox"},[t._h("input",{directives:[{name:"model",rawName:"v-model",value:t.password.numbers,expression:"password.numbers"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"numbers"},domProps:{checked:Array.isArray(t.password.numbers)?t._i(t.password.numbers,null)>-1:t._q(t.password.numbers,!0)},on:{change:function(e){var n=t.password.numbers,r=e.target,i=!!r.checked;if(Array.isArray(n)){var o=null,s=t._i(n,o);i?s<0&&(t.password.numbers=n.concat(o)):s>-1&&(t.password.numbers=n.slice(0,s).concat(n.slice(s+1)))}else t.password.numbers=i}}})," ",t._m(12)," ",t._m(13)])," ",t._h("label",{staticClass:"custom-control custom-checkbox"},[t._h("input",{directives:[{name:"model",rawName:"v-model",value:t.password.symbols,expression:"password.symbols"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"symbols"},domProps:{checked:Array.isArray(t.password.symbols)?t._i(t.password.symbols,null)>-1:t._q(t.password.symbols,!0)},on:{change:function(e){var n=t.password.symbols,r=e.target,i=!!r.checked;if(Array.isArray(n)){var o=null,s=t._i(n,o);i?s<0&&(t.password.symbols=n.concat(o)):s>-1&&(t.password.symbols=n.slice(0,s).concat(n.slice(s+1)))}else t.password.symbols=i}}})," ",t._m(14)," ",t._m(15)])]):t._e()," ",t.showOptions?t._h("div",{staticClass:"form-group row"},[t._h("div",{staticClass:"col-xs-6"},[t._m(16)," ",t._h("div",{staticClass:"input-group"},[t._h("input",{directives:[{name:"model",rawName:"v-model",value:t.password.length,expression:"password.length"}],staticClass:"form-control",attrs:{type:"number",id:"passwordLength",min:"4"},domProps:{value:t._s(t.password.length)},on:{input:function(e){e.target.composing||(t.password.length=t._n(e.target.value))}}})," ",t._h("span",{staticClass:"input-group-addon",on:{click:function(e){e.preventDefault(),t.decrementPasswordLength(e)}}},[t._m(17)])," ",t._h("span",{staticClass:"input-group-addon",on:{click:function(e){e.preventDefault(),t.incrementPasswordLength(e)}}},[t._m(18)])])])," ",t._h("div",{staticClass:"col-xs-6"},[t._m(19)," ",t._h("div",{staticClass:"input-group"},[t._h("input",{directives:[{name:"model",rawName:"v-model",value:t.password.counter,expression:"password.counter"}],staticClass:"form-control",attrs:{type:"number",id:"passwordCounter",min:"1"},domProps:{value:t._s(t.password.counter)},on:{input:function(e){e.target.composing||(t.password.counter=t._n(e.target.value))}}})," ",t._h("span",{staticClass:"input-group-addon",on:{click:function(e){e.preventDefault(),t.decrementCounter(e)}}},[t._m(20)])," ",t._h("span",{staticClass:"input-group-addon",on:{click:function(e){e.preventDefault(),t.incrementCounter(e)}}},[t._m(21)])])])]):t._e()," ",t.showError?t._h("div",{staticClass:"form-group"},[t._m(22)]):t._e()," ",1!==t.version||t.showError?t._e():t._h("div",{staticClass:"form-group mb-0"},[t._h("div",{staticClass:"alert alert-warning mb-0",attrs:{role:"alert"}},[t._h("small",[t._m(23),"\n You use an obsolette version of LessPass.\n The default version will be version 2 in\n ",t._h("strong",{staticClass:"hint--right",attrs:{"aria-label":"10 jan 2017"}},[t._s(t.getDayBeforeV2())+" days"]),".\n You can continue to use version 1 even if we advise you to update your passwords.\n "])])])])},staticRenderFns:[function(){var t=this;return t._h("label",{staticClass:"sr-only",attrs:{for:"site"}},["Site"])},function(){var t=this;return t._h("i",{staticClass:"fa fa-globe"})},function(){var t=this;return t._h("label",{staticClass:"sr-only",attrs:{for:"login"}},["Login"])},function(){var t=this;return t._h("i",{staticClass:"fa fa-user"})},function(){var t=this;return t._h("label",{staticClass:"sr-only",attrs:{for:"masterPassword"}},["Master Password"])},function(){var t=this;return t._h("i",{staticClass:"fa fa-lock"})},function(){var t=this;return t._h("i",{staticClass:"fa fa-clipboard",attrs:{"aria-hidden":"true"}})},function(){var t=this;return t._h("i",{staticClass:"fa fa-sliders",attrs:{"aria-hidden":"true"}})},function(){var t=this;return t._h("span",{staticClass:"custom-control-indicator"})},function(){var t=this;return t._h("span",{staticClass:"custom-control-description"},["abc"])},function(){var t=this;return t._h("span",{staticClass:"custom-control-indicator"})},function(){var t=this;return t._h("span",{staticClass:"custom-control-description"},["ABC"])},function(){var t=this;return t._h("span",{staticClass:"custom-control-indicator"})},function(){var t=this;return t._h("span",{staticClass:"custom-control-description"},["123"])},function(){var t=this;return t._h("span",{staticClass:"custom-control-indicator"})},function(){var t=this;return t._h("span",{staticClass:"custom-control-description"},["%!@"])},function(){var t=this;return t._h("label",{attrs:{for:"passwordLength"}},["Length"])},function(){var t=this;return t._h("i",{staticClass:"fa fa-minus",attrs:{"aria-hidden":"true"}})},function(){var t=this;return t._h("i",{staticClass:"fa fa-plus",attrs:{"aria-hidden":"true"}})},function(){var t=this;return t._h("label",{attrs:{for:"passwordCounter"}},["Counter"])},function(){var t=this;return t._h("i",{staticClass:"fa fa-minus",attrs:{"aria-hidden":"true"}})},function(){var t=this;return t._h("i",{staticClass:"fa fa-plus",attrs:{"aria-hidden":"true"}})},function(){var t=this;return t._h("div",{staticClass:"alert alert-danger",attrs:{role:"alert"}},["\n site, login and master password fields are mandatory\n "])},function(){var t=this;return t._h("i",{staticClass:"fa fa-exclamation-triangle",attrs:{"aria-hidden":"true"}})}]}},function(t,e){t.exports={render:function(){var t=this;return t._h("div",{staticClass:"card",class:{v1:1===t.version,v2:2===t.version},staticStyle:{"max-width":"470px"},attrs:{id:"lesspass"}},[t._h("lesspass-menu")," ",t._h("div",{staticClass:"card-block"},[t._h("router-view")])])},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this;return t._h("form",{on:{submit:function(e){e.preventDefault(),t.resetPassword(e)}}},[t.showError?t._h("div",{staticClass:"form-group row"},[t._m(0)]):t._e()," ",t.successMessage?t._h("div",{staticClass:"form-group row"},[t._m(1)]):t._e()," ",t._h("div",{staticClass:"form-group row"},[t._h("div",{staticClass:"col-xs-12"},[t._h("div",{staticClass:"inner-addon left-addon"},[t._m(2)," ",t._h("input",{directives:[{name:"model",rawName:"v-model",value:t.email,expression:"email"}],staticClass:"form-control",attrs:{id:"email",name:"email",type:"email",placeholder:"Email"},domProps:{value:t._s(t.email)},on:{input:function(e){e.target.composing||(t.email=e.target.value)}}})," ",t._h("small",{staticClass:"form-text text-muted text-danger"},[t.emailRequired?t._h("span",["An email is required"]):t._e()])])])])," ",t._h("div",{staticClass:"form-group row"},[t._h("div",{staticClass:"col-xs-12"},[t._h("button",{staticClass:"btn",class:{"btn-warning":1===t.version,"btn-primary":2===t.version},attrs:{id:"loginButton",type:"submit"}},[t.loading?t._h("span",[t._m(3)]):t._e(),"\n Send me a reset link\n "])])])])},staticRenderFns:[function(){var t=this;return t._h("div",{staticClass:"col-xs-12 text-muted text-danger"},["\n Oops! Something went wrong. Retry in a few minutes.\n "])},function(){var t=this;return t._h("div",{staticClass:"col-xs-12 text-muted text-success"},["\n If a matching account was found an email was sent to allow you to reset your password.\n "])},function(){var t=this;return t._h("i",{staticClass:"fa fa-user"})},function(){var t=this;return t._h("i",{staticClass:"fa fa-spinner fa-pulse fa-fw"})}]}},function(t,e){t.exports={render:function(){var t=this;return t._h("div",{attrs:{id:"delete-button"}},[t.confirm?t._h("div",{staticClass:"form-group has-danger"},[t._h("button",{staticClass:"btn btn-danger btn-sm",attrs:{type:"button"},on:{click:function(e){e.preventDefault(),t.confirmDelete(e)}}},["\n "+t._s(t.confirmButton)+"\n "])," ",t._h("button",{staticClass:"btn btn-secondary btn-sm",attrs:{type:"button"},on:{click:function(e){e.preventDefault(),t.confirm=!1}}},["\n "+t._s(t.cancelButton)+"\n "])," ",t._h("div",{staticClass:"form-control-feedback"},[t._s(t.confirmText)])]):t._e()," ",t.confirm?t._e():t._h("button",{staticClass:"btn btn-outline-danger btn-sm",attrs:{type:"button"},on:{click:function(e){e.preventDefault(),t.confirm=!0}}},[t._m(0)])])},staticRenderFns:[function(){var t=this;return t._h("i",{staticClass:"fa fa-trash fa-fw"})}]}},function(t,e){t.exports={render:function(){var t=this;return t._h("form",{on:{submit:function(e){e.preventDefault(),t.resetPasswordConfirm(e)}}},[t.showError?t._h("div",{staticClass:"form-group row"},[t._h("div",{staticClass:"col-xs-12 text-muted text-danger"},["\n "+t._s(t.errorMessage)+"\n "])]):t._e()," ",t.successMessage?t._h("div",{staticClass:"form-group row"},[t._h("div",{staticClass:"col-xs-12 text-muted text-success"},["\n You're password was reset successfully.\n ",t._h("router-link",{attrs:{to:{name:"login"}}},["Do you want to login ?"])])]):t._e()," ",t._h("div",{staticClass:"form-group row"},[t._h("div",{staticClass:"col-xs-12"},[t._h("div",{staticClass:"inner-addon left-addon"},[t._m(0)," ",t._h("input",{directives:[{name:"model",rawName:"v-model",value:t.new_password,expression:"new_password"}],staticClass:"form-control",attrs:{id:"new-password",name:"new-password",type:"password",autocomplete:"new-password",placeholder:"New Password"},domProps:{value:t._s(t.new_password)},on:{input:function(e){e.target.composing||(t.new_password=e.target.value)}}})," ",t._h("small",{staticClass:"form-text text-muted text-danger"},[t.passwordRequired?t._h("span",["A password is required"]):t._e()])])])])," ",t._h("div",{ -staticClass:"form-group row"},[t._h("div",{staticClass:"col-xs-12"},[t._h("button",{staticClass:"btn",class:{"btn-warning":1===t.version,"btn-primary":2===t.version},attrs:{id:"loginButton",type:"submit"}},["\n Reset my password\n "])])])])},staticRenderFns:[function(){var t=this;return t._h("i",{staticClass:"fa fa-lock"})}]}},function(t,e){t.exports={render:function(){var t=this;return t._h("div",{attrs:{id:"menu"}},[t._h("div",{directives:[{name:"show",rawName:"v-show",value:t.isAuthenticated,expression:"isAuthenticated"}],staticClass:"card-header",class:{"card-warning":1===t.version,"card-primary":2===t.version}},[t._h("div",{staticClass:"row"},[t._h("div",{staticClass:"col-xs-6"},[t._h("router-link",{staticClass:"white-link",attrs:{to:{name:"home"}}},["LessPass"])," ",t._h("span",{staticClass:"white-link",on:{click:t.saveOrUpdatePassword}},["DIRTY"==t.passwordStatus?t._h("i",{staticClass:"fa fa-save ml-1 fa-clickable"}):t._e()])," ","CREATED"==t.passwordStatus||"UPDATED"==t.passwordStatus?t._h("span",{staticClass:"text-success"},[t._m(0)]):t._e()])," ",t._h("div",{staticClass:"col-xs-6 text-xs-right"},[t._h("router-link",{staticClass:"white-link ml-1",attrs:{to:{name:"passwords"}}},[t._h("i",{staticClass:"fa fa-key",attrs:{"aria-hidden":"true"}})])," ",t._h("button",{staticClass:"white-link ml-1 btn btn-link p-0 m-0",attrs:{type:"button"},on:{click:t.logout}},[t._m(1)])])])])," ",t._h("div",{directives:[{name:"show",rawName:"v-show",value:t.isGuest,expression:"isGuest"}],staticClass:"card-header",class:{"card-warning":1===t.version,"card-primary":2===t.version}},[t._h("div",{staticClass:"row"},[t._h("div",{staticClass:"index-header"},[t._h("div",{staticClass:"col-xs-6"},[t._h("router-link",{staticClass:"white-link",attrs:{to:{name:"home"}}},["LessPass"])])," ",t._h("div",{staticClass:"col-xs-6 text-xs-right"},[t._h("router-link",{staticClass:"white-link pl-1",attrs:{to:{name:"login"}}},[t._h("i",{staticClass:"fa fa-user-secret fa-clickable",attrs:{"aria-hidden":"true"}})])])])])])])},staticRenderFns:[function(){var t=this;return t._h("i",{staticClass:"fa fa-check ml-1 text-success"})},function(){var t=this;return t._h("i",{staticClass:"fa fa-sign-out",attrs:{"aria-hidden":"true"}})}]}},function(t,e,n){/** - * vue-router v2.0.2 - * (c) 2016 Evan You - * @license MIT - */ -!function(e,n){t.exports=n()}(this,function(){"use strict";function t(t,e,n){if("/"===t.charAt(0))return t;if("?"===t.charAt(0)||"#"===t.charAt(0))return e+t;var r=e.split("/");n&&r[r.length-1]||r.pop();for(var i=t.replace(/^\//,"").split("/"),o=0;o=0&&(e=t.slice(r),t=t.slice(0,r));var i=t.indexOf("?");return i>=0&&(n=t.slice(i+1),t=t.slice(0,i)),{path:t,query:n,hash:e}}function n(t){return t.replace(/\/\//g,"/")}function r(t,e){if(!t)throw new Error("[vue-router] "+e)}function i(t,e){t||"undefined"!=typeof console&&console.warn("[vue-router] "+e)}function o(t,e){if(void 0===e&&(e={}),t){var n;try{n=s(t)}catch(t){i(!1,t.message),n={}}for(var r in e)n[r]=e[r];return n}return e}function s(t){var e={};return(t=t.trim().replace(/^(\?|#|&)/,""))?(t.split("&").forEach(function(t){var n=t.replace(/\+/g," ").split("="),r=dt(n.shift()),i=n.length>0?dt(n.join("=")):null;void 0===e[r]?e[r]=i:Array.isArray(e[r])?e[r].push(i):e[r]=[e[r],i]}),e):e}function a(t){var e=t?Object.keys(t).sort().map(function(e){var n=t[e];if(void 0===n)return"";if(null===n)return pt(e);if(Array.isArray(n)){var r=[];return n.slice().forEach(function(t){void 0!==t&&(null===t?r.push(pt(e)):r.push(pt(e)+"="+pt(t)))}),r.join("&")}return pt(e)+"="+pt(n)}).filter(function(t){return t.length>0}).join("&"):null;return e?"?"+e:""}function u(t,e,n){var r={name:e.name||t&&t.name,meta:t&&t.meta||{},path:e.path||"/",hash:e.hash||"",query:e.query||{},params:e.params||{},fullPath:f(e),matched:t?c(t):[]};return n&&(r.redirectedFrom=f(n)),Object.freeze(r)}function c(t){for(var e=[];t;)e.unshift(t),t=t.parent;return e}function f(t){var e=t.path,n=t.query;void 0===n&&(n={});var r=t.hash;return void 0===r&&(r=""),(e||"/")+a(n)+r}function l(t,e){return e===vt?t===e:!!e&&(t.path&&e.path?t.path.replace(mt,"")===e.path.replace(mt,"")&&t.hash===e.hash&&h(t.query,e.query):!(!t.name||!e.name)&&(t.name===e.name&&t.hash===e.hash&&h(t.query,e.query)&&h(t.params,e.params)))}function h(t,e){void 0===t&&(t={}),void 0===e&&(e={});var n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&n.every(function(n){return String(t[n])===String(e[n])})}function p(t,e){return 0===t.path.indexOf(e.path.replace(/\/$/,""))&&(!e.hash||t.hash===e.hash)&&d(t.query,e.query)}function d(t,e){for(var n in e)if(!(n in t))return!1;return!0}function v(n,r,i){var s="string"==typeof n?{path:n}:n;if(s.name||s._normalized)return s;var a=e(s.path||""),u=r&&r.path||"/",c=a.path?t(a.path,u,i):r&&r.path||"/",f=o(a.query,s.query),l=s.hash||a.hash;return l&&"#"!==l.charAt(0)&&(l="#"+l),{_normalized:!0,path:c,query:f,hash:l}}function m(t){if(t)for(var e,n=0;n=t.length?n():t[i]?e(t[i],function(){r(i+1)}):r(i+1)};r(0)}function q(t){if(!t)if(Tt){var e=document.querySelector("base");t=e?e.getAttribute("href"):"/"}else t="/";return"/"!==t.charAt(0)&&(t="/"+t),t.replace(/\/$/,"")}function F(t,e){var n,r=Math.max(t.length,e.length);for(n=0;n=0?e:0)+"#"+t)}var lt,ht={name:"router-view",functional:!0,props:{name:{type:String,default:"default"}},render:function(t,e){var n=e.props,r=e.children,i=e.parent,o=e.data;o.routerView=!0;for(var s=i.$route,a=i._routerViewCache||(i._routerViewCache={}),u=0,c=!1;i;)i.$vnode&&i.$vnode.data.routerView&&u++,i._inactive&&(c=!0),i=i.$parent;o.routerViewDepth=u;var f=s.matched[u];if(!f)return t();var l=n.name,h=c?a[l]:a[l]=f.components[l];if(!c){var p=o.hook||(o.hook={});p.init=function(t){f.instances[l]=t.child},p.prepatch=function(t,e){f.instances[l]=e.child},p.destroy=function(t){f.instances[l]===t.child&&(f.instances[l]=void 0)}}return t(h,o,r)}},pt=encodeURIComponent,dt=decodeURIComponent,vt=u(null,{path:"/"}),mt=/\/$/,gt=[String,Object],yt={name:"router-link",props:{to:{type:gt,required:!0},tag:{type:String,default:"a"},exact:Boolean,append:Boolean,replace:Boolean,activeClass:String},render:function(t){var e=this,n=this.$router,r=this.$route,i=v(this.to,r,this.append),o=n.match(i,r),s=o.redirectedFrom||o.fullPath,a=n.history.base,c=g(a,s,n.mode),f={},h=this.activeClass||n.options.linkActiveClass||"router-link-active",d=i.path?u(null,i):o;f[h]=this.exact?l(r,d):p(r,d);var y={click:function(t){if(!(t.metaKey||t.ctrlKey||t.shiftKey||t.defaultPrevented||0!==t.button)){var r=t.target.getAttribute("target");/\b_blank\b/i.test(r)||(t.preventDefault(),e.replace?n.replace(i):n.push(i))}}},_={class:f};if("a"===this.tag)_.on=y,_.attrs={href:c};else{var w=m(this.$slots.default);if(w){w.isStatic=!1;var b=lt.util.extend,E=w.data=b({},w.data);E.on=y;var x=w.data.attrs=b({},w.data.attrs);x.href=c}else _.on=y}return t(this.tag,_,this.$slots.default)}},_t=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)},wt=_t,bt=j,Et=_,xt=w,Ct=x,St=P,kt=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");bt.parse=Et,bt.compile=xt,bt.tokensToFunction=Ct,bt.tokensToRegExp=St;var At=Object.create(null),Ot=Object.create(null),Tt="undefined"!=typeof window,Rt=Tt&&function(){var t=window.navigator.userAgent;return(t.indexOf("Android 2.")===-1&&t.indexOf("Android 4.0")===-1||t.indexOf("Mobile Safari")===-1||t.indexOf("Chrome")!==-1||t.indexOf("Windows Phone")!==-1)&&(window.history&&"pushState"in window.history)}(),Pt=function(t,e){this.router=t,this.base=q(e),this.current=vt,this.pending=null};Pt.prototype.listen=function(t){this.cb=t},Pt.prototype.transitionTo=function(t,e){var n=this,r=this.router.match(t,this.current);this.confirmTransition(r,function(){n.updateRoute(r),e&&e(r),n.ensureURL()})},Pt.prototype.confirmTransition=function(t,e){var n=this,r=this.current;if(l(t,r))return void this.ensureURL();var i=F(this.current.matched,t.matched),o=i.deactivated,s=i.activated,a=[].concat(H(o),this.router.beforeHooks,s.map(function(t){return t.beforeEnter}),K(s));this.pending=t;var u=function(e,i){n.pending===t&&e(t,r,function(t){t===!1?n.ensureURL(!0):"string"==typeof t||"object"==typeof t?n.push(t):i(t)})};$(a,u,function(){var r=[],i=z(s,r,function(){return n.current===t});$(i,u,function(){n.pending===t&&(n.pending=null,e(t),n.router.app.$nextTick(function(){r.forEach(function(t){return t()})}))})})},Pt.prototype.updateRoute=function(t){var e=this.current;this.current=t,this.cb&&this.cb(t),this.router.afterHooks.forEach(function(n){n&&n(t,e)})};var jt=Object.create(null),Mt=function(){return String(Date.now())},Lt=Mt(),Dt=function(t){function e(e,n){var r=this;t.call(this,e,n);var i=e.options.scrollBehavior;window.addEventListener("popstate",function(t){Lt=t.state&&t.state.key;var e=r.current;r.transitionTo(it(r.base),function(t){i&&r.handleScroll(t,e,!0)})}),i&&window.addEventListener("scroll",function(){X(Lt)})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.go=function(t){window.history.go(t)},e.prototype.push=function(t){var e=this,r=this.current;this.transitionTo(t,function(t){ot(n(e.base+t.fullPath)),e.handleScroll(t,r,!1)})},e.prototype.replace=function(t){var e=this,r=this.current;this.transitionTo(t,function(t){st(n(e.base+t.fullPath)),e.handleScroll(t,r,!1)})},e.prototype.ensureURL=function(t){if(it(this.base)!==this.current.fullPath){var e=n(this.base+this.current.fullPath);t?ot(e):st(e)}},e.prototype.handleScroll=function(t,e,n){var i=this.router;if(i.app){var o=i.options.scrollBehavior;o&&(r("function"==typeof o,"scrollBehavior must be a function"),i.app.$nextTick(function(){var r=Q(Lt),i=o(t,e,n?r:null);if(i){var s="object"==typeof i;if(s&&"string"==typeof i.selector){var a=document.querySelector(i.selector);a?r=tt(a):et(i)&&(r=nt(i))}else s&&et(i)&&(r=nt(i));r&&window.scrollTo(r.x,r.y)}}))}},e}(Pt),Nt=function(t){function e(e,n,r){t.call(this,e,n),r&&this.checkFallback()||at()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.checkFallback=function(){var t=it(this.base);if(!/^\/#/.test(t))return window.location.replace(n(this.base+"/#"+t)),!0},e.prototype.onHashChange=function(){at()&&this.transitionTo(ut(),function(t){ft(t.fullPath)})},e.prototype.push=function(t){this.transitionTo(t,function(t){ct(t.fullPath)})},e.prototype.replace=function(t){this.transitionTo(t,function(t){ft(t.fullPath)})},e.prototype.go=function(t){window.history.go(t)},e.prototype.ensureURL=function(t){var e=this.current.fullPath;ut()!==e&&(t?ct(e):ft(e))},e}(Pt),Bt=function(t){function e(e){t.call(this,e),this.stack=[],this.index=-1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.push=function(t){var e=this;this.transitionTo(t,function(t){e.stack=e.stack.slice(0,e.index+1).concat(t),e.index++})},e.prototype.replace=function(t){var e=this;this.transitionTo(t,function(t){e.stack=e.stack.slice(0,e.index).concat(t)})},e.prototype.go=function(t){var e=this,n=this.index+t;if(!(n<0||n>=this.stack.length)){var r=this.stack[n];this.confirmTransition(r,function(){e.index=n,e.updateRoute(r)})}},e.prototype.ensureURL=function(){},e}(Pt),It=function(t){void 0===t&&(t={}),this.app=null,this.options=t,this.beforeHooks=[],this.afterHooks=[],this.match=N(t.routes||[]);var e=t.mode||"hash";switch(this.fallback="history"===e&&!Rt,this.fallback&&(e="hash"),Tt||(e="abstract"),this.mode=e,e){case"history":this.history=new Dt(this,t.base);break;case"hash":this.history=new Nt(this,t.base,this.fallback);break;case"abstract":this.history=new Bt(this);break;default:r(!1,"invalid mode: "+e)}},Ut={currentRoute:{}};return Ut.currentRoute.get=function(){return this.history&&this.history.current},It.prototype.init=function(t){var e=this;r(y.installed,"not installed. Make sure to call `Vue.use(VueRouter)` before creating root instance."),this.app=t;var n=this.history;n instanceof Dt?n.transitionTo(it(n.base)):n instanceof Nt&&n.transitionTo(ut(),function(){window.addEventListener("hashchange",function(){n.onHashChange()})}),n.listen(function(t){e.app._route=t})},It.prototype.beforeEach=function(t){this.beforeHooks.push(t)},It.prototype.afterEach=function(t){this.afterHooks.push(t)},It.prototype.push=function(t){this.history.push(t)},It.prototype.replace=function(t){this.history.replace(t)},It.prototype.go=function(t){this.history.go(t)},It.prototype.back=function(){this.go(-1)},It.prototype.forward=function(){this.go(1)},It.prototype.getMatchedComponents=function(){return this.currentRoute?[].concat.apply([],this.currentRoute.matched.map(function(t){return Object.keys(t.components).map(function(e){return t.components[e]})})):[]},Object.defineProperties(It.prototype,Ut),It.install=y,Tt&&window.Vue&&window.Vue.use(It),It})},function(t,e,n){var r=n(163);"string"==typeof r&&(r=[[t.i,r,""]]);n(31)(r,{});r.locals&&(t.exports=r.locals)},function(t,e,n){var r=n(164);"string"==typeof r&&(r=[[t.i,r,""]]);n(31)(r,{});r.locals&&(t.exports=r.locals)},function(t,e,n){var r=n(165);"string"==typeof r&&(r=[[t.i,r,""]]);n(31)(r,{});r.locals&&(t.exports=r.locals)},function(t,e,n){var r=n(166);"string"==typeof r&&(r=[[t.i,r,""]]);n(31)(r,{});r.locals&&(t.exports=r.locals)},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,configurable:!1,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,configurable:!1,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e){},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var i=n(32),o=r(i);n(81),n(82),n(83);var s=n(84),a=r(s),u=n(80),c=r(u),f=n(79),l=r(f);new o.default({el:"#lesspass",store:c.default,router:l.default,render:function(t){return t(a.default)}})}])); \ No newline at end of file +var p=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],h=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],d=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],v=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],m=[0,1518500249,1859775393,2400959708,2840853838],g=[1352829926,1548603684,1836072691,2053994217,0];t.exports=l}).call(e,n(0).Buffer)},function(t,e){function n(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName)t.focus(),t.setSelectionRange(0,t.value.length),e=t.value;else{t.hasAttribute("contenteditable")&&t.focus();var n=window.getSelection(),r=document.createRange();r.selectNodeContents(t),n.removeAllRanges(),n.addRange(r),e=n.toString()}return e}t.exports=n},function(t,e,n){var e=t.exports=function(t){t=t.toLowerCase();var n=e[t];if(!n)throw new Error(t+" is not supported (we accept pull requests)");return new n};e.sha=n(191),e.sha1=n(192),e.sha224=n(193),e.sha256=n(77),e.sha384=n(194),e.sha512=n(78)},function(t,e,n){(function(e){function r(){this.init(),this._w=f,u.call(this,64,56)}function i(t){return t<<5|t>>>27}function o(t){return t<<30|t>>>2}function s(t,e,n,r){return 0===t?e&n|~e&r:2===t?e&n|e&r|n&r:e^n^r}var a=n(1),u=n(13),c=[1518500249,1859775393,-1894007588,-899497514],f=new Array(80);a(r,u),r.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},r.prototype._update=function(t){for(var e=this._w,n=0|this._a,r=0|this._b,a=0|this._c,u=0|this._d,f=0|this._e,l=0;l<16;++l)e[l]=t.readInt32BE(4*l);for(;l<80;++l)e[l]=e[l-3]^e[l-8]^e[l-14]^e[l-16];for(var p=0;p<80;++p){var h=~~(p/20),d=i(n)+s(h,r,a,u)+f+e[p]+c[h]|0;f=u,u=a,a=o(r),r=n,n=d}this._a=n+this._a|0,this._b=r+this._b|0,this._c=a+this._c|0,this._d=u+this._d|0,this._e=f+this._e|0},r.prototype._hash=function(){var t=new e(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=r}).call(e,n(0).Buffer)},function(t,e,n){(function(e){function r(){this.init(),this._w=l,c.call(this,64,56)}function i(t){return t<<1|t>>>31}function o(t){return t<<5|t>>>27}function s(t){return t<<30|t>>>2}function a(t,e,n,r){return 0===t?e&n|~e&r:2===t?e&n|e&r|n&r:e^n^r}var u=n(1),c=n(13),f=[1518500249,1859775393,-1894007588,-899497514],l=new Array(80);u(r,c),r.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},r.prototype._update=function(t){for(var e=this._w,n=0|this._a,r=0|this._b,u=0|this._c,c=0|this._d,l=0|this._e,p=0;p<16;++p)e[p]=t.readInt32BE(4*p);for(;p<80;++p)e[p]=i(e[p-3]^e[p-8]^e[p-14]^e[p-16]);for(var h=0;h<80;++h){var d=~~(h/20),v=o(n)+a(d,r,u,c)+l+e[h]+f[d]|0;l=c,c=u,u=s(r),r=n,n=v}this._a=n+this._a|0,this._b=r+this._b|0,this._c=u+this._c|0,this._d=c+this._d|0,this._e=l+this._e|0},r.prototype._hash=function(){var t=new e(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=r}).call(e,n(0).Buffer)},function(t,e,n){(function(e){function r(){this.init(),this._w=a,s.call(this,64,56)}var i=n(1),o=n(77),s=n(13),a=new Array(64);i(r,o),r.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},r.prototype._hash=function(){var t=new e(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=r}).call(e,n(0).Buffer)},function(t,e,n){(function(e){function r(){this.init(),this._w=a,s.call(this,128,112)}var i=n(1),o=n(78),s=n(13),a=new Array(160);i(r,o),r.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},r.prototype._hash=function(){function t(t,e,r){n.writeInt32BE(t,r),n.writeInt32BE(e,r+4)}var n=new e(48);return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),n},t.exports=r}).call(e,n(0).Buffer)},function(t,e){function n(){}n.prototype={on:function(t,e,n){var r=this.e||(this.e={});return(r[t]||(r[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){function r(){i.off(t,r),e.apply(n,arguments)}var i=this;return r._=e,this.on(t,r,n)},emit:function(t){var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),r=0,i=n.length;for(r;r-1:t._q(t.useMasterPassword,!0)},on:{change:function(e){var n=t.useMasterPassword,r=e.target,i=!!r.checked;if(Array.isArray(n)){var o=null,s=t._i(n,o);i?s<0&&(t.useMasterPassword=n.concat(o)):s>-1&&(t.useMasterPassword=n.slice(0,s).concat(n.slice(s+1)))}else t.useMasterPassword=i}}}),"\n Check me if you want to use your master password here.\n ",e("span",{staticClass:"tag tag-warning",on:{click:function(e){e.preventDefault(),t.seeMasterPasswordHelp=!t.seeMasterPasswordHelp}}},["\n ?\n "])," ",t.seeMasterPasswordHelp?e("span",{staticClass:"text-warning"},[e("br")," Your master password ",e("b",["should not be saved"])," on a database even encrypted.\n If you want to use your master password here, you can check the option.\n It will replace your master password with a LessPass generated password.\n "]):t._e()])])])])])," ",e("div",{staticClass:"form-group row"},[e("div",{directives:[{name:"show",rawName:"v-show",value:!t.generatedPassword,expression:"!generatedPassword"}],staticClass:"col-xs-8"},[e("button",{staticClass:"btn",class:{"btn-warning":1===t.version,"btn-primary":2===t.version},attrs:{id:"signInButton",type:"button"},on:{click:t.signIn}},[t.loadingSignIn?e("span",[e("i",{staticClass:"fa fa-spinner fa-pulse fa-fw"})]):t._e(),"\n Sign In\n "])," ",e("button",{staticClass:"btn btn-secondary",attrs:{id:"registerButton",type:"button"},on:{click:t.register}},[t.loadingRegister?e("span",[e("i",{staticClass:"fa fa-spinner fa-pulse fa-fw"})]):t._e(),"\n Register\n "])])," ",e("div",{staticClass:"col-xs-4 text-xs-right"},[e("button",{staticClass:"btn btn-secondary",class:{"btn-outline-warning":1===t.version,"btn-outline-primary":2===t.version},attrs:{type:"button"},on:{click:t.toggleVersion}},[e("small",{directives:[{name:"show",rawName:"v-show",value:1===t.version,expression:"version===1"}]},["v1"])," ",e("small",{directives:[{name:"show",rawName:"v-show",value:2===t.version,expression:"version===2"}]},["v2"])])," ",e("button",{staticClass:"btn btn-secondary",attrs:{type:"button"},on:{click:function(e){t.showOptions=!t.showOptions}}},[e("i",{staticClass:"fa fa-sliders",attrs:{"aria-hidden":"true"}})])])])," ",t.showError?e("div",{staticClass:"form-group"},[e("div",{staticClass:"alert alert-danger",attrs:{role:"alert"}},["\n "+t._s(t.errorMessage)+"\n "])]):t._e()," ",t.showOptions?e("div",{staticClass:"form-group"},[e("label",{attrs:{for:"baseURL"}},["Self Hosted Url"])," ",e("div",{staticClass:"inner-addon left-addon"},[e("i",{staticClass:"fa fa-globe"})," ",e("input",{directives:[{name:"model",rawName:"v-model",value:t.baseURL,expression:"baseURL"}],staticClass:"form-control",attrs:{id:"baseURL",type:"text",placeholder:"LessPass Database (https://...)"},domProps:{value:t._s(t.baseURL)},on:{input:function(e){e.target.composing||(t.baseURL=e.target.value)}}})," ",e("small",{staticClass:"form-text text-muted"},[t.noErrors()?e("span",["You can use your self hosted LessPass Database"]):t._e()," ",t.errors.baseURLRequired?e("span",{staticClass:"text-danger"},["\n A LessPass database url is required\n "]):t._e()])])]):t._e()," ",e("div",{staticClass:"form-group mb-0"},[e("router-link",{attrs:{to:{name:"passwordReset"}}},[e("small",["Forgot your password?"])])])])},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement;return t.fingerprint?e("span",{staticClass:"input-group-btn"},[e("button",{staticClass:"btn",attrs:{id:"fingerprint",type:"button",tabindex:"-1"}},[e("small",{staticClass:"hint--left",attrs:{"aria-label":"master password fingerprint"}},[e("i",{staticClass:"fa fa-fw",class:[t.icon1],style:{color:t.color1}})," ",e("i",{staticClass:"fa fa-fw",class:[t.icon2],style:{color:t.color2}})," ",e("i",{staticClass:"fa fa-fw",class:[t.icon3],style:{color:t.color3}})])])]):t._e()},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement;return e("div",[e("div",{staticClass:"form-group row"},[e("div",{staticClass:"col-xs-12"},[e("div",{staticClass:"inner-addon left-addon"},[e("i",{staticClass:"fa fa-search"})," ",e("input",{directives:[{name:"model",rawName:"v-model",value:t.searchQuery,expression:"searchQuery"}],staticClass:"form-control",attrs:{name:"search",placeholder:"Search"},domProps:{value:t._s(t.searchQuery)},on:{input:function(e){e.target.composing||(t.searchQuery=e.target.value)}}})])])])," ",e("ul",{staticClass:"list-group"},[0===t.passwords.length?e("li",{staticClass:"list-group-item"},["\n You don't have any passwords saved in your database.\n ",e("router-link",{attrs:{to:{name:"home"}}},["Would you like to create one ?"])]):t._e()," ",t._l(t.filteredPasswords,function(n){return e("li",{staticClass:"list-group-item"},[e("delete-button",{staticClass:"float-xs-right mt-1 text-xs-right",attrs:{confirmText:"Are you sure you want to delete this password profile?",confirmButton:"Sure delete it",cancelButton:"Oups no!"},on:{remove:function(e){t.deletePassword(n)}}})," ",e("ul",{staticClass:"list-unstyled"},[e("li",[e("router-link",{attrs:{to:{name:"password",params:{id:n.id}}}},["\n "+t._s(n.site)+"\n "])])," ",e("li",["\n "+t._s(n.login)+"\n "])])])})])])},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement;return e("form",{attrs:{id:"password-generator"}},[e("div",{staticClass:"form-group"},[e("div",{staticClass:"inner-addon left-addon"},[e("label",{staticClass:"sr-only",attrs:{for:"site"}},["Site"])," ",e("i",{staticClass:"fa fa-globe"})," ",e("input",{directives:[{name:"model",rawName:"v-model",value:t.password.site,expression:"password.site"}],ref:"site",staticClass:"form-control",attrs:{id:"site",name:"site",type:"text",placeholder:"Site",list:"savedSites",autocorrect:"off",autocapitalize:"off"},domProps:{value:t._s(t.password.site)},on:{input:function(e){e.target.composing||(t.password.site=e.target.value)}}})," ",e("datalist",{attrs:{id:"savedSites"}},[t._l(t.passwords,function(n){return e("option",["\n "+t._s(n.site)+" | "+t._s(n.login)+"\n "])})])])])," ",e("remove-auto-complete")," ",e("div",{staticClass:"form-group"},[e("div",{staticClass:"inner-addon left-addon"},[e("label",{staticClass:"sr-only",attrs:{for:"login"}},["Login"])," ",e("i",{staticClass:"fa fa-user"})," ",e("input",{directives:[{name:"model",rawName:"v-model",value:t.password.login,expression:"password.login"}],staticClass:"form-control",attrs:{id:"login",name:"login",type:"text",placeholder:"Login",autocomplete:"off",autocorrect:"off",autocapitalize:"off"},domProps:{value:t._s(t.password.login)},on:{input:function(e){e.target.composing||(t.password.login=e.target.value)}}})])])," ",e("div",{staticClass:"form-group"},[e("div",{staticClass:"inner-addon left-addon input-group"},[e("label",{staticClass:"sr-only",attrs:{for:"masterPassword"}},["Master Password"])," ",e("i",{staticClass:"fa fa-lock"})," ",e("input",{directives:[{name:"model",rawName:"v-model",value:t.masterPassword,expression:"masterPassword"}],ref:"masterPassword",staticClass:"form-control",attrs:{id:"masterPassword",name:"masterPassword",type:"password",placeholder:"Master password",autocomplete:"new-password",autocorrect:"off",autocapitalize:"off"},domProps:{value:t._s(t.masterPassword)},on:{keyup:function(e){13===e.keyCode&&(e.preventDefault(),t.generatePassword(e))},input:function(e){e.target.composing||(t.masterPassword=e.target.value)}}})," ",e("fingerprint",{attrs:{fingerprint:t.fingerprint},nativeOn:{click:function(e){t.togglePasswordType(t.$refs.masterPassword)}}})])])," ",e("div",{staticClass:"form-group row"},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.generatedPassword,expression:"generatedPassword"}],staticClass:"col-xs-9"},[e("div",{staticClass:"input-group"},[e("span",{staticClass:"input-group-btn"},[e("button",{ref:"copyPasswordButton",staticClass:"btn",class:{"btn-warning":1===t.password.version,"btn-primary":2===t.password.version},attrs:{id:"copyPasswordButton",type:"button","data-clipboard-text":""}},[e("i",{staticClass:"fa fa-clipboard",attrs:{"aria-hidden":"true"}})])])," ",e("input",{ref:"generatedPassword",staticClass:"form-control",class:{"btn-outline-warning":1===t.password.version,"btn-outline-primary":2===t.password.version},attrs:{type:"password",tabindex:"-1"},domProps:{value:t.generatedPassword}})," ",e("span",{staticClass:"input-group-btn"},[e("button",{staticClass:"btn",class:{"btn-outline-warning":1===t.password.version,"btn-outline-primary":2===t.password.version},attrs:{id:"revealGeneratedPassword",type:"button"},on:{click:function(e){t.togglePasswordType(t.$refs.generatedPassword)}}},[e("i",{staticClass:"fa fa-eye",attrs:{"aria-hidden":"true"}})])])])])," ",e("div",{directives:[{name:"show",rawName:"v-show",value:!t.generatedPassword,expression:"!generatedPassword"}],staticClass:"col-xs-9"},[e("button",{staticClass:"btn",class:{"btn-warning":1===t.password.version,"btn-primary":2===t.password.version},attrs:{type:"button"},on:{click:t.generatePassword}},[t.generatingPassword?t._e():e("span",["Generate"])," ",t.generatingPassword?e("span",["Generating..."]):t._e()])," ",e("button",{staticClass:"btn btn-secondary",class:{"btn-outline-warning":1===t.password.version,"btn-outline-primary":2===t.password.version},attrs:{type:"button"},on:{click:t.toggleVersion}},[e("small",{directives:[{name:"show",rawName:"v-show",value:1===t.password.version,expression:"password.version===1"}]},["v1"])," ",e("small",{directives:[{name:"show",rawName:"v-show",value:2===t.password.version,expression:"password.version===2"}]},["v2"])])])," ",e("div",{staticClass:"col-xs-3"},[e("div",{staticClass:"btn-group float-xs-right",attrs:{role:"group"}},[e("button",{staticClass:"btn btn-secondary",attrs:{type:"button"},on:{click:function(e){t.showOptions=!t.showOptions}}},[e("i",{staticClass:"fa fa-sliders",attrs:{"aria-hidden":"true"}})])])])])," ",t.showOptions?e("div",{staticClass:"form-group pt-1"},[e("label",{staticClass:"form-check-inline"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.password.lowercase,expression:"password.lowercase"}],staticClass:"form-check-input",attrs:{type:"checkbox",id:"lowercase"},domProps:{checked:Array.isArray(t.password.lowercase)?t._i(t.password.lowercase,null)>-1:t._q(t.password.lowercase,!0)},on:{change:function(e){var n=t.password.lowercase,r=e.target,i=!!r.checked;if(Array.isArray(n)){var o=null,s=t._i(n,o);i?s<0&&(t.password.lowercase=n.concat(o)):s>-1&&(t.password.lowercase=n.slice(0,s).concat(n.slice(s+1)))}else t.password.lowercase=i}}})," abc\n "])," ",e("label",{staticClass:"form-check-inline"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.password.uppercase,expression:"password.uppercase"}],staticClass:"form-check-input",attrs:{type:"checkbox",id:"uppercase"},domProps:{checked:Array.isArray(t.password.uppercase)?t._i(t.password.uppercase,null)>-1:t._q(t.password.uppercase,!0)},on:{change:function(e){var n=t.password.uppercase,r=e.target,i=!!r.checked;if(Array.isArray(n)){var o=null,s=t._i(n,o);i?s<0&&(t.password.uppercase=n.concat(o)):s>-1&&(t.password.uppercase=n.slice(0,s).concat(n.slice(s+1)))}else t.password.uppercase=i}}})," ABC\n "])," ",e("label",{staticClass:"form-check-inline"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.password.numbers,expression:"password.numbers"}],staticClass:"form-check-input",attrs:{type:"checkbox",id:"numbers"},domProps:{checked:Array.isArray(t.password.numbers)?t._i(t.password.numbers,null)>-1:t._q(t.password.numbers,!0)},on:{change:function(e){var n=t.password.numbers,r=e.target,i=!!r.checked;if(Array.isArray(n)){var o=null,s=t._i(n,o);i?s<0&&(t.password.numbers=n.concat(o)):s>-1&&(t.password.numbers=n.slice(0,s).concat(n.slice(s+1)))}else t.password.numbers=i}}}),"\n 123\n "])," ",e("label",{staticClass:"form-check-inline"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.password.symbols,expression:"password.symbols"}],staticClass:"form-check-input",attrs:{type:"checkbox",id:"symbols"},domProps:{checked:Array.isArray(t.password.symbols)?t._i(t.password.symbols,null)>-1:t._q(t.password.symbols,!0)},on:{change:function(e){var n=t.password.symbols,r=e.target,i=!!r.checked;if(Array.isArray(n)){var o=null,s=t._i(n,o);i?s<0&&(t.password.symbols=n.concat(o)):s>-1&&(t.password.symbols=n.slice(0,s).concat(n.slice(s+1)))}else t.password.symbols=i}}}),"\n %!@\n "])]):t._e()," ",t.showOptions?e("div",{staticClass:"form-group row"},[e("div",{staticClass:"col-xs-6"},[e("label",{attrs:{for:"passwordLength"}},["Length"])," ",e("div",{staticClass:"input-group"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.password.length,expression:"password.length"}],staticClass:"form-control",attrs:{type:"number",id:"passwordLength",min:"4"},domProps:{value:t._s(t.password.length)},on:{input:function(e){e.target.composing||(t.password.length=t._n(e.target.value))}}})," ",e("span",{staticClass:"input-group-addon",on:{click:function(e){e.preventDefault(),t.decrementPasswordLength(e)}}},[e("i",{staticClass:"fa fa-minus",attrs:{"aria-hidden":"true"}})])," ",e("span",{staticClass:"input-group-addon",on:{click:function(e){e.preventDefault(),t.incrementPasswordLength(e)}}},[e("i",{staticClass:"fa fa-plus",attrs:{"aria-hidden":"true"}})])])])," ",e("div",{staticClass:"col-xs-6"},[e("label",{attrs:{for:"passwordCounter"}},["Counter"])," ",e("div",{staticClass:"input-group"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.password.counter,expression:"password.counter"}],staticClass:"form-control",attrs:{type:"number",id:"passwordCounter",min:"1"},domProps:{value:t._s(t.password.counter)},on:{input:function(e){e.target.composing||(t.password.counter=t._n(e.target.value))}}})," ",e("span",{staticClass:"input-group-addon",on:{click:function(e){e.preventDefault(),t.decrementCounter(e)}}},[e("i",{staticClass:"fa fa-minus",attrs:{"aria-hidden":"true"}})])," ",e("span",{staticClass:"input-group-addon",on:{click:function(e){e.preventDefault(),t.incrementCounter(e)}}},[e("i",{staticClass:"fa fa-plus",attrs:{"aria-hidden":"true"}})])])])]):t._e()," ",t.showOptions?e("div",{staticClass:"form-group"},[e("button",{staticClass:"btn btn-secondary btn-sm",attrs:{type:"button"},on:{click:t.saveDefault}},["\n save as default\n "])," ",t.optionsSaved?e("span",{staticClass:"text-success"},[e("i",{staticClass:"fa fa-check",attrs:{"aria-hidden":"true"}})]):t._e()]):t._e()," ",t.showError?e("div",{staticClass:"form-group"},[e("div",{staticClass:"alert alert-danger",attrs:{role:"alert"}},["\n site, login and master password fields are mandatory\n "])]):t._e()," ",1!==t.version||t.showError||t.showOptions?t._e():e("div",{staticClass:"form-group mb-0"},[e("div",{staticClass:"alert alert-warning mb-0",attrs:{role:"alert"}},[e("small",[e("i",{staticClass:"fa fa-exclamation-triangle",attrs:{"aria-hidden":"true"}}),"\n You are using a deprecated version of LessPass.\n The default version will be version 2 in\n ",e("strong",{staticClass:"hint--right",attrs:{"aria-label":"10 jan 2017"}},[t._s(t.getDayBeforeV2())+" days"]),".\n You can continue to use version 1, but we strongly advise you to migrate your passwords to\n version 2.\n "])])])])},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement;return e("div",{staticClass:"card",class:{v1:1===t.version,v2:2===t.version},staticStyle:{"max-width":"470px"},attrs:{id:"lesspass"}},[e("lesspass-menu")," ",e("div",{staticClass:"card-block"},[e("router-view")])])},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement;return e("form",{on:{submit:function(e){e.preventDefault(),t.resetPassword(e)}}},[t.showError?e("div",{staticClass:"form-group row"},[e("div",{staticClass:"col-xs-12 text-muted text-danger"},["\n Oops! Something went wrong. Retry in a few minutes.\n "])]):t._e()," ",t.successMessage?e("div",{staticClass:"form-group row"},[e("div",{staticClass:"col-xs-12 text-muted text-success"},["\n If a matching account was found an email was sent to allow you to reset your password.\n "])]):t._e()," ",e("div",{staticClass:"form-group row"},[e("div",{staticClass:"col-xs-12"},[e("div",{staticClass:"inner-addon left-addon"},[e("i",{staticClass:"fa fa-user"})," ",e("input",{directives:[{name:"model",rawName:"v-model",value:t.email,expression:"email"}],staticClass:"form-control",attrs:{id:"email",name:"email",type:"email",placeholder:"Email"},domProps:{value:t._s(t.email)},on:{input:function(e){e.target.composing||(t.email=e.target.value)}}})," ",e("small",{staticClass:"form-text text-muted text-danger"},[t.emailRequired?e("span",["An email is required"]):t._e()])])])])," ",e("div",{staticClass:"form-group row"},[e("div",{staticClass:"col-xs-12"},[e("button",{staticClass:"btn",class:{"btn-warning":1===t.version,"btn-primary":2===t.version},attrs:{id:"loginButton",type:"submit"}},[t.loading?e("span",[e("i",{staticClass:"fa fa-spinner fa-pulse fa-fw"})]):t._e(),"\n Send me a reset link\n "])])])])},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement;return e("div",{attrs:{id:"delete-button"}},[t.confirm?e("div",{staticClass:"form-group has-danger"},[e("button",{staticClass:"btn btn-danger btn-sm",attrs:{type:"button"},on:{click:function(e){e.preventDefault(),t.confirmDelete(e)}}},["\n "+t._s(t.confirmButton)+"\n "])," ",e("button",{staticClass:"btn btn-secondary btn-sm",attrs:{type:"button"},on:{click:function(e){e.preventDefault(),t.confirm=!1}}},["\n "+t._s(t.cancelButton)+"\n "])," ",e("div",{staticClass:"form-control-feedback"},[t._s(t.confirmText)])]):t._e()," ",t.confirm?t._e():e("button",{staticClass:"btn btn-outline-danger btn-sm",attrs:{type:"button"},on:{click:function(e){e.preventDefault(),t.confirm=!0}}},[e("i",{staticClass:"fa fa-trash fa-fw"})])])},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement;return e("form",{on:{submit:function(e){e.preventDefault(),t.resetPasswordConfirm(e)}}},[t.showError?e("div",{staticClass:"form-group row"},[e("div",{staticClass:"col-xs-12 text-muted text-danger"},["\n "+t._s(t.errorMessage)+"\n "])]):t._e()," ",t.successMessage?e("div",{staticClass:"form-group row"},[e("div",{staticClass:"col-xs-12 text-muted text-success"},["\n You're password was reset successfully.\n ",e("router-link",{attrs:{to:{name:"login"}}},["Do you want to login ?"])])]):t._e()," ",e("div",{staticClass:"form-group row"},[e("div",{staticClass:"col-xs-12"},[e("div",{staticClass:"inner-addon left-addon"},[e("i",{staticClass:"fa fa-lock"})," ",e("input",{directives:[{name:"model",rawName:"v-model",value:t.new_password,expression:"new_password"}],staticClass:"form-control",attrs:{id:"new-password",name:"new-password",type:"password",autocomplete:"new-password",placeholder:"New Password"},domProps:{value:t._s(t.new_password)},on:{input:function(e){e.target.composing||(t.new_password=e.target.value)}}})," ",e("small",{staticClass:"form-text text-muted text-danger"},[t.passwordRequired?e("span",["A password is required"]):t._e()])])])])," ",e("div",{staticClass:"form-group row"},[e("div",{staticClass:"col-xs-12"},[e("button",{staticClass:"btn",class:{"btn-warning":1===t.version,"btn-primary":2===t.version},attrs:{id:"loginButton",type:"submit"}},["\n Reset my password\n "])])])])},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement;return e("div",{attrs:{id:"menu"}},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.isAuthenticated,expression:"isAuthenticated"}],staticClass:"card-header",class:{"card-warning":1===t.version,"card-primary":2===t.version}},[e("div",{staticClass:"row"},[e("div",{staticClass:"col-xs-6"},[e("router-link",{staticClass:"white-link",attrs:{to:{name:"home"}}},["LessPass"])," ",e("span",{staticClass:"white-link",on:{click:t.saveOrUpdatePassword}},["DIRTY"==t.passwordStatus?e("i",{staticClass:"fa fa-save ml-1 fa-clickable"}):t._e()])," ","CREATED"==t.passwordStatus||"UPDATED"==t.passwordStatus?e("span",{staticClass:"text-success"},[e("i",{staticClass:"fa fa-check ml-1 text-success"})]):t._e()])," ",e("div",{staticClass:"col-xs-6 text-xs-right"},[e("router-link",{staticClass:"white-link ml-1",attrs:{to:{name:"passwords"}}},[e("i",{staticClass:"fa fa-key",attrs:{"aria-hidden":"true"}})])," ",e("button",{staticClass:"white-link ml-1 btn btn-link p-0 m-0",attrs:{type:"button"},on:{click:t.logout}},[e("i",{staticClass:"fa fa-sign-out",attrs:{"aria-hidden":"true"}})])])])])," ",e("div",{directives:[{name:"show",rawName:"v-show",value:t.isGuest,expression:"isGuest"}],staticClass:"card-header",class:{"card-warning":1===t.version,"card-primary":2===t.version}},[e("div",{staticClass:"row"},[e("div",{staticClass:"index-header" +},[e("div",{staticClass:"col-xs-6"},[e("router-link",{staticClass:"white-link",attrs:{to:{name:"home"}}},["LessPass"])])," ",e("div",{staticClass:"col-xs-6 text-xs-right"},[e("router-link",{staticClass:"white-link pl-1",attrs:{to:{name:"login"}}},[e("i",{staticClass:"fa fa-user-secret fa-clickable",attrs:{"aria-hidden":"true"}})])])])])])])},staticRenderFns:[]}},function(t,e,n){"use strict";(function(e){function n(t,e){if(!t)throw new Error("[vue-router] "+e)}function r(t,e){t||"undefined"!=typeof console&&console.warn("[vue-router] "+e)}function i(t,n){if(void 0===n&&(n={}),t){var i;try{i=o(t)}catch(t){"production"!==e.env.NODE_ENV&&r(!1,t.message),i={}}for(var s in n)i[s]=n[s];return i}return n}function o(t){var e={};return(t=t.trim().replace(/^(\?|#|&)/,""))?(t.split("&").forEach(function(t){var n=t.replace(/\+/g," ").split("="),r=wt(n.shift()),i=n.length>0?wt(n.join("=")):null;void 0===e[r]?e[r]=i:Array.isArray(e[r])?e[r].push(i):e[r]=[e[r],i]}),e):e}function s(t){var e=t?Object.keys(t).map(function(e){var n=t[e];if(void 0===n)return"";if(null===n)return yt(e);if(Array.isArray(n)){var r=[];return n.slice().forEach(function(t){void 0!==t&&(null===t?r.push(yt(e)):r.push(yt(e)+"="+yt(t)))}),r.join("&")}return yt(e)+"="+yt(n)}).filter(function(t){return t.length>0}).join("&"):null;return e?"?"+e:""}function a(t,e,n){var r={name:e.name||t&&t.name,meta:t&&t.meta||{},path:e.path||"/",hash:e.hash||"",query:e.query||{},params:e.params||{},fullPath:c(e),matched:t?u(t):[]};return n&&(r.redirectedFrom=c(n)),Object.freeze(r)}function u(t){for(var e=[];t;)e.unshift(t),t=t.parent;return e}function c(t){var e=t.path,n=t.query;void 0===n&&(n={});var r=t.hash;return void 0===r&&(r=""),(e||"/")+s(n)+r}function f(t,e){return e===_t?t===e:!!e&&(t.path&&e.path?t.path.replace(bt,"")===e.path.replace(bt,"")&&t.hash===e.hash&&l(t.query,e.query):!(!t.name||!e.name)&&(t.name===e.name&&t.hash===e.hash&&l(t.query,e.query)&&l(t.params,e.params)))}function l(t,e){void 0===t&&(t={}),void 0===e&&(e={});var n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&n.every(function(n){return String(t[n])===String(e[n])})}function p(t,e){return 0===t.path.indexOf(e.path.replace(/\/$/,""))&&(!e.hash||t.hash===e.hash)&&h(t.query,e.query)}function h(t,e){for(var n in e)if(!(n in t))return!1;return!0}function d(t){if(!(t.metaKey||t.ctrlKey||t.shiftKey||t.defaultPrevented||0!==t.button)){var e=t.target.getAttribute("target");if(!/\b_blank\b/i.test(e))return t.preventDefault(),!0}}function v(t){if(t)for(var e,n=0;n=0&&(e=t.slice(r),t=t.slice(0,r));var i=t.indexOf("?");return i>=0&&(n=t.slice(i+1),t=t.slice(0,i)),{path:t,query:n,hash:e}}function w(t){return t.replace(/\/\//g,"/")}function _(t){var e=Object.create(null),n=Object.create(null);return t.forEach(function(t){b(e,n,t)}),{pathMap:e,nameMap:n}}function b(t,i,o,s,a){var u=o.path,c=o.name;"production"!==e.env.NODE_ENV&&(n(null!=u,'"path" is required in a route configuration.'),n("string"!=typeof o.component,'route config "component" for path: '+String(u||c)+" cannot be a string id. Use an actual component instead."));var f={path:E(u,s),components:o.components||{default:o.component},instances:{},name:c,parent:s,matchAs:a,redirect:o.redirect,beforeEnter:o.beforeEnter,meta:o.meta||{}};o.children&&("production"!==e.env.NODE_ENV&&o.name&&o.children.some(function(t){return/^\/?$/.test(t.path)})&&r(!1,"Named Route '"+o.name+"' has a default child route.\n When navigating to this named route (:to=\"{name: '"+o.name+"'\"), the default child route will not be rendered.\n Remove the name from this route and use the name of the default child route for named links instead."),o.children.forEach(function(e){b(t,i,e,f)})),void 0!==o.alias&&(Array.isArray(o.alias)?o.alias.forEach(function(e){b(t,i,{path:e},s,f.path)}):b(t,i,{path:o.alias},s,f.path)),t[f.path]||(t[f.path]=f),c&&(i[c]?"production"!==e.env.NODE_ENV&&r(!1,'Duplicate named routes definition: { name: "'+c+'", path: "'+f.path+'" }'):i[c]=f)}function E(t,e){return t=t.replace(/\/$/,""),"/"===t[0]?t:null==e?t:w(e.path+"/"+t)}function x(t,e){for(var n,r=[],i=0,o=0,s="",a=e&&e.delimiter||"/";null!=(n=Pt.exec(t));){var u=n[0],c=n[1],f=n.index;if(s+=t.slice(o,f),o=f+u.length,c)s+=c[1];else{var l=t[o],p=n[2],h=n[3],d=n[4],v=n[5],m=n[6],g=n[7];s&&(r.push(s),s="");var y=null!=p&&null!=l&&l!==p,w="+"===m||"*"===m,_="?"===m||"*"===m,b=n[2]||a,E=d||v;r.push({name:h||i++,prefix:p||"",delimiter:b,optional:_,repeat:w,partial:y,asterisk:!!g,pattern:E?T(E):g?".*":"[^"+O(b)+"]+?"})}}return o-1&&(r.params[a]=e.params[a]);if(o)return r.path=I(o.path,r.params,'named route "'+i+'"'),u(o,r,n)}else if(r.path){r.params={};for(var c in f)if(F(c,r.params,r.path))return u(f[c],r,n)}return u(null,r)}function o(t,o){var s=t.redirect,c="function"==typeof s?s(a(t,o)):s;if("string"==typeof c&&(c={path:c}),!c||"object"!=typeof c)return"production"!==e.env.NODE_ENV&&r(!1,"invalid redirect option: "+JSON.stringify(c)),u(null,o);var f=c,p=f.name,h=f.path,d=o.query,v=o.hash,m=o.params;if(d=f.hasOwnProperty("query")?f.query:d,v=f.hasOwnProperty("hash")?f.hash:v,m=f.hasOwnProperty("params")?f.params:m,p){var g=l[p];return"production"!==e.env.NODE_ENV&&n(g,'redirect failed: named route "'+p+'" not found.'),i({_normalized:!0,name:p,query:d,hash:v,params:m},void 0,o)}if(h){var y=V(h,t),w=I(y,m,'redirect route with path "'+y+'"');return i({_normalized:!0,path:w,query:d,hash:v},void 0,o)}return r(!1,"invalid redirect option: "+JSON.stringify(c)),u(null,o)}function s(t,e,n){var r=I(n,e.params,'aliased route with path "'+n+'"'),o=i({_normalized:!0,path:r});if(o){var s=o.matched,a=s[s.length-1];return e.params=o.params,u(a,e)}return u(null,e)}function u(t,e,n){return t&&t.redirect?o(t,n||e):t&&t.matchAs?s(t,e,t.matchAs):a(t,e,n)}var c=_(t),f=c.pathMap,l=c.nameMap;return i}function F(t,e,n){var r=B(t),i=r.regexp,o=r.keys,s=n.match(i);if(!s)return!1;if(!e)return!0;for(var a=1,u=s.length;a=t.length?n():t[i]?e(t[i],function(){r(i+1)}):r(i+1)};r(0)}function W(t){if(!t)if(Mt){var e=document.querySelector("base");t=e?e.getAttribute("href"):"/"}else t="/";return"/"!==t.charAt(0)&&(t="/"+t),t.replace(/\/$/,"")}function z(t,e){var n,r=Math.max(t.length,e.length);for(n=0;n=0?e:0)+"#"+t)}function vt(t,e,n){var r="hash"===n?"/#"+e:e;return t?w(t+r):r}var mt,gt={name:"router-view",functional:!0,props:{name:{type:String,default:"default"}},render:function(t,e){var n=e.props,r=e.children,i=e.parent,o=e.data;o.routerView=!0;for(var s=i.$route,a=i._routerViewCache||(i._routerViewCache={}),u=0,c=!1;i;)i.$vnode&&i.$vnode.data.routerView&&u++,i._inactive&&(c=!0),i=i.$parent;o.routerViewDepth=u;var f=s.matched[u];if(!f)return t();var l=n.name,p=c?a[l]:a[l]=f.components[l];if(!c){var h=o.hook||(o.hook={});h.init=function(t){f.instances[l]=t.child},h.prepatch=function(t,e){f.instances[l]=e.child},h.destroy=function(t){f.instances[l]===t.child&&(f.instances[l]=void 0)}}return t(p,o,r)}},yt=encodeURIComponent,wt=decodeURIComponent,_t=a(null,{path:"/"}),bt=/\/$/,Et=[String,Object],xt={name:"router-link",props:{to:{type:Et,required:!0},tag:{type:String,default:"a"},exact:Boolean,append:Boolean,replace:Boolean,activeClass:String,event:{type:[String,Array],default:"click"}},render:function(t){var e=this,n=this.$router,r=this.$route,i=n.resolve(this.to,r,this.append),o=i.normalizedTo,s=i.resolved,u=i.href,c={},l=this.activeClass||n.options.linkActiveClass||"router-link-active",h=o.path?a(null,o):s;c[l]=this.exact?f(r,h):p(r,h);var m=function(t){d(t)&&(e.replace?n.replace(o):n.push(o))},g={click:d};Array.isArray(this.event)?this.event.forEach(function(t){g[t]=m}):g[this.event]=m;var y={class:c};if("a"===this.tag)y.on=g,y.attrs={href:u};else{var w=v(this.$slots.default);if(w){w.isStatic=!1;var _=mt.util.extend,b=w.data=_({},w.data);b.on=g;var E=w.data.attrs=_({},w.data.attrs);E.href=u}else y.on=g}return t(this.tag,y,this.$slots.default)}},St=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)},kt=St,Ct=L,At=x,Ot=S,Tt=A,Rt=D,Pt=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");Ct.parse=At,Ct.compile=Ot,Ct.tokensToFunction=Tt,Ct.tokensToRegExp=Rt;var jt=Object.create(null),Nt=Object.create(null),Mt="undefined"!=typeof window,Dt=Mt&&function(){var t=window.navigator.userAgent;return(t.indexOf("Android 2.")===-1&&t.indexOf("Android 4.0")===-1||t.indexOf("Mobile Safari")===-1||t.indexOf("Chrome")!==-1||t.indexOf("Windows Phone")!==-1)&&(window.history&&"pushState"in window.history)}(),Lt=function(t,e){this.router=t,this.base=W(e),this.current=_t,this.pending=null};Lt.prototype.listen=function(t){this.cb=t},Lt.prototype.transitionTo=function(t,e){var n=this,r=this.router.match(t,this.current);this.confirmTransition(r,function(){n.updateRoute(r),e&&e(r),n.ensureURL()})},Lt.prototype.confirmTransition=function(t,e){var n=this,r=this.current;if(f(t,r))return void this.ensureURL();var i=z(this.current.matched,t.matched),o=i.deactivated,s=i.activated,a=[].concat(G(o),this.router.beforeHooks,s.map(function(t){return t.beforeEnter}),Q(s));this.pending=t;var u=function(e,i){n.pending===t&&e(t,r,function(t){t===!1?n.ensureURL(!0):"string"==typeof t||"object"==typeof t?"object"==typeof t&&t.replace?n.replace(t):n.push(t):i(t)})};H(a,u,function(){var r=[],i=J(s,r,function(){return n.current===t});H(i,u,function(){n.pending===t&&(n.pending=null,e(t),n.router.app&&n.router.app.$nextTick(function(){r.forEach(function(t){return t()})}))})})},Lt.prototype.updateRoute=function(t){var e=this.current;this.current=t,this.cb&&this.cb(t),this.router.afterHooks.forEach(function(n){n&&n(t,e)})};var Bt=Object.create(null),It=function(){return String(Date.now())},$t=It(),Ut=function(t){function r(e,n){var r=this;t.call(this,e,n);var i=e.options.scrollBehavior;window.addEventListener("popstate",function(t){$t=t.state&&t.state.key;var e=r.current;r.transitionTo(ut(r.base),function(t){i&&r.handleScroll(t,e,!0)})}),i&&window.addEventListener("scroll",function(){nt($t)})}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.go=function(t){window.history.go(t)},r.prototype.push=function(t){var e=this,n=this.current;this.transitionTo(t,function(t){ct(w(e.base+t.fullPath)),e.handleScroll(t,n,!1)})},r.prototype.replace=function(t){var e=this,n=this.current;this.transitionTo(t,function(t){ft(w(e.base+t.fullPath)),e.handleScroll(t,n,!1)})},r.prototype.ensureURL=function(t){if(ut(this.base)!==this.current.fullPath){var e=w(this.base+this.current.fullPath);t?ct(e):ft(e)}},r.prototype.handleScroll=function(t,r,i){var o=this.router;if(o.app){var s=o.options.scrollBehavior;s&&("production"!==e.env.NODE_ENV&&n("function"==typeof s,"scrollBehavior must be a function"),o.app.$nextTick(function(){var e=rt($t),n=s(t,r,i?e:null);if(n){var o="object"==typeof n;if(o&&"string"==typeof n.selector){var a=document.querySelector(n.selector);a?e=it(a):ot(n)&&(e=st(n))}else o&&ot(n)&&(e=st(n));e&&window.scrollTo(e.x,e.y)}}))}},r}(Lt),qt=function(t){function e(e,n,r){var i=this;t.call(this,e,n),window.addEventListener("hashchange",function(){i.onHashChange()}),r&&this.checkFallback()||lt()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.checkFallback=function(){var t=ut(this.base);if(!/^\/#/.test(t))return window.location.replace(w(this.base+"/#"+t)),!0},e.prototype.onHashChange=function(){lt()&&this.transitionTo(pt(),function(t){dt(t.fullPath)})},e.prototype.push=function(t){this.transitionTo(t,function(t){ht(t.fullPath)})},e.prototype.replace=function(t){this.transitionTo(t,function(t){dt(t.fullPath)})},e.prototype.go=function(t){window.history.go(t)},e.prototype.ensureURL=function(t){var e=this.current.fullPath;pt()!==e&&(t?ht(e):dt(e))},e}(Lt),Ft=function(t){function e(e){t.call(this,e),this.stack=[],this.index=-1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.push=function(t){var e=this;this.transitionTo(t,function(t){e.stack=e.stack.slice(0,e.index+1).concat(t),e.index++})},e.prototype.replace=function(t){var e=this;this.transitionTo(t,function(t){e.stack=e.stack.slice(0,e.index).concat(t)})},e.prototype.go=function(t){var e=this,n=this.index+t;if(!(n<0||n>=this.stack.length)){var r=this.stack[n];this.confirmTransition(r,function(){e.index=n,e.updateRoute(r)})}},e.prototype.ensureURL=function(){},e}(Lt),Vt=function(t){void 0===t&&(t={}),this.app=null,this.options=t,this.beforeHooks=[],this.afterHooks=[],this.match=q(t.routes||[]);var r=t.mode||"hash";switch(this.fallback="history"===r&&!Dt,this.fallback&&(r="hash"),Mt||(r="abstract"),this.mode=r,r){case"history":this.history=new Ut(this,t.base);break;case"hash":this.history=new qt(this,t.base,this.fallback);break;case"abstract":this.history=new Ft(this);break;default:"production"!==e.env.NODE_ENV&&n(!1,"invalid mode: "+r)}},Ht={currentRoute:{}};Ht.currentRoute.get=function(){return this.history&&this.history.current},Vt.prototype.init=function(t){var r=this;"production"!==e.env.NODE_ENV&&n(m.installed,"not installed. Make sure to call `Vue.use(VueRouter)` before creating root instance."),this.app=t;var i=this.history;i instanceof Ut?i.transitionTo(ut(i.base)):i instanceof qt&&i.transitionTo(pt()),i.listen(function(t){r.app._route=t})},Vt.prototype.beforeEach=function(t){this.beforeHooks.push(t)},Vt.prototype.afterEach=function(t){this.afterHooks.push(t)},Vt.prototype.push=function(t){this.history.push(t)},Vt.prototype.replace=function(t){this.history.replace(t)},Vt.prototype.go=function(t){this.history.go(t)},Vt.prototype.back=function(){this.go(-1)},Vt.prototype.forward=function(){this.go(1)},Vt.prototype.getMatchedComponents=function(t){var e=t?this.resolve(t).resolved:this.currentRoute;return e?[].concat.apply([],e.matched.map(function(t){return Object.keys(t.components).map(function(e){return t.components[e]})})):[]},Vt.prototype.resolve=function(t,e,n){var r=$(t,e||this.history.current,n),i=this.match(r,e),o=i.redirectedFrom||i.fullPath,s=this.history.base,a=vt(s,o,this.mode);return{normalizedTo:r,resolved:i,href:a}},Object.defineProperties(Vt.prototype,Ht),Vt.install=m,Mt&&window.Vue&&window.Vue.use(Vt),t.exports=Vt}).call(e,n(5))},function(t,e,n){var r=n(163);"string"==typeof r&&(r=[[t.i,r,""]]);n(32)(r,{});r.locals&&(t.exports=r.locals)},function(t,e,n){var r=n(164);"string"==typeof r&&(r=[[t.i,r,""]]);n(32)(r,{});r.locals&&(t.exports=r.locals)},function(t,e,n){var r=n(165);"string"==typeof r&&(r=[[t.i,r,""]]);n(32)(r,{});r.locals&&(t.exports=r.locals)},function(t,e,n){var r=n(166);"string"==typeof r&&(r=[[t.i,r,""]]);n(32)(r,{});r.locals&&(t.exports=r.locals)},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,configurable:!1,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,configurable:!1,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e){},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var i=n(33),o=r(i);n(81),n(82),n(83);var s=n(84),a=r(s),u=n(80),c=r(u),f=n(79),l=r(f);new o.default({el:"#lesspass",store:c.default,router:l.default,render:function(t){return t(a.default)}})}])); \ No newline at end of file diff --git a/extension/manifest.json b/extension/manifest.json index fc61684..aa0b5ff 100644 --- a/extension/manifest.json +++ b/extension/manifest.json @@ -2,7 +2,7 @@ "description": "chrome and firefox web extension for lesspass password manager", "manifest_version": 2, "name": "LessPass", - "version": "2.0.0", + "version": "2.1.0", "homepage_url": "https://github.com/lesspass/webextension", "icons": { "64": "icons/logo-64.png" @@ -10,11 +10,7 @@ "commands": { "_execute_browser_action": { "suggested_key": { - "default": "Ctrl+Shift+L", - "windows": "Ctrl+Shift+L", - "mac": "Command+Shift+L", - "chromeos": "Ctrl+Shift+L", - "linux": "Ctrl+Shift+L" + "default": "Ctrl+Shift+L" } } }, diff --git a/package.json b/package.json index 6448c5d..6c02c7e 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "zip": "rm -rf build && mkdir build && cd extension && zip -r extension.zip ./* -x ./*.js && cp extension.zip ../build/lesspass.firefox.xpi && mv extension.zip ../build/lesspass.chrome.zip && cd .." }, "dependencies": { - "lesspass-pure": "^4.0.0" + "lesspass-pure": "^4.1.0" }, "devDependencies": { "gulp": "^3.9.1"