angular
Version:
HTML enhanced for web apps
1,706 lines (1,513 loc) • 1.38 MB
JavaScript
/**
* @license AngularJS v1.8.3
* (c) 2010-2020 Google LLC. http://angularjs.org
* License: MIT
*/
(function(window) {'use strict';
/* exported
minErrConfig,
errorHandlingConfig,
isValidObjectMaxDepth
*/
var minErrConfig = {
objectMaxDepth: 5,
urlErrorParamsEnabled: true
};
/**
* @ngdoc function
* @name angular.errorHandlingConfig
* @module ng
* @kind function
*
* @description
* Configure several aspects of error handling in AngularJS if used as a setter or return the
* current configuration if used as a getter. The following options are supported:
*
* - **objectMaxDepth**: The maximum depth to which objects are traversed when stringified for error messages.
*
* Omitted or undefined options will leave the corresponding configuration values unchanged.
*
* @param {Object=} config - The configuration object. May only contain the options that need to be
* updated. Supported keys:
*
* * `objectMaxDepth` **{Number}** - The max depth for stringifying objects. Setting to a
* non-positive or non-numeric value, removes the max depth limit.
* Default: 5
*
* * `urlErrorParamsEnabled` **{Boolean}** - Specifies whether the generated error url will
* contain the parameters of the thrown error. Disabling the parameters can be useful if the
* generated error url is very long.
*
* Default: true. When used without argument, it returns the current value.
*/
function errorHandlingConfig(config) {
if (isObject(config)) {
if (isDefined(config.objectMaxDepth)) {
minErrConfig.objectMaxDepth = isValidObjectMaxDepth(config.objectMaxDepth) ? config.objectMaxDepth : NaN;
}
if (isDefined(config.urlErrorParamsEnabled) && isBoolean(config.urlErrorParamsEnabled)) {
minErrConfig.urlErrorParamsEnabled = config.urlErrorParamsEnabled;
}
} else {
return minErrConfig;
}
}
/**
* @private
* @param {Number} maxDepth
* @return {boolean}
*/
function isValidObjectMaxDepth(maxDepth) {
return isNumber(maxDepth) && maxDepth > 0;
}
/**
* @description
*
* This object provides a utility for producing rich Error messages within
* AngularJS. It can be called as follows:
*
* var exampleMinErr = minErr('example');
* throw exampleMinErr('one', 'This {0} is {1}', foo, bar);
*
* The above creates an instance of minErr in the example namespace. The
* resulting error will have a namespaced error code of example.one. The
* resulting error will replace {0} with the value of foo, and {1} with the
* value of bar. The object is not restricted in the number of arguments it can
* take.
*
* If fewer arguments are specified than necessary for interpolation, the extra
* interpolation markers will be preserved in the final string.
*
* Since data will be parsed statically during a build step, some restrictions
* are applied with respect to how minErr instances are created and called.
* Instances should have names of the form namespaceMinErr for a minErr created
* using minErr('namespace'). Error codes, namespaces and template strings
* should all be static strings, not variables or general expressions.
*
* @param {string} module The namespace to use for the new minErr instance.
* @param {function} ErrorConstructor Custom error constructor to be instantiated when returning
* error from returned function, for cases when a particular type of error is useful.
* @returns {function(code:string, template:string, ...templateArgs): Error} minErr instance
*/
function minErr(module, ErrorConstructor) {
ErrorConstructor = ErrorConstructor || Error;
var url = 'https://errors.angularjs.org/1.8.3/';
var regex = url.replace('.', '\\.') + '[\\s\\S]*';
var errRegExp = new RegExp(regex, 'g');
return function() {
var code = arguments[0],
template = arguments[1],
message = '[' + (module ? module + ':' : '') + code + '] ',
templateArgs = sliceArgs(arguments, 2).map(function(arg) {
return toDebugString(arg, minErrConfig.objectMaxDepth);
}),
paramPrefix, i;
// A minErr message has two parts: the message itself and the url that contains the
// encoded message.
// The message's parameters can contain other error messages which also include error urls.
// To prevent the messages from getting too long, we strip the error urls from the parameters.
message += template.replace(/\{\d+\}/g, function(match) {
var index = +match.slice(1, -1);
if (index < templateArgs.length) {
return templateArgs[index].replace(errRegExp, '');
}
return match;
});
message += '\n' + url + (module ? module + '/' : '') + code;
if (minErrConfig.urlErrorParamsEnabled) {
for (i = 0, paramPrefix = '?'; i < templateArgs.length; i++, paramPrefix = '&') {
message += paramPrefix + 'p' + i + '=' + encodeURIComponent(templateArgs[i]);
}
}
return new ErrorConstructor(message);
};
}
/* We need to tell ESLint what variables are being exported */
/* exported
angular,
msie,
jqLite,
jQuery,
slice,
splice,
push,
toString,
minErrConfig,
errorHandlingConfig,
isValidObjectMaxDepth,
ngMinErr,
angularModule,
uid,
REGEX_STRING_REGEXP,
VALIDITY_STATE_PROPERTY,
lowercase,
uppercase,
nodeName_,
isArrayLike,
forEach,
forEachSorted,
reverseParams,
nextUid,
setHashKey,
extend,
toInt,
inherit,
merge,
noop,
identity,
valueFn,
isUndefined,
isDefined,
isObject,
isBlankObject,
isString,
isNumber,
isNumberNaN,
isDate,
isError,
isArray,
isFunction,
isRegExp,
isWindow,
isScope,
isFile,
isFormData,
isBlob,
isBoolean,
isPromiseLike,
trim,
escapeForRegexp,
isElement,
makeMap,
includes,
arrayRemove,
copy,
simpleCompare,
equals,
csp,
jq,
concat,
sliceArgs,
bind,
toJsonReplacer,
toJson,
fromJson,
convertTimezoneToLocal,
timezoneToOffset,
addDateMinutes,
startingTag,
tryDecodeURIComponent,
parseKeyValue,
toKeyValue,
encodeUriSegment,
encodeUriQuery,
angularInit,
bootstrap,
getTestability,
snake_case,
bindJQuery,
assertArg,
assertArgFn,
assertNotHasOwnProperty,
getter,
getBlockNodes,
hasOwnProperty,
createMap,
stringify,
UNSAFE_restoreLegacyJqLiteXHTMLReplacement,
NODE_TYPE_ELEMENT,
NODE_TYPE_ATTRIBUTE,
NODE_TYPE_TEXT,
NODE_TYPE_COMMENT,
NODE_TYPE_DOCUMENT,
NODE_TYPE_DOCUMENT_FRAGMENT
*/
////////////////////////////////////
/**
* @ngdoc module
* @name ng
* @module ng
* @installation
* @description
*
* The ng module is loaded by default when an AngularJS application is started. The module itself
* contains the essential components for an AngularJS application to function. The table below
* lists a high level breakdown of each of the services/factories, filters, directives and testing
* components available within this core module.
*
*/
var REGEX_STRING_REGEXP = /^\/(.+)\/([a-z]*)$/;
// The name of a form control's ValidityState property.
// This is used so that it's possible for internal tests to create mock ValidityStates.
var VALIDITY_STATE_PROPERTY = 'validity';
var hasOwnProperty = Object.prototype.hasOwnProperty;
/**
* @private
*
* @description Converts the specified string to lowercase.
* @param {string} string String to be converted to lowercase.
* @returns {string} Lowercased string.
*/
var lowercase = function(string) {return isString(string) ? string.toLowerCase() : string;};
/**
* @private
*
* @description Converts the specified string to uppercase.
* @param {string} string String to be converted to uppercase.
* @returns {string} Uppercased string.
*/
var uppercase = function(string) {return isString(string) ? string.toUpperCase() : string;};
var
msie, // holds major version number for IE, or NaN if UA is not IE.
jqLite, // delay binding since jQuery could be loaded after us.
jQuery, // delay binding
slice = [].slice,
splice = [].splice,
push = [].push,
toString = Object.prototype.toString,
getPrototypeOf = Object.getPrototypeOf,
ngMinErr = minErr('ng'),
/** @name angular */
angular = window.angular || (window.angular = {}),
angularModule,
uid = 0;
// Support: IE 9-11 only
/**
* documentMode is an IE-only property
* http://msdn.microsoft.com/en-us/library/ie/cc196988(v=vs.85).aspx
*/
msie = window.document.documentMode;
/**
* @private
* @param {*} obj
* @return {boolean} Returns true if `obj` is an array or array-like object (NodeList, Arguments,
* String ...)
*/
function isArrayLike(obj) {
// `null`, `undefined` and `window` are not array-like
if (obj == null || isWindow(obj)) return false;
// arrays, strings and jQuery/jqLite objects are array like
// * jqLite is either the jQuery or jqLite constructor function
// * we have to check the existence of jqLite first as this method is called
// via the forEach method when constructing the jqLite object in the first place
if (isArray(obj) || isString(obj) || (jqLite && obj instanceof jqLite)) return true;
// Support: iOS 8.2 (not reproducible in simulator)
// "length" in obj used to prevent JIT error (gh-11508)
var length = 'length' in Object(obj) && obj.length;
// NodeList objects (with `item` method) and
// other objects with suitable length characteristics are array-like
return isNumber(length) && (length >= 0 && (length - 1) in obj || typeof obj.item === 'function');
}
/**
* @ngdoc function
* @name angular.forEach
* @module ng
* @kind function
*
* @description
* Invokes the `iterator` function once for each item in `obj` collection, which can be either an
* object or an array. The `iterator` function is invoked with `iterator(value, key, obj)`, where `value`
* is the value of an object property or an array element, `key` is the object property key or
* array element index and obj is the `obj` itself. Specifying a `context` for the function is optional.
*
* It is worth noting that `.forEach` does not iterate over inherited properties because it filters
* using the `hasOwnProperty` method.
*
* Unlike ES262's
* [Array.prototype.forEach](http://www.ecma-international.org/ecma-262/5.1/#sec-15.4.4.18),
* providing 'undefined' or 'null' values for `obj` will not throw a TypeError, but rather just
* return the value provided.
*
```js
var values = {name: 'misko', gender: 'male'};
var log = [];
angular.forEach(values, function(value, key) {
this.push(key + ': ' + value);
}, log);
expect(log).toEqual(['name: misko', 'gender: male']);
```
*
* @param {Object|Array} obj Object to iterate over.
* @param {Function} iterator Iterator function.
* @param {Object=} context Object to become context (`this`) for the iterator function.
* @returns {Object|Array} Reference to `obj`.
*/
function forEach(obj, iterator, context) {
var key, length;
if (obj) {
if (isFunction(obj)) {
for (key in obj) {
if (key !== 'prototype' && key !== 'length' && key !== 'name' && obj.hasOwnProperty(key)) {
iterator.call(context, obj[key], key, obj);
}
}
} else if (isArray(obj) || isArrayLike(obj)) {
var isPrimitive = typeof obj !== 'object';
for (key = 0, length = obj.length; key < length; key++) {
if (isPrimitive || key in obj) {
iterator.call(context, obj[key], key, obj);
}
}
} else if (obj.forEach && obj.forEach !== forEach) {
obj.forEach(iterator, context, obj);
} else if (isBlankObject(obj)) {
// createMap() fast path --- Safe to avoid hasOwnProperty check because prototype chain is empty
for (key in obj) {
iterator.call(context, obj[key], key, obj);
}
} else if (typeof obj.hasOwnProperty === 'function') {
// Slow path for objects inheriting Object.prototype, hasOwnProperty check needed
for (key in obj) {
if (obj.hasOwnProperty(key)) {
iterator.call(context, obj[key], key, obj);
}
}
} else {
// Slow path for objects which do not have a method `hasOwnProperty`
for (key in obj) {
if (hasOwnProperty.call(obj, key)) {
iterator.call(context, obj[key], key, obj);
}
}
}
}
return obj;
}
function forEachSorted(obj, iterator, context) {
var keys = Object.keys(obj).sort();
for (var i = 0; i < keys.length; i++) {
iterator.call(context, obj[keys[i]], keys[i]);
}
return keys;
}
/**
* when using forEach the params are value, key, but it is often useful to have key, value.
* @param {function(string, *)} iteratorFn
* @returns {function(*, string)}
*/
function reverseParams(iteratorFn) {
return function(value, key) {iteratorFn(key, value);};
}
/**
* A consistent way of creating unique IDs in angular.
*
* Using simple numbers allows us to generate 28.6 million unique ids per second for 10 years before
* we hit number precision issues in JavaScript.
*
* Math.pow(2,53) / 60 / 60 / 24 / 365 / 10 = 28.6M
*
* @returns {number} an unique alpha-numeric string
*/
function nextUid() {
return ++uid;
}
/**
* Set or clear the hashkey for an object.
* @param obj object
* @param h the hashkey (!truthy to delete the hashkey)
*/
function setHashKey(obj, h) {
if (h) {
obj.$$hashKey = h;
} else {
delete obj.$$hashKey;
}
}
function baseExtend(dst, objs, deep) {
var h = dst.$$hashKey;
for (var i = 0, ii = objs.length; i < ii; ++i) {
var obj = objs[i];
if (!isObject(obj) && !isFunction(obj)) continue;
var keys = Object.keys(obj);
for (var j = 0, jj = keys.length; j < jj; j++) {
var key = keys[j];
var src="/?originalUrl=https%3A%2F%2Funpkg.com%2Fobj%5Bkey%5D%3B%2520%2520%2520%2520%2520%2520if%2520(deep%2520%26amp%3B%26amp%3B%2520isObject(src))%2520%257B%2520%2520%2520%2520%2520%2520%2520%2520if%2520(isDate(src))%2520%257B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520dst%5Bkey%5D%2520%3D%2520new%2520Date(src.valueOf())%3B%2520%2520%2520%2520%2520%2520%2520%2520%257D%2520else%2520if%2520(isRegExp(src))%2520%257B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520dst%5Bkey%5D%2520%3D%2520new%2520RegExp(src)%3B%2520%2520%2520%2520%2520%2520%2520%2520%257D%2520else%2520if%2520(src.nodeName)%2520%257B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520dst%5Bkey%5D%2520%3D%2520src.cloneNode(true)%3B%2520%2520%2520%2520%2520%2520%2520%2520%257D%2520else%2520if%2520(isElement(src))%2520%257B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520dst%5Bkey%5D%2520%3D%2520src.clone()%3B%2520%2520%2520%2520%2520%2520%2520%2520%257D%2520else%2520%257B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520if%2520(key%2520!%3D%3D%2520%26apos%3B__proto__%26apos%3B)%2520%257B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520if%2520(!isObject(dst%5Bkey%5D))%2520dst%5Bkey%5D%2520%3D%2520isArray(src)%2520%3F%2520%5B%5D%2520%3A%2520%7B%7D%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520baseExtend(dst%5Bkey%5D%2C%2520%5Bsrc%5D%2C%2520true)%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%7D%2520%2520%2520%2520%2520%2520%2520%2520%7D%2520%2520%2520%2520%2520%2520%7D%2520else%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520dst%5Bkey%5D%2520%3D%2520src%3B%2520%2520%2520%2520%2520%2520%7D%2520%2520%2520%2520%7D%2520%2520%7D%2520%2520setHashKey(dst%2C%2520h)%3B%2520%2520return%2520dst%3B%7D%2F**%2520*%2520%40ngdoc%2520function%2520*%2520%40name%2520angular.extend%2520*%2520%40module%2520ng%2520*%2520%40kind%2520function%2520*%2520*%2520%40description%2520*%2520Extends%2520the%2520destination%2520object%2520%60dst%60%2520by%2520copying%2520own%2520enumerable%2520properties%2520from%2520the%2520%60src%60%2520object(s)%2520*%2520to%2520%60dst%60.%2520You%2520can%2520specify%2520multiple%2520%60src%60%2520objects.%2520If%2520you%2520want%2520to%2520preserve%2520original%2520objects%2C%2520you%2520can%2520do%2520so%2520*%2520by%2520passing%2520an%2520empty%2520object%2520as%2520the%2520target%3A%2520%60var%2520object%2520%3D%2520angular.extend(%7B%7D%2C%2520object1%2C%2520object2)%60.%2520*%2520*%2520**Note%3A**%2520Keep%2520in%2520mind%2520that%2520%60angular.extend%60%2520does%2520not%2520support%2520recursive%2520merge%2520(deep%2520copy).%2520Use%2520*%2520%7B%40link%2520angular.merge%7D%2520for%2520this.%2520*%2520*%2520%40param%2520%7BObject%7D%2520dst%2520Destination%2520object.%2520*%2520%40param%2520%7B...Object%7D%2520src%2520Source%2520object(s).%2520*%2520%40returns%2520%7BObject%7D%2520Reference%2520to%2520%60dst%60.%2520*%2Ffunction%2520extend(dst)%2520%7B%2520%2520return%2520baseExtend(dst%2C%2520slice.call(arguments%2C%25201)%2C%2520false)%3B%7D%2F***%2520%40ngdoc%2520function*%2520%40name%2520angular.merge*%2520%40module%2520ng*%2520%40kind%2520function**%2520%40description*%2520Deeply%2520extends%2520the%2520destination%2520object%2520%60dst%60%2520by%2520copying%2520own%2520enumerable%2520properties%2520from%2520the%2520%60src%60%2520object(s)*%2520to%2520%60dst%60.%2520You%2520can%2520specify%2520multiple%2520%60src%60%2520objects.%2520If%2520you%2520want%2520to%2520preserve%2520original%2520objects%2C%2520you%2520can%2520do%2520so*%2520by%2520passing%2520an%2520empty%2520object%2520as%2520the%2520target%3A%2520%60var%2520object%2520%3D%2520angular.merge(%7B%7D%2C%2520object1%2C%2520object2)%60.**%2520Unlike%2520%7B%40link%2520angular.extend%2520extend()%7D%2C%2520%60merge()%60%2520recursively%2520descends%2520into%2520object%2520properties%2520of%2520source*%2520objects%2C%2520performing%2520a%2520deep%2520copy.**%2520%40deprecated*%2520sinceVersion%3D%26quot%3B1.6.5%26quot%3B*%2520This%2520function%2520is%2520deprecated%2C%2520but%2520will%2520not%2520be%2520removed%2520in%2520the%25201.x%2520lifecycle.*%2520There%2520are%2520edge%2520cases%2520(see%2520%7B%40link%2520angular.merge%23known-issues%2520known%2520issues%7D)%2520that%2520are%2520not*%2520supported%2520by%2520this%2520function.%2520We%2520suggest%2520using%2520another%2C%2520similar%2520library%2520for%2520all-purpose%2520merging%2C*%2520such%2520as%2520%5Blodash%26apos%3Bs%2520merge()%5D(https%3A%2F%2Flodash.com%2Fdocs%2F4.17.4%23merge).**%2520%40knownIssue*%2520This%2520is%2520a%2520list%2520of%2520(known)%2520object%2520types%2520that%2520are%2520not%2520handled%2520correctly%2520by%2520this%2520function%3A*%2520-%2520%5B%2560Blob%2560%5D(https%3A%2F%2Fdeveloper.mozilla.org%2Fdocs%2FWeb%2FAPI%2FBlob)*%2520-%2520%5B%2560MediaStream%2560%5D(https%3A%2F%2Fdeveloper.mozilla.org%2Fdocs%2FWeb%2FAPI%2FMediaStream)*%2520-%2520%5B%2560CanvasGradient%2560%5D(https%3A%2F%2Fdeveloper.mozilla.org%2Fdocs%2FWeb%2FAPI%2FCanvasGradient)*%2520-%2520AngularJS%2520%7B%40link%2520%24rootScope.Scope%2520scopes%7D%3B**%2520%2560angular.merge%2560%2520also%2520does%2520not%2520support%2520merging%2520objects%2520with%2520circular%2520references.**%2520%40param%2520%7BObject%7D%2520dst%2520Destination%2520object.*%2520%40param%2520%7B...Object%7D%2520src%2520Source%2520object(s).*%2520%40returns%2520%7BObject%7D%2520Reference%2520to%2520%2560dst%2560.*%2Ffunction%2520merge(dst)%2520%7B%2520%2520return%2520baseExtend(dst%2C%2520slice.call(arguments%2C%25201)%2C%2520true)%3B%7Dfunction%2520toInt(str)%2520%7B%2520%2520return%2520parseInt(str%2C%252010)%3B%7Dvar%2520isNumberNaN%2520%3D%2520Number.isNaN%2520%7C%7C%2520function%2520isNumberNaN(num)%2520%7B%2520%2520%2F%2F%2520eslint-disable-next-line%2520no-self-compare%2520%2520return%2520num%2520!%3D%3D%2520num%3B%7D%3Bfunction%2520inherit(parent%2C%2520extra)%2520%7B%2520%2520return%2520extend(Object.create(parent)%2C%2520extra)%3B%7D%2F**%2520*%2520%40ngdoc%2520function%2520*%2520%40name%2520angular.noop%2520*%2520%40module%2520ng%2520*%2520%40kind%2520function%2520*%2520*%2520%40description%2520*%2520A%2520function%2520that%2520performs%2520no%2520operations.%2520This%2520function%2520can%2520be%2520useful%2520when%2520writing%2520code%2520in%2520the%2520*%2520functional%2520style.%2520%2520%2520%2560%2560%2560js%2520%2520%2520%2520%2520function%2520foo(callback)%2520%7B%2520%2520%2520%2520%2520%2520%2520var%2520result%2520%3D%2520calculateResult()%3B%2520%2520%2520%2520%2520%2520%2520(callback%2520%7C%7C%2520angular.noop)(result)%3B%2520%2520%2520%2520%2520%7D%2520%2520%2520%2560%2560%2560%2520*%2Ffunction%2520noop()%2520%7B%7Dnoop.%24inject%2520%3D%2520%5B%5D%3B%2F**%2520*%2520%40ngdoc%2520function%2520*%2520%40name%2520angular.identity%2520*%2520%40module%2520ng%2520*%2520%40kind%2520function%2520*%2520*%2520%40description%2520*%2520A%2520function%2520that%2520returns%2520its%2520first%2520argument.%2520This%2520function%2520is%2520useful%2520when%2520writing%2520code%2520in%2520the%2520*%2520functional%2520style.%2520*%2520%2520%2520%2560%2560%2560js%2520%2520%2520function%2520transformer(transformationFn%2C%2520value)%2520%7B%2520%2520%2520%2520%2520return%2520(transformationFn%2520%7C%7C%2520angular.identity)(value)%3B%2520%2520%2520%7D%3B%2520%2520%2520%2F%2F%2520E.g.%2520%2520%2520function%2520getResult(fn%2C%2520input)%2520%7B%2520%2520%2520%2520%2520return%2520(fn%2520%7C%7C%2520angular.identity)(input)%3B%2520%2520%2520%7D%3B%2520%2520%2520getResult(function(n)%2520%7B%2520return%2520n%2520*%25202%3B%2520%7D%2C%252021)%3B%2520%2520%2520%2F%2F%2520returns%252042%2520%2520%2520getResult(null%2C%252021)%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2F%2F%2520returns%252021%2520%2520%2520getResult(undefined%2C%252021)%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2F%2F%2520returns%252021%2520%2520%2520%2560%2560%2560%2520*%2520*%2520%40param%2520%7B*%7D%2520value%2520to%2520be%2520returned.%2520*%2520%40returns%2520%7B*%7D%2520the%2520value%2520passed%2520in.%2520*%2Ffunction%2520identity(%24)%2520%7Breturn%2520%24%3B%7Didentity.%24inject%2520%3D%2520%5B%5D%3Bfunction%2520valueFn(value)%2520%7Breturn%2520function%2520valueRef()%2520%7Breturn%2520value%3B%7D%3B%7Dfunction%2520hasCustomToString(obj)%2520%7B%2520%2520return%2520isFunction(obj.toString)%2520%26amp%3B%26amp%3B%2520obj.toString%2520!%3D%3D%2520toString%3B%7D%2F**%2520*%2520%40ngdoc%2520function%2520*%2520%40name%2520angular.isUndefined%2520*%2520%40module%2520ng%2520*%2520%40kind%2520function%2520*%2520*%2520%40description%2520*%2520Determines%2520if%2520a%2520reference%2520is%2520undefined.%2520*%2520*%2520%40param%2520%7B*%7D%2520value%2520Reference%2520to%2520check.%2520*%2520%40returns%2520%7Bboolean%7D%2520True%2520if%2520%2560value%2560%2520is%2520undefined.%2520*%2Ffunction%2520isUndefined(value)%2520%7Breturn%2520typeof%2520value%2520%3D%3D%3D%2520%26apos%3Bundefined%26apos%3B%3B%7D%2F**%2520*%2520%40ngdoc%2520function%2520*%2520%40name%2520angular.isDefined%2520*%2520%40module%2520ng%2520*%2520%40kind%2520function%2520*%2520*%2520%40description%2520*%2520Determines%2520if%2520a%2520reference%2520is%2520defined.%2520*%2520*%2520%40param%2520%7B*%7D%2520value%2520Reference%2520to%2520check.%2520*%2520%40returns%2520%7Bboolean%7D%2520True%2520if%2520%2560value%2560%2520is%2520defined.%2520*%2Ffunction%2520isDefined(value)%2520%7Breturn%2520typeof%2520value%2520!%3D%3D%2520%26apos%3Bundefined%26apos%3B%3B%7D%2F**%2520*%2520%40ngdoc%2520function%2520*%2520%40name%2520angular.isObject%2520*%2520%40module%2520ng%2520*%2520%40kind%2520function%2520*%2520*%2520%40description%2520*%2520Determines%2520if%2520a%2520reference%2520is%2520an%2520%2560Object%2560.%2520Unlike%2520%2560typeof%2560%2520in%2520JavaScript%2C%2520%2560null%2560s%2520are%2520not%2520*%2520considered%2520to%2520be%2520objects.%2520Note%2520that%2520JavaScript%2520arrays%2520are%2520objects.%2520*%2520*%2520%40param%2520%7B*%7D%2520value%2520Reference%2520to%2520check.%2520*%2520%40returns%2520%7Bboolean%7D%2520True%2520if%2520%2560value%2560%2520is%2520an%2520%2560Object%2560%2520but%2520not%2520%2560null%2560.%2520*%2Ffunction%2520isObject(value)%2520%7B%2520%2520%2F%2F%2520http%3A%2F%2Fjsperf.com%2Fisobject4%2520%2520return%2520value%2520!%3D%3D%2520null%2520%26amp%3B%26amp%3B%2520typeof%2520value%2520%3D%3D%3D%2520%26apos%3Bobject%26apos%3B%3B%7D%2F**%2520*%2520Determine%2520if%2520a%2520value%2520is%2520an%2520object%2520with%2520a%2520null%2520prototype%2520*%2520*%2520%40returns%2520%7Bboolean%7D%2520True%2520if%2520%2560value%2560%2520is%2520an%2520%2560Object%2560%2520with%2520a%2520null%2520prototype%2520*%2Ffunction%2520isBlankObject(value)%2520%7B%2520%2520return%2520value%2520!%3D%3D%2520null%2520%26amp%3B%26amp%3B%2520typeof%2520value%2520%3D%3D%3D%2520%26apos%3Bobject%26apos%3B%2520%26amp%3B%26amp%3B%2520!getPrototypeOf(value)%3B%7D%2F**%2520*%2520%40ngdoc%2520function%2520*%2520%40name%2520angular.isString%2520*%2520%40module%2520ng%2520*%2520%40kind%2520function%2520*%2520*%2520%40description%2520*%2520Determines%2520if%2520a%2520reference%2520is%2520a%2520%2560String%2560.%2520*%2520*%2520%40param%2520%7B*%7D%2520value%2520Reference%2520to%2520check.%2520*%2520%40returns%2520%7Bboolean%7D%2520True%2520if%2520%2560value%2560%2520is%2520a%2520%2560String%2560.%2520*%2Ffunction%2520isString(value)%2520%7Breturn%2520typeof%2520value%2520%3D%3D%3D%2520%26apos%3Bstring%26apos%3B%3B%7D%2F**%2520*%2520%40ngdoc%2520function%2520*%2520%40name%2520angular.isNumber%2520*%2520%40module%2520ng%2520*%2520%40kind%2520function%2520*%2520*%2520%40description%2520*%2520Determines%2520if%2520a%2520reference%2520is%2520a%2520%2560Number%2560.%2520*%2520*%2520This%2520includes%2520the%2520%26quot%3Bspecial%26quot%3B%2520numbers%2520%2560NaN%2560%2C%2520%2560%2BInfinity%2560%2520and%2520%2560-Infinity%2560.%2520*%2520*%2520If%2520you%2520wish%2520to%2520exclude%2520these%2520then%2520you%2520can%2520use%2520the%2520native%2520*%2520%5B%2560isFinite%26apos%3B%5D(https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2Fdocs%2FWeb%2FJavaScript%2FReference%2FGlobal_Objects%2FisFinite)%2520*%2520method.%2520*%2520*%2520%40param%2520%7B*%7D%2520value%2520Reference%2520to%2520check.%2520*%2520%40returns%2520%7Bboolean%7D%2520True%2520if%2520%2560value%2560%2520is%2520a%2520%2560Number%2560.%2520*%2Ffunction%2520isNumber(value)%2520%7Breturn%2520typeof%2520value%2520%3D%3D%3D%2520%26apos%3Bnumber%26apos%3B%3B%7D%2F**%2520*%2520%40ngdoc%2520function%2520*%2520%40name%2520angular.isDate%2520*%2520%40module%2520ng%2520*%2520%40kind%2520function%2520*%2520*%2520%40description%2520*%2520Determines%2520if%2520a%2520value%2520is%2520a%2520date.%2520*%2520*%2520%40param%2520%7B*%7D%2520value%2520Reference%2520to%2520check.%2520*%2520%40returns%2520%7Bboolean%7D%2520True%2520if%2520%2560value%2560%2520is%2520a%2520%2560Date%2560.%2520*%2Ffunction%2520isDate(value)%2520%7B%2520%2520return%2520toString.call(value)%2520%3D%3D%3D%2520%26apos%3B%5Bobject%2520Date%5D%26apos%3B%3B%7D%2F**%2520*%2520%40ngdoc%2520function%2520*%2520%40name%2520angular.isArray%2520*%2520%40module%2520ng%2520*%2520%40kind%2520function%2520*%2520*%2520%40description%2520*%2520Determines%2520if%2520a%2520reference%2520is%2520an%2520%2560Array%2560.%2520*%2520*%2520%40param%2520%7B*%7D%2520value%2520Reference%2520to%2520check.%2520*%2520%40returns%2520%7Bboolean%7D%2520True%2520if%2520%2560value%2560%2520is%2520an%2520%2560Array%2560.%2520*%2Ffunction%2520isArray(arr)%2520%7B%2520%2520return%2520Array.isArray(arr)%2520%7C%7C%2520arr%2520instanceof%2520Array%3B%7D%2F**%2520*%2520%40description%2520*%2520Determines%2520if%2520a%2520reference%2520is%2520an%2520%2560Error%2560.%2520*%2520Loosely%2520based%2520on%2520https%3A%2F%2Fwww.npmjs.com%2Fpackage%2Fiserror%2520*%2520*%2520%40param%2520%7B*%7D%2520value%2520Reference%2520to%2520check.%2520*%2520%40returns%2520%7Bboolean%7D%2520True%2520if%2520%2560value%2560%2520is%2520an%2520%2560Error%2560.%2520*%2Ffunction%2520isError(value)%2520%7B%2520%2520var%2520tag%2520%3D%2520toString.call(value)%3B%2520%2520switch%2520(tag)%2520%7B%2520%2520%2520%2520case%2520%26apos%3B%5Bobject%2520Error%5D%26apos%3B%3A%2520return%2520true%3B%2520%2520%2520%2520case%2520%26apos%3B%5Bobject%2520Exception%5D%26apos%3B%3A%2520return%2520true%3B%2520%2520%2520%2520case%2520%26apos%3B%5Bobject%2520DOMException%5D%26apos%3B%3A%2520return%2520true%3B%2520%2520%2520%2520default%3A%2520return%2520value%2520instanceof%2520Error%3B%2520%2520%7D%7D%2F**%2520*%2520%40ngdoc%2520function%2520*%2520%40name%2520angular.isFunction%2520*%2520%40module%2520ng%2520*%2520%40kind%2520function%2520*%2520*%2520%40description%2520*%2520Determines%2520if%2520a%2520reference%2520is%2520a%2520%2560Function%2560.%2520*%2520*%2520%40param%2520%7B*%7D%2520value%2520Reference%2520to%2520check.%2520*%2520%40returns%2520%7Bboolean%7D%2520True%2520if%2520%2560value%2560%2520is%2520a%2520%2560Function%2560.%2520*%2Ffunction%2520isFunction(value)%2520%7Breturn%2520typeof%2520value%2520%3D%3D%3D%2520%26apos%3Bfunction%26apos%3B%3B%7D%2F**%2520*%2520Determines%2520if%2520a%2520value%2520is%2520a%2520regular%2520expression%2520object.%2520*%2520*%2520%40private%2520*%2520%40param%2520%7B*%7D%2520value%2520Reference%2520to%2520check.%2520*%2520%40returns%2520%7Bboolean%7D%2520True%2520if%2520%2560value%2560%2520is%2520a%2520%2560RegExp%2560.%2520*%2Ffunction%2520isRegExp(value)%2520%7B%2520%2520return%2520toString.call(value)%2520%3D%3D%3D%2520%26apos%3B%5Bobject%2520RegExp%5D%26apos%3B%3B%7D%2F**%2520*%2520Checks%2520if%2520%2560obj%2560%2520is%2520a%2520window%2520object.%2520*%2520*%2520%40private%2520*%2520%40param%2520%7B*%7D%2520obj%2520Object%2520to%2520check%2520*%2520%40returns%2520%7Bboolean%7D%2520True%2520if%2520%2560obj%2560%2520is%2520a%2520window%2520obj.%2520*%2Ffunction%2520isWindow(obj)%2520%7B%2520%2520return%2520obj%2520%26amp%3B%26amp%3B%2520obj.window%2520%3D%3D%3D%2520obj%3B%7Dfunction%2520isScope(obj)%2520%7B%2520%2520return%2520obj%2520%26amp%3B%26amp%3B%2520obj.%24evalAsync%2520%26amp%3B%26amp%3B%2520obj.%24watch%3B%7Dfunction%2520isFile(obj)%2520%7B%2520%2520return%2520toString.call(obj)%2520%3D%3D%3D%2520%26apos%3B%5Bobject%2520File%5D%26apos%3B%3B%7Dfunction%2520isFormData(obj)%2520%7B%2520%2520return%2520toString.call(obj)%2520%3D%3D%3D%2520%26apos%3B%5Bobject%2520FormData%5D%26apos%3B%3B%7Dfunction%2520isBlob(obj)%2520%7B%2520%2520return%2520toString.call(obj)%2520%3D%3D%3D%2520%26apos%3B%5Bobject%2520Blob%5D%26apos%3B%3B%7Dfunction%2520isBoolean(value)%2520%7B%2520%2520return%2520typeof%2520value%2520%3D%3D%3D%2520%26apos%3Bboolean%26apos%3B%3B%7Dfunction%2520isPromiseLike(obj)%2520%7B%2520%2520return%2520obj%2520%26amp%3B%26amp%3B%2520isFunction(obj.then)%3B%7Dvar%2520TYPED_ARRAY_REGEXP%2520%3D%2520%2F%5E%5C%5Bobject%2520(%3F%3AUint8%7CUint8Clamped%7CUint16%7CUint32%7CInt8%7CInt16%7CInt32%7CFloat32%7CFloat64)Array%5D%24%2F%3Bfunction%2520isTypedArray(value)%2520%7B%2520%2520return%2520value%2520%26amp%3B%26amp%3B%2520isNumber(value.length)%2520%26amp%3B%26amp%3B%2520TYPED_ARRAY_REGEXP.test(toString.call(value))%3B%7Dfunction%2520isArrayBuffer(obj)%2520%7B%2520%2520return%2520toString.call(obj)%2520%3D%3D%3D%2520%26apos%3B%5Bobject%2520ArrayBuffer%5D%26apos%3B%3B%7Dvar%2520trim%2520%3D%2520function(value)%2520%7B%2520%2520return%2520isString(value)%2520%3F%2520value.trim()%2520%3A%2520value%3B%7D%3B%2F%2F%2520Copied%2520from%3A%2F%2F%2520http%3A%2F%2Fdocs.closure-library.googlecode.com%2Fgit%2Flocal_closure_goog_string_string.js.source.html%23line1021%2F%2F%2520Prereq%3A%2520s%2520is%2520a%2520string.var%2520escapeForRegexp%2520%3D%2520function(s)%2520%7B%2520%2520return%2520s%2520%2520%2520%2520.replace(%2F(%5B-()%5B%5C%5D%7B%7D%2B%3F*.%24%5E%7C%2C%3A%23%26lt%3B!%5C%5C%5D)%2Fg%2C%2520%26apos%3B%5C%5C%241%26apos%3B)%2520%2520%2520%2520%2F%2F%2520eslint-disable-next-line%2520no-control-regex%2520%2520%2520%2520.replace(%2F%5Cx08%2Fg%2C%2520%26apos%3B%5C%5Cx08%26apos%3B)%3B%7D%3B%2F**%2520*%2520%40ngdoc%2520function%2520*%2520%40name%2520angular.isElement%2520*%2520%40module%2520ng%2520*%2520%40kind%2520function%2520*%2520*%2520%40description%2520*%2520Determines%2520if%2520a%2520reference%2520is%2520a%2520DOM%2520element%2520(or%2520wrapped%2520jQuery%2520element).%2520*%2520*%2520%40param%2520%7B*%7D%2520value%2520Reference%2520to%2520check.%2520*%2520%40returns%2520%7Bboolean%7D%2520True%2520if%2520%2560value%2560%2520is%2520a%2520DOM%2520element%2520(or%2520wrapped%2520jQuery%2520element).%2520*%2Ffunction%2520isElement(node)%2520%7B%2520%2520return%2520!!(node%2520%26amp%3B%26amp%3B%2520%2520%2520%2520(node.nodeName%2520%2520%2F%2F%2520We%2520are%2520a%2520direct%2520element.%2520%2520%2520%2520%7C%7C%2520(node.prop%2520%26amp%3B%26amp%3B%2520node.attr%2520%26amp%3B%26amp%3B%2520node.find)))%3B%2520%2520%2F%2F%2520We%2520have%2520an%2520on%2520and%2520find%2520method%2520part%2520of%2520jQuery%2520API.%7D%2F**%2520*%2520%40param%2520str%2520%26apos%3Bkey1%2Ckey2%2C...%26apos%3B%2520*%2520%40returns%2520%7Bobject%7D%2520in%2520the%2520form%2520of%2520%7Bkey1%3Atrue%2C%2520key2%3Atrue%2C%2520...%7D%2520*%2Ffunction%2520makeMap(str)%2520%7B%2520%2520var%2520obj%2520%3D%2520%7B%7D%2C%2520items%2520%3D%2520str.split(%26apos%3B%2C%26apos%3B)%2C%2520i%3B%2520%2520for%2520(i%2520%3D%25200%3B%2520i%2520%26lt%3B%2520items.length%3B%2520i%2B%2B)%2520%7B%2520%2520%2520%2520obj%5Bitems%5Bi%5D%5D%2520%3D%2520true%3B%2520%2520%7D%2520%2520return%2520obj%3B%7Dfunction%2520nodeName_(element)%2520%7B%2520%2520return%2520lowercase(element.nodeName%2520%7C%7C%2520(element%5B0%5D%2520%26amp%3B%26amp%3B%2520element%5B0%5D.nodeName))%3B%7Dfunction%2520includes(array%2C%2520obj)%2520%7B%2520%2520return%2520Array.prototype.indexOf.call(array%2C%2520obj)%2520!%3D%3D%2520-1%3B%7Dfunction%2520arrayRemove(array%2C%2520value)%2520%7B%2520%2520var%2520index%2520%3D%2520array.indexOf(value)%3B%2520%2520if%2520(index%2520%26gt%3B%3D%25200)%2520%7B%2520%2520%2520%2520array.splice(index%2C%25201)%3B%2520%2520%7D%2520%2520return%2520index%3B%7D%2F**%2520*%2520%40ngdoc%2520function%2520*%2520%40name%2520angular.copy%2520*%2520%40module%2520ng%2520*%2520%40kind%2520function%2520*%2520*%2520%40description%2520*%2520Creates%2520a%2520deep%2520copy%2520of%2520%2560source%2560%2C%2520which%2520should%2520be%2520an%2520object%2520or%2520an%2520array.%2520This%2520functions%2520is%2520used%2520*%2520internally%2C%2520mostly%2520in%2520the%2520change-detection%2520code.%2520It%2520is%2520not%2520intended%2520as%2520an%2520all-purpose%2520copy%2520*%2520function%2C%2520and%2520has%2520several%2520limitations%2520(see%2520below).%2520*%2520*%2520*%2520If%2520no%2520destination%2520is%2520supplied%2C%2520a%2520copy%2520of%2520the%2520object%2520or%2520array%2520is%2520created.%2520*%2520*%2520If%2520a%2520destination%2520is%2520provided%2C%2520all%2520of%2520its%2520elements%2520(for%2520arrays)%2520or%2520properties%2520(for%2520objects)%2520*%2520%2520%2520are%2520deleted%2520and%2520then%2520all%2520elements%2Fproperties%2520from%2520the%2520source%2520are%2520copied%2520to%2520it.%2520*%2520*%2520If%2520%2560source%2560%2520is%2520not%2520an%2520object%2520or%2520array%2520(inc.%2520%2560null%2560%2520and%2520%2560undefined%2560)%2C%2520%2560source%2560%2520is%2520returned.%2520*%2520*%2520If%2520%2560source%2560%2520is%2520identical%2520to%2520%2560destination%2560%2520an%2520exception%2520will%2520be%2520thrown.%2520*%2520*%2520%26lt%3Bbr%2520%2F%26gt%3B%2520*%2520*%2520%26lt%3Bdiv%2520class%3D%26quot%3Balert%2520alert-warning%26quot%3B%26gt%3B%2520*%2520%2520%2520Only%2520enumerable%2520properties%2520are%2520taken%2520into%2520account.%2520Non-enumerable%2520properties%2520(both%2520on%2520%2560source%2560%2520*%2520%2520%2520and%2520on%2520%2560destination%2560)%2520will%2520be%2520ignored.%2520*%2520%26lt%3B%2Fdiv%26gt%3B%2520*%2520*%2520%26lt%3Bdiv%2520class%3D%26quot%3Balert%2520alert-warning%26quot%3B%26gt%3B%2520*%2520%2520%2520%2560angular.copy%2560%2520does%2520not%2520check%2520if%2520destination%2520and%2520source%2520are%2520of%2520the%2520same%2520type.%2520It%26apos%3Bs%2520the%2520*%2520%2520%2520developer%26apos%3Bs%2520responsibility%2520to%2520make%2520sure%2520they%2520are%2520compatible.%2520*%2520%26lt%3B%2Fdiv%26gt%3B%2520*%2520*%2520%40knownIssue%2520*%2520This%2520is%2520a%2520non-exhaustive%2520list%2520of%2520object%2520types%2520%2F%2520features%2520that%2520are%2520not%2520handled%2520correctly%2520by%2520*%2520%2560angular.copy%2560.%2520Note%2520that%2520since%2520this%2520functions%2520is%2520used%2520by%2520the%2520change%2520detection%2520code%2C%2520this%2520*%2520means%2520binding%2520or%2520watching%2520objects%2520of%2520these%2520types%2520(or%2520that%2520include%2520these%2520types)%2520might%2520not%2520work%2520*%2520correctly.%2520*%2520-%2520%5B%2560File%2560%5D(https%3A%2F%2Fdeveloper.mozilla.org%2Fdocs%2FWeb%2FAPI%2FFile)%2520*%2520-%2520%5B%2560Map%2560%5D(https%3A%2F%2Fdeveloper.mozilla.org%2Fdocs%2FWeb%2FJavaScript%2FReference%2FGlobal_Objects%2FMap)%2520*%2520-%2520%5B%2560ImageData%2560%5D(https%3A%2F%2Fdeveloper.mozilla.org%2Fdocs%2FWeb%2FAPI%2FImageData)%2520*%2520-%2520%5B%2560MediaStream%2560%5D(https%3A%2F%2Fdeveloper.mozilla.org%2Fdocs%2FWeb%2FAPI%2FMediaStream)%2520*%2520-%2520%5B%2560Set%2560%5D(https%3A%2F%2Fdeveloper.mozilla.org%2Fdocs%2FWeb%2FJavaScript%2FReference%2FGlobal_Objects%2FSet)%2520*%2520-%2520%5B%2560WeakMap%2560%5D(https%3A%2F%2Fdeveloper.mozilla.org%2Fdocs%2FWeb%2FJavaScript%2FReference%2FGlobal_Objects%2FWeakMap)%2520*%2520-%2520%5B%2560getter%2560%5D(https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2Fdocs%2FWeb%2FJavaScript%2FReference%2FFunctions%2Fget)%2F%2520*%2520%2520%2520%5B%2560setter%2560%5D(https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2Fdocs%2FWeb%2FJavaScript%2FReference%2FFunctions%2Fset)%2520*%2520*%2520%40param%2520%7B*%7D%2520source%2520The%2520source%2520that%2520will%2520be%2520used%2520to%2520make%2520a%2520copy.%2520Can%2520be%2520any%2520type%2C%2520including%2520*%2520%2520%2520%2520%2520primitives%2C%2520%2560null%2560%2C%2520and%2520%2560undefined%2560.%2520*%2520%40param%2520%7B(Object%7CArray)%3D%7D%2520destination%2520Destination%2520into%2520which%2520the%2520source%2520is%2520copied.%2520If%2520provided%2C%2520*%2520%2520%2520%2520%2520must%2520be%2520of%2520the%2520same%2520type%2520as%2520%2560source%2560.%2520*%2520%40returns%2520%7B*%7D%2520The%2520copy%2520or%2520updated%2520%2560destination%2560%2C%2520if%2520%2560destination%2560%2520was%2520specified.%2520*%2520*%2520%40example%2520%2520%26lt%3Bexample%2520module%3D%26quot%3BcopyExample%26quot%3B%2520name%3D%26quot%3Bangular-copy%26quot%3B%26gt%3B%2520%2520%2520%2520%26lt%3Bfile%2520name%3D%26quot%3Bindex.html%26quot%3B%26gt%3B%2520%2520%2520%2520%2520%2520%26lt%3Bdiv%2520ng-controller%3D%26quot%3BExampleController%26quot%3B%26gt%3B%2520%2520%2520%2520%2520%2520%2520%2520%26lt%3Bform%2520novalidate%2520class%3D%26quot%3Bsimple-form%26quot%3B%26gt%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%26lt%3Blabel%26gt%3BName%3A%2520%26lt%3Binput%2520type%3D%26quot%3Btext%26quot%3B%2520ng-model%3D%26quot%3Buser.name%26quot%3B%2520%2F%26gt%3B%26lt%3B%2Flabel%26gt%3B%26lt%3Bbr%2520%2F%26gt%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%26lt%3Blabel%26gt%3BAge%3A%2520%2520%26lt%3Binput%2520type%3D%26quot%3Bnumber%26quot%3B%2520ng-model%3D%26quot%3Buser.age%26quot%3B%2520%2F%26gt%3B%26lt%3B%2Flabel%26gt%3B%26lt%3Bbr%2520%2F%26gt%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520Gender%3A%2520%26lt%3Blabel%26gt%3B%26lt%3Binput%2520type%3D%26quot%3Bradio%26quot%3B%2520ng-model%3D%26quot%3Buser.gender%26quot%3B%2520value%3D%26quot%3Bmale%26quot%3B%2520%2F%26gt%3Bmale%26lt%3B%2Flabel%26gt%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%26lt%3Blabel%26gt%3B%26lt%3Binput%2520type%3D%26quot%3Bradio%26quot%3B%2520ng-model%3D%26quot%3Buser.gender%26quot%3B%2520value%3D%26quot%3Bfemale%26quot%3B%2520%2F%26gt%3Bfemale%26lt%3B%2Flabel%26gt%3B%26lt%3Bbr%2520%2F%26gt%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%26lt%3Bbutton%2520ng-click%3D%26quot%3Breset()%26quot%3B%26gt%3BRESET%26lt%3B%2Fbutton%26gt%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%26lt%3Bbutton%2520ng-click%3D%26quot%3Bupdate(user)%26quot%3B%26gt%3BSAVE%26lt%3B%2Fbutton%26gt%3B%2520%2520%2520%2520%2520%2520%2520%2520%26lt%3B%2Fform%26gt%3B%2520%2520%2520%2520%2520%2520%2520%2520%26lt%3Bpre%26gt%3Bform%2520%3D%2520%7B%7Buser%2520%7C%2520json%7D%7D%26lt%3B%2Fpre%26gt%3B%2520%2520%2520%2520%2520%2520%2520%2520%26lt%3Bpre%26gt%3Bleader%2520%3D%2520%7B%7Bleader%2520%7C%2520json%7D%7D%26lt%3B%2Fpre%26gt%3B%2520%2520%2520%2520%2520%2520%26lt%3B%2Fdiv%26gt%3B%2520%2520%2520%2520%26lt%3B%2Ffile%26gt%3B%2520%2520%2520%2520%26lt%3Bfile%2520name%3D%26quot%3Bscript.js%26quot%3B%26gt%3B%2520%2520%2520%2520%2520%2520%2F%2F%2520Module%3A%2520copyExample%2520%2520%2520%2520%2520%2520angular.%2520%2520%2520%2520%2520%2520%2520%2520module(%26apos%3BcopyExample%26apos%3B%2C%2520%5B%5D).%2520%2520%2520%2520%2520%2520%2520%2520controller(%26apos%3BExampleController%26apos%3B%2C%2520%5B%26apos%3B%24scope%26apos%3B%2C%2520function(%24scope)%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%24scope.leader%2520%3D%2520%7B%7D%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%24scope.reset%2520%3D%2520function()%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2F%2F%2520Example%2520with%25201%2520argument%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%24scope.user%2520%3D%2520angular.copy(%24scope.leader)%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%7D%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%24scope.update%2520%3D%2520function(user)%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2F%2F%2520Example%2520with%25202%2520arguments%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520angular.copy(user%2C%2520%24scope.leader)%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%7D%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%24scope.reset()%3B%2520%2520%2520%2520%2520%2520%2520%2520%7D%5D)%3B%2520%2520%2520%2520%26lt%3B%2Ffile%26gt%3B%2520%2520%26lt%3B%2Fexample%26gt%3B%2520*%2Ffunction%2520copy(source%2C%2520destination%2C%2520maxDepth)%2520%7B%2520%2520var%2520stackSource%2520%3D%2520%5B%5D%3B%2520%2520var%2520stackDest%2520%3D%2520%5B%5D%3B%2520%2520maxDepth%2520%3D%2520isValidObjectMaxDepth(maxDepth)%2520%3F%2520maxDepth%2520%3A%2520NaN%3B%2520%2520if%2520(destination)%2520%7B%2520%2520%2520%2520if%2520(isTypedArray(destination)%2520%7C%7C%2520isArrayBuffer(destination))%2520%7B%2520%2520%2520%2520%2520%2520throw%2520ngMinErr(%26apos%3Bcpta%26apos%3B%2C%2520%26apos%3BCan%5C%26apos%3Bt%2520copy!%2520TypedArray%2520destination%2520cannot%2520be%2520mutated.%26apos%3B)%3B%2520%2520%2520%2520%7D%2520%2520%2520%2520if%2520(source%2520%3D%3D%3D%2520destination)%2520%7B%2520%2520%2520%2520%2520%2520throw%2520ngMinErr(%26apos%3Bcpi%26apos%3B%2C%2520%26apos%3BCan%5C%26apos%3Bt%2520copy!%2520Source%2520and%2520destination%2520are%2520identical.%26apos%3B)%3B%2520%2520%2520%2520%7D%2520%2520%2520%2520%2F%2F%2520Empty%2520the%2520destination%2520object%2520%2520%2520%2520if%2520(isArray(destination))%2520%7B%2520%2520%2520%2520%2520%2520destination.length%2520%3D%25200%3B%2520%2520%2520%2520%7D%2520else%2520%7B%2520%2520%2520%2520%2520%2520forEach(destination%2C%2520function(value%2C%2520key)%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520if%2520(key%2520!%3D%3D%2520%26apos%3B%24%24hashKey%26apos%3B)%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520delete%2520destination%5Bkey%5D%3B%2520%2520%2520%2520%2520%2520%2520%2520%7D%2520%2520%2520%2520%2520%2520%7D)%3B%2520%2520%2520%2520%7D%2520%2520%2520%2520stackSource.push(source)%3B%2520%2520%2520%2520stackDest.push(destination)%3B%2520%2520%2520%2520return%2520copyRecurse(source%2C%2520destination%2C%2520maxDepth)%3B%2520%2520%7D%2520%2520return%2520copyElement(source%2C%2520maxDepth)%3B%2520%2520function%2520copyRecurse(source%2C%2520destination%2C%2520maxDepth)%2520%7B%2520%2520%2520%2520maxDepth--%3B%2520%2520%2520%2520if%2520(maxDepth%2520%26lt%3B%25200)%2520%7B%2520%2520%2520%2520%2520%2520return%2520%26apos%3B...%26apos%3B%3B%2520%2520%2520%2520%7D%2520%2520%2520%2520var%2520h%2520%3D%2520destination.%24%24hashKey%3B%2520%2520%2520%2520var%2520key%3B%2520%2520%2520%2520if%2520(isArray(source))%2520%7B%2520%2520%2520%2520%2520%2520for%2520(var%2520i%2520%3D%25200%2C%2520ii%2520%3D%2520source.length%3B%2520i%2520%26lt%3B%2520ii%3B%2520i%2B%2B)%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520destination.push(copyElement(source%5Bi%5D%2C%2520maxDepth))%3B%2520%2520%2520%2520%2520%2520%7D%2520%2520%2520%2520%7D%2520else%2520if%2520(isBlankObject(source))%2520%7B%2520%2520%2520%2520%2520%2520%2F%2F%2520createMap()%2520fast%2520path%2520---%2520Safe%2520to%2520avoid%2520hasOwnProperty%2520check%2520because%2520prototype%2520chain%2520is%2520empty%2520%2520%2520%2520%2520%2520for%2520(key%2520in%2520source)%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520destination%5Bkey%5D%2520%3D%2520copyElement(source%5Bkey%5D%2C%2520maxDepth)%3B%2520%2520%2520%2520%2520%2520%7D%2520%2520%2520%2520%7D%2520else%2520if%2520(source%2520%26amp%3B%26amp%3B%2520typeof%2520source.hasOwnProperty%2520%3D%3D%3D%2520%26apos%3Bfunction%26apos%3B)%2520%7B%2520%2520%2520%2520%2520%2520%2F%2F%2520Slow%2520path%2C%2520which%2520must%2520rely%2520on%2520hasOwnProperty%2520%2520%2520%2520%2520%2520for%2520(key%2520in%2520source)%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520if%2520(source.hasOwnProperty(key))%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520destination%5Bkey%5D%2520%3D%2520copyElement(source%5Bkey%5D%2C%2520maxDepth)%3B%2520%2520%2520%2520%2520%2520%2520%2520%7D%2520%2520%2520%2520%2520%2520%7D%2520%2520%2520%2520%7D%2520else%2520%7B%2520%2520%2520%2520%2520%2520%2F%2F%2520Slowest%2520path%2520---%2520hasOwnProperty%2520can%26apos%3Bt%2520be%2520called%2520as%2520a%2520method%2520%2520%2520%2520%2520%2520for%2520(key%2520in%2520source)%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520if%2520(hasOwnProperty.call(source%2C%2520key))%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520destination%5Bkey%5D%2520%3D%2520copyElement(source%5Bkey%5D%2C%2520maxDepth)%3B%2520%2520%2520%2520%2520%2520%2520%2520%7D%2520%2520%2520%2520%2520%2520%7D%2520%2520%2520%2520%7D%2520%2520%2520%2520setHashKey(destination%2C%2520h)%3B%2520%2520%2520%2520return%2520destination%3B%2520%2520%7D%2520%2520function%2520copyElement(source%2C%2520maxDepth)%2520%7B%2520%2520%2520%2520%2F%2F%2520Simple%2520values%2520%2520%2520%2520if%2520(!isObject(source))%2520%7B%2520%2520%2520%2520%2520%2520return%2520source%3B%2520%2520%2520%2520%7D%2520%2520%2520%2520%2F%2F%2520Already%2520copied%2520values%2520%2520%2520%2520var%2520index%2520%3D%2520stackSource.indexOf(source)%3B%2520%2520%2520%2520if%2520(index%2520!%3D%3D%2520-1)%2520%7B%2520%2520%2520%2520%2520%2520return%2520stackDest%5Bindex%5D%3B%2520%2520%2520%2520%7D%2520%2520%2520%2520if%2520(isWindow(source)%2520%7C%7C%2520isScope(source))%2520%7B%2520%2520%2520%2520%2520%2520throw%2520ngMinErr(%26apos%3Bcpws%26apos%3B%2C%2520%2520%2520%2520%2520%2520%2520%2520%26apos%3BCan%5C%26apos%3Bt%2520copy!%2520Making%2520copies%2520of%2520Window%2520or%2520Scope%2520instances%2520is%2520not%2520supported.%26apos%3B)%3B%2520%2520%2520%2520%7D%2520%2520%2520%2520var%2520needsRecurse%2520%3D%2520false%3B%2520%2520%2520%2520var%2520destination%2520%3D%2520copyType(source)%3B%2520%2520%2520%2520if%2520(destination%2520%3D%3D%3D%2520undefined)%2520%7B%2520%2520%2520%2520%2520%2520destination%2520%3D%2520isArray(source)%2520%3F%2520%5B%5D%2520%3A%2520Object.create(getPrototypeOf(source))%3B%2520%2520%2520%2520%2520%2520needsRecurse%2520%3D%2520true%3B%2520%2520%2520%2520%7D%2520%2520%2520%2520stackSource.push(source)%3B%2520%2520%2520%2520stackDest.push(destination)%3B%2520%2520%2520%2520return%2520needsRecurse%2520%2520%2520%2520%2520%2520%3F%2520copyRecurse(source%2C%2520destination%2C%2520maxDepth)%2520%2520%2520%2520%2520%2520%3A%2520destination%3B%2520%2520%7D%2520%2520function%2520copyType(source)%2520%7B%2520%2520%2520%2520switch%2520(toString.call(source))%2520%7B%2520%2520%2520%2520%2520%2520case%2520%26apos%3B%5Bobject%2520Int8Array%5D%26apos%3B%3A%2520%2520%2520%2520%2520%2520case%2520%26apos%3B%5Bobject%2520Int16Array%5D%26apos%3B%3A%2520%2520%2520%2520%2520%2520case%2520%26apos%3B%5Bobject%2520Int32Array%5D%26apos%3B%3A%2520%2520%2520%2520%2520%2520case%2520%26apos%3B%5Bobject%2520Float32Array%5D%26apos%3B%3A%2520%2520%2520%2520%2520%2520case%2520%26apos%3B%5Bobject%2520Float64Array%5D%26apos%3B%3A%2520%2520%2520%2520%2520%2520case%2520%26apos%3B%5Bobject%2520Uint8Array%5D%26apos%3B%3A%2520%2520%2520%2520%2520%2520case%2520%26apos%3B%5Bobject%2520Uint8ClampedArray%5D%26apos%3B%3A%2520%2520%2520%2520%2520%2520case%2520%26apos%3B%5Bobject%2520Uint16Array%5D%26apos%3B%3A%2520%2520%2520%2520%2520%2520case%2520%26apos%3B%5Bobject%2520Uint32Array%5D%26apos%3B%3A%2520%2520%2520%2520%2520%2520%2520%2520return%2520new%2520source.constructor(copyElement(source.buffer)%2C%2520source.byteOffset%2C%2520source.length)%3B%2520%2520%2520%2520%2520%2520case%2520%26apos%3B%5Bobject%2520ArrayBuffer%5D%26apos%3B%3A%2520%2520%2520%2520%2520%2520%2520%2520%2F%2F%2520Support%3A%2520IE10%2520%2520%2520%2520%2520%2520%2520%2520if%2520(!source.slice)%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2F%2F%2520If%2520we%26apos%3Bre%2520in%2520this%2520case%2520we%2520know%2520the%2520environment%2520supports%2520ArrayBuffer%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2F*%2520eslint-disable%2520no-undef%2520*%2F%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520var%2520copied%2520%3D%2520new%2520ArrayBuffer(source.byteLength)%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520new%2520Uint8Array(copied).set(new%2520Uint8Array(source))%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2F*%2520eslint-enable%2520*%2F%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520return%2520copied%3B%2520%2520%2520%2520%2520%2520%2520%2520%7D%2520%2520%2520%2520%2520%2520%2520%2520return%2520source.slice(0)%3B%2520%2520%2520%2520%2520%2520case%2520%26apos%3B%5Bobject%2520Boolean%5D%26apos%3B%3A%2520%2520%2520%2520%2520%2520case%2520%26apos%3B%5Bobject%2520Number%5D%26apos%3B%3A%2520%2520%2520%2520%2520%2520case%2520%26apos%3B%5Bobject%2520String%5D%26apos%3B%3A%2520%2520%2520%2520%2520%2520case%2520%26apos%3B%5Bobject%2520Date%5D%26apos%3B%3A%2520%2520%2520%2520%2520%2520%2520%2520return%2520new%2520source.constructor(source.valueOf())%3B%2520%2520%2520%2520%2520%2520case%2520%26apos%3B%5Bobject%2520RegExp%5D%26apos%3B%3A%2520%2520%2520%2520%2520%2520%2520%2520var%2520re%2520%3D%2520new%2520RegExp(source.source%2C%2520source.toString().match(%2F%5B%5E%2F%5D*%24%2F)%5B0%5D)%3B%2520%2520%2520%2520%2520%2520%2520%2520re.lastIndex%2520%3D%2520source.lastIndex%3B%2520%2520%2520%2520%2520%2520%2520%2520return%2520re%3B%2520%2520%2520%2520%2520%2520case%2520%26apos%3B%5Bobject%2520Blob%5D%26apos%3B%3A%2520%2520%2520%2520%2520%2520%2520%2520return%2520new%2520source.constructor(%5Bsource%5D%2C%2520%7Btype%3A%2520source.type%7D)%3B%2520%2520%2520%2520%7D%2520%2520%2520%2520if%2520(isFunction(source.cloneNode))%2520%7B%2520%2520%2520%2520%2520%2520return%2520source.cloneNode(true)%3B%2520%2520%2520%2520%7D%2520%2520%7D%7D%2F%2F%2520eslint-disable-next-line%2520no-self-comparefunction%2520simpleCompare(a%2C%2520b)%2520%7B%2520return%2520a%2520%3D%3D%3D%2520b%2520%7C%7C%2520(a%2520!%3D%3D%2520a%2520%26amp%3B%26amp%3B%2520b%2520!%3D%3D%2520b)%3B%2520%7D%2F**%2520*%2520%40ngdoc%2520function%2520*%2520%40name%2520angular.equals%2520*%2520%40module%2520ng%2520*%2520%40kind%2520function%2520*%2520*%2520%40description%2520*%2520Determines%2520if%2520two%2520objects%2520or%2520two%2520values%2520are%2520equivalent.%2520Supports%2520value%2520types%2C%2520regular%2520*%2520expressions%2C%2520arrays%2520and%2520objects.%2520*%2520*%2520Two%2520objects%2520or%2520values%2520are%2520considered%2520equivalent%2520if%2520at%2520least%2520one%2520of%2520the%2520following%2520is%2520true%3A%2520*%2520*%2520*%2520Both%2520objects%2520or%2520values%2520pass%2520%2560%3D%3D%3D%2560%2520comparison.%2520*%2520*%2520Both%2520objects%2520or%2520values%2520are%2520of%2520the%2520same%2520type%2520and%2520all%2520of%2520their%2520properties%2520are%2520equal%2520by%2520*%2520%2520%2520comparing%2520them%2520with%2520%2560angular.equals%2560.%2520*%2520*%2520Both%2520values%2520are%2520NaN.%2520(In%2520JavaScript%2C%2520NaN%2520%3D%3D%2520NaN%2520%3D%26gt%3B%2520false.%2520But%2520we%2520consider%2520two%2520NaN%2520as%2520equal)%2520*%2520*%2520Both%2520values%2520represent%2520the%2520same%2520regular%2520expression%2520(In%2520JavaScript%2C%2520*%2520%2520%2520%2Fabc%2F%2520%3D%3D%2520%2Fabc%2F%2520%3D%26gt%3B%2520false.%2520But%2520we%2520consider%2520two%2520regular%2520expressions%2520as%2520equal%2520when%2520their%2520textual%2520*%2520%2520%2520representation%2520matches).%2520*%2520*%2520During%2520a%2520property%2520comparison%2C%2520properties%2520of%2520%2560function%2560%2520type%2520and%2520properties%2520with%2520names%2520*%2520that%2520begin%2520with%2520%2560%24%2560%2520are%2520ignored.%2520*%2520*%2520Scope%2520and%2520DOMWindow%2520objects%2520are%2520being%2520compared%2520only%2520by%2520identify%2520(%2560%3D%3D%3D%2560).%2520*%2520*%2520%40param%2520%7B*%7D%2520o1%2520Object%2520or%2520value%2520to%2520compare.%2520*%2520%40param%2520%7B*%7D%2520o2%2520Object%2520or%2520value%2520to%2520compare.%2520*%2520%40returns%2520%7Bboolean%7D%2520True%2520if%2520arguments%2520are%2520equal.%2520*%2520*%2520%40example%2520%2520%2520%26lt%3Bexample%2520module%3D%26quot%3BequalsExample%26quot%3B%2520name%3D%26quot%3BequalsExample%26quot%3B%26gt%3B%2520%2520%2520%2520%2520%26lt%3Bfile%2520name%3D%26quot%3Bindex.html%26quot%3B%26gt%3B%2520%2520%2520%2520%2520%2520%26lt%3Bdiv%2520ng-controller%3D%26quot%3BExampleController%26quot%3B%26gt%3B%2520%2520%2520%2520%2520%2520%2520%2520%26lt%3Bform%2520novalidate%26gt%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%26lt%3Bh3%26gt%3BUser%25201%26lt%3B%2Fh3%26gt%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520Name%3A%2520%26lt%3Binput%2520type%3D%26quot%3Btext%26quot%3B%2520ng-model%3D%26quot%3Buser1.name%26quot%3B%26gt%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520Age%3A%2520%26lt%3Binput%2520type%3D%26quot%3Bnumber%26quot%3B%2520ng-model%3D%26quot%3Buser1.age%26quot%3B%26gt%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%26lt%3Bh3%26gt%3BUser%25202%26lt%3B%2Fh3%26gt%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520Name%3A%2520%26lt%3Binput%2520type%3D%26quot%3Btext%26quot%3B%2520ng-model%3D%26quot%3Buser2.name%26quot%3B%26gt%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520Age%3A%2520%26lt%3Binput%2520type%3D%26quot%3Bnumber%26quot%3B%2520ng-model%3D%26quot%3Buser2.age%26quot%3B%26gt%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%26lt%3Bdiv%26gt%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%26lt%3Bbr%2F%26gt%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%26lt%3Binput%2520type%3D%26quot%3Bbutton%26quot%3B%2520value%3D%26quot%3BCompare%26quot%3B%2520ng-click%3D%26quot%3Bcompare()%26quot%3B%26gt%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%26lt%3B%2Fdiv%26gt%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520User%25201%3A%2520%26lt%3Bpre%26gt%3B%7B%7Buser1%2520%7C%2520json%7D%7D%26lt%3B%2Fpre%26gt%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520User%25202%3A%2520%26lt%3Bpre%26gt%3B%7B%7Buser2%2520%7C%2520json%7D%7D%26lt%3B%2Fpre%26gt%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520Equal%3A%2520%26lt%3Bpre%26gt%3B%7B%7Bresult%7D%7D%26lt%3B%2Fpre%26gt%3B%2520%2520%2520%2520%2520%2520%2520%2520%26lt%3B%2Fform%26gt%3B%2520%2520%2520%2520%2520%2520%26lt%3B%2Fdiv%26gt%3B%2520%2520%2520%2520%26lt%3B%2Ffile%26gt%3B%2520%2520%2520%2520%26lt%3Bfile%2520name%3D%26quot%3Bscript.js%26quot%3B%26gt%3B%2520%2520%2520%2520%2520%2520%2520%2520angular.module(%26apos%3BequalsExample%26apos%3B%2C%2520%5B%5D).controller(%26apos%3BExampleController%26apos%3B%2C%2520%5B%26apos%3B%24scope%26apos%3B%2C%2520function(%24scope)%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%24scope.user1%2520%3D%2520%7B%7D%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%24scope.user2%2520%3D%2520%7B%7D%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%24scope.compare%2520%3D%2520function()%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%24scope.result%2520%3D%2520angular.equals(%24scope.user1%2C%2520%24scope.user2)%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%7D%3B%2520%2520%2520%2520%2520%2520%2520%2520%7D%5D)%3B%2520%2520%2520%2520%26lt%3B%2Ffile%26gt%3B%2520%2520%26lt%3B%2Fexample%26gt%3B%2520*%2Ffunction%2520equals(o1%2C%2520o2)%2520%7B%2520%2520if%2520(o1%2520%3D%3D%3D%2520o2)%2520return%2520true%3B%2520%2520if%2520(o1%2520%3D%3D%3D%2520null%2520%7C%7C%2520o2%2520%3D%3D%3D%2520null)%2520return%2520false%3B%2520%2520%2F%2F%2520eslint-disable-next-line%2520no-self-compare%2520%2520if%2520(o1%2520!%3D%3D%2520o1%2520%26amp%3B%26amp%3B%2520o2%2520!%3D%3D%2520o2)%2520return%2520true%3B%2520%2F%2F%2520NaN%2520%3D%3D%3D%2520NaN%2520%2520var%2520t1%2520%3D%2520typeof%2520o1%2C%2520t2%2520%3D%2520typeof%2520o2%2C%2520length%2C%2520key%2C%2520keySet%3B%2520%2520if%2520(t1%2520%3D%3D%3D%2520t2%2520%26amp%3B%26amp%3B%2520t1%2520%3D%3D%3D%2520%26apos%3Bobject%26apos%3B)%2520%7B%2520%2520%2520%2520if%2520(isArray(o1))%2520%7B%2520%2520%2520%2520%2520%2520if%2520(!isArray(o2))%2520return%2520false%3B%2520%2520%2520%2520%2520%2520if%2520((length%2520%3D%2520o1.length)%2520%3D%3D%3D%2520o2.length)%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520for%2520(key%2520%3D%25200%3B%2520key%2520%26lt%3B%2520length%3B%2520key%2B%2B)%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520if%2520(!equals(o1%5Bkey%5D%2C%2520o2%5Bkey%5D))%2520return%2520false%3B%2520%2520%2520%2520%2520%2520%2520%2520%7D%2520%2520%2520%2520%2520%2520%2520%2520return%2520true%3B%2520%2520%2520%2520%2520%2520%7D%2520%2520%2520%2520%7D%2520else%2520if%2520(isDate(o1))%2520%7B%2520%2520%2520%2520%2520%2520if%2520(!isDate(o2))%2520return%2520false%3B%2520%2520%2520%2520%2520%2520return%2520simpleCompare(o1.getTime()%2C%2520o2.getTime())%3B%2520%2520%2520%2520%7D%2520else%2520if%2520(isRegExp(o1))%2520%7B%2520%2520%2520%2520%2520%2520if%2520(!isRegExp(o2))%2520return%2520false%3B%2520%2520%2520%2520%2520%2520return%2520o1.toString()%2520%3D%3D%3D%2520o2.toString()%3B%2520%2520%2520%2520%7D%2520else%2520%7B%2520%2520%2520%2520%2520%2520if%2520(isScope(o1)%2520%7C%7C%2520isScope(o2)%2520%7C%7C%2520isWindow(o1)%2520%7C%7C%2520isWindow(o2)%2520%7C%7C%2520%2520%2520%2520%2520%2520%2520%2520isArray(o2)%2520%7C%7C%2520isDate(o2)%2520%7C%7C%2520isRegExp(o2))%2520return%2520false%3B%2520%2520%2520%2520%2520%2520keySet%2520%3D%2520createMap()%3B%2520%2520%2520%2520%2520%2520for%2520(key%2520in%2520o1)%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520if%2520(key.charAt(0)%2520%3D%3D%3D%2520%26apos%3B%24%26apos%3B%2520%7C%7C%2520isFunction(o1%5Bkey%5D))%2520continue%3B%2520%2520%2520%2520%2520%2520%2520%2520if%2520(!equals(o1%5Bkey%5D%2C%2520o2%5Bkey%5D))%2520return%2520false%3B%2520%2520%2520%2520%2520%2520%2520%2520keySet%5Bkey%5D%2520%3D%2520true%3B%2520%2520%2520%2520%2520%2520%7D%2520%2520%2520%2520%2520%2520for%2520(key%2520in%2520o2)%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520if%2520(!(key%2520in%2520keySet)%2520%26amp%3B%26amp%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520key.charAt(0)%2520!%3D%3D%2520%26apos%3B%24%26apos%3B%2520%26amp%3B%26amp%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520isDefined(o2%5Bkey%5D)%2520%26amp%3B%26amp%3B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520!isFunction(o2%5Bkey%5D))%2520return%2520false%3B%2520%2520%2520%2520%2520%2520%7D%2520%2520%2520%2520%2520%2520return%2520true%3B%2520%2520%2520%2520%7D%2520%2520%7D%2520%2520return%2520false%3B%7Dvar%2520csp%2520%3D%2520function()%2520%7B%2520%2520if%2520(!isDefined(csp.rules))%2520%7B%2520%2520%2520%2520var%2520ngCspElement%2520%3D%2520(window.document.querySelector(%26apos%3B%5Bng-csp%5D%26apos%3B)%2520%7C%7C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520window.document.querySelector(%26apos%3B%5Bdata-ng-csp%5D%26apos%3B))%3B%2520%2520%2520%2520if%2520(ngCspElement)%2520%7B%2520%2520%2520%2520%2520%2520var%2520ngCspAttribute%2520%3D%2520ngCspElement.getAttribute(%26apos%3Bng-csp%26apos%3B)%2520%7C%7C%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520ngCspElement.getAttribute(%26apos%3Bdata-ng-csp%26apos%3B)%3B%2520%2520%2520%2520%2520%2520csp.rules%2520%3D%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520noUnsafeEval%3A%2520!ngCspAttribute%2520%7C%7C%2520(ngCspAttribute.indexOf(%26apos%3Bno-unsafe-eval%26apos%3B)%2520!%3D%3D%2520-1)%2C%2520%2520%2520%2520%2520%2520%2520%2520noInlineStyle%3A%2520!ngCspAttribute%2520%7C%7C%2520(ngCspAttribute.indexOf(%26apos%3Bno-inline-style%26apos%3B)%2520!%3D%3D%2520-1)%2520%2520%2520%2520%2520%2520%7D%3B%2520%2520%2520%2520%7D%2520else%2520%7B%2520%2520%2520%2520%2520%2520csp.rules%2520%3D%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520noUnsafeEval%3A%2520noUnsafeEval()%2C%2520%2520%2520%2520%2520%2520%2520%2520noInlineStyle%3A%2520false%2520%2520%2520%2520%2520%2520%7D%3B%2520%2520%2520%2520%7D%2520%2520%7D%2520%2520return%2520csp.rules%3B%2520%2520function%2520noUnsafeEval()%2520%7B%2520%2520%2520%2520try%2520%7B%2520%2520%2520%2520%2520%2520%2F%2F%2520eslint-disable-next-line%2520no-new%2C%2520no-new-func%2520%2520%2520%2520%2520%2520new%2520Function(%26apos%3B%26apos%3B)%3B%2520%2520%2520%2520%2520%2520return%2520false%3B%2520%2520%2520%2520%7D%2520catch%2520(e)%2520%7B%2520%2520%2520%2520%2520%2520return%2520true%3B%2520%2520%2520%2520%7D%2520%2520%7D%7D%3B%2F**%2520*%2520%40ngdoc%2520directive%2520*%2520%40module%2520ng%2520*%2520%40name%2520ngJq%2520*%2520*%2520%40element%2520ANY%2520*%2520%40param%2520%7Bstring%3D%7D%2520ngJq%2520the%2520name%2520of%2520the%2520library%2520available%2520under%2520%2560window%2560%2520*%2520to%2520be%2520used%2520for%2520angular.element%2520*%2520%40description%2520*%2520Use%2520this%2520directive%2520to%2520force%2520the%2520angular.element%2520library.%2520%2520This%2520should%2520be%2520*%2520used%2520to%2520force%2520either%2520jqLite%2520by%2520leaving%2520ng-jq%2520blank%2520or%2520setting%2520the%2520name%2520of%2520*%2520the%2520jquery%2520variable%2520under%2520window%2520(eg.%2520jQuery).%2520*%2520*%2520Since%2520AngularJS%2520looks%2520for%2520this%2520directive%2520when%2520it%2520is%2520loaded%2520(doesn%26apos%3Bt%2520wait%2520for%2520the%2520*%2520DOMContentLoaded%2520event)%2C%2520it%2520must%2520be%2520placed%2520on%2520an%2520element%2520that%2520comes%2520before%2520the%2520script%2520*%2520which%2520loads%2520angular.%2520Also%2C%2520only%2520the%2520first%2520instance%2520of%2520%2560ng-jq%2560%2520will%2520be%2520used%2520and%2520all%2520*%2520others%2520ignored.%2520*%2520*%2520%40example%2520*%2520This%2520example%2520shows%2520how%2520to%2520force%2520jqLite%2520using%2520the%2520%2560ngJq%2560%2520directive%2520to%2520the%2520%2560html%2560%2520tag.%2520%2560%2560%2560html%2520%26lt%3B!doctype%2520html%26gt%3B%2520%26lt%3Bhtml%2520ng-app%2520ng-jq%26gt%3B%2520...%2520...%2520%26lt%3B%2Fhtml%26gt%3B%2520%2560%2560%2560%2520*%2520%40example%2520*%2520This%2520example%2520shows%2520how%2520to%2520use%2520a%2520jQuery%2520based%2520library%2520of%2520a%2520different%2520name.%2520*%2520The%2520library%2520name%2520must%2520be%2520available%2520at%2520the%2520top%2520most%2520%26apos%3Bwindow%26apos%3B.%2520%2560%2560%2560html%2520%26lt%3B!doctype%2520html%26gt%3B%2520%26lt%3Bhtml%2520ng-app%2520ng-jq%3D%26quot%3BjQueryLib%26quot%3B%26gt%3B%2520...%2520...%2520%26lt%3B%2Fhtml%26gt%3B%2520%2560%2560%2560%2520*%2Fvar%2520jq%2520%3D%2520function()%2520%7B%2520%2520if%2520(isDefined(jq.name_))%2520return%2520jq.name_%3B%2520%2520var%2520el%3B%2520%2520var%2520i%2C%2520ii%2520%3D%2520ngAttrPrefixes.length%2C%2520prefix%2C%2520name%3B%2520%2520for%2520(i%2520%3D%25200%3B%2520i%2520%26lt%3B%2520ii%3B%2520%2B%2Bi)%2520%7B%2520%2520%2520%2520prefix%2520%3D%2520ngAttrPrefixes%5Bi%5D%3B%2520%2520%2520%2520el%2520%3D%2520window.document.querySelector(%26apos%3B%5B%26apos%3B%2520%2B%2520prefix.replace(%26apos%3B%3A%26apos%3B%2C%2520%26apos%3B%5C%5C%3A%26apos%3B)%2520%2B%2520%26apos%3Bjq%5D%26apos%3B)%3B%2520%2520%2520%2520if%2520(el)%2520%7B%2520%2520%2520%2520%2520%2520name%2520%3D%2520el.getAttribute(prefix%2520%2B%2520%26apos%3Bjq%26apos%3B)%3B%2520%2520%2520%2520%2520%2520break%3B%2520%2520%2520%2520%7D%2520%2520%7D%2520%2520return%2520(jq.name_%2520%3D%2520name)%3B%7D%3Bfunction%2520concat(array1%2C%2520array2%2C%2520index)%2520%7B%2520%2520return%2520array1.concat(slice.call(array2%2C%2520index))%3B%7Dfunction%2520sliceArgs(args%2C%2520startIndex)%2520%7B%2520%2520return%2520slice.call(args%2C%2520startIndex%2520%7C%7C%25200)%3B%7D%2F**%2520*%2520%40ngdoc%2520function%2520*%2520%40name%2520angular.bind%2520*%2520%40module%2520ng%2520*%2520%40kind%2520function%2520*%2520*%2520%40description%2520*%2520Returns%2520a%2520function%2520which%2520calls%2520function%2520%2560fn%2560%2520bound%2520to%2520%2560self%2560%2520(%2560self%2560%2520becomes%2520the%2520%2560this%2560%2520for%2520*%2520%2560fn%2560).%2520You%2520can%2520supply%2520optional%2520%2560args%2560%2520that%2520are%2520prebound%2520to%2520the%2520function.%2520This%2520feature%2520is%2520also%2520*%2520known%2520as%2520%5Bpartial%2520application%5D(http%3A%2F%2Fen.wikipedia.org%2Fwiki%2FPartial_application)%2C%2520as%2520*%2520distinguished%2520from%2520%5Bfunction%2520currying%5D(http%3A%2F%2Fen.wikipedia.org%2Fwiki%2FCurrying%23Contrast_with_partial_function_application).%2520*%2520*%2520%40param%2520%7BObject%7D%2520self%2520Context%2520which%2520%2560fn%2560%2520should%2520be%2520evaluated%2520in.%2520*%2520%40param%2520%7Bfunction()%7D%2520fn%2520Function%2520to%2520be%2520bound.%2520*%2520%40param%2520%7B...*%7D%2520args%2520Optional%2520arguments%2520to%2520be%2520prebound%2520to%2520the%2520%2560fn%2560%2520function%2520call.%2520*%2520%40returns%2520%7Bfunction()%7D%2520Function%2520that%2520wraps%2520the%2520%2560fn%2560%2520with%2520all%2520the%2520specified%2520bindings.%2520*%2Ffunction%2520bind(self%2C%2520fn)%2520%7B%2520%2520var%2520curryArgs%2520%3D%2520arguments.length%2520%26gt%3B%25202%2520%3F%2520sliceArgs(arguments%2C%25202)%2520%3A%2520%5B%5D%3B%2520%2520if%2520(isFunction(fn)%2520%26amp%3B%26amp%3B%2520!(fn%2520instanceof%2520RegExp))%2520%7B%2520%2520%2520%2520return%2520curryArgs.length%2520%2520%2520%2520%2520%2520%3F%2520function()%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520return%2520arguments.length%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%3F%2520fn.apply(self%2C%2520concat(curryArgs%2C%2520arguments%2C%25200))%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%3A%2520fn.apply(self%2C%2520curryArgs)%3B%2520%2520%2520%2520%2520%2520%2520%2520%7D%2520%2520%2520%2520%2520%2520%3A%2520function()%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520return%2520arguments.length%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%3F%2520fn.apply(self%2C%2520arguments)%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%3A%2520fn.call(self)%3B%2520%2520%2520%2520%2520%2520%2520%2520%7D%3B%2520%2520%7D%2520else%2520%7B%2520%2520%2520%2520%2F%2F%2520In%2520IE%2C%2520native%2520methods%2520are%2520not%2520functions%2520so%2520they%2520cannot%2520be%2520bound%2520(note%3A%2520they%2520don%26apos%3Bt%2520need%2520to%2520be).%2520%2520%2520%2520return%2520fn%3B%2520%2520%7D%7Dfunction%2520toJsonReplacer(key%2C%2520value)%2520%7B%2520%2520var%2520val%2520%3D%2520value%3B%2520%2520if%2520(typeof%2520key%2520%3D%3D%3D%2520%26apos%3Bstring%26apos%3B%2520%26amp%3B%26amp%3B%2520key.charAt(0)%2520%3D%3D%3D%2520%26apos%3B%24%26apos%3B%2520%26amp%3B%26amp%3B%2520key.charAt(1)%2520%3D%3D%3D%2520%26apos%3B%24%26apos%3B)%2520%7B%2520%2520%2520%2520val%2520%3D%2520undefined%3B%2520%2520%7D%2520else%2520if%2520(isWindow(value))%2520%7B%2520%2520%2520%2520val%2520%3D%2520%26apos%3B%24WINDOW%26apos%3B%3B%2520%2520%7D%2520else%2520if%2520(value%2520%26amp%3B%26amp%3B%2520%2520window.document%2520%3D%3D%3D%2520value)%2520%7B%2520%2520%2520%2520val%2520%3D%2520%26apos%3B%24DOCUMENT%26apos%3B%3B%2520%2520%7D%2520else%2520if%2520(isScope(value))%2520%7B%2520%2520%2520%2520val%2520%3D%2520%26apos%3B%24SCOPE%26apos%3B%3B%2520%2520%7D%2520%2520return%2520val%3B%7D%2F**%2520*%2520%40ngdoc%2520function%2520*%2520%40name%2520angular.toJson%2520*%2520%40module%2520ng%2520*%2520%40kind%2520function%2520*%2520*%2520%40description%2520*%2520Serializes%2520input%2520into%2520a%2520JSON-formatted%2520string.%2520Properties%2520with%2520leading%2520%24%24%2520characters%2520will%2520be%2520*%2520stripped%2520since%2520AngularJS%2520uses%2520this%2520notation%2520internally.%2520*%2520*%2520%40param%2520%7BObject%7CArray%7CDate%7Cstring%7Cnumber%7Cboolean%7D%2520obj%2520Input%2520to%2520be%2520serialized%2520into%2520JSON.%2520*%2520%40param%2520%7Bboolean%7Cnumber%7D%2520%5Bpretty%3D2%5D%2520If%2520set%2520to%2520true%2C%2520the%2520JSON%2520output%2520will%2520contain%2520newlines%2520and%2520whitespace.%2520*%2520%2520%2520%2520If%2520set%2520to%2520an%2520integer%2C%2520the%2520JSON%2520output%2520will%2520contain%2520that%2520many%2520spaces%2520per%2520indentation.%2520*%2520%40returns%2520%7Bstring%7Cundefined%7D%2520JSON-ified%2520string%2520representing%2520%2560obj%2560.%2520*%2520%40knownIssue%2520*%2520*%2520The%2520Safari%2520browser%2520throws%2520a%2520%2560RangeError%2560%2520instead%2520of%2520returning%2520%2560null%2560%2520when%2520it%2520tries%2520to%2520stringify%2520a%2520%2560Date%2560%2520*%2520object%2520with%2520an%2520invalid%2520date%2520value.%2520The%2520only%2520reliable%2520way%2520to%2520prevent%2520this%2520is%2520to%2520monkeypatch%2520the%2520*%2520%2560Date.prototype.toJSON%2560%2520method%2520as%2520follows%3A%2520*%2520*%2520%2560%2560%2560%2520*%2520var%2520_DatetoJSON%2520%3D%2520Date.prototype.toJSON%3B%2520*%2520Date.prototype.toJSON%2520%3D%2520function()%2520%7B%2520*%2520%2520%2520try%2520%7B%2520*%2520%2520%2520%2520%2520return%2520_DatetoJSON.call(this)%3B%2520*%2520%2520%2520%7D%2520catch(e)%2520%7B%2520*%2520%2520%2520%2520%2520if%2520(e%2520instanceof%2520RangeError)%2520%7B%2520*%2520%2520%2520%2520%2520%2520%2520return%2520null%3B%2520*%2520%2520%2520%2520%2520%7D%2520*%2520%2520%2520%2520%2520throw%2520e%3B%2520*%2520%2520%2520%7D%2520*%2520%7D%3B%2520*%2520%2560%2560%2560%2520*%2520*%2520See%2520https%3A%2F%2Fgithub.com%2Fangular%2Fangular.js%2Fpull%2F14221%2520for%2520more%2520information.%2520*%2Ffunction%2520toJson(obj%2C%2520pretty)%2520%7B%2520%2520if%2520(isUndefined(obj))%2520return%2520undefined%3B%2520%2520if%2520(!isNumber(pretty))%2520%7B%2520%2520%2520%2520pretty%2520%3D%2520pretty%2520%3F%25202%2520%3A%2520null%3B%2520%2520%7D%2520%2520return%2520JSON.stringify(obj%2C%2520toJsonReplacer%2C%2520pretty)%3B%7D%2F**%2520*%2520%40ngdoc%2520function%2520*%2520%40name%2520angular.fromJson%2520*%2520%40module%2520ng%2520*%2520%40kind%2520function%2520*%2520*%2520%40description%2520*%2520Deserializes%2520a%2520JSON%2520string.%2520*%2520*%2520%40param%2520%7Bstring%7D%2520json%2520JSON%2520string%2520to%2520deserialize.%2520*%2520%40returns%2520%7BObject%7CArray%7Cstring%7Cnumber%7D%2520Deserialized%2520JSON%2520string.%2520*%2Ffunction%2520fromJson(json)%2520%7B%2520%2520return%2520isString(json)%2520%2520%2520%2520%2520%2520%3F%2520JSON.parse(json)%2520%2520%2520%2520%2520%2520%3A%2520json%3B%7Dvar%2520ALL_COLONS%2520%3D%2520%2F%3A%2Fg%3Bfunction%2520timezoneToOffset(timezone%2C%2520fallback)%2520%7B%2520%2520%2F%2F%2520Support%3A%2520IE%25209-11%2520only%2C%2520Edge%252013-15%2B%2520%2520%2F%2F%2520IE%2FEdge%2520do%2520not%2520%26quot%3Bunderstand%26quot%3B%2520colon%2520(%2560%3A%2560)%2520in%2520timezone%2520%2520timezone%2520%3D%2520timezone.replace(ALL_COLONS%2C%2520%26apos%3B%26apos%3B)%3B%2520%2520var%2520requestedTimezoneOffset%2520%3D%2520Date.parse(%26apos%3BJan%252001%2C%25201970%252000%3A00%3A00%2520%26apos%3B%2520%2B%2520timezone)%2520%2F%252060000%3B%2520%2520return%2520isNumberNaN(requestedTimezoneOffset)%2520%3F%2520fallback%2520%3A%2520requestedTimezoneOffset%3B%7Dfunction%2520addDateMinutes(date%2C%2520minutes)%2520%7B%2520%2520date%2520%3D%2520new%2520Date(date.getTime())%3B%2520%2520date.setMinutes(date.getMinutes()%2520%2B%2520minutes)%3B%2520%2520return%2520date%3B%7Dfunction%2520convertTimezoneToLocal(date%2C%2520timezone%2C%2520reverse)%2520%7B%2520%2520reverse%2520%3D%2520reverse%2520%3F%2520-1%2520%3A%25201%3B%2520%2520var%2520dateTimezoneOffset%2520%3D%2520date.getTimezoneOffset()%3B%2520%2520var%2520timezoneOffset%2520%3D%2520timezoneToOffset(timezone%2C%2520dateTimezoneOffset)%3B%2520%2520return%2520addDateMinutes(date%2C%2520reverse%2520*%2520(timezoneOffset%2520-%2520dateTimezoneOffset))%3B%7D%2F**%2520*%2520%40returns%2520%7Bstring%7D%2520Returns%2520the%2520string%2520representation%2520of%2520the%2520element.%2520*%2Ffunction%2520startingTag(element)%2520%7B%2520%2520element%2520%3D%2520jqLite(element).clone().empty()%3B%2520%2520var%2520elemHtml%2520%3D%2520jqLite(%26apos%3B%26lt%3Bdiv%26gt%3B%26lt%3B%2Fdiv%26gt%3B%26apos%3B).append(element).html()%3B%2520%2520try%2520%7B%2520%2520%2520%2520return%2520element%5B0%5D.nodeType%2520%3D%3D%3D%2520NODE_TYPE_TEXT%2520%3F%2520lowercase(elemHtml)%2520%3A%2520%2520%2520%2520%2520%2520%2520%2520elemHtml.%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520match(%2F%5E(%26lt%3B%5B%5E%26gt%3B%5D%2B%26gt%3B)%2F)%5B1%5D.%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520replace(%2F%5E%26lt%3B(%5B%5Cw-%5D%2B)%2F%2C%2520function(match%2C%2520nodeName)%2520%7Breturn%2520%26apos%3B%26lt%3B%26apos%3B%2520%2B%2520lowercase(nodeName)%3B%7D)%3B%2520%2520%7D%2520catch%2520(e)%2520%7B%2520%2520%2520%2520return%2520lowercase(elemHtml)%3B%2520%2520%7D%7D%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F**%2520*%2520Tries%2520to%2520decode%2520the%2520URI%2520component%2520without%2520throwing%2520an%2520exception.%2520*%2520*%2520%40private%2520*%2520%40param%2520str%2520value%2520potential%2520URI%2520component%2520to%2520check.%2520*%2520%40returns%2520%7Bboolean%7D%2520True%2520if%2520%2560value%2560%2520can%2520be%2520decoded%2520*%2520with%2520the%2520decodeURIComponent%2520function.%2520*%2Ffunction%2520tryDecodeURIComponent(value)%2520%7B%2520%2520try%2520%7B%2520%2520%2520%2520return%2520decodeURIComponent(value)%3B%2520%2520%7D%2520catch%2520(e)%2520%7B%2520%2520%2520%2520%2F%2F%2520Ignore%2520any%2520invalid%2520uri%2520component.%2520%2520%7D%7D%2F**%2520*%2520Parses%2520an%2520escaped%2520url%2520query%2520string%2520into%2520key-value%2520pairs.%2520*%2520%40returns%2520%7BObject.%26lt%3Bstring%2Cboolean%7CArray%26gt%3B%7D%2520*%2Ffunction%2520parseKeyValue(%2F**string*%2FkeyValue)%2520%7B%2520%2520var%2520obj%2520%3D%2520%7B%7D%3B%2520%2520forEach((keyValue%2520%7C%7C%2520%26apos%3B%26apos%3B).split(%26apos%3B%26amp%3B%26apos%3B)%2C%2520function(keyValue)%2520%7B%2520%2520%2520%2520var%2520splitPoint%2C%2520key%2C%2520val%3B%2520%2520%2520%2520if%2520(keyValue)%2520%7B%2520%2520%2520%2520%2520%2520key%2520%3D%2520keyValue%2520%3D%2520keyValue.replace(%2F%5C%2B%2Fg%2C%26apos%3B%2520%26apos%3B)%3B%2520%2520%2520%2520%2520%2520splitPoint%2520%3D%2520keyValue.indexOf(%26apos%3B%3D%26apos%3B)%3B%2520%2520%2520%2520%2520%2520if%2520(splitPoint%2520!%3D%3D%2520-1)%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520key%2520%3D%2520keyValue.substring(0%2C%2520splitPoint)%3B%2520%2520%2520%2520%2520%2520%2520%2520val%2520%3D%2520keyValue.substring(splitPoint%2520%2B%25201)%3B%2520%2520%2520%2520%2520%2520%7D%2520%2520%2520%2520%2520%2520key%2520%3D%2520tryDecodeURIComponent(key)%3B%2520%2520%2520%2520%2520%2520if%2520(isDefined(key))%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520val%2520%3D%2520isDefined(val)%2520%3F%2520tryDecodeURIComponent(val)%2520%3A%2520true%3B%2520%2520%2520%2520%2520%2520%2520%2520if%2520(!hasOwnProperty.call(obj%2C%2520key))%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520obj%5Bkey%5D%2520%3D%2520val%3B%2520%2520%2520%2520%2520%2520%2520%2520%7D%2520else%2520if%2520(isArray(obj%5Bkey%5D))%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520obj%5Bkey%5D.push(val)%3B%2520%2520%2520%2520%2520%2520%2520%2520%7D%2520else%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520obj%5Bkey%5D%2520%3D%2520%5Bobj%5Bkey%5D%2Cval%5D%3B%2520%2520%2520%2520%2520%2520%2520%2520%7D%2520%2520%2520%2520%2520%2520%7D%2520%2520%2520%2520%7D%2520%2520%7D)%3B%2520%2520return%2520obj%3B%7Dfunction%2520toKeyValue(obj)%2520%7B%2520%2520var%2520parts%2520%3D%2520%5B%5D%3B%2520%2520forEach(obj%2C%2520function(value%2C%2520key)%2520%7B%2520%2520%2520%2520if%2520(isArray(value))%2520%7B%2520%2520%2520%2520%2520%2520forEach(value%2C%2520function(arrayValue)%2520%7B%2520%2520%2520%2520%2520%2520%2520%2520parts.push(encodeUriQuery(key%2C%2520true)%2520%2B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520(arrayValue%2520%3D%3D%3D%2520true%2520%3F%2520%26apos%3B%26apos%3B%2520%3A%2520%26apos%3B%3D%26apos%3B%2520%2B%2520encodeUriQuery(arrayValue%2C%2520true)))%3B%2520%2520%2520%2520%2520%2520%7D)%3B%2520%2520%2520%2520%7D%2520else%2520%7B%2520%2520%2520%2520parts.push(encodeUriQuery(key%2C%2520true)%2520%2B%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520(value%2520%3D%3D%3D%2520true%2520%3F%2520%26apos%3B%26apos%3B%2520%3A%2520%26apos%3B%3D%26apos%3B%2520%2B%2520encodeUriQuery(value%2C%2520true)))%3B%2520%2520%2520%2520%7D%2520%2520%7D)%3B%2520%2520return%2520parts.length%2520%3F%2520parts.join(%26apos%3B%26amp%3B%26apos%3B)%2520%3A%2520%26apos%3B%26apos%3B%3B%7D%2F**%2520*%2520We%2520need%2520our%2520custom%2520method%2520because%2520encodeURIComponent%2520is%2520too%2520aggressive%2520and%2520doesn%26apos%3Bt%2520follow%2520*%2520http%3A%2F%2Fwww.ietf.org%2Frfc%2Frfc3986.txt%2520with%2520regards%2520to%2520the%2520character%2520set%2520(pchar)%2520allowed%2520in%2520path%2520*%2520segments%3A%2520*%2520%2520%2520%2520segment%2520%2520%2520%2520%2520%2520%2520%3D%2520*pchar%2520*%2520%2520%2520%2520pchar%2520%2520%2520%2520%2520%2520%2520%2520%2520%3D%2520unreserved%2520%2F%2520pct-encoded%2520%2F%2520sub-delims%2520%2F%2520%26quot%3B%3A%26quot%3B%2520%2F%2520%26quot%3B%40%26quot%3B%2520*%2520%2520%2520%2520pct-encoded%2520%2520%2520%3D%2520%26quot%3B%25%26quot%3B%2520HEXDIG%2520HEXDIG%2520*%2520%2520%2520%2520unreserved%2520%2520%2520%2520%3D%2520ALPHA%2520%2F%2520DIGIT%2520%2F%2520%26quot%3B-%26quot%3B%2520%2F%2520%26quot%3B.%26quot%3B%2520%2F%2520%26quot%3B_%26quot%3B%2520%2F%2520%26quot%3B~%26quot%3B%2520*%2520%2520%2520%2520sub-delims%2520%2520%2520%2520%3D%2520%26quot%3B!%26quot%3B%2520%2F%2520%26quot%3B%24%26quot%3B%2520%2F%2520%26quot%3B%26amp%3B%26quot%3B%2520%2F%2520%26quot%3B%26apos%3B%26quot%3B%2520%2F%2520%26quot%3B(%26quot%3B%2520%2F%2520%26quot%3B)%26quot%3B%2520*%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2F%2520%26quot%3B*%26quot%3B%2520%2F%2520%26quot%3B%2B%26quot%3B%2520%2F%2520%26quot%3B%2C%26quot%3B%2520%2F%2520%26quot%3B%3B%26quot%3B%2520%2F%2520%26quot%3B%3D%26quot%3B%2520*%2Ffunction%2520encodeUriSegment(val)%2520%7B%2520%2520return%2520encodeUriQuery(val%2C%2520true).%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520replace(%2F%2526%2Fgi%2C%2520%26apos%3B%26amp%3B%26apos%3B).%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520replace(%2F%253D%2Fgi%2C%2520%26apos%3B%3D%26apos%3B).%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520replace(%2F%252B%2Fgi%2C%2520%26apos%3B%2B%26apos%3B)%3B%7D%2F**%2520*%2520This%2520method%2520is%2520intended%2520for%2520encoding%2520*key*%2520or%2520*value*%2520parts%2520of%2520query%2520component.%2520We%2520need%2520a%2520custom%2520*%2520method%2520because%2520encodeURIComponent%2520is%2520too%2520aggressive%2520and%2520encodes%2520stuff%2520that%2520doesn%26apos%3Bt%2520have%2520to%2520be%2520*%2520encoded%2520per%2520http%3A%2F%2Ftools.ietf.org%2Fhtml%2Frfc3986%3A%2520*%2520%2520%2520%2520query%2520%2520%2520%2520%2520%2520%2520%2520%2520%3D%2520*(%2520pchar%2520%2F%2520%26quot%3B%2F%26quot%3B%2520%2F%2520%26quot%3B%3F%26quot%3B%2520)%2520*%2520%2520%2520%2520pchar%2520%2520%2520%2520%2520%2520%2520%2520%2520%3D%2520unreserved%2520%2F%2520pct-encoded%2520%2F%2520sub-delims%2520%2F%2520%26quot%3B%3A%26quot%3B%2520%2F%2520%26quot%3B%40%26quot%3B%2520*%2520%2520%2520%2520unreserved%2520%2520%2520%2520%3D%2520ALPHA%2520%2F%2520DIGIT%2520%2F%2520%26quot%3B-%26quot%3B%2520%2F%2520%26quot%3B.%26quot%3B%2520%2F%2520%26quot%3B_%26quot%3B%2520%2F%2520%26quot%3B~%26quot%3B%2520*%2520%2520%2520%2520pct-encoded%2520%2520%2520%3D%2520%26quot%3B%25%26quot%3B%2520HEXDIG%2520HEXDIG%2520*%2520%2520%2520%2520sub-delims%2520%2520%2520%2520%3D%2520%26quot%3B!%26quot%3B%2520%2F%2520%26quot%3B%24%26quot%3B%2520%2F%2520%26quot%3B%26amp%3B%26quot%3B%2520%2F%2520%26quot%3B%26apos%3B%26quot%3B%2520%2F%2520%26quot%3B(%26quot%3B%2520%2F%2520%26quot%3B)%26quot%3B%2520*%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2F%2520%26quot%3B*%26quot%3B%2520%2F%2520%26quot%3B%2B%26quot%3B%2520%2F%2520%26quot%3B%2C%26quot%3B%2520%2F%2520%26quot%3B%3B%26quot%3B%2520%2F%2520%26quot%3B%3D%26quot%3B%2520*%2Ffunction%2520encodeUriQuery(val%2C%2520pctEncodeSpaces)%2520%7B%2520%2520return%2520encodeURIComponent(val).%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520replace(%2F%2540%2Fgi%2C%2520%26apos%3B%40%26apos%3B).%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520replace(%2F%253A%2Fgi%2C%2520%26apos%3B%3A%26apos%3B).%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520replace(%2F%2524%2Fg%2C%2520%26apos%3B%24%26apos%3B).%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520replace(%2F%252C%2Fgi%2C%2520%26apos%3B%2C%26apos%3B).%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520replace(%2F%253B%2Fgi%2C%2520%26apos%3B%3B%26apos%3B).%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520replace(%2F%2520%2Fg%2C%2520(pctEncodeSpaces%2520%3F%2520%26apos%3B%2520%26apos%3B%2520%3A%2520%26apos%3B%2B%26apos%3B))%3B%7Dvar%2520ngAttrPrefixes%2520%3D%2520%5B%26apos%3Bng-%26apos%3B%2C%2520%26apos%3Bdata-ng-%26apos%3B%2C%2520%26apos%3Bng%3A%26apos%3B%2C%2520%26apos%3Bx-ng-%26apos%3B%5D%3Bfunction%2520getNgAttribute(element%2C%2520ngAttr)%2520%7B%2520%2520var%2520attr%2C%2520i%2C%2520ii%2520%3D%2520ngAttrPrefixes.length%3B%2520%2520for%2520(i%2520%3D%25200%3B%2520i%2520%26lt%3B%2520ii%3B%2520%2B%2Bi)%2520%7B%2520%2520%2520%2520attr%2520%3D%2520ngAttrPrefixes%5Bi%5D%2520%2B%2520ngAttr%3B%2520%2520%2520%2520if%2520(isString(attr%2520%3D%2520element.getAttribute(attr)))%2520%7B%2520%2520%2520%2520%2520%2520return%2520attr%3B%2520%2520%2520%2520%7D%2520%2520%7D%2520%2520return%2520null%3B%7Dfunction%2520allowAutoBootstrap(document)%2520%7B%2520%2520var%2520script%2520%3D%2520document.currentScript%3B%2520%2520if%2520(!script)%2520%7B%2520%2520%2520%2520%2F%2F%2520Support%3A%2520IE%25209-11%2520only%2520%2520%2520%2520%2F%2F%2520IE%2520does%2520not%2520have%2520%2560document.currentScript%2560%2520%2520%2520%2520return%2520true%3B%2520%2520%7D%2520%2520%2F%2F%2520If%2520the%2520%2560currentScript%2560%2520property%2520has%2520been%2520clobbered%2520just%2520return%2520false%2C%2520since%2520this%2520indicates%2520a%2520probable%2520attack%2520%2520if%2520(!(script%2520instanceof%2520window.HTMLScriptElement%2520%7C%7C%2520script%2520instanceof%2520window.SVGScriptElement))%2520%7B%2520%2520%2520%2520return%2520false%3B%2520%2520%7D%2520%2520var%2520attributes%2520%3D%2520script.attributes%3B%2520%2520var%2520srcs%2520%3D%2520%5Battributes.getNamedItem(%26apos%3Bsrc%26apos%3B)%2C%2520attributes.getNamedItem(%26apos%3Bhref%26apos%3B)%2C%2520attributes.getNamedItem(%26apos%3Bxlink%3Ahref%26apos%3B)%5D%3B%2520%2520return%2520srcs.every(function(src)%2520%7B%2520%2520%2520%2520if%2520(!src)%2520%7B%2520%2520%2520%2520%2520%2520return%2520true%3B%2520%2520%2520%2520%7D%2520%2520%2520%2520if%2520(!src.value)%2520%7B%2520%2520%2520%2520%2520%2520return%2520false%3B%2520%2520%2520%2520%7D%2520%2520%2520%2520var%2520link%2520%3D%2520document.createElement(%26apos%3Ba%26apos%3B)%3B%2520%2520%2520%2520link.href%2520%3D%2520src.value%3B%2520%2520%2520%2520if%2520(document.location.origin%2520%3D%3D%3D%2520link.origin)%2520%7B%2520%2520%2520%2520%2520%2520%2F%2F%2520Same-origin%2520resources%2520are%2520always%2520allowed%2C%2520even%2520for%2520banned%2520URL%2520schemes.%2520%2520%2520%2520%2520%2520return%2520true%3B%2520%2520%2520%2520%7D%2520%2520%2520%2520%2F%2F%2520Disabled%2520bootstrapping%2520unless%2520angular.js%2520was%2520loaded%2520from%2520a%2520known%2520scheme%2520used%2520on%2520the%2520web.%2520%2520%2520%2520%2F%2F%2520This%2520is%2520to%2520prevent%2520angular.js%2520bundled%2520with%2520browser%2520extensions%2520from%2520being%2520used%2520to%2520bypass%2520the%2520%2520%2520%2520%2F%2F%2520content%2520security%2520policy%2520in%2520web%2520pages%2520and%2520other%2520browser%2520extensions.%2520%2520%2520%2520switch%2520(link.protocol)%2520%7B%2520%2520%2520%2520%2520%2520case%2520%26apos%3Bhttp%3A%26apos%3B%3A%2520%2520%2520%2520%2520%2520case%2520%26apos%3Bhttps%3A%26apos%3B%3A%2520%2520%2520%2520%2520%2520case%2520%26apos%3Bftp%3A%26apos%3B%3A%2520%2520%2520%2520%2520%2520case%2520%26apos%3Bblob%3A%26apos%3B%3A%2520%2520%2520%2520%2520%2520case%2520%26apos%3Bfile%3A%26apos%3B%3A%2520%2520%2520%2520%2520%2520case%2520%26apos%3Bdata%3A%26apos%3B%3A%2520%2520%2520%2520%2520%2520%2520%2520return%2520true%3B%2520%2520%2520%2520%2520%2520default%3A%2520%2520%2520%2520%2520%2520%2520%2520return%2520false%3B%2520%2520%2520%2520%7D%2520%2520%7D)%3B%7D%2F%2F%2520Cached%2520as%2520it%2520has%2520to%2520run%2520during%2520loading%2520so%2520that%2520document.currentScript%2520is%2520available.var%2520isAutoBootstrapAllowed%2520%3D%2520allowAutoBootstrap(window.document)%3B%2F**%2520*%2520%40ngdoc%2520directive%2520*%2520%40name%2520ngApp%2520*%2520%40module%2520ng%2520*%2520*%2520%40element%2520ANY%2520*%2520%40param%2520%7Bangular.Module%7D%2520ngApp%2520an%2520optional%2520application%2520*%2520%2520%2520%7B%40link%2520angular.module%2520module%7D%2520name%2520to%2520load.%2520*%2520%40param%2520%7Bboolean%3D%7D%2520ngStrictDi%2520if%2520this%2520attribute%2520is%2520present%2520on%2520the%2520app%2520element%2C%2520the%2520injector%2520will%2520be%2520*%2520%2520%2520created%2520in%2520%26quot%3Bstrict-di%26quot%3B%2520mode.%2520This%2520means%2520that%2520the%2520applica%253C%2Fdiv">