diff --git a/chrome-extension/js/etherwallet-master.js b/chrome-extension/js/etherwallet-master.js
index 37365a188c..4f42b036f7 100644
--- a/chrome-extension/js/etherwallet-master.js
+++ b/chrome-extension/js/etherwallet-master.js
@@ -746,6 +746,8 @@ bity.post = function (path, data, callback) {
module.exports = bity;
},{}],14:[function(require,module,exports){
+"use strict";
+
var darklist = function darklist() {
return [{
address: "0xD0cC2B24980CBCCA47EF755Da88B220a82291407",
@@ -7269,6 +7271,8 @@ var walletGenCtrl = function walletGenCtrl($scope) {
module.exports = walletGenCtrl;
},{}],38:[function(require,module,exports){
+'use strict';
+
// For token sale holders:
// 1. Add the address users are sending to
// 2. Add the gas limit users should use to send successfully (this avoids OOG errors)
@@ -7910,6 +7914,8 @@ var walletDecryptDrtv = function walletDecryptDrtv() {
module.exports = walletDecryptDrtv;
},{"./walletDecryptDrtv.html":47}],49:[function(require,module,exports){
+'use strict';
+
var ens = require('./ens');
var domainsaleInterface = require('./domainsaleConfigs/domainsaleABI.json');
@@ -8491,6 +8497,8 @@ module.exports=[
},{}],51:[function(require,module,exports){
(function (Buffer){
+'use strict';
+
function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
var uts46 = require('idna-uts46');
@@ -13452,6 +13460,8 @@ var walletService = function walletService() {
module.exports = walletService;
},{}],77:[function(require,module,exports){
+'use strict';
+
var f = require('./formatters');
var SolidityType = require('./type');
@@ -13480,6 +13490,8 @@ SolidityTypeAddress.prototype.isType = function (name) {
module.exports = SolidityTypeAddress;
},{"./formatters":83,"./type":88}],78:[function(require,module,exports){
+'use strict';
+
var f = require('./formatters');
var SolidityType = require('./type');
@@ -13508,6 +13520,8 @@ SolidityTypeBool.prototype.isType = function (name) {
module.exports = SolidityTypeBool;
},{"./formatters":83,"./type":88}],79:[function(require,module,exports){
+'use strict';
+
var f = require('./formatters');
var SolidityType = require('./type');
@@ -13539,6 +13553,8 @@ SolidityTypeBytes.prototype.isType = function (name) {
module.exports = SolidityTypeBytes;
},{"./formatters":83,"./type":88}],80:[function(require,module,exports){
+'use strict';
+
/*
This file is part of web3.js.
@@ -13790,6 +13806,8 @@ var coder = new SolidityCoder([new SolidityTypeAddress(), new SolidityTypeBool()
module.exports = coder;
},{"./address":77,"./bool":78,"./bytes":79,"./dynamicbytes":82,"./formatters":83,"./int":84,"./real":86,"./string":87,"./uint":89,"./ureal":90,"./utils":91}],81:[function(require,module,exports){
+'use strict';
+
/*
This file is part of web3.js.
@@ -13841,6 +13859,8 @@ module.exports = {
};
},{"bignumber.js":167}],82:[function(require,module,exports){
+'use strict';
+
var f = require('./formatters');
var SolidityType = require('./type');
@@ -13863,6 +13883,8 @@ SolidityTypeDynamicBytes.prototype.isDynamicType = function () {
module.exports = SolidityTypeDynamicBytes;
},{"./formatters":83,"./type":88}],83:[function(require,module,exports){
+'use strict';
+
/*
This file is part of web3.js.
@@ -14116,6 +14138,8 @@ module.exports = {
};
},{"./config":81,"./param":85,"./utils":91,"bignumber.js":167}],84:[function(require,module,exports){
+'use strict';
+
var f = require('./formatters');
var SolidityType = require('./type');
@@ -14150,6 +14174,8 @@ SolidityTypeInt.prototype.isType = function (name) {
module.exports = SolidityTypeInt;
},{"./formatters":83,"./type":88}],85:[function(require,module,exports){
+'use strict';
+
/*
This file is part of web3.js.
@@ -14301,6 +14327,8 @@ SolidityParam.encodeList = function (params) {
module.exports = SolidityParam;
},{"./utils":91}],86:[function(require,module,exports){
+'use strict';
+
var f = require('./formatters');
var SolidityType = require('./type');
@@ -14335,6 +14363,8 @@ SolidityTypeReal.prototype.isType = function (name) {
module.exports = SolidityTypeReal;
},{"./formatters":83,"./type":88}],87:[function(require,module,exports){
+'use strict';
+
var f = require('./formatters');
var SolidityType = require('./type');
@@ -14357,6 +14387,8 @@ SolidityTypeString.prototype.isDynamicType = function () {
module.exports = SolidityTypeString;
},{"./formatters":83,"./type":88}],88:[function(require,module,exports){
+'use strict';
+
var f = require('./formatters');
var SolidityParam = require('./param');
@@ -14609,6 +14641,8 @@ SolidityType.prototype.decode = function (bytes, offset, name) {
module.exports = SolidityType;
},{"./formatters":83,"./param":85}],89:[function(require,module,exports){
+'use strict';
+
var f = require('./formatters');
var SolidityType = require('./type');
@@ -14643,6 +14677,8 @@ SolidityTypeUInt.prototype.isType = function (name) {
module.exports = SolidityTypeUInt;
},{"./formatters":83,"./type":88}],90:[function(require,module,exports){
+'use strict';
+
var f = require('./formatters');
var SolidityType = require('./type');
@@ -14677,6 +14713,8 @@ SolidityTypeUReal.prototype.isType = function (name) {
module.exports = SolidityTypeUReal;
},{"./formatters":83,"./type":88}],91:[function(require,module,exports){
+'use strict';
+
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
/*
@@ -16106,6 +16144,8 @@ module.exports = SecalotUsb;
}).call(this,require("buffer").Buffer)
},{"buffer":211}],99:[function(require,module,exports){
+'use strict';
+
/**
* (C) 2017 SatoshiLabs
*
@@ -25830,2284 +25870,2247 @@ Web3Wallet.prototype.getV3Filename = function (timestamp) {
module.exports = Web3Wallet;
},{"./myetherwallet.js":66}],141:[function(require,module,exports){
+'use strict';
+
/**
* @license AngularJS v1.6.8
* (c) 2010-2017 Google, Inc. http://angularjs.org
* License: MIT
*/
-(function(window, angular) {'use strict';
-
-var ELEMENT_NODE = 1;
-var COMMENT_NODE = 8;
-
-var ADD_CLASS_SUFFIX = '-add';
-var REMOVE_CLASS_SUFFIX = '-remove';
-var EVENT_CLASS_PREFIX = 'ng-';
-var ACTIVE_CLASS_SUFFIX = '-active';
-var PREPARE_CLASS_SUFFIX = '-prepare';
-
-var NG_ANIMATE_CLASSNAME = 'ng-animate';
-var NG_ANIMATE_CHILDREN_DATA = '$$ngAnimateChildren';
-
-// Detect proper transitionend/animationend event names.
-var CSS_PREFIX = '', TRANSITION_PROP, TRANSITIONEND_EVENT, ANIMATION_PROP, ANIMATIONEND_EVENT;
-
-// If unprefixed events are not supported but webkit-prefixed are, use the latter.
-// Otherwise, just use W3C names, browsers not supporting them at all will just ignore them.
-// Note: Chrome implements `window.onwebkitanimationend` and doesn't implement `window.onanimationend`
-// but at the same time dispatches the `animationend` event and not `webkitAnimationEnd`.
-// Register both events in case `window.onanimationend` is not supported because of that,
-// do the same for `transitionend` as Safari is likely to exhibit similar behavior.
-// Also, the only modern browser that uses vendor prefixes for transitions/keyframes is webkit
-// therefore there is no reason to test anymore for other vendor prefixes:
-// http://caniuse.com/#search=transition
-if ((window.ontransitionend === undefined) && (window.onwebkittransitionend !== undefined)) {
- CSS_PREFIX = '-webkit-';
- TRANSITION_PROP = 'WebkitTransition';
- TRANSITIONEND_EVENT = 'webkitTransitionEnd transitionend';
-} else {
- TRANSITION_PROP = 'transition';
- TRANSITIONEND_EVENT = 'transitionend';
-}
+(function (window, angular) {
+ 'use strict';
-if ((window.onanimationend === undefined) && (window.onwebkitanimationend !== undefined)) {
- CSS_PREFIX = '-webkit-';
- ANIMATION_PROP = 'WebkitAnimation';
- ANIMATIONEND_EVENT = 'webkitAnimationEnd animationend';
-} else {
- ANIMATION_PROP = 'animation';
- ANIMATIONEND_EVENT = 'animationend';
-}
-
-var DURATION_KEY = 'Duration';
-var PROPERTY_KEY = 'Property';
-var DELAY_KEY = 'Delay';
-var TIMING_KEY = 'TimingFunction';
-var ANIMATION_ITERATION_COUNT_KEY = 'IterationCount';
-var ANIMATION_PLAYSTATE_KEY = 'PlayState';
-var SAFE_FAST_FORWARD_DURATION_VALUE = 9999;
-
-var ANIMATION_DELAY_PROP = ANIMATION_PROP + DELAY_KEY;
-var ANIMATION_DURATION_PROP = ANIMATION_PROP + DURATION_KEY;
-var TRANSITION_DELAY_PROP = TRANSITION_PROP + DELAY_KEY;
-var TRANSITION_DURATION_PROP = TRANSITION_PROP + DURATION_KEY;
-
-var ngMinErr = angular.$$minErr('ng');
-function assertArg(arg, name, reason) {
- if (!arg) {
- throw ngMinErr('areq', 'Argument \'{0}\' is {1}', (name || '?'), (reason || 'required'));
- }
- return arg;
-}
-
-function mergeClasses(a,b) {
- if (!a && !b) return '';
- if (!a) return b;
- if (!b) return a;
- if (isArray(a)) a = a.join(' ');
- if (isArray(b)) b = b.join(' ');
- return a + ' ' + b;
-}
-
-function packageStyles(options) {
- var styles = {};
- if (options && (options.to || options.from)) {
- styles.to = options.to;
- styles.from = options.from;
- }
- return styles;
-}
-
-function pendClasses(classes, fix, isPrefix) {
- var className = '';
- classes = isArray(classes)
- ? classes
- : classes && isString(classes) && classes.length
- ? classes.split(/\s+/)
- : [];
- forEach(classes, function(klass, i) {
- if (klass && klass.length > 0) {
- className += (i > 0) ? ' ' : '';
- className += isPrefix ? fix + klass
- : klass + fix;
- }
- });
- return className;
-}
+ var ELEMENT_NODE = 1;
+ var COMMENT_NODE = 8;
+
+ var ADD_CLASS_SUFFIX = '-add';
+ var REMOVE_CLASS_SUFFIX = '-remove';
+ var EVENT_CLASS_PREFIX = 'ng-';
+ var ACTIVE_CLASS_SUFFIX = '-active';
+ var PREPARE_CLASS_SUFFIX = '-prepare';
+
+ var NG_ANIMATE_CLASSNAME = 'ng-animate';
+ var NG_ANIMATE_CHILDREN_DATA = '$$ngAnimateChildren';
+
+ // Detect proper transitionend/animationend event names.
+ var CSS_PREFIX = '',
+ TRANSITION_PROP,
+ TRANSITIONEND_EVENT,
+ ANIMATION_PROP,
+ ANIMATIONEND_EVENT;
+
+ // If unprefixed events are not supported but webkit-prefixed are, use the latter.
+ // Otherwise, just use W3C names, browsers not supporting them at all will just ignore them.
+ // Note: Chrome implements `window.onwebkitanimationend` and doesn't implement `window.onanimationend`
+ // but at the same time dispatches the `animationend` event and not `webkitAnimationEnd`.
+ // Register both events in case `window.onanimationend` is not supported because of that,
+ // do the same for `transitionend` as Safari is likely to exhibit similar behavior.
+ // Also, the only modern browser that uses vendor prefixes for transitions/keyframes is webkit
+ // therefore there is no reason to test anymore for other vendor prefixes:
+ // http://caniuse.com/#search=transition
+ if (window.ontransitionend === undefined && window.onwebkittransitionend !== undefined) {
+ CSS_PREFIX = '-webkit-';
+ TRANSITION_PROP = 'WebkitTransition';
+ TRANSITIONEND_EVENT = 'webkitTransitionEnd transitionend';
+ } else {
+ TRANSITION_PROP = 'transition';
+ TRANSITIONEND_EVENT = 'transitionend';
+ }
-function removeFromArray(arr, val) {
- var index = arr.indexOf(val);
- if (val >= 0) {
- arr.splice(index, 1);
+ if (window.onanimationend === undefined && window.onwebkitanimationend !== undefined) {
+ CSS_PREFIX = '-webkit-';
+ ANIMATION_PROP = 'WebkitAnimation';
+ ANIMATIONEND_EVENT = 'webkitAnimationEnd animationend';
+ } else {
+ ANIMATION_PROP = 'animation';
+ ANIMATIONEND_EVENT = 'animationend';
}
-}
-function stripCommentsFromElement(element) {
- if (element instanceof jqLite) {
- switch (element.length) {
- case 0:
- return element;
+ var DURATION_KEY = 'Duration';
+ var PROPERTY_KEY = 'Property';
+ var DELAY_KEY = 'Delay';
+ var TIMING_KEY = 'TimingFunction';
+ var ANIMATION_ITERATION_COUNT_KEY = 'IterationCount';
+ var ANIMATION_PLAYSTATE_KEY = 'PlayState';
+ var SAFE_FAST_FORWARD_DURATION_VALUE = 9999;
- case 1:
- // there is no point of stripping anything if the element
- // is the only element within the jqLite wrapper.
- // (it's important that we retain the element instance.)
- if (element[0].nodeType === ELEMENT_NODE) {
- return element;
- }
- break;
+ var ANIMATION_DELAY_PROP = ANIMATION_PROP + DELAY_KEY;
+ var ANIMATION_DURATION_PROP = ANIMATION_PROP + DURATION_KEY;
+ var TRANSITION_DELAY_PROP = TRANSITION_PROP + DELAY_KEY;
+ var TRANSITION_DURATION_PROP = TRANSITION_PROP + DURATION_KEY;
- default:
- return jqLite(extractElementNode(element));
+ var ngMinErr = angular.$$minErr('ng');
+ function assertArg(arg, name, reason) {
+ if (!arg) {
+ throw ngMinErr('areq', 'Argument \'{0}\' is {1}', name || '?', reason || 'required');
}
+ return arg;
}
- if (element.nodeType === ELEMENT_NODE) {
- return jqLite(element);
+ function mergeClasses(a, b) {
+ if (!a && !b) return '';
+ if (!a) return b;
+ if (!b) return a;
+ if (isArray(a)) a = a.join(' ');
+ if (isArray(b)) b = b.join(' ');
+ return a + ' ' + b;
}
-}
-function extractElementNode(element) {
- if (!element[0]) return element;
- for (var i = 0; i < element.length; i++) {
- var elm = element[i];
- if (elm.nodeType === ELEMENT_NODE) {
- return elm;
+ function packageStyles(options) {
+ var styles = {};
+ if (options && (options.to || options.from)) {
+ styles.to = options.to;
+ styles.from = options.from;
}
+ return styles;
}
-}
-
-function $$addClass($$jqLite, element, className) {
- forEach(element, function(elm) {
- $$jqLite.addClass(elm, className);
- });
-}
-
-function $$removeClass($$jqLite, element, className) {
- forEach(element, function(elm) {
- $$jqLite.removeClass(elm, className);
- });
-}
-
-function applyAnimationClassesFactory($$jqLite) {
- return function(element, options) {
- if (options.addClass) {
- $$addClass($$jqLite, element, options.addClass);
- options.addClass = null;
- }
- if (options.removeClass) {
- $$removeClass($$jqLite, element, options.removeClass);
- options.removeClass = null;
- }
- };
-}
-function prepareAnimationOptions(options) {
- options = options || {};
- if (!options.$$prepared) {
- var domOperation = options.domOperation || noop;
- options.domOperation = function() {
- options.$$domOperationFired = true;
- domOperation();
- domOperation = noop;
- };
- options.$$prepared = true;
+ function pendClasses(classes, fix, isPrefix) {
+ var className = '';
+ classes = isArray(classes) ? classes : classes && isString(classes) && classes.length ? classes.split(/\s+/) : [];
+ forEach(classes, function (klass, i) {
+ if (klass && klass.length > 0) {
+ className += i > 0 ? ' ' : '';
+ className += isPrefix ? fix + klass : klass + fix;
+ }
+ });
+ return className;
}
- return options;
-}
-
-function applyAnimationStyles(element, options) {
- applyAnimationFromStyles(element, options);
- applyAnimationToStyles(element, options);
-}
-function applyAnimationFromStyles(element, options) {
- if (options.from) {
- element.css(options.from);
- options.from = null;
+ function removeFromArray(arr, val) {
+ var index = arr.indexOf(val);
+ if (val >= 0) {
+ arr.splice(index, 1);
+ }
}
-}
-function applyAnimationToStyles(element, options) {
- if (options.to) {
- element.css(options.to);
- options.to = null;
- }
-}
+ function stripCommentsFromElement(element) {
+ if (element instanceof jqLite) {
+ switch (element.length) {
+ case 0:
+ return element;
-function mergeAnimationDetails(element, oldAnimation, newAnimation) {
- var target = oldAnimation.options || {};
- var newOptions = newAnimation.options || {};
+ case 1:
+ // there is no point of stripping anything if the element
+ // is the only element within the jqLite wrapper.
+ // (it's important that we retain the element instance.)
+ if (element[0].nodeType === ELEMENT_NODE) {
+ return element;
+ }
+ break;
- var toAdd = (target.addClass || '') + ' ' + (newOptions.addClass || '');
- var toRemove = (target.removeClass || '') + ' ' + (newOptions.removeClass || '');
- var classes = resolveElementClasses(element.attr('class'), toAdd, toRemove);
+ default:
+ return jqLite(extractElementNode(element));
+ }
+ }
- if (newOptions.preparationClasses) {
- target.preparationClasses = concatWithSpace(newOptions.preparationClasses, target.preparationClasses);
- delete newOptions.preparationClasses;
+ if (element.nodeType === ELEMENT_NODE) {
+ return jqLite(element);
+ }
}
- // noop is basically when there is no callback; otherwise something has been set
- var realDomOperation = target.domOperation !== noop ? target.domOperation : null;
-
- extend(target, newOptions);
-
- // TODO(matsko or sreeramu): proper fix is to maintain all animation callback in array and call at last,but now only leave has the callback so no issue with this.
- if (realDomOperation) {
- target.domOperation = realDomOperation;
+ function extractElementNode(element) {
+ if (!element[0]) return element;
+ for (var i = 0; i < element.length; i++) {
+ var elm = element[i];
+ if (elm.nodeType === ELEMENT_NODE) {
+ return elm;
+ }
+ }
}
- if (classes.addClass) {
- target.addClass = classes.addClass;
- } else {
- target.addClass = null;
+ function $$addClass($$jqLite, element, className) {
+ forEach(element, function (elm) {
+ $$jqLite.addClass(elm, className);
+ });
}
- if (classes.removeClass) {
- target.removeClass = classes.removeClass;
- } else {
- target.removeClass = null;
+ function $$removeClass($$jqLite, element, className) {
+ forEach(element, function (elm) {
+ $$jqLite.removeClass(elm, className);
+ });
}
- oldAnimation.addClass = target.addClass;
- oldAnimation.removeClass = target.removeClass;
-
- return target;
-}
-
-function resolveElementClasses(existing, toAdd, toRemove) {
- var ADD_CLASS = 1;
- var REMOVE_CLASS = -1;
-
- var flags = {};
- existing = splitClassesToLookup(existing);
-
- toAdd = splitClassesToLookup(toAdd);
- forEach(toAdd, function(value, key) {
- flags[key] = ADD_CLASS;
- });
+ function applyAnimationClassesFactory($$jqLite) {
+ return function (element, options) {
+ if (options.addClass) {
+ $$addClass($$jqLite, element, options.addClass);
+ options.addClass = null;
+ }
+ if (options.removeClass) {
+ $$removeClass($$jqLite, element, options.removeClass);
+ options.removeClass = null;
+ }
+ };
+ }
- toRemove = splitClassesToLookup(toRemove);
- forEach(toRemove, function(value, key) {
- flags[key] = flags[key] === ADD_CLASS ? null : REMOVE_CLASS;
- });
+ function prepareAnimationOptions(options) {
+ options = options || {};
+ if (!options.$$prepared) {
+ var domOperation = options.domOperation || noop;
+ options.domOperation = function () {
+ options.$$domOperationFired = true;
+ domOperation();
+ domOperation = noop;
+ };
+ options.$$prepared = true;
+ }
+ return options;
+ }
- var classes = {
- addClass: '',
- removeClass: ''
- };
+ function applyAnimationStyles(element, options) {
+ applyAnimationFromStyles(element, options);
+ applyAnimationToStyles(element, options);
+ }
- forEach(flags, function(val, klass) {
- var prop, allow;
- if (val === ADD_CLASS) {
- prop = 'addClass';
- allow = !existing[klass] || existing[klass + REMOVE_CLASS_SUFFIX];
- } else if (val === REMOVE_CLASS) {
- prop = 'removeClass';
- allow = existing[klass] || existing[klass + ADD_CLASS_SUFFIX];
- }
- if (allow) {
- if (classes[prop].length) {
- classes[prop] += ' ';
- }
- classes[prop] += klass;
+ function applyAnimationFromStyles(element, options) {
+ if (options.from) {
+ element.css(options.from);
+ options.from = null;
}
- });
+ }
- function splitClassesToLookup(classes) {
- if (isString(classes)) {
- classes = classes.split(' ');
+ function applyAnimationToStyles(element, options) {
+ if (options.to) {
+ element.css(options.to);
+ options.to = null;
}
-
- var obj = {};
- forEach(classes, function(klass) {
- // sometimes the split leaves empty string values
- // incase extra spaces were applied to the options
- if (klass.length) {
- obj[klass] = true;
- }
- });
- return obj;
}
- return classes;
-}
+ function mergeAnimationDetails(element, oldAnimation, newAnimation) {
+ var target = oldAnimation.options || {};
+ var newOptions = newAnimation.options || {};
-function getDomNode(element) {
- return (element instanceof jqLite) ? element[0] : element;
-}
+ var toAdd = (target.addClass || '') + ' ' + (newOptions.addClass || '');
+ var toRemove = (target.removeClass || '') + ' ' + (newOptions.removeClass || '');
+ var classes = resolveElementClasses(element.attr('class'), toAdd, toRemove);
-function applyGeneratedPreparationClasses(element, event, options) {
- var classes = '';
- if (event) {
- classes = pendClasses(event, EVENT_CLASS_PREFIX, true);
- }
- if (options.addClass) {
- classes = concatWithSpace(classes, pendClasses(options.addClass, ADD_CLASS_SUFFIX));
- }
- if (options.removeClass) {
- classes = concatWithSpace(classes, pendClasses(options.removeClass, REMOVE_CLASS_SUFFIX));
- }
- if (classes.length) {
- options.preparationClasses = classes;
- element.addClass(classes);
- }
-}
+ if (newOptions.preparationClasses) {
+ target.preparationClasses = concatWithSpace(newOptions.preparationClasses, target.preparationClasses);
+ delete newOptions.preparationClasses;
+ }
-function clearGeneratedClasses(element, options) {
- if (options.preparationClasses) {
- element.removeClass(options.preparationClasses);
- options.preparationClasses = null;
- }
- if (options.activeClasses) {
- element.removeClass(options.activeClasses);
- options.activeClasses = null;
- }
-}
+ // noop is basically when there is no callback; otherwise something has been set
+ var realDomOperation = target.domOperation !== noop ? target.domOperation : null;
-function blockTransitions(node, duration) {
- // we use a negative delay value since it performs blocking
- // yet it doesn't kill any existing transitions running on the
- // same element which makes this safe for class-based animations
- var value = duration ? '-' + duration + 's' : '';
- applyInlineStyle(node, [TRANSITION_DELAY_PROP, value]);
- return [TRANSITION_DELAY_PROP, value];
-}
+ extend(target, newOptions);
-function blockKeyframeAnimations(node, applyBlock) {
- var value = applyBlock ? 'paused' : '';
- var key = ANIMATION_PROP + ANIMATION_PLAYSTATE_KEY;
- applyInlineStyle(node, [key, value]);
- return [key, value];
-}
+ // TODO(matsko or sreeramu): proper fix is to maintain all animation callback in array and call at last,but now only leave has the callback so no issue with this.
+ if (realDomOperation) {
+ target.domOperation = realDomOperation;
+ }
-function applyInlineStyle(node, styleTuple) {
- var prop = styleTuple[0];
- var value = styleTuple[1];
- node.style[prop] = value;
-}
+ if (classes.addClass) {
+ target.addClass = classes.addClass;
+ } else {
+ target.addClass = null;
+ }
-function concatWithSpace(a,b) {
- if (!a) return b;
- if (!b) return a;
- return a + ' ' + b;
-}
+ if (classes.removeClass) {
+ target.removeClass = classes.removeClass;
+ } else {
+ target.removeClass = null;
+ }
-var $$rAFSchedulerFactory = ['$$rAF', function($$rAF) {
- var queue, cancelFn;
+ oldAnimation.addClass = target.addClass;
+ oldAnimation.removeClass = target.removeClass;
- function scheduler(tasks) {
- // we make a copy since RAFScheduler mutates the state
- // of the passed in array variable and this would be difficult
- // to track down on the outside code
- queue = queue.concat(tasks);
- nextTick();
+ return target;
}
- queue = scheduler.queue = [];
+ function resolveElementClasses(existing, toAdd, toRemove) {
+ var ADD_CLASS = 1;
+ var REMOVE_CLASS = -1;
- /* waitUntilQuiet does two things:
- * 1. It will run the FINAL `fn` value only when an uncanceled RAF has passed through
- * 2. It will delay the next wave of tasks from running until the quiet `fn` has run.
- *
- * The motivation here is that animation code can request more time from the scheduler
- * before the next wave runs. This allows for certain DOM properties such as classes to
- * be resolved in time for the next animation to run.
- */
- scheduler.waitUntilQuiet = function(fn) {
- if (cancelFn) cancelFn();
+ var flags = {};
+ existing = splitClassesToLookup(existing);
- cancelFn = $$rAF(function() {
- cancelFn = null;
- fn();
- nextTick();
+ toAdd = splitClassesToLookup(toAdd);
+ forEach(toAdd, function (value, key) {
+ flags[key] = ADD_CLASS;
});
- };
-
- return scheduler;
-
- function nextTick() {
- if (!queue.length) return;
-
- var items = queue.shift();
- for (var i = 0; i < items.length; i++) {
- items[i]();
- }
- if (!cancelFn) {
- $$rAF(function() {
- if (!cancelFn) nextTick();
- });
- }
- }
-}];
+ toRemove = splitClassesToLookup(toRemove);
+ forEach(toRemove, function (value, key) {
+ flags[key] = flags[key] === ADD_CLASS ? null : REMOVE_CLASS;
+ });
-/**
- * @ngdoc directive
- * @name ngAnimateChildren
- * @restrict AE
- * @element ANY
- *
- * @description
- *
- * ngAnimateChildren allows you to specify that children of this element should animate even if any
- * of the children's parents are currently animating. By default, when an element has an active `enter`, `leave`, or `move`
- * (structural) animation, child elements that also have an active structural animation are not animated.
- *
- * Note that even if `ngAnimateChildren` is set, no child animations will run when the parent element is removed from the DOM (`leave` animation).
- *
- *
- * @param {string} ngAnimateChildren If the value is empty, `true` or `on`,
- * then child animations are allowed. If the value is `false`, child animations are not allowed.
- *
- * @example
- *
-
Please click on an element
- - {{ record.title }} - -Directive | -How | -Source | -Rendered | -
ng-bind-html | -Automatically uses $sanitize | -<div ng-bind-html="snippet"> |
- - |
ng-bind-html | -Bypass $sanitize by explicitly trusting the dangerous value | -
- <div ng-bind-html="deliberatelyTrustDangerousSnippet()"> -</div>- |
- - |
ng-bind | -Automatically escapes | -<div ng-bind="snippet"> |
- - |
an html\nclick here\nsnippet
'); - }); - - it('should inline raw snippet if bound to a trusted value', function() { - expect(element(by.css('#bind-html-with-trust div')).getAttribute('innerHTML')). - toBe("an html\n" + - "click here\n" + - "snippet
"); - }); - - it('should escape snippet without any filter', function() { - expect(element(by.css('#bind-default div')).getAttribute('innerHTML')). - toBe("<p style=\"color:blue\">an html\n" + - "<em onmouseover=\"this.textContent='PWN3D!'\">click here</em>\n" + - "snippet</p>"); - }); - - it('should update', function() { - element(by.model('snippet')).clear(); - element(by.model('snippet')).sendKeys('new text'); - expect(element(by.css('#bind-html-with-sanitize div')).getAttribute('innerHTML')). - toBe('new text'); - expect(element(by.css('#bind-html-with-trust div')).getAttribute('innerHTML')).toBe( - 'new text'); - expect(element(by.css('#bind-default div')).getAttribute('innerHTML')).toBe( - "new <b onclick=\"alert(1)\">text</b>"); - }); -By enabling this setting without taking other precautions, you might expose your - * application to click-hijacking attacks. In these attacks, sanitized svg elements could be positioned - * outside of the containing element and be rendered over other elements on the page (e.g. a login - * link). Such behavior can then result in phishing incidents.
+ * The `ngAnimate` module provides support for CSS-based animations (keyframes and transitions) as well as JavaScript-based animations via + * callback hooks. Animations are not enabled by default, however, by including `ngAnimate` the animation hooks are enabled for an Angular app. * - *To protect against these, explicitly setup `overflow: hidden` css rule for all potential svg - * tags within the sanitized content:
+ * ## Usage + * Simply put, there are two ways to make use of animations when ngAnimate is used: by using **CSS** and **JavaScript**. The former works purely based + * using CSS (by using matching CSS selectors/styles) and the latter triggers animations that are registered via `module.animation()`. For + * both CSS and JS animations the sole requirement is to have a matching `CSS class` that exists both in the registered animation and within + * the HTML element that the animation will be triggered on. * - *
- * .rootOfTheIncludedContent svg {
- * overflow: hidden !important;
- * }
- *
+ * | Directive | Supported Animations |
+ * |----------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------|
+ * | {@link ng.directive:ngRepeat#animations ngRepeat} | enter, leave and move |
+ * | {@link ngRoute.directive:ngView#animations ngView} | enter and leave |
+ * | {@link ng.directive:ngInclude#animations ngInclude} | enter and leave |
+ * | {@link ng.directive:ngSwitch#animations ngSwitch} | enter and leave |
+ * | {@link ng.directive:ngIf#animations ngIf} | enter and leave |
+ * | {@link ng.directive:ngClass#animations ngClass} | add and remove (the CSS class(es) present) |
+ * | {@link ng.directive:ngShow#animations ngShow} & {@link ng.directive:ngHide#animations ngHide} | add and remove (the ng-hide class value) |
+ * | {@link ng.directive:form#animations form} & {@link ng.directive:ngModel#animations ngModel} | add and remove (dirty, pristine, valid, invalid & all other validations) |
+ * | {@link module:ngMessages#animations ngMessages} | add and remove (ng-active & ng-inactive) |
+ * | {@link module:ngMessages#animations ngMessage} | enter and leave |
+ *
+ * (More information can be found by visiting each the documentation associated with each directive.)
+ *
+ * ## CSS-based Animations
+ *
+ * CSS-based animations with ngAnimate are unique since they require no JavaScript code at all. By using a CSS class that we reference between our HTML
+ * and CSS code we can create an animation that will be picked up by Angular when an underlying directive performs an operation.
+ *
+ * The example below shows how an `enter` animation can be made possible on an element using `ng-if`:
+ *
+ * ```html
+ * Please click on an element
+ + {{ record.title }} + +Directive | +How | +Source | +Rendered | +
ng-bind-html | +Automatically uses $sanitize | +<div ng-bind-html="snippet"> |
+ + |
ng-bind-html | +Bypass $sanitize by explicitly trusting the dangerous value | +
+ <div ng-bind-html="deliberatelyTrustDangerousSnippet()"> + </div>+ |
+ + |
ng-bind | +Automatically escapes | +<div ng-bind="snippet"> |
+ + |
an html\nclick here\nsnippet
'); + }); + + it('should inline raw snippet if bound to a trusted value', function() { + expect(element(by.css('#bind-html-with-trust div')).getAttribute('innerHTML')). + toBe("an html\n" + + "click here\n" + + "snippet
"); + }); + + it('should escape snippet without any filter', function() { + expect(element(by.css('#bind-default div')).getAttribute('innerHTML')). + toBe("<p style=\"color:blue\">an html\n" + + "<em onmouseover=\"this.textContent='PWN3D!'\">click here</em>\n" + + "snippet</p>"); + }); + + it('should update', function() { + element(by.model('snippet')).clear(); + element(by.model('snippet')).sendKeys('new text'); + expect(element(by.css('#bind-html-with-sanitize div')).getAttribute('innerHTML')). + toBe('new text'); + expect(element(by.css('#bind-html-with-trust div')).getAttribute('innerHTML')).toBe( + 'new text'); + expect(element(by.css('#bind-default div')).getAttribute('innerHTML')).toBe( + "new <b onclick=\"alert(1)\">text</b>"); + }); +